text
stringlengths
2.85k
2.55M
label
class label
11 classes
arXiv:quant-ph/0511145v1 15 Nov 2005 Semantics and Simulation of Communication in Quantum Programming Diploma Thesis Wolfgang Mauerer1 Quantum Information Theory Group Institute for Theoretical Physics I and Max Planck Research Group for Optics, Information and Photonics University Erlangen-Nuremberg, May 2005 Abstract We present the quantum programming language cQPL which is an extended version of QPL [Sel04b]. It is capable of quantum communication and it can be used to formulate all possible quantum algorithms. Additionally, it possesses a denotational semantics based on a partial order of superoperators and uses fixed points on a generalised Hilbert space to formalise (in addition to all standard features expected from a quantum programming language) the exchange of classical and quantum data between an arbitrary number of participants. Additionally, we present the implementation of a cQPL compiler which generates code for a quantum simulator. PACS numbers: 03.67.-a, 03.67.Hk, 03.67.Lx, 89.20.Ff Revision 1.1 (15. September 2005) 1 eMail: [email protected] Contents 1 Introduction 1 2 Quantum programming with QPL and cQPL 2.1 Programming and quantum physics . . . . . . . . . . . 2.1.1 Computability . . . . . . . . . . . . . . . . . . 2.1.2 Characteristics of quantum computers . . . . . 2.1.3 Static typing, functionality and runtime errors 2.2 Introduction to QPL and cQPL . . . . . . . . . . . . . 2.2.1 Model of computation . . . . . . . . . . . . . . 2.2.2 Language elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 4 5 5 5 6 Identifiers and variables • Arithmetic and logical expressions • Procedures • Gates • Control flow • Other features. 2.2.3 Modelling quantum communication with cQPL . . . . . . . . . . . . . 10 Quantum channels • Modules and communication primitives. 2.3 Example programs . . . . . . . . . 2.3.1 Random coin tossing . . . . 2.3.2 Distribution of an EPR pair 2.3.3 Quantum teleportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 12 12 13 3 A compiler for cQPL 3.1 Structure and implementation . . . . . . . 3.1.1 Compiler technique . . . . . . . . . 3.1.2 The implementation . . . . . . . . 3.1.3 Implementation of communication 3.2 Using the compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 15 15 17 18 18 4 Mathematical structures 4.1 Algebraic structures . . . . . . . . . . 4.1.1 Fundamentals . . . . . . . . . . 4.2 Linear operators . . . . . . . . . . . . 4.2.1 General . . . . . . . . . . . . . 4.2.2 Hilbert-Schmidt operators . . . 4.3 Connection with quantum mechanics . 4.3.1 States and effects . . . . . . . . 4.3.2 Observables . . . . . . . . . . . 4.3.3 Classical components . . . . . . 4.3.4 Composite and hybrid systems 4.4 Domain theory . . . . . . . . . . . . . 4.4.1 Basic definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 21 21 21 21 22 23 23 24 25 25 26 26 i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 4.4.2 A fixed point theorem . . . . . . . . 4.4.3 Constructions on domains . . . . . . cp-Maps and their representation . . . . . . 4.5.1 Operator-sum representation . . . . 4.5.2 Equivalence of Kraus operators . . . 4.5.3 A partial order for Kraus operators . 4.5.4 Kraus aggregations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 28 28 29 30 30 31 . . . . . . . . . . . . . . . . . . . . . . . . 39 39 41 41 41 42 43 45 46 A partial order for Kraus aggregations • Equivalence of Kraus aggregations. 5 Formal denotational semantics 5.1 Fundamentals of denotational semantics . . . 5.2 Survey of QPL . . . . . . . . . . . . . . . . . 5.2.1 Notational conventions . . . . . . . . . 5.2.2 Language elements . . . . . . . . . . . 5.2.3 Semantics . . . . . . . . . . . . . . . . 5.2.4 Limitation: Quantum communication 5.3 Denotational semantics of cQPL . . . . . . . 5.3.1 Formal definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typing context • Probabilistic environment • Kraus aggregations. 5.3.2 Some examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.3.3 Extension to multipartite systems . . . . . . . . . . . . . . . . . . . . 55 Semantics of sequential programs • Communication with EPR pairs. Kraus Aggregation • Typing Context • Probabilistic Environment • Quantum channels. 5.3.4 5.3.5 5.3.6 Existence of fixed points . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Types of interpretational equivalence . . . . . . . . . . . . . . . . . . . 59 Semantics of the language components . . . . . . . . . . . . . . . . . . 60 Some notational remarks • State transformations and fixed points • Classical operations • Quantum operations. 5.3.7 5.3.8 Explicit transformations of density matrices . . . . . . . . . . . . . . . 78 The type system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Quantum variable tuples • Application of operators • If conditionals and while loops • Measurements • Communication. 5.4 Avoidance of runtime errors . . . . . . . . . . . . . . . 5.4.1 Unique ownership of qbits . . . . . . . . . . . . 5.4.2 Prevention of cloning and unphysical situations 5.4.3 Unavoidable non-termination conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 81 82 82 6 Prospects 85 6.1 Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.2 Latest developments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 A List of symbols 87 B Glossary 89 C Formal syntax 91 Bibliography 93 ii Dich sah ich, und die milde Freude Floß von dem süßen Blick auf mich; Ganz war mein Herz an deiner Seite Und jeder Atemzug für dich. Johann Wolfgang von Goethe, Willkommen und Abschied 1 Introduction Although there is no formal proof that quantum computers offer greater computational power than classical ones, there are a few quantum computer algorithms which provide efficient solutions for problems which are up to now believed to be classically NP-hard, i.e., they cannot be solved in polynomial time. One of these problems – computing discrete logarithms – is the cornerstone of basically every modern classical cryptographic algorithm, so the increased interest in quantum computing is obvious, both from a fundamental and a practical point of view. How can quantum algorithms be described in an efficient, readable and precise manner? Usually, this is done with quantum circuits which are combined into a quantum network, but especially for larger programs, this is a very cumbersome and error-prone method. Much research has been performed on the construction, implementation and conception of classical programming languages; therefore, a great amount of alternatives are available. The situation is totally different in quantum computing: Only a handful of languages have been proposed so far [AG04, BSC01, Öme98, SP00, Sel04b, vT04], and only two working implementations based on quantum computer simulators are available [Öme98, BSC01] (recently, a third, but still rough implementation was presented in [AG05]). Both are based on imperative/object oriented languages (C, Pascal, C++, . . . ), with quantum features as extensions, whereas QPL [Sel04b] models a basically functional language.1 In this work, we present an extension of QPL with abilities to cover quantum communication, i.e., the transmission of quantum mechanical states and exploitation of their highly non-classical properties like superpositions and entanglement. To distinguish our approach from QPL, we call it cQPL for communication capable QPL. In contrast to quantum computers of which only some very elementary parts have been experimentally realised until now, implementations of quantum communication are not only available in several laboratories around the world, but can even be obtained commercially. To provide some orientation where our approach can be located in contrast to work done by other contributors to the field, Table 1.1 presents a comparison of quantum programming languages and their features. In a nutshell, the contribution of our work to the field of quantum programming languages is twofold: ❏ We provide a compiler which can serve as a testbed for new ideas in quantum programming, to teach concepts of quantum algorithms or act as an aid to the intuition 1 We need to note, though, that the term functional should not be overestimated in this context. Important features like higher order functions, which are considered to be key elements of classical functional languages, are missing in QPL. The most interesting part of the language from a physicist’s point of view is the ability to guarantee freedom against runtime errors already at compile time, no matter how this goal is achieved. 1 Chapter 1. Introduction Reference New language Respects physicsa Implemented Formal semantics Communication Universal QCL [Öme98] ✗ ✗ ✓ ✗ ✗ ✓ Q Language [BSC01] ✗ ✗ ✓ ✗ ✗ ✓ qGCL [SP00] ✓ ✗ ✗ ✓ ✓ ✓ QML [AG04] ✓ ✓ ✓b ✓ ✗ ✓ QPL [Sel04b] ✓ ✓ ✓c ✓ ✗ ✓ cQPL ✓ ✓ ✓ ✓ ✓ ✓ a Respecting physics is meant in the sense that it is not possible to syntactically specify programs which would create unphysical situations; of course, such a state will force the simulation to abort with an error and needs thus to be avoided if possible. b A partially finished implementation was available at the time of writing. c If we consider our cQPL compiler to be a QPL compiler as well. Table 1.1: Comparison of quantum programming languages defined in other approaches to the problem, their features and their shortcomings. of users who want to experiment (in the sense of goal oriented playing, not laboratory) with quantum protocols. ❏ We present an alternate approach to the compositional semantics of QPL and provide the possibility to include and formalise quantum communication as part of the language. This is a necessary step towards the formalisation of open-world programs, but may also prove itself useful in fields like quantum process calculi, automated protocol analysis or similar – cf. Chapter 6 for further prospects. The layout of this thesis is as follows: In Chapters 2 and 3, we provide an overview about quantum programming, present the language cQPL and describe the compiler and its implementation. Chapter 4 presents the mathematical tools and requisites necessary for a denotational semantics of cQPL, and Chapter 5 develops the semantical description. Chapter 6 finally provides some short remarks on possible further directions that may be pursued based on the results of this work. All chapters are interlaced with short introductions to topics, tools and techniques which are uncommon in physics, but necessary for our work; Appendices A and B provide a list of symbols and a glossary, respectively. The formal syntax is presented in Appendix C. To aid the reader in staying on track, we have provided short summaries in grey boxes at some points along the way. Since the topic dealt with does not only contain problems of physical nature, but also touches the fields of computer science and mathematics, we have tried to make the text as self-contained as possible for readers with any of these backgrounds.2 Obviously it was not possible to present everything in as much detail as required without repeating the introductory textbooks, but numerous references to the literature are provided which hopefully alleviates any arising problems. 2 In this context, it is interesting to note that 48% of all entries in the bibliography are of physical nature and 36% can be counted to computer science; the remaining 16% belong to mathematics or are of general interest. 2 When someone says, “I want a programming language in which I need only say what I wish done,” give him a lollipop. Alan Perlis, Epigrams on Programming 2 Quantum programming with QPL and cQPL This chapter presents an overview about classical and quantum computers, the underlying models of computation and some principal remarks on quantum programming languages. Afterwards, a short introduction to QPL and cQPL is given. Note that this chapter is intentionally kept as terse as possible to allow a more detailed coverage of other topics dealt with in this thesis. Therefore, no attempt is made to to provide special rigour in this chapter. 2.1 2.1.1 Programming and quantum physics Computability Classical computers can be described by several models which are apt for different purposes (for a more detailed description, cf., e.g., [AB02, Sch01]): ❏ Turing machines ❏ General recursive functions ❏ Register machines ❏ Lambda calculus ❏ Logical gates ❏ Universal programming languages They can all be brought to a common denominator by showing that they are able to compute respectively solve the same class of problems. They are computationally equivalent because one model can be used to efficiently simulate any other model; a Turing machine is normally taken to be the normative instance among them. The fact that a turing machine can compute everything which is computable in principle is captured in the Church-Turing thesis which is one of the fundamental axioms of computer science:1 Hypothesis 2.1.1 (Church-Turing). Every function which would naturally be regarded as computable can be computed by a Turing machine. This definition places computability in a purely abstract setting without regard to the laws of physics. Deutsch [Deu85] realised that if the laws of (quantum) physics are used as basis for computation, an improved version of the Turing machine might lead to greater computational power. This requires an extended version of the Church-Turing thesis as well: 1 To be precise, one would have to note that Church’s thesis states that “a function of positive integers is effectively calculable only if recursive”. This is equivalent to Turing’s thesis, though, and the name Church-Turing thesis is conventionally used in the literature. 3 Chapter 2. Quantum programming with QPL and cQPL Hypothesis 2.1.2 (Church-Turing-Deutsch). Every physical process can be simulated by a universal computing device. Greater computational power is meant in the sense that there are some problems which can be efficiently solved by a universal computing device according to Church-TuringDeutsch but which cannot be efficiently solved by a Turing machine, e.g., the simluation cost for a universal computing device on a normal turing machine would be at least exponential for the most general case.2 Until now, it has not been proven if quantum Turing machines have greater computational power than Turing machines or not; cf. Refs. [Cle99, Aha98] for further information on this and related topics. 2.1.2 Characteristics of quantum computers The basic building block for quantum computers are quantum bits (qbits), i.e., quantum mechanical objects which can be represented by two different basis states, usually denoted by |0i and |1i. This can, e.g., be realised by two-spin systems such as electrons, with the two different polarisations of a photon etc. In contrast to classical machines and models of computation, quantum computing can draw from two additional resources: ❏ Superpositions: The state of a quantum bit can be in a superposition α |0i + β |1i with α, β ∈ C and |α|2 + |β|2 = 1. If every qbit of a quantum register consisting of n elements is brought into a symmetric superposition with α = β = 2−1/2 , the register contains all numbers from 0 to 2n − 1 at the same time. Manipulations of the register thus manipulate all these numbers in one step, whereas classically, the number of required manipulations would grow exponentially with the register size. This feature is conventionally referred to as quantum parallelism. ❏ Entanglement: Two parts of a quantum system can be in an entangled state such that manipulations on one part of the system influence the other system although they may be spatially separated. While superpositions are useful for computational problems, entanglement is suitable for tasks like secret key growing, but is for example also necessary to connect input with output registers for quantum function application. In general, there are several equivalent models for quantum computers which are abstracted from their physical realisation: ❏ Quantum Turing machines ❏ Quantum gates ❏ Universal quantum programming languages All these models are equivalent, cf., e.g., Refs.[NC00, Aha98, Pre99] for more detailed explanations. 2 Note that there is a very prominent problem which illuminates this field: Factorising integers is possible at polynomial cost on a quantum computer, but the currently best known algorithms require exponential cost on a classical computer. This does not prove, though, that quantum computers are per se more powerful than classical ones because there is, for example, no proof that there is no classical polynomial-time factorisation algorithm. 4 2.2. Introduction to QPL and cQPL 2.1.3 Static typing, functionality and runtime errors Selinger proves in [Sel04b] that QPL has the ability to avoid runtime errors by detecting them at compile time (and can thus reject the program) which is not possible in other language proposals presented at the time of writing. He argues that this must be attributed to the static type system of the language. Although the proof for this is solely based on properties of the static type system, the functional style of QPL does have its merits in this respect in our opinion, too: It restricts the language to elements which allow to express universal programs, but do not allow constructions that can produce runtime errors that cannot be detected at compile time.3 When work on this thesis was started, one of the points we wanted to investigate was if and how principles of functional languages could be advantageous for quantum languages. This did not reach fruition, though, because we could not find a simple way to transfer any advanced functional method like higher-order functions, recursively defined data types etc. to the quantum case.4 From a physical perspective, the absence of runtime-errors is much more interesting than any computer science related question like the type system or functionality. In this thesis, we thus concentrated on preserving the possibilities of static checking provided by QPL as far as possible while enhancing usability of the language and providing means to handle commuication. 2.2 Introduction to QPL and cQPL This section presents a very short introduction to cQPL; some of the things stated in the following also hold for a (regularised version) of block QPL5 as presented in [Sel04b] which is used as basis for cQPL. Note that cQPL is explicitely meant to be an experimental compiler. Only very modest effort was made to make the compiler easy to use (the error messages provided can, for example, often only be understood if the user is familiar with the inner working of the compiler), and only very few classical operations which are considered standard components of programming languages (e.g., numerical operations like sin, cos etc.) were implemented to save time since this is purely routine work. Nevertheless, care has been taken to design the compiler for easy extensibility.6 2.2.1 Model of computation Although quantum gates are the most widespread model in the literature on quantum algorithms, the QRAM model suggested by Knill [Kni96] is more apt as basis for quantum programming languages. The model consists of two components: A classical computer for conventional tasks like program flow control, classical calculations etc., and a quantum memory controlled by the classical computer that can not only store quantum states, but also apply any unitary operator and perform measurements. Figure 2.1 visualises the approach. 3A static type system is in general not enough to ensure this property: Just think of the many possible ways to generate runtime-errors in C, which is statically typed as well. This is partially caused by the fact that typing in C is weak; nevertheless, even strongly typed languages as, e.g., Java and C# still cannot prevail runtime errors. Thus, static typing alone is not sufficient to avoid all possible runtime errors. 4 To our knowledge, no fully satisfying mechanism for any of these problems has been found until now although the topic is addressed in several papers. 5 The variant of QPL with a textual structure that includes blocks; alternatively, there is a textual variant without blocks and a flow diagram representation. 6 For example, integration of the n-qbit Fourier gate could be accomplished by adding only 8 lines of code to the compiler and 10 to the runtime library. 5 Chapter 2. Quantum programming with QPL and cQPL Figure 2.1: Hybrid architecture for a quantum computer which consists of a classical computer and a quantum memory with the ability to apply unitary operators and perform measurements at the disposal of the classical system (image taken from [Öme03]). cQPL is centred on the assumption that the control flow of a program can be described by classical means. Although this is considered to be a loss of generality by some authors (most notably [Öme03]), it does not represent a real restriction because all known quantum algorithms can be expressed in this framework. Data is, of course, quantum mechanical, and can be modified by unitary operators which are equivalently called gates in analogy to the gate model of quantum computation. 2.2.2 Language elements The following remarks provide an introduction to cQPL for ordinary users; a formal version of the syntax will be presented in Appendix C. The compiler distribution provides some example programs which demonstrate all features. 2.2.2.1 Identifiers and variables Identifiers for variables can be denoted by strings consisting of the characters A–Z, a–z, and 0–9, where no digit must be at the beginning. Allocation of new variables is done with the operator new: new int loop := 10; new qbit b1 := 1; Note that it is mandatory to provide an initial value both for classical and quantum data types. By default, the data types bit, int, float, qbit and qint are available. Assigning values to classical variables is possible using the operator :=: loop := loop - 1; 6 2.2. Introduction to QPL and cQPL 2.2.2.2 Arithmetic and logical expressions Arithmetic expressions can be given as in most programming languages (e.g., 7+3*x-5). The operators +, -, * and / are available, they are overloaded to work with any classical numerical data type. Operators resulting in a logical value (true or false) are <, >, <=, >=, = and !=; logical negation is available using !, and predicates can be combined using & (and) and | (or). Operator priority is defined as usual in arithmetic and logic; parentheses can be used to explicitely modify this. 2.2.2.3 Procedures Procedures can take an arbitrary number of input parameters (including none) which are specified as name:type tuples. Declarations take the following form: proc test: a:int, b:bit, c:float, d:qbit { ... } Procedure calls are achieved with the keyword call: (eins, zwei, drei) := call test(a0, a1, a2, b1); Note that the parameters are passed by value so that modifications of the classical variables given to the procedure (in this case a0, a1 and a2) are not visible in the caller’s scope. This means that no matter what test does, these variables have the same values before and after the procedure is called. This is not the case with b1 because it is a quantum variable and cannot be cloned to implement call-by-value; any modifications performed by test on the state ofb1 are visible for the caller after test returns. The result of a procedure is a tuple containing the values the classical parameters had at the end of procedure execution; the example stores these in the local variables eins, zwei and drei. Note that the result of a procedure call may be ignored as well by the caller, so the following variant is also possible: call test(a0, a1, a2, b1); The example program proc test.qpl which accompanies the compiler further illustrates the described behaviour, so we refer the reader to it. 2.2.2.4 Gates Gate application is performed using the operator *= as in the following example: q *= Not; A small number of elementary gates is built into the language core (remember that additional ones can be added with really little effort as we already mentioned before): ❏ H Hadamard transformation on a qbit. ❏ FT(n) Fourier transformation on n qbits, i.e., the n-fold tensor product of Hadamard transforms. 7 Chapter 2. Quantum programming with QPL and cQPL ❏ NOT Logical negation on one qbit. ❏ CNot Controlled Not on two qbits. ❏ Phase Phase shift gate on one qbit; the desired shift is given as parameter. The dimension of the gate and the destination must match. Variable tuples where identifiers are combined with commas (,) can be used to combine several quantum variables as in the following example: new qbit test1 := 0; new qbit test2 := 1; test1, test2 *= CNot; test1 *= Phase 0.5; User-defined gates can be defined by enclosing a list of (complex) numbers in [[ and ]] as in the following example: test1,test2 *= [[0.5, 0.5, 0.5, 0.5, 0.5, 0.5i, -0.5, -0.5i, 0.5, -0.5, 0.5, -0.5, 0.5, -0.5i, -0.5, 0.5i]]; 2.2.2.5 Control flow If-then-else and While are available for directing the control flow. new int loop := 10; while (loop > 5) do { print loop; loop := loop - 1; }; if (loop = 3) then { print "3"; } else { print "Nicht 3"; } The meaning of these operations is the same as in classical languages. 2.2.2.6 Other features Several more features which do not fit into any of the above categories are available: ❏ dump takes one or more quantum variable identifiers as argument and provides a dump of the current probability spectrum in the canonical basis |0i , |1i: dump eins, zwei; To demonstrate the effect of this command, consider the following example: 8 2.2. Introduction to QPL and cQPL new qbit a := 0; new qbit b := 0; print "State before FT:"; dump a, b; a, b *= FT(2); print "State after FT:"; dump a, b; The program fragment produces the following output when run: State before FT: 1 |00> State after FT: 0.25 |00>, 0.25 |01>, 0.25 |10>, 0.25 |11> Note that there is a fundamental difference between dumping the state of quantum variables and measuring the state and printing the result, as the following example shows: measure a then { print "a is |0>"; } else { print "a is |1>"; }; print "State of b:"; dump b; print "State of (a,b):"; dump a,b; If the fragment above is supplemented by these lines, running the program either yields this a is |0> State of b: 0.5 |0>, 0.5 |1> State of (a,b): 0.5 |00>, 0.5 |01> or that output (the output of the statements before is omitted): a is |1> State of b: 0.5 |0>, 0.5 |1> State of (a,b): 0.5 |10>, 0.5 |11> The result of the command dump b never changes, no matter how often the program is run. The result of the measure command, however, will change so that every output appears with probability 0.5 for a large number of executions. ❏ skip does nothing, but can be used to fulfil syntactic requirements if, for example, one branch of an if-then-else-statement is supposed to do nothing: if (condition) then { skip; } else { ... } ❏ print prints the value of a variable or an arithmetic expression (e.g., print 5+7; print a;), but can also be used to output text strings enclosed in quotation marks to the console (e.g., print "Hello, world!";). 9 Chapter 2. Quantum programming with QPL and cQPL ❏ measure measures a quantum variable and returns a classical result. The result is governed by a probability distribution according to the state the quantum variable is in; thus, successive program runs will in general return different results when the function is called. Note that the measurement is always performed in the standard basis |0i , |1i for each contributing qbit. 2.2.3 Modelling quantum communication with cQPL Although quantum communication has already been implemented with several physical schemes at the time of writing, cQPL does not consider any of these solutions. Instead, the model presented in Section 2.2.1 is extended in such a way that the peculiarities of communication can be replaced by reasonable simulation alternatives. In a real physical setting, communication between two parties can be implemented by using whatever kind of quantum channel which allows to transfer quantum states. Since this is not quite easy to implement experimentally (quantum states are very fragile objects), diverse effects like channel loss, decoherence etc. need to be taken into account in a real-world setting. This is accounted for by a channel model which describes these effects mathematically. 2.2.3.1 Quantum channels Obviously, no spatial transmission of quantum states is performed in the simulation.7 A quantum channel is thus replaced with a label on each qbit present in the simulation which denotes the respective owner. Sending a qbit is thus equivalent to changing the label of it. Note that this definition differs from the definition of a channel which is used in some contributions to the literature, e.g. [Key02]. Here, a channel is seen as something that modifies the state, for example by decoherence, loss or the influence of eavesdroppers, whereas our definition captures the notion of a channel as a means of unambiguous quantum state transfer. Inclusion of eavesdroppers (or any modification of the quantum state) is possible if a quantum channel is replaced by two quantum channels which are connected by a third module (which we E for Eve following the usual convention) which receives quantum states from Alice, performs appropriate modifications and resends the states to Bob. Obviously, Eve can collect multiple qbits that pass the channel and manipulate them collectively to pursue different attack strategies, so this is in no way a restriction to intercept-resend attacks. Figure 2.2 provides a visualisation of the communication model. 2.2.3.2 Modules and communication primitives Communicating systems are specified in terms of modules which contain the code the participants execute. Every module is identified by a unique label which identifies it among the participants. Note that module definitions must only occur at the top-level; modules must not contain other module definitions. Two parties which are named Alice and Bob can be implemented by this structure: module Alice { ... }; module Bob { 7 It would be possible, for example, to consider networked computers between which simulated quantum states can be transferred. This would add no new physical insights to the problem, but only add technical difficulties, so we did not implement such a scheme. 10 2.3. Example programs Figure 2.2: Model of communication used in cQPL. Transmission of quantum data is replaced by a quantum heap shared by the communicating parties; all qbits have a unique label that identifies to whom they belong at the moment. Sending and receiving can be modelled by changing the label, the channel itself is modelled by a third party. ... }; Channels for sending and receiving are implicitly opened between all participants. The send command is provided for sending variables. Two parameters need to be supplied: A list of variables (which may be classical or quantum) and the identifier of the receiver. For example, the following code can be placed in module Alice: new qbit q1 := 0; new qbit q2 := 1; ... send q1,q2 to Bob; Receiving works similar; consider for example the following code which might be located in module Bob: ... receive var1:qbit, var2:qbit from Alice; ... // Do something with var1, var2 Note the a receive commands implicitly introduces new variables into the present frame, in this case var1 and var2. The data type of the received quantities must be specified after the variable name where a colon is used as separator. 2.3 Example programs We present three small, but complete examples together with their output generated by executing them to allow a look at the cQPL syntax without resorting to program fragments. 11 Chapter 2. Quantum programming with QPL and cQPL 2.3.1 Random coin tossing This simple algorithm puts a quantum bit into a symmetric superposition and measures it to simulate the effect of tossing a perfect coin: new qbit q := 0; q *= H; measure q then { print "Tossed head"; } else { print "Tossed tail"; }; The output is with equal probability either Tossed head or Tossed tail, obviously. 2.3.2 Distribution of an EPR pair Distributing EPR pairs is one possible method to establish a secret key between Alice and Bob that can, e.g., be used for a Vernam cipher. The following cQPL program shows how to do this for a single EPR pair: module Alice { proc createEPR: a:qbit, b:qbit { b *= Not; b *= H; a,b *= CNot; } in { new qbit first := 0; new qbit second := 0; call createEPR(first, second); send second to Bob; measure first then { print "Alice’s qbit is |1>"; } else { print "Alice’s qbit is |0>"; }; }; }; module Bob { receive q:qbit from Alice; measure q then { print "Bob’s qbit is |1>"; } else { print "Bob’s qbit is |0>"; }; }; Running the program creates one of the following two outputs with equal probability: Alice’s qbit is |0> Bob’s qbit is |0> Alice’s qbit is |1> Bob’s qbit is |1> Note that the order of Alice and Bob’s output may be inverted as well because after and before the send/receive synchronisation, the execution order of the threads representing Alice and Bob is indeterministic.8 8 To be precise: The execution order depends on how the computer used for the simulation implements threads and their parallel execution, so it is effectively indeterminate. On machines with at least two CPUs and assuming that each thread runs on one of them, the indeterminism is real. 12 2.3. Example programs 2.3.3 Quantum teleportation Quantum teleportation is an algorithm that enables to transfer an unknown quantum state between two parties if both of them share one part of an EPR state (in this case, |β00 i) and can communicate classically. An easy calculation as is, for example, given in [NC00, p. 27] or any other quantum information text shows how this works, so we will not repeat it here. The implementation in cQPL is as follows: module Alice { proc createEPR: a:qbit, b:qbit { a *= H; b,a *= CNot; /* b: Control, a: Target */ } in { new qbit teleport := 0; /* Apply unitary operations to set the qbit to any other desired state */ new qbit epr1 := 0; new qbit epr2 := 0; call createEPR(epr1, epr2); send epr2 to Bob; teleport, epr1 *= CNot; new bit m1 := new bit m2 := m1 := measure m2 := measure /* teleport: Control, epr1: Target */ 0; 0; teleport; epr1; /* Transmit the classical measurement results to Bob */ send m1, m2 to Bob; }; }; module Bob { receive q:qbit from Alice; receive m1:bit, m2:bit from Bob; if (m1 = 1) then { q *= [[ 0,1,1,0 ]]; }; if (m2 = 1) then { q *= [[ 1,0,0,-1 ]]; }; /* Apply sigma_x */ /* Apply sigma_z */ /* The state is now teleported */ print "Teleported state:"; dump q; }; 13 14 Denn was wir tun müssen, nachdem wir es gelernt haben, das lernen wir, indem wir es tun. Aristoteles, Nikomachische Ethik 3 A compiler for cQPL A compiler for cQPL was implemented as part of this thesis; since no quantum computers are available yet, it is obviously targeted at simulators for such. This chapter presents a very short overview about the compiler’s implementation and the limitations which arise from the experimental nature of it. Note that this chapter is intentionally kept as terse as possible; it is not supposed to be a detailed description of the techniques used in implementing the compiler nor is its intention to go down to the source code level. 3.1 Structure and implementation Since the initial intention when work on the thesis started was to examine the aptness of functional methods in programming languages for quantum computers, we decided to implement the compiler for cQPL in a functional language as well (observe the remarks in Section 2.1.3 why functionality was realised not to be the important factor). The choice after testing several alternatives fell on Objective Caml (OCaml) which is, for example, described on http://caml.inria.fr. One of the reasons for this choice was that very good automated generators for lexers and parsers are available as part of the compiler distribution which considerably reduce routine work. As simulation backend, we used the routines supplied with Ömer’s QCL compiler [Öme98] because this library was the most advanced one at that time. In the meanwhile, a number of other libraries appeared and existing ones matured, so most likely, we would have chosen a different simulation backend now because the QCL library comes effectively without any documentation for the programmer (only the QCL compiler built on top of the library is documented) which resulted in quite a few technical obstacles. A simple compiler for a simple classical language was implemented as part of this thesis to provide an example for explaining compiler technique and to get used to the OCaml language and the associated tool-chain. 3.1.1 Compiler technique As usual in compiler technique, the work is separated into several passes which are shown in Figure 3.1. Lexical analysis is performed by a lexer generated with OCamllex. The lexer transforms the input stream of characters into a stream of tokens where tokens are, for example, keywords like int, measure and so on. This simplifies the parsing process because it does not need to deal with a program representation at the level of single characters, but can already work with less elementary units. A more interesting part is the syntactical analysis where the parser determines if the program is valid according to the rules given in Section C. The 15 Chapter 3. A compiler for cQPL Figure 3.1: Structure of the cQPL compiler syntax for cQPL is specified as a LALR(1) grammar which is a special kind of an LR(1) grammar which, in turn, is a variant of a context free grammar as introduced in Definition 5.1.1. We do not want to go into more technical details here, but refer to Appendix B and the usual literature on the topic, e.g.. Refs. [ASU86, App04, GBJL02, WM95] for the exact definitions of such grammars. After the syntactical correctness of a program has been ensured, the compiler can analyse the generated parse tree to infer the meaning of the program and perform compile time checks. These try to find as many errors in the program as possible to ensure that they will not appear at runtime and lead to abortion of the program with an error. Such checks include, for example: ❏ Making sure that all variables were declared before use. ❏ Checking that procedures are called with proper arguments. ❏ Matching the dimension of quantum gates with the dimension of variables they are applied to. ❏ Ensuring that tuples of quantum variables are disjoint. Many more checks of this kind can be found in the source code. Some (e.g., the first mentioned two) appear in classical programming languages as well, whereas others (e.g., the last mentioned two) are specific to quantum languages or necessary only for our approach. The goal of the analysis phase is to provide a representation of the program that is augmented with everything necessary so that the code-generation backend can produce its result directly from this representation. An additional advantage of this strategy is that the code generation can be replaced by a variant targeting a different simulator.1 The structure of the annotated parse tree which is passed from the parser to the code generation backend is documented in the source code. 1 For a very early version of the compiler, a code generation backend for the Fraunhofer simulator [RAMK+ 04] was provided as well, but we dropped support for this to not spend too much time on implementation issues. 16 3.1. Structure and implementation 3.1.2 The implementation We do not want to go into any implementation details here, but just provide an overview about the source files which constitute the compiler. Every detail of the implementation can obviously be found there. ❏ lexer.mll is an input file for OCamllex which generates the lexical analyser for QPL from the rules given in the file. ❏ parser.mly is an input file for OCamlyacc which is used to transfer the rules (and code) given in the file into a parser for cQPL syntax. ❏ parser defs.ml defines the data structures used by the parser to build the abstract syntax tree. For every element of the grammar, a separate data structure is defined. Most of them can be augmented with additional information which is inferred during analysis, e.g., lists of type conversions. ❏ cqpl.ml plays a twofold role: On the one hand, it implements the user interaction part which handles command line processing and directs the different passes of the compiler. On the other hand, it implements the semantic analysis where for every grammar production, a corresponding function is available to perform the appropriate checks. ❏ gen qcl.ml implements the code generation backend for the QCL library. The generated code depends on the C++ code in qpl_runtime.{cc,h} which provides the runtime environment for programs. This handles, for example, quantum memory management and provides implementations of standard operators. qpl runtime template.h contain the implementation of runtime routines which use templates and thus cannot be compiled to a static object; the routines to implement the communication operations (i.e., thread handling, data exchange and locking) can be found in qpl\_runtime\_comm.{cc,h}. ❏ type.ml contains the type checker and routines to perform lossy and non-lossy conversion between different data types. Especially interesting here is the conversion between classical and quantum variables. The routines provided by this file are much more general than required by the compiler and would in principle be able to handle mixed data types as well. ❏ stacked env.ml provides a stackable environment for the semantic analysis. Since the compiler is only one part of this thesis, we deliberately accepted some limitations which would have to be removed for a production quality compiler. None of them would present a problem in principle, but would require some tedious effort that does not justify the gain: ❏ Error messages are not detailed, and no effort is made to continue translation as far as possible or perform error recovery after a mistake was spotted. ❏ No specific error productions are provided. Syntactical errors are therefore in general reported by the lexer and not properly by the parser. ❏ There is absolutely no optimisation for execution speed. 17 Chapter 3. A compiler for cQPL ❏ Communication was not too intensively tested because we concentrated more on the formal aspects of this. Additionally, it uses big locks instead of finer-grained solutions which reduces performance. ❏ There is no set of standard routines or a standard library of any kind which would be required for real-world applications. 3.1.3 Implementation of communication Since we do not use a real network of quantum and classical computers to simulate communicating parties, but only a single system, it is necessary to find an approach that emulates the characteristic properties of real-world systems in the simulation environment. It has already been shown that the QRAM model can – together with an appropriate labelling mechanism for the qbits – provide a suitable replacement for a quantum channel. The remaining issue that needs to be addressed is how the model the independent execution of the parties together with the synchronisation when send/receive operations take place is to be implemented. This is, obviously, a problem of the backend, so the solution presented is specific to the QCL backend. For every module defined in a program, a separate thread2 is created which has access to the global memory management routines and communication channels. Quantum memory management is performed by the main process; appropriate locking techniques ensure that no race conditions can occur when quantum bits are allocated by the modules. Sending quantum data can in this scheme be performed by exchanging pointers to the respective positions on the quantum heap; the static analysis of the compiler guarantees that no more than one process is in possession of a given qbit at a time. Again, appropriate mechanisms in the form of mutexes are used to provide the required synchronisation between the modules which is required to implement send and receive operations. For every pair of modules, a separate bi-directional queue is provided to handle the exchange of quantum and classical data. 3.2 Using the compiler As all well behaved programs, the compiler can provide a list of its options: wolfgang@meitner> ./cqpl --help Quantum Programming Language v1.0 Usage: qpl [<input>] [<output>] [--debug] [--nonative] [--norun] [--backend qcl] [--qheap size] <input>: Input filename <output>: Output filename --debug Print debug messages --backend Simulation backend (Only qcl is supported at the moment) --nonative Generate only backend code, don’t create a native executable --norun Do not execute the generated native code --qheap Size of quantum heap (default: 200 qbits) 2 A thread is – depending on the implementation by the underlying library and the operating system kernel – a lightweight process that shares most ressources he has with other threads that execute in parallel, but has its own control flow. 18 3.2. Using the compiler -help Display this list of options --help Display this list of options ❏ <input> and <output> provide the names of the input and output file. If no input file is specified, the compiler reads from the stdin channel. If no output if specified, the filename of the input file together with some appropriate extension according to the output mode is used. ❏ --debug reports lots of debug messages. Console output is really noisy with this option enabled, but provides some insight into what the compiler does. Obviously mainly useful for debugging the compiler itself. ❏ --nonative specifies that no native code is generated, i.e., the program is not transformed into machine code by the backend. For the QCL backend, this means that only a C++ version of the quantum program is generated, but the C++ compiler is not called to generate a native executable. ❏ --norun does not execute the generated program, but only leaves the executable file which can be run later. ❏ --qheap size sets the size of the quantum heap to size qbits. The compiler source code will be made available in the near future on http://kerr. physik.uni-erlangen.de/qit/qpl.html once the remaining changes to make the source code ready for public distribution have been performed. 19 20 A mathematician is a device for turning coffee into theorems. Pál Erdős 4 Mathematical structures Because our work involves the theoretical parts of physics and computer science, many different notations and conventions enter the game. To eschew obfuscation, it behoves to define a consistent notation to be used in this work, which we shall do in the following sections. Additionally, this chapter introduces some mathematical structures and their properties which are required for the description of the denotational semantics of cQPL. 4.1 4.1.1 Algebraic structures Fundamentals The concept of an algebra is convenient to cover the properties of quantum mechanics in an abstract setting, so we remind the reader of two elementary definitions for terms that are often used sloppily in physics. Definition 4.1.1 (Algebra). Let K be a field. An associative K-algebra A over K is a nonempty set A together with three operations called addition +, multiplication × and scalar multiplication · (the last two operations are usually denoted by juxtaposition of symbols) for which the following properties hold: ❏ A is a linear space under addition and scalar multiplication. ❏ A is a ring under addition and multiplication. ❏ If r ∈ K and a, b ∈ A, then r · (a × b) = (r · a) × b = a × (r · b). Definition 4.1.2 (Subalgebra). S ⊆ A is subalgebra of an algebra A if it has the properties of an algebra and is closed under operations of A. 4.2 4.2.1 Linear operators General Much of our work is based on the grounds of linear operators, so we present some fundamental definitions and cite a theorem from the literature which will be useful for us later on. Remark 4.2.1. Note that we use only linear operators in this work, so operator is used as a synonym for linear operator without mentioning this explicitely in the following chapters. 21 Chapter 4. Mathematical structures Definition 4.2.1 (Linear operator). A linear operator T from a normed space X to another normed space Y is a linear map from D(T ) ⊆ X (the domain of T ) to Y with the following property for x, y ∈ D(T ), α, β ∈ K: T (αx + βy) = αT (x) + βT (y). (4.1) Definition 4.2.2 (Bounded operator). An operator is called bounded if ∃C ≥ 0, C ∈ R so that ||T x|| ≤ C · ||x|| (4.2) for all x ∈ D(T ) with ||x|| ≤ 1. Theorem 4.2.1. Let X, Y be normed spaces. For a linear operator T : X → Y , the following properties are equivalent: ❏ T is continuous in every point of D(T ). ❏ T is continuous at 0. ❏ T is bounded. Proof. Cf. Ref. [Wei00, Theorem 2.1]. 4.2.2 Hilbert-Schmidt operators Let X, Y be Hilbert spaces. An operator K ∈ B(X, Y ) is called Hilbert-Schmidt-operator if there exists an orthonormal basis {eα : α ∈ A} (where A is some index set) with P 2 † α∈A ||Keα || < ∞. In a more physical notation, this means that tr K K < ∞. This is obviously fulfilled if K ∈ B(H) and dim(H) < ∞. Theorem 4.2.2 (Hilbert space of Hilbert-Schmidt operators). For Hilbert-Schmidt operators K, L of a Hilbert space X to a Hilbert space Y , ||·||HS is a norm on this space induced by the scalar product X hK, LiHS := hKeα , Leα i . (4.3) α Physicists generally write this as: hK, LiHS = tr K † L. (4.4) Proof. If K is a Hilbert-Schmidt operator, aK is a Hilbert-Schmidt operator as well for every a ∈ K. If K, L are HS operators, then for every orthonormal basis {eα }, the following equation holds:  X X 2 2 2 (4.5) ||(K + L)eα || ≤ 2 · ||Keα || + ||Leα || < ∞, α α i.e., K + L is a Hilbert-Schmidt operator as well. By h·, ·i, we denote the scalar product 1/2 in the space of Hilbert-Schmidt operators, and ||K||HS = hK, KiHS (as usual, the scalar product induces a metric). A comparison of both spaces can be found in Table 4.1.1 1 Note that there would be many other different choices how the norm for Hilbert spaces could be defined which all fulfil the required properties of a norm that can, e.g., be found in [AG81]. 22 4.3. Connection with quantum mechanics State Operator Norm Operator norm Hilbert space |f i ∈ H H → H:pD̂ |xi = |x′ i ||f i| = hf |f i ||D̂||sup = sup |D̂ |f i | |f i∈H |f |≤1 Hilbert space of Hilbert-Schmidt operators D̂ : H → H Λ : D̂ → D̂√≡ (H → H) → (H → H) ||D̂||HS = tr D† D ||Λ|| = sup Λ(D̂) = sup tr Λ(D̂)† Λ(D̂) D̂∈H ||D̂||≤1 D̂∈H ||D̂||≤1 Table 4.1: A comparison between general Hilbert spaces and Hilbert spaces with Hilbert-Schmidt operators as basis. 4.3 Connection with quantum mechanics Quantum mechanics is one of the most advanced theories in physics; most research performed today is centred around it. There are many ways to describe the theory mathematically; for our purposes, an abstract algebraic formulation based on the principles and structures introduced in the previous part seems to be most apt. In the following, we present a concise overview about the central elements of the theory, following the structure of the review given in Ref. [Key02]. More elaborate introductions can be found in the usual textbooks on the topic, e.g., [Sak94]. For those especially interested on the impact of quantum mechanics on information theory, Refs. [NC00, Pre99, Key02] can be especially recommended. Probabilistic processes lie at the very heart of quantum mechanics: Predictions made by the theory hold only in the sense that probabilities for outcomes of measurements can be provided. A large number of repeated experiments with the same preparation parameters results in a distribution that states how many times a certain outcome will appear. Exactly this distribution can be predicted by theory. The outcome of a single measurement can in general never be forecast with certainty. 4.3.1 States and effects Ideally, an experiment resulting in a probability distribution can be carried out by repeating the following two processes until a sufficient amount of statistics has been gathered: ❏ Preparation of a quantum mechanical state according to some fixed procedure that can be repeated a sufficient number of times. ❏ Measurement of some observable quantity, e.g., spin, energy, etc. Effects are a special class of measurements which can result in either the answer “yes” or “no” according to some probability distribution. Note that we do not only deal with purely quantum mechanical states, but may also encounter a mixture between classical and quantum mechanical properties (which are usually termed hybrid systems) that our formalism must be able to account for. Measurement results fall into the classical category since gauges in the macroscopic world are used to infer them from the quantum system.2 Every quantum system can be completely characterised by its observable quantities which in turn are characterised by self-adjoint operators. These operators form an algebra A as 2 The problem of how measurements of a quantum system are to be interpreted (or even how the whole process can be described consistently) has been and still is one of the fundamental philosophical problems of quantum mechanics. We take a pragmatic point of view here and do not consider the problem in greater detail, but refer to the literature, e.g., [Aul00]. 23 Chapter 4. Mathematical structures introduced in Section 4.1.1; since we do only deal with finite-dimensional Hilbert spaces here, we can restrict ourselves to subalgebras of B(H), i.e., A ⊂ B(H). A is called the observable algebra of the system and is often identified with the system itself because it is possible to deduce all properties of the system from its observable algebra. The dual algebra of A is denoted by A∗ and is the algebra defined on the dual space. To capture the notions of state and effect mathematically, we introduce two sets according to the following definition: S(A) = { ̺ ∈ A∗ ̺ ≥ 0 ∧ ̺(1) = 1 } E(A) = { A ∈ A A ≥ 0 ∧ A ≤ 1 } (4.6) (4.7) S represents the set of states, while E contains all effects. For every tuple (̺, A) ∈ S×E, there exists a map (̺, A) → ̺(A) ∈ [0, 1] which gives the probability p = ̺(A) that measuring an effect A on a (system prepared in the) state ̺ results in the answer “yes”. Accordingly, the probability for the answer “no” is given by 1 − p. ̺(A) is called the expectation value of a state A; states are thus defined as expectation value functionals from an abstract point of view. These expectation value functionals can by uniquely connected with a normalised trace-class3 operator ̺ such that ̺(A) = tr(̺A). In principle, it would be necessary to introduce two different symbols for the expectation value functional and the operator, but for simplicity, we omit this complication. We have to distinguish between two different kinds of states: Pure and mixed ones. This is a consequence of the fact that both S and E are convex spaces: For two states ̺1 , ̺2 ∈ S(A) and λ ∈ R, 0 ≤ λ ≤ 1, the convex combination λ̺1 + (1 − λ)̺2 is also an element of S(A). The same statement holds for the elements of E(A). This decomposition provides a very nice insight into the structure of both spaces. Extremal points in this space cannot be written as a proper convex decomposition, i.e., x = λy + (1 − λ)z → λ = 1 ∨ λ = 0 ∨ x = y = z. These can be interpreted as follows: ❏ For S(A), they are pure states with no associated classical uncertainty. ❏ For E(A), they describe measurements which do not allow any fuzziness as is, e.g., introduced by a detector which detects some property not with certainty, but only up to some finite error (alas, all real-world detectors). 4.3.2 Observables Until now, we have only been talking about effects, i.e., “yes”/“no” measurements, but not about measurements with a more complicated result range which are necessary to describe general observables. Although we would have to consider an infinite (even uncountable) number of possible outcomes for a general description of quantum mechanics, it is sufficient to consider only observables with a finite range for our purposes.4 Such observables are represented by maps which connect elements x of a finite set R to some effect Ex ∈ E(A); this in turn gives rise to a probability distribution px = ̺(Ex ). More formally, we can put it as in the following: A family E = {Ex },P x ∈ R of effects Ex ∈ A if called a positive operator valued measurement (POVM) on R if x∈R Ex = 1. 3 For trace-class operators, the trace is independent of the basis chosen to evaluate the trace. is justified because quantum computers process states of the type (|0i , |1i)⊗n . Although quantum computers can possess an arbitrary number of qbits, it is still a fixed and (which is most important) finite number; additionally, we do not care for any continuous quantum properties of these objects. 4 This 24 4.3. Connection with quantum mechanics Note that the Ex need not necessarily be projectors, i.e., Ex2 = Ex . Should this nevertheless be the case ∀x, the measurement is called a projective measurement. Observables of this kind can be described by self-adjoint operators of the underlying Hilbert space H which can (without any claim of formal correctness or even a proof) be seen as follows: Every self-adjoint operator A on a Hilbert space H of finite dimension can (because P of the spectral theorem, cf., e.g., [AG81, Wei00]) be decomposed into the form A = λ∈σ(A) λPλ where σ(A) denotes the spectrum of A and Pλ the projectors onto the P corresponding eigenspace. The expectation value λ λ̺(Pλ ) of P for a given state ̺ can equivalently be calculated by ̺(A) = tr(̺A). Since this is the standard way of formulating the expectation value of an operator, both points of view coincide. 4.3.3 Classical components Systems consisting solely of quantum components are generally not to be found: At the latest after a measurement has been performed, classical probabilities need to be accounted for. Therefore, we need to pay attention to hybrid systems composed from quantum and classical parts as well. Obviously, we have to orient ourselves along the lines of Section 4.3.1 to provide proper grounding for both possibilities. Consider a finite set X of elementary events, i.e., all possible outcomes of an experiment. Again, S(A) and E(A) define the set of states and effects, respectively, but this time, the observable algebra is given by all complex valued functions from the set X to C as defined by A = C(X) = { f : X → C } . By identifying the function f with the operator fˆ given by X fˆ = fx |xi hx| (4.8) (4.9) x∈X where |xi denotes a fixed orthonormal basis, the probability distribution can be interpreted as an operator algebra similar to the quantum mechanical case because fˆ is obviously an element of B(H). Thus, C(X) can be used as an observable algebra A along any other quantum mechanical or classical constituent of a multipartite composite system. 4.3.4 Composite and hybrid systems Since quantum mechanical and classical systems can be described with very similar structures, the presented formalism is obviously well suited for the presentation of composite systems. Let A ⊂ B(H) and B ⊂ B(K) be systems given in terms of their observable algebras; the composite system is then given by A ⊗ B ≡ span { A ⊗ B A ∈ A, B ∈ B } . (4.10) Three cases for the choice of H, K can be distinguished: ❏ If both systems are quantum, then A ⊗ B = B(H ⊗ K). ❏ If both systems are classical, then A ⊗ B = C(X × Y ) with C as defined by Eqn. 4.8 ❏ If A is classical and B is quantum mechanical, we have a hybrid system; the composite observable algebra is then given by C(X)⊗B(H) which cannot be simplified any further. Observables are operator-valued functions in this case, as expected. 25 Chapter 4. Mathematical structures 4.4 Domain theory The definition of a proper and sound mathematical semantics for a programming language necessitates apt structures which can be used as a solid ground underlying the work. The method we use – denotational semantics – is conventionally based on semantic domains, which in turn rely on partial orders and recursion theory. The purpose of this section is to introduce the elements required for the semantic description of cQPL which will be given in Chapter 5; more details are available, e.g., in [GS90, Win93]. 4.4.1 Basic definitions Definition 4.4.1 (Partial order). A partial order (P, ⊑)is a set P on which there is a binary relation ⊑ for which the following properties hold ∀p, q, r ∈ P : ❏ p ⊑ p (reflexive) ❏ p ⊑ q and q ⊑ r ⇒ p ⊑ r (transitive) ❏ p ⊑ q and q ⊑ p ⇒ p = q (antisymmetric) Definition 4.4.2 (Upper bound). For a partial order (P, ⊑) and a subset X ⊆ P , p ∈ P is an upper bound of X if and only if ∀q ∈ X : q ⊑ p. The element p is a least upper bound if: ❏ p is an upper bound of X ❏ For all upper bounds q of X, p ⊑ q Remark 4.4.1. Note that it follows from the definition that the least upper bound is unique. Definition 4.4.3 (ω-chain). Let (D, ⊑D ) be a partial order. An ω-chain of the partial order is an increasing chain d0 ⊑D d1 ⊑D · · · ⊑D dn ⊑ · · · of elements of the partial order. Note that ω represents the increasing chain of natural numbers N0 . Definition 4.4.4 (Complete partial order). The partial order (D, ⊑D ) is a complete partial order (cpo) if it has least upper bounds of all ω-chains, i.e., any increasing chain {dn |n ∈ ω} of elements in D has a least upper bound ⊔{dn |n ∈ ω}, written as ⊔n∈ω dn . (D, ⊑D ) is a cpo with bottom if it is a cpo which has a bottom element (often also called least element) ⊥D for which ⊥D ⊑ d ∀d ∈ D holds. Definition 4.4.5 (Directed-complete partial order). A partial order (D, ⊑) in which every directed subset has a supremum is called directed-complete partial order (dcpo). Definition 4.4.6 (Monotone function). A function f : D → E between cpos D and E is monotonic if and only if ∀d, d′ ∈ D: d ⊑ d′ ⇒ f (d) ⊑ f (d′ ). (4.11) Definition 4.4.7 (Continuous function). A function f : D → E between cpos D and E is continuous if and only if it is monotonic and for all chains do ⊑ d1 · · · ⊑ dn ⊑ · · · in D there holds G f (dn ) = f (⊔n∈ω dn ) . (4.12) n∈ω 26 4.4. Domain theory 4.4.2 A fixed point theorem Definition 4.4.8 (Fixed point). Let f : D → D be a continuous function on a cpo D with bottom ⊥D . A fixed point of f is an element d ∈ D such that f (d) = d. A prefixed point of f is an element d ∈ D such that f (d) ⊑ d. Theorem 4.4.1 (Fixed-point theorem). Let f : D → D be a continuous function on a cpo with a bottom D. Define G fix (f ) = f n (⊥). (4.13) n∈ω Then fix (f ) is a fixed point of f and the least prefixed point of f , i.e.: ❏ f (fix (f )) = fix (f ) ❏ If f (d) ⊑ d then fix (f ) ⊑ d Consequently, fix (f ) is the least fixed point of f . Proof. It follows from continuity of f that f (fix (f )) = f (⊔n∈ω f n (⊥)) = G f n+1 (⊥) (4.14) n∈ω = G  ⊥ ∪ f n+1 (⊥)|n ∈ ω n∈ω = fix (f ) . = G f n (⊥) (4.15) n∈ω (4.16) Thus fix (f ) is a fixed point because f (fix (f )) = fix (f ) is exactly the required property of a fixed point (adding ⊥ in step 4.15 is justified because the least upper bound is not influenced by this). Suppose d is a prefixed point. Certainly, ⊥⊑ d. By monotonicity, f (⊥) ⊑ f (d). But d is a prefixed point, i.e., f (d) ⊑ d, so f (⊥) ⊑ d, and by induction f n (⊥) ⊑ d ∀n ∈ ω. Thus, fix (f ) = ⊔n∈ω f n (⊥) ⊑ d Remark 4.4.2. Note that it is customary to define G YD f ≡ f n (⊥) (4.17) n∈ω such that Y D is obviously a function (D → D) → D which maps functions to their fixed points; it is thus termed the fixed point combinator. Definition 4.4.9 (Scott topology5 ). 6 Let D be a dcpo. A subset A is called Scott closed if it is a lower set7 and is closed under suprema of directed subsets.8 Complements of closed sets are called Scott open; they are the elements of σD , the Scott topology on D. Theorem 4.4.2. A function f : Dn → Dm is continuous in the sense of definition 4.4.7 (i.e., Scott continuous) if it is topologically continuous with respect to the Scott topology. Proof. Cf. Ref. [AJ94, Theorem 2.3.4] The last definition and theorem are quite technical, but we need them for the proof of Theorem 4.5.4 later on. 5 This definition is taken from [AJ94]. topological space is a set X together with a collection T of subsets where the empty set and X are in T , the union of any collection of sets in T is in T and the intersection of any pair of sets in T is also in T . 7 A lower set is a finite, non-empty downward-closed subset of a partial order, i.e., {x|x ⊑ y}. 8 A subset A of a poset is directed if it is nonempty and each pair of elements has an upper bound in A. 6A 27 Chapter 4. Mathematical structures 4.4.3 Constructions on domains We will use the following constructions on dcpos to create new dcpos: ❏ D1 × D2 × · · · × Dn denotes n-tuples respectively cartesian domains. The weaker-than relation is defined such that (x1 , x2 , . . . , xn ) ⊑D1 ×D2 ×···×Dn (y1 , y2 , . . . , yn ) ⇔ xi ⊑Di yi (4.18) for i = 1, . . . , n and xi ∈ Di , yi ∈ Di . ❏ D1 ⊗D2 ⊗· · ·⊗Dn represents the smash product which identifies all tuples that contain one or more ⊥-elements. Example: (d1 , ⊥2 ), (⊥1 , d2 ) and (⊥1 , ⊥2 ) are all identified with a new bottom element ⊥D1 ⊗D2 for di ∈ Di Formally, the new domain D ⊗ E is the set {(x, y) ∈ D × E|x 6= ⊥ and y 6= ⊥} ∪ {⊥D⊗E }. (4.19) ❏ D1 + D2 + · · · + Dn is the separated sum domain which consists of all elements in Di together with a new bottom symbol ⊥D1 +D2 +···+Dn (usually abbreviated to ⊥D ). ❏ The coalesced sum D1 ⊕ D2 ⊕ · · · ⊕ Dn is similar to the separated sum, but the new bottom element ⊥D is gained by identifying all elements d1 + d2 + · · · + dn (di ∈ Di ) which contain one or more of ⊥Di . Summary ❏ Lifting is the operation that adds bottom element to a domain D; the result is denoted by D⊥ ; continuity is not influenced by this. We have provided the basic framework required to build the denotational semantics of cQPL. This framework is composed of two parts: On the one hand, we need an abstract representation of quantum mechanics to account for the physical properties of the programming language. On the other hand, the concept of partial orders builds the basis for defining semantic domains, i.e., the space which will be used to place the equations describing the semantics of cQPL in. The choice of partial orders for that is especially justified by the fact that fixed points can be constructively obtained in them. These in turn are required to solve recursive domain equations that will be needed to give a denotation for several language constructs of cQPL, most important the communication features. 4.5 cp-Maps and their representation In quantum mechanics, time evolution is described by transformations of density matrices with an operator Λ that is called a superoperator [Pre99, NC00, Key02]. Definition 4.5.1 (Superoperator). A superoperator Λ : B(H) → B(H) has the following properties for all density operators ̺ ∈ D with ̺′ = Λ(̺): ❏ Λ is linear. ❏ ̺† = ̺ ⇒ ̺′† = ̺′ (hermeticity is preserved). ❏ tr ̺′ = 1 if tr ̺ = 1 (trace preserving). 28 4.5. cp-Maps and their representation ❏ Λ⊗1 is semidefinite positive (∀n ∈ N : Λ⊗1n ≥ 0), i.e., Λ is a completely positive map. In other words, this means that Λ is not only semidefinite positive (̺′ is nonnegative if ̺ is nonnegative) on HA , but also on any possible extension HA ⊗ HB . Note that if dissipative processes (e.g., postselection of observed events) are considered, the second condition is loosened to tr(̺′ ) ≤ 1. 4.5.1 Operator-sum representation Kraus [Kra83] proved a result about the decomposability of completely positive maps which is ubiquitous in quantum information theory: Theorem 4.5.1 (Kraus representation theorem). A superoperator Λ as defined in PN Def. 4.5.1 can be written as a partition of 1 = k=1 A†k Ak where Ak are linear operators acting on the Hilbert space of the system such that ̺′ = Λ(̺) = N X k=1 Ak ̺A†k ∀̺ ∈ D (4.20) for any density matrix ̺ that represents a mixed or a pure state. Proof. Cf. Ref. [NC00, Pre99, Kra83] To illustrate this representation, consider the situation that the system under consideration is in contact with a much larger environment, a common situation for physical problems. Together, both systems form a closed quantum system. State transformations in this combined system can be described by a unitary transformation U ∈ U (dim(H) · dim(Henv )) where H denotes the Hilbert space of the system under consideration and Henv the Hilbert space of the environment. Assume that the environment is in a pure state |e0 i he0 |.9 The density operator of the system under consideration after the unitary operation was applied to the total system can be recovered by tracing out the environment: ̺′ = Λ(̺) = tr(U ̺ ⊗ |e0 i he0 | U † ) X = hek | U (̺ ⊗ |e0 i he0 |)U † |e0 i (4.21) (4.22) k = X k = X hek | U |e0 i ̺ he0 | U † |ek i (4.23) Ak ̺A†k . (4.24) k In the last step, Ak is defined by Ak ≡ hek | U |e0 i. Remark 4.5.1. We say that a set of Kraus operators {Ak } implements a cp-map Λ if P ∀̺ ∈ D : k Ak ̺A†k = Λ(̺). This simplifies the further description. Theorem 4.5.2. The operation elements of a given superoperator Λ are not unique: If {Ej } is a set of Kraus operators, then a different set of Kraus operators {Fk } describes the same 9 This assumption holds without loss of generality because it can be shown that a system can be purified by introducing extra dimensions which do not have any physical consequences. 29 Chapter 4. Mathematical structures operation if and only if there exists a unitary matrix U ∈ U (n) with n = card({Ek }) (where card(X) is the cardinality of the set X) such that X Ukj Ej . (4.25) Fk = j Note that the shorter set may be padded with zero elements until the cardinality of both matches. Proof. Cf., e.g., Ref. [NC00, Theorem 8.2] or Ref. [Pre99]. Remark 4.5.2. Let {Ak } be a set of Kraus operators that represents the cp-map Λ. Note that if any number of elements Ai is taken from {Ak }, the set still remains a completely positive map, but is not trace preserving any more. Remark 4.5.3. Note that superoperators are elements of B(H) which makes it possible to apply many theorems of linear operator algebra to superoperators. In fact, superoperators can be used as elements of a Hilbert space as defined in Section 4.2.2. The distinction between operators and superoperators in physics is therefore in general superfluous. Remark 4.5.4. It can be shown that the number of Kraus elements needed to express any arbitrary completely positive map T : B(H1 ) → B(H2 ) is bounded by dim(H1 ) · dim(H2 ), confer, e.g., [Pre99, p. 102]). 4.5.2 Equivalence of Kraus operators The unitary connection between two sets of Kraus operators defined in Equation 4.25 gives rise to an equivalence relation between such sets. Two sets {Aj } and {Bk } are members of the same equivalence class if there is a unitary matrix which connects both representations: n X A∼ = B ⇐⇒ ∃U ∈ U (n) : Ai = Uij Bj with i = 1, . . . , n. (4.26) j=1 The set of all sets of Kraus operators inducing the same map Λ is defined in the obvious way: n o X K(Λ) ≡ {Ak } Ak ̺A†k = Λ(̺) ∀̺ ∈ D . (4.27) k If we talk about a set of Kraus operators or simply Kraus operators in the following, we always mean an arbitrary set which is an element of the equivalence class inducing the same cp-map (i.e., an element of K(Λ)), but will not mention this explicitly every time. 4.5.3 A partial order for Kraus operators The Löwner partial order [Löw34] for two density operators A, B : B(H1 ) → B(H2 ) is given by A ⊑ B ⇐⇒ (B − A) > 0. (4.28) This partial order can be extended to sets of Kraus operators by defining {Ai } ⊑ {Bi } ⇐⇒∀̺ ∈ D ∀n ∈ N : X i (Bi ⊗ 1n )̺(Bi ⊗ 1n ) − † 30 X k (Ak ⊗ 1n )̺(Ak ⊗ 1n ) † ! > 0. (4.29) 4.5. cp-Maps and their representation Partial orders are often interpreted as approximations: If an element A is weaker than B (A ⊑ B), then A is said to approximate B. This point of view will come handy when we consider solutions of fixed point equations in the denotational description. It is necessary for our work to see that Kraus operators form a complete partial order. For this, observe first the following theorem: Theorem 4.5.3. The partial order on all density operators ̺ ∈ D given by the Löwner partial order ⊑ is complete. Proof. Cf. Ref. [Sel04b, Proposition 3.6] From this, we can deduce the required statement: Theorem 4.5.4. The partial order for cp-maps defined by the extended Löwner partial order given by Eqn. 4.29 is complete, i.e., it forms a cpo. Proof. Let {A1 } ⊑ {A2 }, . . . be an increasing chain of topologically continuous (and therefore monotone because of 4.4.2, 4.4.7 and 4.4.6) Kraus operators. Because of Definition 4.29, the relation ̺1 ⊑ ̺2 is preserved by applying {A1 }, {A2 } with {A1 } ⊑ {A2 } to ̺1 , ̺2 . An ωchain of density operators is conserved if an increasing chain of Kraus operators is applied to it. Because of Theorem 4.5.3, the fact that the previous consideration applies to all density operators in D and the uniqueness of the least upper bound, the extended Löwner partial order is complete as well. 4.5.4 Kraus aggregations We mentioned that superoperators applied to density matrices describe quantum mechanical processes. Operations performed one after another can therefore be described by the consecutive application of the corresponding superoperators: If the sets given by {A1k } ̺′ = Λ1 (̺), ̺′′ = Λ2 (̺′ ) ⇒ ̺′′ = Λ2 (Λ1 (̺)) and {A2k } (4.30) implement Λ1 and Λ2 , then the same state transformation is ̺′′ = XX k † † A2k A1l ̺A1l A2k . (4.31) l We call a collection of sets of Kraus operators that are to be applied subsequently an aggregation of (sets of ) Kraus operators or simply Kraus aggregation; the Kraus sets involved are written as a list of the form Γ = {A1k }, {A2k }, . . . , {Ank } The list Γ gives rise to the following quantum mechanical operation: XX X † † Γ(̺) = ̺′ = ··· Ankn · · · A2k2 A1k1 ̺A1k1 A2k2 · · · Ankn † k1 k2 (4.32) (4.33) kn List concatenation is formally described by the operator ◦: Γ1 = {A1k }, {A2k }, . . . , {Ank }, (4.34) Γ2 = {Bk1 }, {Bk2 }, . . . , {Bkm } ⇒ Γ1 ◦ Γ2 ≡ {A1k }, {A2k }, . . . , {Ank }, {Bk1 }, {Bk2 }, . . . , {Bkm } 31 (4.35) (4.36) Chapter 4. Mathematical structures i.e., the effect of Γ1 ◦ Γ2 on a state ̺ is the same as if first Γ1 and then Γ2 would have been applied. Note (since this is a potential source of confusion) that the list is “processed” from left to right, not from right to left! A Kraus aggregation can also consist of multiple sub-aggregations which are prefixed by some scalar. Formally, we use the operator + to denote this: Γ′ = p 1 · Γ1 + · · · + p n · Γn . (4.37) 1 1 · {NOT} + · {1}. 2 2 (4.38) 10 P If the pi ∈′ R are to be interpreted as probabilities, the normalisation condition is n pn ≤ 1. Γ can thus be seen as a formal combination of lists. The interpretation of such an aggregation is straightforward: With probability pk , the Kraus aggregation Λk is selected whenever Λ′ acts on a density operator. Obviously, lists of this form are apt to introduce mixed states into the Kraus list formalism. Consider, for example, the aggregation ∆= The effect of it is to apply the unconditional not-operation (which maps |0i → |1i and |1i → |0i and may, for example, be implemented with σ̂x ) with probability 0.5 and to leave the state unchanged with the same probability. If this aggregation is applied to, e.g., the following (pure) density operator ̺ = |0i h0| , (4.39) the resulting state is the impure density operator given by 1 1 {NOT}(̺) + {1}(̺) 2 2 1 1 1 1 = |1i h1| + |0i h0| = {|1i} + {|0i} 2 2 2 2 ̺′ = ∆(̺) = (4.40) (4.41) which describes an impure mixture between {|0i} and {|1i}. Remark 4.5.5. Note that we will use Kraus lists prefixed with probabilities to describe different measurement outcomes when we provide the semantics of cQPL in Chapter 5. The physical way to think about such operations is to take a density operator ̺ and apply the Kraus elements for the projective measurements on it; this results in the state X X ̺′ = Mk ̺Mk† = Em (̺) (4.42) k k where Mk are the projection operators and Em (̺) ≡ Mk ̺Mk† . The probability to obtain the measurement outcome k is given by p(m) = tr(Em (̺)). (4.43) The probability factors in Kraus aggregations can be calculated in exactly this way; both points of view therefore provide the same information. Note that we allow the pre-factors of the sub-aggregations to depend on parameters which make the complete aggregation dependent on the disjoint union of the set of parameters used for the sub-aggregations. This is necessary to describe Kraus aggregations dependent on probability distributions which are unknown before a initial state is given or the outcomes 10 The sum can be smaller than 1 to account for the possibility of non-termination which will happen with P probability 1 − pi . It also allows to describe non trace-preserving effects. 32 4.5. cp-Maps and their representation of some measurements are known. The following example shows a Kraus aggregation where the first sublist depends on the parameters a1 and a2 and the second on a1 and a3 ; the complete aggregation obviously depends on a1 , a2 and a3 : Γ(a1 , a2 , a3 ) = p(a1 , a2 ) · Γ1 + p(a1 , a3 ) · Γ2 . (4.44) For a Kraus aggregation of the most general form (where {ai } denotes the set of parameters for the ith sub-aggregation) given by Γ(∪i {ai }) = X i pi ({ai })Γi , (4.45) the normalisation condition is obviously still given by X i pi ({ai }) ≤ 1 (4.46) which necessitates that 0 ≤ pi ≤ 1 ∀i (this is supposed to hold for all p used in the following). It is possible to contract Kraus (sub-)aggregations which consist of more than one element to a shorter form because two Kraus sets {Ai } and {Bi } can be contracted to a new set {Ck } which describes the subsequent application of both initial sets, as the following simple calculation shows: ({Ak }, {Bi })(̺) = {Bi }({Ak }(̺)) = N X N X B̂k Âi ̺†i B̂k† (4.47) k=1 i=1 2 = N X Ĉn ̺Ĉn† (4.48) n=1 with Ĉn ≡ B̂⌈n/N ⌉ Ân mod N . (4.49) Recall that different set cardinalities can be compensated by adding an appropriate number of zero operators to the smaller set. Since the calculation is valid ∀̺ ∈ D, the new single element aggregation {Ci } is a unique replacement for the aggregation {Ai }, {Bi }. Based on this contraction, it is possible to define a standard representation for Kraus aggregations which is easier to handle formally when aggregations must, for example, be compared. With n o X P ≡ {pi ({ai })} aik ∈ R∀i, k, 0 ≤ pi ({ai }) ≤ 1, pi ({ai }) ≤ 1 (4.50) i being the set of all possible parametrised probability distributions and K ≡ { Λ Λ is a cp-map } (4.51) being the set of all unparametrised Kraus aggregations contracted to the normal form given by Eqn. 4.48, we can finally define the set of all possible Kraus aggregations formally by nX o pi Λi {pi } ∈ P ∧ Λk ∈ K . A≡ (4.52) i 33 Chapter 4. Mathematical structures 4.5.4.1 A partial order for Kraus aggregations For a Kraus aggregation of the contracted normal form Λ = {Ck }, the definition for a partial order can be directly transferred from Equation 4.28. If the aggregation contains sub-aggregations, ⊑ is formally a function dependent on the parameters of the aggregation: For Γ1 = Γ1 (A1 , . . . , An ) and Γ2 = Γ2 (B1 , . . . , Bn ), the partial comparison Γ1 ⊑ Γ2 becomes a function (A1 , . . . , An , B1 , . . . , Bn ) → {true, false}, i.e., the comparison depends on the parameters of both sets of parameters involved. Note that this does not concern Kraus aggregations where all coefficients have defined scalar values. Basically, the parametrised comparision is nothing else than a comparision of all elements of an unfolded Kraus aggregation as defined in Section 5.3.6.2 followed by folding everything back afterwards. 4.5.4.2 Equivalence of Kraus aggregations One possible task of denotational semantics is to decide wether two programs which look different perform the same actions, i.e., if their semantics coincide. This question is in general complicated to answer constructively. Nevertheless, it is possible for some cases. We will consider this problem in more detail in Chapter 5. At this point, we are interested in the question when two Kraus aggregations are semantically equivalent, i.e., induce the same physical operations. The method used for this is almost identical to the method used for Kraus sets. Consider two aggregations Γ1 and Γ2 given in the contracted normal form, i.e., Γ1 = N X p1k Λ1k (4.53) p2k Λ2k . (4.54) k=1 Γ2 = N X k=1 Let Sym(M ) by the symmetric group over the finite set M . Both lists are equivalent if (but not only if) the following condition holds: Γ1 ∼ = Γ2 ⇔∃ϕ ∈ Sym([1, . . . , N ])∀k ∈ [1, N ]∀̺ ∈ D : p1k (A1k ) = p2P(k) (A2P(k) ) ∧ Λ1k (̺) = Λ2P(k) (̺). (4.55) (4.56) Note that this equivalence requires that the same Kraus operators are used in both lists; it is nevertheless possible that a different set of Kraus operators prefixed by another probability distribution induces the same action. The criterion given here is thus sufficient, but not necessary. The set E of all aggregations that are equivalent in this sense can be defined analogous to Eqn. 4.27: (4.57) E(Λ) ≡ { Λi ∈ A Λi ∼ = Λ }. This definition is not very satisfying from a constructive point of view: There is no simple way to systematically decide if the effects of two aggregations coincide. This can be improved by giving an explicit criterion for the equivalence between two Kraus aggregations. We consider the special case of two lists which are composed of the same operators, but are ordered differently. This happens, for example, when statements in a program are reordered. With the method given below, we can thus get a criterion to decide if such reorderings preserve the semantics of programs which is a very important case. Unparametrised Kraus aggregations can always be written in the standard form given by Eqn. 4.48 and are thus equivalent to a Kraus set; this again is equivalent to some cpmap Λ. Because we have seen in Section 4.2.2 that such cp-maps form a Hilbert space, it 34 4.5. cp-Maps and their representation is reasonable to define a commutator (analogous to the case of regular operators) for two Hilbert-Schmidt operators Λ1 , Λ2 by setting: [Λ1 , Λ2 ] ≡ Λ1 Λ2 − Λ2 Λ1 . (4.58) The following theorem provides a condition for the identity between a list of operators and a permutation of it which is based on elementary commutators of the elements. Unfortunately, this is not a general solution since the effect of the theorem might just be to rephrase the problem in different terms if the structure of the commutators is not apt. Theorem 4.5.5. Let A1 , A2 , . . . , An be operators and let ϕ ∈ Sym(n) be a permutation of the index set. Then the difference between the commuted product Aϕ(1) · Aϕ(2) · · · Aϕ(n) and A1 · A2 · · · An can be written as11 Aϕ(1) · Aϕ(2) · · · Aϕ(n) = A1 · A2 · · · An + X (s,t) Xs,t · [As , At ] · Ys,t · Zs (4.59) where (s,t) runs over all inversions of ϕ, i.e., 1 ≤ t < s ≤ n and ϕ−1 (s) < ϕ−1 (t) and where Xs,t = Y Ys,t = Aϕ(i) , Y Zs = Aϕ(i) , Y Ak . (4.60) s<k≤n 1≤i≤n 1≤i≤n ϕ(i)<s, i<ϕ−1 (t) ϕ(i)<s, i>ϕ−1 (t) Proof. We prove this statement by induction on the list length. The cases n = 0 and n = 1 are trivial. The induction step n → n + 1 can be seen as follows. Let j ∈ [0, . . . , n + 1] such that ϕ(j) = n + 1. Then, Aϕ(1) · Aϕ(2) · · · Aϕ(j) · · · Aϕ(n+1) = Aϕ(1) · · · Aϕ(j−1) · Aϕ(j+1) · Aϕ(j) · Aϕ(j+2) · · · Aϕ(n+1) + Aϕ(1) · · · Aϕ(j−1) · [Aϕ(j) , Aϕ(j+1) ] · Aϕ(j+2) · · · Aϕ(n+1) = ... = X Xn+1,t · [An+1 , At ] · Yn+1,t Aϕ(1) · · · Aϕ(j−1) · Aϕ(j+1) · · · Aϕ(n+1) Aϕ(j) + {z } | {z } n+1,t | I.H. (4.61) A(n+1) where 1 ≤ t < n + 1, ϕ(n + 1) < ϕ−1 (t), Xn+1,t = Y Yn+1,t = Aϕ(i) , Y Aϕ(i) 1≤i≤n+1 1≤i≤n+1 ϕ(i)<n+1, i<ϕ−1 (t) ϕ(i)<n+1, i>ϕ−1 (t) and n + 1 is obviously fixed. The final resulting equation thus resembles exactly the form given by Eqn. 4.59, but we have not used the induction hypothesis yet. Now, by using the induction hypothesis, it follows that Aϕ(1) · · · Aϕ(j−1) · Aϕ(j+1) · · · Aϕ(n+1) = A1 · · · An + X (s′ ,t′ ) Xs′ ,t′ · [As′ , At′ ] · Ys′ ,t′ · Zs′ (4.62) 11 This representation (which is much more elegant than the one derived by the author) was provided by Volker Strehl. 35 Chapter 4. Mathematical structures where the primed identifiers are defined by 1 ≤ t′ < s′ ≤ n, and ϕ−1 (s′ ) < ϕ−1 (t′ ). By placing this into the part of Eqn. 4.61 marked by I.H., we see that   X Xs′ ,t′ · [As′ , At′ ] · Ys′ ,t′ Zs′  · An+1 + Aϕ(1) · · · Aϕ(n+1) = A1 · · · An + (s′ ,t′ ) X (n+1,t) Xn+1,t · [An+1 , At ] · Yn+1,t = A1 · · · An An+1 + = A1 · · · An+1 + X (s′ ,t′ ) X Xs′ ,t′ · [As′ , At′ ] · Ys′ ,t′ Zs′ An+1 + | {z } Zs X Xn+1,t · [An+1 , At ] · Yn+1,t (n+1,t) Xs,t [As , At ]Ys,t Zs (4.63) (s,t) where the unprimed variables are now given by 1 ≤ t < s ≤ 1 and ϕ−1 (s) < ϕ−1 (t); the condition for k in Zs is now obviously s < k ≤ n + 1. The resulting Equation 4.63 has thus the form for n + 1 as required by the statement. To illustrate this theorem (note, additionally, that a little program to calculate all elements of the commutator sum is available), consider the permutation given by   1 2 3 4 5 . (4.64) 5 2 3 1 4 The inversions (s, t) are all pairs of elements in the permuted list where a bigger element is on the left side of a smaller element, in this case: (5, 2), (5, 3), (5, 1), (5, 4), (2, 1), (3, 1). Note that the inversions characterise the list completely, cf., e.g., [Knu98, Section 5.1.1]. The method defined above is a variant of insertion sort which is a standard sorting method, covered, e.g., in [SF96]. This can be seen by inspecting the conditions imposed by the products defining X, Y and Z: ❏ For Xs,t , ϕ(i) < s, i < ϕ−1 (t) selects all i such that the corresponding elements in the permuted list are smaller than the element s of the inversion and are placed on the left hand side of the element t in the permuted list. For (5, 1), the condition would select i = 2, 3. ❏ The conditions for Y make sure that again only elements which are smaller than s are selected. This time, they additionally have to be on the right hand side of t in the permuted list. ❏ Z specifies all elements which are on the right hand side of s in the unpermuted list. By applying these rules, we can calculate the following sets for each inversion: (5, 1) → X : i = 2, 3; Y : i = 5 (5, 2) → Y : i = 3, 4, 5 (5, 3) → X : i = 2; Y : i = 4, 5 (5, 4) → X : i = 2, 3, 4 (3, 1) → Z : k = 4, 5 (2, 1) → Z : k = 3, 4, 5 36 4.5. cp-Maps and their representation This leads to the following identity that is provided by Eqn. 4.59 (note that we use i instead of Ai to simplify the notation): 52314 = 12345 + 231[5, 4] + 2[5, 3]14 + [5, 2]314 + 23[5, 1]4 + 2[3, 1]45 + [2, 1]345 = 12345 + 23154 − 23145 + 25314 − 23514 + 52314 − 25314 + 23145− 23145 + 23145 − 21345 + 21345 − 12345 = 12345 − 12345 + 23154 − 23154 + 25314 − 25314 + 23145 − 23145+ 21345 − 21345 + 23514 − 23514 + 52314 = 52314 It it also instructive to observe the following two identies because they illuminate the induction step: 14532 = 12345 + 14[5, 3]2 + 143[5, 2] + 1[4, 3]25 + 13[4, 2]5 + 1[3, 2]45 1432 = 1234 + 1[4, 3]2 + 13[4, 2] + 1[3, 2]4 Remark 4.5.6. Because the proof has only made use of general properties of permutations and of the definition of the commutator, it is not only applicable to Hilbert-Schmidt-operators as we need, but also for any other objects fulfilling the mentioned properties. 37 Summary We have explained how to represent quantum operations by cp-maps and these in turn by a sum of Kraus operators. The Löwner partial order defined for density matrices was generalised to Kraus operators; this order is complete and is therefore a cpo as introduced in the beginning of this chapter. Since the denotational semantics of cQPL will require lists of Kraus operators, we have introduced Kraus aggregations to handle this formally. Since it is one of the problems of denotational semantics to decide whether two given programs are equal or not, we have also derived general and specific criteria for the equivalence of Kraus aggregations. 38 A map is not the territory. Alfred Korzybski, Science and Sanity – An Introduction to Non-Aristotelian Systems and General Semantics 5 Formal denotational semantics In this chapter, we are going to define a denotational semantics for cQPL, the communication capable version of QPL [Sel04b]. Before we get into the details, we will give an overview about the ideas of denotational semantics in general, present a survey of the denotational semantics of QPL (because we reuse some ideas for the semantics of cQPL) and show why the approach of annotation-based QPL must fail for communicating programs. 5.1 Fundamentals of denotational semantics Denotational semantics is a well-understood standard method of theoretical computer science which is used to assign precise and mathematically sound and rigorous semantics to syntactically specified programs; introductions are, e.g., given in Refs. [Mos90, Win93, Rey98]. In this section, we will try to present an elementary introduction to the field. We align our description along the lines of [Mos90, Section 1–3]. Computer programs are (usually) specified in the form of a textual description; this description must follow certain rules defined by a grammar. Usually, context-free grammars are used for this purpose because they are the most apt choice for that kind of problem. They are defined as follows regarding to [AB02, Sch01]: Definition 5.1.1 (Context-free grammar). A context-free grammar G is a four-tuple (N, T, P, s0 ) where N is a finite set of nonterminal symbols, T is a finite set of terminal symbols with T ∩ N = ∅, P ⊆ N × (N ∪ T )∗ is a finite set of productions and s0 ∈ N is the start symbol. As a very simple example, consider a grammar for binary strings of the form 0, 01, 100110, . . . which is recursively given by1 B ::= ’0’ | ’1’ | B’0’ | B’1’. (5.1) The terminal symbols2 are 0 and 1, the non-terminal3 symbol is B, and the start symbol is 1 In general, one has to distinguish between abstract and concrete syntax respectively grammars defining these. The latter is used to specify a representation of programs that can be processed with parsers; for that, some syntactical elements for disambiguation of certain constructions needs to be introduced. Additionally, the capabilities and, especially, limitations of different parsing techniques need to be considered when specifying a concrete grammar. Abstract syntax, on the other hand, is a representation of a program stripped down to the bare minimum that is able to include all available information; additionally, the structure of the syntax can be chosen such that it is not most suited for parsing, but for further analysis and processing of the program. Usually, data structures in the form of trees are used to realise abstract syntax. 2 A constant symbol which cannot be resolved any further, cf. Appendix B. 3 A symbol whose definition consists of a chain of terminal and (at least one) non-terminal symbols and can thus be resolved further. 39 Chapter 5. Formal denotational semantics obvious because there is only one non-terminal. The productions are defined by Equation 5.1; explicitely, they are given by{B × 0, B × 1, B × B0, B × B1}. This grammar defines the syntactical representation of binary numerals. The really interesting thing, however, is not how numerals look like, but instead what they mean – in other words, the semantics of numerals. Obviously, the meaning of a binary numeral is some natural number, so finding semantics for a binary string is equivalent with constructing a method which assigns the appropriate natural number to a given syntactical representation of a binary numeral. The constitutional parts of which the grammar is made up of are called phrases. In our case, these are given by the strings 0 and 1 and the productions B0 and B1. Denotational semantics assigns a meaning to sentences constructed according to a given grammar by assigning a meaning to every elementary phrase of a grammar. The meaning of phrases which are constructed from multiple sub-phrases (e.g., B0 in the example grammar) is given by the meaning of these sub-phrases. The meaning of a complete program is thus determined by the meaning of its constituents. The denotational approach is – in a nutshell – characterised by the following points: ❏ Denotational semantics assigns some appropriate semantic object to every phrase of the grammar; the object is called the denotation of the phrase. ❏ Valuation functions are used to connect syntactical objects with their semantical counterparts. For example, BIN is a valuation function that maps text strings consisting of a series of ’0’ and ’1’ to a natural number. ❏ The denotation of compound phrases must only depend on the denotations of the sub-phrases, i.e., JA1 , . . . , An K = f (JA1 K, . . . , JAn K). This is also known as the compositionality principle. The valuation functions for binary numerals can be represented by the following equations: BIN J0K BIN JB0K = = 0 2 · (BIN JBK) BIN J1K BIN JB1K = = 1 (2 · (BIN JBK)) + 1 The double brackets JK are used to distinguish between the realms of syntax and semantics, while the valuation function BIN is used to map the phrases in these brackets to natural numbers, their denotations. Thus, the domain of this function is the semantic domain N. In Chapter 4, the required material for the specification of domains suitable to support the denotational semantics of cQPL has been presented; it will be put to use in this chapter. Especially note that the denotations of the composite phrases B0 and B1 are defined only in terms of the denotations of their sub-phrases as required by the compositionality principle. To clarify the effect of the denotational definitions, consider how the meaning of the numeral 101 is denoted; the abstract syntax generates the tree shown in Figure 5.1 as representation. This leads to the following denotation (observe that the Bs used in the equations are not identical): BIN JBK = BIN JB1K = 2 · BIN JBK + 1 = 2 · BIN JB0K + 1 = 2 · 2 · BIN JBK + 1 = 2 · 2 · BIN J1K + 1 = 2 · 2 · 1 + 1 = 5 Since B = 101, the final denotation is given by BIN J101K = 5. This is precisely the expected result. 40 5.2. Survey of QPL Figure 5.1: Derivation tree for the binary numeral 101 generated by the abstract grammar given in Equation 5.1. 5.2 Survey of QPL The semantics of QPL is based on the idea of annotating a flow graph that represents a quantum program with density matrices for the quantum mechanical parts and tuples of probabilities covering the classical components. Additionally, a typing context is used to keep track of all variables together with their types that are in use at a certain stage of a program. Since our work is based on QPL, it seems appropriate to summarise its central concepts. The original definition of QPL [Sel04b] provides a more detailed description than given here; an alternative review can be found in [Sch04]. We align our summary on both sources. Note that it is nevertheless useful to have some familiarity with the paper introducing QPL because we can obviously not repeat everything here. 5.2.1 Notational conventions QPL operates on finite-dimensional quantum states represented by vectors over C. The basis states for qbits are defined as |0i = (1, 0)t and |1i = (0, 1)t . Combination of multiple qbits are as usual represented by tensor products of these states. Density matrices are used as basis for any manipulations performed by the language. If a state is defined by some n vector u ∈ C2 , the corresponding density matrix is given by ̺ = uu† and may also be denoted by {u}. Mixed states are represented by linear combinations of pure states, e.g., λ1 u1 u†1 + · · · + λn un u†n . Given four matrices A1 , A2 , A3 , A4 of identical dimension, they can be concatenated horizontally and vertically by   A1 A2 (5.2) A3 A4 which is used to specify composite density matrices. This notation is used to specify the semantics of actions possible in QPL which will be introduced in the following sections. 5.2.2 Language elements QPL programs are given in terms of quantum flow charts 4 where each edge is supplemented with all the information necessary to unambiguously specify the meaning of a program. Every edge is augmented with ❏ a typing context, i.e., a mapping from identifiers of variables to the types of these. It is written as a list of identifiers followed by their type, e.g., a, b, c : bit, d : int. Typing 4 There is also a textual representation for programs, but this is only considered as an aside in the definition of QPL. 41 Chapter 5. Formal denotational semantics contexts encapsulating variables which are not related to the present considerations are denoted by Γ. ❏ an annotation, i.e., a tuple of density matrices which specifies the state of the system. The annotation of a classical bit is given by (A, B) where A + B = 1 and A represents the probability that the value of the bit is 0, whereas B is the probability that the value is 1. The annotation for a quantum bit is of the form given by Eqn. 5.2. All classical operations possible with QPL and their flow graph representations are shown in Figure 5.2. Figure 5.3 depicts the quantum mechanical parts. Figure 5.2: Summary of all classical operations of QPL, taken from [Sel04b]. Note that the symbol “=” is used to separate typing context and the annotation, which can be confusing at times because it is not associated with Γ alone. 5.2.3 Semantics The semantics of a QPL program can be directly inferred from the flow graph representation. The explicit transformation of a density matrix given in the annotation of the edges serves as a unique representation of the meaning of a program. [Sel04b] proofs that this approach is indeed well-defined and also works for recursion and loops, which can be included into the language. Categorical structures that allow to accommodate superoperators and morphisms 42 5.2. Survey of QPL Figure 5.3: Summary of all quantum mechanical operations of QPL, taken from [Sel04b]. to manipulate these according to the possibilities of QPL are used as a formal basis for the definition of the semantics. This categorical superstructure5 is not too interesting for our purposes. It suffices to know that the valuation functions for the diverse language elements are defined as shown in Figure 5.4 and that they indeed fulfil everything which is necessary for a sound and well-defined interpretation. Note that the way how the semantics is specified in Figures 5.2 and 5.3 is not equivalent to the method of Figure 5.4: While the first one relies on explicit transformations of density matrices, the second one uses a more abstract representation in form of superoperators and is almost completely identical to the basis of our approach (the functions computed by both approaches of Ref. [Sel04b] are nevertheless identical except for loops and recursion). Especially, the second variant is compositional, which is a necessary condition to describe multipartite systems in such a way that the description of one part is independent of other parts. 5.2.4 Limitation: Quantum communication Before we lay out the denotational semantics of cQPL, it is advisable to sketch in which sense the different approaches used in QPL do not work for programs dealing with communication. 5 Note that we are only referring to category theory here, not to the compositional semantics presented by Selinger. 43 Chapter 5. Formal denotational semantics Figure 5.4: Valuation functions which define the denotational semantics of QPL, taken from [Sel04b]. First of all, let ̺AB denote the density matrix of the state shared by Alice and Bob. The information available for each party can be inferred by calculating the partial trace: ̺A = trB (̺AB ) and ̺B = trA (̺AB ). The bipartite density matrix can never be recovered from these partial density matrices because there are many bipartite density matrices which give rise to the same partial density matrices. One of the goals of denotational semantics is to assign sufficient information to every edge of a quantum flow graph such that the complete semantics of a program can be reconstructed by combining only the information given by the edges constituting the program. The denotation of a statement composed of several sub-statements must be completely determined only by a function of the denotations of the sub-statements. This is impossible in the annotation-based semantics of QPL because transformations between explicit density matrices are considered. Since a combination of the partial density matrices ̺A , ̺B which were manipulated by Alice and Bob does not restore the total bipartite state ̺AB , the QPL annotation would obviously not comply with the physical state afterwards. A possible solution is the annotation of the complete flow graph, i.e., of both paths representing the control flow for Alice and Bob. In this case, the operations performed by Alice and Bob would be written as tensor products of the type  ⊗ 1B and 1A ⊗ B̂ which act on the complete density matrix ̺AB . This way, we could assign semantics to the program as a whole, but would loose the ability to construct the denotation of a phrase from the denotations of its subphrases. This means that the semantics of the complete program could not be constructed from the denotation of Alice’s and Bob’s program alone which is in contrast to the key idea of denotational semantics. Therefore, we need to seek a solution that does not characterise quantum operations by showing transformations of explicit density matrices, but uses something that captures the 44 5.3. Denotational semantics of cQPL notion of a transformation in a more abstract sense. Completely positive maps represented by a set of Kraus operators fulfil this need as we will show in Section 5.3.1; this is basically the same approach as used for the compositional semantics of QPL. Nevertheless, QPL does not provide any means of parallel composition, communication and other details which are necessary to describe quantum communication as we will do in the remaining parts of this thesis. 5.3 Denotational semantics of cQPL cQPL is an extended variant of QPL with the ability to express and formalise quantum communication, i.e., the ability to describe multiple parallel flow graphs that exchange quantum and classical information at well-defined points, but do otherwise know nothing about each other. To achieve this, we have to base the semantic description on three components in contrast to the two components (typing context and tuples of density matrices) of QPL: ❏ A Kraus aggregation K as defined in Section 4.5.4 which is used to keep track of the quantum operations performed on the qbits of the system. ❏ A typing context T used to specify which quantum and classical variables are allocated at a given moment and which data type they have. This is also important to describe communication because it allows to uniquely determine to which party a variable belongs at a given stage of a program. ❏ A probabilistic environment mapping identifiers to values. Since the interaction between quantum and classical parts of the system introduces probability, the values of classical variables are subject to such a distribution. In general, only the range of possible values together with the fact that it is governed by a probability distribution is known in the semantical description. We refer to these three elements as the three-tuple (K, T, E). A Kraus aggregation K specifies a quantum mechanical operation which has the same effect for all density matrices ̺ (in the sense that the application of a Hadamard gate will yield different effects according to the state it was applied to. Nevertheless, it is still a Hadamard gate in every case, and this is the really important thing). Thus, the operation is completely characterised without the need to specify any density matrix at all. This is exactly what is required when spatially separated operations performed by several parties on multipartite states are to be described, as we will see later in greater detail. To realise the benefits of this approach, consider how the generation of a new qbit in state |0i subsequently followed by the application of a Hadamard gate is described in QPL (we do not show the complete flow graph, but only the relevant parts of the annotation): create new qbit q Γ = A −−−−−−−−−−−→ q : qbit, Γ =  A 0 0 0 45  apply H on q −−−−−−−−→ q : qbit, Γ = 1 2  A A A A  Summary We have presented a quick summary of QPL and the associated denotational semantics which is based on partial orders of density operators. Additionally, we have shown why this approach is not suitable to describe quantum communication respectively the interaction of spatially separated systems where the combined density matrix is not available as whole in the framework of the annotation-based semantics. Chapter 5. Formal denotational semantics Although only the newly created qbit is concerned, the state of the remaining system is still implicitly present in A. This is more than needed: It suffices to consider the application of two operations given by the following Kraus sets: {Ci }#q ; {Hi }#q (5.3) where {Ci }#q stands for “create a new qbit with label q” and {Hi }#q for “apply a Hadamard gate on q”. With these, we can describe the same operation without resorting to a density matrix or any other part of the system unconcerned by the operation at all. The typing context T is basically adopted from QPL. An extension to the framework used by QPL is the probabilistic environment. For every allocated classical variable in the current frame, it is used to specify a probability distribution that maps the variable name to the range of possible values. This distribution is parametrised by density operators because it depends on the initial conditions of the program fragment and on the path taken in the flow graph (an example explaining this will follow in the next section). The probabilistic environment could in principle be replaced by the tuples for classical states as used in QPL, but this works only well for data types with a very low number of bits. Because of this reason, QPL tries to hide these tuples most of the time, so we eliminate them completely and replace them by the probabilistic environment. The probabilistic environment also deals with quantum variables: For every such variable, the position of the allocated qbits in the global quantum heap is given by the probabilistic environment. This is necessary because quantum variables cannot be characterised by a value as it is possible for classical variables because they do not have a state as such. The state is replaced by the series of operations which have been performed on the variables; since these operations need some location to act on, every quantum variable needs to have a unique position on the quantum heap, i.e., where the qbits are stored. Note that this approach is somewhat contrary to the spirit of functional programming because it introduces stateful global variables, but a closer examination reveals that QPL implicitly uses the same model and that compile-time checking (and thus the protection against runtime errors) is not affected by this. In addition to allocated variables, branches in programs are also present in the probabilistic environment. They are identified by a unique ID which is assigned to every branching node.6 This is necessary because the branching conditions – being based on comparisons of probability distributed quantities – are in general not represented by some fixed values, but represented by a probability distribution as well. 5.3.1 Formal definitions In this section, we will present some methods to characterise and describe the semantic components of cQPL. Note that in the following, we use Dn to denote the set of all density operators of dimension n, dropping the subscript if the exact dimension is not important or can be deduced from the context. 5.3.1.1 Typing context Let σ be a list of numbers ni ∈ N+ , i = 1, . . . , k as given by σ = nτ1 , nτ2 , . . . , nτk . σ is also called the signature of a data type. An associated Hilbert space Hσ is given by 6 To Hσ ≡ H1 ⊗ · · · ⊗ Hk (5.4) be precise: Which is assigned whenever the branching node is transversed because we need to account, e.g., for branches in loops where the same branch might be traversed multiple times. 46 5.3. Denotational semantics of cQPL where Hi is either B(H) for quantum or C(X) for classical data (cf. Section 4.3.3) where both are distinguished by the index τ : τ = q for quantum variables and τ = c for classical q variables. The dimension of the i-th space is given by 2ni for quantum mechanical and nci for classical variables. Since we restrict ourselfs to finite-dimensional Hilbert spaces, this means that we can use Hi = Cni for quantum mechanical and X = [0, 1, . . . , ni − 1] for classical data. To distinguish between both cases, we define the function q : nτi → [0, 1] given by ( 1 if τ = q τ q(ni ) = (5.5) 0 otherwise Note that although our formalism allows to define data types which consist of both quantum mechanical and classical components, we do not exploit this possibility because we could not find any reasonable application for this in our work. To keep the formalism as general as possible, we will nevertheless still retain the possibility as long as no noteworthy effort is necessary to do so. We can define a function tq : σ → N to compute the total number of qbits necessary for a given signature (card(σ) denotes the cardinality of σ): card(σ) tq (σ) = X i=1 q(nki ) · nki (5.6) The analogous function tc for the classical components is given by card(σ) tc (σ) = X i=1 (1 − q(nki )) · nki (5.7) Finally, two functions q(σ) and c(σ) to check if a given data type is purely classical or purely quantum are necessary:7 q(σ) = ( 1 tc (σ) = 0 ∧ tq (σ) > 0 0 otherwise (5.8) c(σ) = ( 1 tq (σ) = 0 ∧ tc (σ) ≥ 0 0 otherwise (5.9) For simplicity, we label data types required for practical use with special mnemonics; some examples can be found in Table 5.1. Note that the type void can, for example, be used to formally describe statements which return no value and thus have no type. Since two finite-dimensional Hilbert spaces H1 and H2 are isomorphic if the sum over the dimensions of their subsystems is equal (this is, e.g., proved in [Wei00, Theorem 2.62]), i.e., O O X X H1k = H1 ∼ H2l ⇐⇒ dim(H1k ) = dim(H2l ), (5.10) = H2 = k l k l the description of types is not unique. For example, the types given by (2q , 2q , 2q , 2q ) and qshort = 8q are identical and provide only different aspects of the same thing. This 7 Note that we define a data type consisting of 0 quantum and 0 classical bits, i.e., void, as classical. 47 Chapter 5. Formal denotational semantics Mnemonic bit qbit short qshort int qint void Signature 2c 2q 8c 8q 16c 16q 0(c) Table 5.1: Signatures and the mnemonics commonly used in programming languages for data types supported by cQPL. equivalence can also be extended to mixed data types: X X nτ1 , . . . , nτK ∼ q(nτk ) · nτk = q(mτl ) · mτl = mτ1 , . . . , mτL ⇐⇒ k ∧ X k l (1 − q(nτk )) · nτk = X l (1 − q(mτl )) · mτl (5.11) This creates an equivalence class for data types which will be useful in Section 5.3.8. The class of all data types equivalent to σ is given by   tc (σ) q (σ)  tM M inϕ(i+tq ) (Ω#i)c (5.12) inϕ(i) (Ξ#i)q ⊕ T (σ) ≡   i=1 i=1 such that Ξ ∈ S(tq (σ)), Ω ∈ S(tc (σ)), ϕ ∈ Sym([1, . . . , tq (σ) + tc (σ)]) where M #i denotes the ith element of the ordered set M and S(k) is the decomposition of the scalar value k into all possible sums given by n S(k) ≡ Z is a set with members ∈ N card(Z) X i=1 o Z#i = k . (5.13) If σ2 ∈ T (σ1 ), we write σ1 ∼ = σ2 . To illustrate the effect of Eqn. 5.12, consider a data type which consists of 3 quantum and 3 classical bits. Structurally, it does not make any difference how these components are ordered, e.g., (1q , 1c , 2q , 2c ) is identical with (3q , 3c ) in this sense.8 Eqn. 5.12 is a generalisation of this idea: The scalar 3 can be decomposed as 1 + 1 + 1, 2 + 1 and 3 as given by S(3), so there is no difference between any of these groupings. Additionally, it is not interesting how the components are ordered, e.g., (2 + 1) is equivalent to (1 + 2). Finally, the quantum and classical components can be arbitrarily interchanged, so we have to consider this as well. The effect of Eqn. 5.12 is to construct all equivalent representations of a data types following these considerations. Note that QPL uses a Cartesian product of complex vector spaces given by Cn1 ×n1 × · · · × Cnk ×nk for both classical and quantum mechanical signatures (the set of complex d × d 8 Note that there is a difference between these orderings from the compiler’s point of view because the different components are located at different locations in memory if different orderings are used. The semantics is nevertheless unconcerned by this. 48 5.3. Denotational semantics of cQPL matrices is used to represent the complex Hilbert space of dimension d). This does not reflect the relationship between corresponding quantum and classical objects directly. For example, the data type for bits is given by bit = (1, 1), whereas for qbits, the definition is qbit = 2). This leads to appropriate spaces for these objects, but does not present the relation between them directly. We thus used a different approach that makes correspondences more clear which is important when, for example, quantum variables are measured and the result is stored in a classical variable. Besides, it fits better into the more abstract description of quantum mechanics as introduced in Section 4.3. Let Σ be the set of finite strings over the alphabet α. With this and the notion of types, we can define the typing context used in the semantic description of cQPL. Definition 5.3.1 (Typing context). A typing context τ is a three-tuple τ = (ι, θ, χ) where ι is a set of identifiers in Σ, θ is a set of types and χ : ι → θ is a surjective mapping which assigns a type to every identifier. Identifiers starting with # must not be used by programs. Because cQPL is strongly and statically typed (i.e., the type of an expression is completely determined by the types of its components and the type of an elementary component cannot be changed after it has been declared, cf. Appendix B), information contained in the typing context cannot be modified any more once it has been introduced. Note that this does not hinder the possibility of overshading entries. This happens when, e.g., a variable declared in an inner block has the same name as a variable declared in an outer block. Although both have identical names, their types do not need to match because they are otherwise completely unconnected. Typing contexts are modified when new variables are declared (and thus added to the context) or when variables are removed from the scope (and thus have to be removed from the typing context). Since it is obvious how this influences a given context τ , we only note that it is easy to define appropriate morphisms τ → τ ′ which perform the desired job. Formally, we use the notation τ → τ ′ = τ ⊕ (ξ → qbit) (5.14) to introduce some new identifier ξ with type qbit into the context τ . Equivalently, the notation τ ⊖ ξ is used to remove ξ which is needed to describe sending quantum variables. 5.3.1.2 Probabilistic environment The probabilistic environment can be defined formally as follows: Definition 5.3.2 (Probabilistic environment). Let π be a probability distribution on a P finite set X with probabilities pi for every element of X such that i pi = 1. Let ι be a set of identifiers, P be a set of probability distributions and M be a surjective map M : ι → P ∪ ⊥. Then E = (ι, P, M ) is a probabilistic environment. As usual in denotational semantics, the symbol ⊥ is used to denote an undefined identifier, i.e., a variable which is not present in the environment. To specify components of a probabilistic environment, we use the notation π x range(x) x −→ (5.15) to denote an element of the probabilistic environment where x is the identifier, πx the associated probability distribution and range(x) the set of possible values which obviously 49 Chapter 5. Formal denotational semantics depends on the data type of x. Adding a new binding to a given environment E is once more done with the operator ⊕ which is formally a morphism E = (ι, P, M ) → (ι′ , P ′ , M ′ ) = E ′ : π x range(x) E ′ = E ⊕ x −→ (5.16) Note that multiple inclusion of variables overrides the previous definition. Thus, the meaning of π′ π x x range(x)) ⊕ x −→ range(x) E ′ = (E ⊕ x −→ (5.17) is to create a probabilistic environment which contains πx′ as probability distribution for the variable x. The previous distribution πx can then not be recovered any more in E ′ . In direct analogy to Kraus aggregations, probabilistic environments can be combined with +; the summands are prefixed by some constraint that states which one has to be chosen with which probability: p1 ({c1 }) · E1 + p2 ({c2 }) · E2 + · · · (5.18) P where {ci } are the conditions which determine the values of p and i pi = 1. This construction is necessary for the description of, e.g., if-conditions when it is not a priori determined which path will be selected. If both paths of an if-condition perform a modification on the same variable that already existed before the branch, then the variable will have different values after the merge point. The entries of the probabilistic environment which record this assignment are then prefixed by the branching probability. This is also one of the reasons why the branching probability needs to be kept even after the branched paths are merged again. Definition 5.3.3 (Distributivity of ⊕ over +). The operation ⊕ is defined to be distribuπx πx πx range(x). range(x) + E2 ⊕ x −→ range(x) = E1 ⊕ x −→ tive over +, i.e., (E1 + E2 ) ⊕ x −→ This ensures that adding a new binding to a sum of environments results in adding the binding to all contributing environments automatically. Remark 5.3.1. This formalism is not equivalent with the functionality introduced by stores (cf. e.g., [Mos90, Rey98]). It does still not make use of stateful variables per se, but rather updates the binding of a variable, i.e., the value it is associated with. Observe that the probabilistic environment is only necessary for classical, but not for quantum variables: The state (or, rather: the history of all operations performed until the present moment) of the quantum mechanical constituents of the computation can be reconstructed with the aid of the Kraus aggregation. Nevertheless, the probabilistic environment is necessary to keep track of quantum variables in a different way which will be introduced in a moment. Note that the view on quantum variables differs slightly from that on classical ones: It is not only necessary to keep track of the structure of a variable (as is done by the typing context), but also of the position within the quantum heap – this is necessitated by the underlying model of computation as introduced in Section 2.2.3.9 The environment can be used to provide this kind of information by supplying a map 9 The # : ι ∋ v → (i1 , i2 ) (5.19) value of a quantum variable can obviously not be directly stored in an environment because the state might be in a superposition. The operations performed on the quantum bit are recorded in the Kraus aggregation and unambiguously specify the state. 50 5.3. Denotational semantics of cQPL where ik are integer numbers with 0 ≤ ik < Q and Q is the size of the quantum heap. The tuple i1 , i2 denotes the interval [i1 , i2 ] which contains i2 − i1 + 1 quantum bits. Obviously, the number of qbits allocated in the quantum heap must agree with the number of qbits necessary for the type of the variable as given by the typing context. In theory, it is possible to assume that the quantum heap can always be partitioned into consecutive intervals; we do not need to take care of issues like fragmentation which does obviously appear in implementations and simulations. We assume that the hardware of the quantum memory take care of this issue by acting like a memory management unit.10 Note that if the user is allowed to directly address the components of the quantum heap, it is possible to cause run-time errors as in QCL. Therefore, we do not allow this. Consider a subset M = [0, n] of N. The set of all interval partitions is given by11 I(M ) ≡ {m ⊆ P(M )|∀n ∈ [1, . . . , card(m) − 1] : ((m#n)#0 − (m#(n − 1))#(card(m#(n − 1)) − 1)) = 1} (5.20) where we suppose that the contents of all sets m#i is sorted in ascending order. This can be used to formally define how the probabilistic environment can be adapted to the requirements for quantum variables: Definition 5.3.4 (Quantum part of the probabilistic environment). Let (ι, P, M ) be a probabilistic environment. It can be extended to fulfil the requirements for the description of quantum variables by the following construction: ❏ P is extended to P ⊕ (I([0, Q − 1]) ∪ Σ∗ ) where Q is the total number of quantum bits present in a system. The set of intervals is used to represent quantum variables which reside on the local quantum heap, i.e., which were allocated in the module the probabilistic environment belongs to. Σ∗ is used to denote the originating module for variables which were received from some other party.12 ❏ Let Q = { v ∈ ι q(χ(v)) = 1 } be the set of all identifiers for variables T with quantum data type. Then, M ′ is an injective morphism Q → I for which range(M ′ ) = ∅ (this ensures that quantum variables do not overlap on the quantum heap) must hold. Then M is replaced by M ⊕ M ′ in the previous definition. Note that this definition reflects a fundamental difference between classical and quantum variables: While a classical variable is nothing else than a mapping between an identifier and a value that can be governed by a probability distribution, such a mapping is in general impossible for quantum variables because they do not have a value per se, but only a certain quantum state. To describe this quantum state precisely (disregarding the principal impossibility of implementing a measurement that delivers this information by inspecting 10 This component of a processor creates a view of the available memory such that every application – roughly – thinks that it would have an own linear address space which is as big as the the one available for the whole system. 11 An example might illustrate this definition: Consider the set {[0, 1], [2], [3, 4]}. This is a proper partition since no elements overlap and the boundaries are adjacent. These conditions can be ensured by considering the last element of the ith set given by (m#i)#(card(m#n) − 1) and the first element of the (i + 1)th set given by (m#(i + 1))#0. If the difference between these is +1, then both the adjacency and no overlap conditions are fulfilled. If this holds for all subsets, we have a proper partition. 12 We have to make sure that every quantum bit in the system belongs to exactly one place in a quantum heap. This is simple for single-party programs, but gets more complicated when communicating programs are considered because the case of sending the same quantum bit back and forth between participants must be taken into account. 51 Chapter 5. Formal denotational semantics a single copy of a quantum system), one would need an infinite amount of classical information because even a simple system such as a qbit takes values in a continuous space as a consequence of quantum superpositions. This makes the classical approach of mapping the identifier to a probability distribution of values impossible. Nevertheless, the quantum variable is completely characterised if its location on the quantum heap together with the operations performed on its initial state are known. Remark 5.3.2. Although we retain the name probabilistic environment also for the version of the environment extended to quantum variables, there are no probabilities involved in the connection between variable names and the allocated positions on the quantum heap. The convention just simplifies the notation. Remark 5.3.3. Support for mixed quantum/classical types would require a little more effort compared to the case of full separation because with the introduction of such types, the direct decomposability of the probabilistic environment would not be feasible any more. Nevertheless, no fundamental difficulties would be associated with this. Adding a new quantum variable with name ν which occupies the quantum heap positions given by (q1 , . . . , qn ) is written as E ⊕q ν : (q1 , . . . , qn ) (5.21) Removing a quantum variable is denoted by ⊖q ; this is required when qbits are transmitted and thus cannot be accessed any more (we drop the index if there is no danger of confusion). Note that there is no need for a corresponding operation for classical variables because overlays provide the required functionality, as will be shown later. 5.3.1.3 Kraus aggregations Summary We can directly adopt the definition of Kraus operators as given in Section 4.5.4. Nothing needs to be modified for our purposes (note that the composition of two Kraus aggregations was denoted by ◦ instead of ⊕ as used for the other elements of the three-tuple (K, T, E) to avoid confusion with the symbol + used to combine sub-aggregations). It is possible to show that this semantic framework can be used to formalise standard QPL, but we omit the details here. We have introduced the structures which are necessary to specify the denotational semantics of cQPL; they fulfil the required properties as described in Chapter 4. The semantic framework consists of three components: A Kraus aggregation which is used to store all quantum mechanical operations performed by commands of cQPL, a probabilistic environment which maps identifiers to values (possibly governed by a probability distribution) and provides mechanisms to ensure that quantum variables do not interfere with each other, and a typing context whose information is the basis for compile-time correctness checks of programs. These are grouped in a (K, T, E) tuple which will be omnipresent in the following. Additionally, we have derived some criteria for the identity of data types. 5.3.2 Some examples Before we commence to extend the formal definitions for multipartite systems, we want to demonstrate the introduced concepts with some examples which should aid the reader to see the rationale behind their definition. 52 5.3. Denotational semantics of cQPL 5.3.2.1 Semantics of sequential programs Consider the following program fragment which applies a Hadamard matrix to the quantum variable p or q depending on the result of a branch based on a comparison of two classical variables x and y: if (x > y) { q *= H; } else { p *= H; }; The flow graph representation of the fragment is given in Figure 5.5. To shorten the annotation of the edges and to avoid repeating the same information over and over, we introduce the injection functions ini . ini are 0-based injections into the ith element of an n-tuple. If we want to add the contribution {U } to the element K of the tuple (K, T, E) = ξ, we can write this as ξ ⊕ in0 ({U }). The initial (K, T, E) tuple of the example flow graphs is abbreviated by ξ; modifications derived from this are denoted by ξ ′ , ξ ′′ , . . .. {{Γ}} ; {τ ; x, y : int; p, q : qbit} ; o n πy πx range(x); y −−→ range(y) ≡ ξ E ⊕ x −−→ x>y Unique node ID #42 ξ ′′ ≡ ξ ⊕ in2 (#42 → false) ⊕ in1 (#42 : bit) ξ ′ ≡ ξ ⊕ in2 (#42 → true) ⊕ in1 (#42 : bit) p∗ =H q∗ =H ´ ` ξ ′ ⊕ in0 {H}#p ´ ` ξ ′′ ⊕ in0 {H}#q Implicit merge for branch #42 n “ ” “ ”o p (val(#42) = true) · {Γ} ; {H}#p + p (val(#42) = false) · {Γ} ; {H}#q ; {τ o n ; x, y : πint; #42 : bit; p, qπy: qbit} ; π#42 x range(x); y −−→ range(y); #42 − −−−→ range(#42) E ⊕ x −−→ Figure 5.5: Flow graph of a simple branching operation to demonstrate the elements of the semantic framework: A 3-tuple (K, T, E) is used to annotate every edge of the graph; K is a list (or aggregation) of Kraus operators, T is the typing context and E the probabilistic environment. Note that the annotation of the graph uses several abbreviations as defined in the text. The initial configuration of the 3-tuple (K, T, E) is given by Γ (initial list of Kraus operators), E (probabilistic environment) and τ (typing context). We don’t care about their contents in detail, they can represent the semantics of any valid program fragment that might be placed before our example. Things which are of interest for our code fragment are: 53 Chapter 5. Formal denotational semantics ❏ The two classical variables x and y, both of type int. ❏ The probability distributions πx , πy which map the variables x and y to a value contained in [0, 2bits per int − 1]. The probability distribution for classical variables arises because we work with Kraus operators describing quantum operations instead of density matrix transformations. Consider the measurement of a single qbit whose result is stored in a classical bit variable: We know that the range of the measurement outcome is {0, 1}, but we don’t know with which probability the “0” and the “1” will appear because we do not have an explicit density matrix to describe the qbit. This piece of information can only be gained when the final semantics of the program (in form of a total set of Kraus operators) is “applied” to a well-defined initial configuration; only then quantitative statements about the distribution are feasible. All we know is that the measurement result x will be governed by a probability distribution πx with a certain well-defined range, so we preserve that information. Since the values of x and y are given by a probability distribution, the result of the comparison x > y (with outcome range {true, false}) can only be specified by another probability distribution which can be deduced from πx and πy . Since we need to reference the outcome of the comparison at a later point in the flow graph (when the two edges of the branch are merged), a unique identifier for the node is created (#42 in this case) and the probabilistic environment is extended accordingly. Depending on the outcome of the comparison, a Hadamard gate is applied on either p or q. This does not change the probabilistic environment or the typing context, but is recorded by placing an appropriate Kraus operator in the Kraus aggregation (#p and #q denote the position of the quantum bits in the quantum heap). After every if-then-else construction, an implicit merge operation which unites the two branches takes place. The probability distribution of the branching condition is preserved in the probabilistic environment under the label assigned to the branch statement; the Kraus aggregation is transformed into a sum that formally resembles a mixed state: With probability val(#42) == true (which is the probability that x > y evaluated to true), the operation {Γ̂}; {H}#p was performed, while with probability val(#42) == false, the operation was {Γ̂}; {H}#q . 5.3.2.2 Communication with EPR pairs Consider the following (pseudo-)code which describes how Alice creates an EPR pair and transmits half of it to Bob: module Alice { new qbit p := 0; new qbit q := 0; createEPR(p,q); send q to Bob; new bit b := measure(p); if (b) { ... } else { ... }; }; module Bob { receive m from Alice; new bit b := measure(m); if (b) { ... } else { ... }; }; 54 5.3. Denotational semantics of cQPL The corresponding flow diagram is given in Figure 5.6. new qbits p, q := 0 createEPR(p, q) n {Γ} ; {C}p ; {C}q {EP R}#p,#q {τ ; p, q : qbit} ; {E} send q nn Γ′ o ; receive m oo nn ; {τ ; p : qbit} ; {E} measure p ID: #23 o ; {R}#m ; n o n o ′ τ ; m : qbit ; E ′ Γ′′ o ID: #42 measure m Figure 5.6: Flow diagram which describes the creation of an EPR pair by Alice; she keeps the first half, while the second half is sent to Bob. Afterwards, both of them measure their qbit. {Γ′ } is a shorthand for {Γ}; {C}p ; {C}q ; {EPR}#p,#q , {Γ′′ } is the initial Kraus aggregation of Bob, τ and E respectively τ ′ and E ′ are the initial typing contexts and probabilistic environments of Alice and Bob. Note that the labelling formalism is reduced to the basic necessities in this example in order to emphasise the central elements. Because Kraus operators are used to describe the quantum mechanical operations, it is possible to perform spatially disjoint actions by parties who do not know the total state. When the edges are merged together, the operations performed by Alice and Bob can (as was mentioned before) be factorised as  ⊗ 1B , 1A ⊗ B̂ for the combined semantics of both branches; the total density matrix is not involved in this, contrary to annotation-based QPL. The framework to generate the semantics of the total system from the semantics of the components will be introduced in the following section. 5.3.3 Extension to multipartite systems Since we want to consider the formal semantics of programs which deal with communication, we need to extend the previous definitions to the multi-party case. For this, observe that the number of participants can naturally be assumed to be finite which makes it possible to label each party with a unique identifier of finite length. For formal simplicity, we assume that the set of labellings for participants Lc is disjoint with the standard labels used for variables, i.e., Lc ∩ Σ∗ = ∅. Let Lc (i) denote the unique label given by the ith entry of Lc . Assume that we have n communicating parties which are labelled with l1 , . . . , ln ∈ Lc . According to the principle of compositionality (we will explain this for the context of communication in more detail in Section 5.3.6.4 on Page 70), there is a three-tuple (K, T, E) for every participant, i.e., (K1 , T1 , E1 ), . . . , (Kn , Tn , En ). The combined three-tuple for the complete system is then given by (⊗ni=1 Ki , ⊗ni=1 Ti , ⊗ni=1 Ei ) 55 (5.22) Chapter 5. Formal denotational semantics We will consider how the tensor product needs to be defined for each component to provide a sound basis for our further needs.13 5.3.3.1 Kraus Aggregation Consider, for simplicity, two Kraus aggregations Λ1 = {A1k }, {A2k }, . . . , {Ank } Λ2 = {Bk1 }, {Bk2 }, . . . , {Bkm } (5.23) (5.24) (in case of n 6= m, the shorter list can be padded with zero elements so that m = n can be assumed, but note that it is only for notational convenience). If both lists operate on a disjoint set of qbits, i.e., no send/receive (pseudo-)operations are contained in the lists, then ∀i, j : [{Aik } ⊗ 1B , 1A ⊗ {Bkj }] = 0 holds. The Kraus aggregation for the composite system can be written as: Λ1 ⊗ Λ2 = {A1k } ⊗ {Bk1 }, . . . , {Ank } ⊗ {Bkn } (5.25) Note that members of type {Ak } ⊗ {Bk } can be written as {A} ⊗ 1B + 1A ⊗ {B}. If this is done for all list elements, we see that all combinations of A ⊗ 1 with 1 ⊗ B commute; this induces many equivalent orderings of the lists – in addition to the normal commutative equivalences as given by Eqn. 4.57 for the sublists – which needs to be considered when multi-party aggregations are tested for semantic equality in Section 5.3.5. Formally, the equivalence class of compatible Kraus aggregations for two independent parallel systems is given by ) ( n n M M i i inϕ(n+i) 1A ⊗ {Bk } inϕ(i) {Ak } ⊗ 1B ⊕ (5.26) i=1 i=1 with ϕ ∈ Sym(2n) : ϕ(i) < ϕ(i + 1)∀i ∈ [1, . . . , n] ∧ ∀i ∈ [n + 1, . . . , 2n] where the additional constraints on the permutation make sure that the order of {Aik } and {Bki } is preserved. We can generalise this approach to n Kraus aggregations given in the contracted normal form (padding is applied as usual to compensate for different cardinalities): PN Definition 5.3.5 (Tensor product for Kraus aggregations). Let Λ1 = k1 =1 p1k1 Λ1k1 , PN . . . , Λn = kn =1 pnkn Λnkn be Kraus aggregations in the contracted normal form. The tensor product of these is given by n O i=1 Λi ≡ N X k1 =1 ··· N X kn =1 p1k1 · · · pnkn · Λ1k1 ⊗ · · · ⊗ Λnkn (5.27) Note that the naming of qbits changes when multipartite systems are merged. For Kraus sets which symbolically refer to qbits, the labels must be updated accordingly (the exact renaming scheme is given in Definition 5.3.6). Two aggregations are equivalent if they are member of the same equivalence class as given by Eqn. 5.26 or member of the equivalence class given by the same formula, but induced by a compatible ordering of one or more of Λi as defined by Eqn. 5.25. Note that we will show in Section 5.3.6.4 how send and receive operations can be integrated into this formalism. 13 Note that although formally, different tensor products are used for each element of the (K, T, E) tuple, we use the same symbol for all of them to simplify notation. 56 5.3. Denotational semantics of cQPL 5.3.3.2 Typing Context Definition 5.3.6 (Tensor product for typing contexts). The tensor product of n typing contexts (ι1 , θ1 , χ1 ), . . . , (ιn , θn , χn ) is given by ! n n n n [ [ [ O (5.28) Lc (i)χi θi , Lc (i)ιi , (ιi , θi , χi ) = i=1 i=1 i=1 i=1 where Lc (i)M denotes a set which contains all elements of M prefixed by the unique identifier Lc (i); Lc (i)χ denotes the morphism χ adapted to the new naming scheme. 5.3.3.3 Probabilistic Environment The probabilistic environment can be adapted to multipartite systems analogous to the typing context, i.e., by prefixing the variable names with appropriate labels and adapting the morphism used to connect the set of identifiers with the set of data types. Obviously, the prefix for each subsystem must be the same as used for the typing context. The quantum part needs to be modified as well: The local quantum heaps must be united to a single one; necessarily, the positions of all variables on the new heap still need to be disjoint. This is simple to achieve: If E0 uses the range [0, n1 ] and E1 the range [0, n2 ], the new range is given by [0, n1 + n2 + 1] and the morphism M ′ needs to be adapted such that the mapping remains unchanged for variables originating from E0 and the constant offset n1 + 1 is added to its codomain for variables originating from E1 .14 Likewise, the function # which associates variable names with quantum heap positions needs to be updated such that the modified variables names are mapped to the modified positions. We will not consider the renamings any more in the following parts, but just take them as given; this simplifies the notation considerably. 5.3.3.4 Quantum channels Quantum channels are used to exchange information between processes.15 Although not only quantum data, but also classical variables can be sent, we restrict our considerations to the first case because the second one is not too interesting from a physical point of view and would only obstruct the view on the central elements. In particular, classical communication can be seen as a special case of quantum communication (cf., e.g., [Key02, Section 6.2.2]), hence the generality of the approach does not suffer from this restriction). Besides, the topic of classical communication has been investigated in classical programming language theory for a long time, so we can refer the reader to the wealth of existing literature about this topic, e.g., Ref. [Rey98]. We have already introduced quantum channels informally in Section 2.2.3.1; here, we consider the concept formally. Definition 5.3.7 (Quantum channel). A quantum channel is a five-tuple (O, D, S, R, F ) where O is the origin and D the destination for a quantum variable (these can, e.g., be 14 Note that both local quantum heaps could have already used the full number of available quantum bits (Q); we do not consider this problem any further because it is alway possible to limit the number of quantum bits for n communicating systems to n·Q because both n and Q are finite. We are not too concerned about this problem because we always assume that there are enough qbits available. The reason behind the restriction to a finite, but fixed number of qbits is to ensure the boundedness of all Kraus operation as explained in Chapter 4. 15 A user in a real-world implementation is nothing else than a process in the simulation. We thus use both terms interchangeably. 57 Chapter 5. Formal denotational semantics represented by processes), F is a FIFO16 containing objects of type (̺, σ), S is a morphism to place two-tuples (̺, σ) in F and R is a morphism to retrieve two-tuples (̺, σ) from F . As usual, ̺ represents the density matrix of a quantum variable and σ the associated type. Thus, the quantum channel can be used to make sure that not only typing is guaranteed to be preserved along communication (for this, confer further Section 5.4), but also that quantum data does not appear multiple times in a composite system at the same time which is necessary to avoid unphysical situations in the simulation. Remark 5.3.4. Note that quantum channels are only necessary when the parallel composition of two or more processes is considered. For single modules, the functions used to deposit respectively request information from the channel together with an abstract representation of the channel (e.g., an identifier) are sufficient. Remark 5.3.5. Also note that most descriptions of quantum communication protocols do not consider typing of the exchanged data explicitely, it is nevertheless implicitly implied by the physical realisation of the protocol, e.g., in the measurement process, by the hardware used to realise the communication channel or in the way the quantum part is implemented in general. 5.3.4 Existence of fixed points Because fixed points are important for the denotational description, we need to prove the following theorem which states a condition for the existence of such. In the following, the condition can shown to be fulfilled for every element of the semantics. Theorem 5.3.1. Let T be a linear operator D → D acting on a complete partial order D with bottom ⊥D . If T is bounded, then a fixed point of T exists. Proof. Since T is bounded, we can see from Theorem 4.2.1 that it is continuous as well. Topological continuity implies Scott continuity as was shown in Theorem 4.4.2. The existence of a fixed point is now given by Theorem 4.4.1, as required. Remark 5.3.6. Note that the same proof could have been deduced at a slightly more abstract level using the notion of a pointed dcpo, i.e., a dcpo with a least element. For structures fulfilling this condition, Theorem 2.1.19 in [AJ94] ensures that the desired least fixed points exist. Ref. [Sel04b] uses a somewhat similar reasoning in the description of recursive procedures where the existence of least fixed point solutions for these is explained by the fact that for Scott-continuous endofunctions on pointed complete partial orders, these always exist. Remark 5.3.7. For those who want to be extra sure, the classical fixed point theorem by Schauder which states that any continuous map with a countably compact image on a compact, convex subset of a Banach space has a fixed point could also be used to derive the required property of cp-maps. We will need fixed points to solve recursive equations which occur in denotations specified by recursive equations. These are required for loops and the combined semantics of communicating systems. 16 First in, first out queue. Informally, this is a queue where objects can be put in on one side and taken out on the other side. The object which is put in first comes out first, the second one comes out second etc. 58 5.3. Denotational semantics of cQPL 5.3.5 Types of interpretational equivalence The term “equivalence” is not unambiguous without further specification. Under which conditions can two programs or, respectively, the denotations of two programs be considered as equivalent? QPL has to distinguish between two different types of equivalences as noted in [Sel04b, Section 6.6]; likewise, we can define several types of equivalence:17 ❏ Two programs are textually equivalent if there is a bijective mapping between the set of all variables the programs use and for every constituent of program A, there is a constituent of program B such that Ai = Bi , i.e., the programs are identical already at the level of the syntax. The ordering of these constituents must be identical. For example, the two program fragments new int a; a:=1; and new int b; b := 1; are equivalent because the sequence of commands is identical if the replacement a ↔ b is applied to the variables. ❏ Two programs are denotationally equivalent if their denotations are identical. The second definition only shifts the problem because it leaves the question of how to identify equivalent denotations. This is problematic for cQPL because we do consider multiple representations of superoperators which have identical effects; some care needs to be taken to exactly specify the meaning of “identical ” in this setting. Denotational equivalence can be refined to the following cases for cQPL: ❏ Direct denotational equivalence: We can distinguish three different scenarios which exhibit direct denotational equivalence for (K1 , T1 , E1 ) and (K2 , T2 , E2 ) given as denotations of A1 , A2 : 1. card(K1 ) = card(K2 ), ∀i ∈ [0, . . . , card(K)[: K1 i = K2 i and E1 = E2 , T1 = T2 . This means that both programs have have the same number of Kraus sets as denotation, the probabilistic environment and the typing context contain the same information and the denotations of the statements are pairwise identical. 2. E1 = E2 , T1 = T2 , card(K1 ) = card(K2 ), ∃ϕ ∈ Sym(n) : ∀i ∈ [0, . . . , card(K)[: K1 i = K2 ϕ(i) such that the sum of commutator products calculated according to the method given in Section 4.5.4.2 vanish identically, i.e., only permutations with vanishing commutator have been used. This equality holds if only commuting statements have been exchanged to match the lists, the total denotation is thus identical. 3. ∀̺ ∈ D : (K1 , T1 , E1 )(̺) = (K2 , T2 , E2 )(̺) where (K, T, E)(̺) means the application of the Kraus set in K on ̺ where the information contained in E is utilised to construct the proper superoperators because the exact representation of K in general depends on information given in T and E. Note that the initial state resolves any symbolic parametrisations which may be present in K. The first condition obviously implies the second and third condition; the second implies the third, but the other direction is not true in general, so equivalences of decreasing strength are defined by this enumeration. ❏ Heap-permutative respectively variable-permutative denotational equivalence is given if there exists a permutation of the quantum heap positions (respectively the variable names) such that direct denotational equivalence holds. These permutation schemes can be used to align different probabilistic environments to each other. 17 Note that our definitions of equivalence do not coincide with the types of equivalence given by Selinger. 59 Chapter 5. Formal denotational semantics Summary Note that textual equivalence implies denotational equivalence, but the converse statement is not valid in general. A last form of equivalence that needs to be considered concerns the parallel execution of programs. If {Ai } represents a set of n communicating modules, the order in which the subsystems are given does not make any difference, i.e., JA1 ||A2 || · · · ||An K ∼ = JAϕ(1) ||Aϕ(2) || · · · ||Aϕ(n) K for any ϕ ∈ Sym(n) and an according update of the references to the other subsystems Ak , k 6= m in Am for all m. Likewise, relabelling of communicating modules does not change the meaning of parallel execution if the reference names in all participating modules are updated correspondingly. This type of equivalence can be referred to as communicative equivalence. The problem of how to detect equivalence between different representations will emerge several times in the following remarks and is not easy to solve constructively. We have augmented the definitions of the semantic basis (K, T, E) with the elements required to represent communicating systems, i.e., cQPL programs which are generally independent of each other, but can exchange quantum mechanical and classical data in a well-defined way. Additionally, we have shown that fixed points exist in this framework; they are necessary to assign semantics to numerous components of the language as explained in Chapter 4. Criteria for the equivalence of cQPL programs were specified as well; this allows to check if programs which are specified by different sequences of commands have the same effect. 5.3.6 Semantics of the language components Chapter 2 gave an informal18 introduction the the language elements of cQPL. In this chapter, we will use the mathematical and semantical formalism introduced in the preceding sections to give a rigorous mathematical meaning to these statements. By the compositionality of denotational semantics, this means that all cQPL programs (which are, necessarily, composed of cQPL statements) have a defined semantics. There are two possible representations for cQPL programs in form of textual descriptions and graphical flow charts; we resort to the particular representation that is more convenient for the desired purpose in the following remarks. Establishing a formal correspondence between both possible representations of cQPL is obvious and follows exactly the argumentation used in [Sel04b]; we will thus not bore the reader with details on how to relate both representations uniquely. Note that we try to keep the purely classical formalism as terse as possible because most problems related with this are not too interesting from a physical point of view. More elaborate descriptions or gentle introductions can be found, e.g., in Refs. [Mos90, Rey98, Win93]. 5.3.6.1 Some notational remarks Some conventions and notations widespread in semantics are uncommon in physics, thus we want to make two short remarks before proceeding further. Typed lambda calculus Computer science literature habitually uses the typed lambda calculus (cf., e.g., [RP02]) to formulate the equations for valuation functions; this is useful to 18 It should be noted that although informal may sound a little fuzzy, such a description is normally the maximal level of accuracy with which users of programming languages (and in most cases, implementors as well) are confronted. 60 5.3. Denotational semantics of cQPL not only clarify which parameters are used, but also to determine their type. We, in contrast, use a different notation. Observe, for example, the denotation of the dyadic operator + which adds two natural numbers: DOJ+K(n1 , n1 ) = sum(n1 , n2 ) (5.29) It is intuitively clear that we are talking about a function which takes two natural numbers as arguments and computes another natural number as result. Nevertheless, we did not formally specify the data types of the arguments nor of the result of the function. This can be solved by using the typed lambda calculus in which the function would be written as: (5.30) DOJ+K = λn1 ∈ N.λn2 ∈ N.sum(n1 , n2 ) This very simple example already demonstrates that the representation requires a considerable notational effort. Since nearly all valuation functions for the semantics of cQPL defined in the following require (K, T, E) tuples in addition to the effective parameters, this would unduly inflate the length of equations which does not really increase lucidity. Thus, we stick to a simplified notation which follows the algebraic convention for functions as presented above. The domains where parameters originate from are normally clear from the context; we will mention it explicitely should this not be the case since typing is obviously not explicitely part of the simplified description. Currying/Schönfinkeln Another point we want to mention is the insight that functions of more than one parameter may always be composed by a number of subsequent functions which take exactly one parameter. Thus, a function f (x1 , x2 , x3 ) = y with xi , y ∈ N which is an element of (N × N × N) → N can also be seen as a mapping (N → N → N) → N, the parentheses may also be omitted. The technique of transforming a function with multiple arguments into a function which takes only one argument, but returns another function which requires the remaining arguments and returns the result is conventionally termed currying, although it was first introduced by Schönfinkel [Sch24]. The process can obviously be repeated so that there are only functions left which take exactly one argument. In the following, we will use the form which is more apt for the respective purpose. 5.3.6.2 State transformations and fixed points Valuation functions for top-level elements of cQPL (i.e., those for expressions) work on a three-tuple (K, T, E) and produce a new three-tuple (K ′ , T ′ , E ′ ) as we will see in the course of the following remarks. Thus, these tuples form the domain which is the basis of semantics. Since we will need fixed points as solution of several recursive domain equations, we need to show how to calculate them for (K, T, E) tuples. We have already shown that fixed points exist for Kraus aggregations which fulfil certain conditions. Now, we need to transfer this to (K, T, E) tuples. For this, note that the typing context is not involved in the calculation of fixed points: Its purpose is to ensure well-typedness of programs (which will be explained in more detail in Section 5.3.8) and (as a consequence) to make sure that ownership of qbits is unique. Otherwise, it has no semantical meaning. To consider the contribution of the probabilistic environment, observe that we could do without it in principle by using a different notation as is, for example, the case in QPL (we did not adopt this approach because it quickly leads to very long annotations which are cumbersome to handle; additionally, our approach has a greater similarity with the standard notation commonly used in denotational semantics). For every possible value of a variable 61 Chapter 5. Formal denotational semantics in the probabilistic environment, a specific Kraus aggregation can be inferred. Consider a measurement of two qbits whose result is stored in a classical variable of two bits. A πx :PROJ (q,T ) probability distribution x −−−−−−−−−−→ [0, 1, 2, 3] is stored in the probabilistic environment where PROJ (q, T ) represents the information that the quantum variable q contained in the typing context T was measured (this will be covered in more detail in Section 5.3.6.4 on page 69). Since the exact form of the probability distribution depends on the state of the measured variable about which nothing is known in the worst case (if, e.g., the variable was received from a remote party which did not characterise it any further), we have to account for all possible cases, i.e., for all values the variable can have in principle. Let {Γ}; {M }#q be the contents of the Kraus list K from the (K, T, E) tuple immediately after the measurement where {M }#q denotes the Kraus set for a projective measurement. This list can with the help of the probabilistic environment be rewritten into a four-tuple ({Γ}; {P0 }, {Γ}; {P1}, {Γ}; {P2 }, {Γ}; {P3}) (5.31) where {Pi } = |ii hi| is one of the projection operators which constitute the POVM elements of the measurement. Note that the Kraus aggregations contained in tuples of this kind are always unparametrised.19 If there is now an operation performed which is independent of the measured variable, the contribution to the Kraus set is appended to all list components in this picture. Consider, for example, the application of some operator U to another quantum variable v. The resulting four-tuple of Kraus aggregations then looks like: ({Γ}; {P0 }; {U }#v , {Γ}; {P1 }; {U }#v , {Γ}; {P2 }; {U }#v , {Γ}; {P3 }; {U }#v ). (5.32) The first entry belongs to the case that x = 0, the second to x = 1, and so on. Obviously, it is much simpler to write this in our notation as ({Γ}; {M }#q ; {U }#v ) (5.33) from which the tuple representation can be reconstructed. This also works if operations are considered that depend on the state of a classical variable governed by a probability distribution. Consider, for example, the case that an operator U is applied to some quantum variable v if the value of x is 2 (the program code for such an operation would be if (x = 2) then v *= U;). In our notation, the branching condition is preserved in the probabilistic environment as shown in the example given by Figure 5.5. From this information, the corresponding tuple representation ({Γ}; {P0 }, {Γ}; {P1 }, {Γ}; {P2}; {U }#v , {Γ}; {P3 }; ). (5.34) can be constructed. Note that U is only applied in the case x = 2. The transfer from our representation to tuples of Kraus aggregations is easier when classical variables with defined values and no associated uncertainty are considered, so we will not show an explicit example for this. As the forgoing considerations have demonstrated, the probabilistic environment and the Kraus aggregation contained in the (K, T, E) tuple can be used to construct a tuple of Kraus aggregations where the tuple contains one entry for every combination of values the classical variables can be in. Fixed points of (K, T, E) triples must therefore be calculated separately for all possible Kraus aggregations that can be constructed from the triple because 19 This kind of split is one of the reasons why it is more convenient to work with Kraus representations of cp-maps instead of the cp-maps alone which would also be possible in principle. 62 5.3. Denotational semantics of cQPL each of them represents another possible meaning of the program. This is possible with the methods introduced before. After the fixed points have been derived, the usual (K, T, E) representation can be used again. Thus, calculation of fixed points effectively only requires the properties of Kraus sets as introduced before. In the following, we need thus only make sure that the conditions for the existence of fixed points of Kraus aggregations as given in Theorem 5.3.1 are fulfilled to ensure the existence of fixed points for (K, T, E) tuples. 5.3.6.3 Classical operations The classical subsystem of cQPL consists of the following parts: ❏ Allocation and (implicit) deallocation of classical variables. ❏ If-then-else expressions. ❏ While-loops (this and the previous point require the evaluation of boolean conditions which must also be accounted for by the semantics). ❏ Sequential composition. ❏ Do-nothing-operation (skip). ❏ Sending and receiving of classical states. ❏ Assignment to classical variables. ❏ Calling procedures which manipulate classical data. ❏ Blocks. Note that we do not cover sendig and receiving of classical data because this has extensively been covered in the literature. Additionally, it is in principle always possible to achieve the same effects with the transmission of quantum mechanical information. In the following, we cover only the valuation functions which are either absolutely indispensable or are influenced by the quantum properties of our language. Sequential composition Modifications made to the typing context, the probabilistic environment and the Kraus aggregation made by the first statement must be taken into account when the semantics of the second statement is calculated: EX PJS1 ; S2 K(K, T, E) = EX PJS2 K(EX PJS1 K(K, T, E)) | {z } (5.35) =(K ′ ,T ′ ,E ′ ) This is utilised many times in the denotational equations for quantum communication. Blocks Blocks are used to introduce multiple levels of scope into programs. This can happen both implicitly (e.g., in loops) and explicitely (by syntactical specification of blocks), but there is no need to distinguish between these cases from a denotational point of view. Superficially, a block looks just like a collection of multiple statements which are executed one after another; but some additional points need to be taken into account: ❏ New variables (both quantum and classical) may be declared inside blocks, but they cease to exist once the block’s scope is left. 63 Chapter 5. Formal denotational semantics ❏ New variables do overshade old ones if they share the identifier. ❏ Changed bindings of already existing variables are also visible after the control flow has left the block’s scope. Thus, the probabilistic environment is partially affected by a block. The typing context before and after the block is identical and thus unaffected by the block’s effect,20 and the Kraus aggregation records everything that has been done inside the block. Since the mentioned problems appear in every programming language featuring blocks, standard solutions are available in every textbook (as usual, cf. Refs. [Mos90, Rey98, Win93]), so we will not explictely present them here to save some formal overhead. Conditionals and Operators Dyadic operators combine two subexpressions into one result, as, e.g., all arithmetic operations do. Conditionals are operators which result in a boolean variable, i.e., they evaluate to one of the values true or false which are represented by 1 and 0. In contrast to most classical languages, the result of both types need not be fixed with certainty, but can be governed by a probability distribution. Note that conditionals may not be used as stand-alone expressions, but can only be part of conditional statements. This is why their semantic valuation does not result in the usual (K, T, E) tuple, but in a probability distribution for the possible results which is, e.g., apt for inclusion into the probabilistic environment. The basic valuation functions are given by: OPJa DO bK(T, E) = DOJDOK(OP (a)(T, E) ⊗ OP(b)(T, E)) OPJMO aK(T, E) = MOJM OK(OP (a)(T, E)) (5.36) (5.37) where DO ∈ { +, −, ∧, ∨, . . . } and MO ∈ { ¬, − }. The meaning of the operations is defined as usual, but the probability distribution nature of the arguments needs to be taken into account: M M πa (v1 )πb (v2 )DO(v1 , v2 ). (5.38) DOJDOK(a, b) = v1 ∈range(a) v2 ∈range(b) This expression results in a new probability distribution that can be used by the elements further up in the evaluation hierarchy. Note that the denotation of a single variable is given by the corresponding probability distribution which can be found in the probabilistic environment: OPJvK(T, E) = E(v) (5.39) This definition ensures that chains of expressions using dyadic and monadic operators (e.g., 42 + 23 + 4) are covered by the semantics because a and b in Eqns. 5.36, 5.37 can either be values or other operator expressions. Also note that the eventual action of the respective operators (+, ∧, . . . ) can be seen intuitively, so we abstain from further formalisation and rely on the reader to use his common mathematical sense. Remark 5.3.8. Note that we do neither consider any problems of numerical accuracy nor of limited ranges of representable numbers for the specific data types. Consequently, we also do not care for the problem of division by zero. We are aware that such pitfalls exist, but are not interested in their solution in this context since their nature is purely classical. 20 But note that the typing context within the block may well be different than the one outside. 64 5.3. Denotational semantics of cQPL If-Statements The semantic description of the if-statement is simplified by introducing the following helper function: f ((K0 ,T0 , E0 ), (K1 , T1 , E1 ), π, ν, (K, T, E)) = p(ν = 0) · K ◦ (K0 − K) + p(ν = 1) · K ◦ (K1 − K), T ⊕ ν : bit, p(ν = 0) · E ⊕ ν : π ⊕ E0 + p(ν = 1) · E ⊕ ν : π ⊕ E1 (5.40)  which eases selection of components of (K, T, E) tuples gained by other evaluations and additionally circumvents repeated semantic evaluations of some components. The tuple (K0 , T0 , E0 ) is the result of the evaluation of the if-branch, while (K1 , T1 , E1 ) is for the then branch. π is the probability distribution governing the branch, and ν is the identifier which is used to represent this distribution in the probabilistic environment. (Ki − K) represents the Kraus aggregation that contains only the elements that were appended to Ki in comparision to K; this ensures that only new contributions introduced in the branches are added to the Kraus aggregation finally. The denotational description for the if-statement then reads as Jif c then C0 else C1 K(K, T, E) = uid , (K, T, E)) f (EX PJC0 K(K, T, E), EX PJC1 K(K, T, E), OPJcK(T, E), |{z} {z } | {z } | {z } | (K0 ,T0 ,E0 ) (K1 ,T1 ,E1 ) π (5.41) ν where uid is a unique identifier for the branch which can be chosen at will, but must not be identical with other identifiers already in use. Such a choice is simple for non-communicating programs. The extension to communicating systems is possible if every identifier is given a unique prefix for each partner as described before. Note that although dyadic operators might syntactically be used to describe arithmetic operations and not necessary conditionals, this source of mistake is ruled out by the type system which only allows boolean typed expressions for c. While-Statements While statements can be solved using the fixed-point theorem given in Eqn. 4.4.1. For this, note that the denotation of the while function can be rewritten using the previously considered if-function together with an explicit block (c denotes a boolean condition and S a statement): JwK(K, T, E) ≡ Jwhile c do SK(K, T, E) JwK(K, T, E) = Jif c then {c; w} else skipK(K, T, E) (5.42) (5.43) Eqn. 5.43 is a recursive equation (c appears both on the left hand and the right hand side) whose solution is a fixed point. The agreement is that the least fixed point is taken to be the denotational solution, and this is exactly what the fixed point theorem delivers. To write this formally is now a standard exercise of denotational semantics [Rey98, Mos90], but we show it nevertheless because it is an instructive example for the technique of solving recursive equations which will be necessary for the denotation of quantum communication. Consider the function F given by F f (K, T, E) = if JcK(K,T,E) then f (JSK(K, T, E)) else (K, T, E). (5.44) Then the fixed point solution can be formally written as Jwhile c do SK = YΣ→Σ⊥ F, 65 (5.45) Chapter 5. Formal denotational semantics where Σ is any (K, T, E) tuple as usual; assume that f is defined like ( ⊥ if x = ⊥ f (x) = f (x) otherwise (5.46) since we have to account for the case that the argument of f is ⊥ because of the recursion (note that we would have to use two different symbols for f to write this überproperly). Assignments Assignments in cQPL can be seen as a convenience mechanism which extends the simple binding of identifiers to values; it is not necessary to introduce the concept of stateful variables to the language to be able to formalise assignments. The description can be simplified if some syntactical transformations are applied. For this, first consider the following program fragment: new int a := 10; // Do something using a (part 1) a := a + 4; // Do something using a (part 2) The assignment is equivalent to introducing a new identifier a’: new int a := 10; // Do something using a (part 1) new int a’ := a + 4; // Do something using a’ (and replace all a by a’) (part 2) This strategy also works when blocks are taken into consideration: new int a := 10; if (...) { new int a := 5; a := a + 1; ... } else { new int a := 1; a := a + 1; ... } Note that not possible to employ a static renaming scheme in this case because the identifiers a in both subsequent blocks would then end up with identical names which leads to problems. We thus have to postulate that new identifiers are always chosen such that they do not overlap with previous identifiers and must, of course, also not overlap with identifiers which can be assigned by the user. This is possible if the set of identifier strings is denoted by Σ∗1 , we introduce a second set of strings Σ∗2 with Σ1 ∩ Σ2 = ∅; each time an identifier is overshaded, it is replaced in its complete scope with a new one in Σ∗2 that has not been used before. While this policy is hard to implement in practice,21 it does not 21 This is exactly the reason why mechanisms like call-by-name disappeared as a curiosity some thirty years ago. 66 5.3. Denotational semantics of cQPL present any problem in theory (even cases which require an infinite number of replacements are no problem because there are infinitely many unique identifiers). Most important, the approach is also valid when loops are introduced because these can be rewritten using a (possibly infinite) chain of appropriate if-then constructions as is done in the denotation of them. In conclusion, we do not need to take care for the obstacles introduced by overshading, but can simply ignore the problem in the denotation of assignments (ν denotes some identifier): Jν := ǫK(K, T, E) = (K, T, E ⊕ ν : EQN JǫK(K, T, E)) (5.47) where ǫ is some arbitrary arithmetic expression (which includes single identifiers); the denotation of this is obvious and will not be considered further. Note that this valuation function does not cover the case that the result of a quantum variable measurement is stored in a classical variable; this will be covered later when we describe the denotation of the measure funtion on Page 69. Allocating and destroying variables As we have noted in the previous remarks, we do not need to take the problem of overshading into account when dealing with assignments; this obviously also applies to allocations. We refrain from a more detailled description of this topic because everything necessary for the solution can be readily found in the literature, e.g., [Win93, Rey98, Mos90]. Note that allocating new variables does not present any problems for the boundedness of the Kraus aggregation because the number of qbits is limited by Q, an arbitrary, but finite quantity. Procedure handling Procedures in cQPL follow the standard scheme of classical languages for the non-quantum part. The denotation of such can therefore be directly taken from the usual textbooks [Rey98, Mos90, Win93], so we will not repeat this here. The interesting problem is given by recursive procedures, especially when they act on quantum parameters. For simplicity, we consider directly recursive procedures with quantum parameters; the case of indirect recursion is in princple identical, but necessitates more formal effort, so we skip it here. The solution is an adaption of the method presented in [Sel04b, Sections 5.5 and 6.5] for our purposes. Consider a procedure Y which depends on itself, e.g., Y = X(Y ) (5.48) If Y is given as a flow chart, this can be interpreted as shown in Figure 5.7: A “hole” in the representation of X is replaced by Y with another hole, this is again replaced by the same, ... proc rec: test:qbit { A if (cond) call rec(test’); else { ... } B } Formally, we can thus define an approximation relation given by Yi+1 = X(Yi ). 67 (5.49) Chapter 5. Formal denotational semantics Figure 5.7: Unwinding a recursive flow chart is done by placing the flow chart with a hole (given by the white rectangle) into the hole and repeating the process again and again. The limit of this sequence is given by a fixed point as explained in the text. where Yi are approximations of Y which get better with increasing i. Y0 = ⊥ is the crudest approximation which simply does not terminate. The solution of Equation 5.49 is another case for the fixed-point theorem. Once a solution for Y has been found, it can be applied to any (K, T, E) tuple to calculate the required state transformation. Note that although the procedure depends only on quantum variables, there nevertheless needs to be a termination condition. In the example, this condition is given by the if-then-else statement in which the recursive call is wrapped; since the procedure only takes a quantum parameter, the condition is either trivial or depends on a measurement of quantum states. In the first case, the condition depends only on classical variables which were allocated within the procedure, the condition could thus be determined at compile-time and the recursion unrolled because the recursion depth is already known. In the second case, we really need to unwind the procedure. 5.3.6.4 Quantum operations The quantum mechanically relevant operations of cQPL are : 68 5.3. Denotational semantics of cQPL ❏ Application of (unitary) operators. ❏ Calling procedures which manipulate quantum data. ❏ Sending and receiving quantum states. ❏ Measurements. ❏ Creating new and destroying existing quantum states, where the last operation is not explicitely, but only implicitly possible when quantum variables drop out of the present frame. Sending quantum variables makes them disappear from the scope so that they can not be accessed any more, but does not destroy respectively deallocate them. We will give formal denotations for these constructs in the remaining part of this section. Obviously, the description of communication is our foremost concern, so we elaborate this in most detail. Unitary operators Unitary operators induce isometries, so the corresponding Kraus set is obviously bounded and filfills the requirement for fixed points. Every unitary transformation can be expressed by a Kraus set with only one element. The semantics of a unitary transformation acting on the qbits q1 , . . . , qk is given by EX PJ(q1 ,...,qk ) *= UK(K, T, E) = (K ◦ {U }(#q1 ,...,#qk ) , T, E). (5.50) Note that the type system ensures that the variable/operator dimension on both sides of the expression matches as required, i.e., the classical variable has the proper size to hold all potential measurement outcomes. Measurements Measurements are described by the following semantic equation:   πa :PROJ (q,T ) EX PJa := measure qK(K, T, E) = K ◦ {M }#q , T, E ⊕ a −−−−−−−−−−→ range(a) . (5.51) Hereby, PROJ (q, T ) denotes the function to generate the set of projectors for the type of q which can be resolved from the typing context T . The required basis for the projection t (χ(q)) (which is actually nothing else than the basis for F2q in Dirac notation, also named the standard basis) is given by   (χ(q)) tq O  B= |in i ∀in ∈ {0, 1} . (5.52)   n=0 The corresponding Kraus elements are obvious. Accordingly, πa : PROJ (q, T ) denotes the probability distribution which connects the possible values of a with a probability distribution induced by the projectors. Since the measurement operators work on discrete states in a finite-dimensional Hilbert space, they are obviously bounded. Remark 5.3.9. Note that although we restrict measurements to projections onto the standard basis, projective measurements in arbitrary bases can be realised by applying appropriate unitary transformations prior to the measurement. 69 Chapter 5. Formal denotational semantics Sending and receiving qbits To consider sending quantum variables, we first split commands which send lists of quantum variables into a list of commands that send one quantum variable each: EX PJsend q1 , . . . , qn to moduleK(K, T, E) = EX PJsend q1 to module; send q2 to module; . . . ; send qn to moduleK(K, T, E). (5.53) The denotation of a single send command is given by  EX PJsend q to moduleK(K, T, E) = K ◦ {S}#q , T ⊖ q, E ⊖ q . (5.54) {S}#q is not a real physical map as other cp-maps are, but only a “placeholder” to note that qbits have been sent. This will become important when the semantics of parallel execution is considered further below. The interesting thing here is that the sent qbit is removed from the typing context and from the probabilistic environment. Thus, it is not visible any more in the remaining statements. Further access to it can be detected as erroneous at compile time; the typing context gives the formal basis for this. Receiving qbits is described in a similar manner. First, a receive operation with multiple quantum variables is split into a sequence of single-variable receive operations: EX PJreceive q1 : qtype1 , . . . , qn : qtypen from moduleK(K, T, E) = (5.55) EX PJreceive q1 : qtype1 from module; . . . ; receive qn : qtypen from moduleK(K, T, E). The denotation of a single-variable receive command is given by: EX PJreceive q : qtype from moduleK(K, T, E) =  K ◦ {R}#q , T ⊕ q : qtype, E ⊕ q : module . (5.56) Again, {R}#q is a placeholder required to denote the semantics of parallel composition. Parallel composition The compositionality principle of denotational semantics implies that the formal denotation of sending and receiving qbits must be independent of the conjugate action, i.e., sending must be independent from reception and reception must be independent from sending. This is fulfilled in the formalism of cQPL as we have shown on page 70. Nevertheless, the denotation of the communication as a whole requires (at last) two communicating partners. It needs thus make use of both of them to assign semantics to communication. Before we start with the formal details, we want to motivate why parallel composition is necessary at all. For this, consider the case of two processes where A sends a quantum bit (which we call a1 ) to B and, later on, receives a quantum bit from B (which we call a2 ). We must distinguish two different cases (note that for more difficult cases with an arbitrary number of send and receive statements, the conditions become more complicated because we need to account for more general schemes of mutual influence. These conditions will be developed stepwise in the following): ❏ The returned quantum bit was not identical with the sent one, a1 6= a2 . The inequality refers to the positions occupied by the qbits on the combined quantum heap, it is not related with the names of the qbits. ❏ B returned the quantum bit it got from A, a1 = a2 . 70 5.3. Denotational semantics of cQPL Consider the consequences for the semantics of parallel composition when the interaction of both processes is considered (both cases can be treated identically if only the separated semantics is taken into account): While in the first case (a1 6= a2 ), operations on a2 and a1 end up on different physical locations, the same operations must in the second case (a1 = a2 ) be applied to the same physical location. Therefore, we must be able to construct enough information from the composed systems such that it is possible to distinguish between both cases. Additionally, the distinctness of qbits influences denotational equivalence; many different orderings of the actions performed by A and B lead to the same semantics (the exact conditions for this will be formulated later on), but the class of possible reorderings is usually bigger if there was no interaction on the same physical location in communicating modules. Figure 5.8 presents a visualisation of this fact using a pseudo flow diagram. Figure 5.8: Flow graph for two communicating processes. A sends a qbit to B and B sends one to A; if there are no operations on the same physical locations, the shaded regions commute. This is obviously not the case if one or more identical quantum heap positions are modified in both paths: Since the shaded regions operate on the same physical qbit then, their actions need not necessarily be interchangeable because non-commuting operations may have been performed on the same physical location. There is no explicit statement in the syntax of cQPL which describes the combination of two processes. As explained in Chapter 2, communication is realised implicitly using modules which interact among each other. These modules must thus be given some semantical meaning; this will be developed in the following. Note that we restrict the description to two communicating processes which we call A and B (this might stand as an abbreviation for the omnipresent Alice and Bob) at first. Consider the following cQPL fragment: 71 Chapter 5. Formal denotational semantics module A { ... }; module B { ... }; Any valid cQPL code (except the definition of new modules) may be contained in the bodies of module A and module B; both entities thus constitute regular cQPL programs whose meaning is made up by the meanings of all statements they consist of. Thus, we can write PROGJAK and PROGJBK for the denotation of the code as if the modules were regular, uncommunicating cQPL programs. To consider the communicative interactions between both, we introduce the operation PROGJA||BK ≡ COMM(PROGJAK, PROGJBK)(K∅ , T∅ , E∅ ) (5.57) where (K∅ , T∅ , E∅ ) denotes the inital (K, T, E) tuple without content. The valuation function COMM is used to compute the combined denotation of A and B which we also call parallel execution. It must obviously only depend on the denotations JAK and JBK, i.e., (K, T, E) tuples. Since we do not want the semantics of communication to depend on the order in which the communicating partners are specified, the operator || must necessarily ! be commutative: PROGJA||BK = PROGJB||AK. This equivalence can easily be achieved: It suffices to define the operator in such a way that the modules are ordered lexicographically, then the order in which they are specified does not influence the denotation; the commutation relation is thus automatically fulfilled. PROGJAK is used to evaluate a semantic equation with empty initial context; this is obviously the case when the top-level of a program is considered (as is the case for modules) where no definitions can have been made yet. Thus, PROGJAK ≡ EX PJAK(K∅ , T∅ , E∅ ). Consider the evaluation of JAK and JBK which both do as usual depend on (K, T, E) tuples. COMM results in the creation of a valuation function which depends on the tensor product of these tuples, i.e., VALJAK(K0 , T0 , E0 ) VALJBK(K1 , T1 , E1 )  ⇒ COMM(VALJAK, VALJBK) (K, T, E) . | {z } (5.58) (K0 ⊗ K1 , T0 ⊗ T1 , E0 ⊗ E1 ) Both representations convey the same information. This is immediately obvious if the expressions are written as direct λ-abstractions as defined in Section 5.3.6.1 together with an appropriate “untensoring” function which separates the tensor product of the combined (K, T, E) tuple into two components. We will not show this explicitely to avoid introducing even more symbols. Note that termination of A and B alone does not imply termination of PROGJA||BK.22 This can be seen by considering the following simple program: 22 Here, the question arises how termination should be defined for communicating processes if only one part (A) of a total system is considered. We could, for instance, define a demonic partner which always supplies the required number of qbits the process needs and absorbs any number of qbits sent, but this will not necessary lead to termination of A. The exact solution of the problem depends on the context in which it is considered; we will not deal with it any further here, but define a process as terminating if there exists a demonic partner that behaves in such a way that the process terminates. 72 5.3. Denotational semantics of cQPL module A { new qbit q1; send q1 to B; }; module B { receive a1:qbit from A; receive a2:qbit from A; }; While both processes represent valid cQPL programs, they will obviously result in some non-terminating program (which should thus denote ⊥) because B will wait forever for the second qbit (a2 ) to be sent. Thus, COMM(x, y) = ⊥ is possible although both x 6= ⊥ and y 6= ⊥. Extensions of the semantical components (K, T, E) to the multi-party case were defined in Section 5.3.3; they provide the basis for the denotation of parallel execution which will be developed stepwise by considering bipartite systems without communication, bipartite systems with single send/receive pairs, bipartite systems with arbitrary send/receive statements and finally, arbitrary multipartite systems. Thus, let A and B be two programs which do not use any communication. The semantics of their parallel execution can be readily denoted: PROGJAK = (K0 , T0 , E0 ), PROGJBK = (K1 , T1 , E1 ) ⇒ (5.59) PROGJA||BK = (K0 ⊗ K1 , T0 ⊗ T1 , E0 ⊗ E1 ). Note that the following equivalences hold if Ai , Bi are parts of a program which do not contain any send/receive operations (we omit the required EX Ps in the second line to simplify the notation): EX PJA1 ||B1 ; A2 ||B2 K = EX PJA1 ; A2 ||B1 ; B2 K {z } | {z } | (COMM (JA1 K, JB1 K) ; COMM (JA2 K, JB2 K)) = COMM(JA1 ; A2 K, JB1 ; B2 K). (5.60) (5.61) This ensures that it does not make any difference if we consider the sequential combination of two parallel executions or the parallel execution of two sequential combinations as shown in the formula; we will make use of this later on. The situation gets more complicated if a single send/receive pair is allowed, i.e., if a single quantum variable can be transferred from A to B (the case B to A is nearly identical, so we restrict ourselfs to the first case). Let {S} and {R} denote the Kraus pseudo-operations for sending and receiving. To see how these operations influence the possible equivalent compositions of a program, observe the following two schematic Kraus aggregations: ΛA = {A1 }, . . . , {An }, {S}, {An+1}, . . . , {Am } ΛB = {B1 }, . . . , {Bn′ }, {R}, {Bn′+1 }, . . . , {Bm′ }. (5.62) (5.63) To consider how these aggregations can be rearranged, we define the following function: ( 1 if A and B are operations on disjoint qbits D(A, B) = . (5.64) 0 otherwise 73 Chapter 5. Formal denotational semantics Remark 5.3.10. The same effect could have been achieved with the standard commutator in principle, but we want the notation to emphasise additionally that not the simultaneous diagonalisability, but the fact that the operations work on disjoint bases is responsible for the exchangeability. Additionally, using the standard commutator to show equivalence between permutations of communicating systems would have interferred with the standard permutation rules that would then have become more complicated. Since the two processes are necessarily totally uncorrelated before the transmission takes place, the parts given by the sub-aggregations Λ1A = {A1 }, . . . , {An } Λ1B (5.65) = {B1 }, . . . , {Bn′ } (5.66) Λ2A = {An+1 }, . . . , {Am } (5.67) can be composed as in Eqn. 5.59 because D(Λ1A , Λ1B ) = 1. Since the parts after sending respectively receiving the quantum variable are uncorrelated as well (they both work on disjoint sets of qbits; this property remains valid in the combined semantics because the combination of the probabilistic environments creates an appropriate combined quantum heap as described in Section 5.3.3), the sub-aggregations Λ2B = {Bn′ +1 }, . . . , {Bm′ } (5.68) can likewise be parallel composed as in Eqn. 5.59. The only thing which needs to be taken into account is that references to the position of the received qbit must be replaced by the position of the qbit on the combined quantum heap in the combined probabilistic environment. This can formally be achieved by the following function (here, S denotes a send and R a receive statement): ′ ⊗ ⊗ SR(COMM(JSK, JRK))(K ⊗ , T ⊗ , E ⊗ ) = (K ⊗ , T ⊗ , E ⊗ ). (5.69) ⊗ Here, K , T , E denotes the usual (K, T, E) parameter tuple with the additional requirement that it must have the structure which is gained by combining two (K, T, E) tuples with a tensor product as given in Section 5.3.3. SR itself is responsible for two things: On the one hand, it applies the effect of COMM(JSK, JRK) to the parameter tuple, and on the other hand, it replaces the portion of E which contains the information about the received quantum variable so that it now points to the position of the sent quantum variable on the combined quantum heap; the resulting probabilistic environment is denoted by E ′ . This is obviously possible since SR does have access to the information provided both by send and receive. To illustrate the effect of SR, consider the following example: Let the sent quantum variable be denoted by q and the received one by r. The names of these variables will have thus been changed to Lc (1)q and Lc (2)r. The receiving module does not have any information about the received quantum variable except its type and its local name; the position on the combined quantum heap is unknown. This can now be changed by SR; for that, it inserts the position of Lc (1)q on the combined quantum heap into the combined probabilistic environment such that Lc (2)r points to it. Nothing more is necessary to identify the received quantum variable with the sent one. Note that RS defines the analogous function for the receive/send case. This is necessary when bidirectional communication between processes is considered. Except the inverted direction of data flow, the function is completely equivalent to SR. Thus, the semantics of parallel execution for processes with a single send/receive operation can be reformulated as PROGJA||BK = PROGJA1 ||B1 ; S||R; A2 ||B2 K 74 (5.70) 5.3. Denotational semantics of cQPL where JAi K and JBi K denote the parts of the program which induce the operations described by ΛiA,B as given by Eqns. 5.65–5.68. It is already known how to compute the semantics of JA1 ||B1 K. To compute the denotation of the complete statement, we first consider how to include the send/receive pair into the description: PROGJA1 ||B1 ; S||RK = SR(COMM(JSK, JRK)) ⊗ ⊗ (COMM(PROGJA1 K, PROGJB1 K)(K∅ , T∅⊗ , E∅ )). (5.71) Note that although PROG with argument JA1 K, JB1 K appears both on the left and right hand side of this equation, it is not truly recursive, but can here be seen as just a breakdown into simpler cases. A general recursive formula will be derived in the following. By using Eqn. 5.70, we can now give the denotation of the complete parallel composition as defined in Eqn. 5.61; for this, we define the righthand side of Eqn. 5.71 to be denoted by ξ to increase clarity: PROGJA1 ||B1 ; S||R; A2 ||B2 K = COMM(PROGJA2 K, PROGJB2 K)(ξ). (5.72) Note that establishing the semantics of a given description is one thing we need to do; finding equivalent descriptions for a given communication is another task. For this, we need to consider all rearrangements that preserve semantics. This allows us to decide if two communicating programs are identical because we can check if they can be brought to the same form. For the case of a single send/receive pair, the operations can be shifted in the Kraus aggregation if certain conditions hold: ❏ The send operation can be postponed to the end of the aggregation (at least in the case where no more send/receive operations take place) or brought forward by k positions in the Kraus aggregation if D({An−l }, S) = 1 ∀l = 0, . . . , k − 1. ❏ The receive operation can be brought forward to the first position of the Kraus aggregation (again, this relies on the fact that only a single send/receive operations takes place) or postponed by k positions if D({Bn+1+l }, R) = 1 ∀l = 0, . . . , k − 1. Performing shifts characterised by these operations together with reorderings as given by Eqn. 5.26 generates the equivalence class of all programs with a single send/receive pair that posses the same semantics. The next step is to include arbitrary send/receive operations into the communication between A and B. As in the case of a single send/receive combination, the send/receive statements act as synchronisation points; the denotation needs thus be aligned along them. The problem to solve is now given by PROGJA1 ||B1 ; S1 ||R1 ; A2 ||B2 ; S3 ||R3 ; · · · ; Sn−1 ||Rn−1 ; An ||Bn K. (5.73) First, we will establish the semantics for the given ordering; semantics-preserving permutations will be considered afterwards. Note that we only consider the denotation of data flow in one direction for simplicity; the semantics of the case R||S which may appear mixed with the other form is gained by replacing SR with RS at the appropriate places). To find a solution for this equation, define A′ ||B ′ ≡ A2 ||B2 ; Sn ||Rn ; · · · ; Sn−1 ||Rn−1 ; An ||Bn . (5.74) Eqn. 5.73 then has the form PROGJA1 ||B1 ; S1 ||R1 ; A′ ||B ′ K. 75 (5.75) Chapter 5. Formal denotational semantics According to Eqn. 5.72, the solution of Eqn. 5.75 is given by EX PJA′ ||B ′ K(SR(COMM(JS1 K, JR1 K)) ⊗ ⊗ (COMM(PROGJA1 K, PROGJB1 K))(K∅ , T∅⊗ , E∅ )). (5.76) By introducing ξ1 as abbreviation for the part following EX PJA′ ||B ′ K and expanding A′ ||B ′ to A2 ||B2 ; S2 ||R2 ; A′′ ||B ′′ , the formula reads as EX PJA2 ||B2 ; S2 ||R2 ; A′′ ||B ′′ K(ξ1 ). (5.77) This type of equation is already well-known; it can be further resolved to EX PJA′′ ||B ′′ K(SR(COMM(JS2 K, JR2 K)) (COMM(PROGJA2 K, PROGJB2 K))(ξ1 )). (5.78) By recursively defining ⊗ ⊗ ξ0 = (K⊥ , T⊥⊗ , E⊥ ) (5.79) ξi = (SR(COMM(JSi K, JRi K))(COMM(PROGJAi K, PROGJBi K))(ξi−1 )) (5.80) we see that the final solution of Eqn. 5.73 is given by EX PJAn ||Bn K(ξn ) (5.81) where ξn needs to be expanded as defined above. The whole process thus leads to a recursive valuation function given by EX PJA||B; S||R; C||DK(K, T, E) = EX PJC||DK(SR(COMM(JSK, JRK))(COMM(EX PJAK, EX PJBK))(K, T, E) (5.82) whose solution can be found by resolving the recursion in the usual way. Now, consider which alternative orderings of the Kraus aggregations preserve semantics in the multi send/receive and receive/send case. For this, observe the following symbolic representation of two Kraus aggregations (to save some notational effort and to increase lucidity, we represent the Kraus sets which are not concerned with communication by boxes. Although the boxes have identical widths, they do not need to contain the same number of Kraus sets): A1 S1A B1 R1B A2 R1A A3 B2 S1B B3 (5.83) . (5.84) As in the case of a single send/receive pair, we know that the blocks A1 and B1 (considering again the compatible displacements of S1A and R1B ) can be arbitrarily combined because they work on disjoint subsets of the quantum heap; the same holds for A2 , B2 and A3 , B3 . In addition to the previously given rules, the following restrictions hold for shifting send and receive operations in multi send/receive scenarios: ❏ Two consecutive send statements can only be interchanged if the corresponding receive statements are interchanged, and vice versa. 76 5.3. Denotational semantics of cQPL ❏ If D(Ai , Bi+1 ) = D(Bi , Ai+1 ) = 1 the blocks Ai , Ai+1 and Bi , Bi+1 can be taken like single blocks when possible orderings according to Eqn. 5.26 are considered. Note that the validity of this condition can only be detected if the combined quantum heap is considered. If it holds, then the sender does nothing to the sent and the receive does nothing to the received quantum bit; thus, the statements contained in the blocks can be executed in arbitrary order. Two systems are identical if their denotations can be unified by performing rearrangements according to these rules. Another possibility that needs to be considered is the case where the number of send/receive pairs in the parallel processes does not match. As we have described before, this leads to a non-terminating process because either the sending process wants to ship a quantum variable, but cannot deliver it and thus blocks or the receiver wants to get a variable, but blocks indefinitely because there is no sender for one. The semantics should thus be given by ⊥ for both cases. For the case of two parties (where we do not need to consider the case that a balanced number of send/receive statements is present, but the distribution among the parties is unmatched), this is covered by the following definition: EX PJA||BK = ⊥ if R(JAK) 6= S(JAK) ∨ S(JAK) 6= R(JBK) (5.85) where S denotes the number of send and R the number of receive statements. The denotations JAK and JBK are supposed to be those derived for the parallel composition. The extension to higher-dimensional systems is obvious, so we omit it here. Finally, we can describe the semantics for multi-party communication with arbitrary send/receive statements which is the most general case and therefore includes everything considered before. The problem which needs to be evaluated is given by PROGJA1 ||A2 || · · · ||An K, (5.86) where (note the different notation compared to before!) Ai represents all statements given in module i; this may contain any number of send/receive statements that are now denoted by Ski and Rki where i is the receiver for S and destination for R and k the sequence number within the other send/receive statements of the communication channel the statement works in (if we consider for example three parties A1 ,A2 and A3 , then there are the channels A1 –A2 , A1 –A3 , A2 –A3 ). The semantic context the evaluation is based on is given by the tensor product of the semantic contexts of the subsystems, i.e., (K ⊗ , T ⊗ , E ⊗ ) = (K1 ⊗ · · · ⊗ Kn , T1 ⊗ · · · ⊗ Tn , E1 ⊗ · · · ⊗ En ) and equivalent for the initial context. The valuation function COMM given by Eqn. 5.57 can be extended from the two-party case to the n-party case without any problems, we denote this by COMM⊗n . Since communication still takes place between two partners (although there are now many choices for such two-partner subsystems), there is always a pair of corresponding send/receive respectively receive/send statements. To take the n-dimensional semantical context into account, the definition of SR (the version for two parties is given in Eqn. 5.69) needs to be adjusted as follows when sending a quantum variable from system m to system m′ is to be covered: ′ ′ ′ SRm,m (COMM⊗n (JS m K, JRm K))(K ⊗ , T ⊗, E ⊗ ) = (K ⊗ , T ⊗ , E ⊗ ). (5.87) SR is again responsible to apply the effect of COMM⊗n (JSK, JRK) to the parameter tuple; note that in this case, do-nothing-operations 1 are used for all systems except m and 77 Chapter 5. Formal denotational semantics m′ because these are not concerned with the communication. This is to ensure that the dimensionality matches. Additionally, SR replaces the portion of E which contains the information about the received quantum variable so that it now points to the position of the sent quantum variable on the combined quantum heap. This is identical to the effect in the simplified case for two systems. If in this case the sent quantum variable is denoted by q in system m and the received one by r in system m′ , then the names of these variables will have been changed to Lc (m)q and Lc (m′ )r. SR simply inserts the position of Lc (m)q on the combined quantum heap into the combined probabilistic environment such that Lc (m′ )r points to it. With this, we can generalise the recursive definition of Eqn. 5.82 to the case with an arbitrary number of participants: ′ EX PJA1 || · · · ||An ; S m ||Rm ; B1 || · · · ||Bn K(K, T, E) = ′ ′ EX PJB1 || · · · ||Bn K(SRm,m (COMM⊗n (JS m K, JRm K)) (COMM(EX PJA1 K, . . . , EX PJAn K))(K, T, E). (5.88) Finally, this is the solution to the most general case of communication which can be expressed in cQPL. 5.3.7 Explicit transformations of density matrices Although the abstract view on quantum operations which we have presented in this work is quite suitable for reasoning about general formal properties of quantum systems, the demands of practical work are usually of a different nature: Here, one is interested in the calculation of explicit states and probabilities which determine a system and allow predictions about its past, present and future behaviour. This goal is usually achieved by specifying the initial state of the system, subjecting this to diverse transformations and measuring the required properties which give rise to the desired explicit probability distributions. The semantics of a cQPL program can be used to generate exactly this information: The abstract transformation given by the semantical denotation of a program is a function which maps the density matrix of the input state to the density matrix of the output state. Obviously, the election of a certain density matrix as initial state implies loss of generality, but in turn allows to infer real-world information, not just abstract properties of generalised systems. 5.3.8 The type system Typing judgements make statements about the connection between expressions and their types; cf., e.g.,[Car97] for an introduction. For our purposes, the following two building blocks are necessary to describe the properties of cQPL: E ⊢ e : T ⇔ Expression e has type T in E E ⊢ F ⇔ F is well-typed in E. (5.89) (5.90) Proper typing is necessary to eliminate certain runtime errors by applying appropriate compile time checks (cf. Section 5.4). Additionally, it is the key to showing that our formalism ensures that quantum bits can – especially in communicating systems – be only manipulated by one party at a time (a similar line of reasoning, albeit for a quite different formalism, was used in [GN05]). The typing context provided by T in the (K, T, E) tuple is the basis for this. 78 5.3. Denotational semantics of cQPL Properties of the type system are customary expressed with judgements of the following general form: P1 · · · Pn (5.91) C where the Pi are called the premises and C the conclusion. If all premises are true, the conclusion is fulfilled. Such judgements can be used to deduce the type of a given composite expression in an automated, formal manner. The following elementary typing judgements hold for cQPL:23 Scalars new t n := v C1 ; C2 Conditionals Arithmetic i∈N (analogous for bits, floats etc.) E ⊢ i : int E⊢v:t E⊢n:t E ⊢ C1 E ⊢ C2 (Composition preserves well-typedness) E ⊢ (C1 ; C2 ) : void E ⊢ v1 : t1 ∧ E ⊢ v2 : t2 c(t1 ) = c(t2 ) = 1 (op ∈ { <, >, =, . . . }) E ⊢ op(v1 , v2 ) : bit E ⊢ v1 : t1 ∧ E ⊢ v2 : t2 c(t1 ) = c(t2 ) = 1 (op ∈ { +, −, ·, :, . . . }) E ⊢ op(v1 , v2 ) : max(t1 , t2 ) (5.92) (5.93) (5.94) (5.95) (5.96) Again, we do not consider division by zero or overflows; up- and downcasting of data types and procedure handling is also skipped. An equivalence relation between two types was given by Eqn. 5.11 in Section 5.3.1.1; this can be immediately carried forward to typing judgements: E ⊢ x : σ1 . (5.97) σ1 ∼ = σ2 ⇒ E ⊢ x : σ2 Note that we do not consider these equivalences explicitely in the following to simplify the notation, all statements are automatically supposed to hold for all equivalent types as well without further noting this. Also note that subtyping (i.e., considering one type as a subtype of another and allowing appropriate conversions) is not explicitely taken into account because this is also a problem which is specific to the classical data types of cQPL and thus not of too much interest here. 5.3.8.1 Quantum variable tuples Tupling of variables must make sure that no component appears more than once in the list because this would allow to write programs which violate the no-cloning principle and thus lead to runtime errors. Formally, the requirement is given by24 ∀k = 1, . . . , n : q(σk ) = 1 ∧ #xk ∩ (#x1 ∪ · · · ∪ #xk−1 ∪ #xk+1 ∪ · · · ∪ #xn ) = ∅ P . E ⊢ (x1 , . . . , xn ) : i σi (5.98) The meaning of this is as follows: E ⊢ xi : σi formulates the requirement that all variables are well-defined. The condition ∀k = 1, . . . , n : q(σk ) = 1 requires that all components are E ⊢ x1 : σ1 · · · E ⊢ xn : σn 23 Remember: c(x) = 1 ensures that the data type of x is purely classical. q(k) = 1 ensures that the data type does not contain any classical components, #q denotes the positions in the quantum heap occupied by a quantum variable. 24 Remember: 79 Chapter 5. Formal denotational semantics quantum data types; the tuple thus has no classical components which is justified by our abdication of mixed types. The condition #xk ∩(#x1 ∪· · ·∪#xk−1 ∪#xk+1 ∪· · ·∪#xn ) = ∅ is a formal version of the requirement that no variable may appear more than once in the list of variables. The conclusion which can be drawn from these premises is that (x1 , . . . , xn ) is a proper quantum variable tuple, i.e., a well-typed expression in the current environment. 5.3.8.2 Application of operators The application of unitary operators requires that the dimension of the operator matches the dimension of the variable or variables it is applied to. Formally, this is written as E ⊢ (x1 , . . . , xn ) : q tq (q) = dim(U ) ∧ U ∈ U (n) . ∀k : E ⊢ xk : qk ∧ ((x1 , . . . , xn )*=U ) : void (5.99) The statement additionally ensures that the typing of the qbits involved is not influenced by the operator application. Note that we do not explicitely specify a formal condition for the unitarity of an operator U given in terms of a function of its components. The membership in U (n) is sufficient for our purposes. The distinctness of the destination variables for the transformation is already ensured by the tupling requirements given above, so it does not need to be checked explicitely. 5.3.8.3 If conditionals and while loops The condition for this construction must have type bit, whereas both possible paths must be well-typed: E ⊢ c : bit E ⊢P ∧E ⊢Q . (5.100) E ⊢ (if c then P else Q) : void A similar condition holds for the while loop: E ⊢ c : bit E⊢P . E ⊢ (while(c) do P ) : void 5.3.8.4 (5.101) Measurements The classical data type used to store the result of a measurement must have the same number of bits as there are qbits in the quantum variable. This is represented by the condition E ⊢ a : σ1 , c(σ1 ) = 1 ∧ E ⊢ b : σ2 , q(σ2 ) = 1 tq (σ2 ) = tc (σ1 ) E ⊢ (a := measure b) : void 5.3.8.5 (5.102) Communication Sending qbits When qbits are sent, the type system has to make sure that no qbit is sent twice because this would result in the same effects as if operators could be applied to multiple copies of the same qbit; using a tuple to combine the sent qbits automatically solves this problem: E ⊢ (x1 , . . . , xn ) : σ, q(σ) = 1 . (5.103) E ⊢ (send q1 , . . . , qn ):void Note that the type system is not concerned with the actual receiver of the qbits; this information is only required for the denotation of the expression, but not to ensure welltypedness. 80 5.4. Avoidance of runtime errors Receiving qbits When qbits are received, the type system must make sure that the destination variables are not yet defined in the receiver’s context, i.e., they must not be well-typed expressions. Afterwards, the variables used in the receive statement are well-defined in the typing context and have the data type required by the statement. This can be formally written as ∀i : ¬(E ⊢ xi ), q(σi ) = 1 . (5.104) E ⊢ (receive x1 : σ1 , . . . , xn : σn ):void ∧ ∀i : E ⊢ xi : σi As in the case of sending, it is not interesting for the type system from which communication partner the qbits originate. 5.4 Avoidance of runtime errors QPL is a functional language with a static type system which guarantees the absence of runtime errors (note that functionality is subject to a precise definition of the term; it is certain that classical languages need to have additional properties – most important higherorder functions – to be called fully functional. But this is not really relevant from a physicist’s point of view, as we have discussed before). It is very desirable that runtime errors can be avoided as far as in principle possible, from a physicists point of view, it does not matter how this is achieved. This desire was brought forward into cQPL and manifests itself in two points: Cloning is (as in QPL) prevented already at the syntactical level, and communication does not allow different processes to access qbits concurrently. 5.4.1 Unique ownership of qbits Observation 5.4.1. No part of the quantum heap is accessible to two or more parties at the same time during parallel execution of arbitrary cQPL programs. Rationale: When a module is considered stand-alone, it is obvious that all qbits present in the system are owned by one party. Uniqueness of the ownership is guaranteed by the quantum part of the probabilistic environment which ensures (as described in Section 5.3.1) that it is impossible for two or more names to refer to overlapping sets of qbits. Parallel composition of systems is performed by always considering pairs of send/receive statements; while sending removes the sent qbit from the typing context of the originating system, receiving adds it to the typing context of the destination. Since both commands are always considered in pairs and denoted atomically,25 a quantum variable may not be in two typing contexts at the same time. Access to quantum variables is only possible for a user when the variable is present in his typing context, this ensures (together with the fact that quantum heaps of communicating systems cannot overlap by virtue of Definition 5.3.3) that it is impossible for two or more modules to access identical qbits at a time. It is possible to prove this statement formally based on the observations in Section 5.3.8. Since this is on the one hand a general problem of semantics theory and on the other hand burdened with many technical difficulties, we omit a precise proof here, but refer to 25 This means that nothing can happen in between sending and receiving the quantum bit. 81 Summary We have given the denotational semantics of all language components of cQPL excluding some standard cases that are readily available in the literature. Together with the definition of the type system (by intentional omission of all technical details), this completes the effort of assigning a precise meaning to quantum programs written in cQPL. Chapter 5. Formal denotational semantics [WF94] where the exact details can be found. [GN05] is one source where the proofs of the aforementioned reference have been adapted to a quantum system which fulfils exactly the same properties as ours (basically, not too much except notational details needs to be changed). X 5.4.2 Prevention of cloning and unphysical situations One of the fundamental consequences of quantum mechanics is that it is impossible to define a unitary operator that can duplicate arbitrary quantum states with perfect fidelity; a straightforward calculation shown in nearly every text on quantum mechanics (e.g., [NC00, Pre99]) proves this. Obviously, quantum programming languages must make sure that cloning is forbidden because otherwise, processes contrary to the laws of physics could be simulated. Since most other approaches to quantum programming (e.g., [Öme98, BSC01, Kni96, SP00]) require the possibility to address quantum bits via references or pointers, they cannot ensure at compile-time that two distinct variables do not share the same quantum bit; they must provide appropriate checks at runtime which ensure this condition. Aside from efficiency considerations, this is unsatisfying because especially for long-running programs, termination with an error which was caused by a programming mistake is undesirable. The static typing of QPL allows together with some syntactical checks to ensure that once a program was approved to be correct by the static syntactical and semantical analysis of the compiler, no runtime errors caused by unphysical cloning of quantum states can happen. A similar statement can be observed for cQPL: Observation 5.4.2. cQPL programs which do not use communication primitives can be guaranteed to execute without runtime errors if the syntactic and semantic analysis deems them correct. Rationale: No quantum bit can be referred to by multiple identifiers in cQPL, as was shown in the previous section. Thus, the distinctness of the quantum components of a list of identifiers (which is used to specify the list of qbits an operator works on or given as parameter to a procedure) can be guaranteed by ensuring that the same identifier does not appear multiple times in the list. Therefore, the same line of reasoning for the impossibility of cloning or generating unphysical situations as in [Sel04b, Section 4.8] applies. X Remark 5.4.1. Note that non-termination is something different than a runtime error. Remark 5.4.2. Note that static typing can also prevent the possibility for some runtime errors which originate from the classical parts of the language; this is well-known in programming language theory (cf., e.g., Refs. [RP02, WM95, App04] for details) so that we will not dwell into this any further here. 5.4.3 Unavoidable non-termination conditions Albeit cQPL tries to prevent runtime errors as good as possible, the introduction of communication opens the possibility of writing programs that cannot be checked at compile time if they will terminate at runtime although nothing would hinder the separate modules to terminate. Nevertheless, by restricting the code to a certain subset of cQPL,26 it is still possible to produce programs which will execute guaranteed without termination problems and without runtime errors. Note that non-termination is not considered as a runtime error. 26 Which can, in principle, solve all problems that might arise in quantum programming, but is not a very practical. 82 5.4. Avoidance of runtime errors If a program of the form while (1) do skip is provided, then executing the skip command forever (and thus doing nothing forever) is exactly the intention of the program and therefore the correct behaviour which should be reflected by the denotation. In Section 5.3.6.4, we have already considered an example of a non-terminating program. The culprit here was the different number of sent versus received qbits, but since the number of sent and received qbits is fixed at compile time on both sides, this error can obviously be detected by the semantic analysis; the program can be rejected. Unfortunately, this possibility is not always the case because the exact number of how many qbits will be sent and how many will be received can not be decided in general. Consider the following example: module A { new qword nq; nq *= H(8); new word n := measure nq; while (n >= 0) { new qbit q; send q to B; n := n-1; } }; module B { receive q1:qbit, q2;qbit, q3:qbit; }; Since n in module A may contain (with equal probability) any value in [0, 28 − 1], the number of sent qbits cannot be determined with certainty, but is governed by the probability distribution of n. It may be the case that the program terminates (namely, if exactly three qbits are sent by A), but it may also be the case that less or more than three qbits are sent. This results in either a blocking process A which cannot find a receiver for the qbits it wants to transmit, or in a blocking process B which is not satisfied with a proper number of qbits and blocks to wait for the missing ones. Fortunately, there are only three commands in cQPL that allow to execute a sequence of communication commands for which it is not possible to determine at runtime how many there will be, so we can make the following observation: Observation 5.4.3. cQPL programs using communication can be guaranteed to execute without runtime errors if the syntactic and semantic analysis deems them correct and the following possibilities of the language are not used: ❏ While-loops with a termination condition that contains a probabilistic variable. ❏ If-conditionals that are based on a probabilistic variable. ❏ Recursive procedures whose recursion depth cannot be determined at compile time. Rationale: All send and receive statements which are given as a sequence of commands (which may include the use of blocks) can be counted at compile time; their order is obviously also known. If the if-statement is used with a condition that can be computed at compile time, one path can be eliminated. Thus, the statement is nothing else than a regular contribution to the list of statements. While-loops with a compile-time computable number 83 Chapter 5. Formal denotational semantics of iterations can be replaced by inlining the loop body the appropriate number of times, so they also become only a regular contribution to a sequence of commands. If the recursion depth of a procedure can be calculated, it be converted to an iteration where the number of steps and thus the number of communication commands are known. Therefore, it is also just a regular contribution to a sequence of commands. X Remark 5.4.3. Note that the checks required to determine the number of loop iterations etc. at compile-time are based on well-understood analysis techniques in computer science; nevertheless, we did not actually implement these checks in the cQPL compiler because it is nothing else than a routine task with little benefit and no gain of any valuable insight, but just a technical problem. 84 I ain’t no physicist, but I know what matters. Popeye the sailor 6 6.1 Prospects Outlook The field of quantum programming languages is – as everything connected with quantum information – still a young one, and many things that are standard in classical programming languages still need to be adapted for these. Some ideas which were tried to be realised during the work on this thesis, but did not reach fruition are: ❏ Integration of higher-order functions. Everything we tried ended up in requiring closures for an implementation, but this is (to our knowledge) impossible to achieve because of the no-cloning theorem. Having them would be quite desirable for many applications. ❏ The ability to describe the complete loss of quantum bits caused by imperfect channels or eavesdroppers. This is obviously hard to integrate into a programming language,1 but should be possible by heading for a protocol specification variant of cQPL. ❏ Consideration of more general eavesdropping models where the strategy needs not be fixed, but can be one of multiple independent alternatives. The work provided in [dH02] would possibly provide a suitable basis with demonic choices. ❏ Most texts about quantum programming languages extensively use categories to describe the underlying structures. We found that this does not really add any substantial points, but merely more notation and nomenclature, so we did not follow this style although some effort was made in the beginning to become familiar with the field. Nevertheless, the material provided here could serve as starting point for the following possible extensions: ❏ Quantum instead of classical control, i.e., allowing conditions to be based on quantum and not classical logic. It would be possible to simulate this with QCL, but the benefit is questionable because no known quantum algorithm makes use of such a feature. ❏ The method presented here could provide a basis to formulate quantum process algebras as, e.g., presented in [GN05, AM05]. ❏ An extension from discrete to continuous systems would allow the simulation of general quantum systems and could thus be useful for a much wider range of quantum information applications. 1 Just think about the situation that would arise if variables in classical programming languages could randomly disappear. . . 85 Chapter 6. Prospects ❏ Faulty hardware models could be integrated at the simulation layer, but this would presumably be very challenging at the semantic level. Initially, it was planned to also investigate the possibility of integrating the semantic framework into a theorem prover which could possibly facilitate automated analysis techniques for quantum protocols. Some preliminary experiments were performed by describing the BB84 protocol in a classical protocol simulator, but this has only shown that the gap between the requirements for such an automatisation and what is currently available is still very wide for all approaches to quantum programming. 6.2 Latest developments After this thesis was finished, another QPL compiler written by D. Williams was presented in a joint work by Nagarajan, Papanikolaou and Williams [NPW05]. Since both efforts work on closely related fields, it seems apt to sketch similarities and differences of them (to distinguish it from our implementation, we call William’s compiler sqrQPL2 in the following): ❏ Both compilers use the quantum computer model defined by Knill [Kni96] as basic architecture. ❏ sqrQPL provides an own quantum simulator which is called sequential quantum random access machine. Code generated for this architecture resembles machine language quite closely. ❏ sqrQPL provides support for a smaller subset of QPL than cQPL. ❏ sqrQPL has the ability to automatically decompose arbitrary unitary matrices into a set of standard gates. As a result (and in addition to theoretical elegance) of this, the simulator needs only provide support for very few different elementary gates. ❏ The semantics of sqrQPL is fully covered by the one given for QPL, while cQPL needs to provide additional semantics for the added features. ❏ cQPL already includes support for communication and concurrency, whereas work to bring these abilities to sqrQPL will be started in the future according to [NPW05]. It would be interesting (and should be possible without too much effort) to provide an SQRAM-backend for cQPL; since Ref. [NPW05] states that support for communication and concurrency is (at least in preliminary form) already present in their simulator, no major obstacle does seem to exist to hinder such an endeavour. In summary (and, obviously, seen from the author’s subjective point of view) sqrQPL is a straight implementation of QPL where the ability to decompose complicated gates into a set of simpler ones is the essential feature. The focus of cQPL is mainly on the semantics of (quantum) communication; although the cQPL compiler seems (at the time of writing) to provide a bigger and more versatile language core than sqrQPL, it is more or less a by-product of the actual work. 2 Because their compiler targets a virtual machine which is termed sequential quantum random access machine. 86 . . . und Lasse sagte, die Sprache der Jungen sei sowieso die einzig wahre. Astrid Lindgren, Wir Kinder aus Bullerbü A List of symbols The following presents a list of symbols used in this work. Note that the meanings given here are not necessarily the only ones with which they were used. A . . . . . . . . . . . Observable algebra #number . . . Unique node id A . . . . . . . . . . . Finite ordered set #string . . . . . Position(s) occupied by quantum variable variable on the quantum heap JK . . . . . . . . . . . Separate syntax and semantics || . . . . . . . . . . . . Parallel composition $ . . . . . . . . . . . . Superoperator on B(H) F . . . . . . . . . . . Least upper bound A#b . . . . . . . . The bth element of the ordered set A B(H) . . . . . . . . Set of all bounded operators on Hilbert space H COMM . . . . Valuation function for parallel execution C(X) . . . . . . . . Complex-valued functions X →C c(σ) . . . . . . . . . Check if a given data type is purely classical card(X) . . . . . Cardinality of X ⊥ . . . . . . . . . . . Least element of a partial order ∼ = . . . . . . . . . . . Equivalence, reflexive and transitive ⊑ . . . . . . . . . . . Binary partial order (K∅ , T∅ , E∅ ) Initial (K, T, E) tuple Γ . . . . . . . . . . . List of Kraus sets Λ . . . . . . . . . . . Completely positive map Dn . . . . . . . . . . Set of all density operators of dimension n S(k) . . . . . . . . Set of all decompositions of k ∈ N D(A, B) . . . . . Determine if A and B operate on disjoint qbits DO . . . . . . . . . Valuation function for dyadic operators E . . . . . . . . . . . Environment χ(v) . . . . . . . . Type associated with a variable v ω . . . . . . . . . . . Increasing chain of natural numbers ϕ . . . . . . . . . . . A permutation π : B . . . . . . . . Probability distribution obtained by applying a projective measurement defined by the basis B ̺ . . . . . . . . . . . . A density operator E ⊢ x : T . . . . x has type T is valid in environment E E ⊢ F . . . . . . . F is well-typed in environment E E(A) . . . . . . . . Effects of A Σ . . . . . . . . . . . State in form of a (K, T, E) tuple σ . . . . . . . . . . . Signature for types EQN . . . . . . . Valuation function for arithmetic expression EX P . . . . . . . . Valuation function for expressions A . . . . . . . . . . . Set of all possible Kraus aggregations 87 Appendix A. List of symbols F . . . . . . . . . . . Set of all fixed points of a permutation F2 . . . . . . . . . . Binary group/ring/field fix . . . . . . . . . . Fixed point in . . . . . . . . . . . Injection I(M ) . . . . . . . Set of all intervals in M K . . . . . . . . . . . Kraus aggregation q(σ) . . . . . . . . . Check if a given data type is purely quantum qtype . . . . . . Arbitrary quantum data type R . . . . . . . . . . . Number of receive statements in a Kraus aggregation K . . . . . . . . . . . Set of all unparametrised Kraus agregations Lc . . . . . . . . . . Set of labels for communication partners M . . . . . . . . . . Finite set RS . . . . . . . . . Valuation function for a receive/send pair MO . . . . . . . . Valuation function for monadic operators OP . . . . . . . . . Valuation function for operators P(M ) . . . . . . . Powerset of M S(A) . . . . . . . . States of A S . . . . . . . . . . . Number of send statements in a Kraus aggregation smash . . . . . . . Smash product (with a single bottom element) SR . . . . . . . . . Valuation function for a send/receive pair nc . . . . . . . . . . . Classical data type with n bits nq . . . . . . . . . . Quantum data type with n qbits pos(x, L) . . . . Position of x in the list L Sym(M ) . . . . Symmetric group over M T (σ) . . . . . . . . Set of data types equivalent to σ T . . . . . . . . . . . Typing context PROG . . . . . . Valuation function for programs PROJ . . . . . Generate Kraus set with projection operators for a quantum type Q . . . . . . . . . . . Size of the quantum heap (global constant!) Q . . . . . . . . . . . Set of all quantum variables in a typing context q(nτ ) . . . . . . . Distinguish between classical and quantum components of a data type tq (σ) . . . . . . . . Number of quantum bits contained in a data type σ tc (σ) . . . . . . . . Number of bits contained in a data type σ U (n) . . . . . . . . Unitary group of degree n VAL . . . . . . . . Arbitrary valuation function X . . . . . . . . . . . Finite set x : t . . . . . . . . . Variable x with type t Y D . . . . . . . . . Fixed point combinator on cpo D 88 Die Bedeutung eines Wortes ist das, was die Erklärung der Bedeutung erklärt. Ludwig Wittgenstein, Philosophische Grammatik B Glossary Some terms used in this work are not too commonplace in physics, so we collected the most important definitions to remind the reader of their meaning if it cannot be immediately recollected. Some of the definitions were inspired by [Wik05]. Abstract syntax Grammar used to specify the possible shapes of the parse tree. EBNF Extended Backus-Naur Form Environment Structure which provides a mapping between identifiers of variables and the values associated with them. Backus-Naur Form Metasyntax with a standardised set of symbols and notations which is used to express contextfree grammars. FIFO Queue with first-in, first-out behaviour, i.e., the output of the queue is in the same order as the input. Compiler-Compiler A program used to generate a parser which can perform syntax analysis on programs that follow a given grammar. Functional languages do not work on explicit states, but use transformations that map input to output parameters (→ referential transparency). Assignment to variables is not possible since they represent immutable bindings for values. In our notation, functionality is exploited as far as it is necessary for the ability to guarantee freedom from runtime errors. Classical examples of functional languages include Lisp, ML, and Haskell. Compile time refers to all actions which are performed by the compiler before the program is executed, e.g., syntactical and semantical analysis, scoping rule enforcement, type analysis, optimisation, code generation etc. Concrete syntax Syntax in which textual representations of programs must be specified. Identifier Name of a variable in a program. Context free grammar Formal grammar in which every production rule needs to be of the form V → w where V is a non-terminal and w a list of terminal and non-terminal symbols. Imperative languages work on a global state that is modified during runtime. The most widespread languages (C, C++, Pascal etc.) follow this approach. It is normally impossible to decide if a program written in an imperative language will terminate or produce errors without executing it. Data type A data type is a name or label for a set of values and some operations which can be performed on that set of values. 89 Appendix B. Glossary Lexer A lexer is the part of a compiler which takes the source code of a program (in textual form) and disseminates it into a stream of tokens which is fed to the parser. Scope Rules used to determine what, if any, entity a given occurrence of an identifier in a program refers to. Semantic analysis is the part of a compiler that adds semantic information to the parse tree (for example, the required space in memory for variables) and performs sanity checks which may detect errors in the code before it is executed. Lexicographic order Two strings x, y ∈ Σ∗ can be ordered such that x > y if x#i − y#i > 0 for the first i ∈ N for which x#i 6= y#i. LALR(1) Certain class of context-free grammars that needs to be specified subject to some constraints on its form, but can be handled by Yacc-style parsers. Static typing means that once a type has been assigned to an object, it cannot be changed any more. Strong typing means that not only values, but also identifiers are typed. Mutex Mutual exclusion. A technique realised with the aid of special variables which ensures that only one component of a parallel program can be in the region protected by the mutex at a time. Terminal symbol A symbol of a grammar that represents a constant. Token Tokens are the smallest elementary parts of a program form the parser’s point of view. While int is a threeletter word respectively a string of characters in the source code, the parser regards it as a single entity which describes the data type of integers. Non-terminal symbol A symbol that is composed of terminal symbols and possibly other non-terminal symbols. Parser The parser is the part of a compiler which analyses the grammatical structure of a program (which is fed to him in the form of tokens produced by the lexer ). This process is also known as syntactical analysis. Type Also called data type. It is a label for a set of values together with some operations that can be performed on the set. Type system Set of rules that determines which type a given object has, how types can be combined etc. Parse tree Representation of a program which is generated by the parser. Since tree-based data structures are used to represent the information, the abstract syntax of the language (which is easier to analyse) can be utilised. Type checking is the pass of a compiler which ensures that all operations of a program are applied to variables of proper type; it can, e.g., ensure that string concatenation is not tried to be performed on integers. Runtime refers to the time when a program is executed and the compiler has no more influence on what happens. Alternatively, it may denote a library with helper functions supplied by the compiler which are necessary for the generated code to work (this may be also referred to as runtime library). Yacc Yet another compiler compiler. One of the early approaches to automated parser generation. Most modern parser generators follow the concept of this program. 90 C Der Satz ist der sprachliche Ausdruck dafür, dass sich die Verbindung mehrerer Vorstellungen in der Seele des Sprechenden vollzogen hat, und das Mittel dazu, die nämliche Verbindung der nämlichen Vorstellungen in der Seele des Hörenden zu erzeugen. H. Paul, Prinzipien der Sprachgeschichte Formal syntax The formal syntax for cQPL is defined by the following rules which are used to generate the parser. Words in typewriter face denote tokens recognised by the lexer, whereas slanted text is used for productions. identifiers are given by a letter followed by an arbitrary number of letters, digits and underscores. The empty production is denoted by ǫ. program: stmt list EOF | module list EOF stmt list: statement; | stmt list statement; module list: module def ; | module list module def ; module def : module identifier { stmt list } proc decl: proc identifier:context -> context block in statement | proc identifier:context block in statement context: identifier:var type more context | ǫ nonempty context: identifier:var type more context more context: , identifier:var type more context | ǫ block: { stmt list } var type: bit | qbit | qint | int | float send stmt: send args to identifier receive stmt: receive nonempty context from identifier allocate stmt: new var type identifier := arith expr arith expr: int value | float value | true | false | identifier | (arith expr) | arith expr + arith expr | arith expr - arith expr | arith expr * arith expr | arith expr / arith expr | arith expr < arith expr | arith expr > arith expr | arith expr <= arith expr | arith expr >= arith expr | arith expr == arith expr | arith expr != arith expr 91 Appendix C. Formal syntax | arith expr & arith expr | arith expr | arith expr | - arith expr | ! arith expr proc call: call identifier (args) | (var list) := call identifier (args) args: identifier more args | ǫ more args: , identifier more args | ǫ if stmt: if arith expr then statement | if arith expr then statement else statement measure stmt: measure identifier then statement else statement assign stmt: identifier := arith expr assign measure stmt: identifier := measure identifier while stmt: while arith expr do statement gate stmt: var list *= gate gate: H | CNot | Not | Phase float value | FT (int value) | [[ number list ]] number list: sign float value | sign int value | sign float value PLUS sign imaginary value | sign int value PLUS sign imaginary value | sign imaginary value | number list, sign float value | number list, sign int value | number list, sign imaginary value | number list, sign float value + sign imaginary value | number list, sign int value + sign imaginary value sign: - | + | ǫ var list: identifier | var list, identifier skip stmt: skip print stmt: print "string" | print arith expr | dump var list statement: proc call | proc decl | while stmt | allocate stmt | if stmt | print stmt | assign stmt | assign measure stmt | measure stmt | skip stmt | block | gate stmt | send stmt | receive stmt 92 Bibliography [AB02] Alexander Asteroth and Christel Baier. Theoretische Informatik. Pearson Studium, 2002. [AC04a] Samson Abramsky and Bob Coecke. A categorial semantics of quantum protocols. arXiv:quant-ph/0402130, pages 1–20, 2004. [AC04b] Samson Abramsky and Bob Coecke. A categorical semantics of quantum protocols. In LICS ’04: Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science (LICS’04), pages 415–425, Washington, DC, USA, 2004. IEEE Computer Society. [AG81] N.I. Achieser and I.M. Glasmann. Theorie der linearen Operatoren im HilbertRaum. Verlag Harri Deutsch, 1981. [AG04] T. Altenkirch and J. Grattage. A functional quantum programming language. arXiv:quant-ph/0409065, 2004. [AG05] Thorsten Altenkirch and Jonathan Grattage. QML: Quantum data and control. Submitted for publication, Febuary 2005. [Aha98] Dorit Aharonov. Quantum computation. arXiv:quant-ph/9812037, 1998. [AJ94] Samson Abramsky and Achim Jung. Handbook for Logic in Computer Science, volume 3, chapter Domain Theory. Clarendon Press, Oxford, 1994. [AM05] P. Adão and P. Mateus. A process algebra for reasoning about quantum security. In Electronic Notes in Theoretical Computer Science. Springer, 2005. Preliminary version to be presented at 3rd International Workshop on Quantum Programming Languages. [App04] Andrew W. Appel. Modern Compiler Implementation in ML. Cambridge University Press, New York, NY, USA, 2004. [ASU86] Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: principles, techniques, and tools. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1986. [Aul00] Gennaro Auletta. Foundations and Interpretation of Quantum Mechanics. World Scientific, 2000. [BSC01] S. Betelli, L. Serafini, and T. Calarcoet. Toward an architecture for quantum programming. arXiv:cs.pl/0103009, 2001. 93 Bibliography [BW] Björn Butscher and Hendrik Weimer. Simulation eines Quantencomputers. Universität Stuttgart. [Car97] Luca Cardelli. Type Systems, chapter 103. Handbook of computer science and engineering. CRC Press, 1997. [Cle99] Richard Cleve. An introduction to quantum complexity theory. arXiv:quantph/9906111, 1999. [Deu85] David Deutsch. Quantum theory, the Church-Turing principle and the universal quantum computer. Proceedings of the Royal Society of London Ser. A, A400:97–117, 1985. [dH02] J. den Hartog. Probabilistic extension of semantical models. PhD thesis, Vrije Universiteit Amsterdam, 2002. [DJ92] David Deutsch and Richard Jozsa. Rapid solutions of problems by quantum computation. Proceedings of the Royal Society of London, pages 553– 558, 1992. [DS63] Nelson Dunford and Jacob T. Schwartz. Linear Operators. Interscience Publishers, 1963. [GA05] Jonathan Grattage and Thorsten Altenkirch. A compiler for a functional quantum programming language. submitted for publication, January 2005. [GBJL02] Dick Grune, Henri E. Bal, Ceriel J. H. Jacobs, and Koen Langendoen. Modern Compiler Design. John Wiley, 2002. [GN04] S.J. Gay and R. Nagarajan. Communicating quantum processes. Proceedings of the conference for quantum programming languages, pages 91–107, 2004. [GN05] Simon J. Gay and Rajagopal Nagarajan. Communicating quantum processes. In POPL ’05: Proceedings of the 32nd ACM SIGPLAN-SIGACT sysposium on Principles of programming languages, pages 145–157, New York, NY, USA, 2005. ACM Press. [Gro96] Lov K. Grover. A fast quantum mechanical algorithm for database search. Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, pages 212–219, 1996. [Gru99] Jozef Gruska. Quantum Computing. McGraw–Hill International, 1999. [GS90] C.A. Gunther and D.S. Scott. Semantic Domains, chapter 12, pages 635–674. Elsevier Science Publishers, 1990. [Hol82] Alexander S. Holevo. Probabilistic and Statistical Aspects of Quantum Theory, volume 1 of North-Holland series in statistics and probability. North-Holland, Amsterdam, 1982. First publ. in Russian in 1980. [JL04] Philippe Jorrand and Marie Lalire. Toward a quantum process algebra. In CF’04: Proceedings of the first conference on computing frontiers, pages 111– 119, New York, NY, USA, 2004. ACM Press. [Key02] Michael Keyl. Fundamentals of quantum information theory. arXiv:quantph/0202122, 369(5):431–548, 2002. 94 Bibliography [KN00] E.H. Knill and M.A. Nielsen. Encyclopedia of Mathematics, Supplement III, chapter Theory of quantum computation. Kluwer Academic Publishers, 2000. [Kni96] E. Knill. Conventions for quantum pseudocode. Technical Report LAUR-962724, 1996. [Knu98] Donald E. Knuth. Art of Computer Programming, Volume 3: Sorting and Searching (2nd Edition). Addison-Wesley Professional, April 1998. [Kra83] Karl Kraus. States, Effects and Operations. Fundamental Notions of Quantum Theory. Academic Press, Berlin, 1983. [Lou03] Kenneth C. Louden. Programming Languages: Principles and Practice. Thomson, Pacific Grove, second edition, 2003. [Löw34] K. Löwner. Über monotone Matrixfunktionen. Mathematische Zeitschrift, 38:177–216, 1934. [MB01] S-C. Mu and R. S. Bird. Quantum functional programming. 2nd Asian Workshop on Programming Languages and Systems, 2001. [Mer98] Eugen Merzbacher. Quantum Mechanics. Wiley, John & Sons, 3 edition, 1998. [Mos90] Peter D. Mosses. Denotational semantics, chapter 11, pages 577–629. Elsevier scientific publishers, 1990. [NC00] Michael L. Nielsen and Isaac L. Chuang. Quantum computation and quantum information. Cambridge University Press, New York, NY, USA, 2000. [NPW05] Rajagopal Nagarajan, Nikolaos Papanikolaou, and David Williams. Simulating and compiling code for the sequential quantum random access machine. In Selinger [Sel05]. [Öme98] Bernhard Ömer. A procedural formalism for quantum computing. Master’s thesis, TU Vienna, 1998. [Öme00] Bernhard Ömer. Quantum Programming in QCL. Master’s thesis, TU Vienna, 2000. [Öme03] Bernhard Ömer. Structured quantum programming. PhD thesis, TU Vienna, 2003. [Pre99] John Preskill. Lecture notes for the course quantum computation (physics 229). www.theory.caltech.edu/people/preskill/ph229, 1999. [RAMK+ 04] Helge Rosé, Torsten Asselmeyer-Maluga, Matthias Kolbe, Falk Niehoerster, and Andreas Schramm. The fraunhofer quantum computing portal. arXiv:quant-ph/0406089, 2004. [Rey98] John C. Reynolds. Theories of programming languages. Cambridge University Press, 1998. [RP02] Peter Rechenberg and Gustav Pomberger. Informatik-Handbuch. Hanser Fachbuch, 2002. [Sak94] Jun John Sakurai. Modern Quantum Mechanics. Addison-Wesley, 1994. 95 Bibliography [Sch24] Moses Schönfinkel. Über die Bausteine mathematischer Logik. Math. Ann. 92, pages 305–316, 1924. [Sch01] Uwe Schöning. Theoretische Informatik - kurzgefasst. Spektrum, Akad. Verl., 4 edition, 2001. [Sch04] Andreas Schroeder. Quantenflussdiagramme und die Quantenprogrammiersprache QPL. Seminar der Lehr- und Forschungseinheit für theoretische Informatik, LMU München, 2004. [Sel04a] Peter Selinger. A brief survey of quantum programming languages. In Lecture Notes in Computer Science 2998. Springer, 2004. [Sel04b] Peter Selinger. Towards a quantum programming language. Mathematical. Structures in Comp. Sci., 14(4):527–586, 2004. [Sel05] Peter Selinger. Proceedings of the 3rd international workshop on quantum programming languages. In Peter Selinger, editor, Proceedings of the 3rd International Workshop on Quantum Programming Languages, Electronic Notes in Theoretical Computer Science. Elsevier Science, 2005. [SF96] Robert Sedgewick and Philippe Flajolet. An Introduction to the Analysis of Algorithms. Addison-Wesley, 1996. [Sho94] Peter W. Shor. Algorithms for quantum computation: Discrete logarithms and factoring. IEEE Symposium on Foundations of Computer Science, pages 124–134, 1994. [SP00] J.W. Sanders and P.Zuliani. Quantum programming. Lecture notes in computer science, 1837, 2000. [Sto87] Joseph E. Stoy. Denotational semantics. MIT Press, 4 edition, 1987. [Str00] Christopher Strachey. Fundamental concepts in programming languages. Higher Order Symbol. Comput., 13(1-2):11–49, 2000. [vT04] Andre van Tonder. A lambda calculus for quantum computation. SIAM Journal on Computing, 33:1109–1135, 2004. [Wei00] Joachim Weidmann. Lineare Operatoren in Hilberträumen, volume 1. B.G. Teubner, 2000. [WF94] Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 1994. [Wik05] Wikipedia community. 2005. [Win93] Glynn Winskel. The formal semantics of programming languages: an introduction. MIT Press, Cambridge, MA, USA, 1993. [WM95] Reinhard Wilhelm and Dieter Maurer. Compiler Design. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1995. Wikipedia online dictionary, www.wikipedia.net, 96 Thanks ❏ To PD Dr. Norbert Lütkenhaus for taking the peril of a journey into the strange and unaccustomed, his support by discussions and suggestions and for giving me complete freedom in deciding what to work on. ❏ To Prof. Dr. Dr. Volker Strehl for many pointers into the right direction and for sacrificing time for a student from another faculty. ❏ To Tobias Moroder, Hans Loehr, Martin Trini, Johannes Rigas, Volkher Scholz and Markus Diefenthaler for proofreading and many valuable corrections and suggestions. ❏ To the guys in my office (Tobi Moroder, Johannes Rigas and Dr. Matthias Jakob) for providing a pleasant environment to work in, many inspiring level eights and our shared pleasure of working under illumination provided by the moon. ❏ To an anonymous reviewer for encouraging comments. ❏ To dict.leo.org for countless suggestions on english vocabulary; quick answers to many questions were given by www.wikipedia.net. ❏ To Dr. Peter Selinger for detailled explanations regarding his work. ❏ To the red and the green forrest fairy because they are way too mythical to not be thanked; without any doubt, the same holds for HM Queen Elizabeth II. ❏ To all members of the QIT group (Tobi, Johannes, Philippe, Matthias 1, Matthias 2, Joe, Geir Ove, Marcos, Ivan) for their help, valuable discussions and the pleasant working environment, not to forget the shared fun among some of us in chasing little bouncing objects on diverse courts. ❏ To my parents and my family for their overall and ubiquitous love and support in any aspect of life. 97
6cs.PL
APPROXIMATING (UNWEIGHTED) TREE AUGMENTATION VIA LIFT-AND-PROJECT, PART II arXiv:1507.01309v2 [cs.DS] 29 Aug 2015 JOSEPH CHERIYAN AND ZHIHAN GAO Abstract. In Part II, we study the unweighted Tree Augmentation Problem (TAP) via the Lasserre (Sum of Squares) system. We prove that the integrality ratio of an SDP relaxation (the Lasserre tightening of an LP relaxation) is ≤ 23 + , where  > 0 can be any small constant. We obtain this result by designing a polynomial-time algorithm for TAP that achieves an approximation guarantee of ( 32 + ) relative to the SDP relaxation. The algorithm is combinatorial and does not solve the SDP relaxation, but our analysis relies on the SDP relaxation. We generalize the combinatorial analysis of integral solutions from the previous literature to fractional solutions by identifying some properties of fractional solutions of the Lasserre system via the decomposition result of Karlin, Mathieu and Nguyen (IPCO 2011). 1. Introduction In the weighted Tree Augmentation problem we are given a connected, undirected multigraph G bT ) of G; the goal with non-negative costs on the edges, together with a spanning tree T = (V (G), E bT , of minimum cost such that (V, E bT ∪ F ) is 2-edge connected. is to find a set of edges, F ⊆ E(G)−E b By a link we mean an element of E(G)−ET ; thus, a link is an edge of G that can be used to augment bT (a tree-edge) if T + uw − ê = (V, E bT ∪ {uw}−{ê}) T . We say that a link uw covers an edge ê ∈ E is connected. We say that a set of links F covers the tree T if every edge of T is covered by at least bT ∪ F ) is 2-edge-connected. Thus, the goal is one link of F ; it can be seen that F covers T iff (V, E to compute a set of links of minimum cost that covers T . The weighted Tree Augmentation problem was first studied by Frederickson and Jaja in 1981 [4]. They showed that the problem is NP-hard, and they presented a 2-approximation algorithm. Subsequently, it has been proved that even the unweighted Tree Augmentation problem is APX-hard, see [9, Section 4]; thus the problem has no PTAS assuming P6=NP. There have been some important advances on this problem for the corresponding unweighted (i.e., uniform weight) problems. Following [5], we use the abbreviation TAP for the unweighted Tree Augmentation problem. Nagamochi, see [6], presented the first algorithm for TAP that improved on the approximation guarantee of 2; the approximation guarantee is ≈ 1.875. Subsequently, Even, et al., [5] built on the ideas and techniques initiated by Nagamochi and presented an elegant algorithm and analysis that achieves an approximation guarantee of 1.8. In a conference publication from 2001, Even, et al., reported a 1.5 approximation algorithm for TAP, see the extended abstract [3], and recently, Kortsarz & Nutov [10] presented the journal version of this result. We prove that the integrality ratio of an SDP relaxation (the Lasserre tightening of an LP relaxation) is ≤ 32 + , where  > 0 can be any small constant. We obtain this result by designing a polynomial-time algorithm for TAP that achieves an approximation guarantee of ( 32 + ) relative to the SDP relaxation. The algorithm is combinatorial and does not solve the SDP relaxation, but our analysis relies on the SDP relaxation. Observe that our integrality ratio (and approximation guarantee) is proved relative to a “weaker lower bound” than the optimum value (since the feasible Date: August 29, 2015. Based on one chapter of the second author’s Ph.D. Thesis. 1 region of a relaxation is a superset of the convex full of integer solutions). Moreover, the approximation guarantee of 1.5 follows as a corollary of our main result (but, we cannot eliminate the “+” in our bound on the integrality ratio by this corollary). Linear programming relaxations for the weighted version of TAP have been studied for many years. (We use the standard abbreviation LP to mean a linear programming relaxation or a linear programming problem.) There is an obvious “covering” LP: we have a variable xe for each edge bT and we have a covering constraint for each edge of T . It is well known that the e ∈ E(G) − E integrality ratio of this LP is ≤ 2; this can be deduced from Jain’s result [7]. A lower bound of 1.5 on the integrality ratio is known [1]; in fact, the construction for the lower bound uses uniform bT , hence, the lower bound applies for TAP. We formulate an LP weights for the edges in E(G) − E that is a tightening of the obvious “covering” LP for TAP; see (LP0 ) in Section 3. The Lasserre system applies to an initial LP, and it derives a sequence of tightenings of the initial LP; these tightened relaxations are indexed by a number t = 0, 1, . . . called the level, where the level 0 tightening means the initial LP. A key “decomposition theorem” (see Theorem 4.1, [11, 8]) asserts that a feasible solution at level t can be written as a convex combination of feasible solutions at a lower level such that all of these lower-level solutions y are “locally integral.” Here, “locally integral” bT , such that the solution y takes only zero or one means that there is a specified subset J ⊆ E(G)− E values on this subset (i.e., ye ∈ {0, 1}, ∀e ∈ J). A key point is that the difference in levels (between the level t of the given feasible solution and the level of the lower-level “locally integral” solutions) does not depend on the size of J, rather, it depends on the following “combinatorial parameter” determined by J. Suppose that there exists a constant k such that every feasible solution x of the initial LP has ≤ k entries in J that have value one, i.e., |{e ∈ J : xe = 1}| ≤ k for every feasible solution x of the initial LP. Then for any t > k, a feasible solution at level t can be written as a convex combination of “locally integral” feasible solutions at level (t − k). This property does not hold for other weaker Lift-and-Project systems such as the Lovász-Schrijver system or the Sherali-Adams system. The analysis of our algorithm is based on a potential function. Our potential function is derived from the Lasserre tightening of the initial LP. Our algorithm is “combinatorial” and we do not need to solve the initial LP nor its Lasserre tightening to run the algorithm; but, the analysis of the algorithm relies on the Lasserre tightening. Our algorithm essentially follows the “algorithmic scheme” of [5, Section 3.4], see Section 7 for details. The algorithm is a greedy-type iterative algorithm that makes a leaves-to-root scan over the tree T and (incrementally) constructs a set of links F that covers T . The algorithm starts with F := ∅, at each major step it adds one or more links to F (it never removes links from F ), and at termination, it outputs a set of links F that covers T such that |F | ≤ the potential function. The algorithm incurs a cost of one unit for each link added to F . The key to the analysis is to show that for each major step, the cost incurred (i.e., one plus the number of links added to F ) is compensated by a part of the potential function. Informally speaking, our analysis in Section 8 asserts the following: if the naive algorithm gets “stuck” then the instance contains a small combinatorial obstruction, a so-called deficient tree, see Theorems 8.7, 8.8. This assertion is the key to this paper; it turns out that the algorithmic aspects as well as the analysis of the approximation guarantee are straightforward consequences. Our analysis in Section 8 makes essential use of the Lasserre system and the decomposition theorem, see Figure 1. For ease of exposition and for the sake of motivation, this paper has several discussions that contain forward references. But, these forward references are not relevant for the correctness of our arguments; indeed, all discussions containing forward references could be deleted, and this will have 2 Decomposition theorem for the Lasserre system Lemma 8.5 Lemma 7.2 Lemma 8.2 Potential function of Lemma 5.2 Lemma 8.6 Lemma 8.3 Theorem 8.7 shows deficient trees under appropriate conditions Lemma 8.4 Figure 1. Illustration of the role of the decomposition theorem for the Lasserre system (Theorem 4.1). Our analysis consists of three blocks of results: low-level, middle-level, and high-level; these are shown from left to right in the figure. Note that Lemmas 7.2, 8.2 are often used in the proofs of subsequent results. no effect on the validity of our proofs. Also, Part II repeats some definitions, figures, and discussions from Part I, but proofs from Part I are not repeated. An outline of Part II is as follows. Section 2 has definitions and notation; several items are new to Part II (and not needed in Part I). We adopt the notation and terms of Even, et al., [5], where possible; this will aid readers familiar with that paper. Section 3 presents the initial LP; this is the same LP as in Part I. Section 4 discusses the Lasserre tightening of the initial LP, and proves some basic properties and inequalities; most of these results are from Part I, but there are two new results. Section 5 derives our potential function, based on a solution y of the Lasserre tightening; this potential function differs significantly from the potential function of Part I. Section 6 starts the presentation of the algorithm (and credits) by elaborating on two preprocessing steps. Section 7 completes the discussion of the algorithm (and credits) by presenting the main loop of the algorithm. The most important component of this paper is Section 8; this section presents the analysis of the algorithm by first proving some low-level properties, then builds on this to prove some intermediatelevel lemmas, and then proves the key theorem on deficient trees (Theorem 8.7); this section also presents and proves the last piece of the algorithm, namely, the handling of deficient trees. 2. Preliminaries and notation This section presents definitions and notation. Standard notation including tree T , link set E. Let G = (V, E(G)) be a connected, undirected bT ) be a spanning tree of G. We assume that |V | ≥ 2. By a tree-edge multigraph, and let T = (V, E bT ; we call E the link set and we call an we mean an edge of T . Let E denote the edge-set E(G)−E element ` ∈ E a link ; thus, a link is an edge of G that can be used to augment T . An instance of TAP consists of G and T . We assume that all instances of interest have feasible solutions, that is, bT ∪ E) is 2-edge connected. The goal is to find a minimum-size subset F of E we assume that (V, E bT ∪ F ) is 2-edge such that augmenting T by F results in a 2-edge connected multigraph, i.e., (V, E connected. For two nodes u, v ∈ V , we use Pu,v = Pv,u to denote the unique path of the tree T between u and v. For a node v ∈ V , we denote the number of tree-edges incident to v by degT (v). For any node v ∈ V , we use δE (v) to denote the set of links incident to v. 3 For any U ⊆ V , we denote the set of links with both ends in U by E(U ), and for any two subsets U, W of V , we denote the set of links with one end in U and the other end in W by E(U, W ); thus, E(U, W ) := {uw ∈ E : u ∈ U, w ∈ W }. We use similar notation for some subsets of E; for example, E reg denotes a particular subset of E (defined below), and E reg (U, W ) denotes {uw ∈ E reg : u ∈ U, w ∈ W }. We say that a link uw covers a tree-edge ê if Pu,w 3 ê. Similarly, we say that a subtree of T is covered by a set of links J ⊆ E if each tree-edge of the subtree is covered by some link of J. For any bT , we use δE (ê) to denote the set of links that cover ê, thus, δE (ê) = {uw ∈ E : ê ∈ tree-edge ê ∈ E Pu,w }. Shadows and the shadow-closed property. For two links u1 v1 and u2 v2 , if Pu1 ,v1 ⊆ Pu2 ,v2 , then we call u1 v1 a shadow (or, sublink ) of u2 v2 . For any link uv ∈ E, if all sublinks of uv also exist in E, then we call E shadow-closed. Clearly, if E is not shadow-closed, then we can make it shadow-closed by adding all sublinks of each of the original links. It can be seen that this preserves the optimal value of any instance of TAP. Following Even, at al., [5], we make the next assumption (see Assumption 2.2 of [5]). Assumption: E is shadow-closed. Root, ancestor, descendant and rooted subtrees. One of the nodes r of T is designated as the root; thus, we have a rooted tree (T, r). Let v be a node of T . If a node w belongs to the path Pv,r , then w is called an ancestor of v, and v is called a descendant of w. If a descendant w of v is adjacent to v (thus, w 6= v), then w is called a child of v, and v is called a parent of w. Clearly, every node in V −{r} has a unique parent. If a node v has no child, then we call v a leaf ; if v has no child, then degT (v) = 1. Note that r has at least one child (since |V | ≥ 2), thus, r is not a leaf, even if degT (r) = 1. Throughout, we use L to denote the set of leaves; thus, L = {v ∈ V : v is a leaf of T }. For any leaf v of T , up(v) denotes a node q in Pv,r that is nearest to the root and adjacent to v via a link. Since E is shadow-closed, it can be seen that up(v) is an ancestor of v, for each leaf v. For any node v, we use Tv to denote the rooted subtree of (T, r) induced by v and its descendants. We use L(Tv ) to denote the set of leaves of the subtree Tv . Throughout, the terms tree or subtree refer to a rooted subtree of (T, r) that is “closed w.r.t. descendants” (if a node w is in the subtree, then all descendants of w are in the subtree). Property 2.1. Suppose that T̄ is a rooted tree. Let T̄v1 and T̄v2 be two (rooted) subtrees of T̄ . Then T̄v1 and T̄v2 either share no node or one is contained in the other. ¯ etc. denote an arbitrary item/set (rather than Remark 2.2. Throughout, symbols such as T̄ , J, the complement of another set). Stems and twin links. We call a node s of T a stem if s 6= r, s has exactly two children, s has exactly two descendants that are leaves, and there exists a link in E between the two leaves of Ts ; we call the link between the two leaves of Ts a twin link, and denote it by twinlk(s). (Our definition of stem differs slightly from [5, Definition 3.1].) Let E twin denote the set of twin links. Observe that there is a one-to-one correspondence between twin links and stems. Throughout, we use S to denote the set of stems; thus, S = {v ∈ V : v is a stem of T }. Moreover, we use R to denote the set of nodes that are neither stems nor leaves; thus R = V −(S ∪ L). (The notion of stems and twin links is due to [6].) up (s) = {vs ∈ E : v ∈ dn (s) = For any stem node s, we define δE / V (Ts )}. Similarly, we define δE {vs ∈ E : v ∈ V (Ts )}. 4 Contraction and compound nodes. We use the standard notion of contracting a link or a set of links, see [5], [2, Chapter 1]. We use T 0 := T /F to denote the tree obtained by contracting bT ∪ F ) to a single node. Each of the each of the 2-edge connected components of T + F = (V, E 0 contracted nodes of T = T /F is called a compound node, see [5, Section 3.2]; thus, each compound node corresponds to a set of two or more nodes of V (T ). Each of the other nodes of T /F is called an original node. We also call a node of T an original node. We call a link in E an original link. When we say that ` is a link w.r.t. T we mean that ` is an original link; when we say that `0 is a link w.r.t. T 0 = T /F , we mean that there exists an original link ` whose image in T /F is `0 . Buds and buddy links. Besides stems and their associated subtrees, one other type of subtree (and some of the incident links) plays an important role in this paper. We call a leaf b0 a bud (see Figure 2) if there exists a (rooted) subtree Tv with exactly three leaves b0 , b1 , b2 such that (i) up(b0 ) is a descendant of v (possibly, up(b0 ) = v), (ii) Tup(b0 ) contains a stem s such that b0 , b1 are the leaves of Ts , and (iii) the link b1 b2 exists. We call b1 b2 the buddy link of b0 and denote it by buddylk(b0 ). Observe that there exists an ancestor q of s in Tv such that q is the least common ancestor of s and b2 ; possibly, q = v, and possibly, q = v = r; moreover, L(Tup(b0 ) ) = {b0 , b1 } or L(Tup(b0 ) ) = {b0 , b1 , b2 }. Note that b1 may be a bud as well. In that case, each leaf of Tup(b1 ) is in {b0 , b1 , b2 }, there exists a link between b0 , b2 , and buddylk(b1 ) = b0 b2 . v = up(b0 ) q v=q up(b0 ) s b2 b1 s b2 b0 b1 b0 Figure 2. Illustration of a bud b0 and the subtree Tv . The figure on the left shows the case when up(b0 ) is an ancestor of all three leaves in Tv . The figure on the right shows the other case. Consider a bud b0 , and let s, q be as above; we define Rspecial (b0 ) := V (Pb0 ,up(b0 ) )−V (Ps,q )−{b0 }. Thus Rspecial (b0 ) contains the internal nodes in the tree-path between b0 and s; moreover, if up(b0 ) is an ancestor of all three leaves b0 , b1 , b2 , then Rspecial (b0 ) also contains all nodes on the tree-path between the parent of q and up(b0 ); there are no other nodes in Rspecial (b0 ) (see Figure 3). Fact 2.3. Rspecial (b0 ) is the set of nodes w such that there exists a link b0 w in E, and w is not on the tree-path between the two ends of buddylk(b0 ). Every node in Rspecial (b0 ) has a unique child, and is an ancestor of b0 . For two buds b, b̄ that are not the leaves of the same subtree Ts , where s is a stem, the sets Rspecial (b) and Rspecial (b̄) are disjoint. (Thus, Rspecial (b) ∩ Rspecial (b̄) = ∅, unless the least common ancestor (in T ) of b, b̄ is a stem s.) We denote the set of buds and the set of buddy links by Lbud and E buddy , respectively. Observe that there is a unique buddy link for each bud; thus, there is a bijection between Lbud and E buddy . 5 up(b0 ) q q up(b0 ) s b2 b1 s b2 b0 b1 b0 Figure 3. Illustration of Rspecial (b0 ) for a bud b0 . The nodes in Rspecial (b0 ) are indicated by solid circles. The figure on the left shows the case when Tup(b0 ) has three leaves. The figure on the right shows the other case. For any node w of the tree T , we denote by Lbud (w) the set of buds in the subtree Tw . For a stem s, note that Lbud (s) may contain zero, one, or two nodes. Let Rspecial = ∪b∈Lbud Rspecial (b) and Rnonspcl = R−Rspecial . Thus, we partition the set R (of nodes that are neither stems nor leafs) into two subsets, the “special” subset Rspecial and the “normal” subset Rnonspcl . We use E reg to denote the set E−(E twin ∪ E buddy ), namely, the set of links that are neither twin links nor buddy links. Vectors and convex combinations. For any vector x ∈ RE , let ones(x) denote the set of links of x-value one, thus ones(x) = {uv ∈ E : xuv = 1}. P For a vector x ∈ RE and any subset J of E, x(J) denotes e∈J xe . Given several vectors P i ; thus, Z is a set of indices, and λ v v 1 , v 2 , . . . , we write one of their convex combinations as i∈Z i P we have λi ≥ 0, ∀i ∈ Z, and i∈Z λi = 1. 3. Initial LP relaxation This section presents our initial LP relaxation of shadow-closed instances of TAP, denoted by (LP0 ); this is the same LP as in Part I (Section 3). Let u1 v1 and u2 v2 be a pair of links. We call it an overlapping pair of links if (i) Pu1 ,v1 , Pu2 ,v2 have one or more tree-edges in common, and (ii) either an end of u1 v1 is in Pu2 ,v2 , or an end of u2 v2 is in Pu1 ,v1 . We call a set of links J an overlapping clique if every pair of links in J is an overlapping pair. We use the notion of overlapping pairs for stating (LP0 ). (LP0 ) minimize : X xuv uv∈E subject to : X uv∈δE (ê) bT ∀ê ∈ E xuv ≥ 1, xu1 v1 + xu2 v2 ≤ 1, ∀ overlapping pairs u1 v1 , u2 v2 ∈ E 0≤x≤1 4. Lasserre tightening and its properties This section presents the Lasserre tightening of the initial LP and proves some basic properties and inequalities; most of these results are from Part I, but there are two new results. The proofs of the results from Part I are omitted. 6 Let Last (LP0 ) denote the level t tightening of (LP0 ) by the Lasserre system. 1 Recall that ones(x) denotes the set of links of x-value one, where x ∈ RE is a feasible solution of (LP0 ). Rothvoß, see [11, Theorem 2], formulated the following decomposition theorem for the Lasserre system, based on an earlier decomposition theorem due to Karlin-Mathieu-Nguyen [8]. (We use this particular formulation and not the original statement of [8]; hence, we reference both [8] and [11].) Theorem 4.1. Let J ⊆ E. Let k be a positive integer such that |ones(x) ∩ J| ≤ k for every feasible solution x of (LP0 ). Then for every P feasible solution y ∈ Last (LP0 ), where t ≥ k + 1, y can be written as a convex combination y = i∈Z λi xi such that xi is in Last−k (LP0 ) and xi |J is integral (i.e., xiuv is integral for each uv ∈ J), for all i ∈ Z. Lemma 4.2. Let J ⊆ E be an overlapping clique. For every feasible solution x of (LP0 ), we have |ones(x) ∩ J| ≤ 1. Furthermore, for every level t ≥ 2 and every feasible solution y of Last (LP0 ), we have y(J) ≤ 1. Lemma 4.3. Let w be a leaf of T , and let u be an ancestor of w such that every internal node (if any) of Pw,u has exactly one child. Let ê = vu be the tree-edge of Pw,u that is incident to u (possibly, v = w). Then, δE (ê) is an overlapping clique. In particular, δE (w) is an overlapping clique. Moreover, we have y(δE (w)) = 1 for any feasible solution y ∈ Last (LP0 ) where t ≥ 2. Recall that the matching polytope of the subgraph induced by the leaves, G(L) = (L, E(L)) is given by the following constraints: x(δE(L) (v)) ≤ 1, x(E(W )) ≤ ∀v ∈ L |W | − 1 , ∀W ⊆ L, |W | odd 2 x≥0 The next result is essentially the result on the matching polytope from the survey of Rothvoß, see [12, Lemma 13, Sec 3.3], translated to our setting. Lemma 4.4. Let  > 0, and let y ∈ Las 1 +1 (LP0 ). Then, 2 G(L) = (L, E(L)). y|E(L) 1+ is in the matching polytope of Lemma 4.5. Let x be a feasible solution of (LP0 ) and let s be a stem. Then |ones(x) ∩ δE (s)| ≤ 3. Proof. Since s is a stem, s is incident to three tree-edges. Let ê1 , ê2 , ê3 be the tree-edges incident with s. Clearly, Ji = δE (êi ) ∩ δE (s) is an overlapping clique, for each 1 ≤ i ≤ 3, and δE (s) = ∪1≤i≤3 Ji . Then the result follows from Lemma 4.2.  Lemma 4.6. Let t ≥ 3, and let y be a feasible solution of Last (LP0 ). Suppose that s is a stem. Then: up (s)). (1) y(twinlk(s)) ≤ y(δE (2) For each bud b in Ts (if it exists), we have y(buddylk(b)) ≤ y(bs) + y(E(b, Rspecial (b))). Proof. Let the leaves of Ts be b0 and b1 . Let J = δE (b0 ) ∪ δE (b1 ). Since b0 , b1 are leaves, by Lemma 4.3, δE (b0 ) and δE (b1 ) are overlapping cliques. Thus, by Lemma 4.2, |ones(x) ∩ J| ≤ 2 for solution x of (LP0 ). By Theorem 4.1, y can be written as a convex combination P any feasible i such that xi ∈ Las (LP ) and xi | is integral, ∀i ∈ Z. λ x 1 0 J i∈Z i 1Formally speaking, Las (LP ) is a set of vectors in R2[|E|] . In what follows, we abuse the notation and take t 0 Last (LP0 ) to be the projection on the subspace indexed by the singleton sets; thus, we take Last (LP0 ) to be a set of vectors in R|E| . 7 (1): Consider statement (1) of the lemma. Observe that twinlk(s) = b0 b1 . Since b0 b1 ∈ J, either xi (b0 b1 ) = 0 or xi (b0 b1 ) = 1, for all i ∈ Z. Let Z(1) = {i : xi (b0 b1 ) = 1}. Then P y(b0 b1 ) = i∈Z(1) λi xi (b0 b1 ). Consider xi , where i ∈ Z(1) . Let ês be the tree-edge between s and its parent. Then, xi (δE (ês )) ≥ 1. Notice that every link in δE (ês ) with positive xi -value must have s as its end in Ts ; otherwise, if such a link has an end at some other node of Ts , then it will be overlapping with the link b0 b1 , and we would have a violation of the overlapping constraints of (LP0 ). Thus, xi (δE (ês )) = xi (δE (ês ) ∩ δE (s)). Hence, up (s)) = xi (δ (ê ) ∩ δ (s)) = xi (δ (ê )) ≥ 1 = xi (b b ), ∀i ∈ Z . Consequently, xi (δE 0 1 E s E E s (1) P P P i i up i up up (s)). y(b0 b1 ) = i∈Z(1) λi x (b0 b1 ) ≤ i∈Z(1) λi x (δE (s)) ≤ i∈Z λi x (δE (s)) = y(δE (2): Consider statement (2) of the lemma. W.l.o.g., let b = b0 (the same argument applies for i i b = b1 ). Let buddylk(b0 ) = b1 b2 . Since b1 b2 ∈ J, either Px (b1 b2 ) =i 0 or x (b1 b2 ) = 1, for all i i ∈ Z. Let Z(2) = {i : x (b1 b2 ) = 1}. Then y(b1 b2 ) = i∈Z(2) λi x (b1 b2 ). Consider xi , where i ∈ Z(2) . Let ` = b0 w be a link such that xi (`) = 1; such a link must exist. If w 6= s and w is in Pb1 ,b2 , then ` is overlapping with b1 b2 , and we would have a violation of the overlapping constraints of (LP0 ). Hence, by Fact 2.3, w ∈ Rspecial (b0 ) ∪ {s}. special (b ))). Then, xi (buddylk(b0 )) = 1 ≤ xi (`) P ≤ xi (b0 s) + xi (E(b0 , R 0 P i Consequently, y(buddylk(b0 )) = i∈Z(2) λi x (b1 b2 ) ≤ i∈Z(2) λi (xi (b0 s)+xi (E(b0 , Rspecial (b0 )))) ≤ P i i special (b )))) = y(b s) + y(E(b , Rspecial (b ))). 0 0 0 0 i∈Z λi (x (b0 s) + x (E(b0 , R  For any stem s and for any x ∈ RE , we define slackx (s) to be  1  X 1  dn up x(δE (s)) + (x(E(b, Rspecial (b))) − x(buddylk(b))) + x(δE (s)) − x(twinlk(s)) . 2 2 bud b∈L (s) Lemma 4.6 implies the following fact. Fact 4.7. For any stem s and for any feasible solution y to Last (LP0 ) where t ≥ 3, we have slacky (s) ≥ 0. Remark 4.8. Although the above fact assumes that the level t is ≥ 3, observe that slackx (s) is well defined for all levels ≥ 0. 5. Potential function This section presents the potential function used by our algorithm. The potential function is based on a feasible solution y to the Lasserre tightening of (LP0 ). It is essential to tighten (LP0 ) because the potential function is not valid for feasible solutions of (LP0 ). Possibly, our potential function may be obtained via weaker lift-and-project systems (e.g., Lovász-Schrijver, or Sherali-Adams). We prefer to apply the Lasserre tightening because our analysis in Sections 7–8 makes essential use of the decomposition theorem (Theorem 4.1), and this theorem is not known to hold for any weaker lift-and-project system; see Part I (Section 10). Our potential function is defined via a subset of the leaves that is denoted by Λ. This subset is determined by the instance of TAP. Informally speaking, it consists of all the leaves of all occurrences of a particular type of subtree, called a bad 2-stem tree, see Section 6. Our potential function consists of two parts, a “preprocessing” part and a “normal” part. Our algorithm applies two preprocessing steps; the first preprocessing step contracts all occurrences of maximal bad 2-stem trees, and for this we have to “charge” the “preprocessing” part of our potential function. We say that a set of leaves Λ is compatible if the following holds: • For every twin link and for every buddy link, either both ends of the link are in Λ or no end of the link is in Λ; in other words, no twin link and no buddy link is present in E(Λ, L − Λ). 8 In what follows, let Λ ⊆ L denote a compatible set. We denote the set of stems with both leaves in Λ by SΛ . Similarly, let Lbud denote the set of Λ bud buds in Λ, and let L(L−Λ) denote the set of buds in L−Λ. By the definition of a compatible set, the following fact holds. Fact 5.1. bud Lbud (s), (L−Λ) = ∪s∈S −SΛ L E twinlk (L−Λ) = {twinlk(s) : s ∈ S−SΛ }, E buddylk (L−Λ) = ∪s∈S −SΛ {buddylk(b) : b ∈ Lbud (s)}. creg b(L−Λ) deLet M denote a maximum matching of the subgraph (L−Λ, E reg (L−Λ)), and let U (L−Λ) creg ; thus U b(L−Λ) = (L−Λ)−{v ∈ note the set of nodes of this subgraph exposed by the matching M (L−Λ) creg }. V : v is an end of some link ` ∈ M (L−Λ) We mention that our potential function (the right-hand side of the inequality in Lemma 5.2 below) creg , U b(L−Λ) . Thus, when we use our potential function, we have to ensure refers to the terms Λ, M (L−Λ) that these terms have been defined already; we will “fix” our potential function by appropriately creg , U b(L−Λ) in Section 6. defining Λ, M (L−Λ) Given Λ and y ∈ RE , we use lbd y (Λ) to denote the quantity 1 1 X 3 y(E(Λ)) + y(E(Λ, L−Λ)) + y(E(Λ, V −L)) + y(δE (s)); 2 2 2 s∈SΛ this is one of the terms in our potential function; informally speaking, this is the main component of the “preprocessing” part of the potential function. 1 + 1, 3}. Let y ∈ Last (LP0 ). Then, Lemma 5.2. Let  > 0 be a constant, and let t ≥ max{ 2 3 ( + )y(E) ≥ 2 1 + y(E(V −L)) + 2 3 creg b(L−Λ) | + lbdy (Λ) |M | + |U 2 (L−Λ) 1 X 1 X y(δE (v)) + y(E(v, V −Lbud (L−Λ) (v))) + 2 2 nonspcl special v∈R v∈R Moreover, every item on the right-hand side of the inequality is nonnegative. X slacky (s). s∈S −SΛ Proof. Observe that y is feasible for Last (LP0 ) for t ≥ 3, hence, y ≥ 0 and (by Fact 4.7) slacky (s) ≥ 0, ∀s ∈ S. Hence, every item on the right-hand side of the inequality is nonnegative. For each link uw, we distribute the value 32 yuw as follows: – if both u, w ∈ L, then uw keeps the value 32 yuw ; – if both u, w ∈ V −L, then uw keeps the value 21 yuw and each of the ends u and w gets value 1 2 yuw ; – if only one of u or w is in V −L, then uw keeps the value yuw and the end in V −L gets value 1 2 yuw . (In other words, each node in V −L borrows value 21 yuw from each link uw incident to it, and the link keeps the remaining value; links uw that are not incident to V −L keep all of the value 32 yuw .) 9 Thus, we have 3 3 3 3 y(E) = y(E(Λ)) + y(E(L−Λ)) + y(E(Λ, L−Λ)) 2 2 2 2 1 1 X + y(E(V −L)) + y(E(V −L, Λ)) + y(E(V −L, L−Λ)) + y(δE (v)). 2 2 v∈V −L Then we increase the coefficients of the twin links and buddy links in E(L − Λ) from 32 to 2 by borrowing the value 21 y(E twin (L−Λ)) + 12 y(E buddy (L−Λ)) from the last term above, and adding it to the term 32 y(E(L−Λ)). Thus, we replace the term 32 y(E(L−Λ)) by 2y(E(L−Λ)) − 12 y(E reg (L−Λ)), and we replace the last term by 1 X 1 1 y(δE (v)) − y(E twin (L−Λ)) − y(E buddy (L−Λ)) 2 2 2 v∈V −L 1 X 1 X 1 X 1 X dn up y(δE (v)) + y(δE (v)) + y(δE (s)) + = (y(δE (s)) + y(δE (s))) 2 2 2 2 nonspcl special s∈SΛ s∈S −SΛ v∈R v∈R 1 1 − y(E twin (L−Λ)) − y(E buddy (L−Λ)) 2 2 1 X 1 X 1 X 1 X 1 up y(δE (v)) + y(δE (v)) + = y(δE (s)) + y(δE (s)) − y(E twin (L−Λ)) 2 2 2 2 2 s∈SΛ s∈S −SΛ v∈Rnonspcl v∈Rspecial 1 1 X dn y(δE (s)) − y(E buddy (L−Λ)) + 2 2 s∈S −SΛ  1 X X 1 X (1) 1 X special (v))) + y(E(b, R (b))) = y(δE (s)) + y(δE (v)) + y(E(v, V −Lbud (L−Λ) 2 2 2 s∈SΛ v∈Rnonspcl v∈Rspecial b∈Lbud (L−Λ) X X 1 1 1 1 up dn + y(δE (s)) − y(E twin (L−Λ)) + y(δE (s)) − y(E buddy (L−Λ)) 2 2 2 2 s∈S −SΛ s∈S −SΛ 1 X 1 X (2) 1 X = y(δE (s)) + y(δE (v)) + y(E(v, V −Lbud (L−Λ) (v))) 2 2 2 s∈SΛ v∈Rnonspcl v∈Rspecial  X 1 X  dn y(δE (s)) + + (y(E(b, Rspecial (b))) − y(buddylk(b))) 2 s∈S −SΛ b∈Lbud (s)   1 X up + y(δE (s)) − y(twinlk(s)) 2 s∈S −SΛ X 1 X 1 X 1 X = y(δE (s)) + y(δE (v)) + y(E(v, V −Lbud (v))) + slacky (s), (L−Λ) 2 2 2 nonspcl special s∈SΛ s∈S −SΛ v∈R v∈R where (2) follows from Fact 5.1 due to the assumption that Λ is compatible, and (1) follows from the following equation: [ [ E(w, Lbud = E(b, Rspecial (b)). (L−Λ) (w)) w∈Rspecial b∈Lbud (L −Λ) This equation is based on some observations. First, the set on the right-hand side is clearly a subset of the set on the left-hand side. Conversely, consider a link wa in the set on the left-hand side, where w ∈ Rspecial and a ∈ Lbud (w). Since w is an ancestor of a and w is not on the tree-path of (L−Λ) 10 the link buddylk(a), by Fact 2.3, we have w is in Rspecial (a), i.e., wa ∈ E(a, Rspecial (a)). Hence, the link wa belongs to the set on the right-hand side as well. Thus, the expression for 23 y(E) can be written as 3 3 1 = y(E(Λ)) + y(E(Λ, L−Λ)) + 2y(E(L−Λ)) − y(E reg (L−Λ)) 2 2 2 1 + y(E(V −L)) + y(E(V −L, Λ)) + y(E(V −L, L−Λ)) 2 X 1 X 1 X 1 X y(δE (v)) + y(E(v, V −Lbud (v))) + + y(δE (s)) + slacky (s) (L−Λ) 2 2 2 nonspcl special s∈SΛ s∈S −SΛ v∈R v∈R 3  1 1 X = y(E(Λ)) + y(E(Λ, L−Λ)) + y(E(Λ, V −L)) + y(δE (s)) 2 2 2 s∈SΛ   + y(E(L−Λ, Λ)) + 2y(E(L−Λ)) + y(E(L−Λ, V −L)) X 1 1 X 1 X slacky (s) + y(E(V −L)) + y(δE (v)) + y(E(v, V −Lbud (v))) + (L − Λ) 2 2 2 nonspcl special s∈S −SΛ v∈R v∈R 1 − y(E reg (L−Λ)) 2 X 1 = lbd y (Λ) + y(δE (v)) + y(E(V −L)) 2 v∈L−Λ X 1 X 1 X (v))) + slacky (s) + y(δE (v)) + y(E(v, V −Lbud (L − Λ) 2 2 nonspcl special s∈S −SΛ v∈R v∈R 1 − y(E reg (L−Λ)) 2 P By Lemma 4.3, we have y(δE (v)) = 1 for any v ∈ L. Hence, we replace the term v∈L−Λ y(δE (v)) (the 2nd term in the displayed equation above) by |L−Λ|. Moreover, by Lemma 4.4, we have y| reg y|E(L) is in the matching polytope of (L, E(L)). Thus, E (L−Λ) is in the matching polytope of 1+ 1+ creg |. We derive the inequality (stated (L−Λ, E reg (L−Λ)), which implies y(E reg (L−Λ)) ≤ (1+)|M (L−Λ) in the lemma) by replacing the term − 21 y(E reg (L−Λ)) (the last term in the displayed equation above) creg |. Now, observe that |L−Λ| − 1 (1 + )|M creg | = |U b(L−Λ) | + 3 |M creg | − by − 12 (1 + )|M 2 2 (L−Λ) (L−Λ) (L−Λ) reg reg 1 c b c 2 ()|M(L−Λ) |, because U(L−Λ) = (L−Λ)−{v ∈ V : v is an end of some link ` ∈ M(L−Λ) }. Note  creg creg | ≤ 1 |L| = 1 P that |M v∈L y(δE (v)) ≤ y(E), hence, − 2 |M(L−Λ) | ≥ −y(E). Thus, we get our 2 2 (L−Λ) potential function: 3 ( + )y(E) 2 ≥ 3 creg b(L−Λ) | + lbd y (Λ) + 1 y(E(V −L)) |M(L−Λ) | + |U 2 2 1 X 1 X + y(δE (v)) + y(E(v, V −Lbud (L−Λ) (v))) + 2 2 nonspcl special v∈R v∈R 6. Algorithm and credits I: Preprocessing steps We state our main result for (unweighted) TAP: 11 X s∈S −SΛ slacky (s).  1 + 1}. Let y denote an Theorem 6.1. Let  > 0 be any (small) constant, and let t ≥ max{17, 2 3 optimal solution of Last (LP0 ). The integrality ratio of Last (LP0 ) is ≤ 2 + . Moreover, there is a polynomial-time algorithm for TAP that finds a feasible solution (a set of links that covers the tree T ) of size ≤ ( 23 + )y(E). For the rest of this paper, we let y ∈ RE denote an optimal solution of Last (LP0 ), where t ≥ 1 max{17, 1 + 2 }, where  > 0 is any constant. Our goal is to show that our algorithm finds a set of links that covers T of size ≤ ( 32 + )y(E). We achieve this goal using our potential function (this is the right-hand side of the inequality in Lemma 5.2); we will “fix” the potential function below by creg , U b(L−Λ) ). Recall from Part I (Section 6) that the defining the relevant terms (namely, Λ, M (L−Λ) potential function provides credit to the algorithm. Also, recall from Part I (Section 6) that the combinatorial algorithm is a greedy-type iterative algorithm that makes a leaves-to-root scan over the tree T and (incrementally) constructs a set of links F that covers T . The algorithm starts with F := ∅, at each step it adds one or more links to F (it never removes links from F ), and at termination, it outputs a cover F of T whose size is ≤ the potential function. The algorithm incurs a cost of one unit for every link that it picks, and it incurs a cost of one unit for each new compound node that it creates in the execution. The key to the analysis is to show that for each step, the cost incurred is compensated by a part of the credit. We mention that (with one exception, see Lemma 8.3) the nodes or links that get contracted into a compound node are no longer relevant for the algorithm or the analysis. In particular, the credit (if any) of such nodes or links may be used at the step when they get contracted into a compound node, but after that step, any remaining credit of such nodes or links is not used at all. 0 denote the path of T 0 between u For the current tree T 0 = T /F and nodes u, w of T 0 , let Pu,w and w. By a fitting cover of a rooted tree Tv0 ⊆ T 0 we mean a set of links J that covers all of the 0 = Tv0 . tree-edges of Tv0 but does not cover any other tree-edge; thus, we have ∪uw∈J Pu,w 6.1. Semiclosed trees. We recall the notion of a semiclosed tree w.r.t. an arbitrary matching. This notion is due to Even, et al., based on earlier work by Nagamochi [6]; also, see [5, Definition 2.3]. Let Tv0 be a rooted subtree of the current tree T 0 = T /F . Let M̄ be an arbitrary matching of the leaf-to-leaf links. Tv0 is called semiclosed w.r.t. M̄ if the following conditions hold: (i) Each link in M̄ either has both ends in Tv0 or has no end in Tv0 . (ii) Every link incident to an M̄ -exposed leaf of Tv0 has both ends in Tv0 . Let M̄ (Tv0 ) denote the set of links in M̄ that have both ends in Tv0 . We define [ Γ(M̄ , Tv0 ) := M̄ (Tv0 ) {up(w)w : w is an M̄ -exposed leaf in Tv0 }; thus, we associate a “basic link set” with the pair M̄ , Tv0 . In general, the “basic link set” may not be a cover of Tv0 . By a minimally semiclosed tree Tv0 we mean that Tv0 is semiclosed but none of the proper rooted subtrees of Tv0 is semiclosed. Lemma 6.2 (Even, et al., [5]). Let Tv0 be a minimally semiclosed tree w.r.t M̄ . Then Γ(M̄ , Tv0 ) is a fitting cover of Tv0 . 6.2. Maximum matching. Our algorithm and analysis are based on a maximum matching of the leaf-to-leaf links that are neither twin links nor buddy links. Let M denote one such matching; thus, M is a maximum matching of the subgraph (L, E reg (L)). By an M -link we mean a link that is in M . We denote the set of M -exposed leaf nodes by U . 12 The image of M w.r.t. T 0 is {u0 w0 : uw ∈ M, u0 6= w0 }, where u0 , w0 denote the images (w.r.t. of the original nodes u, w of T (i.e., we have u0 = u if u is an original node of T 0 , otherwise, u0 denotes the compound node of T 0 that contains u; w0 is defined similarly). We abuse the notation and use M to denote both M and its image w.r.t. T 0 , and by an M -link of T 0 we mean the image (w.r.t. T 0 ) of an original M -link. For the rest of the paper, unless mentioned otherwise, a semiclosed tree means a subtree that is semiclosed w.r.t. the matching M . T 0) 6.3. Bad 2-stem trees. Let Tv be a semiclosed tree rooted at v that has exactly two stems s1 , s2 and four leaves, where we denote the leaves of the tree Tsi by ui , wi for i = 1, 2. By a leafy 3-cover of Tv we mean a set of three links J such that J covers Tv , one of the links in J has one end in Tv and one end in L−L(Tv ), and the other two links in J have both ends in Tv . We call Tv a bad 2-stem tree if (i) one of the links in E({u1 , w1 }, {u2 , w2 }) is in M , (ii) two of the leaves are M -exposed, (iii) one of the leaves is incident to all the links in E({u1 , w1 }, {u2 , w2 }) (thus E({u1 , w1 }, {u2 , w2 }) has one or two links), (iv) there exists a cover of Tv of size three, and (v) there exists no leafy 3-cover of Tv . Let us fix the notation such that w1 w2 is the unique M -link in E(L(Tv )); thus, u1 and u2 are M -exposed (see Figure 4). By a maximal bad 2-stem tree Tv we mean a bad 2-stem tree that is not a proper subtree of another bad 2-stem tree. (Thus, any tree Tq rooted at a proper ancestor q of v (if q exists) must violate one of the conditions for being a bad 2-stem tree.) v s1 u1 s2 w1 w2 u2 Figure 4. Illustration of a bad 2-stem tree. The dashed lines indicate links and the thick dashed line indicates an M -link. Let F prep = {Tv1 , . . . , Tvk } denote the set of maximal bad 2-stem trees S of T ; clearly, any two treesSin F prep are disjoint, by Property 2.1. We use V (F prep ) to denote Tv ∈F prep V (Tv ). We define Λ = Tv ∈F prep L(Tv ), that is, Λ consists of all the leaves of all the trees in F prep . Since each bad 2-stem tree has a cover of size 3, the shadow-closed property implies that each bad 2-stem tree has a fitting cover of size ≤ 3. Our algorithm applies a preprocessing step that contracts each tree Tv ∈ F prep by a fitting cover of size ≤ 3. Preprocessing step 1 (Λ-contraction): For every tree Tv ∈ F prep , add a fitting cover of Tv of size ≤ 3 to F and contract Tv to a compound node. The cost incurred for this step is ≤ 4|F prep |, since each tree in F prep incurs a cost of ≤ 3 for its fitting cover and a cost of 1 for the resulting compound node. This cost is charged to one part of our potential function, namely, it is charged to X 1 y(δE (v)). lbd y (Λ) + 2 nonspcl prep ∩V (F v∈R Lemma 6.6 below shows that this quantity is ≥ 4|F prep |. 13 ) Remark 6.3. The results in this section show that Λ-contraction is valid, in the sense that the algorithm has sufficient credits to pay for the cost of this step. Moreover, Λ-contraction is essential for the overall analysis (i.e., the algorithm cannot skip Λ-contraction), because the proof of Theorem 8.7 (Subcase 2.2) relies on Λ-contraction. Lemma 6.4. Let F prep and Λ be as defined above. Then, we have lbdy (Λ) + ≥ X Tv ∈F prep 1 2 X y(δE (v)) v∈Rnonspcl ∩V 3 (F prep ) 1 1 y(E(L(Tv ))) + y(E(L(Tv ), L−L(Tv ))) + y(E(L(Tv ), V −L)) + 2 2 2 X u∈V (Tv )−L  y(δE (u)) P Proof. Recall that lbd y (Λ) denotes 32 y(E(Λ))+ 21 y(E(Λ, L−Λ))+y(E(Λ, V −L))+ 21 s∈SΛ y(δE (s)). Observe that a bad 2-stem tree has no buds, so every node of such a tree is either a leaf, or a stem, or a node of Rnonspcl . Hence, (Rnonspcl ∩ V (F prep )) ∪ SΛ = [ (V (Tv )−L) Tv ∈F prep and so we have 1 2 X v∈Rnonspcl ∩V y(δE (v)) + 1 X y(δE (s)) = 2 s∈SΛ (F prep ) X Tv ∈F prep 1 2 X y(δE (u)). u∈V (Tv )−L We need the following claim to prove the lemma. Claim 6.5. Let Λ1 , Λ2 , . . . , Λk be a partition of Λ. Then, we have 3 1 y(E(Λ))+ y(E(Λ, L−Λ)) + y(E(Λ, V −L)) 2 2 k k k X 3X 1X ≥ y(E(Λi )) + y(E(Λi , L−Λi )) + y(E(Λi , V −L)). 2 2 i=1 i=1 i=1 We partition Λ into the sets Λi = L(Tvi ), where Tv1 , . . . , Tvk are the maximal bad 2-stem trees in F prep . Then, we have lbd y (Λ) + 1 2 X v∈Rnonspcl ∩V y(δE (v)) (F prep ) X 1 X 3 1 = y(E(Λ)) + y(E(Λ, L−Λ)) + y(E(Λ, V −L)) + y(δE (u)) 2 2 2 prep Tv ∈F u∈V (Tv )−L X 3 X 1 1 y(E(L(Tv ))) + y(E(L(Tv ), L−L(Tv ))) + y(E(L(Tv ), V −L)) + ≥ 2 2 2 prep Tv ∈F 14 u∈V (Tv )−L  y(δE (u)) . To prove the claim, observe that 3 1 y(E(Λ)) + y(E(Λ, L−Λ)) + y(E(Λ, V −L)) 2 2 k k k k 3 X  1X X 1 XX ≥ y(E(Λi , Λi )) + y(E(Λi , Λj )) + y(E(Λi , L−Λ)) + y(E(Λi , V −L)) 2 2 2 i=1 = i=1 j6=i i=1 k k k i=1 i=1 i=1 i=1 X 1X 3X y(E(Λi )) + y(E(Λi , L−Λi )) + y(E(Λi , V −L)). 2 2 Lemma 6.6. Let Tv be a bad 2-stem tree. Then we have  1   1 3 y E(L(Tv )) + y E(L(Tv ), L−L(Tv )) + y E(L(Tv ), V −L) + 2 2 2 Hence, we have lbdy (Λ) + 1 2 X v∈Rnonspcl ∩V (F prep )  X u∈V (Tv )−L y(δE (u)) ≥ 4. y(δE (v)) ≥ 4|F prep |. Proof. The second statement follows immediately from the first statement and Lemma 6.4. We focus on the first statement. Let s1 , s2 denote the two stems in Tv , and let u1 , w1 (respectively, u2 , w2 ) denote the two leaves in Ts1 (respectively, Ts2 ). Thus, L(Tv ) = {u1 , w1 , u2 , w2 }. W.l.o.g. let w1 w2 denote the unique M -link in E(L(Tv )); the two twin links u1 w1 , u2 w2 are also in E(L(Tv )), and E(L(Tv )) may contain one other link incident to w1 or w2 ; there is no link between u1 and u2 (see Figure 4). Note that every link incident to u1 or u2 (the M -exposed leaves of Tv ) must have both ends in Tv , since Tv is semiclosed w.r.t. M .   S Let J denote the set of links incident to the leaves of Tv , thus, J = i=1,2 δE (ui ) ∪ δE (wi ) . For any feasible solution x of (LP0 ), Lemmas 4.3 Pimpliesithat |ones(x)i ∩ J| ≤ 4. Hence, byi Theorem 4.1, y can be written as a convex combination i∈Z λi x such that x ∈ Las3 (LP0 ) and x |J is integral, ∀i ∈ Z. (In what follows, we have to apply Lemma 4.6 to xi , hence, xi must be feasible for level 3 (or higher) of the Lasserre tightening.) Thus, it suffices to show that for any i ∈ Z, we have  1     1 X 3 i x E(L(Tv )) + xi E(L(Tv ), L−L(Tv )) + xi E(L(Tv ), V −L) + xi (δE (u)) ≥ 4; 2 2 2 u∈V (Tv )−L let α denote the left-hand side of the above inequality. Observe that every link in J with positive xi -value must have xi -value one. Suppose that one of the links ` ∈ E(L(Tv )) has positive xi -value, thus xi (`) = 1; then, we have 32 xi (E(L(Tv ))) ≥ 32 , thus ` contributes value 23 to α. Also, if one of the links ` with one end in L(Tv ) and the other end at a nonP leaf node of Tv has positive xi -value, then we have xi (E(L(Tv ), V −L))+ 21 u∈(V (Tv )−L) xi (δE (u)) ≥ 1 + 21 = 23 , thus, ` contributes value 32 to α. We complete the proof by case analysis, by considering the number of links with positive xi -value such that one end is in L(Tv ) and the other end is not in Tv . Case 1.: Suppose that there are no links with positive xi -value such that one end is in L(Tv ) and the other end is not in Tv . Then, we focus on the number of links in E(L(Tv )) that have positive xi -value; this number is zero, one, or two, because every link incident to a leaf 15 has xi -value zero or one, and moreover, xi (δE (u)) = 1 for each leaf u of Tv , by (LP0 ) and Lemma 4.3. Thus, we have three subcases. Subcase 1.1.: xi (E(L(Tv ))) = 0. Every link of xi -value one incident to a leaf of Tv has its other end at a non-leaf node of Tv , hence, each such link contributes 23 to α; we have four such links, so α ≥ 6. Subcase 1.2.: xi (E(L(Tv ))) = 1. The link ` in E(L(Tv )) with xi -value one contributes 23 to α. The two leaves in L(Tv ) that are not incident to ` each contribute 32 to α, because each is incident to a link of xi -value one that has its other end at a non-leaf node of Tv , hence, α ≥ 29 . Subcase 1.3.: xi (E(L(Tv ))) = 2. Since xi (δE (u)) = 1 for each leaf u of Tv , the links in E(L(Tv )) with xi -value one share no ends. By the definition of bad 2-stem trees, all the links in E({u1 , w1 }, {u2 , w2 }) are incident to one of the four leaves. It follows that the twin links u1 w1 and u2 w2 both have xi -value one, and each contributes 23 to α. Next, up (s )) ≥ xi (u w ) = 1 for j = 1, 2. Thus, focus on the stems in Tv ; by Lemma 4.6, xi (δE j P j j each stem contributes at least 12 to α via the term 21 u∈(V (Tv )−L) xi (δE (u)). Hence, α ≥ 2( 32 ) + 2( 12 ) = 4. Case 2.: Suppose that there is at least one link with positive xi -value such that one end is in L(Tv ) and the other end is not in Tv . Again, we focus on the number of links in E(L(Tv )) that have positive xi -value; it can be seen that this number is zero or one. (Note that every link incident to a leaf has xi -value zero or one, and moreover, for every leaf u of Tv , we have xi (δE (u)) = 1.) Thus, we have two subcases. Subcase 2.1.: xi (E(L(Tv ))) = 0. Every link of xi -value one incident to u1 or u2 (the M exposed leaves of Tv ) has its other end at a non-leaf node of Tv , hence, each such link contributes 23 to α; we have two such links. Every link of xi -value one incident to w1 or w2 (the M -covered leaves of Tv ) has its other end either in V −L, and so contributes 1 to xi (E(L(Tv ), V −L)), or else has its other end in L−L(Tv ), and so contributes 21 to 1 i 3 1 2 x (E(L(Tv ), L−L(Tv ))); again, we have two such links. Hence, α ≥ 2( 2 ) + 2( 2 ) = 4. i i Subcase 2.2.: x (E(L(Tv ))) = 1. Let `v denote a link of positive x -value such that one end is in L(Tv ) and the other end, denoted by q, is not in Tv . Note that xi (`v ) = 1. The end of `v in L(Tv ) must be M -covered; w.l.o.g. assume that this node is w1 . Note that xi (δE (u)) = 1 for each leaf u of Tv . Since Tv is a bad 2-stem tree, the links in E(L(Tv )) that are not incident to w1 are the twin link u2 w2 and possibly the link u1 w2 (there is no link between u1 , u2 ). Thus, either xi (u2 w2 ) = 1 or xi (u1 w2 ) = 1, and this contributes 32 to α via the term 23 xi (E(L(Tv ))). In either case, one of the M -exposed leaves u1 or u2 is incident to a link of xi -value one that has its other end at a non-leaf node of Tv , and this contributes 32 to α via the term xi (E(L(Tv ), V −L)) + 1P i u∈(V (Tv )−L) x (δE (u)). 2 We have two subcases, depending on whether q (the end of `v in V −V (Tv )) is a leaf or not. Subcase 2.2.1.: q ∈ / L. Then, the link `v = w1 q contributes 1 to α via the term xi (E(L(Tv ), V −L)). Then, we have α ≥ 23 + 32 + 1 = 4. Subcase 2.2.2.: q ∈ L. Then, the link `v = w1 q contributes 21 to α via the term 1 i 2 x (E(L(Tv ), L−L(Tv ))). Moreover, observe that we cannot have xi (u1 w2 ) = 1, otherwise the three links `v = w1 q, u1 w2 , u2 w2 form a leafy 3-cover of Tv (see Figure 5(a)); recall that a bad 2-stem tree cannot have a leafy 3-cover. 16 (a) q v s1 u1 w1 (b) s2 w2 q v s1 u2 u1 w1 s2 w2 u2 Figure 5. Illustration of leafy 3-covers of Tv for Subcase 2.2.2 in the proof of Lemma 6.6. The dashed lines indicate links and the thick dashed lines indicate M -links. Thus, u2 w2 is the unique link in E(L(Tv )) with xi -value one. Now, focus on the up (s )) ≥ xi (u w ) = 1. Thus, δ up (s ) contributes at stem s2 ; by Lemma 4.6, xi (δE 2 2 2 2 E 1 1P least 2 to α via the term 2 u∈(V (Tv )−L) xi (δE (u)). Finally, note that u1 s2 is not present; otherwise, we would have a leafy 3cover consisting of the (hypothetical) link u1 s2 and the links `v = w1 q, u2 w2 (see up (s ). Figure 5(b)). Hence, the link of xi -value one incident with u1 is not in δE 2 3 1 1 3 Thus, we have α ≥ 2 + 2 + 2 + 2 = 4. This completes the case analysis, and completes the proof.  6.4. Credit assignment for the algorithm and the preprocessing. Recall that the algorithm starts with a number of credits equal to the potential function, namely, the right-hand side of the inequality in Lemma 5.2. In order to specify the potential function, we need to specify creg , U b(L−Λ) . We take M creg M to be M ∩ E(L−Λ), i.e., the restriction of M to the subgraph (L−Λ) (L−Λ) (L−Λ, E reg (L−Λ)). It can be seen that M ∩ E(L−Λ) = M −E(Λ) is a maximum matching of the creg b(L−Λ) subgraph (L−Λ, E reg (L−Λ)), as required by the definition of M in Section 5. We take U (L−Λ) b(L−Λ) in Section 5. to be U ∩ (L−Λ); again, this agrees with the definition of U The cost of Λ-contraction (Preprocessing step 1) is ≤ lbd y (Λ) + 1 2 X u∈Rnonspcl ∩V y(δE (u)), (F prep ) where F prep is defined above. We subtract this quantity from our potential function, and then add the credit of the compound nodes formed by contracting the trees Tv ∈ F prep , to get the remaining potential function (i.e., total credits available) for the rest of the execution. Clearly, the remaining potential function is 3 |M ∩ E(L−Λ)| + |U ∩ (L−Λ)| + |F prep |+ 2 X X 1 1 1 X y(E(V −L)) + y(δE (u)) + y(E(u, V −Lbud (u))) + slacky (s) (L − Λ) 2 2 2 nonspcl prep special s∈S −SΛ u∈(R −V (F )) u∈R 17 By the integral potential function we mean the sum of the first three terms above (namely, ∩ E(L−Λ)| + |U ∩ (L−Λ)| + |F prep |), and by the fractional potential function we mean the sum of the remaining terms (namely, the sum of the four terms that use y). The following observation is useful for simplifying our notation. 3 2 |M Fact 6.7. For the current tree T 0 (after Λ-contraction), U ∩ (L−Λ) is the same as the set of M exposed original leaves, and M ∩ E(L−Λ) = M (T 0 ). We start with the credit given by the integral potential function, and we maintain the following assignment of credits to the nodes of T 0 and the links of M (T 0 ) = M ∩ E(L−Λ): • • • • every M -exposed original leaf has one credit, every compound node has one credit, every link of M (T 0 ) has 23 credit, and the root r has one credit. It can be seen that the integral potential function suffices for assigning credits to the tree T 0 that results from Λ-contraction. (See Part I (Section 6) for a discussion on the unit credit for the root r.) We define the integral credit S of a set of links J (w.r.t. T 0 ) to be the sum of the credits of the 0 ), plus the sum of the (integral) credits of the nodes 0 M -links pq such that V (Pp,q ) ⊆ uw∈J V (Pu,w S S 0 . 0 in uw∈J V (Pu,w ), plus one if r occurs as an original node in uw∈J Pu,w In otherSwords, the integral credit of J is the sum of 23 times theSnumber of M -links pq such that 0 0 0 )⊆ the number V (Pp,q uw∈J V (Pu,w ), plusS uw∈J V (Pu,w ), plus the number of compound nodes in 0 . of M -exposed original leaves in the same set, plus one if r occurs as an original node in uw∈J Pu,w Informally speaking, when a step of the algorithm contracts all the links in J, then this amount of integral credit is available for this step (but not for subsequent steps). Now, consider the fractional potential function. We use it to maintain an assignment of fractional credits to the (rooted) subtrees of T 0 . For any subtree Tv0 of T 0 , observe that V (Tv0 ) ∩ (Rnonspcl −V (F prep )) = V (Tv0 ) ∩ Rnonspcl , because none of the original nodes in V (F prep ) is present in T 0 after the Λ-contraction; similarly, we have V (Tv0 ) ∩ (S−SΛ ) = V (Tv0 ) ∩ S, because none of the stems in SΛ is present in T 0 after the Λ-contraction. For any subtree Tv0 of T 0 and for any vector x ∈ RE , we use Φ(x, Tv0 ) to denote 1 x(E((V −L) ∩ V (Tv0 ), (V −L) ∩ (V (T 0 )−V (Tv0 ))))+ 2 X X 1 1 x(δE (u)) + x(E(u, V −Lbud (L−Λ) (u))) + 2 2 0 nonspcl 0 special u∈V (Tv )∩R u∈V (Tv )∩R X s∈V slackx (s). (Tv0 )∩S The first term is defined on links that have both ends at original non-leaf nodes of T 0 , and moreover, have exactly one end in Tv0 . Similarly, the last three terms denote credits that are assigned to original nodes in Tv0 . We mention that the credits given by these four terms cannot be used two or more times by the algorithm. This holds because all credit (integral or fractional) associated with an original node of T 0 can be used by a step that first contracts the original node to a new compound node; after that, none of the credit associated with this original node is available (any original node contained in a compound node is essentially “invisible” to the algorithm). Informally speaking, Φ(y, Tv0 ) denotes the fractional credit of Tv0 , that is, the part of the fractional potential function that is “owned” by Tv0 . The fractional credit of Tv0 will be used together with its integral credit for contracting Tv0 . 18 6.5. Second preprocessing step. We apply a second preprocessing step after the Λ-contraction and before the main loop of the algorithm. It turns out that the set of nodes contracted by this step is disjoint from the set of nodes contracted by the Λ-contraction. Let b0 be a bud, let b1 b2 = buddylk(b0 ), and let s denote the stem such that b0 is a leaf of Ts ; w.l.o.g. let b1 be the other leaf of Ts . Moreover, if b1 is also a bud, then we assume w.l.o.g. that up(b0 ) is an ancestor of up(b1 ). Preprocessing step 2: For each bud b0 and the two ends b1 , b2 of buddylk(b0 ) such that all three of b0 , b1 , b2 are M -exposed, we contract the two links up(b0 )b0 and b1 b2 . Fact 6.8. Preprocessing step 2 has sufficient credits. Proof. Consider one “triple” consisting of a bud b0 and the two ends b1 , b2 of buddylk(b0 ) such that b0 , b1 , b2 are M -exposed. Note that each of the M -exposed leaves b0 , b1 , b2 has 1 unit of credit. Thus, we have sufficient credit for contracting two links and forming one compound node.  Remark 6.9. The results in this section show that Preprocessing step 2 is valid, in the sense that the algorithm has sufficient credits to pay for the cost of this step. Moreover, Preprocessing step 2 is essential for the overall analysis (i.e., the algorithm cannot skip this step), because the proof of Lemma 8.3 relies on this step. 7. Algorithm and credits II: Overall algorithm We present pseudo-code for the overall algorithm, after discussing some preliminaries. Also, we state and prove several assertions, i.e., we prove some basic properties maintained by the algorithm. These assertions are critical for the analysis in the next section. 7.1. (Up-to-5) greedy contractions and assertions on M . Recall that credit of a Sthe integral 0 ), plus the 0 )⊆ V (P set of links J is given by the credits of the MS-links pq such that V (Pp,q u,w uw∈J 0 ), plus one if r occurs as an original node sum of the (integral) credits of the nodes in V (P u,w uw∈J S 0 . in uw∈J Pu,w We define an (up-to-5) greedy contraction to be a contraction of a set of links J such that (i) |J| ≤ 5; S 0 forms a connected (ii) the contraction of J results in a single compound node, i.e., uw∈J Pu,w graph; (iii) the integral credit of J is ≥ |J| + 1. Clearly, if an (up-to-5) greedy contraction is applicable, then, in polynomial time, the algorithm can find a set of links J that is eligible for this step (by examining all link sets of size ≤ 5). Remark 7.1. Clearly, the algorithm has sufficient credit for every application of (up-to-5) greedy contraction. The overall analysis relies on repeatedly applying (up-to-5) greedy contractions until no such contractions are applicable. In fact, every lemma/theorem in Section 8 assumes that no (up-to-5) greedy contractions are applicable. The following assertion is similar to Lemma 6.3 of Part I. Lemma 7.2 (Assertions on M ). Suppose that no (up-to-5) greedy contractions are applicable. Then: 0 (1) For every M -link uw, every node in Pu,w is an original node. In particular, w.r.t. T 0 , both ends of each M -link are original leaf nodes. (2) There exist no links between M -exposed leaves of T 0 . 19 7.2. Good semiclosed trees. Let Tv0 be a (rooted) subtree of T 0 . Let U (Tv0 ) denote the set of M -exposed leaves of Tv0 (including both original nodes and compound nodes). Let C(Tv0 ) denote the set of compound non-leaf nodes of Tv0 . Recall thatSM (Tv0 ) denotes the set of M -links that have both ends in Tv0 . Note that every node in (V (Tv0 ) ∩ R) (V (Tv0 ) ∩ S) is an original node. Recall that a semiclosed tree means a tree that is semiclosed w.r.t. the matching M , unless mentioned otherwise. After the preprocessing steps, whenever we mention semiclosed trees, we assume that no (up-to-5) greedy contractions are applicable (see Section 7.1). Then, Lemma 7.2(1) implies that M is a set of leaf-to-leaf links w.r.t. the current tree T 0 . Hence, semiclosed trees (of T 0 w.r.t. M (T 0 )) are well defined. We define the credit of a (rooted) subtree Tv0 of the current tree T 0 to be the sum of the fractional credit of Tv0 , namely, Φ(y, Tv0 ), and the integral credit of Tv0 . The latter is given by the sum of the following terms: 23 |M (Tv0 )|, the number of compound nodes in Tv0 , the number of M -exposed original leaves in Tv0 , and an additional one if the root r is in V (Tv0 ) ∩ R. We call a semiclosed tree Tv0 good if its credit is ≥ |Γ(M, Tv0 )| + 1. The next result can be proved using arguments similar to the arguments used for proving Lemma 6.4 of Part I (although the potential function and credits in Parts I and II are different). Lemma 7.3. Let Tv0 be a semiclosed tree. If at least one of the following conditions is satisfied, then Tv0 is good. • • • • • Tv0 = T 0 C(Tv0 ) 6= ∅ |M (Tv0 )| ≥ 2 Φ(y, Tv0 ) ≥ 1 |M (Tv0 )| = 1 and Φ(y, Tv0 ) ≥ 21 . 7.3. Summary of the algorithm. We start with F := ∅ (F is the set of links picked by the algorithm) and T 0 := T (T 0 is the current tree T /F ). apply Preprocessing step 1 (Λ-contraction); apply Preprocessing step 2; while T 0 is not a single node do repeatedly apply (up-to-5) greedy contractions until no such contractions are applicable; find a good semiclosed tree Tv0 with a fitting cover J of size |Γ(M, Tv0 )| (Algorithm 2 in Section 8 presents the details for finding such a semiclosed tree); add J to F , contract Tv0 to a new compound node, update T 0 ; end Algorithm 1: Find an approximately optimal solution for TAP. 7.4. Stem assertion of the algorithm. This section presents a basic assertion that is important for our analysis. Recall that the algorithm iteratively contracts a set of links such that the tree-paths associated with these links form a connected graph; the set of chosen links and their associated tree-paths are 0 contracted to form a new compound node. When we say that a contraction hits S a node v0 of T , we mean that a step of the execution contracts a set of links J such that v is in uw∈J V (Pu,w ); thus, at least one of the tree-edges incident with v is covered by one of the links in J. Stem assertion: Let s be a stem. The first contraction that hits a node of Ts (during the execution of the algorithm) must hit s. Property 7.4. The algorithm maintains the stem assertion. 20 Proof. Let s be a stem. First, consider the two preprocessing steps. Either all of the tree Ts is contracted or none of the tree-edges of Ts is contracted by Preprocessing step 1 (Λ-contraction). The same statement holds for Preprocessing step 2. Hence, the stem assertion is maintained by the two preprocessing steps. Next, suppose that the first contraction (in the execution) that hits a node in Ts is an (up-to5) greedy contraction that contracts a set of links J. If one of the links uw ∈ J has one end 0 in Ts and the other end not in Ts , then the tree path Pu,w (in the current tree w.r.t. the first contraction that hits a node of Ts ) must contain s, hence, the stem assertion is maintained. The remaining possibility is that all links of J have both ends in Ts . Then observe that the number of integral credits available in Ts is either zero, one, or two, and, in the last case, both leaves of Ts are M -exposed. (By definition of stem, the root r is not in Ts , since r 6= s.) The greedy contraction of J requires |J| + 1 integral credits. Thus, |J| = 1 and J contains the twin link of s. Contracting the twin link clearly maintains the stem assertion. Finally, suppose that the first contraction (in the execution) that hits a node in Ts is the contraction of a good semiclosed tree Tv0 . By Property 2.1, one of Ts , Tv0 is contained in the other. It is easily seen that no proper subtree of Ts is a semiclosed tree. (Note that there is a sublink between each leaf of Ts and s via the twin link of s, hence, any semiclosed tree containing a leaf of Ts that is M -exposed will contain s too. Also, any semiclosed tree containing a leaf of Ts that is M -covered will contain s too.) The only remaining possibility is that Tv0 contains Ts ; then, the contraction of Tv0 maintains the stem assertion.  8. Analysis of the algorithm and deficient trees This section has our main results. Informally speaking, the key result (Theorem 8.7) asserts the following: if a semiclosed tree Tv0 is not good, then either Tv0 is a deficient tree (defined below) or Tv0 is a particular type of tree that is easily bypassed by our analysis. The analysis consists of two parts. In Section 8.2, using local integrality of feasible solutions to the Lasserre system, we show that all semiclosed trees are good, except for a few cases. The nontrivial cases give deficient trees. Section 8.3 shows how to handle deficient trees. This leads to an efficient algorithm for finding a good semiclosed tree together with a fitting cover of appropriate size. Deficient 3-leaf tree: Suppose that Tv0 is a semiclosed tree with exactly three leaves a, b1 , b2 . Clearly, among the nodes w of Tv0 either there is exactly one node with degT 0 (w) = 4 or there are two nodes with degree 3 in T 0 . In the latter case, we denote these two nodes by u and q; moreover, we fix the notation such that u is an ancestor of q, and the leaf b1 is not a descendant of q; thus, a, b2 (but not b1 ) are descendants of q. In the former case, we denote by u the unique node that is incident to four tree-edges. We call Tv0 a deficient 3-leaf tree (see Figure 6) if (i) the link b1 b2 is present and it is in M (T 0 ), (ii) the link ab1 is present, and (iii) there exists a link b2 w such that w ∈ V (T 0 )−V (Tv0 ). Moreover, in the first case (with a unique node u in Tv0 with degT 0 (u) = 4), if conditions (i)–(iii) hold with both labelings (b1 , b2 ) and (b2 , b1 ) of the M -link, then we fix the notation such that up(b2 ) is an ancestor of up(b1 ). For both cases, we call b2 the ceiling leaf of Tv0 . Deficient 4-leaf tree: Let Tv0 be a semi-closed tree with 4 leaves and exactly one stem node s such that all nodes in Ts0 are original, |M (Tv0 )| = 1, and the link in M (Tv0 ) has exactly one end in Ts0 . Let the four leaves of Tv0 be a, b1 , b2 , c, let the two leaves of Ts0 be a, b1 , and let the link in M (Tv0 ) be b1 b2 . Note that c is the M -exposed leaf of Tv0 that is not in Ts0 . Let p be the least common ancestor of s and c. Then, Tv0 is called a deficient 4-leaf tree (see Figure 7) if (i) Tp0 contains all leaves of Tv0 , (ii) the link cs is present, and (iii) there exists a link b2 w such that w ∈ V (T 0 )−V (Tv0 ). We call the link cs the latch of Tv0 . 21 v (a) v (b) u u b2 q b1 a b1 a b2 Figure 6. Illustration of deficient 3-leaf tree. The dashed lines indicate links and the thick dashed lines indicate M -links. The contraction of the latch cs in a deficient 4-leaf tree results in a deficient 3-leaf tree due to the presence of the links ab1 , up(b2 )b2 (see Figure 6(a)). Let b be the ceiling leaf of the resulting tree. Clearly, up(b) is an ancestor of up(b2 ). v p v c q q=p u s b2 s b2 b1 a c b1 a Figure 7. Illustration of deficient 4-leaf trees. The dashed lines indicate links and the thick dashed lines indicate M -links. 8.1. Properties from assertions. We start with an observation on compound leaf nodes. The next result (Lemma 8.2) states some properties pertaining to stem nodes and semiclosed trees; these properties are often used in the analysis of the algorithm. The proof relies on the stem assertion. After that we present a key lemma that pertains to some buds (Lemma 8.3); see the discussion preceding that lemma. Fact 8.1. If a compound leaf node contains a node u ∈ V (T ), then that compound node contains Tu . Lemma 8.2. Suppose that no (up-to-5) greedy contractions are applicable. Let Tv0 be a semiclosed tree with C(Tv0 ) = ∅. (1) If Tv0 contains a stem node s, i.e., s ∈ S ∩ V (Tv0 ), then every node in Ts0 is original. (2) In the original tree T , suppose that s is a stem node, and w is a leaf of Ts . If w is contained in a compound node hci that is an M -exposed leaf of Tv0 , then all nodes of Ts are contained in hci. (3) In the original tree T , suppose that s is a stem node, and w is a leaf of Ts . If w is an original M -exposed leaf of Tv0 , then s is an original node of Tv0 . 22 Proof. The first part follows from the stem assertion. Consider the second part. By the stem assertion, and the fact that w is contained in hci, it can be seen that s is contained in some compound node. If s is contained in hci, then the proof is done by Fact 8.1. Now, suppose that s is contained in a different compound node hai. Then, there exists a link between hci and hai (w.r.t. T 0 ), because the link ws is present in E (the input) since ws is a sublink of twinlk(s). It can be seen that Tv0 contains hai as a leaf, because Tv0 is semiclosed, C(Tv0 ) = ∅, hci is an M -exposed leaf of Tv0 , and the link between hci and hai is present. This gives a contradiction because the compound leaf node hai contains s so it contains Ts (by Fact 8.1), hence, hci cannot contain w. The third part follows from arguments similar to that used for the second part; we give a sketch. Suppose that s is contained in a compound node hai. If hai is a leaf of T 0 , then hai would contain the subtree Ts (by Fact 8.1), and this would contradict the fact that the leaf w is an original node. Since C(Tv0 ) = ∅, hai cannot be a non-leaf node of Tv0 . Thus, Tv0 contains w, but it does not contain hai. This contradicts the fact that Tv0 is semiclosed, because there is a link between the M -exposed leaf w of Tv0 and hai (due to the sublink ws of twinlk(s)).  The next lemma addresses a subtle point in our analysis. Consider a semiclosed tree Tv0 and its fractional credit Φ(y, Tv0 ), and observe that the links between a bud b in Tv0 and a node in V (Tv0 ) ∩ Rspecial (b) do not contribute to the fractional credit; see the third term in the definition of Φ(y, Tv0 ) (the last displayed equation in Section 6.4). Nevertheless, under appropriate conditions, we can exhibit fractional credits even when such links are present (see Lemma 8.5 and its proof). In order to do this, we have to focus on buds contained in M -exposed compound leaves such that there exists a link between the bud and a node “outside” the compound leaf (this is one part of the analysis that examines an original node even after it has been contracted into a compound node). The next lemma gives a tool for “counting” such buds, and the lemma is used twice in the subsequent analysis. The first use is in the proof of Lemma 8.4 to show that a semiclosed tree Tv0 with |M (Tv0 )| ≤ 1 has O(1) such buds, and the second use is in the proof of Lemma 8.6 to show that a semiclosed tree Tv0 with M (Tv0 ) = ∅ has no such buds. Lemma 8.3. Suppose that no (up-to-5) greedy contractions are applicable. Let Tv0 be a semiclosed tree with C(Tv0 ) = ∅. Let b0 be a bud that is contained in an M -exposed compound leaf hci of Tv0 such that there exists a link ` incident to b0 that has exactly one end (namely, b0 ) in hci. Let buddylk(b0 ) = b1 b2 , and let b1 b0 be the twin link (w.r.t. T ) incident to b0 . Then, b2 is an original leaf node of Tv0 and b2 is incident to a link of M (Tv0 ). Proof. Let the original ends of ` be b0 , w; thus, w is not contained in hci. Let s be the stem associated with b0 ; note that the leaves of Ts are b0 , b1 . By Lemma 8.2(2), Ts is contained in hci. Since b0 is contained in an M -exposed leaf hci of Tv0 , C(Tv0 ) = ∅, and Tv0 is semiclosed, either up(b0 ) is contained in hci, or up(b0 ) is an original non-leaf node of Tv0 . Clearly, hci cannot contain up(b0 ), otherwise, hci would contain Tup(b0 ) (by Fact 8.1), hence, the link b0 w would be contained in hci. Thus, up(b0 ) is an original non-leaf node of Tv0 . Consider the node b2 . Suppose that b2 is an original leaf node of T 0 . Then, b2 is in Tv0 (since Tv0 is semiclosed), and b2 is M -covered (by Lemma 7.2(2) and the existence of the link b1 b2 ). Moreover, both ends of the M -link incident to b2 are in Tv0 (since Tv0 is semiclosed). Thus, the lemma holds if b2 is an original leaf node of T 0 . Now, we may assume that b2 is contained in a compound node hai. The hypotheses of the lemma imply that hai is a leaf in Tv0 . We must have hai = hci. Otherwise, either hai is M -covered, contradicting Lemma 7.2(1), or hai is M -exposed, contradicting Lemma 7.2(2) because the link b1 b2 implies a link between the M -exposed leaves hai, hci. We conclude that hci contains all three of b0 , b1 , b2 . In what follows, we use this to derive a contradiction to the fact that up(b0 ) is an original non-leaf node in Tv0 . 23 By Preprocessing step 2, one of b0 , b1 , b2 is M -covered w.r.t. T , otherwise, the preprocessing step contracts two links to form a compound node that contains up(b0 ). We have two cases, depending on the M -links incident to b0 , b1 , b2 w.r.t. T . Case 1: There exists an M -link w.r.t. T that has one end b ∈ {b0 , b1 , b2 } and the other end u ∈ L−{b0 , b1 , b2 }. If hci does not contain u, then we get a contradiction to Lemma 7.2(1) (M link incident to compound node). Otherwise, hci contains u, hence, hci contains Pb,u ; note that up(b0 ) is in Pb,u , so hci contains up(b0 ). This is a contradiction. Case 2: Each M -link w.r.t. T incident to one of b0 , b1 , b2 has both ends in {b0 , b1 , b2 }. There is only one such M -link, namely, b0 b2 , since the twin link b0 b1 and the buddy link b1 b2 cannot be in M . Then b0 is an M -covered bud w.r.t. T (see Figure 8). up(b0 ) q s b2 b1 b0 Figure 8. Illustration of an M -covered bud w.r.t. T . We may assume that b0 b2 ∈ M and b1 is M -exposed. Suppose that up(b1 ) is a descendent of up(b0 ); then, b1 is a bud; this follows from the definition of bud (see Section 2). Then, we get a contradiction since b0 b2 ∈ M and b0 b2 = buddylk(b1 ) (M has no buddy links). Hence, up(b1 ) is a proper ancestor of up(b0 ). Thus, up(b0 ) 6= r, and no (rooted) subtree of Tup(b0 ) is semiclosed since b1 is M -exposed. The following claim gives a contradiction and completes the proof of this lemma. Claim. Suppose that b0 b2 is an M -link and b1 is M -exposed. Then, the first contraction that hits a node of Tup(b0 ) (during the execution of the algorithm) must hit up(b0 ). First, consider the two preprocessing steps. Preprocessing step 1 contracts all bad 2-stem trees. Note that no leaf of a bad 2-stem tree is a bud, hence, by Property 2.1, Tup(b0 ) is disjoint from every bad 2-stem tree. Preprocessing step 2 applies when a bud b and the two ends of buddylk(b) are all M -exposed. Since b0 is M -covered, Preprocessing step 2 does not apply to b0 , b1 , b2 . Thus, the contractions in the preprocessing steps do not hit any node of Tup(b0 ) Next, suppose that the first contraction (in the execution) that hits a node in Tup(b0 ) is an (up-to-5) greedy contraction that contracts a set of links J. If one of the links uw ∈ J has one end in Tup(b0 ) and the other end not in Tup(b0 ) , then the contraction must hit up(b0 ), 0 because the tree path Pu,w (in the current tree at that contraction) contains up(b0 ). Thus, the claim holds. The remaining possibility is that all links of J have both ends in Tup(b0 ) . But observe that the number of integral credits available in Tup(b0 ) (in the current tree at that contraction) is exactly 25 (due to one M -link and one M -exposed node), and this does not suffice for contracting two or more links; moreover, no single-link contraction applies because no singleton set J has integral credit > 32 . 24 Finally, suppose that the first contraction (in the execution) that hits a node in Tup(b0 ) is the contraction of a good semiclosed tree Tw0 . By Property 2.1, one of Tup(b0 ) , Tw0 is contained in the other. Since no (rooted) subtree of Tup(b0 ) is semiclosed, it follows that Tw0 contains Tup(b0 ) . Then, the contraction of Tw0 hits up(b0 ). This proves the claim, and completes the proof of the lemma.  8.2. Most semiclosed trees are good. Let Tv0 be a semiclosed tree. Let Lmatched (Tv0 ) denote the set of M -covered leaves of Tv0 . We call a compound node hci of Tv0 open if it is an M -exposed leaf of Tv0 , and moreover, hci contains a bud b0 such that there exists an original link between b0 and an original node that is not contained in hci. We call such a bud an open bud (it must be contained in an open compound node and one of the original links incident to the bud is not contained in the compound node). Let B comp (Tv0 ) denote the set of open buds of Tv0 . Let B orig (Tv0 ) denote the set of original nodes of Tv0 that are M -exposed buds. Let B(Tv0 ) = B orig (Tv0 ) ∪ B comp (Tv0 ). Lemma 8.4. Suppose that no (up-to-5) greedy contractions are applicable. Let Tv0 be a semiclosed tree with C(Tv0 ) = ∅, |M (Tv0 )| ≤ 1 and |S ∩ V (Tv0 )| ≤P2. Then, y can be written as a convex combination i∈Z λi xi such that xi ∈ Las3 (LP0 ) and xi |J is integral, where J = {` ∈ δE (u) : u ∈ (S ∩ V (Tv0 )) ∪ Lmatched (Tv0 ) ∪ B(Tv0 )}. Proof. We claim that |ones(x) ∩ J| ≤ 14 for any feasible solution x of (LP0 ). The conclusion (of the lemma) follows easily from Theorem 4.1 and this claim. To prove the claim, observe that |S ∩ V (Tv0 )| ≤ 2 and |Lmatched (Tv0 )| = 2|M (Tv0 )| ≤ 2, hence, by Lemmas 4.3, 4.5, we have |ones(x) ∩ {` ∈ δE (u) : u ∈ S ∩ V (Tv0 )}| ≤ 6, |ones(x) ∩ {` ∈ δE (u) : u ∈ Lmatched (Tv0 )}| ≤ 2; moreover, for each u ∈ B(Tv0 ), we have |ones(x) ∩ δE (u)| ≤ 1. Thus, to complete the proof of the claim, we have to show that |B(Tv0 )| ≤ 6. First, consider any bud b0 ∈ B orig (Tv0 ) and its associated stem s. By Lemma 8.2(3), s is an original node of Tv0 , and so, s ∈ S ∩ V (Tv0 ). By Lemma 8.2(1), each leaf of Ts0 is an original node in T 0 . Let b1 be the leaf of Ts0 other than b0 . By Lemma 7.2(2), b1 is M -covered (otherwise, the twin link b0 b1 connects two M -exposed leaves). Hence, b1 ∈ / B orig (Tv0 ). It follows that each stem in S ∩ V (Tv0 ) has at most one leaf in B orig (Tv0 ). Since |S ∩ V (Tv0 )| ≤ 2, we have |B orig (Tv0 )| ≤ 2. Now, consider one of the buds b0 ∈ B comp (Tv0 ); b0 is contained in some open compound node and one of the original links incident to b0 has its other end “outside” this compound node. Then, by Lemma 8.3, the buddy link buddylk(b0 ) shares an end with an M -link in M (Tv0 ). Since |M (Tv0 )| ≤ 1 and each end of an M -link can be incident to ≤ 2 buddy links, we have |B comp (Tv0 )| ≤ 4. Therefore, |B(Tv0 )| = |B orig (Tv0 )| + |B comp (Tv0 )| ≤ 6. This proves the claim.  Lemma 8.5. Suppose that no (up-to-5) greedy contractions are applicable. Let Tv0 be a semiclosed tree with C(Tv0 ) = ∅. Let J be a set of links that each have at least one end in Tv0 and no end in Lmatched (Tv0 ) ∪ (S ∩ V (Tv0 )). Let x be a feasible solution of Las3 (LP0 ) such that x is integral on the links {δE (u) : u ∈ B(Tv0 )}. Then, 1 1 Φ(x, Tv0 ) ≥ min{ , x(J)}. 2 2 P 1P 0 Proof. Let g(x, Tv ) denote 2 u∈Rnonspcl ∩V (Tv0 ) x(δE (u))+ 12 u∈Rspecial ∩V (Tv0 ) x(E(u, V −Lbud (u))). By P Fact 4.7, we have Φ(x, Tv0 ) ≥ g(x, Tv0 ) + s∈V (Tv0 )∩S slackx (s) ≥ g(x, Tv0 ). We will show that either each link ` ∈ J contributes 12 x(`) to g(x, Tv0 ), thereby ensuring g(x, Tv0 ) ≥ 21 x(J), or there exists a set of links that contribute 21 to g(x, Tv0 ). 25 Consider any link ` ∈ J with x(`) > 0. By Lemma 7.2(2), ` cannot have both ends at M -exposed leaves. Thus, ` has at least one end in V (Tv0 ) ∩ R, since it has no end in Lmatched (Tv0 ) ∪ (S ∩ V (Tv0 )), Tv0 is semiclosed, and C(Tv0 ) = ∅. It is easily seen that, except for one case, ` contributes ≥ 12 x(`) to g(x, Tv0 ). The exceptional case occurs when ` has original ends b0 and w, where b0 ∈ Lbud (w) and w ∈ special R (b0 ) ∩ V (Tv0 ), see Fact 2.3. Since J has no links incident to Lmatched (Tv0 ), it follows that b0 ∈ B(Tv0 ) because either b0 is an M -exposed original leaf of Tv0 , or b0 is contained in an M -exposed compound leaf of Tv0 ; in the latter case, b0 is an open bud (w.r.t. Tv0 ). Then, we have x(`) = 1 because x is integral on the links incident with nodes in B(Tv0 ). We claim that g(x, Tv0 ) ≥ 21 . Let ê denote the tree-edge between w (the end of ` in V (Tv0 ) ∩ R) and its parent. Let δ + (ê) denote the set of links with positive x-value that cover ê. Clearly, x(δ + (ê)) ≥ 1. Consider any link `q = pq that is in δ + (ê), where q is a descendent of w (possibly, q = w) and p is not in Tw0 . If q is a proper descendant of w, then (by the definition of Rspecial (b0 )) q is a descendant of the unique child of w (see Figure 3), hence, ` and `q form an overlapping pair such that x(`) + x(`q ) > 1; this contradicts the overlapping constraints of (LP0 ). Hence, we have q = w. Clearly, p (the other end of `q ) cannot belong to Lbud (q) = Lbud (w) since p is not a descendant of q. Hence, we have  g(x, Tv0 ) ≥ 21 x(E(w, V −Lbud (w))) ≥ 21 x(δ + (ê)) ≥ 21 . This completes the proof. Let Tv0 be a semiclosed tree. We construct an auxiliary graph in order to analyze the credits available in Tv0 . We denote the auxiliary graph by AG(Tv0 ). This is a bipartite multigraph, and the two sets in the node bipartition are denoted by AS(Tv0 ) and AU(Tv0 ). The first set consists of the M -covered leaves Lmatched (Tv0 ) and the stems S ∩ V (Tv0 ). The second set contains an auxiliary node v̄ (informally speaking, v̄ represents the node set V (T 0 )−V (Tv0 )), as well as all the M -exposed leaves of Tv0 , thus, AU(Tv0 ) = {v̄} ∪ U (Tv0 ). We define the edge set of AG(Tv0 ) as follows: for every link pq w.r.t. T 0 with p ∈ (S ∩ V (Tv0 )) ∪ matched L (Tv0 ), q ∈ U (Tv0 ), the edge pq is in AG(Tv0 ), and for every link pq w.r.t. T 0 such that p ∈ (S∩V (Tv0 ))∪Lmatched (Tv0 ), q ∈ V (T 0 )−V (Tv0 ), the edge pv̄ is in AG(Tv0 ). Thus, AG(Tv0 ) is a multigraph (multiple copies of an edge may be present), and every edge in AG(Tv0 ) corresponds to a link w.r.t. T 0 (see Figure 9). AG(Tv0 ) Tv0 v c v̄ b a s d d s c b a Figure 9. The left figure shows a semiclosed tree Tv0 where dashed lines indicate links and the thick dashed line indicates an M -link. The right figure shows the auxiliary graph AG(Tv0 ) and its node bipartition {s, b, c}, {v̄, a, d}. In what follows, we may abuse the notation by not distinguishing between edges (sets of edges) of AG(Tv0 ) and the corresponding links (sets of links) w.r.t. T 0 . 26 Lemma 8.6. Suppose that no (up-to-5) greedy contractions are applicable. Let Tv0 be a semiclosed tree such that Tv0 6= T 0 , C(Tv0 ) = ∅, |M (Tv0 )| ≤ 1 and |S ∩ V (Tv0 )| ≤ 2. (1) Suppose that M (Tv0 ) = ∅. Then for any feasible solution x for Las3 (LP0 ), we have Φ(x, Tv0 ) ≥ 1. Furthermore, Tv0 is good. (2) Suppose that |M (Tv0 )| = 1, and |U (Tv0 )| ≥ |S ∩ V (Tv0 )| + 1. Moreover, suppose that x is a feasible solution for Las3 (LP0 ) such that x|J is integral and Φ(x, Tv0 ) < 21 , where J = {` ∈ δE (u) : u ∈ (S ∩ V (Tv0 )) ∪ Lmatched (Tv0 ) ∪ B(Tv0 )}. Then, |U (Tv0 )| = |S ∩ V (Tv0 )| + 1. Moreover, the auxiliary graph has a perfect matching AM(Tv0 ) such that the following conditions hold: (i) x(`) = 1 for each link ` ∈ AM(Tv0 ), (ii) the links of AM(Tv0 ) cover Tv0 , (iii) for each stem node s ∈ S ∩ V (Tv0 ), twinlk(s) is in AM(Tv0 ), (iv) AM(Tv0 ) has no links of the form v̄s, where s ∈ S ∩ V (Tv0 ). 0 0 Proof. Let êv denote the tree-edge between v and its parent; P êv is well defined since Tv 0 6= T . ¯ ¯ Let J = δE (êv ) ∪ (∪u∈U (Tv0 ) δE (u)). Then, x(J) = x(δE (êv )) + u∈U (Tv0 ) x(δE (u)) ≥ 1 + |U (Tv )|; the equation holds because (i) Tv0 is semiclosed so none of the links in δE (êv ) is incident to an M -exposed leaf of Tv0 , and (ii) by Lemma 7.2(2), no link has both ends at M -exposed leaves; the inequality holds because x(δE (ê)) ≥ 1 forP every tree-edge ê. P Let g(x, Tv0 ) denote 12 u∈Rnonspcl ∩V (Tv0 ) x(δE (u)) + 12 u∈Rspecial ∩V (Tv0 ) x(E(u, V −Lbud (u))). P By Fact 4.7, we have Φ(x, Tv0 ) ≥ g(x, Tv0 ) + s∈V (Tv0 )∩S slackx (s) ≥ g(x, Tv0 ). Case (1): M (Tv0 ) = ∅. Clearly, |U (Tv0 )| ≥ 1, since Tv0 has at least one leaf. ¯ ≥ 1 (1 + |U (Tv0 )|) ≥ 1. We will show that every link ` ∈ J¯ contributes Observe that 21 x(J) 2 ≥ 12 x(`) to g(x, Tv0 ). First, we show that S∩V (Tv0 ) = ∅. Otherwise, consider any s ∈ S∩V (Tv0 ); by Lemma 8.2(1), every node in Ts0 is original, and so the twin link of s has both ends at M -exposed nodes (since M (Tv0 ) = ∅); this contradicts Lemma 7.2(2). Next, we show that B(Tv0 ) = ∅. Since S∩V (Tv0 ) = ∅, Lemma 8.2(3) implies that B orig (Tv0 ) = ∅ (if a bud b0 ∈ B orig (Tv0 ) is present as an original M -exposed leaf of Tv0 , then its stem is present as an original node of Tv0 ). Also, we have B comp (Tv0 ) = ∅, otherwise, by Lemma 8.3, there exists a link in M (Tv0 ) (this is impossible since M (Tv0 ) = ∅). Thus, B(Tv0 ) = ∅. Now, observe that every link ` ∈ J¯ has an end in V (Tv0 ) ∩ R, and hence, it contributes 1 0 0 2 x(`) to g(x, Tv ). Therefore, Φ(x, Tv ) ≥ 1. Since this inequality holds for every feasible solution x of Las3 (LP0 ), we have Φ(y, Tv0 ) ≥ 1. Hence, by Lemma 7.3, Tv0 is good. Case (2): In this case, |M (Tv0 )| = 1 and |U (Tv0 )| ≥ |S ∩ V (Tv0 )| + 1. Moreover, x|J is integral, where J = {` ∈ δE (u) : u ∈ (S ∩ V (Tv0 )) ∪ Lmatched (Tv0 ) ∪ B(Tv0 )}. First, we show that x(δE (s)) ≤ 1 for each stem s ∈ S ∩ V (Tv0 ). We use a contradiction argument. Suppose that x(δE (s)) > 1. Let δ + (s) denote the set of links of positive x-value incident to s. Note that every link ` in δ + (s) has x(`) = 1 because x|J is integral. Since x(δE (s)) > 1, we have |δ + (s)| ≥ 2. This implies that each of the buddy links associated with the stem s has x-value zero. To see this, note that the set of links in δ + (s) covering each of the three tree-edges incident to s is an overlapping clique, hence, at most one link of δ + (s) belongs to one of these overlapping cliques (by the overlapping constraints of (LP0 )); moreover, each buddy link associated with s is overlapping with the links that belongs to two of these overlapping cliques (see Figure 10); hence, if a buddy link ` associated with s has x(`) > 0, then we get a violation (of an overlapping constraint of (LP0 )) for one of the three overlapping cliques. Since the buddy links associated with s (if any) have x-value zero, 27 we have Φ(x, Tv0 ) ≥ slackx (s) ≥ contradiction. 1 2   x(δE (s)) − x(twinlk(s)) ≥ 21 , and this gives the desired q p s b2 ` b3 b1 b0 Figure 10. Illustration of a buddy link ` in the proof of Lemma 8.6. Note that ` up (s) and δ (ê) ∩ δ (s), where ê is the tree-edge is overlapping with links in both δE E E between b3 and s. For example, ` is overlapping with the links sp and sb3 . For any M -covered leaf w in Tv0 , by Lemma 7.2(1), w is an original node, and moreover, we have x(δE (w)) ≤ 1, by Lemma 4.3. Thus, we have x(δE (w)) ≤ 1 for each node w ∈ Lmatched (Tv0 ) ∪ (S ∩ V (Tv0 )) = AS(Tv0 ). 0 ¯ ¯ S Let Je = J− w∈AS(Tv0 ) δE (w); this is the set of links in J but not in AG(Tv ). We have e ≥ 1 , which e < 1; otherwise, by Lemma 8.5, we would have Φ(x, Tv0 ) ≥ min{ 1 , 1 x(J)} x(J) 2 2 2 0 is a contradiction. Then, by the conditions in the hypothesis (|M (Tv )| = 1 and |U (Tv0 )| ≥ |S ∩ V (Tv0 )| + 1) and theX fact that |AU(Tv0 )| = |U (Tv0 )| + 1, we have e = x(J) ¯ − 1 > x(J) x(J¯ ∩ δE (w)) ≥ |AU(Tv0 )| − |AS(Tv0 )| w∈AS(Tv0 ) = |U (Tv0 )| + 1 − 2|M (Tv0 )| − |S ∩ V (Tv0 )| = |U (Tv0 )| − (1 + |S ∩ V (Tv0 )|) ≥ 0. Hence, we have |U (Tv0 )| = |S ∩ V (Tv0 )| + 1, and |AS(Tv0 )| = |AU(Tv0 )|. For each w ∈ AS(Tv0 ), we have x(J¯ ∩ δE (w)) = 1 because x(`) is integral for each link ` ∈ J¯ ∩ δE (w) (otherwise, P 0 0 0 ¯ e w∈AS(Tv0 ) x(J ∩ δE (w)) ≤ |AS(Tv )| − 1 implies that x(J) ≥ |AU(Tv )| − |AS(Tv )| + 1 ≥ 1). 0 For each w ∈ AS(Tv ), define `w to be the link in δE (w) ∩ J¯ with x(`w ) = 1. We claim that these links form a perfect matching of the auxiliary graph, thus, AM(Tv0 ) = {lw : w ∈ AS(Tv0 )}. Otherwise, there exist two links `w1 , `w2 (where w1 , w2 ∈ AS(Tv0 )) that are ¯ ≥ |AU(Tv0 )| + 1, which implies that incident to the same node u ∈ AU(Tv0 ). Then, x(J) P 0 0 e = x(J) ¯ − ¯ x(J) w∈AS(Tv0 ) x(J ∩ δE (w)) ≥ |AU(Tv )| + 1 − |AS(Tv )| ≥ 1. This contradicts the e < 1. Our claim follows. fact that x(J) We claim that AM(Tv0 ) covers Tv0 . Otherwise, there exists a tree-edge ê0 in Tv0 that is not covered by AM(Tv0 ). Let δ + (ê0 ) denote the set of links of positive x-value in δE (ê0 ). Then, we have x(δ + (ê0 )) ≥ 1, and none of the links in δ + (ê0 ) is incident to (S ∩ V (Tv0 )) ∪ Lmatched (Tv0 ); the latter assertion holds because x(`w ) = 1 and x(δE (w)) ≤ 1 for every w ∈ AS(Tv0 ), i.e., the nodes in AS(Tv0 ) are already “saturated” by AM(Tv0 ). Thus, Lemma 8.5 applies to δ + (ê0 ), and we have Φ(x, Tv0 ) ≥ min{ 21 , 12 δ + (ê0 )} ≥ 12 , which is a contradiction. Our claim follows: AM(Tv0 ) covers Tv0 . Additionally, we claim that AM(Tv0 ) has no links between v̄ and S ∩ V (Tv0 ). By way of contradiction, assume that there exists a link ` = sq ∈ AM(Tv0 ) such that s ∈ S ∩ V (Tv0 ) and q ∈ / V (Tv0 ). Suppose that q is an original non-leaf node. Then sq is a link between two 28 original non-leaf nodes with x(sq) = 1, hence, we have Φ(x, Tv0 ) ≥ 21 due to Fact 4.7 and the following term in Φ(x, Tv0 ): 1 x(E((V −L) ∩ V (Tv0 ), (V −L) ∩ (V (T 0 )−V (Tv0 )))). 2 This is a contradiction. Otherwise, if q is a compound node or an original leaf, then we claim that an (up-to-5) greedy contraction applies, and this too gives a contradiction. Note that |S ∩ V (Tv0 )| ≤ 2 and |M (Tv0 )| = 1, hence, |AM(Tv0 )| ≤ 4. The credit assigned to the leaves and matching links in Tv0 is 23 + |U (Tv0 )| = 32 + |S ∩ V (Tv0 )| + 1 = |AM(Tv0 )| + 21 . If q is a compound node or an original M -exposed leaf, then q provides one additional credit, and this suffices for an (up-to-5) greedy contraction of the links of AM(Tv0 ); otherwise, q is an M -covered leaf, and the M -link `q incident to q provides additional 23 credit, and this suffices for an (up-to-5) greedy contraction of `q together with the links of AM(Tv0 ). Our claim follows: AM(Tv0 ) has no link of the form v̄s, s ∈ S ∩ V (Tv0 ). Finally, we prove that twinlk(s) is in AM(Tv0 ) for each stem s ∈ S ∩ V (Tv0 ). Consider any stem s ∈ S ∩ V (Tv0 ). By Lemma 8.2(1), Ts0 is contained in Tv0 and every node in Ts0 is original. Let the leaves of Ts0 be a, b0 ; thus, twinlk(s) = ab0 . Lemma 7.2(2) implies that one end of the twin link ab0 is M -covered. Since x|J is integral, 0 and J contains ab0 (each link incident to Lmatched (Tv0 ) is in PJ), either ab0 ∈ AM(Tv ) or x(ab0 ) = 0. We may assume that x(ab0 ) = 0. Suppose that b∈Lbud (s) x(buddylk(b)) = 0, i.e., there does not exist a buddy link incident to Ts0 that has positive x-value. Consider the link `s in AM(Tv0 ) incident with s; clearly, x(`s ) = 1. Thus, we have Φ(x, Tv0 ) ≥ slackx (s) ≥ 1 1 2 x(`s ) = 2 . This is a contradiction. q s b2 è `s a b0 Figure 11. Illustration of è and `s in the proof of Lemma 8.6. S Now, we may assume that there exists a buddy link è ∈ b∈Lbud (s) {buddylk(b)} such that x( è) > 0. W.l.o.g., let the original ends of è be a and b2 . Let q be the least common ancestor of a and b2 w.r.t. T ; see Figure 11 and also see Figure 2 in Section 2. Observe that Tv0 contains q (either as an original node or within a compound node), because Tv0 has at least 3 leaves, whereas every proper subtree of Tq has ≤ 2 leaves. Thus, Tv0 contains both ends of è. Note that b2 (the end of è not in T 0 ) may be an original leaf of T 0 or it may be contained s v in a compound leaf of Tv0 (since C(Tv0 ) = ∅, b2 cannot be contained in a non-leaf compound node of Tv0 ). up (s), otherwise, ` , è form an overlapping pair (since x( è) > 0, x(` ) = Observe that `s 6∈ δE s s 0 . Thus, ` = sb (` has an end 1). By similar arguments, `s cannot have both ends in Pa,s s 0 s dn (s) and ` ∈ AM(T 0 )). Let `¯ denote the link in at an M -exposed leaf of Ts0 because `s ∈ δE s q v 0 AM(Tv ) that covers the tree-edge between q and its parent (possibly, q = v, and in this case, `¯q is the link incident with v̄ in AM(Tv0 )). Note that `¯q has an end at a leaf in Tq0 . Then, 29 `¯q forms an overlapping pair with either `s or è (since x(`¯q ) = 1, x(`s ) = 1, x( è) > 0). This contradicts the overlapping constraints of (LP0 ). This completes the proof of the lemma.  The following theorem is the key result of this paper. It is used only once; see the last paragraph of the proof of Theorem 8.8. Note that the last alternative in Theorem 8.7 (item (3)) is addressed in the last paragraph of the proof of Theorem 8.8. Theorem 8.7. Suppose that no (up-to-5) greedy contractions are applicable. Let Tv0 be a semiclosed tree that is not good. Then one of the following holds for Tv0 . (1) Tv0 is a deficient 3-leaf tree. (2) Tv0 is a deficient 4-leaf tree. (3) Tv0 has 4 leaves with |M (Tv0 )| = 1, and moreover Tv0 has no cover of size 3. Proof. Since Tv0 is not good, Lemma 7.3 and Lemma 8.6(1) imply that Tv0 6= T 0 , C(Tv0 ) = ∅, and |M (Tv0 )| = 1. Observe that Tv0 has at least one M -exposed leaf. Otherwise, since |M (Tv0 )| = 1, Tv0 has exactly two leaves and there exists an M -link between these two leaves; moreover, by Lemma 7.2(1), every node on the path of T 0 between these two leaves is original; it follows that the link in M (Tv0 ) is a twin link; this contradicts the definition of M . Thus, Tv0 has an M -exposed leaf and exactly two M -covered leaves. Hence, Tv0 has at least three leaves. Also, observe that |S ∩ V (Tv0 )| ≤ 2. Otherwise, suppose that |S ∩ V (Tv0 )| ≥ 3. Then, by Lemma 8.2(1), for every stem s ∈ S ∩ V (Tv0 ), every node in Ts0 is original; hence, there exists a stem s∗ ∈ S ∩ V (Tv0 ) such that both the leaves of Ts0∗ are M -exposed and there exists a twin link between these two leaves; this contradicts Lemma 7.2(2). Let ê denote the tree-edge between v and its parent. Let J denote {` ∈ δE (u) : u ∈ (S ∩ V (Tv0 )) ∪ Lmatched (Tv0 ) ∪ B(Tv0 )}, where B(Tv0 ) = B orig (Tv0 ) ∪ B comp (Tv0 ) (see the discussion before Lemma 8.4 for the definitions of B orig (Tv0 ) and B comp (Tv0 )). P By Lemma 8.4, y can be written as a convex combination i∈Z λi xi such that xi ∈ Las3 (LP0 ) and xi |J is integral. Since Tv0 is not good and |M (Tv0 )| = 1, Lemma 7.3 implies that Φ(y, Tv0 ) < 21 . Thus, there exists an i0 ∈ Z such that Φ(xi0 , Tv0 ) < 12 . We claim that |U (Tv0 )| ≤ |S ∩V (Tv0 )|+1. To see this, suppose that |U (Tv0 )| ≥ |S ∩V (Tv0 )|+1. Then, all of the conditions of Lemma 8.6(2) apply, hence, the lemma implies that |U (Tv0 )| = |S ∩V (Tv0 )|+1. Our claim follows. Now, we analyze a few cases, depending on the number of leaves of Tv0 . By Lemma 8.2(1), for every stem s ∈ S ∩ V (Tv0 ), every node in Ts0 is original; thus, each stem s ∈ S ∩ V (Tv0 ) contributes two original leaves to Tv0 . Therefore, |S ∩ V (Tv0 )| ≤ |L(Tv0 )|/2. Case 1: Tv0 has exactly three leaves. Let the three leaves be a, b1 , b2 , where a is M -exposed and b1 , b2 are M -covered; thus, b1 b2 is the unique link in M (Tv0 ), and b1 , b2 are original nodes by Lemma 7.2(1). Clearly, |S ∩ V (Tv0 )| ≤ 1. We have two subcases, depending on |S ∩ V (Tv0 )|. Subcase 1.1: |S ∩ V (Tv0 )| = 1. Let s be the stem in Tv0 . The M -link b1 b2 cannot have both ends in Ts0 (since M contains no twin links). Thus, the M -exposed leaf a is a leaf of Ts0 . Then, it can be seen that a is a bud and buddylk(a) = b1 b2 (see the definition of bud in Section 2). This is a contradiction, since M contains no buddy links. Subcase 1.2: |S ∩ V (Tv0 )| = 0. Then we have |U (Tv0 )| = 1 = 1 + |S ∩ V (Tv0 )|. By Lemma 8.6(2)(i–iv), there exist two links `v ∈ δE (ê) and `a ∈ δE (a) such that xi0 (`v ) = xi0 (`a ) = 1, these two links cover Tv0 , and moreover, each of b1 , b2 is incident to exactly one of these two links (since the auxiliary graph has a perfect matching formed by these two links). 30 If there is only one non-leaf node with degree other than 2 in Tv0 (see Figure 6(a)), then Tv0 is a deficient 3-leaf tree. We are done. Otherwise, we have exactly two non-leaf nodes u, q in Tv0 with degree other than 2. In fact, both these nodes have degree 3 since Tv0 has exactly 3 leaves. W.l.o.g., let u be a proper ancestor of q. Then, Tq0 has only two leaves. By the argument at the beginning of the proof, the M -link in Tv0 cannot connect both leaves in Tq0 . This implies that one leaf of Tq0 is M -exposed. Thus, a is a leaf of Tq0 . W.l.o.g., let the other leaf of Tq0 be b2 . Then, b1 is the third leaf, which is not in Tq0 . Suppose that `v is incident to b1 and `a is incident to b2 . Then, the tree-edge between q and its parent is not covered by these two links (see Figure 12(a)). This is a contradiction. Hence, `v is incident to b2 and `a is incident to b1 (see Figure 12(b)). Therefore, Tv0 satisfies all the conditions of a deficient 3-leaf tree. (a) v `v u (b) `v u q b1 v q b1 b2 `a a b2 `a a Figure 12. The links `v and `a in Subcase 1.2 of the proof of Theorem 8.7. The dashed lines indicate links and the thick dashed lines indicate M -links. Case 2: Tv0 has exactly four leaves. Let the four leaves be a1 , a2 , b1 , b2 , where a1 , a2 are M -exposed and b1 , b2 are M -covered; thus, b1 b2 is the unique link in M (Tv0 ), and b1 , b2 are original nodes by Lemma 7.2(1). We have 1 = |U (Tv0 )| − 1 ≤ |S ∩ V (Tv0 )| ≤ 2. As above, we have two subcases, depending on |S ∩ V (Tv0 )|. Subcase 2.1: |S ∩ V (Tv0 )| = 1. Let s be the stem in Tv0 . By Lemma 7.2(2), it can be seen that the twin link of s is incident to one M -exposed leaf, say a1 , and to one M -covered leaf, say b1 (see Subcase 1.1). Note that |U (Tv0 )| = 2 = 1 + |S ∩ V (Tv0 )|. By Lemma 8.6(2)(i–iv), there exist three links a1 b1 (the twin link of s), `v ∈ δE (ê) and `a2 ∈ δE (a2 ) such that xi0 (a1 b1 ) = xi0 (`v ) = xi0 (`a2 ) = 1, these three links cover Tv0 , and moreover, each of s, b2 is incident to exactly one of the two links `v , `a2 (since the auxiliary graph has a perfect matching formed by the three links); moreover, s cannot be incident to `v (by Lemma 8.6(2)(iv)). Thus `v is incident to b2 , and `a2 is incident to s, i.e., `a2 = a2 s. Let p be the least common ancestor of s and a2 (in Tv0 ). If Tp0 does not contain all the leaves of Tv0 , then it can be seen that the tree-edge between p and its parent is not covered by the three links a1 b1 , a2 s, `v (see Figure 13(a)). This is a contradiction (since Tv0 is covered by {a1 b1 , a2 s, `v }). It follows that Tp0 contains all the leaves of Tv0 . Then, it can be seen that Tv0 is a deficient 4-leaf tree (see Figure 13(b)). Subcase 2.2: |S ∩ V (Tv0 )| = 2. If Tv0 has no cover of size 3, then item (3) in the statement of the theorem holds. Thus, we may assume that Tv0 has a cover of size 3. Let s1 , s2 be the two stems in Tv0 . Let a1 , b1 be the original leaves of Ts01 , and let a2 , b2 be the original leaves of Ts02 . We may assume that a1 , a2 are M -exposed and b1 , b2 are M -covered, because each twin link is incident to one M -exposed leaf and to one 31 (a) v (b) `v v p a2 `v p b2 a2 `a2 `a2 b1 s s b2 a1 b1 a1 Figure 13. The links `v , `a2 and a1 b1 in subcase 2.1 of the proof of Theorem 8.7. The dashed lines indicate links and the thick dashed lines indicate M -links. Another case could occur, but it is not shown here (see Figure 7). M -covered leaf by Lemma 7.2(2) (see Subcase 2.1). Thus, b1 b2 is the unique link in M (Tv0 ). By Lemma 8.2(1) and C(Tv0 ) = ∅, Tv0 has no compound nodes, i.e., all its nodes are original. Observe that Tv0 has at least 3 21 credits from the two M -exposed leaves and the M -link. Consider the possible leaf-to-leaf links of Tv0 . The link a1 a2 does not exist, by Lemma 7.2(2), since a1 , a2 are both M -exposed. If both the links a1 b2 and a2 b1 exist, then an (up-to-5) greedy contraction applies (we contract these two links and we have 3 21 credits). Thus, at most one of the links a1 b2 or a2 b1 is present. If Tv has no leafy 3-cover w.r.t. T , then it satisfies all the conditions for a bad 2-stem tree, hence, it would have been contracted in Preprocessing step 1 (Λ-contraction). This is a contradiction. Thus, we may assume that Tv has a leafy 3-cover Je = {`0 , `1 , `2 } w.r.t. T , where `0 = uw is a link such that one end u is in Tv and the other end w is a leaf in L−L(Tv ). Let `00 = uw0 be the link w.r.t. T 0 that corresponds to `0 , where w0 = w if w is still an original node in T 0 , and otherwise, w0 is the compound node containing w. Note that in either case, w0 is not in V (Tv0 ) since every node in Tv0 is original. If w0 is a compound node or an M -exposed original leaf, then an (up-to-5) greedy contraction applies (we contract the 3 links in Je and we have 4 21 credits). Otherwise, if w0 is an M -covered original leaf, then again an (up-to-5) greedy contraction applies (we contract 4 links, namely, the links in Je and the M -link incident to w, and we have 3 12 + 32 = 5 credits). Thus, the existence of a leafy 3-cover gives a contradiction. Case 3: Tv0 has at least five leaves. Then, Tv0 has at least three M -exposed leaves and two M -covered leaves. Thus, we have 3 ≤ |U (Tv0 )| ≤ |S ∩ V (Tv0 )| + 1 ≤ 3, since |S ∩ V (Tv0 )| ≤ 2; it follows that |U (Tv0 )| = 3, |S ∩ V (Tv0 )| = 2, and Tv0 has exactly 5 leaves. Let s1 , s2 be the two stems in Tv0 . Let a1 , b1 be the original leaves of Ts01 , and let a2 , b2 be the original leaves of Ts02 . We may assume that a1 , a2 are M -exposed and b1 , b2 are M covered, because each twin link is incident to one M -exposed leaf and to one M -covered leaf by Lemma 7.2(2) (see Subcase 2.1). Thus, b1 b2 is the unique link in M (Tv0 ). Let u be the fifth leaf of Tv0 , where u is not in Ts01 nor in Ts02 . Since |U (Tv0 )| = 3 = 1 + |S ∩ V (Tv0 )|, Lemma 8.6(2)(i–iv) implies that there exist four links `v ∈ δE (ê), `u ∈ δE (u), a1 b1 , a2 b2 (the twin links of s1 , s2 ) such that each of s1 , s2 is incident 32 to exactly one of the two links `v , `u (since the auxiliary graph has a perfect matching formed by these four links); moreover, `v cannot be incident to {s1 , s2 } (by Lemma 8.6(2)(iv)). This is impossible. Thus, Tv0 cannot have more than four leaves. The theorem follows from the above case analysis.  8.3. Addressing deficient trees. This section discusses the missing piece of the algorithm, namely, the handling of deficient trees. Even, et al., see [5, Section 4.3], presented an elegant method for addressing deficient 3-leaf trees. We use essentially the same method in Part I (Section 7.2). The key point is to compute another (auxiliary) matching of the leaf-to-leaf links of T 0 , and then to find a minimally semiclosed tree Tv0 w.r.t. this auxiliary matching; moreover, we prove (in Theorem 7.4 of Part I) that Tv0 is a good semiclosed tree w.r.t. the “original matching,” and Tv0 has a fitting cover of appropriate size. In this section, we extend this method to address deficient 3-leaf trees as well as deficient 4-leaf trees. The extension is straightforward (but non-trivial). We start by “transforming” the current tree T 0 to another tree Te; this is achieved by applying “latch contractions” to the latches of deficient 4-leaf trees in an appropriate way (the details are discussed below). Then, we apply the method from Part I (Section 7.2) to Te. Thus, the main goal in this section is to find a semiclosed tree Tv0 w.r.t. M of the current tree T 0 such that Tv0 is good (i.e., it has ≥ |Γ(M, Tv0 )| + 1 credits) and Tv0 has a fitting cover of size |Γ(M, Tv0 )|. For a deficient 3-leaf tree Tv0 , if Tv0 is not a proper subtree of another deficient 3-leaf tree, then we call Tv0 a maximal deficient 3-leaf tree. Similarly, we define a maximal deficient 4-leaf tree. By Property 2.1, any two different maximal deficient 3-leaf trees are disjoint; similarly, any two different maximal deficient 4-leaf trees are disjoint. Let E latch denote the set of latches of all maximal deficient 4-leaf trees of T 0 . Let Te = T 0 /E latch . We mention that Te is an auxiliary graph that is used for achieving the main goal of this section (find a semiclosed tree Tv0 with desired properties), and other than that, the algorithm does not refer to Te at all; thus, the algorithm does not add any latch to F while constructing Te, nor does it incur any credits while constructing Te. By a latched-node we mean a node of Te that results from the contraction of a latch (note that these are not compound nodes of T 0 , and the algorithm does not assign any credits to a latched-node). Since two different maximal deficient 4-leaf trees are disjoint, each “latch contraction” results in a distinct latched-node; thus, there is a bijection between the latches of T 0 and the latched-nodes of Te. For a subtree Tew of Te, we use latch(Tew ) to denote the set consisting of latches that correspond to latched-nodes of Tew . For a node w of T 0 , let w e denote the node of Te that corresponds to w. If there exists no latch cs of 0 0 T such that w is in Pc,s (the path of T 0 between c, s), then w e = w, otherwise, w e is the latched-node 0 (in this case, the latch cs is unique formed by contracting the (unique) latch cs such that w is in Pc,s because two different maximal deficient 4-leaf trees are disjoint). Then, as in Part I (Section 7.2), we construct an auxiliary matching of the leaf-to-leaf links of Te denoted by M new . For ease of exposition, we denote the image (in Te) of M (T 0 ) by M (Te), and we refer to the image (in Te) of a link in M (T 0 ) as an M -link w.r.t. Te (this is justified because any M -link w.r.t. T 0 has no ends in common with the nodes of T 0 that get contracted into latchednodes). To construct M new , we start with M new := M , then we examine each maximal deficient 3-leaf tree Tewe of Te and we replace the unique link of M (Tewe ) in M new by another leaf-to-leaf link. In more detail, consider any maximal deficient 3-leaf tree Tewe , and let the three leaves be a, b, d, where a is M -exposed, b is the ceiling leaf, and bd is the unique link in M (Tewe ); we remove the M -link bd from M new and instead we add the link ad to M new (see Algorithm 2). Since any two different maximal deficient 3-leaf trees are disjoint, this replacement takes place independently for each maximal deficient 3-leaf tree. We mention that M new is an auxiliary matching that is used for 33 achieving the main goal of this section (find a semiclosed tree Tv0 with desired properties), and other than that, the algorithm does not refer to M new at all; whereas, the matching M (and its image M (T 0 )) are used throughout the algorithm and its analysis. Theorem 8.8. Suppose that no (up-to-5) greedy contractions are applicable. Let Te = T 0 /E latch , and let Teve be a minimally semiclosed tree w.r.t. M new . Then, ve cannot be a latched-node of Te; thus, ve = v, where v is a node of T 0 . Moreover, Tv0 is a good semiclosed tree w.r.t. M and Tv0 has a fitting cover Γ(M new , Tev ) ∪ latch(Tev ) of size |Γ(M, Tv0 )|. Proof. We start by addressing the first statement. By way of contradiction, suppose that ve is a latched-node. Observe that every latched-node is contained in a deficient 3-leaf tree of Te (a latchednode is formed by a “latch contraction” that results in a deficient 3-leaf tree). Hence, Teve is a subtree of a maximal deficient 3-leaf tree of Te. But, by our construction of M new , the ceiling leaf of every maximal deficient 3-leaf tree is M new -exposed, hence, no subtree of a maximal deficient 3-leaf tree is semiclosed w.r.t. M new . Thus, Teve is not semiclosed w.r.t. M new . This is a contradiction. It follows that ve cannot be a latched-node. Thus, there exists a node v in T 0 such that v = ve; moreover, Teve = Tev , and Tv0 is well defined. Claim 8.9. (1) If Tv0 has a node in a maximal deficient 4-leaf tree of T 0 , then Tv0 properly contains this maximal deficient 4-leaf tree. (2) If Tv0 has a node in a maximal deficient 3-leaf tree of T 0 , then Tv0 properly contains this maximal deficient 3-leaf tree. We address statement (1) of the claim. Suppose that Tv0 has a node in a maximal deficient 4-leaf tree Tw0 . By “latch contraction,” Tw0 is transformed to a deficient 3-leaf tree Tewe of Te. Thus, Tev has a node in a maximal deficient 3-leaf tree Teue , where u e is an ancestor of w e in Te. But, (as discussed new e e above) no subtree of Tue is semiclosed w.r.t. M . Hence, Tv cannot be a subtree of Teue . Then Property 2.1 implies that Tev properly contains Teue . Hence, v is a proper ancestor of w in T 0 , and Tv0 properly contains Tw0 . Next, we address statement (2) of the claim. Suppose that Tv0 has a node in a maximal deficient 3-leaf tree Tw0 . If this maximal deficient 3-leaf tree is contained in a maximal deficient 4-leaf tree, then we are done by the previous discussion. Hence, by Property 2.1, we may assume that Tw0 has no node in a maximal deficient 4-leaf tree. Then Tewe contains no latched-node, and Tewe = Tew = Tw0 is a maximal deficient 3-leaf tree of Te. Since Tev has a node in Tew , and no subtree of Tew is semiclosed w.r.t. M new , Property 2.1 implies that Tev properly contains Tew . It follows that Tv0 properly contains Tw0 . This proves the claim. Claim 8.9 implies that Tv0 is neither a deficient 3-leaf tree nor a deficient 4-leaf tree. Next, we address the second statement in the theorem. To show that Tv0 is semiclosed w.r.t. M , we must show that every link incident to an M -exposed leaf of Tv0 has both ends in Tv0 , and every M -link incident to Tv0 has both ends in Tv0 . Let u be an M -exposed leaf of Tv0 . Suppose that u is contained in Tw0 , where Tw0 is either a deficient 3-leaf tree or a deficient 4-leaf tree (w.r.t. T 0 ). Then Tv0 contains Tw0 , by Claim 8.9. Since Tw0 is a semiclosed tree w.r.t. M (by definition of deficient trees), all links incident with u have both ends in Tw0 , hence, also in Tv0 . Next, suppose that u does not belong to any deficient 3-leaf tree or any deficient 4-leaf tree (w.r.t. T 0 ). Such an M -exposed node of Tv0 is an M new -exposed node of Te. Since Tev is semiclosed w.r.t. M new , it follows that Tev contains both ends of each link incident with u e = u; hence, Tv0 contains both ends of each link incident with u. Next, consider an M -link uw incident to Tv0 , where u is a node of Tv0 . If u is contained in Tw0 , where Tw0 is a deficient 3-leaf tree or a deficient 4-leaf tree, then note that Tw0 is semiclosed, and 34 moreover, Tw0 is properly contained in Tv0 , hence, both ends of uw are in Tv0 . Otherwise, uw has no end in a deficient 3-leaf tree or in a deficient 4-leaf tree; then, by our construction of M new , we have uw ∈ M new (M and M new are the same, except “inside” some deficient tree). Since Tev is semiclosed w.r.t. M new , it follows that uw has both ends in Tev , hence, uw has both ends in Tv0 . Thus, Tv0 is semiclosed w.r.t. M . By the construction of Te and M new , Claim 8.9, and the fact that Tev is semiclosed, we have |M (Tv0 )| = |M new (Tev )|; moreover, the number of M -exposed nodes of Tv0 is equal to the sum of the number of M new -exposed nodes of Tev and |latch(Tev )| (since each latched-node of Tev corresponds to an M -exposed leaf of a maximal deficient 4-leaf tree of Tv0 ). Hence, we have |Γ(M, Tv0 )| = |Γ(M new , Tev )| + |latch(Tev )|. Clearly, Γ(M new , Tev ) is a fitting cover of Tev , because Tev is a minimally semiclosed tree w.r.t. M new (by Lemma 6.2). It follows that Γ(M new , Tev ) ∪ latch(Tev ) is a fitting cover of Tv0 of size |Γ(M, Tv0 )|. Finally, we apply Theorem 8.7 to prove that Tv0 is good. Suppose that Tv0 is not good. By Claim 8.9, Tv0 is neither a deficient 3-leaf tree nor a deficient 4-leaf tree. Then, Theorem 8.7(3) implies that Tv0 has 4 leaves, |M (Tv0 )| = 1, and Tv0 has no cover of size 3. Since |M (Tv0 )| = 1 and |U (Tv0 )| = 2, we have |Γ(M, Tv0 )| = 3. The previous paragraph shows that Tv0 has a fitting cover of size |Γ(M, Tv0 )| = 3. Thus, we have a contradiction. It follows that Tv0 is good. This completes the proof.  The procedure described above to find a good semiclosed tree is summarized in the following pseudocode. let E latch denote the set of latches of all maximal deficient 4-leaf trees of T 0 ; let Te := T 0 /E latch ; start with M new := M ; for each maximal deficient 3-leaf tree Tewe in Te do let b be the ceiling leaf, a be the M -exposed leaf and db be the M -link in Tewe ; update M new by replacing db by da (M new := M new −{db} ∪ {da}); end find a minimally semiclosed tree Tev w.r.t. M new ; Tv0 is a good semiclosed tree w.r.t. M with a fitting cover Γ(M new , Tev ) ∪ latch(Tev ) of size |Γ(M, Tv0 )| (by Theorem 8.8); return Tv0 and its fitting cover Γ(M new , Tev ) ∪ latch(Tev ); Algorithm 2: Find a good semiclosed tree by addressing deficient trees. Algorithm 2 shows how to find a good semiclosed tree Tv0 together with a fitting cover of size |Γ(M, Tv0 )| for the main loop in Algorithm 1 in Section 7. (The first step of Algorithm 2 applies “latch contractions” to construct the auxiliary tree Te from T 0 ; “latch contractions” have no effect on F or on the credits of the algorithm.) In conclusion, Algorithm 1 runs in polynomial time and returns a solution for TAP of size ≤ 3 ( 2 + )y(E). This proves Theorem 6.1. Although our integrality ratio (and approximation guarantee) is proved relative to a “weaker lower bound” than the optimum value (since the feasible region of a relaxation is a superset of the convex full of integer solutions), we loose an additive term of  in the approximation guarantee, compared to the 23 approximation guarantee of [10]. But, we can show that our methods achieve an approximation guarantee of 32 relative to the (integral) optimum value. Observe that the algorithm is combinatorial and does not refer to the SDP relaxation at all (our analysis does rely on the SDP relaxation and properties of its solutions). Thus, we can apply the algorithm and analysis for the 35 level t = |E| tightening of (LP0 ), and at this level, the set of (feasible) solutions of Last (LP0 ) corresponds to the convex hull of integer solutions. Consequently, for level t = |E|, Lemma 4.4 can be restated as follows: if y ∈ Last (LP0 ), where t = |E|, then y|E(L) is in the matching polytope of G(L) = (L, E(L)). Hence, for level t = |E|, the upperbound on the potential function stated in Lemma 5.2 can be improved from ( 23 + )y(E) to 23 y(E). In other words, for y ∈ Last (LP0 ), where t = |E|, the potential function is ≤ 23 y(E). Sections 6–8 show that Algorithm 1 returns a solution for TAP whose size is ≤ the potential function. Thus, we have the following result. Corollary 8.10. Let y denote an optimal (integral) solution of TAP. Algorithm 1 runs in polynomial time, and returns a solution for TAP of size ≤ 32 y(E). It can be seen that Algorithm 1 can be implemented to run in time O(|V |3 + |V |2 m50 ), where m0 denotes the number of (multi) links in the input and we assume that m0 = O(|V |2 ). This can be achieved using simple data structures such as adjacency matrices and adjacency lists; the details are not straightforward, but we skip them. To handle the (up-to-5) greedy contractions, every subset of size ≤ 5 of the set of maximal links has to be examined (for each link uw in a subset, Pu,w has to be examined), and there are O(|V |) such contractions, hence, these contractions contribute a total of O(|V |2 m50 ) to the running time. Theorem 8.11. Algorithm 1 can be implemented to run in time O(|V |3 + |V |2 m50 ). Acknowledgments. We thank André Linhares for many discussions. We thank several other colleagues who read preliminary drafts and gave us insightful comments. References [1] J. Cheriyan, H. J. Karloff, R. Khandekar, and J. Könemann. On the integrality ratio for tree augmentation. Oper. Res. Lett., 36(4):399–401, 2008. [2] R. Diestel. Graph Theory (4th ed.). Graduate Texts in Mathematics, Volume 173. Springer-Verlag, Heidelberg, 2010. [3] G. Even, J. Feldman, G. Kortsarz, and Z. Nutov. A 3/2-approximation algorithm for augmenting the edgeconnectivity of a graph from 1 to 2 using a subset of a given edge set. In Approximation, Randomization and Combinatorial Optimization: Algorithms and Techniques, APPROX-RANDOM 2001, Proceedings, volume 2129 of Lecture Notes in Computer Science, pages 90–101, 2001. [4] G. N. Frederickson and J. Ja’Ja’. Approximation algorithms for several graph augmentation problems. SIAM J. Comput., 10(2):270–283, 1981. [5] G.Even, J.Feldman, G.Kortsarz, and Z.Nutov. A 1.8 approximation algorithm for augmenting edge-connectivity of a graph from 1 to 2. ACM Transactions on Algorithms, 5:21:6–21:17, 2009. [6] H.Nagamochi. An approximation for finding a smallest 2-edge connected subgraph containing a specified spanning tree. Discrete Applied Mathematics, 126:83–113, 2003. [7] K. Jain. A factor 2 approximation algorithm for the generalized Steiner network problem. Combinatorica, 21(1):39– 60, 2001. [8] A. R. Karlin, C. Mathieu, and C. T. Nguyen. Integrality gaps of linear and semi-definite programming relaxations for Knapsack. In Integer Programming and Combinatoral Optimization, volume 6655 of Lecture Notes in Computer Science, pages 301–314. Springer Berlin / Heidelberg, 2011. [9] G. Kortsarz, R. Krauthgamer, and J. R. Lee. Hardness of approximation for vertex-connectivity network design problems. SIAM J. Comput., 33(3):704–720, 2004. [10] G. Kortsarz and Z. Nutov. A simplified 1.5-approximation algorithm for augmenting edge-connectivity of a graph from 1 to 2. CoRR, abs/1507.02799, 2015. [11] T. Rothvoß. Directed Steiner tree and the Lasserre hierarchy. CoRR, abs/1111.5473, 2011. [12] T.Rothvoß. The Lasserre hierarchy in approximation algorithms. MAPSP Tutorial: Lecture notes http: // www. math. washington. edu/ ~ rothvoss/ lecturenotes/ lasserresurvey. pdf , 2013. Dept. of Comb. & Opt., University of Waterloo, Waterloo, Ontario N2L3G1, Canada. E-mail address: [email protected] E-mail address: [email protected] 36
8cs.DS
arXiv:1603.07051v1 [cs.AI] 23 Mar 2016 Cosolver2B: An Efficient Local Search Heuristic for the Travelling Thief Problem Mohamed El Yafrani Belaı̈d Ahiod LRIT, associated unit to CNRST (URAC 29) Faculty of Science, Mohammed V University of Rabat B.P. 1014 Rabat, Morocco Email: [email protected] LRIT, associated unit to CNRST (URAC 29) Faculty of Science, Mohammed V University of Rabat B.P. 1014 Rabat, Morocco Email: [email protected] Abstract—Real-world problems are very difficult to optimize. However, many researchers have been solving benchmark problems that have been extensively investigated for the last decades even if they have very few direct applications. The Traveling Thief Problem (TTP) is a NP-hard optimization problem that aims to provide a more realistic model. TTP targets particularly routing problem under packing/loading constraints which can be found in supply chain management and transportation. In this paper, TTP is presented and formulated mathematically. A combined local search algorithm is proposed and compared with Random Local Search (RLS) and Evolutionary Algorithm (EA). The obtained results are quite promising since new better solutions were found. I. I NTRODUCTION The travelling thief problem (TTP) is a novel NP-hard problem introduced in [1] to provide a model that better represents real-world problems. The particularity of TTP is that it is composed of two other NP-hard problems, namely the travelling salesman problem and the knapsack problem, which are interdependent. The problem can be introduced with the following simplified statement: ”Given n cities and m items scattered among these cities, a thief with his rented knapsack should visit all n cities, once and only once each, and pick up some items. The more the knapsack gets heavier, the more the thief becomes slower. What is the best path and picking plan to adopt to achieve the best benefit ?”. Two particular properties can be extracted from the statement above. First, the overall problem is composed of two sub-problems: choosing the best path and picking up the most profitable items. Second, the sub-problems are interdependent: when the knapsack gets heavier, the speed of the thief decreases. The composition increases the number of possible solutions, and the interdependence makes it impossible to isolate sub-problems. This kind of multiple interdependent components is widely found in logistics and supply chain management. Nevertheless, few attempts have been made to study and solve these problems as a whole, and a lot of effort have been made to solve the components independently. In [3], the authors explain why there is a gap between the work done by the Evolutionary Computation researchers and real-world applications. As far as we know, these observations can be extended to all metaheuristics community. Examples of other realistic problems with multiple interdependent sub-problems include most supply chain optimization problems [7], [8], routing problems with loading constraints such as 2L-CVRP and 3L-CVRP [9], [10], [3], and water tank delivery [14]. Since TTP was introduced, some algorithms were proposed to solve it. An Evolutionary Algorithm and a Random Local Search were proposed in [13] to provide a starting point to other researchers. In [2], an approach named Cosolver was introduced to solve TTP by separating the sub-problems and managing a communication between them. Lastly, an interesting work on TTP introduces many complexity reduction techniques in order to solve very large instances in a time budget of 10 minutes [11]. In this paper, we follow the ideas proposed in [2] and [11] to propose further improvements and introduce an algorithm based on the Cosolver framework that can solve TTP instances efficiently. This paper is organized as follows. In section II TTP is mathematically defined and investigated. Section III is dedicated to introduce our approach for solving TTP. The tests and results are presented in section IV. Section V concludes the paper and outlines areas for future research. II. BACKGROUND In this section, we present some background information about TTP. The problem is formulated and an abstract algorithm is presented. A. The Travelling Thief Problem Herein we formulate the Travelling Thief Problem (TTP) which combines two other well known benchmark problems, namely the Travelling Salesman Problem (TSP) and the Knapsack Problem (KP). In TTP, we consider n cities and the associated distance matrix {dij }. There are m items scattered in these cities, each item k have a profit pk and a weight wk . A thief with his knapsack is going to visit all these cities (once and only once 978-1-5090-0478-2/15/$31.00 c 2015 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. each), and pick up some items to fill his knapsack. We note W the maximum capacity of the knapsack, vmin and vmax are the minimum and maximum possible velocity respectively. Also, we consider also the following constraints and parameters: • • • Each item is available in only one city. We note {Ai } the availability vector, Ai ∈ {1, ..., n} contains the reference to the city that contains the item i. We suppose that the knapsack is rented. We note R the renting price per time unit. The velocity of the thief changes accordingly to the knapsack weight. We note vxi the velocity of the thief at city xi (see equation 1). vxi = vmax − C ∗ wxi (1) −vmin where C = vmaxW is a constant value, and wxi represents the weight of the knapsack at city xi . The goal of the problem is to find the tour x and the picking plan z that optimize the total travel gain defined in equation 2. G(x, z) = g(z) − R ∗ f (x, z) (2) P Where g(z) = m pm ∗ zm is the total value of the items Pn−1 P subject to m wm ∗ zm ≤ W , and f (x, z) = i=1 txi ,xi+1 + txn ,x1 is the total travel time. The solutions could be naturally coded as follows. The tour x = (x1 , ..., xn ) is a vector containing the ordered list of cities, and the picking plan z = (z1 , ..., zn ) is a binary vector such as zi is equal to 1 if the item i is picked, 0 otherwise. The interdependence between KP and TSP have been investigated. As shown in [1], [11], optimizing the sub-problems in isolation (even to optimality) does not guarantee finding good solutions for the overall problem. Therefore, finding good global solutions requires an algorithm that takes interdependence of components in consideration, which makes the design of such an algorithm quite difficult. B. Cosolver Cosolver is an abstract algorithm proposed in [2] to solve TTP. The idea behind the algorithm is simple. Decompose the overall problem and solve components separately using a fitness function that takes in consideration the interdependence between the two components. Thus, given an initial solution (x0 , z0 ), TTP is decomposed into the following problems. 1) The Travelling Salesman with Knapsack Problem (TSKP): consists of finding the best tour x′ that, combined with the last found picking plan z ′ , optimizes the TTP objective function G. Also, because the total profit function g does not depend on the tour, instead of maximizing G, we can consider minimizing the total travel cost T (see equation 3). T (x, z) = R ∗ f (x, z) (3) 2) The Knapsack on the Route Problem (KRP): consists of finding the best picking plan z ′ that maximizes the total gain G when combined with the last found tour x′ . Figure 1 represents a flowchart of the Cosolver framework. III. P ROPOSED APPROACH In this section, we propose an algorithm that implements the Cosolver framework and uses some techniques proposed in [11]. A. Solution initialization In TTP, the initial solution has a big impact on the search algorithm. Thus, the initialization strategy should be chosen carefully. In our implementation, we use a heuristic approach to initialize both the tour and the picking plan. Firstly, the tour is generated using a good TSP algorithm such as the Lin-Kernighan heuristic [6] or the Ant Colony Optimization algorithm [5]. Then, the picking plan is initialized using the following approach. 1) The insertion heuristic proposed in [11] is used to fill the knapsack with items according to three fitness approximations. 2) A simple bit-flip search on inserted items is performed to eliminate some useless items from the picking plan using the objective function. We will refer to this heuristic as the insertion & elimination heuristic. B. Complexity reduction techniques Our algorithm uses the following complexity reduction techniques. 1) TSKP neighborhood reduction: The Delaunay triangulation [4] is used as a candidate generator for the 2-OPT heuristic. This strategy was also proposed in [11]. 2) Objective value recovery: Instead of using the objective function to calculate the objective value of neighbors, this value can be recovered by keeping track of time and weight information at each tour’s city. The following vectors are used to perform such operation. acc • Time accumulator (t ): a vector that contains the current time at each city of the tour. acc • Weight accumulator (w ): a vector that contains the current weight at each city of the tour. reg • Time register (t ): a vector that contains the added time at each city of the tour. reg • Weight register (w ): a vector that contains the added weight at each city of the tour. Figure 2 shows the effect (in gray) of mutating a TTP solution on the total travel time. Two mutations are shown (in black): the one-bit-flip on the picking plan, and a 2-OPT exchange on the tour. A similar technique named incremental evaluation was proposed in [11]. In our implementation, we go further and use these techniques also to recover the vectors. Fig. 1. bit- ip x(1) A simplified Cosolver flowchart x(i) x(n) t(1) t(i-1) x(1) 2-opt t(n) x(j) x(i) x(n) t(1) t(n) t(i) t(j) Fig. 2. Example of changes that can be applied to a TTP solution (in black) and its effect on the total traveling time function (in gray) 3) Objective function calculation: The objective function has a complexity of O(m ∗ n) as proposed in [12], where m is the number of items and n is the number of cities. The complexity could be reduced to O(k∗n) where k is the number of items per city. In the CEC ’2015 competition website 1 , the Java implementations already has a reduced complexity but it uses a technique highly dependent on the TTP instance generator. We believe that a better way is to class items per city. Figure 3 explains this technique using a simple example. In the example, 4 cities are considered: city 1 contains 4 items (1, 2, 3 and 4), city 2 contains 2 items (5 and 6), city 3 contains no items, city 4 contains 3 items (7, 8 and 9). Fig. 4. Fig. 3. Data structure for classing items by cities C. Proposed algorithm Our heuristic, namely Cosolver2B, is based on local search algorithms, and it implements the Cosolver framework. In addition to the techniques presented above, we use the 2-OPT heuristic to solve TSKP and a bit-flip search to solve the KRP. The algorithm is summarized in the flowchart in figure 4. 1 http://cs.adelaide.edu.au/ optlog/CEC2015Comp/ Cosolver2B: Cosolver with 2-opt and bit-flip The algorithm starts with a tour generated using the LinKernighan heuristic. The insertion & elimination heuristic is then used to initialize the picking plan. The obtained tour and picking plan are then given to the TSKP optimizer that tries to improve the current tour using a 2-OPT heuristic. The resulting tour is combined with the current picking plan and given to the KRP optimizer that uses a simple bit-flip to find a decent picking plan. If there is improvement, the new picking plan is combined with the current tour and given to the TSKP optimizer. This process is repeated until there is no improvement. IV. E XPERIMENTAL RESULTS We tested our algorithm on 15 TTP instances of various sizes [13]. The obtained results are compared with RLS and TABLE I R ESULTS OF C OSOLVER 2B COMPARED TO EA AND RLS instance berlin52 n255 uncorr-similar-weights 05 kroA100 n495 uncorr-similar-weights 05 ch150 n745 uncorr-similar-weights 05 ts225 n1120 uncorr-similar-weights 05 a280 n1395 uncorr-similar-weights 05.ttp lin318 n1585 uncorr-similar-weights 05 u574 n2865 uncorr-similar-weights 05 dsj1000 n4995 uncorr-similar-weights 05 rl1304 n6515 uncorr-similar-weights 05 fl1577 n7880 uncorr-similar-weights 05 d2103 n10510 uncorr-similar-weights 05 pcb3038 n15185 uncorr-similar-weights 05 fnl4461 n22300 uncorr-similar-weights 05 rl11849 n59240 uncorr-similar-weights 05 usa13509 n67540 uncorr-similar-weights 05 pla33810 n169045 uncorr-similar-weights 05 EA Cosolver2B firstfit Cosolver2B bestfit objective time objective RLS time objective time objective time 20591 38864 40922 84907 104365 75387 223165 320165 573667 589756 801110 1119168 1477673 2152954 2226676 -9929644 1.28 1.92 2.69 3.82 5.64 6.87 21 47 95 127 214 427 600 600 600 600 20591 38864 40922 84907 104365 75387 223165 320165 573667 589756 801110 1119169 1478963 4328939 5077892 -3158915 0.89 1.06 1.38 1.69 1.84 3.81 5.42 12 21 28 44 101 265 600 600 600 25440 39599 52225 88925 107233 114915 243571 332916 571634 665866 869584 1117659 1220469 1785671 4420300 14887314 0.13 0.21 0.38 0.61 0.88 1.25 5.36 5.95 68 139 357 600 600 600 600 600 26658 39597 53075 89079 112003 114915 253770 332917 586576 684731 869584 1086092 696650 478884 4082169 15085752 0.11 0.27 0.43 0.92 1.09 1.54 6.51 8.44 83 148 389 600 600 600 600 600 EA proposed in the same paper 2 . We have implemented two versions of Cosolver2B. The first is best fit (also known as best improvement) which searches the entire neighborhood on a given iteration and selects the best neighbor. The second is first fit (also known as first improvement) which stops the neighborhood search once a better solution is found. Since our algorithms are deterministic, one run per instance is sufficient. The algorithms have a maximum runtime limit of 600 seconds. Note that our implementation uses the Java platform, and the tests are performed on a core i3-2370M CPU 2.40GHz machine with 4 GB of RAM, running Linux. On the other hand, due to their random behavior, 30 runs per instance were performed using RLS and EA. The tests on EA and RLS were performed on a different machine (Matlab 2014, core i7 2600 CPU 3.4 GHz, with 4GB of RAM, running Windows 7). Thus, The runtimes for these algorithms are given for guidance. Furthermore, in our comparison, we only select the best found solution for these two algorithms. The results are reported in table I. Note that the runtimes are measured with seconds and the best objective values are made bolder. The results show that our algorithm was able to find new better solutions for most tested instances only by combining local search algorithms. Furthermore, we have made the following observations: • Cosolver2B surpasses EA and RLS on various TTP sizes. • The runtime of Cosolver2B is very decent for small and mid-size instances. However, for very large instances the runtime is quite high compared to RLS and EA. 2 for instance files and raw results of RLS and EA, the reader is referred to https://sites.google.com/site/mohammadrezabonyadi/standarddatabases/travellingthief-problem-data-bases-and-raw-results • • • Both EA and RLS have an unpredictable behavior, while Cosolver2B is deterministic and garantees decent solutions for most instances. For many instances, most optimization runtime and gain improvement is done on the KRP sub-problem. The best fit strategy performed better than first fit for most small and mid-size instances. V. C ONCLUSION In this paper, a combined local search heuristic has been proposed. Our approach is based on the Cosolver framework and complexity reduction techniques. The experimental results have shown promising results both in terms of solution quality and runtime. The good performance of Cosolver2B and the memetic algorithm MALTS on very large scale instances [11] proves the importance of making strong assumptions about the problem domain when dealing with multi-component problems. Furthermore, we engage to improve our algorithm in terms of space exploration and runtime by using more sophisticated search heuristics. ACKNOWLEDGMENT The authors express their gratefulness to the following persons who have contributed to this work with their useful comments: Asmae El Ghazi, Aziz Ouaarab, and Mehdi El Krari. R EFERENCES [1] Mohammad Reza Bonyadi, Zbigniew Michalewicz, and Luigi Barone. The travelling thief problem: the first step in the transition from theoretical problems to realistic problems. In Evolutionary Computation (CEC), 2013 IEEE Congress on, pages 1037–1044. IEEE, 2013. [2] Mohammad Reza Bonyadi, Zbigniew Michalewicz, Michaŏ Roman Przybyŏek, and Adam Wierzbicki. Socially inspired algorithms for the travelling thief problem. In Proceedings of the 2014 conference on Genetic and evolutionary computation, pages 421–428. ACM, 2014. [3] Andreas Bortfeldt. A hybrid algorithm for the capacitated vehicle routing problem with three-dimensional loading constraints. Computers & Operations Research, 39(9):2248–2257, 2012. [4] Boris Delaunay. Sur la sphere vide. Izv. Akad. Nauk SSSR, Otdelenie Matematicheskii i Estestvennyka Nauk, 7(793-800):1–2, 1934. [5] Marco Dorigo and Luca Maria Gambardella. Ant colonies for the travelling salesman problem. BioSystems, 43(2):73–81, 1997. [6] Keld Helsgaun. An effective implementation of the lin–kernighan traveling salesman heuristic. European Journal of Operational Research, 126(1):106–130, 2000. [7] Maksud Ibrahimov, Arvind Mohais, Sven Schellenberg, and Zbigniew Michalewicz. Evolutionary approaches for supply chain optimisation: part i: single and two-component supply chains. International Journal of Intelligent Computing and Cybernetics, 5(4):444–472, 2012. [8] Maksud Ibrahimov, Arvind Mohais, Sven Schellenberg, and Zbigniew Michalewicz. Evolutionary approaches for supply chain optimisation. part ii: multi-silo supply chains. International Journal of Intelligent Computing and Cybernetics, 5(4):473–499, 2012. [9] Manuel Iori and Silvano Martello. Routing problems with loading constraints. Top, 18(1):4–27, 2010. [10] Stephen CH Leung, Zhenzhen Zhang, Defu Zhang, Xian Hua, and Ming K Lim. A meta-heuristic algorithm for heterogeneous fleet vehicle routing problems with two-dimensional loading constraints. European Journal of Operational Research, 225(2):199–210, 2013. [11] Yi Mei, Xiaodong Li, and Xin Yao. Improving efficiency of heuristics for the large scale traveling thief problem. In Simulated Evolution and Learning, pages 631–643. Springer, 2014. [12] Yi Mei, Xiaodong Li, and Xin Yao. On investigation of interdependence between sub-problems of the travelling thief problem. Soft Computing, pages 1–16, 2014. [13] Sergey Polyakovskiy, Mohammad Reza, Markus Wagner, Zbigniew Michalewicz, and Frank Neumann. A comprehensive benchmark set and heuristics for the traveling thief problem. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO), Vancouver, Canada, 2014. [14] Jacob Stolk, Isaac Mann, Arvind Mohais, and Zbigniew Michalewicz. Combining vehicle routing and packing for optimal delivery schedules of water tanks. OR Insight, 26(3):167–190, 2013.
9cs.NE
State and Parameter Estimation Based on Filtered Transformation for a Class of Second-Order Systems Mehdi Tavan, Kamel Sabahi, and Saeid Hoseinzadeh  Abstract— This paper addresses the problem of state and parameter estimation for a class of second-order systems with single output. A new filtered transformation is proposed for the system via dynamic vector and matrix. In this method, the dynamics of the vector and matrix are derived by immersion and invariance technique such that the state estimation condition is guaranteed. Compared to the classical approaches that persistency of excitation (PE) condition is required for parameter convergence, the proposed method needs a weaker one, so called non-square-integrability condition, in the transformation via dynamic matrix. Simulation results are concluded for a class of regressors which are not PE but satisfy the new condition. I. INTRODUCTION The persistency of excitation (PE) condition on the regressor is one of the main tools to ensure convergence in parameter estimators for identification purposes. Recently, a new procedure has introduced in [1] to design the parameter estimators in which the PE condition is replaced with a weaker one, called non-square-integrability condition. In this procedure some dynamic regressors are designed to guarantee the new condition for the determinant of an extended regressor. Applications of this method for some electrical examples show better transient and robust performance properties [2, 3]. The use of dynamic regressors can be found for adaptive observer design via filtered transformation in [4] and the references cited therein. Besides the PE condition for parameter convergence, an additional disadvantage is overparameterisation in such a design. The immersion and invariance (I&I) based filtered transformation introduced in [5] reduces the order of the observer with elimination of output injection error term in update law. Application of this method for DC-DC boost converter is evaluated via experiments in [6]. The filtered transformations in [4, 5] are formed via a dynamic vector which yields to a descent algorithm with singular descent rate that is at the core of convergence problem in parameter estimation [7]. In this paper a filtered transformation is introduced via dynamic matrix for a class of second-order systems with single-output. The main contribution of this paper is to propose an estimator based on the new transformation, which asymptotically estimates unavailable state and unknown parameters. The parameter convergence is ensured under the non-square-integrability condition. Fulfilling this condition is discussed for the estimator. Moreover, it is shown that the estimator provides an arbitrary convergence speed. Also M. Tavan and Saeid Hoseinzadeh are with the Department of Electrical Engineering, Mahmudabad Branch, Islamic Azad University, Mahmudabad, Iran (e-mail: [email protected]). K. Sabahi is with the Department of Electrical Engineering, Mamaghan Branch, Islamic Azad University, Mamaghan, Iran. simulation results are concluded for a class of regressors which are not PE but satisfy the new condition. II. PROBLEM STATEMENT AND PRELIMINARY Consider a class of single-output nonlinear systems that can be described in suitable co-ordinates by equations of the form ̇ ( ) ( ̇ ) ( ) (1) ( ) (2) where is the measurable state, is the unmeasurable state, is a constant vector of unknown ( ) are known parameters, ( ) ( ) ( ) and mappings. As mentioned in Introduction, our objective consists of estimating and . As shown in [6], the average model of some popular switch converters, such as DC-DC boost, buck and buck-boost, can be represented in the form of above equations. For the system, the unmeasurable state can be assumed to be generated by a parameter dependent change of coordinate [4] [ (3) ] where ( ) is an auxiliary dynamic vector, which [ ] is the its dynamics are to be defined, and unavailable vector. From (2) and (3) the dynamics of can be written as ̇ [ ] (4) with ( [ ̇) ] where and are the zero matrix and zero vector, respectively. Although using the vector filtered transformation ( ) for such systems like in [5, 6] facilitate the state estimator design, the limitation imposed by the PE condition is still remained in the parameter estimation. To overcome this problem the matrix filtered transformation is introduced as [ where () (5) ] , in which ( is identity matrix, ) ( ) , , is an auxiliary dynamic matrix, which its dynamics are to be [ ] is the new unavailable vector. In defined, and turn, the dynamics of can be obtained as ̇ [ ] (6) ̇ [ ( ( where ( ) ) ̇) ( ] ) . and ( ) As will become clear in the next section, the derivation of the ( )-dynamics and the ( )-dynamics follows the idea in [5, 6]. In the proposed approach, the advantages of I&I technique with input-output filtered transformation is combined to construct a proper immersion and an auxiliary dynamic filter for the estimation purpose. In order that the state be observable from the output , the following assumption is imposed. Assumption 1: The system (1), (2) is forward complete, i.e. trajectories exist for all . The function ( ) and its time derivative are bounded and | | for all and . A. Filtered Transformation via Dynamic Vector This subsection is devoted to summarize the method proposed in [5, 6] with some modifications. The change of coordinate (3) and the dynamic equation (4) are considered for design methodology in this subsection. Following the I&I procedure [8] and [5, 6], define the estimation error as ( ) (7) where is the estimator state, the dynamics of which is to be defined, and the mapping yet to be specified. To obtain the dynamics of , differentiate (7), yielding ̇ ̇ ̇ ̇ ̇ ̇ Let ( )[ ] ( ) (8) ] ] ) (10) [ ], the From (7) and the definition of [ ] with estimation error can be decomposed into and . Also, with respect to (3), the state estimation error can be expressed as ̅ . The following proposition establishes that there exists the mapping and the dynamics of the filtered vector such that the state estimation error ̅ converges to zero. Proposition 1: Assumption 1 with ( ) Consider ( ) [ ( ) | | ̇ the system (10) under ] ( )[ (11) ] ( ) ( ( ) ) (12) where and are constant and ( ) positive definite matrices, is a strictly increasing function with bounded derivative. Then the system (10) has a uniformly globally stable equilibrium at the origin, and ̅ . If, in addition, ( ) is bounded, then ( ) is bounded and ̅ converges to zero. Proof 1: Notice that the derivation of the signum ( ) is zero, due to the observation restriction function () . Substituting (11), (12) into (10) yields the error dynamics ̇ ( ̇ [ ) ] (13) | | [ ] ( ) has been used to get the last equality. where | | Consider now the following Lyapunov function candidate ( ) ( ) (14) whose time-derivative along the trajectories of (13) satisfies ̇ where ̇ is given in (4), and the output dynamics ̇ can be rewritten in term of , as [ (9) [ ( III. ESTIMATOR DESIGN In this section, two classes of estimators are designed for the system (1), (2). Although, the first one facilitates estimator design using a filtered transformation via dynamic vector, it requires the regressor persistency of excitation for the parameter estimation. It is worth pointing out that the second one ensures parameter convergence with PE dismissal. ) where ̇ is to be defined. Replacing (9) in (7), yields ̇ ( )( ̇ with [ ] | | ( | | ( ) ( ) ) (15) for some constant , where the positive definite property of has been used to get the bound. The equations (14) and (15) imply that the system (13) has a uniformly globally stable equilibrium at the origin, , , and then ̅ . Note that the above holds for any . It is clear that, (12) is input-to-state stable dynamic, then ( ) and its time derivative remains bounded for any ⁄ bounded . Consequently, , , ̇, and being ̈ bounded, ̇ in (13) and then in (15) are bounded. Therefore, the convergence of ̅ to zero follows directly from Lemma 1 in [9]. ] converges to zero, an Remark 1: If ̅ [ ]( ). asymptotic estimate of is given by ̂ [ As is well known ([10], Lemma B.2.3), the parameter estimation error converges to zero if the regressor vector ( ) and its time derivative are uniformly bounded and the regressor satisfies PE condition. Notice that, the bounded condition is satisfied here for any bounded . Remark 2: In comparison with the estimator proposed in [5, 6], the gain matrix is added to filter dynamics in (12) which can help to make the regressor exciting over a time sequence arbitrary. Remark 3: In comparison with the mapping in [5, 6], the gain matrix is added in (11) and then in error dynamics (13). The system (13) is in the form of damped nonlinear oscillator in which the transient time can be improved arbitrary by reducing the overshot via tuning. B. Filtered Transformation via Dynamic Matrix To dismissal the PE condition in parameter estimation, the design methodology in this subsection is based on the change of coordinate (5) and the dynamic equation (6). In the light of the proposed design procedure in the previous subsection, a general expression of ( ) can be expressed by ( ( ) ( )[ ) ( ) ( ( ) ( ( )[ ( | | ( )( ( ̇ | | ( ) [ ) ̇ ( (18) )) . ]( [ ] (21) [ ], the From (16) and the definition of estimation error can be decomposed into and . Also, with respect to (5), the state estimation error of can be stated as ̅ . A choice of and which achieves the design objective is given in the following proposition. Proposition 2: Consider the system (21) verifying Assumption 1, with ( ) ( ) ( ) (22) ( ) (23) where , and ( ) are chosen as in Proposition 1, in addition, suppose that the eigenvalues of are different. Then the system (21) has a uniformly globally stable equilibrium at the origin, and ̅ . Moreover, if ( ) is bounded, then ( ) is bounded and ̅ converges to zero. If in addition ( ) (resp. ( ) ), then converges to zero asymptotically (resp. exponentially). Proof 2: Consider the following Lyapunov function candidate ( ) ( ) (24) whose time-derivative along the trajectories of (21), is ̇ | | (17) )) ] [ ] [ ] (25) Replacing (23) and (24) in (25), we obtain ] ( ) ( ) ( ) where choosing the update laws as ̇ [ (16) where ( ) is to be defined, and ( ) ( ) is a vector function in which, ( ) is defined in Proposition 1. Notice that, the dynamics of the vector function ( ) can be obtained in term of , as ̇ | | ̇ Now, by [ ] ] ( )) ) (19) ̇ | | ( ) (26) which implies that the system (21) has a uniformly globally stable equilibrium at the origin, , , and then ̅ . The above holds for any . Inserting (23) and (24) into (20) yields ̇ | | ( ) ( ) (27) which is input-to-state stable with respect to perturbation ( ). Therefore, the dynamic equation (26) with ̇ induces . On the other hand, for bounded , ⁄ , boundedness of ̇ and ̈ can be obtained , ̇, and from (21)-(23) and (26) respectively. As a result, the convergence of and then ̅ to zero is guaranteed by Lemma 1 in [9]. Note now that (28) (20) and with respect to (6), (16)-(18), the resulting error dynamics can be obtained as for some , where use has been made of positive definite property of . For any ( ) , the expression ( ) ( ) is symmetric, and its eigenvalues are real and nonnegative [11]. Also, if ( ) are the eigenvalues of ( ), then ( ) are the eigenvalue of ( ) ( ), for all . Let , then ( ) be the minimal value of ( ) ( ) ( ) ( ) for any (29) On the other hand, it is well known the determinant of a square matrix is the product of all its eigenvalues. As a ( ) result, if ( ) then . Now using (26)(29) and doing some basic bounding, yields ̇ | | ( Remark 4: Replacing (23) and (24) in (21) yields to the following error dynamics [ IV. SIMULATION EXAMPLE (30) ( ). It is clear that for some and ( ) exponential convergence of , and then can be directly obtained from (30) due to the positiveness of ( ). Note ( ), if now that for bounded ( ) then all ( ) ( ) eigenvalues ( ) [1]. As a result, and from (30) asymptotic stability of and then is guaranteed. | | Remark 8: Notice that, a sudden change in the system parameters distorts the output signal in (1), (2). This can be transferred to the ( )-dynamics in (27) by an output ⁄ . Then, the feedback which appears in the term dynamics are actuated to adapt ( ) with the changes, even if the regressor ( ) is not dependent on the output signal, i.e. ( ). ) ( ) ̇ Generally, a necessary condition for any positive definite matrix in (27) is that its eigenvalues be different. ] in which the effect of overshoot induced by be reduced arbitrarily by tuning . Consider the system (1), (2) with [ ] and ( )]. Assume that [ ( ) is derived from the following equations ( Remark 5: If converges to zero, an asymptotic estimate of is given by ̂ . Also, If ̅ [ ] converges to zero, an asymptotic estimate of ). In turn, with respect to is given by ̂ [ ]( the definition of , an estimate of unmeasurable state is given by ̂ ̂. C. Discussion The main question arises at this method is that, for a ( ) how to fulfill the condition given regressor ( ) . The answer lies in the ( )-behavior tuning. With respect to the first order differential equation (27), the behaviour of ( ) consists of transient component and steady state component. These components can be affected by arbitrarily chosen of a possible output feedback, induced by the term ⁄ , and the gain . In addition, the transient component also depends on the initial value of ( ), i.e. ( ). Hence, some notes are remarked following. Remark 6: In order to fulfil the condition ( ) , it ( )) is reasonable to choose ( ) such that ( . However, the effect of this choice fades away over time. Remark 7: The equation (27) becomes a simpler differential equation if the positive definite matrix becomes diagonal. In this case, (27) can be decomposed to individual differential equations. Now, to satisfy the state ( ) , a necessary condition is that the entries on the main diagonal of be different. This yields different steady state components for each individual differential equation. ̇ ( ) ( ) ̇( ) ( ) ( ( ) ) ( ) (32) (33) where are positive constant and , and ( ) belongs to the following set of differentiable function { (31) can ) ( ) | ̇( ) () ( ) () ( ) (34) The set is borrowed from [1] with some modifications. ( ) For any , the condition ( ) ( ) insures and then ( ) remains bounded. Also, the condition () ( ) ( ) and then ( ) is not PE yields because it converges to zero as . ⁄ Let us assume in (12) and (27). Then, the steady state component of (12)-solution for and can be obtained as [ [ ( ) ( ) ( )] (35) ( ) ( )] (36) respectively. With respect to Remark 7, choosing ( ) for (27) yields to [ where ] (37) is the steady state component of (27)-solution. Remark 9: The regressors because ( ) ( ) ( ) , and ( ) due to positive semi definite property of the matrixes. Notice that, the matrix , but ( ) because ( in which, by (34), ̇ ( ) ) ̇( ) ( )( ) . A. Simulation Results Consider the system introduced in this section with (38) ( ) √ (39) [3] which [1]. Simulations are run to evaluate the performance of estimators introduced in Proposition 1 and 2. All initial values correspond to the system and the estimators are set to zero. The time histories of the parameters estimation errors ̂ and the state estimation errors ̂ are shown for estimator b1 (dashed line), estimator b2 (dashed-dot line), and estimator B (solid-line) in Fig. 1. The estimator bi is formed by replacing in Proposition 1 and the estimator B is formed by replacing ( ) in Proposition 2, while the mapping ( ) and the gain are chosen for all of them. The graphs in Fig. 1 show ) the performance of the estimators for the set ( ( ). [4] [5] [6] [7] [8] From the graphs in Fig. 1 it can be seen that, for , a bigger value of has a better response in the parameter estimation. In the all graphs, the estimator B has a faster response in parameter and state estimation. The last graph of Fig. 1 shows the absolute value of the ( )-determinant. From (38) and (39) the determinant of ( ) is not square integrable which is the core of convergence property of the estimator B. [9] [10] [11] regressor extension and mixing," IFAC-PapersOnLine, vol. 49, pp. 99-104, 2016. A. Bobtsov, D. Bazylev, A. Pyrkin, S. Aranovskiy, and R. Ortega, "A robust nonlinear position observer for synchronous motors with relaxed excitation conditions," International Journal of Control, vol. 90, pp. 813-824, 2017. R. Marino and P. Tomei, "Global adaptive observers for nonlinear systems via filtered transformations," IEEE Transactions on Automatic Control, vol. 37, pp. 1239-1245, 1992. M. Tavan, A. Khaki-Sedigh, M.-R. Arvan, and A.-R. Vali, "Immersion and invariance adaptive velocity observer for a class of Euler–Lagrange mechanical systems," Nonlinear Dynamics, vol. 85, pp. 425-437, 2016. M. Malekzadeh, A. Khosravi, and M. Tavan, "Immersion and invariance Based Filtered Transformation with Application to Estimator Design for a Class of DC-DC Converters," Transactions of the Institute of Measurement and Control, vol. (Accepted), 2018. R. Brockett, "The rate of descent for degenerate gradient flows," in Proceedings of the 2000 MTNS, 2000. A. Astolfi, D. Karagiannis, and R. Ortega, Nonlinear and adaptive control with applications: Springer Science & Business Media, 2007. G. Tao, "A simple alternative to the Barbalat lemma," IEEE Transactions on Automatic Control, vol. 42, p. 698, 1997. R. Marino and P. Tomei, Nonlinear control design: geometric, adaptive and robust: Prentice Hall International (UK) Ltd., 1996. C. D. Meyer, Matrix analysis and applied linear algebra vol. 71: Siam, 2000. The next simulation is run to show the influence of the gain on the performance of the estimator B. All conditions and gains are the same as previous simulation. The time histories of the parameters and the state estimation errors are shown for (dashed line), (dasheddot line), and (solid-line) in Fig. 2. As it is evident in Fig. 2, the overshot is decreased by increasing the value of , and as a result, faster responses in the both parameter and state estimation are obtained. V. CONCLUSION A new I&I based filtered transformation is introduced via dynamic matrix for a class of second-order systems with single-output. The main contribution of this paper is to propose an estimator based on the new transformation, which asymptotically estimates unavailable state and unknown parameters. Parameter convergence is guaranteed under non-square-integrability assumption for the matrix. Moreover, it is shown that the estimator provides an arbitrary convergence speed. Also simulation results are concluded for a class of regressors which are not PE but satisfy the new condition. Some practical results on electrical systems are under way to show effectiveness of the proposed design. Figure 1. Transient performance of the estimator bi and estimator B. REFERENCES [1] [2] S. Aranovskiy, A. Bobtsov, R. Ortega, and A. Pyrkin, "Performance enhancement of parameter estimators via dynamic regressor extension and mixing," IEEE Transactions on Automatic Control, vol. 62, pp. 3546-3550, 2017. S. Aranovskiy, A. Bobtsov, R. Ortega, and A. Pyrkin, "Improved transients in multiple frequencies estimation via dynamic Figure 2. Transient responces of the estimator B for changs in .
3cs.SY
Towards Data Quality Assessment in Online Advertising Sahin Cem Geyik 1,+,∗ , Jianqiang Shen 2,∗ , Shahriar Shariat Ali Dasdan 4,+ , Santanu Kolay 2 arXiv:1711.11175v1 [cs.AI] 30 Nov 2017 2 3,+ , 1 LinkedIn Corporation, [email protected] Turn Inc., {jianqiang.shen, santanu.kolay}@turn.com 3 Uber, [email protected] 4 Vida Health, [email protected] ABSTRACT 1. INTRODUCTION In online advertising , our aim is to match the advertisers with the most relevant users to optimize the campaign performance. In the pursuit of achieving this goal, multiple data sources provided by the advertisers or third-party data providers are utilized to choose the set of users according to the advertisers’ targeting criteria. In this paper, we present a framework that can be applied to assess the quality of such data sources in large scale. This framework efficiently evaluates the similarity of a specific data source categorization to that of the ground truth, especially for those cases when the ground truth is accessible only in aggregate, and the user-level information is anonymized or unavailable due to privacy reasons. We propose multiple methodologies within this framework, present some preliminary assessment results, and evaluate how the methodologies compare to each other. We also present two use cases where we can utilize the data quality assessment results: the first use case is targeting specific user categories, and the second one is forecasting the desirable audiences we can reach for an online advertising campaign with pre-set targeting criteria. Online advertising strives to serve the most beneficial advertisement (ad) to the most relevant online users in the appropriate context (a specific website, mobile application, etc.). This typically results in attaining higher return-oninvestment (ROI) for the advertisers [10], where the value is generated either from a direct response such as a click or conversion (e.g. the purchase of a product, subscription to a newsletter, etc.), or through delivering a branding message. For this purpose, advertisers receive help from multiple entities in the domain. Supply-side platforms (SSP) provide ad-space (inventory) on websites or mobile apps, to serve ad impressions to users. Ad-exchanges run auctions on available inventory from SSPs. Demand-side platforms (DSP) act on behalf of the advertisers and aim to bid on the most valuable inventory. Advertisers often get performance reports from an independent evaluation agency # . For privacy reasons, these reports, in most cases, only contain aggregate metrics (e.g. click-through rate, percentage of female audiences). In order to reach the right audience usually defined by the advertiser, which in general would improve direct response and branding metrics, the advertisers need to utilize various data sources to label the users in the most accurate way possible. Data management platforms (DMP) have been emerging as a central hub to seamlessly collect, integrate and manage large volumes of user data [6]. Such user data could be first-party (i.e. historical user data collected by advertisers in their private customer relationship management systems), or third-party (i.e. data provided by third-party data partners, typically each specializing in a specific domain, e.g., demographics, credit scores, buying intentions). While first-party data is proprietary to the advertiser and free to utilize, third-party data often carries a pre-negotiated cost per impression (ad served to a user in a website or application). In both cases, it is important for the advertiser to know how accurate a data source is. That is, if a data source has tagged a user to be in category ci (user property, e.g. gender, age, income), how likely it is for the user to actually be in that category. In this paper, we are investigating the above problem which we call data quality assessment in online advertising. The main issue in evaluating the accuracy of a data source Categories and Subject Descriptors H.3.5 [Information Storage and Retrieval]: Online Information Services; I.2.1 [Artificial Intelligence]: Applications and Expert Systems General Terms Algorithms, Application Keywords Online Advertising; Data Quality; Targeting; Forecasting ∗ The authors contributed to this work equally. + This work was completed when the authors were at Turn. # This work has been presented in the KDD 2016 Workshop on Enterprise Intelligence. There are certain independent evaluation agencies in online advertising domain, whose names we cannot list here to comply with the company policy. Advertisers trust these organizations to collect the ground truth. Table 1: Confusion matrix of data source s for tagging users with category c. Ground Truth Predicted by data source s c not c Unknown c n+,+ n+,− n+, not c n−,+ n−,− n−, n n n Unknown ,+ ,− , is the lack of ground truth in the user-level granularity. For example, the advertisers, in reality, never have access to the confusion matrix (Table 1) of a data source in either first or third-party cases. Therefore, the only way for an advertiser to evaluate the quality of a data source is to run an advertising campaign on a set of users and then evaluate the performance in hindsight. Even in those cases, the post-campaign data is often constrained (mostly due to privacy concerns) and in aggregate, that is, only the total number of users in different categories is provided, and not a granular user-tocategory assignment. If it were possible to have the granular data, it would then be trivial to just use the ground truth data source to come up with the accuracy metrics, e.g. filling in the entries of the confusion matrix. Therefore, utilizing the aggregate performance statistics makes the data quality evaluation task quite challenging, and somewhat similar to aggregate learning tasks in machine learning [5], few of which are also directly applicable to this problem. The main contributions of this work are as follows: • formal definition of data quality assessment problem, and the challenges of solving it in online advertising domain, • multiple approaches for evaluating the quality of a data source, which also take into account the efficiency requirements due to the large number of possible data sources∗ to be evaluated, • several use cases where data quality assessment comes in handy for online advertising, and, • initial evaluation of our methodology utilizing simulated data and real-world advertising campaigns. Rest of the paper is organized as follows. In Section 2, we give a more formal definition of the data quality assessment problem. Next, we discuss the literature that deals with either data quality assessment, or aggregate learning (which, as aforementioned, is relevant to our problem) in Section 3. We present our two proposed assessment methodologies in Section 4 and Section 5, and later give some use cases on how we can utilize our data quality assessment output in Section 6. Finally, we present some initial results in Section 7 and conclude the paper along with some potential future work in Section 8. 2. RESEARCH PROBLEMS As we have explained in the previous section, we seek to evaluate first or third-party data sources available for online advertising using multiple accuracy metrics. * While we cannot list the exact number due to the company policy, there are currently over 200k active data sources in Turn’s system. Definition 1. A sound data source tags each virtual user (cookie ID that might be specific to a browser and device) with one and only one of the 3 labels – {Positive, Negative, Unknown}. The tagging process could be explicit or deductive, but cannot be self-contradictory. For example, a user can have a positive tag – Age25, or a negative tag – NotAge25, but cannot be tagged as both Age25 and NotAge25. The data source can also simply indicate that it has no knowledge on a user by tagging it as Unknown. In real-time bidding, the positive tags are the most important, as advertisers usually utilize them to target the desirable audiences. The problem of data quality assessment is defined as the following: Definition 2. Given a sound data source S, its data quality assessment is defined as a measurement mS that has error no more than ǫ over user examples drawn from user set U , with probability of at least δ,   P ( Eui ∈U Ω(ui , Si ) − mS ≤ ǫ) ≥ δ, where Ω(ui , Si ) is a metric to measure the granular targeting performance when this data source tag user ui with Si . As an example, suppose we have a data source which we utilize to tag a user as Male (positive example) or Not Male (negative example). Consider two evaluation metrics, which are Accuracy (percentage of correct taggings by our data source), and True Positive Rate (percentage of positive examples, i.e. Males, that our data source also tags as males). For the accuracy metric, we have the following Ω: Ω(ui , S) = I(GT (ui ) == Si ), which does an exact comparison of the ground truth tagging of user ui (GT (ui )) against the tagging by data source S (Si ). On the other hand, if we were to calculate true positive rate, then we would have the following Ω: Ω(ui , Si ) = I(GT (ui ) == Si == Male), which counts only those cases where both ground truth and the data source tag the user as Male. Note that the above problem definition is a very general formulation, which is typically used in evaluating Machine Learning models [7, 8, 12]. As long as both the ground truth category of a user and that of the data source are available, one can  come up with a perfect data quality assessment, i.e. Eui ∈U Ω(ui , Si ) ≈ mS from Def. 2. The problem occurs when we don’t have direct access to the ground truth category of every single user. Typically, Ω(ui , Si ) is unknown, but rather the category distribution of groups of users is provided. The main reason is to protect the privacy of users [1]. In these kind of situations, especially in online advertising, we may utilize a specific data source to make smart advertising decisions to choose the most appropriate set of users, and in the end, we can receive an aggregated report from a third-party evaluator, which is considered as the ground truth and provides a non-granular distribution of the audience we have reached over many categories of interest. As an example, the report may provide that over all users we have 20% Male, and 80% Not Male. When this occurs, we can no longer do a one-to-one comparison between ground truth and data source in the user granularity, but rather need to come up with alternative methods that can deal with aggregated data, which is our main focus in this paper. In many cases, we need to select the best data source from a large set of candidates with the same semantic goal and adopt it for targeting. For example, given a set of data sources that tag users as male, female, or unknown, we may care more about their relative performance and less about their absolute measurements. The data quality assessment can then be simplified as a ranking problem: Definition 3. Given two sound data sources S 1 and S 2 , and an accuracy metric Ω, a data quality ranking system outputs a rank measurement r 1 for S 1 and r 2 for S 2 such that     r 1 > r 2 ⇐⇒ Eui ∈U Ω(ui , Si1 ) > Eui ∈U Ω(ui , Si2 ) . Once we have the rank measurements for each sound data source, we can order them and select the best one. 3. PREVIOUS WORK As we have explained in the problem definition, evaluation of a data source can be taken as any other machine learning model evaluation task, provided that we have the ground truth information in the user granularity. A detailed evaluation of 18 performance metrics for classification problems is given in [7]. These 18 metrics can be listed as accuracy, kappa statistic, mean F-measure, macro average arithmetic, macro average geometric, AUC of each class against the rest (two variants), AUC of each class couples (two variants), scored AUC, probabilistic AUC, macro average mean probability rate, mean probability rate, mean absolute error, mean squared error, LogLoss, calibration loss, and calibration by bins. The paper provides a detailed correlation analysis and noise sensitivity analysis . Also, the survey by Gunawardana et al. [8] discusses both the evaluation settings and proper evaluation metrics for different classes of recommendation problems, of which online advertising is a sub-problem. When we only have access to aggregated ground truth data, evaluation of a data source is much harder. There has been significant work in aggregate learning tasks which utilize aggregate assignments of classes to groups of samples to train a model. Our aim in this paper is significantly different from such works, since we already have a model (i.e. data source), and we are trying to evaluate its performance utilizing many campaigns and multiple aggregates of ground truth data. Cheplygina et al. [5] provides an overview of aggregate learning methodologies, which may utilize granular response variables/feature vectors (single instance) or aggregate response variables/feature vectors for groups (multiple instance) to train their models, and later, testing them. Musicant et al. [11] utilizes aggregate outputs for the response variables to specialize the training process of k-nearest neighbors, decision trees, and support vector machines. In [3], the authors utilize aggregate views of data, which consist of a choice of different combinations of features, response variables, and combining machine learning models learned from these views. Another interesting work is presented in [16], which gives error bounds on how a model learned from aggregate data can perform. They assert that a machine learning model should minimize empirical proportion risk, and prove that under certain assumptions for the class distributions, learning in the aggregate setting can actually improve individual classification performance. Finally, specific to the online advertising domain, we can list [14] as being a relevant work to ours. In this paper, similar to aggregate learning techniques, the authors aim to learn a predictive model to decide whether a user is in a specific ground truth category using the aggregate data over many campaigns, by assigning the most likely label to all users in the aggregate, or assigning a probabilistic single label. They utilize logistic regression with L2 -norm regularization, where the response variables are the artificially generated labels. 4. BRUTE FORCE EVALUATION In this section we will present our first proposal for data quality assessment, which includes setting up specialized campaigns for a data source and utilizing the targeting results directly for evaluation. Note that we typically rely on the independent survey agencies to collect the ground truth analysis data on our audience population. Such agencies use offline data (such as credit card information) and online data (such as information filled in social networking websites) to profile an Internet user. Reports from these survey agencies are generally considered as the ground truth by advertisers. Such reports are aggregated statistics and contain no user-level information due to privacy reasons. 4.1 Performance Campaign for Data Source An intuitive and straightforward way to evaluate a data source is to set up a campaign that only targets certain users which are tagged by data source S to be in category c. This way we can calculate the quality of the data source N(c ) as p(cg |cs ) = N(cgs ) , where N (cg ) is the number of users in category c reached by this campaign as reported by the ground truth and N (cs ) is the total number of users reached by the campaign via at least one impression. Note that we can put a limit on the number of impressions to be served to a user so that we can increase the unique user reach and have more reliable results. We applied this methodology to evaluate age and gender categorizations of some well-established data providers in online advertising. Table 2 demonstrates some results for one of the better performing such data providers in age categorization. We anonymize the name of the data provider and exact age ranges listed in the table to comply with the company’s regulations. In Table 2, R1,· · · · R10,· represent the age ranges such that they are mutually exclusive and sorted in ascending order, e.g. R5 is the range that is the immediate higher range after R4 (i.e. minimum age in range R5 is one larger than maximum age in range R4 ), and the immediate lower range before R6 . Ri,p represents the predicted results by the data source for age range i, while Ri,g stands for ground truth data for the same age range. For example, we can observe from the table that p(R4,g |R4,p ) = 0.345, that is, when our data source classifies the user to be in age range R4 , 34.5% of the time it is correct, or in other words, 34.5% of the users reached by campaign that targets category R4 , as predicted by the data source, were actually in category R4 , as provided by ground truth. Note that for this particular data source, the exact match, highlighted in bold, is quite high compared to random. Data providers utilize various models and online/offline information to tag users. Please note that data sources from Table 2: Ground truth distributions of anonymous data provider’s category taggings. Age Ranges R1,p R2,p R3,p R4,p R5,p R6,p R7,p R8,p R9,p R10,p R1,g 0.414 0.058 0.031 0.031 0.037 0.056 0.08 0.065 0.05 0.035 R2,g 0.245 0.297 0.053 0.041 0.057 0.049 0.067 0.074 0.044 0.036 R3,g 0.033 0.246 0.298 0.089 0.056 0.061 0.054 0.082 0.066 0.055 R4,g 0.018 0.037 0.227 0.345 0.063 0.041 0.035 0.043 0.065 0.048 the same data provider may have quite diverse accuracy values. For example, the accuracy results in Table 2 range from 0.29 to 0.49. Thus we cannot evaluate one data source and assume its sibling data sources have similar predictive power. Each data source needs to be evaluated individually. This causes a significant disadvantage with the above methodology, which is the fact that we need to set up a separate campaign for each category so that we can gather the accuracy statistics. To remedy this problem, we propose a second methodology in Section 5, which solves an optimization problem to come up with the best fitting accuracy probabilities based on the aggregate reports. 4.2 Cost Analysis In this subsection, we further analyze the cost of the brute force method discussed in Section 4.1. It must be noted that obtaining the ground truth, that is the aggregated labeled data, is costly on its own right. However, in the following lemma, we focus only on the ad serving costs to underline the utility and benefit of our approach. Lemma 1. Given a data source that can tag the user by one of the possible c categories (e.g. the data source gives a positive/negative output on one age group of possible c age groups), then to observe a significant difference between the calculated accuracy of one category versus others, we need at least ⌈ 4202.969 (1 − 1c )⌉ impressions. c Proof. Assuming a uniform distribution, we assume the average on-target rate is 1c for each data source (although the intention of a data source is to increase this value). Each impression can be considered as a Bernoulli trial with 1c probability of success. The sample variance is, thus, 1c (1 − 1c ). We would like to detect a significant difference between the prediction accuracy of the correct category versus the rest of possible tags. The industry standard accepts a 5% error. Then, for a significance level of α = 5% for a two tailed hypothesis test and to attain at least 90% power, we have √ n √0.05 > (z0.975 + z0.9 ), where n stands for the number 1 1 c (1− c ) of users, z0.975 and z0.9 are the values of the quantile function of the standard normal distribution for 97.5% and 90%, respectively [2]. Therefore, the number of users that receive the ad impressions must be more than ⌈ 4202.969 (1 − 1c )⌉ for c each data source. Based on Lemma 1, for d data sources that provide information on one of the possible c categories, we need at least d⌈ 4202.969 (1 − 1c )⌉ impressions. As we discussed before, it is c necessary to evaluate each data source individually, considering the diversity of their predictive power. Given the very large number of data sources, this causes the brute-force approach to incur a very significant cost. R5,g 0.012 0.021 0.049 0.182 0.337 0.053 0.03 0.03 0.048 0.039 R6,g 0.032 0.043 0.042 0.057 0.212 0.339 0.041 0.04 0.033 0.048 R7,g 0.043 0.051 0.042 0.037 0.047 0.23 0.332 0.048 0.048 0.061 R8,g 0.064 0.089 0.049 0.039 0.038 0.041 0.204 0.339 0.044 0.06 R9,g 0.075 0.091 0.132 0.116 0.082 0.065 0.077 0.203 0.488 0.106 R10,g 0.03 0.046 0.054 0.041 0.05 0.046 0.048 0.052 0.101 0.492 5. ACCURACY INFERENCE High-quality data sources can enable advertisers to reach the right audience at the right moment. Because they have become an important component of online advertising, more and more online/offline data are being ingested into Turn’s data management platform. As we have mentioned previously, there are currently over 200k active data sources in our system. Lemma 1 established that explicitly evaluating each of these data sources by running performance campaigns is overwhelmingly costly: not only a large amount of money is required to run the performance campaigns, but also enormous manual effort to set up and manage those campaigns is essential as well. We need an efficient way to simultaneously infer the accuracy of multiple data sources. As we have presented in Section 2, our focus in this paper is to calculate the accuracy metrics of a data source for single or multiple categories. In essence, we are trying to calculate a set of probabilities, which represent the likelihood of a data source predicting correctly/incorrectly that a user belongs to a category ci . In Figure 1, we have shown the set of probabilities that we aim to predict. For representational purposes, we have shown the accuracy probabilities of a data source which denote its capabilities to tag a user as Male or not, though the same logic follows for any category. The probabilities in the figure can be listed as follows: • α1 : The probability of the user actually being Male when the data source tags it as Male. This value can also be called precision or positive predictive value. • α2 : The probability of the user actually being Not Male when the data source tags it as Male. This value can also be called false discovery rate. • α3 : The probability of the user being Unknown (i.e. ground truth does not exist) when the data source tags it as Male. • β1 : The probability of the user actually being Male when the data source tags it as Not Male. • β2 : The probability of the user actually being Not Male when the data source tags it as Not Male. This value can also be called negative predictive value. • β3 : The probability of the user being Unknown (i.e. ground truth does not exist) when the data source tags it as Not Male. • γ1 : The probability of the user actually being Male when the data source tags it as Unknown. • γ2 : The probability of the user actually being Not Male when the data source tags it as Unknown. • γ3 : The probability of the user being Unknown (i.e. ground truth does not exist) when the data source tags it as Unknown. As it can be seen from the figure, and trivial from the defini- α1 Male D1 by Data Source S α2 Male by Ground Truth N1 Not Male by Ground Truth N2 α3 β1 Not Male D2 by Data Source S β2 β3 γ1 D3 Unknown by Data Source S γ2 γ3 Unknown by Ground Truth N3 Figure 1: Objective probabilities of a data source S for a specific category (is user Male). We log the received report data along with the first-party campaign data into our in-house data warehousing system called Cheetah [4], which is built on top of the Hadoop framework [13]. Cheetah is designed specifically for our online advertising application to allow various simplifications and custom optimizations. Campaign facts are stored within nested relational data tables. Fast MapReduce jobs are designed to extract key features of the performance campaigns, compare them with the ground truth and infer the accuracy of a data source. Utilizing the collected campaign information, we present two approaches in this section to efficiently infer the quality of data sources: one that ranks data sources, and another which directly deduces precision (α1 ) of a data source. 5.2 Ranking Based Assessment tions, we have α1 +α2 +α3 = β1 +β2 +β3 = γ1 +γ2 +γ3 = 1. Among these nine variables, α1 , i.e. precision, is often the most important value for the advertisers, since it denotes the goodness of a data source to be used for their advertising purposes. To calculate this value, we presented the methodology, which is based on creating specific campaigns to evaluate a singular data source for a specific category in Section 4. In this section we are proposing an optimization scheme, which utilizes the aggregated category distributions over multiple campaigns, for both the data source we want to evaluate, and the ground truth. In the following subsections, we call the above nine variables predictive values of a data source. 5.1 Setup for Inference We propose to set up multiple performance campaigns without using any data source for targeting, so the audience will not be explicitly skewed by any data source. We compare the ground truth of each campaign against the hypothesis of each data source, and infer the quality of the data source. We follow a set of rules to set up a performance campaign. First, the targeting criteria should be minimal and cannot be biased by any third-party data. For example, targeting the online users in U.S. is fine, since this is purely based on IP address and not biased; however, using a data source to limit audience to middle-aged men is not acceptable as the quality of this data source is what we want to assess. In general, only geographical location should be used as targeting criteria. Second, the targeted websites must be discriminative, that is, the population of the visiting users should be largely skewed towards one of our possible tags. This way, we will not mistakenly estimate a data source to be accurate, when in fact it is predicting the label in a random manner. For example, a website is beneficial for such an experiment if 70% of visitors are female and 30% of visitors are male, and not necessarily if the distribution is 50% to 50% (since, in such a case, a random prediction of female vs. male will closely fit the overall audience in aggregate). One should note that obtaining such knowledge is not always feasible before running the campaign. Therefore, in our system, we target only the websites that are known, based on our domain experience and verified by independent reports, to be popular among a certain group of audience. After creating such a campaign, we run it for a certain period to collect data. The ground truth is collected through independent agencies as described in Section 4. Ranking Data Sources. In many instances, we only need to choose the best data source from a large set of candidates with similar semantic purposes. If this is the case, then data quality assessment becomes a ranking problem. A data source’s absolute precision α1 is of less importance then, and rather its rank among others is critical. Since the independent evaluation agency sends us the aggregate statistics on a campaign, we can similarly construct such statistics using a data source. Note that this approach will only represent the view of the data source, and not the ground truth, unlike the independent agency case. We can then evaluate this data source based on how close the constructed statistics are to that of the ground truth, and therefore rank data sources based on such closeness measure. This logic is presented in Algorithm 1. Algorithm 1: Measurement calculation for ranking. Input: ψ: aggregation function, f : closeness function Input: S: data source Output: µ̄: score for quality of data source S 1 foreach performance campaign C do 2 U ← Retrieve audience of C; 3 R̂ ← ψ(U, S); 4 R ← Retrieve the ground truth report; 5 µC ← f (R̂, R); 6 7 µ̄ ← Calculate the average value of µC ; return µ̄; There are multiple ways to design the closeness function f to compare two aggregated statistics. Since the positive taggings are the most valuable for online advertising purposes, we propose to compare the positive population distributions between the ground truth and the data source. We define the percentage of population marked as positive by a data source as count+ (S, U) R̂ = , (1) count+ (S, U) + count− (S, U) where count+ counts the number of users in U marked as positive by S, and count− counts negatives. Given that R is the ground truth ratio of positive population, a simple way to calculate the closeness can be defined as: R̂ − R . (2) However, this does not consider the scale of R̂ or R, which are usually quite small for a rare positive group. To make the measurements more comparable, instead we propose to calculate the relative error as the closeness: ˆ + (S, U) count+ (U) − count , RelativeErr = count+ (U) two predictive values. Since the data sources are unbiased, the order of metrics for negatives are also preserved. Averaging is monotonic, therefore we can expand the previous statements to micro and macro averaging cases as well. where count+ (U) is the number of positives reported by the ground truth, count− (U) is the number of ground truth negˆ + (S, U) is the scaled number of positives atives, and count marked by the given data source. We want to scale the number of positives of the data source, because the population recognized by S might be quite different from the one recognized by the ground truth. For example, the independent evaluation agency might have data on 10000 users, while S might only have data on 1000 users. Therefore, we need to extrapolate the population unrecognized by S to scale up the populations: 5.3 Precision Inference Approach RelativeErr = count+ (U) − R̂ · (count+ (U) + count− (U)) count+ (U) = 1− R̂ count+ (U)/(count+ (U) + count− (U)) = 1− R − R̂ R̂ = R R (3) The above value reflects the potential error rate if we scale the data source’s recognizable population to the size of the ground truth population. Per Algorithm 1, we calculate average relative error (RelativeErr) across all performance campaigns for each data source. We can then rank data sources based on their average relative errors. Soundness Analysis. A ranking algorithm needs to be sound to ensure the optimal assessment: Given two data sources S 1 and S 2 , a ranking algorithm is sound if it outputs measurements r 1 for S 1 and r 2 for S 2 , such that r 1 < r 2 if and only if S 1 is more likely to perform better than S 2 , as we defined in Def. 3. We will show that the RelativeErr based ranking algorithm is sound in many cases. First, let us define the notion of unbiasedness for a data source: Definition 4. A data source S is unbiased if and only if its positive predictive value equals to its negative predictive value: α1 ≈ β2 . Our experience suggests that many data sources we utilize are on demographics and can be considered as unbiased. For example, the accuracy that a data source claims someone as male, in general, is close to the accuracy that it claims someone as female (Not Male as in Figure 1). In real-time bidding, better on-target metrics, i.e. improving the ratio of audience that really have the data source’s claimed characteristics, is the endeavor of any data provider. We can show that the RelativeErr based ranking algorithm is sound: 1 k Lemma 2. Given a set of sound data sources hS , .., S i, the RelativeErr based ranking algorithm is sound for precisions and orders the data sources based on their expected performance. In addition, if the data sources are all unbiased, the algorithm is sound for any on-target metrics. Proof. Per definition, R̂ of the better data source is closer to the reality, thus R − R̂ is smaller. Since R is constant, the order of RelativeErr is preserved for precisions. On-target metrics can be the precision, or the negative predictive value, or simply the micro or macro average of the Although the ranking methodology is able to pinpoint the highest performing data sources, the output ranking measurement is only a surrogate of precision. It correlates with the underlying precision, but is inherently different. As we will show later, in online advertising, it is often necessary to forecast the campaign performance as well as evaluate whether a third-party data source is worth the extra amount of money that an advertiser has to pay in order to utilize it. In such cases we need an accurate estimation of a data source’s precision. Direct Inference of Data Source Precision. We propose an efficient way to directly estimate the predictive values of a data source. As shown in Figure 1, a data source’s hypothesis on the audience population can be mapped into the ground truth using its predictive values. Given a performance campaign C i , let the size of Positive, Negative and i i Unknown audiences identified by data source S be D+ , D− and Di correspondingly (these are scaled values to cover the whole population of C i ), and the size of ground truth Positive, Negative and Unknown audiences be Gi+ , Gi− and Gi correspondingly. When the audience population size is large, it is clear that we have i i Gi+ ≈ D+ · α1 + D− · β1 + Di · γ1 i i Gi− ≈ D+ · α2 + D− · β2 + Di · γ2 i i Gi ≈ D+ · α3 + D− · β3 + Di · γ3 Combining with the probability simplex constraint and the unbiasedness constraint, we can estimate a data source’s predictive values by solving a quadratic optimization problem: given n performance campaigns hC 1 , C 2 , .., C n i, we search for predictive values α1 , α2 , α3 , β1 , β2 , β3 , γ1 , γ2 , γ3 so that min α,β,γ n  X i=1 i i (D+ · α1 + D− · β1 + Di · γ1 − Gi+ )2 i i +(D+ · α2 + D− · β2 + Di · γ2 − Gi− )2 i i +(D+ · α3 + D− · β3 + Di · γ3 − Gi )2 s.t. 0 ≤ αj , βj , γj ≤ 1 3 X j=1 αj = 1, 3 X ∀j = 1, 2, 3 βj = 1, j=1 − ξ ≤ α1 − β2 ≤ ξ . 3 X γj = 1  (4) (5) (6) j=1 (7) Here, (4) is our optimization objective which aims to find the best mapping between the data source’s hypothesis and the ground truth. Note that here we assume the size of audiences of campaigns C i to be similar, which can be controlled at campaign set up time. Otherwise we need to normalize by the audience size of each campaign. (5) and (6) enforce the probability simplex. (7) attempts to help us find the unbiased solution, and predefined constant ξ controls our confidence on the unbiasedness of the predictive values. We, therefore, can run a few performance campaigns, extract each data source’s hypothesis on those campaigns, compare with the ground truth and solve the above optimization problem. As we will show, this will efficiently give us the estimated predictive values of data sources in batch (among those, precision is the most valuable for online advertising). Performance Analysis. The proposed inference approach is efficient, in terms of both computation complexity and money. First, it is straightforward to show that the quadratic programming problem has a semi-definite Hessian with a bowl shape. The optimization problem is convex and can be solved efficiently with polynomial time complexity. Additionally, we only need to run a limited number of performance campaigns to simultaneously estimate the predictive values of multiple data sources. In practice, it is possible that a data source’s predictive values are slightly different in different performance campaigns due to variance. Given a campaign C i , it is natural to assume a data source’s predictive values for this specific campaign are αij = αj + ε1j , ∀j = 1, 2, 3, βji = βj + ε2j , ∀j = 1, 2, 3, γji = γj + ε3j , ∀j = 1, 2, 3, where ε is normally distributed with zero mean. In such cases, we can get the unbiased estimate of a data source’s predictive values by running a limited number of performance campaigns: Theorem 3. Given k ≥ 3 performance campaigns, our direct inference method can get the unique and unbiased estimate of a data source’s predictive values. Furthermore, given any predictive value αi and its estimation α̂i , we have P ( αi − α̂i ≤ si · Tδ/2,2k−6 ) ≥ 1 − δ, where 0 < δ < 1 is a constant, si is the standard error of the estimation, and Tδ/2,2k−6 is (1 − δ/2)-th quantile of Student Distribution with 2k − 6 degrees of freedom. Proof. The optimization can be converted into a linear regression problem within a simplex search space. This regression problem contains 6 free regressors and each campaign provides 2 points in the space. When we have k ≥ 3 campaigns, the quadratic matrix is positive-definite and we will have a unique global optimal solution. A Bias-VarianceNoise decomposition shows the solution is unbiased. Since the errors are normally distributed, the sum of the regression residuals is then distributed proportional to Student Distribution with 2k − 6 degrees of freedom: t = (αi − α̂i )/si ∼ T2k−6 We then construct the confidence levels for the estimated regressors. By running more campaigns, we can quickly reduce the estimation errors and get highly reliable predictive value estimations of multiple data sources. Given its computational and economic efficiency, we adopted the direct inference method and utilize it continuously to generate the quality report on data sources. 6. USE CASES In this section, we will discuss some use cases where the quality assessment of first or third-party data sources can be useful. First we will talk about targeting in online advertising, and the amount that an advertiser should be willing to pay for a data source. Then we will give a very general use case in campaign forecasting, i.e. to predict, before an online advertising campaign starts, what category of users will actually be reached by a pre-set targeting criteria. 6.1 Targeting in Online Advertising Advertisers aim to reach the best audiences to promote their products, so that they can increase the likelihood of a click or an action happening. The automated way of grouping users into beneficial and non-beneficial subsets is often called audience segmentation. For an informative work on how this kind of audience segmentation can improve click rates, refer to [15]. In this paper, however, we focus on a different kind of targeting where the advertisers already have a pre-defined set of users they want to target. As an example, suppose that an advertiser wants to reach only female audiences within the age range 21-35. There are multiple data sources this advertiser can utilize to reach this group, but as discussed in this paper, none of these data sources gives a definitive classification. Intuitively, an accurate prediction of the quality of a data source is essential for advertisers to choose it over others. Also, note that here we mostly care about the precision or positive predictive value of a data source (i.e. α1 , when a data source suggests that a user is in category c, the likelihood that this user actually belongs to category c), since this is the signal that the advertiser uses to bid on a user. Here, we would also like to discuss the consideration of data cost. In general, when an advertiser wants to utilize a third-party data source for bidding purposes, it should pay the third-party provider a certain amount of money. This cost is generally per impression served using this data source, hence can have significant effect on the ROI of an advertiser (i.e. advertiser needs to pick up extra clicks/conversions to make up for the money paid to the third-party for the targeting information it provides). An important point for an advertiser to consider is if using a data contract is “worth” its price. We will give a simple calculation here for the case when the advertiser utilizes no data sources to reach a specific audience (i.e. free targeting), and whether adding the data source and paying for it makes sense. Our main argument is that, by paying for the data source to target a specific audience, the reduced cost of the mis-targeted impressions (i.e. those impressions that are served to the audience that are out of our desired audience) should make up for the data cost. In other words, for the same amount of money we should get more of the desired impressions, although our total number of impressions is less due to data cost. Please note that below we assume the effective cost per impression (cpi) to be the same for both free targeting and data source assisted targeting, just that the data source has the additional data cost per impression (cpidata ): totalSpend (1 − errorRate(dataSource)) ≥ cpi + cpidata totalSpend (1−errorRate(freeTargeting)) cpi α1,freeTargeting α1,data ≥ . cpi + cpidata cpi Above, totalSpend is the amount of money that the campaign spends, cpi is effective cost per impression, and cpi data totalSpend is data cost per impression (hence cpi+cpi is the numdata ber of impressions picked up by data source assisted targetis the number of impressions that can be ing, and totalSpend cpi picked via free targeting, i.e. no data cost). errorRate is indeed the inaccuracy of free targeting (percentage of audience that is not desired), and percentage of the cases when the data source predicts a user to be in desired audience, while, in fact, it is not. In the next inequality, we actually translated (1 - errorRate) into α1 from Section 5. After further reorganizing the above inequality, we get the following:   α1,data −1 . (8) cpidata ≤ cpi × α1,freeTargeting This means that for a data source to be beneficial for a campaign, its data cost per  impression should be less than  α1,data cpi × α1,freeTargeting − 1 . Please note that we have the assumption here that effective cost per impression would be the same for free targeting vs. data source which is not always valid, i.e. we may have to pay more to show ads (impression) to those users that the data source tagged to be desirable. Also, it can be seen that the benefit of the data source often depends on how expensive the impressions are for a campaign, hence is campaign specific. Finally, the above calculations do not take into account the cost of data evaluation utilizing our proposed two methodologies, which was also mentioned in Section 4.2. However, this evaluation can be performed once for each data source, and hence is not of significance for each campaign that utilizes it. 6.2 Forecasting Forecasting the performance (return-on-investment), reach (unique users we can show an ad to), and delivery (amount of money we can spend on advertising given the targeting criteria) of a campaign is a significant problem that has to be dealt in online advertising [9]. Here we show that by utilizing the accuracy metrics (i.e. α1→3 , β1→3 , and γ1→3 from Section 5) over multiple data sources that may tag a user, we can actually predict the expected number of users that will fall into a specific audience/category, on top of the total spend/reach as in the traditional forecasting problem, once the advertising campaign goes live. Here is how the forecasting process in online advertising works. Once the advertiser sets some targeting criteria (filtering of users to show ads according to anonymous user properties) and goals (in terms of clicks and conversions) for a campaign, we can utilize our system as explained in [9] to find out which users this campaign is likely to reach. We can already calculate expected number of unique users and delivery for the campaign from this information alone. Furthermore, one problem that we can solve for the advertisers is the prediction of what percentage of these users will fall into a specific user category/class c. Note that the approach mentioned in [14] does work on this problem of predicting likelihood of a user belonging to a specific category via utilizing many features, but their focus is on targeting rather than forecasting. Here, we suggest that rather than training a simple model for predicting the membership in a category, we can utilize multiple data sources and their estimated predictive values to forecast the expected number of users that will fall into a category. This information is not used in bidding time, hence contrary to the targeting use case we explained in Section 6.1, there is no data cost. Figure 2 summarizes the overall idea. In the first step, Targeting Criteria T Users which obey the Targeting Criteria T Figure 2: Forecasting Example. we communicate the targeting criteria set by the advertiser to our set of users. For real-time forecasting, we often need to use a sampled set of users [9]. Once we filter the users that are appropriate for the targeting criteria, we can go through each of these users and see whether these users are tagged by a first or third-party category cd . Once we see these taggings, we can calculate the probability of this user belonging to a desired ground-truth category cg by the probability p(cg |cd ) which is the α1 from Section 5, i.e. precision. If we assume that each user is tagged by one and only one ci , we can forecast the expected number of users that will belong to category cg as: X X X I(u has ci ) p(cg |ci ) . (9) p(cg |u) = E[ |cg | ] = u∈T u∈T ci ∈C In (9), T is the set of users that belong to a certain set of targeting criteria T. cg is the category that the advertiser desires to forecast how many of their targeted users will belong to. ci is a first/third-party category from a list of categories C for which we have the prediction values. I is an indicator to see whether a user has category ci , and above formula is valid only because we assume that each user has only one of possible ci s. If each user can have multiple first/third-party categories (as is the case in real situations), we need to aggregate multiple p(cg |ci )s, where we can utilize combination methods such as getting the maximum, minimum, average or median of the precision values. 7. EXPERIMENTAL RESULTS In this section we will give some preliminary results for our optimization-based evaluation technique. We have already given some preliminary results for our first methodology (Section 5.1) in Table 2. As aforementioned, we do aim to calculate all nine prediction values of a data source for a category, but for purposes of online advertising, the most important one is the precision (α1 ). Only if this value is high we can reliably use this data source to reach a certain category of users. Simulation Results. To evaluate our methodology we ran several simulated campaigns, where for each campaign we create an audience of 100 users and assign them to predicted categories as follows: • Random, disjoint sets of 20 users each are assigned to category c, not c, and unknown, • The rest 40 users are assigned to either category c, not Difference 0.10 0.20 0.30 0.00 High Quality Low Quality 1 2 3 4 5 6 7 8 9 10 Number of Campaigns 0.12 Figure 3: Number of campaigns versus difference between predicted and actual precision values. 0.00 Difference 0.04 0.08 High Quality Low Quality 0.00 0.10 0.20 Noise Level 0.30 Figure 4: Noise versus difference between predicted and actual precision values for six campaigns scenario. c, and unknown in a uniform manner. Then, we generate the ground truth categories for two types of data sources with the following actual probability values: • High Quality: This data set has the following underlying nine probability values: α1→3 = (0.8, 0.15, 0.05), β 0.7, 0.1), γP 1→3 = (0.2,P 1→3 = (0.4, 0.5, 0.1), note that P α = β = i i 1→3 1→3 1→3 γi = 1, • Low Quality: This data set has the following underlying nine probability values: α1→3 = (0.4, 0.5, 0.1), β1→3 = (0.3, 0.6, 0.1), and γ1→3 = (0.5, 0.4, 0.1). Please note that this kind of synthetic data generation is quite counter-intuitive. We first create the predicted values using some pre-set distribution, and then generate these users’ actual categories using the predictive values of the two data sources. For example, if the user in our synthetically generated audience has a predicted category of not c by High Quality data source, then we assign it to ground truth category of c by probability β1 = 0.2, not c by probability β2 = 0.7, and unknown by probability β3 = 0.1. Once we generate the dataset, we actually have aggregated values of category counts for each data source. Using these category counts, we can utilize our data quality assessment method we described in Section 5.3, and look into the difference between our computed predictive values, and the actual predictive values as given above. The results of the above described simulations are given in Figures 3 and 4. In Figure 3, we estimate the nine predictive values for each of the data sources using our methodology, by utilizing multiple campaigns (the results are averaged over 100 trials at each value in x-axis). As we have proven in Section 5.3, we do need at least three campaigns to get a Figure 5: Pearson correlations between the estimated positive population and the ground truth. unique solution for all nine probabilities. We can observe that starting with four campaigns, the difference of the real values versus our predicted values fall to zero. We have plotted the difference between α1 s (precision values, since α1 = p(actually positive | predicted positive)), but the results are similar for other α2→3 , β1→3 , and γ1→3 . Next, we performed another experiment where we introduced a uniform noise between ±ζ (where we changed ζ between 0 and 0.35) to the above nine real predictive values, and then generated the ground truth assignments. We tried to recover the nine predictive values using six campaigns and present the difference (averaged over 100 trials) between real and predicted α1 values in Figure 4. We can see that even under significant noise levels, our methodology can recover the precision values accurately. Because α1 for the high quality data source is higher, we can also observe that the noise effect is slightly less. Real-World Results. Following the methods we discussed in Section 5.1, we ran 156 performance campaigns, each of which targeted a specific website. We used half of the campaigns to calculate RelativeErr and predictive values for around 100 data sources. Then, we tried to estimate the positive population in the rest of campaigns using these 100 data sources. We utilized the average of positives predicted by the sources, and calculated the correlation with the ground truth positive sizes. For the direct inference method, it is clear that for each campaign C i , its estimated positive i i population is Gi+ ≈ D+ · α1 + D− · β1 + Di · γ1 (for a single data source). For the RelativeErr method, by deducing (3), we can roughly estimate Gi+ = M · τ̂ R̂/(1 − µ̄), where M is the population size, τ̂ is the percentage of population recognized by the ground truth in the training set, and µ̄ is the average R − R̂/R (i.e. RelativeErr from Eq. 3) of the training set for a single data source. Each method’s Pearson correlation coefficient is shown in Figure 5. The direct inference method gives a significantly more accurate estimate of the positive population (p < .001) and it correlates well with the ground truth. Next, we utilized two popular data sources S1 and S2 as the targeting criterion and ran test campaigns individually. The reported positive rates from the independent evaluation agency can be treated as the ground truth of their precisions. The ground-truth precisions and our estimated values are listed in Figure 6. The direct inference method yields a much closer estimation to the ground truth (p < .001), while the ranking method preserves the orders but the values are substantially different from the ground truth. Our proposed approach was deployed into Turn’s data management platform and generates weekly reports on the of combining multiple data sources and their quality assessments to come up with a better model. Acknowledgments We thank many talented scientists and engineers at Turn for their help and feedback in this work. 9. REFERENCES Figure 6: Reported measurements on the positive population from different methods. Figure 7: Inferred precision of a data source over a three month period. quality of our top data sources. We have received positive feedback from our campaign optimization managers in the field, commenting that the reported precisions are close to the real campaign results. Interestingly, by evaluating our data sources periodically, we are forming a positive reinforcement loop over their data quality: feeling the pressure, data providers work consistently to improve their data quality. For example, the estimated precision of one data source over a three month period is plotted in Figure 7. It is clear that the data source’s quality has been improved over this time period. 8. CONCLUSIONS AND FUTURE WORK In this paper, we have presented a novel framework to evaluate first or third-party data sources on user properties for online advertising, which is a particularly challenging task when the ground truth is reported in aggregate form. We call this problem data quality assessment, and presented two solutions, one utilizing the data sources directly in a campaign, and another one, which utilizes outputs from multiple online advertising campaigns to optimize a set of probabilities which represent the “goodness” of a data source. We have also presented some use cases on how these evaluations can be utilized in online advertising domain, mainly in targeting, assessing the amount of money that an advertiser should pay for a data source, and forecasting. Some preliminary simulation and real-world results were also presented that show the effectiveness of our methodology, as well as some results on the performance of a well-established actual data provider for age categorization of users on multiple realworld advertising campaigns. Possible future work mainly lies on the use cases of the evaluation output of our methodologies, as given in Section 6. Our current focus is on accurate targeting of online users, which also needs to take into account the problem [1] N. R. Adam and J. Wortmann. Security-control methods for statistical databases: A comparative study. ACM Computing Surveys, 21:515–556, 1989. [2] G. Casella and R. L. Berger. Statistical inference, volume 2. Duxbury Pacific Grove, CA, 2002. [3] B. Chen, L. Chen, R. Ramakrishnan, and D. R. Musicant. Learning from aggregate views. In Proc. IEEE ICDE, 2006. [4] S. Chen. Cheetah: a high performance, custom data warehouse on top of mapreduce. Proc. VLDB Endowment, 3(1-2):1459–1468, 2010. [5] V. Cheplygina, D. M. J. Tax, and M. Loog. On classification with bags, groups and sets. Pattern Recognition Letters, 59:11–17, 2015. [6] H. Elmeleegy, Y. Li, Y. Qi, P. Wilmot, M. Wu, S. Kolay, A. Dasdan, and S. Chen. Overview of turn data management platform for digital advertising. Proc. VLDB Endowment, 6(11):1138–1149, 2013. [7] C. Ferri, J. Hernandez-Orallo, and R. Modroiu. An experimental comparison of performance measures for classification. Pattern Recognition Letters, 30:27–38, 2009. [8] A. Gunawardana and G. Shani. A survey of accuracy evaluation metrics of recommendation tasks. Journal of Machine Learning Research, 10:2935–2962, 2009. [9] A. Jalali, S. Kolay, P. Foldes, and A. Dasdan. Scalable audience reach estimation in real-time online advertising. In Proc. ICDMW, pages 629–637, 2013. [10] K.-C. Lee, B. Orten, A. Dasdan, and W. Li. Estimating conversion rate in display advertising from past performance data. In Proc. ACM KDD, pages 768–776, 2012. [11] D. R. Musicant, J. M. Christensen, and J. F. Olson. Supervised learning by training on aggregate outputs. In Proc. IEEE ICDM, pages 252–261, 2007. [12] C. Parker. An analysis of performance measures for binary classifiers. In Proc. IEEE ICDM, pages 517–526, 2011. [13] T. White. Hadoop: The Definitive Guide. O’Reilly Media, Sebastopol, CA, 2012. [14] M. H. Williams, C. Perlich, B. Dalessandro, and F. Provost. Pleasing the advertising oracle: Probabilistic prediction from sampled, aggregated ground truth. In Proc. ACM ADKDD, 2014. [15] J. Yan, N. Liu, G. Wang, W. Zhang, Y. Jiang, and Z. Chen. How much can behavioral targeting help online advertising? In Proc. ACM WWW, pages 261–270, 2009. [16] F. X. Yu, K. Choromanski, S. Kumar, T. Jebara, and S. Chang. On learning from label proportions. arXiv:1402.5902v2, 2015.
2cs.AI
arXiv:1605.04160v1 [cs.DS] 13 May 2016 Searching Lattice Data Structures of Varying Degrees of Sortedness ∗ Mohammad Obiedat Department of Science, Technology, and Mathematics, Gallaudet University, 800 Florida Avenue NE, Washington, DC 20002-3695, USA† December 25, 2017 Abstract Lattice data structures are space efficient and cache-suitable data structures. The basic searching, insertion, and deletion operations are √ of time complexity O( N ). We give a jump searching algorithm of time complexity O(J(L) log(N )), where J(L) is the jump factor of the lattice. J(L)√approaches 4 when the degree of sortedness of the √ lattice approaches N . A sorting procedure of time complexity O( N ) that can be used, during the system idle time, to increase the degree of sortedness of the lattice is given. Keywords. Lattice data structure, cache-suitable, jump searching, jump factor, degree of sortedness, incremental sorting. 1 Introduction Searching is one of the most time-consuming operation of many software applications. Basically, a searching procedure takes a target key and it has to ∗ † Published in the International Journal of Data Structures, 1(1) 64-76 (2015) Email address: [email protected] 1 decide whether that key is present or absent. This seemingly simple operation becomes very challenging when the set of keys is dynamically changing, by insertion and deletion, or when using minimum space and energy are very crucial. Therefore, any data structure that is designed to organize pieces of information in a dynamic environment should be evaluated by the space required to hold the keys, by the time required to perform the searching, insertion, and deletion operations, and by the suitability of the structure for caching or more generally for memory hierarchies. In Bjarne Stroustrup’s recent paper [12], he emphasizes the importance of compactness and predictable memory access patterns for efficiency. Stroustrup points out that power consumption is roughly proportional to the number of memory accesses. Consequently, the less data we store and move the better for efficiency, especially in infrastructure software and applications for hand-held devices like smartphones. Stroustrup makes a strong case in favor of using arrays instead of linked lists or more generally pointer-based structures. There are two important differences between arrays and linked lists that affect the efficiency of their operations. First, arrays are more space efficient than linked lists. Second, arrays are more suitable for caching than linked lists, because an array’s elements are stored in contiguous memory locations, while a linked list’s nodes are scattered in memory. Most of the current index structures are either pointer-based or use extra storage space in order to obtain the optimal O(log (N)) time complexity of their operations. Obviously, such data structures are not suitable for memory-constrained systems. Sequential search of unsorted arrays is space efficient and very suitable for caching, but unfortunately it is of time complexity O(N), which is too slow for most applications. The lattice data structure (LDS) was novelly introduced by Berkovich in 1992, see [2]. The space required to hold a lattice with N keys is equal to the space required to hold an array with N keys. Additionally, it is possible to devise more efficient algorithms using the LDS than using the array. This makes the LDS a good contribution to the current trends of developing data structures and algorithms for memory-constrained applications. Also, the LDS operations have good temporal and spatial locality which makes it a rich environment for the ongoing research on cache-conscious data structures and cache-oblivious algorithms. Consequently, in addition to the theoretical importance of the LDS, we argue that this structure is the ideal choice for memory-constrained systems, for real-time systems, for systems where power consumption is crucial, and for systems where incremental adjustment is 2 feasible. The basic searching, √ insertion, and deletion operations of the LDS are of time complexity O( N). In this paper, we give a general jump searching algorithm of time complexity O(J(L) log(N)), where J(L) is the jump factor of the lattice. The jump factor of the√lattice approaches 4 when the degree of sortedness of the lattice approaches N. In order to keep the jump factor √ of the lattice small, we provide a sorting procedure of time complexity O( N ) that can be used, during the system idle time (e.g., by giving it the least priority when scheduling the lattice operations), to increase the degree of sortedness of the lattice. Experimental evaluation of randomly built LDSs shows that the performance of the basic searching procedure of the LDS is similar to skip list search when the structures have up to 1000 keys, and the performance of the jump searching procedure is similar to skip list search when the degree of sortedness of the lattice is close to 0.9h, where h is the height of the lattice. When the ratio of the number of times the sorting procedure is called to the number of times the insertion and deletion operation are called is close to 5, the performance of the jump searching procedure is similar to its performance on a lattice with degree of sortedness close to 0.9h. To obtain a good performance of the searching operation, a hybrid searching algorithm can be implemented, together with the sorting procedure, by searching the lattice using the basic searching procedure when the degree of the sortedness of the lattice is less than or equal to 0.9h, and the jump searching procedure when the degree of the sortedness of the lattice is greater than 0.9h. The layout of this paper is as follows. In Section 2, we formalize the definition of the LDS, present the basic searching, insertion, and deletion algorithms, and then analyze the space and time complexities of implementing these algorithms. In Section 3, we devise a general jump searching algorithm that can be used instead of the basic searching algorithm to obtain a better performance and time complexity when the jump factor of the lattice is small. Then, we provide a detailed analysis of the jump factor and devise a sorting algorithm that can be used to reduce the jump factor of the lattice during the system idle time. In Section 4, we compare the performance of the jump searching algorithm with skip lists search. Then, we examine the effect of using the sorting algorithm on the jump factor of the lattice during the system idle time. Conclusion and recommendations for further research are given in Section 5. 3 2 Lattice Data Structures In this section, we formally define the lattice data structure and discuss its basic algorithms and properties. In order to define the lattice data structure, we first recall the definition of Ferrers diagrams, see [13]. Let λ = (n1 > · · · > nm > 0) be an integer partition of a positive integer N. A Ferrers diagram of shape λ consists of m rows, where the top row contains n1 equisized square cells (hereafter referred to as cells), the second row from the top contains n2 cells, etc. Each row is left-justified. For a given non-negative integer number h, we are interested in up-side-down Ferrers diagrams of shape (h + 3, h + 2, . . . , 2, 1), see Figure 1 for an up-side-down Ferrers diagram of shape (7, 6, 5, 4, 3, 2, 1). The following numbering schema and terminologies will be used for such diagrams. Rows and columns are numbered from bottom to top and from left to right, starting with one, respectively. Cells in each row and each column are numbered from left to right and from bottom to top, starting with one, respectively. By diagonal k, we mean the cells that lie on the line segment that can be formed by connecting the upper-left corner of the first cell of row k and the lower-right corner of the first cell of column k where 1 6 k 6 h+ 3. The head of diagonal k is the first cell of row k and the tail is the first cell of column k. Cells in each diagonal are numbered from head to tail, starting with one. Using up-side-down Ferrers diagrams, instead of the usual Ferrers diagrams, is only a matter of convenience and preference. Definition 2.1 A lattice data structure (LDS) of height h is an arrangement of a finite set of distinct positive integers, referred to as proper keys, in an up-side-down Ferrers diagram of shape (h + 3, h + 2, . . . , 2, 1) such that: 1. Each cell in row one contains 0. 2. Each cell in column one contains 0. 3. Each cell in diagonal h + 3 contains ∞, except the head and the trail which contain 0. 4. All other cells contain proper keys, except the last k non-zero cells of diagonal h + 2 which contain ∞ for some 0 6 k 6 h − 1. 5. The proper keys in each row, column, and diagonal are in increasing order from left to right, from bottom to top, and from head to tail, respectively. 4 Remark 2.2 In the original definition of the LDS given by Berkovich [2], diagonals were not required to be sorted. As we will see in the next section, by requiring diagonals to be sorted one can apply a variety of searching techniques to improve the time complexity of the basic searching algorithm. Unless otherwise indicated, we will not distinguish between a cell’s location and its content, so we will say that “cell two in row four is less than cell three in row four” instead of “the content of cell two in row four is less than the content of cell three in row four”. A LDS of height 4 and proper keys {3, 5, 6, 9, 12, 20, 30, 31} is shown in Figure 1. 0 0 0 0 ∞ 12 ∞ 9 30 ∞ 0 5 0 3 6 0 0 0 20 ∞ ∞ 31 ∞ ∞ 0 0 0 0 Figure 1: A LDS of height 4 Remark 2.3 The purpose of the improper keys in the boundary cells, row one, column one, and diagonal h+3, is to serve as a wall; the LDS procedures can not pass these cells and move down, to the left, or to the right. Row one cells will serve as failure cells; if a searching procedure reaches these cells then it means that the key is absent. Choosing the keys to be positive integers and the relation 6 to be the usual less than or equal relationship is only a matter of convenience; in practice the keys could belong to any set with a partial order relationship. In Figure 2, we illustrate the eight possible movements from a given cell C to an adjacent cell. These movements will be used in devising the LDS algorithms. 5 UL L DL U UR C R D DR U = Up, D = Down, L = Left, R = Right UL = Up Left, UR = Up Right DL = Down Left, DR = Down Right Figure 2: Movements in a LDS from a given cell C Remark 2.4 If the cells adjacent to C preserve the lattice structure, i.e., satisfy condition (5) of Definition 2.1, then C also preserves the lattice structure provided that C > D, C > UL, C < U, and C < DR or DR = 0. Next, we describe the basic searching, insertion, and deletion algorithms of the LDS. We assume that we are given a LDS of height h > 1 and a key K in the search space of the lattice. Searching. The basic searching algorithm of the LDS, SearchLDS, works as follows. First, we set C to be the second cell of diagonal h + 2. Then we perform the following movements until K is declared present or absent: If K > C, then we move diagonally to DR by setting C = DR. If K < C, then we move down to D by setting C = D. We declare K is present if C = K, and declare K is absent if C = 0. This basic searching algorithm, SearchLDS, is given as Algorithm 1. Insertion. To insert a key K into a LDS, we first search the lattice for K. If K is present then it cannot be inserted. If K is absent, then we find a temporary cell for K as follows: If diagonal h + 2 has cells containing ∞, then we insert K at the first cell of diagonal h + 2 that contains ∞. On the other hand, if diagonal h + 2 does not have any cell that contains ∞, then we expand the lattice by increasing its height by one and then insert K in the second cell of diagonal h + 3. After K is inserted in the temporary cell, say cell C, we maintain the lattice structure by applying the inward algorithm, Inward, given as Algorithm 2. 6 Algorithm 1 Basic Searching Algorithm of the LDS SearchLDS (LDS, h, K) // Given a LDS of height h, and a key K. // Determine whether K is present or absent. C = second cell of diagonal h + 2; while (C 6= K and C 6= 0) do if (K > C) then C = DR; // a DR movement else C = D; // a D movement end if end while if C = K then K is present at C; else K is absent; end if Deletion. To delete a key K, we first find its location, say K is located at cell C. If C is the last proper key of diagonal h + 2, then we place ∞ in cell C. If C is not the last proper key of diagonal h + 2, then we place the last proper key in diagonal h + 2, say F , in cell C and place ∞ in cell F . Finally, we maintain the lattice structure by applying the Inward algorithm if (C < D or C < UL), and the Outward algorithm, given as Algorithm 3, if (C > U or C > DR and DR 6= 0). In all cases, we reduce the height of lattice by one if diagonal h + 2 does not have any proper key. In the following theorem, we give the number of proper and improper keys of a LDS of height h. Theorem 2.5 Let L be a lattice of height h, where h > 1, and suppose that diagonal h + 2 contains k proper keys where 1 6 k 6 h. Then 1. The number of proper keys in L is h(h − 1)/2 + k. 2. The number of improper keys in L is 4h − k + 6. Proof: Straightforward. 7 Algorithm 2 Inward Algorithm of the LDS Inward (LDS, C) while (C < D or C < UL) do if (UL > D) then swap UL and C; // a UL swap else swap D and C; // a D swap end if end while Algorithm 3 Outward Algorithm of the LDS Outward (LDS, C) while (C > U or (C > DR and DR 6= 0) ) do if (DR < U and DR 6= 0) then swap DR and C; // a DR swap else swap U and C; // a U swap end if end while Corollary 2.6 The √ hold N proper keys is of height √smallest lattice that can h where h = ⌊(1 + 8N − 7)/2⌋ = ⌈(−1 + 8N + 1)/2⌉. In the following lemma, we give upper bounds on the number of comparisons to search for a key, and the average number of comparisons to search for a present key when a LDS is searched using SearchLDS. Lemma 2.7 Let L be a lattice of height h and suppose that diagonal h + 2 contains k proper keys where 1 6 k 6 h. If we search L using SearchLDS, then 1. The number of comparisons to search for any absent key is h + 1. 2. The number of comparisons to search for any present key is less than or equal to h. 3. The average number of comparisons to search for a present key is 2h 2h3 − 2h + 3k 2 + 3k ≈ . 2 3h − 3h + 6k 3 8 Proof: Straightforward. Theorem 2.8 The time complexity of SearchLDS, Inward, and Outward al√ gorithms of a LDS with N proper keys is O( N). Proof: √ From Lemma 2.7 and Corollary 2.6, the time complexity of SearchLDS is O( N). To find the time complexity of the Inward algorithm, suppose C is located on diagonal s and column t. Then with each D swap, s is reduced by 1 and t is not changed, while with each UL swap, t is reduced by 1 and s is not changed. So with each swap, s + t is reduced by 1 . Hence √ the Inward algorithm makes up to 2h swaps. Consequently, it is an O( √ N ) algorithm. Similarly, the time complexity of the Ouward algorithm is O( N). Corollary 2.9 If SearchLDS is used to locate a key or determine its absence, then the time complexity of the insertion and deletion √ procedures, described in this section, of a LDS with N proper keys is O( N). One of the main advantages of LDS over other searching structures such as balanced trees (e.g., AVL trees [11] and self-adjusting trees [10]), hash tables [4], skip lists [6, 7, 8], Jumplists [3], and J-lists [1] is the space required to hold and maintain the lattice. A lattice can be easily represented, either explicitly or implicitly, by a one-dimensional array where each cell is represented by one array element. In explicit representation of LDSs, a lattice is mapped into a one-dimensional array by mapping diagonal one to the first array element, diagonal two to the second and third array elements, etc. Implicit representation of LDSs is similar to explicit representation, except that only cells with proper keys are mapped into array elements. While implicit mapping is a little more space efficient that explicit mapping, explicit mapping is the natural choice, because of its simplicity and its superiority in term of time. In Table 1, we compare the extra space required to hold a proper key by various searching data structures. 3 Jump Searching of Lattice Data Structures Lattice data structures outperform other data structures such as balanced trees, self-adjusting trees, and skip lists in terms of space, time bounds of some operations, and suitability for memory hierarchies. However, the basic 9 Table 1: Required extra space per proper key by various searching structures Structure Extra space per proper key LDSs-Explicit mapping approaches 0 as h → ∞ LDSs-Implicit mapping 0 J-lists 1 integer Skip lists an average of 4/3 pointers Jumplists 2 pointers and 1 integer AVL trees 2 pointers and 2 bits Red-black trees 2 pointers and 1 bit Splay trees 2 pointers Hash tables variable √ searching algorithm of the LDS, of time complexity O( N), cannot compete with the searching algorithms of these data structures in terms of time, especially when the size of the search space is large. In this section, using the fact that diagonals and columns of LDSs are sorted, we devise a jump searching algorithm that can be used instead of SearchLDS to speed up the search. The basic idea of the jump searching algorithm is to make wide jumps on diagonals and columns instead of the sequential movements to adjacent cells in the basic searching algorithm. We also devise a sorting algorithm that can be used, during the system idle time, to incrementally increase the degree of sortedness of the lattice, and hence to improve the performance of the jump searching algorithm. Jump searching algorithms over portions of a sorted array are studied in detail in [9]. In Algorithm 4, JumpSearchLDS, we given a general jump searching algorithm of the LDS that can be used with a variety of jump searching procedures of sorted arrays (e.g., binary and interpolation) to obtain a better performance and time complexity than SearchLDS. Unless otherwise indicated, from now on, we will assume that L is a LDS of height h > 1, and K is a key in the search space of L. For brevity, let d stand for a DR movement. We define the search path of K, with respect to L, to be the sequence of movements (d or D) until SearchLDS terminates. Definition 3.1 The jump factor of K, with respect to L, is the number of blocks of identical movements in the search path of K. We denote the jump factor of K with respect to L by J(K; L), or J(K), when L is understood. For example, if the search path of K is ddddDDDDDdd 10 Algorithm 4 Jump Searching Algorithm of the LDS JumpSearchLDS (LDS, h, K) // Given a LDS of height h, and a key K. // Determine whether K is present or absent. C = second cell of diagonal h + 2; while (C 6= K and C 6= 0) do if (K < C) then // a downward jump Let C be the first cell in the current column such that K > C; else // a diagonal jump Let C be the first cell in the current diagonal such that K 6 C, set C = 0 if there is no such cell; end if end while if C = K then K is present at C; else K is absent; end if then J(K) = 3. We define the jump factor of L by J(L) = max{J(K) : K is a key in the search space of L}. Let P be the procedure that performs the jump steps in JumpSearchLDS. So, P will take a sorted array, a column (respectively, a diagonal) with m elements and for a given key K will return the first element F such that K > F (respectively, the first element F such that such that K 6 F or set C = 0 if there is no such F ). In the following theorem, we give the time complexity of JumpSearchLDS where the time complexity of P is O(tP (m)). Theorem 3.2 Let L be a lattice of height h. If the time complexity of P is O(tP (m)), then the time complexity of JumpSearchLDS is O(J(L)tP (h)). Proof: Given a lattice of height h. One can form a triangle by connecting the following three points: the lower-left corner of the first cell of row one, the lower-right corner of the last cell of row one, and the upper-left corner of the 11 last cell of column one. In Algorithm 4, when a downward jump is performed the keys in the area outside triangle T1 in Figure 3-A are eliminated from the search, and when a diagonal jump is performed the keys in area outside triangle T2 in Figure 3-B are eliminated from the search. Since the time complexity of each jump is O(tP (h)) and each search requires up to J(L) jumps, then the time complexity of JumpSearchLDS is O(J(L)tP (h)). ❅ ❅ ❅ ❅ ❄ ❅ ❅ ❅ ❅ ❅ ❅ ❅ T1 ❅ ❅ ❘ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❘ ❅ ❅ ❅ T2 ❅ ❄ ❅ A. a downward jump B. a diagonal jump Figure 3: Jumps of the LDS Corollary 3.3 Let L be a lattice with N proper keys. If the time complexity of P is O(log(m)), then the time complexity of JumpSearchLDS is O(J(L) log(N)). The time complexity of JumpSearchLDS depends on the jump factor of the lattice and on the procedure used to perform the jumps. From Theorems 2.8 and 3.2, if a binary-search-like procedure is used to perform the jump steps, then the time complexity of JumpSearchLDS is less than or equal the time complexity of SearchLDS provided that the jump factor of the lat√ tice is less than or equal to N / log(N). In the following lemma, we give upper bounds on the jump factors of keys. Lemma 3.4 Let L be a lattice of height h, and K be a key in the search space of L. Suppose the last movement in the search path of K ends on diagonal s and column t. Let u = t − 2 and v = h − s + 2, then 1. The number of d movements in the search path of K is u and the number of D movements is v. 12    u + v if u = v  2u + 1 if u < v 2. J(K) 6 .   2v + 1 if u > v   h − 1 if K is present . 3. J(K) 6 h if K is absent Proof: Straightforward. Theorem 3.5 Let L be a lattice of height h. Then 1. The average of the jump factors of the present keys is less than or equal to h/3 + 5/6 ≈ h/3. 2. The average of the jump factors of the absent keys is less than or equal to h/2 + 1/2 ≈ h/2, provided that the probability the search for a randomly chosen absent key will terminate in a cell on row 1 and column t for each 2 6 t 6 h + 2 is 1/(h + 1). Proof: Follows from Lemma 3.4 and by using basic algebraic summations. Definition 3.6 Suppose α ∈ {3, . . . , h}. A LDS is said to be sorted of degree α (for brevity, α-sorted) if the first proper key of diagonal s is greater than the last proper key of diagonal s − 1 for each 4 6 s 6 α + 2. For example, the lattice in Figure 1 is 3-sorted but it is not 4-sorted. Remark 3.7 If L is α-sorted, then the proper keys in the first α+2 diagonals are completely sorted. Also, if β = α/h then the percentage of the proper keys in the first α + 2 diagonals is β 2 + (β − β 2 )/(h + 1) ≈ β 2 . For example, if α = h/2 then approximately 25% of the proper keys in the lattice are completely sorted. Lemma 3.8 Suppose L is α-sorted and K is a key in the search space of L. 1. If K is present and the last movement in the search path of K ends on diagonal s, where s < α + 2, then J(K) 6 2. 2. If K is absent and the last movement in the search path of K ends on diagonal s, where s < α + 1, then J(K) 6 4. 13 Proof: (1) Suppose K is present and s < α + 2. Since the first proper key in diagonal α + 2 is greater than the last proper key in diagonal α + 1, then K is less than the first proper key in diagonal α + 2. So, by a diagram chasing, the search path of K is either D · · · D or D · · · Dd · · · d. Hence, J(K) 6 2. (2) Suppose K is absent and s < α+1. By a diagram chasing, the search path of K is either D · · · D, D · · · Dd · · · d, D · · · Dd · · · dD, or D · · · Dd · · · dDd · · · d. Hence, J(K) 6 4. Theorem 3.9 If L is α-sorted, then J(L) 6 max{4, 2h − 2α + 2}. Proof: Follows directly from Lemma 3.8. Corollary 3.10 Let L be an α-sorted lattice of height h. If the time complexity of the procedure that performs the jump steps in JumpSearchLDS is O(tP (m)), then the time complexity of JumpSearchLDS is O(max{4, 2h − 2α + 2}tP (h)). Corollary 3.11 If L is h-sorted, then 1. J(K) 6 2 for any present key K, and 2. J(K) 6 4 for any absent key K. Corollary 3.12 Let L be an h-sorted lattice with N proper keys. If the time complexity of the procedure that performs the jump steps in JumpSearchLDS is O(log(m)), then the time complexity of JumpSearchLDS is O(log(N)). In the following theorem, we give upper bounds on the average of the jump factors of the present and absent keys for α-sorted lattices. Theorem 3.13 Suppose L is α-sorted and β = α/h. If 0.5 6 β 6 1, then 1. The average of the jump factors for the present keys is less than or equal to (2β 3 − 4β 2 + 2β)h2 − (3β 2 − 6β + 1)h + β − 3 h+1 ≈ (2β 3 − 4β 2 + 2β)h − (3β 2 − 6β + 1). 14 2. The average of the jump factors for the absent keys is less than or equal to (β 2 − 2β + 1)h2 + 4h − 4 h+1 ≈ (β 2 − 2β + 1)h + 4, provided that the probability the search for a randomly chosen absent key will terminate in a cell on row 1 and column t for each 2 6 t 6 h+2 is 1/(h + 1). Proof: To prove this theorem, we only need to use Lemmas 3.4, 3.8, and basic algebraic summations, then substitute α = βh. Remark 3.14 The functions f (β) = 2β 3 − 4β 2 + 2β and g(β) = β 2 − 2β + 1 are decreasing on [0.5, 1] with f (0.5) = g(0.5) = 0.25 and f (1) = g(1) = 0. So, from Theorem 3.13, when β approaches 1, the average of the jump factors for the present keys approaches 2 and the average of jump factors for the absent keys approaches 4. Also, from Theorem 3.9, J(L) 6 max{4, (2 − 2β)h + 2}. From Theorem 3.13, the average of the jump factors of a lattice data structure varies inversely with the degree of sortedness of the lattice. So, in order for JumpSearchLDS to compete with searching structures of time complexity O(log(N)), we need to maintain LDS with high degrees of sortedness. In Algorithm 5, SortLDS, we provide a procedure for incrementally increasing the degrees of sortedness of LDS. SortLDS can be used during the system idle time to increase the degree of sortedness of the lattice. In the following theorem we give the time complexity of SortLDS. Theorem 3.15 The√time complexity of SortLDS algorithm of a LDS with N proper keys is O( N ). Proof: Straightforward. 15 Algorithm 5 Sorting Algorithm of the LDS SortLDS(T , h) // Given a LDS T of height h. // Swap the keys in the first two cells that prevent T from being h-sorted. i = 4; while (i 6 h + 1 and the last proper key on diagonal i is less than the first proper key on diagonal i + 1) do i = i + 1; end while if i = h + 2 then break; // The lattice is h-sorted else let C be the second cell of diagonal i + 1 let F be the first cell of diagonal i with key larger than the key in C; swap the keys in F and C; Outward(T , C); end if 4 Experimental Evaluation of LDSs and Skip Lists In this section, we examine the performance of the LDS searching algorithms for lattices with varying jump factors. We compare the time performance values of SearchLDS, JumpSearchLDS, and skip lists search. At the end of the section, we examine the effect of using SortLDS on the jump factor of the lattice during the system idle time. A skip list is a probabilistic searching data structure, invented by William Pugh in the late 1980’s [6, 8]. Skip lists have most of the desirable properties of balanced trees such as AVL trees and self-adjusting trees with O(log(N)) average time for most operations, yet they are more simple and space efficient. The rationale for comparing LDSs with skip lists is twofold. First, skip lists are among the newest searching data structures, they are compared against AVL trees and self-adjusting trees in [8], so by comparing LDSs with skip lists we gain insight into the relationship between these important structures and LDSs. Second, the most important advantages of LDSs are their simplicity and space efficiency, but these are claimed to be the most important advantages of skip lists too. 16 The LDS algorithms are implemented in C programming language using Microsoft Visual Studio 2010 Compiler. Skip lists source C code is obtained from William Pugh by anonymous ftp to ftp.cs.umd.edu. The proper keys are randomly chosen from the set [1, RAND MAX] = [1, 2147483647] and stored in a file. Then the file is used to build and search lattices of varying heights and jump factors. Same keys are used to build and search skip lists. A binary-search-like procedure is used to perform the jump steps in JumpSearchLDS. The time performance values are the CPU time, measured in microseconds, on Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz with 4.0GB RAM computer. Carrying out the experiments using the GNU C compiler on a Unix environment shows similar comparable results. From Lemma 3.4, the number of each of the d and D movements in the search path for any key depends only on the location where the search path terminates. So, the performance of SearchLDS is independent of the jump factor of the lattice. In Table 2, we compare the performance of SearchLDS, skip lists search, and JumpSearchLDS for lattices with varying jump factors. The time is the average searching time of the present keys, h is height of the lattice, and N is the number of keys. As we see from the table, the performance of JumpSearchLDS is similar to SearchLDS when β = 0.8, JumpSearchLDS starts to perform better than SearchLDS when β > 0.9, that is when more than 81% of the keys are completely sorted. On the other hand, the performance of JumpSearchLDS is similar to skip lists search when β = 0.9, JumpSearchLDS starts to perform better than skip lists search when β > 0.95, that is when more than 90% of the keys are completely sorted. When β = 1 the lattice is completely sorted and searching using JumpSearchLDS is similar to searching a sorted array using binary search. Table 2: Timings of SearchLDS, skip lists search, and JumpSearchLDS h N SearchLDS Skip List JumpSearchLDS β = 0.8 β = 0.9 β = 0.95 β = 1.0 10 55 0.048 0.059 0.064 0.061 0.061 0.060 50 1275 0.190 0.144 0.215 0.155 0.134 0.128 100 5050 0.347 0.207 0.370 0.223 0.176 0.157 500 125250 1.840 0.481 1.686 0.678 0.357 0.228 1000 500500 3.990 0.780 3.600 1.284 0.557 0.267 If the lattice is not h-sorted, then √ N calls to SortLDS increase the degree 17 of sortedness of the lattice by at least 1, and hence reduce the average of the jump factors of the present keys of the lattice. So, using SortLDS during the system idle time will incrementally adjust the lattice, by increasing its degree of sortedness, and hence improves the performance of JumpSearchLDS. In order to simulate the performance of SortLDS during the system idle time, we will assume the following scenario: the system starts with an hsorted lattice with N proper keys, when the system is not idle the operations search, insert, and delete are performed, when the system is idle SortLDS is repeatedly called, the system goes through idle time when 0.1N new keys are inserted, and the ratio of the insert operations to the delete operations is equal to 2. The purpose of this hypothetical scenario is to give us a rough idea about the impact of using SortLDS, during the system idle time, on the average of the jump factors of the present keys of the lattice. Let γ to be the ratio of the number of times SortLDS is called to the number of times the insert and delete operations are called. √Since the time complexity of the insert, delete, and SortLDS procedures is N, then, in Table 3, instead of calculating the average of the jump factors of the present keys of the lattice with specific ratios of the idle time to the time of insert and delete operations, we will calculate the average of the jump factors of the present keys for the lattice with varying values of γ. Table 3: Average of the jump factors of the present keys for incrementally adjusted lattices using SortLDS h Average jump factor with varying γ γ=0 γ=3 γ=4 γ=5 γ=6 10 2.2 1.82 1.77 1.77 1.77 50 5.16 3.86 2.95 2.11 1.96 100 8.03 5.81 4.14 2.75 1.97 500 29.11 20.47 14.27 8.02 2.43 1000 52.47 37.46 25.66 13.87 3.11 In Table 4, we calculate the average of the jump factors of lattices of varying heights and degrees of sortedness. From Tables 3, 4, the average of the jump factors of the present keys for incrementally adjusted lattices using SortLDS with γ = 0, respectively γ = 5, is close to the average of the jump factors of the present keys for sorted lattices with β = 0.8, respectively β = 0.90. So, using the above scenario, when the 18 Table 4: Average of the jump factors of the present keys for lattices with varying degrees of sortedness h Average jump factor with varying β β = 0.8 β = 0.9 β = 0.95 β = 1.0 10 1.93 1.75 1.64 1.64 50 4.45 2.70 2.05 1.92 100 7.26 3.53 2.38 1.96 500 29.53 10.22 4.26 1.99 1000 57.37 18.57 6.54 2.00 system starts β = 1.0, and searching using JumpSearchLDS is similar to searching a sorted array using binary search. As the operations insert and delete are performed, β deceases from 1.0 to 0.8 and JumpSearchLDS slows down and becomes similar to SearchLDS. Using SortLDS with γ = 5 increases β from 0.8 to 0.90, and searching using JumpSearchLDS becomes similar to skip lists search. 5 Conclusions In this paper, we have formalized the definition of the lattice data structure and presented its basic operations. We have shown that the LDS is as space efficient as the array and it is very suitable for caching. The worst case time complexity of the LDS basic operations is better than the corresponding worst case time complexity of most of other data structures operations. In order to make this structure more attractive in term of the average case time complexity of the searching procedure, we have devised a general jump searching algorithm of time complexity O(J(L) log(N)). We have also pro√ vided a sorting algorithm of time complexity O( N) that can be used to reduce J(L) during the system idle time. One possible direction for further research is to explore using randomized searching procedures where the search starts at different locations of the lattice instead of the second cell of diagonal h + 2. Another possible direction is to perform a comprehensive experimental comparison of the LDS with B + -Trees and T -Trees to find out the best suitable structure for indexing in main memory. In [5], we showed that the LDS is a very robust structure for the order-statistic operations. 19 Acknowledgements. I would like to thank Simon Berkovich for his helpful comments and suggestions. I am also thankful to Regina Nuzzo who carefully read the manuscript of this paper. References [1] J. Bentley, F. Leighton, M. Lepley, D. Stanat, and J. Steele. A Randomized Data Structure for Ordered Sets. Advances in Computing Research, 5:413-428, 1989. [2] S. Berkovich. Organization of Associative Memory Operations With Lattice Structures. Proceedings of the 35th IEEE Midwest Symposium On Circuits and Systems, 2:887-890, 1992. [3] H. Bronnimann, F. Cazals, and M. Durand. Randomized Jumplists: A Jump-and-Walk Dictionary Data Structure. Proceedings of the 20th Annual Symposium on Theoretical Aspects of Computer Science, LNCS, Springer, 2607:283-294, 2003. [4] D. Knuth. The Art of Computer Programming Vol. 3: Sorting and Searching. Adison-Wesley Publishing Company, 1973. [5] M. Obiedat. Time-efficient Algorithms for the Order-statistic Operations in Lattice Data Structures. To be published. [6] W. Pugh. A Skip List Cookbook. Computer Science Technical Report Series, CS-TR-2286.1, 1-12, 1990. [7] W. Pugh. Concurrent Maintenance of Skip Lists. Computer Science Technical Report Series, CS-TR-2222.1, 1-13, 1990. [8] W. Pugh. Skip Lists: A Probabilistic Alternative to Balanced Trees, LNCS 382 Springer, 437-449 1989. [9] B. Shneiderman. Jump Searching: A Fast Sequential Search Technique. Comm. of the ACM, 21(10):831-834, 1978. [10] D. Sleator and R. Tarjan. Self-adjusting Binary Search Trees. Comm. of the ACM, 32(3):652-666, 1985. 20 [11] S. Štrbac-Savić and M. Tomašević. Comparative Performance Evaluation of the AVL and Red-Black Trees, Proceedings of the Fifth Balkan Conference in Informatics, 14-19, 2012. [12] B. Stroustrup. Software Development for Infrastructure. Computer, 45(1):47-58, 2012. [13] A. Yong. What is a Young Tableau?. Notice of the AMS, 54(2):240-241, 2007. 21
8cs.DS
Adaptive Estimation in Structured Factor Models with Applications to Overlapping Clustering arXiv:1704.06977v3 [stat.ME] 22 Mar 2018 Xin Bing∗ Florentina Bunea† Yang Ning‡ Marten Wegkamp§ Abstract This work introduces a novel estimation method, called LOVE, of the entries and structure of a loading matrix A in a sparse latent factor model X = AZ + E, for an observable random vector X in Rp , with correlated unobservable factors Z ∈ RK , with K unknown, and independent noise E. Each row of A is scaled and sparse. In order to identify the loading matrix A, we require the existence of pure variables, which are components of X that are associated, via A, with one and only one latent factor. Despite the fact that the number of factors K, the number of the pure variables, and their location are all unknown, we only require a mild condition on the covariance matrix of Z, and a minimum of only two pure variables per latent factor to show that A is uniquely defined, up to signed permutations. Our proofs for model identifiability are constructive, and lead to our novel estimation method of the number of factors and of the set of pure variables, from a sample of size n of observations on X. This is the first step of our LOVE algorithm, which is optimization-free, and has low computational complexity of order p2 . The second step of LOVE is an easily implementable linear program that estimates A. We prove that the resulting estimator is minimax rate optimal up to logarithmic factors in p. The model structure is motivated by the problem of overlapping variable clustering, ubiquitous in data science. We define the population level clusters as groups of those components of X that are associated, via the sparse matrix A, with the same unobservable latent factor, and multi-factor association is allowed. Clusters are respectively anchored by the pure variables, and form overlapping sub-groups of the p-dimensional random vector X. The Latent model approach to OVErlapping clustering is reflected in the name of our algorithm, LOVE. The third step of LOVE estimates the clusters from the support of the columns of the estimated A. We further guarantee cluster recovery with zero false positive proportion, and with false negative proportion control. The practical relevance of LOVE is illustrated through the analysis of an RNA-seq data set, devoted to determining the functional annotation of genes with unknown function. Keywords: Overlapping clustering, latent model, identification, high dimensional estimation, minimax estimation, pure variables, group recovery, support recovery, sparse loading matrix, matrix factorization. ∗ Department of Statistical Science, Cornell University, Ithaca, NY. E-mail: [email protected]. Department of Statistical Science, Cornell University, Ithaca, NY. E-mail: [email protected]. ‡ Department of Statistical Science, Cornell University, Ithaca, NY. E-mail: [email protected]. § Department of Mathematics and Department of Statistical Science, Cornell University, Ithaca, NY. E-mail: [email protected]. † 1 1 Introduction In this work we consider the problem of estimating the p × K sparse loading matrix A that parametrizes the factorization of a zero-mean observable random vector, X ∈ Rp as X = AZ + E (1) from n i.i.d. realizations of X. The zero mean random vector Z ∈ RK is unobservable, and can be viewed as a latent factor vector. E ∈ Rp is a zero-mean, unobservable random noise vector, with independent entries. The number of factors K is not known, and both p and K are allowed to grow, and be larger, than n. Factor models have been used as dimension reduction devices in virtually any scientific discipline for nearly a century, and generated an enormous amount of literature. We refer to the classical monographs of Bollen [1989] and Anderson [2003] for earlier work, and to Izenman [2008] for a more recent survey and applications. In this work, we revisit some of the open problems in factor model definition and estimation, and also consider one of their much less explored usage, to overlapping clustering. For the latter, we deem two components Xi and Xj of X similar if they have non-zero association, via the matrix A, with the same latent factor Za . Similar variables are placed in the same cluster, Ga :  Ga := j ∈ {1, . . . , p} : Aja 6= 0 , for each a ∈ {1, . . . , K}. (2) Since each Xj can be associated with multiple latent factors, the clusters will overlap. The problem of overlapping clustering is of wide-spread interest in virtually any scientific area, for instance in neuroscience [Craddock et al., 2012, 2013] and genetics [Jiang et al., 2004; Wiwie et al., 2015], to give a very limited number of examples. The solutions are typically algorithmic in nature, and their quality is assessed against a ground scientific truth or via extensive simulation studies, for instance Krishnapuram et al. [2001]; Bezdek [2013], among many others. These problems have not received a systematic analysis in the statistical literature and, in particular, the problem of estimating overlapping clusters of variables, with theoretical guarantees, remains largely unexplored. We propose model-based clustering via A. However, A cannot be uniquely defined in (1), without further restrictions, a phenomenon well understood over six decades ago. Most notably, Anderson and Rubin [1956] provided an in-depth analysis of this problem, and proved that in the absence of conditions on A and C := Cov(Z), A is not identifiable in model (1). We revisit some of these conditions here, with a view towards our application to overlapping clustering. Using the latter as motivation, we formalize our first modeling assumption on A. We consider models (1) in which each row of A is scaled, to avoid scale ambiguities, and sparse, to avoid the trivial situation in which each component Xj is associated with all latent factors. Specifically, we assume that: PK (i) a=1 |Aja | ≤ 1, and each row Aj· := (Aj1 , . . . , AjK ) is sparse, for j ∈ {1, . . . , p}. P The inequality in (i) allows for a |Aja | = 0, which renders more flexibility to model (1), relative P to the more commonly used equality conditions. If a |Aja | = 0, then Xj = Ej , and Xj is not associated with any of the latent factors, via this model. The interpretation for clustering is that 2 the corresponding Xj = Ej does not belong to any cluster given by this model, which is a desired feature in many practical applications, including the one presented in this paper in Section 6. Condition (i) alone cannot ensure that A in model (1) is uniquely defined, as one can still construct an invertible matrix Q such that AZ = AQQ−1 Z, with both A and AQ satisfying (i). Moreover, A and AQ may not have the same sparsity pattern, creating ambiguity in the cluster definition. We introduce below two additional conditions that allow us to show, in Section 2 below, that A is identifiable. We defer a detailed discussion of related conditions to Section 4.4. We call the following condition the pure variable assumption. Informally, it requires the existence of at least two pure variables Xj , which are components of X associated with one and only one latent factor. In Section 2 we provide examples that show that if pure variables do no exist, A in (1) is not uniquely defined. (ii) For every a ∈ {1, . . . , K}, there exist at least two indices j ∈ {1, . . . , p} such that |Aja | = 1 and Ajb = 0 for all b 6= a. This assumption has an immediate practical implication for variable clustering. Clusters given by (2) are defined relative to the unobservable factor Za . A pure variable Xj is an observable proxy of Za , and helps explain the nature of Ga . For future reference, we let I denote the index set corresponding to pure variables. In psychology, these variables are called factorially simple items (McDonald [1999]). A similar condition can be traced back to the econometrics literature, and an early reference is Koopmans and Reiersol [1950], further discussed in Anderson and Rubin [1956], who called it “zero elements in specified positions”. These works prove that (ii) corresponding to a known set I is a sufficient condition for identifying A, for latent factors with arbitrary correlations. However, full generality on the positive definite covariance matrix C of the latent factors comes at the steep price of knowing I a priori, which is often unrealistic in practice. Appropriate conditions on C that guarantee identifiability of I in (ii), in the general case when I is not known, have not been investigated for the general model (1), to the best of our knowledge. However, the problem of identifying A under (ii), with I unknown, has been revived more recently, in the particular case of random vectors X and Z with only non-negative values, and when A also has only non-negative entries. This set-up corresponds to the area of non-negative matrix factorization (NMF), in which one studies positive matrix factorizations of the type X = AZ + E, where the observed data X is a p × n matrix, Z is the K × n unobservable matrix of the latent vectors values, and E is the p × n noise matrix. In this context, when E = 0, and conditioning on Z, Donoho and Stodden [2004] was among the first to propose a condition similar to (ii), with I unknown, coupled with appropriate conditions on Z, leading to an NMF decomposition with unique factors. Moreover, the unique determination of I in NMF under (ii) was solved in Bittorf et al. [2012], for known K, and for scaled NMF models, in which the columns of X, Z and A sum up to 1, under the condition that no row of a scaled version of Z is a convex combination of the other rows. This condition implies, in particular, that there are no duplicate (scaled) latent factors, and similar results have been established, in the context of topic models in Arora et al. [2013]. We study here model (1) under (ii), with I and K unknown, under the restriction on the row sums of A given in (i), but with X, Z and A allowed to have arbitrary signs. This makes the 3 direct import of conditions on Z employed in the NMF literature difficult, and we provide below a condition on C that is appropriate for our model, and is a key ingredient in the identification of I in Section 2 below. In this work we depart from the widely used independence assumption between the latent factors, see for instance, Anderson and Rubin [1956]; Anderson [2003]; Bollen [1989]; Everitt [1984]; Izenman [2008] and our discussion in Section 4.4. We allow C to be far from a diagonal, or even a sparse matrix. Instead, we require (iii) ∆(C) := mina6=b (Caa ∧ Cbb − |Cab |) > 0, where a ∧ b := min(a, b). If (iii) holds, then Cov(Za ± Zb ) = Var(Za ) + Var(Zb ) ± 2 · Cov(Za , Zb ) ≥ Caa + Cbb − 2|Cab | > 0, which implies that the latent factors are different, up to signs, that is |Za | = 6 |Zb | a.s. for any a 6= b. Thus, (iii) can be viewed as a minimal natural requirement for the study of this problem. We note that under the pure variable assumption (ii), if I is known in advance, the arguments employed in the proof of Theorem 2 of Section 2 show that (iii) is not required, consistent with the existing literature on general latent models. When I is not known, our condition (iii) implies that we do not have duplicate latent factors, up to signs, consistent with similar requirements in NMF, as explained above. Therefore, condition (iii) can be viewed as bridging the gap between the classical literature in general latent models and the more recent literature devoted to the specialized NMF-type models. Summarizing, this work is devoted to estimation in model (1) with A satisfying (i) - (ii), and with the positive definite matrix C satisfying (iii). The number of factors K is not known, and both K and p are allowed to grow and be larger than n. In Section 1.1 below we present our contributions and the structure of this paper. A detailed contrast with existing literature is presented in Section 4.4. 1.1 Our contributions 1. Identifiability of the allocation matrix A in sparse latent models with pure variables. We show, in Proposition 2 of Section 2, that the allocation matrix A, which is allowed to have entries of arbitrary signs, is uniquely defined, up to trivial orthogonal transformations, namely signed permutation matrices. This is a consequence of one of our main results, Theorem 1 of Section 2. In this result we highlight and resolve the main difficulty in this problem, that of distinguishing between the pure variables and the non-pure variables. Both proofs are constructive, and show that the pure variable set I and allocation matrix A can be determined uniquely from Σ := Cov(X). Moreover, the number of factors K is not assumed to be known, and its determination is also a consequence of Theorem 1. To the best of our knowledge, these are new results in both the latent factors literature and other related matrix factorization literature. We comment on connections to related results in Section 4.4. 2. Estimation of the allocation matrix A and of the overlapping clusters. The LOVE b of the sparse and structured matrix A that is tailored to our algorithm. We provide an estimator A model specifications. Our approach follows the constructive techniques used in our identifiability b an estimator of the pure variable set I, and K, b an estimator of the proofs. We first construct I, 4 number of clusters, K. These are used to estimate the rows in A corresponding to pure variables. The remaining rows of A are estimated via an easily implementable linear program that is tailored to this problem. As part of our procedure, we also develop a novel estimator (12) and (13) of a precision matrix, C −1 . Our procedure is presented in Sections 3.1, 3.2 and 3.3, respectively. To the best of our knowledge, our estimation strategy is new, and complements the large body of literature in factor models. In particular, we do not resort to optimizing a complicated quasi likelihood function via computationally demanding EM algorithms. These algorithms require, in addition, a notoriously delicate initialization, especially in high dimensions, and typically only convergence to a stationary point can be guaranteed, see Rubin and Thayer [1982]. Moreover, as our procedure is not Bayesian, we do not employ distributional assumptions to construct our estimator. In Section b using the estimated allocation matrix A. b The 3.4, we build a collection of overlapping clusters G, combined procedure is summarized in a new algorithm, LOVE, highlighting our Latent model approach to OVErlapping clustering. 3. Statistical guarantees. Our estimation procedure does not depend on distributional assumptions, but for the purpose of our statistical analysis, and in particular our minimax analysis, we assume that X has a sub-Gaussian distribution. LOVE, for appropriate choices of tuning parameters, recovers the population level clusters with a zero false positive proportion and generally low false negative proportion, with high probability, and under a mild condition on the cluster separation as measured by the quantity ∆(C). This is a direct consequence of a number of results regarding estimation of identifiable loading matrices in factor models satisfying (i) - (iii) and, to the best of our knowledge, are all new. (1) Consistent estimation of the number of factors K; (2) Control of the relationship between Ib and I for A with entries of arbitrary strength. In particular, we show I ⊆ Ib ⊆ I ∪ J1 , where we carefully define and characterize J1 as the set of quasi-pure variables. b A), defined below, for all q ≥ 1, in particular for (3) Minimax lower bounds on the norms Lq (A, q = +∞, for A given by model (1) under (i) - (iii). (4) Attainment of these bounds, showing that our procedure is minimax optimal and adaptive. b (5) Control of the relationship between the support of A and the support of A. (6) Control of cluster recovery. The details are given in Sections 4.2 and 4.3. In particular, we emphasize that (2) above, proved in Theorem 3 of Section 4.1, guarantees recovery of I with minimal mistakes. This result does not require the necessary, yet unpleasant, signal strength restrictions encountered in the typical exact support recovery literature. However, under such restrictions, we also obtain Ib = I, with high probability, in Remark 2 of Section 4.1. Since placing restrictions on the entries in A reduces the number of configurations of interest, the more general result (2) is a new and practically relevant result for pure variable recovery. Results (3) and (4) are given in Theorems 4 and 5, respectively, of Section 4.2. We consider the 5 loss function b − Ak∞,q , b A) := min kAP Lq (A, P 1 ≤ q ≤ ∞, with the minimum taken over all K × K signed permutation matrices P and  kAk∞,q := max kAi· kq = max  1≤i≤p 1≤i≤p K X j=1 1/q |Aij |q  , is the maximum `q norm of the rows of A. We let s = maxi∈[p] kAi· k0 be the row-sparsity index. As explained in Section 3.3, our estimation procedure is closely connected to sparse estimation in errors-in-variable regression models with design matrix C, and the error rates we obtain can be interpreted in that context. We show that the error of estimation with respect to the Lq loss function, for each q, is proportional to s1/q n−1/2 , multiplied by kC −1 k∞,1 . This is consistent with the most recent results regarding error rates expressed in terms of the `q -sensitivity of C in Belloni et al. [2017], as discussed in Section 4.2. The results hold up to logarithmic factors in p and s. Results (5) and (6) are presented in Theorem 6 of Section 4.3. Moreover, we can further partition the variables in each cluster into two signed sub-groups consistently. In our model formulation, A is allowed to have positive and negative entries. Since A can only be identified up to signed b However, we can identify consistently permutations, one cannot expect sign consistency for A. the two sub-groups of each cluster that contain variables that are associated with the common latent factor in the same direction, although the direction itself is not identifiable. These results are presented in Section 4.3. We conduct an extensive simulation study in Section 5 to assess the numerical performance of our proposed strategy. The study confirms our theoretical findings. We conclude the validation of our approach with a data analysis, devoted to determining the functional annotation of genes with unknown function. Our analysis confirms existing biological ground truths, as our procedure tends to cluster together genes with the same Gene Ontology (GO) biological process, molecular function, or cellular component terms. We summarize our contributions in the table below, restricting attention to estimation in general latent models (1) under (i) - (iii), without any further restrictions on the signs or scales of X and Z. Model (1) under (i) - (iii) Identifiability Conditions Estimation: I Estimation: A Guarantees: I Guarantees: A Cluster recovery Our results Existence of I; I and K unknown; mild conditions on C. Optimization-free. Runs in O(p2 ) time Not MLE-based. Uses linear program. Runs in O(p2 + pK). Recovered Finite sample lower bounds for k k∞,q recovery Adaptive finite sample upper bounds p and K can grow with n Guaranteed Existing results in factor models Existence of known I; general C × E-M type, with known I. Computationally involved. Not guaranteed to estimate A × × Row-wise asymptotic normality of MLE-type estimators p can grow with n; K fixed. × In Section 4.4 we discuss our results further, and provide a detailed comparison between our work and related contributions. All proofs are deferred to Section A of the supplementary material. 6 1.2 Notation We use the following notation throughout this paper. For the n consecutive integer set starting from 1, we write [n] = {1, . . . , n}. The sign of any generic number N is denoted by sign(N ). For any m × d matrix M and index sets I ⊆ {1, . . . , m} and J ⊆ {1, . . . , d}, we write MI to denote the |I| × d submatrix (Mij )i∈I,1≤j≤d of M consisting of the rows in the index set I, while we denote by MIJ the |I| × |J| submatrix with entries Mij , i ∈ I and j ∈ J. The ith row of M is denoted by Mi· , and the jth column of M is denoted by M·j . Let kM k∞ = max1≤j≤m,1≤k≤d |Mjk |, Pd Pd P P 2 )1/2 , kM k Mjk kM k1 = 1≤j≤m,1≤k≤d |Mjk |, kM kF = ( m ∞,1 = max1≤j≤m k=1 |Mjk | k=1 j=1 Pm and kM k1,∞ = max1≤k≤d j=1 |Mjk | denote the matrix max norm, matrix `1 norm, matrix Frobenius norm, matrix 1 norm and matrix ∞ norm. We denote by h · i the Frobenius scalar product. P For a vector v ∈ Rd , define kvkq = ( di=1 |vj |q )1/q for 1 ≤ q < ∞, kvk∞ = max1≤j≤d |vj | and kvk0 = |supp(v)|, where supp(v) = {j : vj 6= 0} and |A| is the cardinality of the set A. We write M T for the transpose of M and diag(m1 , . . . , md ) for the d × d diagonal matrix with elements m1 , . . . , md on its diagonal, while diag(M ) is the diagonal matrix obtained from the diagonal elements of a square matrix M . We use c0 , c1 , . . . to denote generic constants. Finally, a signed permutation matrix is an orthogonal matrix that permutes the index and switches the sign within each column. We write HK as the hyperoctahedral group of K × K signed permutation matrices. 2 Identifiability In this section we show that the allocation matrix A given by Model (1) and (i) - (iii) is identifiable, up to multiplication with a signed permutation matrix. For any A ∈ Rp×K which satisfies Model (1), we can partition the set [p] = {1, . . . , p} into two disjoint parts: I and its complement J := [p] \ I such that for each row Ai· of AI , there exists only one a ∈ [K] such that |Aia | = 1. We name I the pure variable set and J the non-pure variable set. Specifically, for any given A, the pure variable set I is defined as [ I(A) := Ia , Ia := {i ∈ [p] : |Aia | = 1, Aib = 0, for any b 6= a} . (3) a∈[K] We write I(A) in (3) to emphasize that the pure variable set is defined relative to A. In the following, we will not write this explicitly when there is no confusion. We also note that the sets {Ia }1≤a≤K form a partition of I. To show the identifiability of A, it suffices to show that AI and AJ are identifiable, respectively, up to signed permutation matrices. By the definition of AI , this matrix is identifiable provided the partition of the pure variable set I is. The identifiability of I, and thus the problem of distinguishing between the sets I and J, on the basis of the distribution of X alone, is the central challenge in this problem. We meet this challenge in Theorem 1 below: part (a) offers a necessary and sufficient characterization of I; part (b) shows that, as a consequence, I and its partition I := {Ia }1≤a≤K are identifiable. Let Mi := max |Σij | (4) j∈[p]\{i} 7 be the largest absolute value of the entries of row i of Σ excluding |Σii |. Let Si be the set of indices for which Mi is attained:  Si := j ∈ [p] \ {i} : |Σij | = Mi . (5) Theorem 1. Assume that model (1) and (i) - (iii) hold. Then: (a) i ∈ I ⇐⇒ Mi = Mj for all j ∈ Si . (b) The pure variable set I can be determined uniquely from Σ := Cov(X). Moreover, its partition I := {Ia }1≤a≤K is unique and can be determined from Σ up to label permutations. The identifiability of the allocation matrix A and that of the collection of clusters G = {G1 , . . . , Gk } in (2) use the results from Theorem 1 in crucial ways. We state the result in Theorem 2 below. Theorem 2. Assume that Model (1) with (i) - (iii) holds. Then, there exists a unique matrix A, up to a signed permutation, such that X = AZ + E. This implies that the associated overlapping clusters Ga , for 1 ≤ a ≤ K, are identifiable, up to label switching. Remark 1. We show below that the pure variable assumption (ii) is needed for the identifiability of A, up to a signed permutation. Assume that X = AZ + E satisfies (i) and (iii), but not (ii). We construct an example in which X can also be written as X = ÃZ̃ + E, where à and Z̃ satisfy the same conditions (i) and (iii), respectively, but à 6= AP for any K × K signed permutation matrix P and à may have a sparsity pattern different from A. To this end, we construct à and Z̃ such that ÃZ̃ = AZ. Let à = AQ and Z̃ = Q−1 Z, for some K × K invertible matrix Q to be chosen. By the definition of C, Q needs to satisfy C = QCQT . In addition, we need to guarantee that à = AQ satisfies (i). For simplicity, we set K = 3. The following example satisfies all our requirements:     p 1 0 0 1/2 3/8 0    p  C = 0 2 0 , Q = −2 3/8 1/2 0 . 0 0 3 0 0 1 It is easy to verify that C = QCQT holds. For any 1 ≤ j ≤ p, consider r r 1 1 2 3 1 2 Aj· = ( , , − ) 4 8 3 4 8 3 then 1 Ãj· = Aj· Q = (0, 8 r 3 1 + 2 16 r 2 3 1 , − 3 4 8 r 2 ), 3 which also satisfies condition (i). However, Aj· and Ãj· have different sparsity patterns. Thus, if the matrix A does not satisfy (ii), A is generally not identifiable. 3 Estimation We develop estimators from the observed data, which is assumed to be a sample of n i.i.d. copies X (1) , . . . , X (n) of X ∈ Rp , where p is allowed to be larger than n. Our estimation procedure consists 8 of the following four steps: (1) Estimate the pure variable set I, the number of clusters K and the partition I; (2) Estimate AI , the submatrix of A with rows Ai· that correspond to i ∈ I; (3) Estimate AJ , the submatrix of A with rows Aj· that correspond to j ∈ J; (4) Estimate the overlapping clusters G = {G1 , . . . , GK }. 3.1 Estimation of I and I Given the different nature of their entries, we estimate the submatrices AI and AJ separately. For the former, we first estimate I and its partition I = {I1 , . . . , IK }, which can be both uniquely constructed from Σ, as shown by Theorem 1. We use the constructive proof of Theorem 1 for this step, replacing the unknown Σ by the sample covariance matrix n X b= 1 Σ X (i) (X (i) )T . n i=1 Specifically, we iterate through the index set {1, 2, . . . , p}, and use the sample version of part (a) of Theorem 1 to decide whether an index i is pure. If it is not deemed to be pure, we add it to the set that estimates J. Otherwise, we retain the estimated index set Sbi of Si defined in (5), which corresponds to an estimator of Mi given by (4). We then use the constructive proof of part (b) of Theorem 1 to declare Sbi ∪ {i} := Ib(i) as an estimator of one of the partition sets of I. The resulting procedure has complexity O(p2 ), and we give all the specifics in Algorithm 1 of Section 3.5. The algorithm requires the specification of a tuning parameter δ, which will be discussed in Section 5.1. 3.2 Estimation of the allocation submatrix AI b K b and Ib = {Ib1 , . . . , Ibb } from Algorithm 1, we estimate the matrix AI by Given the estimators I, K b ×K b matrix with rows i ∈ Ib consisting of K b − 1 zeros and one entry equal to either +1 or −1 a |I| b as follows. For each a ∈ [K], bia = 1. Note that A bia can only be +1 or −1 by (1) Pick an element i ∈ Iba at random, and set A the definition of a pure variable. bja = sign(Σ b ij ). (2) For the remaining j ∈ Iba \ {i}, we set A This procedure induces a partition of Iba = Iba1 ∪ Iba2 , where Iba1 and Iba2 are defined below: ( bka = A bla , for k, l ∈ Iba1 or k, l ∈ Iba2 A . bka 6= A bla , for k ∈ Ib1 and l ∈ Ib2 A a 3.3 (6) a Estimation of the allocation submatrix AJ We continue by estimating the matrix AJ , row by row. To motivate our procedure, we begin by highlighting the structure of each row Aj· of AJ , for j ∈ J. We recall that Aj· is sparse, with kAj· k1 ≤ 1, for each j ∈ J, as specified by assumption (i). In addition, model (1) subsumes a 9 further constraint on each row Aj· of A, as explained below. To facilitate notation, we rearrange Σ and A as follows: " # " # ΣII ΣIJ AI Σ= and A = . ΣJI ΣJJ AJ Model (1) implies the following decomposition of the covariance matrix of X: " # " # " # ΣII ΣIJ AI CATI AI CATJ ΓII 0 Σ= = + . ΣJI ΣJJ AJ CATI AJ CATJ 0 ΓJJ In particular, ΣIJ = AI CATJ . Thus, for each i ∈ Ia with some a ∈ [K] and j ∈ J, we have Aia Σij = A2ia K X Ajb Cab = b=1 K X T Ajb Cab = Ca· Aj· . (7) b=1 Averaging display (7) over all i ∈ Ia yields 1 X T Aia Σij = Ca· Aj· , |Ia | i∈Ia for each a ∈ [K]. (8) For each j ∈ J, we let β j = Aj· and  T X X 1 1 θj =  AiK Σij  . Ai1 Σij , . . . , |I1 | |IK | i∈I1 (9) i∈IK Since Aia ∈ {−1, 1}, for each i ∈ Ia and a ∈ [K], the entries of θj are respective averages of the sign corrected entries of Σ corresponding to the partition of the pure variable set. Summarizing, modeling assumption (i) and equation (8) above show that the estimation of AJ reduces to estimating, for each j ∈ J, a K-dimensional vector β j that is sparse, with norm kβ j k1 ≤ 1, and that satisfies the equation θj = Cβ j . Both C and θj , for each j ∈ J, can be estimated directly from the b we estimate the a-th entry of θj by data as follows. For each j ∈ J, 1 X b b b Aia Σij , a ∈ [K], θbaj = |Iba | (10) i∈Iba and compute baa = C 1 |Iba |(|Iba | − 1) X i,j∈Iba ,i6=j b ij |, |Σ bab = C 1 |Iba ||Ibb | X i∈Iba ,j∈Ibb bia A bib Σ b ij , A (11) b and b ∈ [K] b \ {a} to form the estimator C b of C. The estimates (10) and (11) rely for each a ∈ [K] crucially on having first estimated the pure variables and their partition, according to the steps described in Sections 3.1 and 3.2 above. We could cast the estimation of β j as a sparse, errors in variables regression problem by viewing b as observed quantities in the model given by θbj = Cβ j +ε and C b = C +η, with “unobserved θbj and C 10 b − C. Although the “errors” ε and η are heavily correlated in this errors” ε = θbj − θj and η = C context, unlike the typical assumptions on the errors in such models, it is nevertheless tempting to use an appropriate extension of the optimal estimation procedure developed for sparse errors in variables regression in Belloni et al. [2017]. This would essentially boil down to minimizing kβ j k1 b j − θbj k∞ . While Belloni et al. [2017] showed that their conic under a suitable constraint on kCβ programming estimator is optimal in a minimax sense, conic programming for each row j ∈ Jb would be computationally costly and involve too many tuning parameters. Moreover, our final goal of support recovery of β j would require additional thresholding for each row. The latter drawback is explicitly mentioned in the discussion following Theorem 1 in Belloni et al. [2017]. For these reasons, we do not pursue this line of estimation here. Instead, we have developed a more computationally efficient method, that only involves two tuning parameters, but shares the same rate of convergence of the resulting estimators as the aforementioned procedure in Belloni et al. [2017]. We exploit the fact that the square matrix C is invertible and take the equation b θbj , based β j = C −1 θj as our starting point. The idea is to first construct a pre-estimator β̄ j = Ω −1 b of the precision matrix Ω := C , followed by a sparse projection on an appropriate estimator Ω j of β̄ . Alternatively, we could use a simple hard threshold in the second step. We first motivate our proposed estimator of Ω. From the decomposition β̄ j − β j we immediately have b θbj − θj ) + (Ω b − Ω)θj = Ω( b θbj − θj ) + (ΩC b − I)β j , = Ω( b ∞,1 kθbj − θj k∞ + kΩC b − Ik∞ kβ j k1 . kβ̄ j − β j k∞ ≤ kΩk (12) (13) Since we can show, in Lemma 11, that kθbj −θj k∞ has optimal convergence rate, and since kβ j k1 ≤ 1 b should ideally render values for kΩk b ∞,1 and kΩC b − Ik∞ that are under our model, our estimator Ω as small as possible. With this in mind, we propose the linear program subject to b t̂) = arg (Ω, Ω = ΩT , min b K b t∈R+ , Ω∈RK× b − Ik∞ ≤ λt, kΩC t kΩk∞,1 ≤ t, (14) (15) with tuning parameter λ. This linear programming problem clearly is tailored to our purpose, and b adds a novel estimator for C −1 to the rich literature of precision matrix its optimal solution Ω estimation (Meinshausen and Bühlmann [2006]; Yuan and Lin [2007]; Friedman et al. [2008]; Cai et al. [2011, 2016], to name a few). Its novelty consists in (a) the usage of the matrix k · k∞,1 norm, rather than the commonly used matrix k · k1 norm, and (b) the fact that this norm appears in the upper bound of the restriction (15). Our analysis does not require any additional assumptions on C, i.e., no sparsity assumption on C or C −1 is imposed. In particular, we avoid the common, albeit highly undesirable, assumption that the condition number of C is bounded [Cai et al., 2016]. After b θbj , for each j ∈ J, b we solve the following optimization problem we compute β̄ j = Ω βbj = arg min kβk1 b β∈RK 11 (16) subject to kβ − β̄ j k∞ ≤ µ, (17) for some tuning parameter µ that is constant in j, to obtain our final estimate βbj as the optimal solution of this linear program. This solution is sparse and properly scaled, in accordance to our b we obtain A b b, and merging A bb with model specification (i). By stacking βbj over all rows j ∈ J, J I b b produces our final estimator A b of A. Its statistical property is analyzed in Section 4 along with A J precise forms of the tuning parameters. 3.4 Estimation of the overlapping groups Recalling the definition of groups in (2), the overlapping groups are estimated by   b1 , . . . , G bb , G b a = i ∈ [p] : A bia 6= 0 , for each a ∈ [K]. b Gb = G K (18) as the pure noise cluster. We can estimate G0 in (19) by  b 0 = i ∈ [p] : A bia = 0, for all a ∈ [K] b . G (20) b with the same latent factor Za are therefore placed in the Variables Xi that are associated (via A) b a . To accommodate potential pure noise variables, we further define same group G  G0 := j ∈ {1, . . . , p} : Aja = 0, for all a ∈ {1, . . . , K} (19) However, our main focus is on G because it completely determines G0 . In many applications, it may be of interest to identify the sub-groups of variables that are all either positively or negatively associated with the same latent factor. To this end, we define n o    G s := Gs1 , . . . , GsK , Gsa := G1a , G2a := (21) i ∈ Ga : Aia > 0 , i ∈ Ga : Aia < 0 , and they are estimated by  s b1 , . . . , G bs , Gbs = G b K n o  s ba = b ba : A bia > 0 , i ∈ G ba : A bia < 0 , for each a ∈ [K]. G i∈G (22) The fact that A is only identifiable up to a signed permutation matrix, has the repercussion that the labels of the two sub-groups in Gsa are not identifiable. Thus, variables placed in the subgroups G1a and G2a are, respectively, associated with Za in the same direction. The directions between two sub-groups, henceforth called direction sub-groups, are opposite. This can be identified, although the direction itself cannot. We show in Section 4 that the direction sub-groups can be identified, and well estimated. 3.5 LOVE: A Latent variable model approach for OVErlapping clustering. We give below the specifics of Algorithm 1, motivated in Section 3.1, and summarize our final algorithm, LOVE in Algorithm 2. 12 Algorithm 1 Estimate the partition of the pure variables I by Ib b δ) 1: procedure PureVar(Σ, b 2: I ← ∅. 3: for all i ∈ [p] do  b ij | ≤ |Σ b il | + 2δ 4: Ib(i) ← l ∈ [p] \ {i} : maxj∈[p]\{i} |Σ 5: P ure(i) ← T rue. 6: for all j ∈ Ib(i) do b ij | − maxk∈[p]\{j} |Σ b jk | > 2δ then 7: if |Σ 8: P ure(i) ← F alse, 9: break 10: end if 11: end for 12: if P ure(i) then 13: Ib(i) ← Ib(i) ∪ {i} b 14: Ib ← Merge(Ib(i) , I) 15: end if 16: end for b 17: return I. 18: end procedure b 19: function Merge(Ib(i) , I) 20: for all G ∈ Ib do 21: if G ∩ Ib(i) 6= ∅ then 22: G ← G ∩ Ib(i) 23: return Ib 24: end if 25: end for 26: Ib(i) ∈ Ib 27: return Ib 28: end function 4 . Ib is a collection of sets . Replace G ∈ Ib by G ∩ Ib(i) . add Ib(i) in Ib Statistical guarantees We provide in this section statistical guarantees for: b (1a) The estimated number of clusters K; b (1b) The estimated pure variable set Ib and its estimated partition I; (2) (3) b and its adaptation to the unknown row sparsity of A. The estimated allocation matrix A The individual Group False Positive Proportion (GFPP), the individual Group False Negative Proportion(GFNP), the Total False Positive Proportion (TFPP) and the Total False Negative Proportion (TFNP) for the estimated overlapping groups. 13 Algorithm 2 The LOVE procedure for overlapping clustering. b from I.I.D. data (X (1) , ..., X (n) ), the tuning parameters δ, λ and µ. Require: Σ b the estimated set of pure variables Ib and its 1: Apply Algorithm 1 to obtain the number of clusters K, b partition of I. bb from (6). 2: Estimate AI by A I −1 b from (14) and β̄ j for each j ∈ J. b 3: Estimate C by Ω b b b b 4: Estimate AJ by AJb from (16). Combine AIb with AJb to obtain A. b 1 , ..., G b } and its direction subgroups Gbs = {G b s , ..., G b s } from (18) 5: Estimate overlapping groups Gb = {G 1 K̂ b - (22) by using A. b Gb and Gbs . 6: Output A, K̂ We make the blanket assumption for the remainder of this paper that X is sub-Gaussian, that is, the Orlicz norm kXj kψ2 of each Xj is bounded by a common constant σ.1 The sub-Gaussian condition implies maxj∈[p] Σjj ≤ 2σ and kCk∞ ≤ 2σ. Let E = E(δ) :=  max 1≤i<j≤p  b Σij − Σij ≤ δ . (23) p We assume throughout that δ = c0 log(p ∨ n)/n, for some constant c0 , and log p = o(n), so that δ = o(1), for n large enough, where a ∨ b = max(a, b). Taking c0 = c0 (σ) > 0 large enough, Lemma 2 in Bien et al. [2016] guarantees that E holds with high probability: P(E) ≥ 1 − c1 (p ∨ n)−c2 (24) for some positive, finite constants c1 and c2 . Apart from δ, the quantity ∆(C) := ν > 0, (25) plays an important role in our analysis. Indeed, assumption (iii) requires that ν > 0 in order to guarantee that the latent factors are distinguishable from one another. We can view ν as a measure of their separation, and naturally therefore, the size of ν impacts the quality of all our estimators, in addition to the magnitude of δ. 4.1 b Ib and Ib Statistical guarantees for K, We first analyze the performance of our estimator Ib of I, and its corresponding partition. This problem belongs to the general class of pattern recovery problems, and it is well understood that under strong enough signal conditions one can expect Ib = I, with high probability. This turns out to be indeed the case for our problem, but we obtain this as a corollary of a more general result. We set out to quantify when our estimated set contains the least taxing type of errors, under minimal assumptions. To make this precise, we introduce the concept of quasi-pure variables. A quasi-pure variable Xi has very strong association with only one latent factor, say Za , in that |Aia | ≈ 1, and 1 The Orlicz norm of Xj is defined as kXj kψ2 = inf {c > 0 : E [ψ2 (|Xj |/c)] < 1} , based on the Young function ψ2 (x) = exp(x2 ) − 1. 14 very low association with the rest: |Aib | ≈ 0, for all b 6= a. Formally, we define the set of quasi-pure variables as: J1 := {j ∈ J : there exists a ∈ [K], such that |Aja | ≥ 1 − 4δ/ν}. (26) For each a ∈ [K] we further define the set of quasi-pure variables associated with the same factor: J1a := {j ∈ J1 : |Aja | ≥ 1 − 4δ/ν}. (27) When ν is a strictly positive constant,  := 4δ/ν = o(1). The lower bound |Aja | ≥ 1 −  in (27) implies, under condition (ii), that |Ajb | ≤ , for any b 6= a and j ∈ J1a , justifying the name quasipure variables for those components of X with indices in J1 . We observe, for future reference, that {J11 , . . . , J1K } forms a partition of J1 . We show in Theorem 3 that, with very high probability, the estimated Ib contains the pure variable set I, and is in turn contained in a set that includes all pure variables and quasi-pure variables. Importantly, Ib will not include indices of variables Xj that are associated with multiple latent factors at a level higher than . Equally importantly, if a quasi-pure variable Xi is included b then this variable will have the corresponding |Aia | ≈ 1, and it will be placed together with in I, the pure variables associated with the same factor Za , for some a, and not in a new cluster. This is crucial for ensuring that the number of clusters K is consistently estimated, and also for establishing the cluster misclassification proportion in Section 4.3 below. Theorem 3. Assume Model (1) with (i) - (iii), and   p ν > 2 max 2δ, 2kCk∞ δ . (28) Then: b = K; (a) K (b) I ⊆ Ib ⊆ I ∪ J1 . Moreover, there exists a label permutation π of the set {1, . . . , K}, such that the output Ib =  Iba a∈[K] from Algorithm 1 satisfies: π(a) (c) Iπ(a) ⊆ Iba ⊆ Iπ(a) ∪ J1 . All results hold with probability larger than 1 − c1 (n ∨ p)−c2 , for c1 , c2 positive constants defined in (24). The conclusion of Theorem 3 holds only under condition (28), which stipulates that the separation between the latent factors, as measured by ν, is not only strictly positive, which was needed for identifiability, but slightly above a quantity that depends on the estimation error δ, and which becomes o(1) for n large enough. 15 Remark 2. Let e1 = (1, 0, . . . , 0)T and HK be the hyperoctahedral group of signed permutation matrices. If AI and AJ are well separated in the sense that min j∈J, P ∈HK Aj· − P e1 1 > 4δ/ν, then J1 = ∅, and Theorem 3 yields exact recovery of the pure variable set and of its partition: Ib = I and Ib = I, with high probability. However, we expect J1 6= ∅, as we expect quasi-pure variables to be present in a high dimensional model, which is the context for which Theorem 3 has been established. 4.2 b Statistical guarantee for A b obtained in In this section we state, and comment on, the statistical properties of the estimate A p Sections 3.2 and 3.3. Recall that δ = O( log(p ∨ n)/n) was given in (23) above, and the estimation of AJ made use of two tuning parameters: λ, in (15), and µ, in (17). Theorem 4 establishes the properties of our estimates relative to the theoretically optimal values of these tuning parameters, both of which are functions of δ, while their data adaptive calibration is discussed in Section 5.1 below. We let λ = 2δ 0 and µ = 5kC −1 k∞,1 δ 0 , with   8 δ0 = kCk∞ − 3 δ, (29) ν for ν defined in (25) above. When ν and kCk∞ are strictly positive constants we thus have p p λ = O( log(p ∨ n)/n) and µ = O(kC −1 k∞,1 log(p ∨ n)/n). We consider the loss function for two p × K matrices A, A0 as Lq (A, A0 ) := min kAP − A0 k∞,q , 1 ≤ q ≤ ∞. P ∈HK (30) Here HK is the hyperoctahedral group of all K × K signed permutation matrices and  kAk∞,q := max kAi· kq = max  1≤i≤p 1≤i≤p K X j=1 for a generic matrix A ∈ Rp×K . 1/q |Aij |q  , Theorem 4. Assume the conditions in Theorem 3 hold. Let λ and µ be as defined above, and set s = maxi∈[p] kAi· k0 . Then, b A) ≤ 10s1/q kC −1 k∞,1 δ 0 , Lq (A, 1 ≤ q ≤ ∞, with probability larger than 1 − c1 (n ∨ p)−c2 , for c1 , c2 positive constants defined in (24), provided that (2µ + 4δ/ν) < 1. We use the convention that s1/q = 1 for q = +∞. Remark 3. 16 1. In fact, we prove the stronger result bi· − (AP )i· min A P ∈HK q ≤ 10(si )1/q kC −1 k∞,1 δ 0 , 1 ≤ q ≤ ∞, with sparsity index si = kAi· k0 for each row Ai· , i ∈ [p] of A. The signed permutation matrix P that achieves the minimum is determined by the alignment of the pure variables and is the same for each i ∈ [p]. bi· k1 ≤ 1, for each i ∈ [p], with high 2. Inspection of the proof of this result quickly reveals that kA probability, in accordance with our model requirement (i). 3. Our primary focus is the bound for q = +∞, as this leads to inference on support recovery of A. More generally, for any q ≥ 1, it is well understood that the quality of estimating a sparse vector in high-dimensional regression-type models depends on the interplay between its sparsity and the behavior of the appropriate Gram matrix associated with the model, which reduces to C = E[ZZ T ] in our case. The concept of `q -sensitivity, introduced by Gautier and Tsybakov [2011]; Belloni et al. [2017], is the most general characterization of this interplay to date. It facilitates a link between the `q -norm of sparse vectors β and the `∞ -norm of the product between the Gram matrix and β, uniformly over vectors β of sparsity s, ranging over a collection of cones. In our context, that of a square, invertible matrix C, the reciprocal of the `∞ -sensitivity of C becomes essentially kC −1 k∞,1 , which indeed links kβk∞ to kCβk∞ . Similarly, the quantities s1/q kC −1 k∞,1 provide concrete substitutes of the reciprocals of the `q -sensitivities of C, and all of our rates in Theorem 4 match the lower bounds in Theorem 5, up to a logarithmic factor in p/s and the quantity kC −1 k∞,1 . The size of kC −1 k∞,1 ranges from the constant kC −1 k∞ , when all latent factors are independent, to the fully general case of kC −1 k∞,1 = O(K). In the latter case the bounds become p meaningful when K < O( n/ log p). However, if C −1 is sparse, then kC −1 k∞,1 may be considerably smaller than K. In particular, if Z has a multivariate normal distribution and many factors Zi are conditionally independent, then kC −1 k∞,1 is small. We do not make any of these assumptions here, and regardless of the situation, Theorem 4 shows that our estimation procedure adapts automatically to it. We now show that the rates of convergence in Theorem 4 are optimal (up to a logarithmic factor in p/s and provided kC −1 k∞,1 remains bounded) in a minimax sense for all estimators over the parameter space   As := A ∈ [−1, 1]p×K : A satisfies conditions (i) and (ii) and max kAi· k0 ≤ s . 1≤i≤p For our purpose of establishing a minimax lower bound, it suffices to consider a particular subGaussian distribution of (Z, E). We choose to take the multivariate Gaussian with E[(Z, E)] = 0 ∈ RK+p , Cov(Z, E) = 0 ∈ RK×p and Cov(Z) = IK , the K × K identity matrix, and Cov(E) = Γ = diag(σ12 , . . . , σp2 ). 17 Theorem 5. Assume Z ∼ N (0, IK ) and E ∼ N (0, Γ) are independent. Let K ≥ 2, p ≥ 2K + 1, 1 ≤ s ≤ 4K/5 and r log(K/s) s ≤ C1 , (31) n for some universal constant C1 > 0. Then, for all 1 ≤ q ≤ ∞, ) ( r log(K/s) 1/q b A) ≥ C2 s ≥ C3 , (32) inf sup PA Lq (A, n b A∈A A 2 for some positive constants C2 , C3 which only depend on σmin := mini∈[p] Γii . The infimum is taken 1/q b over all estimators A of A and we use the convention s = 1 for q = +∞. Since for C = I, the quantity kC −1 k∞,1 becomes 1, we see that the rates of Theorems 4 and 5 coincide up to the logarithmic factors log(K/s) and log(p ∨ n). This shows that our procedure is not only adaptive, but nearly minimax optimal up to the logarithmic factor provided kC −1 k∞,1 remains bounded. 4.3 Statistical guarantee for Gb and Gbs . For easy of presentation, and without loss of generality, throughout this section, we continue to write A for its orthonormal transformation AP that uses the optimal signed permutation matrix b P ∈ HK from Theorem 4 to align the columns and signs of A with that of A. b = K. The latter We define two criteria to evaluate the estimated clusters Gb on the event K holds with high probability by Theorem 3. We first define the individual Group False Positive Proportion (GFPP) and the individual Group False Negative Proportion (GFNP) as, b a ) := GFPP(G ba | |(Ga )c ∩ G , c |(Ga ) | b a ) := GFNP(G b a )c | |Ga ∩ (G , |Ga | for each a ∈ [K], (33) b a )c := [p] \ G b a , with the convention GFPP(G b a ) = 0 if |(Ga )c | = ∅. where (Ga )c := [p] \ Ga and (G b a . Furthermore, GFPP and GFNP quantify the misclassification proportion within each group G with the same convention, we can define the Total False Positive Proportion (TFPP) and Total b False Negative Proportion (TFNP) to quantify the overal misclassification proportion of G. b := TFPP(G) PK c b a=1 |(Ga ) ∩ Ga | , PK c a=1 |(Ga ) | b := TFNP(G) Finally, given µ = 5kΩk∞,1 δ 0 with δ 0 specified in (29), we define PK b c a=1 |Ga ∩ (Ga ) | . PK a=1 |Ga | J2 := {i ∈ J : for any a with Aia 6= 0, |Aia | > (2µ) ∨ (4δ/ν)}. (34) (35) and J3 := J \ (J1 ∪ J2 ). J2 can be viewed as the set where every non-zero entry of Aj· is separated away from 0 for each j ∈ J2 . The following theorem shows that J2 plays a critical role in quantifying b and the misclassification proportion of G. b Let Sb := supp(A). b both the support recovery of A 18 Theorem 6. Under the conditions of Theorem 4, with probability greater than 1 − c1 (n ∨ p)−c2 for some positve constant c1 and c2 defined in (24), we have: (a)  b ⊆ supp (A) , supp AJ2 ⊆ supp(A)  b b) = sign A b . sign(A S S (b) Let saj = 1{|Aja | = 6 0} and taj = 1{|Aja | ≤ (2µ) ∨ (4δ/ν)}, for each j ∈ J and a ∈ [K]. P a a t b a ) = 0; GFNP(G b a ) ≤ Pj∈J1 ∪J3 \J1 j . GFPP(G a j∈J sj + |Ia | (c) Let sj = Remark 4. PK a=1 1{|Aja | = 6 0} and tj = b = 0; TFPP(G) PK ≤ (2µ) ∨ (4δ/ν)}, for each j ∈ J. P j∈J1 ∪J3 tj b TFNP(G) ≤ P . j∈J sj + |I| (36) a=1 1{|Aja | (37) 1. From our proof of Theorem 6, it is easy to verify that the expression of TFNP in (37) continues to hold for the Direction False Positive Proportion (DFPP) and the Direction False P Negative Proportion (DFNP) defined in (40) below with sj replaced by K a=1 1{Aja < 0} or P PK PK K a=1 1{0 < Aja ≤ a=1 1{−(2µ) ∨ (4δ/ν) ≤ Aja < 0} or a=1 1{Aja > 0}, tj replaced by + − ± (2µ) ∨ (4δ/ν)} and I replaced by I or I , where I := ∪a∈[K] {i ∈ Ia : Aia = ±1}. b a ) will be small if either ta is small 2. According to display (36), it is easy to see that GFNP(G j P for j ∈ J1 ∪ J3 or |J1 | + |J3 | − |J1a | is dominated by |Ia | + j∈J saj . Moreover, from display (37), TFNP will be small in the following two cases: - |J1 | + |J3 | is dominated by |I| + |J2 |; - tj is small relative to sj , for j ∈ J1 ∪ J3 . To illustrate this, consider tj ≡ t and sj ≡ s, for each j ∈ J, to simplify the expressions a bit, and assume |J1 | + |J3 | = α(|I| + |J2 |), for some α ≥ 0. We show in the supplementary material that    1 (s − 1)|J2 | b ≤t TFNP(G) s+ 1+ , α |I| + |J2 | Thus, when either t or α is small, that is, when |J1 | + |J3 | is dominated by |I| + |J2 |, then TFNP will be small. Note that even when t itself is large but bounded by some constant, TFNP p might also be small since s can be close to K which is allowed to grow as O( n/ log p). 3. If J2 = J with µ = 3kC −1 k∞,1 δ, from noting that J2 ⊆ J \ J1 , Remark 2 in Section 4.1 yields Ib = I. We can choose λ = δ in (15) and µ = 3kC −1 k∞,1 δ in (17), and follow the proof of Theorems 4 and 6 to arrive at the following conclusions: b = supp (A) , supp(A) Moreover, we get exact cluster recovery: 19 b = sign(A). sign(A) b a ) = GFNP(G b a ) = 0, for each a ∈ [K]. (a) GFPP(G b = TFNP(G) b = 0. (b) TFPP(G) b 0 = G0 . Again, all statements hold with probability greater than This immediately yields G 1 − c1 (n ∨ p)−c2 . e in which we combine 4. We prove that Theorem 6 also holds for the hard threshold estimator A j j j j bb with A e b. Each row of A e b is estimated by βea = β̄a 1{|β̄a | > µ} of βa = Aja , a ∈ [K], b using A I J J −1 0 the same µ = 5kC k∞,1 δ as before for the threshold µ. However, we cannot guarantee that the scaling restriction of condition (i) holds for this estimator. 4.4 Discussion and related work To the best of our knowledge, optimal estimation of identifiable sparse loading matrices A in model (1) satisfying (i) - (iii), when both I and K are unknown, and when the entries in X, Z and A are allowed to have arbitrary signs, has not be considered elsewhere and our results bridge this gap. There exists, however, a very large body of literature on related problems. We review the most closely related results below, and explain the differences with our results. Results regarding the identifiability of A in general latent models, typically without sparsity, are scattered throughout over more than six decades of literature. They all involve conditions on both A and C, and there is typically a trade-off between the restrictions on A versus those on C, as first summarized and proved in Anderson and Rubin [1956], reviewed in Lawley and Maxwell [1971] and later in Anderson and Amemiya [1988]. We recall them briefly here for the convenience of the reader. By far the most commonly used assumption is that the latent factors are uncorrelated, so that C is either the identity or a diagonal matrix. In this case, it is typically further assumed that the scaled columns of A are orthogonal, see, for instance, the literature review in Izenman [2008]. An alternative requirement is that A contain a K × K lower diagonal matrix, see, e.g., Geweke and Zhou [1996] and, moreover, that the placement of this matrix within A is known, which requires careful justification [Carvalho et al., 2008], and may be problematic from a practical perspective [Bhattacharya and Dunson, 2011]. In general, latent factors are correlated, which is our point of view in this work. Then, starting with Anderson and Rubin [1956], one places on the structure of A constraints that are different than those made when C is diagonal. The most common of those assumptions involves the existence of a pure variable set I, similar to our assumption (ii). If I is known, classical results in Anderson and Rubin [1956] and the proof of our Theorem 2 show that C can be an arbitrary positive definite matrix. When I is unknown, conditions on the latent factors also need to be imposed. Sufficient conditions on Z, with provable guarantees for the identification of I, are only known, to the best of our knowledge, in the NMF literature: the uniqueness of I follows from the uniqueness of the solution of an appropriate linear program, applied to population quantities, and tailored to matrices with non-negative entries, see Bittorf et al. [2012]. In contrast, the arguments of Section 2 above are optimization-free and can be used for matrices that have entries of arbitrary sign. Therefore, 20 we provide a new addition to the literature on pure-variable and loading matrix identification, in general latent models, and also in the particular case of NMF. A related, but different, identifiability question regards the covariance matrix Σ of X which, under (1), can be written as the sum between a rank K matrix and a diagonal matrix: Σ = ACAT + Γ, (38) and Γ := Cov(E) is a diagonal matrix with possibly different entries. In these models, the identifiability question is whether Σ can be decomposed uniquely as the sum between ACAT and Γ. Answers to this question generated a large amount of literature. We refer the reader to Ledermann [1937]; Anderson and Rubin [1956]; Shapiro [1982, 1985]; Bekker and ten Berge [1997] for earlier results, and to Bai and Ng [2002]; Chandrasekaran et al. [2011, 2012]; Candès et al. [2011]; Hsu et al. [2011], Fan et al. [2013], Wegkamp and Zhao [2016] for more recent works, that also address the problems of rank estimation and optimal estimation of high dimensional covariance matrices. It is noteworthy that these works, relative to one another, give different types of sufficient conditions under which one can separate the low rank matrix ACAT from Γ. However, since we always have ACAT = (AQ)(QT CQ)(QT AT ), for any orthonormal Q, they do not guarantee the identifiability of A itself. Conversely, we show in Theorem 2 in Section 2 that under conditions (i) - (iii), C and Γ are identified, and A is identified up to signed permutations. Therefore, we also identify uniquely the decomposition of Σ. Our conditions are not always comparable to those employed for the unique decomposition of Σ, but in special cases they imply them. Although the uniqueness of the decomposition of Σ is a by-product of our results, we do not pursue the covariance estimation problem in this work, but we included the above discussion for completeness. Furthermore, we do not view the problem of estimating the number of factors K as that of estimating the rank of a matrix. This approach is taken in Bai and Ng [2002], via penalized least squares, but provided that either C = I or AAT = I and that K is bounded by a fixed integer. Alternatively, we could adapt the criteria in Bunea et al. [2011]; Bing and Wegkamp [2018]; Wegkamp and Zhao [2016] to (1) to allow for K → ∞ in the rank estimation problem. However, proving that such an estimator is consistent would ultimately require an unnecessary lower bound restriction on the K-th largest eigenvalue of ACAT . In contrast, our Theorem 3 shows that such conditions can indeed be avoided. We estimate directly the set I and its partition via LOVE, and as a byproduct K, at a low computational cost of order p2 . Estimation of A in identifiable factor models is typically based on iterative alternating least squares procedures or the EM algorithm, see for instance Rubin and Thayer [1982]; Bai and Li [2012] and the references therein. As discussed in these works, the resulting algorithms are not suitable for large data sets due to their notoriously slow convergence to a solution that is typically not the global optimum. Bayesian estimation, see, e.g. Carvalho et al. [2008] and the references therein, offers an alternative approach which may become computationally very demanding in high dimensions, requires a likelihood framework, and careful prior specification. Moreover, existing procedures do not estimate A under our model specifications (i) - (iii), and any adaptation would still require the challenging estimation of I. Our procedure offers a solution to the computational problem, as LOVE does not require a likelihood or other prior distributional specifications, is tailored to our model with unknown I, and has provable low computational complexity. 21 The statistical properties of estimators of A in model (1) (i) - (iii) have not been studied, and even particular cases of the model have received a very limited amount of attention, from a theoretical perspective. When I is known and K is fixed, Bai and Li [2012] established the asymptotic normality of the MLE in a model similar to ours, although the estimator they ultimately construct is not necessarily the MLE under this model, but rather an appropriate transformation of the stationary point of a quasi-likelihood for a different factor model. We give the specific details of their construction in Supplement C.1. If I is unknown, but K is known, and moreover, the columns of X, A and Z have non-negative entries that sum up to 1, Arora et al. [2013] provide a practical algorithm for the estimation of A and offer bounds on the `1 matrix norm loss of their estimator. The extra restrictions on this model are motivated by a specific model, the topic model, appropriate for vectors with discrete distributions, for instance multinomial. The construction and analysis of these estimates are not transferable to our general framework, as they depend heavily on these restrictions. Our results of Section 4.2 bridge this gap in the literature and offer lower and upper bounds for the performance of estimators of A in model (1) (i) - (iii). Finally, to the best of our knowledge, overlapping clustering based on model (1) has not been analyzed. A particular case of this model, corresponding to a matrix A with binary entries, has been considered in Bunea et al. [2016a,b] for non-overlapping clustering. According to their model, all p variables are pure variables, as the model assume that Xj = Zk + Ej , for all j ∈ Gk and k ∈ {1, . . . , K}, {Gk }1≤k≤K form a partition of {1, . . . , p}. When C is positive definite, the nonoverlapping clusters are shown to be identifiable, and the work of Bunea et al. [2016a,b] is devoted to exact recovery of clusters with minimax optimal cluster separation, a very different problem than the one considered here. 5 Simulation Studies In this section, we first discuss our procedure for selecting the tuning parameters, then evaluate the performance of LOVE based on estimation error and overall clustering misclassification proportion. In the supplementary materials, we compare LOVE with existing overlapping clustering algorithms and study the performance of LOVE for the non-overlapping clustering problem. 5.1 Data driven choice of the tuning parameters Tuning parameter δ. Proposition 3 specifies the theoretical rate of δ, but only up to constants that depend on the underlying data generating mechanism. We propose below a data-dependent way to select δ, based on data splitting. Specifically, we split the data set into two independent b (1) . On the parts, of equal sizes. On the first set, we calculate the sample covariance matrix Σ p second set, we choose a fine grid of values δ` = c` log p/n, with 1 ≤ ` ≤ M , for δ, by varying the b proportionality constants c` . For each δ` , we obtain the estimated number of clusters K(`) and b b b b the pure variable set I(`) with its partition I(`). Then we construct the |I(`)| × K(`) submatrix bb of A, b and estimate C(`) b b b A via formula (11). Finally, we calculate the |I(`)| × |I(`)| matrix I(`) bb C(`) b A bT . In the end, we have constructed a family F = {W1 , . . . , WM } of the fitted W` = A I(`) b I(`) 22 b matrices W` , each corresponding to different I(`) that depend in turn on δ` , for ` ∈ {1, . . . , M }. Define 1 b (1) b , (39) CV (I(`)) := q b I(`) b − W`  ΣI(`) F-off b b |I(`)| |I(`)| −1 where kBkF-off := kB − diag(B)kF denotes the Frobenius norm over the off-diagonal elements b of a square matrix B. We choose δ cv as the value δ` that minimizes CV (I(`)) over the grid ` ∈ [M ]. To illustrate how the selection procedure works, we provide an example in Section B of the supplementary material. Tuning parameters λ and µ. The tuning parameter λ in the linear program (15) for estimating Ω = C −1 is specified by λ = 2δ 0 with δ 0 defined in (29). Since δ 0 is proportional to δ, we use λ = c0 δ cv where c0 is some constant and could be tuned by a cross-validation strategy used in the related work on the precision matrix estimation, for instance Cai et al. [2011]. More precisely, we randomly b on the first dataset for each split the data into two parts. For a given grid of λ, we compute Ω value in the grid. Then we choose the one which gives the smallest likelihood loss from the second dataset, where the likelihood loss is defined by L(Ω, C) = hΩ, Ci − log det(Ω). From Remark 4 (3) in Section 4.3, when J2 = J, we can choose λ = δ which is the smallest λ we should consider. Therefore, we set the grid of λ equal to [δ cv , 3δ cv ]. From our simulation, the selected λ is δ cv in most cases. Hence we recommend to use λ = δ cv and our simulations are based on this choice. b estimates C −1 . Our extensive Recall that µ = c1 kC −1 k∞,1 δ for some constant c1 , and that Ω b ∞,1 δ cv yields stable performance, with Ω b solved from simulations show that the choice of µ = kΩk (14) and δ cv selected via cross-validation. 5.2 Estimation error and cluster recovery with LOVE In this section, we study the numerical performance of LOVE in terms of clustering and estimation accuracy. To the best of our knowledge, there is no comparable algorithm with provable guarantees developed for our framework, especially if the set I is unknown, as explained in detail in Section 4.4 above, and further re-visited in Section C.1 of the supplementary material. We generate the data in the following way. We set the number of clusters K to be 20 and simulate the latent variables Z = (Z1 , . . . , ZK ) from N (0, C). The diagonal elements of C is given by Cii = 2 + (i − 1)/19 for i = 1, . . . , 20, and the off-diagonal elements are generated as Cij = (−1)(i+j) 0.3|i−j| (Cii ∧ Cjj ) for any i 6= j. In addition, the error terms E1 , ..., Ep are independently sampled from N (0, σp2 ), where σp2 itself is sampled from a uniform distribution on [1, 3]. Since the rows of A corresponding to pure variables in the same cluster are allowed to have different signs, we consider the following configuration of signs for pure variables in each cluster: (3, 2), (4, 1), (2, 3), (1, 4) and (5, 0), with the convention that the first number denotes the number of positive pure variables in that group and the second one denotes the number of negative pure variables. Among 23 the 20 groups, each sign pattern is repeated 4 times. To generate AJ , for any j ∈ J, we randomly assign the cardinality sj of the support of Aj· to a number in {2, 3, 4, 5}, with equal probability. Then, we randomly select the support from {1, 2, . . . , K} with cardinality equal to sj . For Ajk which is nonzero, we set it as Ajk = sign ·(1/sj ) with sign randomly sampled from {−1, 1}. Thus, we can generate X according to the model X = AZ + E. In the simulation studies, we vary p from 200 to 1000 and n from 300 to 1000. Each simulation is repeated 50 times. b are not directly comparable, since Recall that the true allocation matrix A and our estimator A they may differ by a permutation matrix. To evaluate the performance of our method, we consider b have the same dimension, we first the following mapping approach [Wiwie et al., 2015]. If A and A b kF is minimized. find the mapping (i.e., the signed permutation matrix P ∈ HK ) such that kA − AP q = AP b with A to evaluate the estimation and Thus, we can compare the permuted estimator A recovery error. Under this mapping approach, we can evaluate TFPP and TFNP defined in (34). Moreover, in order to account for the direction sub-groups defined in (21), we can define Direction False Positive Proportion (DFPP) and Direction False Negative Proportion (DFNP) as follows: DFPP = PK 1 b2 a=1 |Ga ∩ Ga | , PK 1 a=1 |Ga | DFNP = PK 2 b1 a=1 |Ga ∩ Ga | . PK 2 a=1 |Ga | (40) Figure 1 shows the percentage of exact recovery of number of clusters K, TFPP, TFNP, DFPP b = K, we can and DFNP of LOVE. Since the last four measures are well defined only if rank(A) compute them when the number of clusters is correctly identified. We can see that the proposed method correctly selects K and as long as the number of clusters is correctly selected, TFPP, TFNP, DFPP and DFNP of our method are very close to 0, which implies that the sign and sparsity pattern b as measured by the matrix of A can be correctly recovered. We present the estimation error of A √ `1 norm scaled by pK and the Frobenius norm scaled by pK in Table 1. As expected, the estimation error decreases when the sample size increases from 300 to 1000, which is in line with our theoretical results. The simulations are conducted on an macOS Sierra system version 10.12.6 with 2.2 GHz Intel Core i7 CPU and 16 GB memory. Even with p = 1000 and n = 1000, the computing time of our method for each simulation is around 1 minute. Moreover, we evaluated the performance of the LOVE procedure for K varying in a wide range, from 3 to 30, and when AJ contains many very small entries. The results are consistent with what we observed in this section and deliver the same message. The GFPP and GFNP are similar as e defined in Remark 4 TFPP and TFNP and the performance of the hard thresholding estimator A, b To save space, we have omitted those results. of Section 4.3, is similar to A. We also compared the performance of LOVE with other off-the-shelf algorithms for overlapping clustering, and tested LOVE for non-overlapping clustering. We included these results in sections C.2 and C.3 of the supplementary material. 6 Application To benchmark LOVE, we used a publicly available RNA-seq dataset of 285 blood platelet samples from patients with different malignant tumors [Best et al., 2015]. We extracted a small subset of 500 24 b as measured by the matrix `1 norm (`1 ) (divided by Table 1: The average estimation error of A √ pK) and the Frobenius norm (`2 ) (divided by pK). Numbers in parentheses are the simulation standard errors. p 200 400 600 800 1000 n = 300 n = 500 n = 700 `1 `2 `1 `2 `1 `2 `1 `2 0.018 (0.001) 0.026 (0.002) 0.029 (0.002) 0.031 (0.002) 0.032 (0.002) 0.062 (0.005) 0.075 (0.007) 0.079 (0.006) 0.083 (0.006) 0.083 (0.006) 0.015 (0.001) 0.023 (0.001) 0.025 (0.001) 0.026 (0.001) 0.027 (0.001) 0.053 (0.003) 0.064 (0.003) 0.067 (0.003) 0.068 (0.004) 0.069 (0.003) 0.013 (0.001) 0.021 (0.001) 0.023 (0.001) 0.024 (0.001) 0.025 (0.001) 0.048 (0.008) 0.059 (0.006) 0.063 (0.003) 0.064 (0.004) 0.065 (0.004) 0.012 (0.001) 0.018 (0.001) 0.020 (0.001) 0.022 (0.001) 0.022 (0.001) 0.041 (0.002) 0.051 (0.003) 0.055 (0.003) 0.057 (0.004) 0.057 (0.004) 0.8 0.6 0.4 0.2 0.0 0.0 0.2 cluster TFPP TFNP DFPP DFNP recovery and error rates 0.4 0.6 0.8 1.0 p = 1000 1.0 p = 400 recovery and error rates n = 1000 300 400 500 600 700 800 900 300 400 500 600 700 800 900 sample size sample size Figure 1: Percentage of exact recovery of number of clusters K (cluster), total false positive proportion (TFPP), total false negative proportion (TFNP), direction false positive proportion (DFPP) and direction false negative proportion (DFNP) for LOVE. Ensembl genes to test the method. The goal of the benchmarking was to test whether (i) clusters corresponded to biological knowledge, specifically Gene Ontology (GO) functional annotation of the genes [Ashburner et al., 2000], (ii) overlapping clusters corresponded to pleiotropic gene function. LOVE produced twelve overlapping clusters (Table 2) which aligned well with a-priori expectation. 25 Table 2 lists the number of pure genes and the total number of genes in twelve overlapping clusters. Figure 2 shows that each cluster overlaps with the other and also gives us a clear picture on how two clusters possibly overlap. For example, 18 genes belong to both cluster 3 and cluster 11, whereas cluster 2 and cluster 3 have only one common gene. The genes with the same GO biological process, molecular function or cellular component terms tended to be assigned to the same cluster. For example, ENSG00000273906 and ENSG00000273328 are both RNA genes. They were both assigned to the same cluster (cluster 6, Figure 2). However, they were also assigned to other clusters, suggesting they have pleiotropic functions. This suggests that the latent variables used for clustering are likely to have biological significance and can potentially be used for functional discovery for genes with under-explored functions. We found 308 genes with zero expression across all samples. None of them were assigned to any of the 12 estimated clusters, as desired. Indeed, our model not only allows for the existence of pure noise variables Xj = Ej , but variables with structural zero values as well, as Γjj = Var(Ej ) = 0 is permitted. Formally we place them in the pure noise cluster G0 , for further scientific scrutiny. Table 2: Number of pure genes and total number of genes in each group. G1 G2 G3 G4 G5 G6 G7 G8 G9 G10 G11 G12 2 58 2 35 2 67 4 105 2 80 10 104 2 28 2 43 2 44 4 74 2 94 15 108 Number of pure genes Total number of genes 14 8 G67 G5 G3 10 11 6 9 7 6 15 Group size 13 28 18 35 10 5 43 1 6 G4 9 8 44 7 7 3 8 4 8 4 G2 11 G8 2 14 7 4 4 11 3 102 4 8 7 14 9 G7 4 1 80 94 3 10 3 1 74 6 14 7 2 67 9 5 4 58 G11 16 6 7 3 104 105 1 3 3 3 9 G9 G10 6 108 7 4 G1 5 G12 Figure 2: Left panel: Number of genes overlapped in different groups. The nodes represent 12 groups with the same labels and sizes as those in Table 2. The number shown on the edge between two nodes represents the number of genes shared by the two groups, which corresponds to the width of that edge. Right panel: Illustration of three genes ENSG00000273906, ENSG00000273328 and ENSG00000273113 and their allocation matrix relative to 12 groups. For instance, the jth gene bj6 = 0.04, A bj9 = 0.37, A bj11 = −0.02. ENSG00000273906 belongs to groups 6, 9 and 11 with A 26 Acknowledgements We are grateful to Jishnu Das for help with the interpretation of our data analysis results. Bunea and Wegkamp are supported in part by NSF grant DMS 1712709. Bing was supported in part by NSF grant DMS-1407600. Supplementary Material The supplementary materials contain the proofs and additional numerical results. References Anderson, T. (2003). An Introduction to Multivariate Statistical Analysis. Wiley Series in Probability and Statistics, Wiley. Anderson, T. W. and Amemiya, Y. (1988). The asymptotic normal distribution of estimators in factor analysis under general conditions. Ann. Statist. 16 759–771. Anderson, T. W. and Rubin, H. (1956). Statistical inference in factor analysis. In Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, Volume 5: Contributions to Econometrics, Industrial Research, and Psychometry. University of California Press, Berkeley, Calif. Arora, S., Ge, R., Halpern, Y., Mimno, D. M., Moitra, A., Sontag, D., Wu, Y. and Zhu, M. (2013). A practical algorithm for topic modeling with provable guarantees. In ICML (2). Ashburner, M., Ball, C. A., Blake, J. A., Botstein, D., Butler, H., Cherry, J. M., Davis, A. P., Dolinski, K., Dwight, S. S. and Eppig, J. T. (2000). Gene ontology: tool for the unification of biology. Nature genetics 25 25–29. Bai, J. and Li, K. (2012). Statistical analysis of factor models of high dimension. Ann. Statist. 40 436–465. Bai, J. and Ng, S. (2002). Determining the number of factors in approximate factor models. Econometrica 70 191–221. Bekker, P. A. and ten Berge, J. M. (1997). Generic global identification in factor analysis. Linear Algebra and its Applications 264 255 – 263. Sixth Special Issue on Linear Algebra and Statistics. Belloni, A., Rosenbaum, M. and Tsybakov, A. B. (2017). Linear and conic programming estimators in high dimensional errors-in-variables models. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 79 939–956. Best, M. G., Sol, N., Kooi, I., Tannous, J., Westerman, B. A., Rustenburg, F., Schellen, P., Verschueren, H., Post, E., Koster, J. et al. (2015). Rna-seq of tumoreducated platelets enables blood-based pan-cancer, multiclass, and molecular pathway cancer diagnostics. Cancer cell 28 666–676. Bezdek, J. C. (2013). Pattern recognition with fuzzy objective function algorithms. Springer Science & Business Media. 27 Bhattacharya, A. and Dunson, D. (2011). Sparse bayesian infinite factor models. Biometrika 98 291–306. Bien, J., Bunea, F. and Xiao, L. (2016). Convex banding of the covariance matrix. Journal of the American Statistical Association 111 834–845. Bing, X. and Wegkamp, M. H. (2018). Adaptive estimation of the rank of the coefficient matrix in high dimensional multivariate response regression models. ArXiv . Bittorf, V., Recht, B., Re, C. and Tropp, J. A. (2012). Factoring nonnegative matrices with linear programs. arXiv:1206.1270 . Bollen, K. A. (1989). Structural Equations with Latent Variables. Wiley. Bunea, F., Giraud, C. and Luo, X. (2016a). Minimax optimal variable clustering in g-models via cord. arXiv preprint arXiv:1508.01939 . Bunea, F., Giraud, C., Royer, M. and Verzelen, N. (2016b). Pecok: a convex optimization approach to variable clustering. arXiv preprint arXiv:1606.05100 . Bunea, F., She, Y. and Wegkamp, M. H. (2011). Optimal selection of reduced rank estimators of high-dimensional matrices. Ann. Statist. 39 1282–1309. Cai, T., Liu, W. and Luo, X. (2011). A constrained 1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association 106 594–607. Cai, T. T., Liu, W. and Zhou, H. H. (2016). Estimating sparse precision matrix: Optimal rates of convergence and adaptive estimation. Annals of Statistics 44 455–488. Candès, E. J., Li, X., Ma, Y. and Wright, J. (2011). Robust principal component analysis? Journal of the ACM (JACM) 58 11. Carvalho, C. M., Chang, J., Lucas, J. E., Nevins, J. R., Wang, Q. and West, M. (2008). High-dimensional sparse factor modeling: Applications in gene expression genomics. Journal of the American Statistical Association 103 14381456. Chandrasekaran, V., Parrilo, P. A. and Willsky, A. S. (2012). Latent variable graphical model selection via convex optimization. Ann. Statist. 40 1935–1967. Chandrasekaran, V., Sanghavi, S., Parrilo, P. A. and Willsky, A. S. (2011). Ranksparsity incoherence for matrix decomposition. SIAM J. Optim. 21 572–596. Craddock, R. C., James, G. A., Holtzheimer, P. E., Hu, X. P. and Mayberg, H. S. (2012). A whole brain fmri atlas generated via spatially constrained spectral clustering. Human brain mapping 33 1914–1928. Craddock, R. C., Jbabdi, S., Yan, C.-G., Vogelstein, J. T., Castellanos, F. X., Di Martino, A., Kelly, C., Heberlein, K., Colcombe, S. and Milham, M. P. (2013). Imaging human connectomes at the macroscale. Nature methods 10 524–539. Donoho, D. and Stodden, V. (2004). When does non-negative matrix factorization give a correct decomposition into parts? In Advances in Neural Information Processing Systems 16 (S. Thrun, L. K. Saul and P. B. Schölkopf, eds.). MIT Press, 1141–1148. Everitt, B. (1984). An Introduction to Latent Variable Models. Monographs on Statistics and Applied Probability. Springer. Fan, J., Liao, Y. and Mincheva, M. (2013). Large covariance estimation by thresholding prin- 28 cipal orthogonal complements. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 75 603–680. Friedman, J., Hastie, T. and Tibshirani, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics 9 432–441. Gautier, E. and Tsybakov, A. B. (2011). High-dimensional instrumental variables regression and confidence sets. arXiv preprint arXiv:1105.2454v4 1105.2454. Geweke, J. and Zhou, G. (1996). Measuring the pricing error of the arbitrage pricing theory. The review of financial studies 9 557–587. Hsu, D., Kakade, S. M. and Zhang, T. (2011). Robust matrix decomposition with sparse corruptions. IEEE Trans. Inform. Theory 57 7221–7234. Izenman, A. J. (2008). Modern Multivariate Statistical Techniques: Regression, Classification, and Manifold Learning. Series: Springer Texts in Statistics. Jiang, D., Tang, C. and Zhang, A. (2004). Cluster analysis for gene expression data: A survey. IEEE Transactions on knowledge and data engineering 16 1370–1386. Koopmans, T. C. and Reiersol, O. (1950). The identification of structural characteristics. Ann. Math. Statist. 21 165–181. Krishnapuram, R., Joshi, A., Nasraoui, O. and Yi, L. (2001). Low-complexity fuzzy relational clustering algorithms for web mining. IEEE transactions on Fuzzy Systems 9 595–607. Lawley, D. N. and Maxwell, A. E. (1971). Factor analysis as a statistical method. 2nd ed. American Elsevier Publishing Co., Inc., New York. Ledermann, W. (1937). On the rank of the reduced correlational matrix in multiple-factor analysis. Psychometrika 2 85–93. McDonald, R. P. (1999). Test theory: a unified treatment. Taylor and Francis. Meinshausen, N. and Bühlmann, P. (2006). High-dimensional graphs and variable selection with the lasso. Annals of Statistics 1436–1462. Rigollet, P. and Tsybakov, A. (2011). Exponential screening and optimal rates of sparse estimation. Ann. Statist. 39 731–771. Rubin, D. B. and Thayer, D. T. (1982). Em algorithms for ml factor analysis. Psychometrika 47 69–76. Shapiro, A. (1982). Rank-reducibility of a symmetric matrix and sampling theory of minimum trace factor analysis. Psychometrika 47 187–199. Shapiro, A. (1985). Identifiability of factor analysis: some results and open problems. Linear Algebra and Its Applications 70 1–7. Tsybakov, A. B. (2009). Introduction to Nonparametric Estimation. Springer, New York. Wegkamp, M. and Zhao, Y. (2016). Adaptive estimation of the copula correlation matrix for semiparametric elliptical copulas. Bernoulli 22 1184–1226. Wiwie, C., Baumbach, J. and Röttger, R. (2015). Comparing the performance of biomedical clustering methods. Nature methods 12 1033–1038. Yuan, M. and Lin, Y. (2007). Model selection and estimation in the gaussian graphical model. Biometrika 94 19–35. 29 A A.1 Appendix Proofs of the results from Section 2 We begin by stating and proving two lemmata that are crucial for the main results of this section. All results are proved under the condition that model 1 and (i) - (iii) hold. Lemma 7. For any a ∈ [K] and i ∈ Ia , we have (a) |Σij | = Caa for all j ∈ Ia , (b) |Σij | < Caa for all j 6∈ Ia . Proof. For given i ∈ [p], we define the set s(i) := {1 ≤ a ≤ K : Aia 6= 0}. For any i ∈ Ia and j 6= i, we have |Σij | = = X Aia a∈s(i) X X Ajb Cab b∈s(j)  Ajb Cab from the definition of Ia b∈s(j) ≤ X b∈s(j) |Ajb | · max |Cab | b∈s(i) ≤ Caa using conditions (i) and (iii). Furthermore, using conditions (i) and (iii), we observe that we have equality in the above display for j ∈ Ia , and strict inequality for j 6∈ Ia , which proves the lemma. Lemma 8. We have (a) Si ∩ I 6= ∅, for any i ∈ [p], (b) Si ∪ {i} = Ia and Mi = Caa , for any i ∈ Ia and a ∈ [K], where Mi and Si are defined in (4) and (5), respectively. Proof. Lemma 7 implies that, for any i ∈ Ia , Mi = Caa and Si = Ia \ {i}, which proves part (b). From the result of part (b), it remains to show Si ∩ I 6= ∅ for any i ∈ / I. Let i ∈ / I be fixed. We have ! X X (41) Ajb Aia Cab Mi = max |Σij | = max j6=i ≤ max max j6=i b∈s(j) j6=i X b∈s(j) a∈s(i) Aia Cab = max j6=i a∈s(i) P X Aia Cab∗ a∈s(i) for some b∗ ∈ [K]. A direct computation yields |Σij | = | a∈s(i) Aia Cab∗ | for any j ∈ Ib∗ , that is, the maximum Mi of |Σij | is achieved at all j ∈ Ib∗ . Since Ib∗ 6= ∅ by condition (ii), this completes the proof of claim (a). 30 Proof of Theorem 1. We have all the necessary ingredients to proceed with the proof of the main result of this section. Proof of (a). We first show the sufficiency part. Consider any i ∈ [p] with Mi = Mj for all j ∈ Si . Part (a) of Lemma 8 states that there exists a j ∈ Ia ∩ Si for some a ∈ [K]. For this j ∈ Ia , we have Mj = Caa from part (b) of Lemma 8. Invoking our premise Mj = Mi as j ∈ Si , we conclude that Mi = Caa , that is, maxk6=i |Σik | = Caa . By Lemma 7, the maximum is achieved for any pair i, k ∈ Ia . However, if i 6∈ Ia , we have that |Σik | < Caa for all k 6= i. Hence i ∈ Ia and this concludes the proof of the sufficiency part. It remains to prove the necessity part. Let i ∈ Ia for some a ∈ [K] and j ∈ Si . Lemma 8 implies that j ∈ Ia and Mi = Caa . Since j ∈ Si , we have |Σij | = Mi = Caa , while j ∈ Ia yields |Σjk | ≤ Caa for all k 6= j, and |Σjk | = Caa for k ∈ Ia , as a result of Lemma 7. Hence, Mj = maxk6=j |Σjk | = Caa = Mi for any j ∈ Si , which proves our claim. Proof of (b). We start with the following constructive approach. Let N = [p] be the set of all variable indices and O = ∅. Let Mi and Si be defined in (4) and (5), respectively. (1) Choose i ∈ N and calculate Si and Mi . (a) If Mi = Mj , for all j ∈ Si , set I (i) := Si ∪ {i}, O = O ∪ {i} and N = N \ I (i) . (b) Otherwise, replace N by N \ {i}. (2) Repeat step (1) until N = ∅. We show that {I (i) : i ∈ O} = I. Let i ∈ O be arbitrary fixed. By (a), we have i ∈ I. Thus, there exists a ∈ [K] such that i ∈ Ia . By Lemma 8, i ∈ Ia implies Ia = Si ∪ {i} = I (i) . On the other hand, let a ∈ [K] be arbitrary fixed. By condition (ii), there exists at least one j ∈ Ia . Once again, by part (b) of Lemma 8, if j ∈ Ia , then Sj ∪ {j} = Ia , that is, I (j) = Ia . Proof of Theorem 2 Theorem 1 shows that Σ uniquely defines I and its partition I, up to permutation of labels. Given I and its partition I = {I1 , . . . , IK }, for any i ∈ I, there exists a unique 1 ≤ a ≤ K such that i ∈ Ia . Then we set |Ai· | = ea , the canonical basis vector in RK that contains 1 in position a and is zero otherwise. Thus, the |I| × K matrix AI with rows Ai· is uniquely defined up to multiplication with a signed permutation matrix P . We show below that AJ is also identifiable up to a signed permutation matrix. We begin by observing that, for each i ∈ Ik , for some k ∈ [K], and any j ∈ J, Model 1 implies X X X Σij = Aia Ajb Ckb = Aik Ajb Ckb a∈s(i) b∈s(j) and since A2ik = 1, we obtain b∈s(j) T Aik Σij = Ck· Aj· 31 and, after averaging over all i ∈ Ik , T Ck· Aj· = 1 X Aik Σij . |Ik | i∈Ik Repeating this for every k ∈ [K], we obtain the formula  T X X 1 1 CAj· =  Ai1 Σij , . . . , AiK Σij  := θj . |I1 | |IK | i∈I1 i∈IK The covariance matrix C can be uniquely constructed from Σ via 1 |Ia |(|Ia | − 1) Caa = for any a ∈ [K], and 1 |Ia ||Ib | Cab = X X i,j∈Ia ,i6=j |Σij | Aia Ajb Σij i∈Ia ,j∈Ib for a, b ∈ [K] with a 6= b. Notice that mina∈[K] |Ia | ≥ 2, which is part of our model requirement (ii), is needed for the construction of Caa . Since the covariance matrix C is assumed to be positive definite, Aj· = C −1 θj , for each j ∈ J, which shows that AJ can be determined uniquely from Σ up to a signed permutation. Therefore, AJ is identifiable which concludes the proof. A.2 Proofs of the results from Section 4.1 The proof of Theorem 3 will repeatedly use Lemma 9, stated and proved below. Let ci := max |Σ b ij |. M j∈[p]\{i} (42) Lemma 9. Under the conditions in Theorem 3, for any i ∈ Ia with some a ∈ [K], the following inequalities hold on the event E: b ij | − |Σ b ik | ≤ 2δ, |Σ b ij | − |Σ b ik | > 2δ, |Σ b ij | − |Σ b ik | < 2δ, |Σ For any i ∈ J1a , we have for all j, k ∈ Ia \ {i} and j 6= k; (43) for all j ∈ Ia \ {i}, k ∈ / (Ia ∪ J1a ); (44) for all j ∈ J1a and k ∈ Ia \ {i}. ci − |Σ b ij | ≤ 2δ, M for any j ∈ Ia . (45) (46) Proof of Lemma 9. For the entire proof, we work on the event E defined in (23). To prove (43), we observe that, for any i, j, k ∈ Ia , Σij = Σik = Caa by Lemma 7, whence b ij | − |Σ b ik | |Σ ≤ |Σij | − |Σik | + 2δ = 2δ. 32 To prove (44), we first observe that, for any j ∈ Ia , |Σij | = Caa by Lemma 7, whence E b ij | ≥ Caa − δ. |Σ Next, we notice that, for any ` ∈ [p], |Σi` | = K X A`b Cab = A`a Caa + b=1 (iii) X (47) A`b Cab b6=a ≤ |A`a |Caa + (1 − |A`a |)(Caa − ν) = Caa − (1 − |A`a |)ν. (48) For any j ∈ Ia and k ∈ [p] \ (Ia ∪ J1a ), the definition of J1 implies |Aka | ≤ 4δ/ν, hence (48) E b ik | ≤ |Σik | + δ ≤ Caa − (1 − |Aka |)ν + δ ≤ Caa − ν + 5δ, |Σ so that E b ij | − |Σ b ik | ≥ |Σij | − δ − |Σ b ik | ≥ |Σij | − Caa + ν − 6δ > 2δ, |Σ by using ν > 8δ · (kCk∞ /ν) ≥ 8δ. To prove (45), observe that, for any j ∈ J1a and k ∈ Ia \ {i}, (48) E b ij | ≤ Caa − (1 − |Aja |)ν + δ < Caa + δ = |Σik | + δ ≤ |Σ b ik | + 2δ. |Σ So far, we have proved (43) - (45) and it remains to show (46). For any i ∈ J1a , we have, for some c ∈ [K], E ci ≤ max |Σik | + δ (41) M = k∈[p]\i K X b=1 (∗) Aib Cbc + δ ≤ K X b=1 E b ij | + 2δ. Aib Cba + δ = |Σij | + δ ≤ |Σ It remains to show that inequality (∗) holds, for any c 6= a. On the one hand, we have K X b=1 (iii) Aib Cbc ≤ |Aia ||Cac | + (1 − |Aia |)Ccc ≤ |Aia |(Caa − ν) + (1 − |Aia |)Ccc , while on the other hand, we find K X b=1 (iii) Aib Cab ≥ |Aia ||Caa | − (1 − |Aia |)(Caa − ν). Combining the preceding two display yields K X b=1 Aib Cab − K X b=1 Aib Cbc ≥ ν − (1 − |Aia |)(Caa + Ccc ). The term on the right is positive, since condition (28) guarantees that 4δ (Caa + Ccc ) ≥ (1 − |Aia |)(Caa + Ccc ), ν where the last inequality is due to the definition of J1 . This concludes the proof. ν> 33 Lemma 9 remains valid under the conditions of Remark 2 in which case J1 = ∅ and we only need ν > 4δ to prove (44). Proof of Theorem 3. We work on the event E throughout the proof. Without loss of generality, we assume that the label permutation π is the identity. We start by pointing out that the following three claims are sufficient to prove (a) - (c). Let Ib(i) be defined in step 4 of Algorithm 1. (1) For any i ∈ J \ J1 , we have P ure(i) = F alse. (2) For any i ∈ Ia and a ∈ [K], we have P ure(i) = T rue, Ia ⊆ Ib(i) and Ib(i) \ Ia ⊆ J1a . (3) For any i ∈ J1a and a ∈ [K], we have Ia ⊆ Ib(i) . If we can prove these claims, then (1) implies that none of variables in J \ J1 will be selected in any set of Ib via i ∈ J \ J1 . (2) implies that for any a ∈ [K], there exists Iba such that Ia ⊆ Iba and Iba \ Ia ⊆ J1a . Moreover, this together with Merge in Algorithm 1 prevents Iba from selecting any variable from [p] \ (Ia ∪ J1a ). Finally, (3) guarantees that none of pure variables will be excluded b = K and Ib = {Ib1 , . . . , IbK } is the desired partition. by any i ∈ J1 in the Merge step. Thus, K Therefore, in the following we proceed to prove (1) - (3). To prove (1), let i ∈ J \ J1 be fixed. We first prove that P ure(i) = F alse when Ib(i) ∩ I 6= ∅. It suffices to show that, there exists j ∈ Ib(i) such that the following does not hold cj − |Σ b ij | ≤ 2δ. M (49) Let Ib(i) ∩ I 6= ∅, so there exists j ∈ Ib ∩ Ib(i) for some b ∈ [K]. For such j, we have |Σij | = P | K a=1 Aia Cab | and E b ij | ≤ |Σ K X a=1 (iii) Aia Cab + δ ≤ |Aib |Cbb + (1 − |Aib |)(Cbb − ν) + δ < Cbb − 3δ, (50) using the definition of J1 to justify the last inequality. On the other hand, since j ∈ Ib , part (b) of Lemma 8 implies E cj = max |Σ b jk | ≥ max |Σjk | − δ = Cbb − δ. M (51) k∈[p]\{i} k∈[p]\{i} cj − |Σ b ij | > 2δ. This shows that for any i ∈ J \ J1 , if Ib(i) ∩ I 6= ∅, Combining (50) with (51) gives M then P ure(i) = F alse. Therefore, to complete the proof of (1), we show Ib(i) ∩ I = ∅ is impossible when i ∈ J \ J1 under our assumptions. If Ib(i) ∩ I = ∅, then there exists some j ∈ J ∩ Ib(i) and |Σij | = K X K X b=1 a=1 Aia Ajb Cab ≤ max 1≤b≤K K X Aia Cab = a=1 K X a=1 Aia Cab∗ = |Σik | for some b∗ ∈ [K] and any k ∈ Ib∗ (the set Ib∗ is non-empty by condition (ii)). Therefore, E b ij | − |Σ b ik | ≤ |Σij | − |Σik | + 2δ |Σ 34 ≤ 2δ However, since Ib(i) ∩ I = ∅ and k ∈ Ib∗ , we know k ∈ / Ib(i) , which implies b ij | − |Σ b ik | > 2δ, |Σ from Step 4 of Algorithm 1. The last two displays contradict each other, and we conclude that, for any i ∈ J \ J1 , Ib(i) ∩ I 6= ∅. To prove (2), let i ∈ Ia be arbitrarily fixed with some a ∈ [K]. We first show that P ure(i) = T rue. From steps 7 - 8 of Algorithm 1, it suffices to show that, for any j ∈ Ib(i) , (49) holds. From (44) in Lemma 9, given Step 4 of Algorithm 1, we know that, for any j ∈ Ib(i) , j ∈ Ia ∪ J1a . Thus, we cj is achieved by write Ib(i) = (Ib(i) ∩ Ia ) ∪ (Ib(i) ∩ J1a ). For any j ∈ Ib(i) ∩ Ia , by the same reasoning, M a some element in either Ia or J1 . For both cases, since i, j ∈ Ia and i 6= j, (43) and (45) in Lemma 9 guarantee that (49) holds. On the other hand, for any j ∈ Ib(i) ∩ J1a , (46) in Lemma 9 implies that (49) still holds. Thus, we have shown that, for any i ∈ Ia , P ure(i) = T rue. To show Ia ⊆ Ib(i) , ci can only be achieved by indices in Ia ∪ J a . In both cases, let any j ∈ Ia \ {i} and observe that M 1 (i) (43) and (45) imply j ∈ Ib . Thus, Ia ⊆ Ib(i) . Finally, Ib(i) \ Ia ⊆ J1a follows immediately from (44). We conclude the proof by noting that (3) immediately follows from (46). A.3 Proofs of the results from Section 4.2 We divide the proof of Theorem 4 into three steps: bI aligns Step 1. We show that there exists a signed permutation Pb such that the columns of A with those of AI in terms of label and sign, as detailed in Lemma 10; bb − Ā b; Step 2. We write Ā = APb, and prove first the error bounds for A I I b b b Step 3. We prove the error bounds for A − Ā = A − AP , with the same Pb, which further implies b and A. that Pb aligns the columns of A Lemma 10. Under conditions of Theorem 4, there exists a signed permutation matrix Q such that bia ) for any i ∈ Iba with each a ∈ [K]. Ā = AQ satisfies that sign(Āia ) = sign(A b = K, I ⊆ Ib ⊆ I ∪ J1 and Iπ(a) ⊆ Iba ⊆ Iπ(a) ∪ J π(a) , Proof of Lemma 10. Theorem 3 guarantees K 1 with high probability, for any a ∈ [K] and some label permutation π. Let us write Q = Q1 Q2 , with bI , the unsigned permutation matrix Q1 which relabels the columns of AI according to those of A and with Q2 = diag(q1 , . . . , qK ) with qa ∈ {+1, −1} for each a ∈ [K]. q = AQ1 , we proceed to show that, for each a ∈ [K], sign(A qia ) · qa holds bia ) = sign(A Denoting A π(a) b b for any i ∈ Ia , in which case each qa can be uniquely constructed. Since Ia ⊆ Iπ(a) ∪ J1 , it suffices to prove that, for any a ∈ [K], bja ) bia ) sign(A sign(A = , qia ) qja ) sign(A sign(A π(a) for any i, j ∈ Iπ(a) or i, j ∈ J1 with i 6= j. (52) bI , for any i, j ∈ Iπ(a) or i, j ∈ J π(a) , we From the definition of AI and the way we construct A 1 consider the following two cases: qia ) = sign(A qja ). To show A bia = A bja , from (6), If sign(Aiπ(a) ) = sign(Ajπ(a) ), this implies sign(A 1 2 b b b we need to show i, j ∈ Ia or i, j ∈ Ia which is equivalent to show Σij > 0. For any i, j ∈ Iπ(a) or 35 P π(a) i, j ∈ J1 with i 6= j, display (26) gives |Akπ(a) | ≥ 1 − 4δ/ν and b6=π(a) |Akb | ≤ 4δ/ν, for k = i, j. Thus, using sign(Aiπ(a) ) = sign(Ajπ(a) ), we have X X X Σij = Aiπ(a) Ajπ(a) Cπ(a)π(a) + Aiπ(a) Ajc Cπ(a)c + Ajπ(a) Aib Ajc Cbc Aib Cπ(a)b + c6=a b6=a b,c6=π(a) (iii) ≥ Aiπ(a) Ajπ(a) Cπ(a)π(a) − |Aiπ(a) |(1 − |Ajπ(a) |)(Cπ(a)π(a) − ν) X Aib Ajc Cbc − |Ajπ(a) |(1 − |Aiπ(a) |)(Cπ(a)π(a) − ν) −  b,c6=π(a) 2   8δ 16δ 2 4δ 4δ ≥ 1− Cπ(a)π(a) − Cπ(a)π(a) − 2 Cb∗ b∗ + 8δ, · 1− ν ν ν ν   2 2 16δ 16δ 48δ ≥ 1+ 2 − Cπ(a)π(a) − 2 Cb∗ b∗ + 8δ. ν ν ν for some b∗ 6= π(a) b ij ≥ Σij − δ > 3δ > 0. Since (28) implies 8δCb∗ b∗ < ν 2 and ν > 8δ, on the event E, we have Σ qia ) 6= sign(A qja ). Similarly, to show A bia 6= A bja , If sign(Aiπ(a) ) 6= sign(Ajπ(a) ), this gives sign(A b ij < 0. Using the same arguments yields we prove Σ E b kl ≤ Σkl + δ < −3δ < 0. Σ Therefore, given Ib = {Iba }a∈[K] , we can construct the signed permutation Pb = Q which alligns the bI . columns of AI with those of A For ease of notation and without loss of generality, we make the blanket assumption that the signed permutation Pb is the identity so that Ā = A for the remainder of the proof. We note that the signed permutation Pb will be the same when estimating each row Aj· for j ∈ J. bb and parts (a) - (c) in Theorem 3, we can write, for Proof of step 2: From the construction of A I each a ∈ [K], Iba = Ia ∪ La with La := Iba ∩ J1a . For any i ∈ Iba , the definitions of I and J1a imply bia ), we have |Aia | ≥ 1 − 4δ/ν. Since Lemma 10 guarantees that sign(Aia ) = sign(A bb − A bk∞ = max kA bi. − Ai. k∞ ≤ 4 δ. kA I I ν b i∈I b we have Let si = kAi· k0 for i ∈ [p]. Then, for any i ∈ I, bj· − Āj· A q ≤ 4 1/q s δ, ν i 1 ≤ q ≤ ∞. For Step 3 of the proof of Theorem 4, we will make use of the results of Lemmas 11 and 12, stated here first and proved at the end of this section, in order to preserve the flow of the presentation. Lemma 11. Under the conditions of Theorem 4, on the event E, we have where δ 0 is given in (29). b − Ck∞ ≤ 2δ 0 , kC max kθbj − θj k∞ ≤ δ 0 , j∈Jb 36 (53) Lemma 12. Under the conditions of Theorem 4, on the event E, we have βaj = 0 implies βbaj = 0, b for any j ∈ Jb and a ∈ [K]. b recall that β j = C −1 θj = Ωθj since C is invertible. Also recall Proof of Step 3. For each j ∈ J, b θbj . We first show kβ̄ j − β j k∞ ≤ 5kΩk∞,1 δ 0 . For notational convenience, we remove all that β̄ j = Ω the super indices. From Lemma 11, the following event ( ) b − Ck∞ ≤ 2δ 0 , max kθbj − θj k∞ ≤ δ 0 , E 0 = kC j∈Jb is implied by the event E = Eδ . On the event E 0 , the true Ω := C −1 satisfies the constraint since b − Ik∞ = kΩ(C b − C)k∞ ≤ kC b − Ck∞ kΩk∞,1 ≤ 2δ 0 kΩk∞,1 . kΩC b Then the pair (kΩk∞,1 , Ω) of (t, Ω) is feasible. Consequently, the optimality and feasibility of (b t, Ω) imply b ∞,1 ≤ b bC b − Ik∞ ≤ 2δ 0 b t ≤ 2δ 0 kΩk∞,1 . (54) kΩk t ≤ kΩk∞,1 , kΩ Then, on the event E 0 , we obtain b θb − Ωθ b + Ωθ b − βk∞ kβ̄ − βk∞ = kΩ b ∞,1 kθb − θk∞ + kΩθ b − βk∞ ≤ kΩk b ∞,1 + kΩCβ b ≤ δ 0 kΩk − βk∞ 0 b − Ik∞ kβk1 ≤ δ kΩk∞,1 + kΩC bC b − Ik∞ + kΩ bC b − ΩCk b ∞ ≤ δ 0 kΩk∞,1 + kΩ b ∞,1 kC b − Ck∞ ≤ 3δ 0 kΩk∞,1 + kΩk (since kβk1 ≤ 1) ≤ 5δ 0 kΩk∞,1 . The feasibility of βbj implies that kβbj − β̄ j k∞ ≤ µ. By the triangle inequality, we obtain kβbj − β j k∞ ≤ kβbj − β̄ j k∞ + kβ̄ j − β j k∞ ≤ 2µ, b = K on the event E gives since µ = 5δ 0 kΩk∞,1 . Then following from Lemma 12 and using K bj· − Aj· kq = kA K X a=1 |βbaj − βaj |q !1/q  = X a∈sj 1/q |βbaj − βaj |q  1/q ≤ 2sj µ, for any 1 ≤ q ≤ ∞. This completes the proof of the last step and of Theorem 4. To conclude this section we give below the proofs of the intermediary results used in the proof. 37 b = K. Then, from the definition of C baa , Proof of Lemma 11. On the event E, we showed that K we have X 1 baa − Caa | ≤ max b ij | − Caa max |C |Σ 1≤a≤K 1≤a≤K |Iba |(|Iba | − 1) b i,j∈Ia ,i6=j E ≤ δ+ 1 |Iba |(|Iba | − 1) X i,j∈Iba ,i6=j |Σij | − Caa . Theorem 3 states that, on the event E, Iba = Ia ∪ La where La = Iba ∩ J1a , for any a ∈ [K]. Therefore, we consider the following three cases: (1) For any i, j ∈ Ia and i 6= j, Lemma 7 implies |Σij | − Caa = 0. (2) For any i ∈ Ia and j ∈ La , the definition of J1a gives  8δ |Σij | − Caa ≤ 1 − |Aja | (2Caa − ν) ≤ kCk∞ − 4δ. ν P (3) For any i, j ∈ La and i 6= j, since i, j ∈ J1a , we know |Aka | ≥ 1 − 4δ/ν and b6=a |Akb | ≤ 4δ/ν, for k = i, j. Thus, X X X  |Σij | − Caa ≤ 1 − |Aia ||Aja | Caa + |Aia | |Ajc ||Cac | + |Aja | |Aib ||Cab | + |Aib Ajc |Cbc c6=a b6=a b,c6=a  ≤ 1 − |Aia ||Aja | Caa + |Aia |(1 − |Aja |)(Caa − ν) + |Aja |(1 − |Aib |)(Caa − ν) + (1 − |Aib |)(1 − |Ajc |)Cb∗ b∗ (for some b∗ 6= a) "   # 4δ 2 8δ 16δ 2 ≤ 1− 1− Caa + (Caa − ν) + 2 Cb∗ b∗ ν ν ν ≤ 16δ kCk∞ − 8δ, ν (by the definition of J1 ) (by (28)). Therefore, by combining cases (1) - (3), we have baa − Caa | ≤ δ + |Ia ||La | + |La |(|La | − 1) · max |C 1≤a≤K |Iba |(|Iba | − 1)   16 ≤ kCk∞ − 7 δ. ν  16δkCk∞ − 8δ ν  where the last inequality comes from that |La | + |Ia | = |Iba |. For the off-diagonal entries, since bia ) = sign(Aia ), for any i ∈ Ib and a ∈ [K], we have sign(A max 1≤a,b≤K,a6=b bab − Cab | ≤ δ + |C we consider the following three cases: 38 1 |Iba ||Ibb | X i∈Iba ,j∈Ibb |Σij | − |Cab | , (1) For any i ∈ Ia , j ∈ Ib , we have |Σij | − |Cab | = 0. (2) For any i ∈ Ia , j ∈ J1b , we have |Σij | − |Cab | ≤ (1 − |Ajb |)|Cab | + (3) For any i ∈ J1a , j ∈ J1b , we obtain Σij = Aia Ajb Cab + Aia X X c6=b |Ajc ||Cac | ≤ Ajd Cad + d6=b X 8δ kCk∞ − 4δ. ν Aic c6=a X Ajd Ccd . d∈s(j) Thus, ≤ (1 − |Aia ||Ajb |)|Cab | + |Aia |(1 − |Ajb |)kCk∞ + (1 − |Aia |)kCk∞     8δ 16δ 2 8δ 16δ 2 ≤ − 2 (Caa − ν) + − 2 kCk∞ ν ν ν ν 16δ ≤ kCk∞ − 8δ. (by ν < kCk∞ ) ν |Σij | − |Cab | Therefore, combining the three cases gives bab − Cab | ≤ δ + |Ia ||Lb | + |La ||Ib | + 2|La ||Lb | · max |C 1≤a,b≤K,a6=b 2|Iba ||Ibb |   16 kCk∞ − 7 δ. ≤ ν  16δkCk∞ − 8δ ν  Combining the diagonal and off-diagonal cases yields   16 b kC − Ck∞ ≤ kCk∞ − 7 δ ≤ 2δ 0 ν bia ) for any i ∈ I, b we obtain We now proceed to bound maxj∈Jb kθbj − θj k∞ . From sign(Aia ) = sign(A max kθbj − θj k∞ ≤ δ + j∈Jb X 1 X Σij − Ajb Cab . a∈[K],j∈Jb |Iba | max i∈Iba P b∈s(j) Since for any i ∈ Ia and any j ∈ J, Σij = b∈s(j) Ajb Cab , we focus on the case when i ∈ La . For any i ∈ La and j ∈ J, (41) yields X X X X Ajb Cab − Σij = (1 − Aia ) Ajb Cab − Aic Ajb Cbc , b∈s(j) b∈s(j) c6=a b∈s(j) which, by the definition of J1 , implies X b∈s(j) Ajb Cab − Σij ≤ (1 − |Aia |)|Ajd ||Cad | + (1 − |Aia |)|Ajd0 ||Cad0 | (for some d, d0 ∈ [K]) ≤ 4δ 8δ (2kCk∞ − ν) ≤ kCk∞ − 4δ. ν ν 39 Since we have Jb ⊆ J, we have |La | · max kθbj − θj k∞ ≤ δ + max a |Iba | j∈Jb     8 8 kCk∞ − 4 δ ≤ kCk∞ − 3 δ = δ 0 , ν ν which concludes the proof of Lemma 11. Proof of Lemma 12. Let j ∈ Jb be arbitrarily fixed and βbj be the optimal solution of (16) with µ = 5kΩk∞,1 δ 0 . For simplicity, we remove the super indices. Starting with the following KarushKuhn-Tucker condition: subject to we obtain sign(βba ) + λa sign(βba − β̄a ) = 0, λa (|βba − β̄a | − µ) = 0, λa ≥ 0, for a = {1, . . . , K},     (56) b b b b b 0 = sign(βa ) βa − β̄a + λa βa − β̄a = sign(βa ) βa − β̄a + λa µ, (55) (56) (57) by multiplying both sides of (55) by βba − β̄a . In what follows we prove that if βa = 0, for some a, then βba = 0. Since this is true when λa = 0 from (55), we only consider when λa 6= 0. Note this implies |βba − β̄a | = µ from (56). If we assume βba > 0, then (57) gives β̄a − βba = λa µ. Since |βba − β̄a | = µ, we further obtain λa = 1 and β̄a = µ + βba > µ. (58) Recall that kβ − β̄k∞ ≤ µ. This implies β̄a ≤ µ + |βa | = µ, which contradicts (58), so βba cannot be strictly positive. Similarly, βba < 0 cannot hold based on similar arguments. Thus, βba = 0 from b which we conclude supp(βbj ) ⊆ supp(β j ) for any j ∈ J. Proof of Theorem 5. First we construct a set of “hypotheses” of A. Let M := {v ∈ {0, 1}K : dH (0, v) = s} where dH (·) denotes the Hamming distance between two binary vectors. Following Lemma A.3 in Rigollet and Tsybakov [2011] when s ≤ 4K/5, there exists M0 ⊂ M such that, for any w(i) 6= w(j) ∈ M 0 ,   dH w(i) , w(j) > s/16, (59) and log |M0 | ≥ c0 s log(K/s), 40 (60) for some constant c0 > 0. We let w(0) = (0, . . . , 0) ∈ RK . Then, we choose # " B T ∈ Rp×K , for each j = 0, 1, . . . , |M0 |, A(j) = η w(j) where and   B1    B2  (p−1)×K  B= .  , ∈R  ..  BK η= r   eT  kT  ek  |Ik |×K  Bk =  , for k ∈ [K],  ..  ∈ R . eTk c0 c1 8 r log(1 + K/s) . n (61) (62) (63) 2 with some constant c1 = σmin ∧ 1. We use ek to denote the canonical basis of K dimensional space and 0 to denote the zero vector. Note that, for each Bk , the only non-zero values are at the kth P (j) with only one column. By specifying as above, we choose K k=1 |Ik | = p − 1 and consider the A non-pure row. It is easy to verify that A(j) ∈ A for each j = 0, 1, . . . , |M0 | under (31). We denote by KL(P, Q) the Kullback-Leibler divergence between two probability distributions P and Q. In order to apply Theorem 2.5 in Tsybakov [2009] to prove (32), for fixed α ∈ (0, 1/8), we need to check the following three conditions: (a) KL(PA(i) , PA(0) ) ≤ α log |M0 |, for each i = 1, . . . , |M0 |. (b) For any 0 ≤ i < j ≤ |M0 |, with some constant c0 > 0, r   log(K/s) 0 1/q (i) (j) ≥cs . Lq A , A n (c) Lq ( · ) satisfies the triangle inequality. To show (a), note that X ∼ N (0, ACAT + Γ) from Z ∼ N (0, C = IK ). Invoking Lemma 14 gives   nη 2 s 1 ≤ KL PA(i) , PA(0) ≤ log |M 0 |, for any i = 1, . . . , |M 0 |, (64) 2 16 2σmin 2 by using (60), (63) and c1 = σmin ∧ 1. To prove (b), for any i = 1, . . . , |M0 |, observe that   Lq A(i) , A(0) = ηkw(i) kq = s1/q η and, for any i 6= j different from 0,   Lq A(i) , A(j) = ηkw(i) − w(j) kq ≥ (s/16)1/q η ≥ (s1/q η)/16, by using (59). Combining these two and using the expression of η yield r   log(K/s) (i) (j) 0 1/q , Lq A , A ≥cs n 41 (65) for 0 ≤ i < j ≤ |M0 |. e A) b Finally, we verify (c) by showing that Lq (·) satisfies the triangle inequality. Consider (A, A, and observe that e = Lq (A, A) = ≤ = e ∞,q min kAP − Ak P ∈HK e ∞,q min kAP − AQk   b ∞,q + kA b − AQk e ∞,q min kAP − Ak P,Q∈HK P,Q∈HK b ∞,q + min kA b − AQk e ∞,q min kAP − Ak P ∈HK Q∈HK b + Lq (A, e A). b = Lq (A, A) Therefore, we conclude the proof of (32) by invoking the Theorem 2.5 in Tsybakov [2009]. Lemma 13. (Sherman-Morrison formula) Suppose M ∈ Rn×n is an invertible square matrix and u, v ∈ Rn are column vectors. Then M + uv T is invertible if and only if 1 + v T M −1 u 6= 0. If M + uv T is invertible, then its inverse is given by (M + uv T )−1 = M −1 − M −1 uv T M −1 . 1 + v T M −1 u Lemma 14. Assume model (1) and (Z, E) ∼ N (0, diag(IK , Γ)). Let A(0) and A(i) be constructed as (61) and (62), for any 1 ≤ i ≤ M 0 with M 0 satisfying (60). Let PA(0) and PA(i) be the probability densities of X parametrized by A(0) and A(i) , respectively. Then we have KL (PA(i) , PA(0) ) ≤ nη 2 s 2 , 2σmin (66) 2 where σmin = min1≤i≤p Γii . Proof of Lemma 14. Notationally, we denote by I1 , . . . , IK the set of indices, by Id the d×d diagonal matrix, by 1|Ik | the |Ik |-dimensional vector and by ΓIk the Ik ×Ik submatrix of Γ. Finally, 0 denotes the zero-vector and its length might vary line by line. From the property of Kullback-Leibler divergence, we only need to verify the case when n = 1. We consider arbitrary A(i) constructed as (61) and (62) for some 0 ≤ i ≤ M 0 . For notational simplicity, we write A = A(i) = (B T , ξ)T where ξ = ηw(i) ∈ RK . For this A ∈ Rp×K , under assumptions (a) - (c), observe that " # " # T +Γ BCB Bξ Σ Σ 11 12 B Σ = ACAT + Γ = := ξT BT kξk2 + γ Σ21 Σ22 e 6= A constructed in by decomposing Γ := diag(ΓB , γ) := diag(ΓI1 , . . . , ΓIK , γ). Similarly, for any A the same way, we have " # " # T +Γ e e BCB B ξ Σ Σ 11 12 B e = AC e A eT + Γ = Σ e 2 + γ := Σ e 21 Σ e 22 ξeT B T kξk 42 Since the Kullback-Leibler divergence between two p-dimensional multivariate normal distributions N0 := Np (µ0 , Σ0 ) and N1 := Np (µ1 , Σ1 ) is given by     det Σ1 1 > −1 −1 tr Σ1 Σ0 + (µ1 − µ0 ) Σ1 (µ1 − µ0 ) − p + log , KL(N0 , N1 ) = 2 det Σ0 we have      1 det Σ −1 e KL(PAe, PA ) = tr Σ Σ − p + log , e 2 det Σ (67) from the fact that X has mean zero. By using the formula of the inverse of a block matrix " #−1 " # A B A−1 + A−1 B(D − CA−1 B)−1 CA−1 −A−1 B(D − CA−1 B)−1 = , C D −(D − CA−1 B)−1 CA−1 (D − CA−1 B)−1 for square matrices A and D and non-singular matrices A and D − CA−1 B, we have # " # " −1 −1 −1 −1 Ω11 Ω12 Σ−1 −Σ−1 −1 11 + Σ11 Σ12 Σ22·1 Σ21 Σ11 11 Σ12 Σ22·1 := , Σ = −1 Σ−1 Ω21 Ω22 −Σ−1 22·1 22·1 Σ21 Σ11 with Σ22·1 = Σ22 − Σ21 Σ−1 11 Σ12 . This gives     e 2 + γ) . e T B T + Ω21 B ξe + Ω22 (kξk e = tr Ω11 Σ11 + Ω12 (ξ) tr Σ−1 Σ | {z } {z } | T 2 T1 We first calculate T1 . Observe that e T BT Ω11 Σ11 + Ω12 (ξ) −1 e T T −1 −1 = Ip−1 + Σ−1 11 Σ12 Σ22·1 Σ21 − Σ11 Σ12 Σ22·1 (ξ) B  −1 T T Σ21 = ξ T B T = Ip−1 + Σ−1 11 Σ12 Σ22·1 ∆ B , where ∆ := ξ − ξe ∈ RK . Recall that C = IK . It implies   D1   .. Σ11 = BCB T + ΓB =   , with . DK (68) Dk = 1|Ik | 1T|Ik | + ΓIk . Thus, Σ−1 11  −1 D1  = .. . −1 DK   , with Dk−1 = Γ−1 Ik − −1 T Γ−1 Ik 1|Ik | 1|Ik | ΓIk 1 + 1T|Ik | Γ−1 Ik 1|Ik | , for each k ∈ [K], P where the second part uses the Sherman-Morrison formula in Lemma 13. Let αk := i∈Ik 1/σi2 . Then,   eT !  kT  " # −1 −1 T −1 Γ 1 1 Γ e   Γ 1 |I | |I | I I k |I | k k k k  .  = 0 · · · Ik k · · · 0 ∈ R|Ik |×K Dk−1 Bk = Γ−1 (69) Ik − . 1 + αk 1 + αk . eTk 43 where only the kth column are non-zero. This further implies  −1   ξ1 −1  D1 B1 1+α1 ΓI1 1|I1 |     .. .. p−1 Σ−1 ξ =  ∈R . . . 11 Σ12 =  (70) ξK −1 1+αK ΓIK 1|IK | −1 DK BK On the other hand, note that h i ∆T B T = ∆1 1T|I1 | · · · ∆K 1T|IK | ∈ R1×(p−1) . (71) Since Σ22·1 is a scalar, combining (68), (70) and (71) yields  −1 T T T1 = p − 1 + tr Σ−1 11 Σ12 Σ22·1 ∆ B   ξ1 −1  1+α1 ΓI1 1|I1 | h i    .. = p − 1 + Σ−1  ∆1 1T|I1 | · · · ∆K 1T|IK |  . 22·1 · tr  ξK −1 1+αK ΓIK 1|IK | = p−1+ Σ−1 22·1 = p−1+ Σ−1 22·1 K  X ξk ∆k  −1 tr ΓIk 1|Ik | 1T|Ik | 1 + αk k=1 K X k=1 αk ξk ∆ k . 1 + αk  by using tr Γ−1 Ik  = αk  Then we proceed to calculate T2 . Similar as (70) and (71), we have  i  ξ h ξK 1 −1 −1 T T T −1 −1 T T = ∈ R1×(p−1) = ξ 1 Γ · · · 1 Γ Σ21 Σ−1 · · · BK DK B1 D1 11 1 + α1 |I1 | I1 1 + αK |IK | IK and   1|I1 | ξe1   B ξe =  ...  ∈ Rp−1 . 1|I | ξeK K These two immediately yield −1 e −1 e2 T2 = −Σ−1 22·1 Σ21 Σ11 B ξ + Σ22·1 (kξk + γ) = Σ−1 22·1 = Σ−1 22·1 K X ξk ξek T −1 e +γ− 1 Γ 1 kξk 1 + αk |Ik | Ik |Ik | k=1 ! K X α k e 2+γ− kξk ξk ξek . 1 + αk 2 ! k=1 Adding up T1 and T2 gives   e = p − 1 + Σ−1 tr Σ−1 Σ 22·1 e 2+γ+ kξk 44 K X k=1 !   αk ξk ∆k − ξek . 1 + αk (72) We proceed to obtain the expression of Σ22·1 . Observe that  −1 h i D1 T .. T  Σ21 Σ−1 B1T · · · BK  . 11 Σ12 = ξ = ξT K X BkT Dk−1 Bk k=1 ! −1 DK   B1   ..   . ξ BK ξ From (69), we further obtain    0 0   .  ..  ..  " . #   −1    ΓIk 1|Ik |  T  T −1 ··· 0 =  Bk Dk Bk = 1|Ik |  0 · · ·   .  1 + αk   .    .   0  1T Γ−1 1|Ik | |I | k k 1+αk .. 0 which is a K × K diagonal matrix. Thus, 2 Σ22·1 = Σ22 − Σ21 Σ−1 11 Σ12 = kξk + γ − = K X k=1 . K X k=1      ∈ RK×K ,     αk ξ2 1 + αk k 1 ξ 2 + γ. 1 + αk k (73) e Recall that the inverse formula of Finally, it remains to calculate the determinant of Σ and Σ. a block matrix is ! A B det = det(A) det(D − CA−1 B) C D for the invertible matrix A. We thus obtain e = det Σ11 · Σ e 22·1 , det Σ det Σ = det Σ11 · Σ22·1 , e 22·1 = Σ e 22 − Σ e 21 Σ−1 Σ e with Σ 11 12 . This gives   det Σ e 22·1 = log Σ22·1 − log Σ log e det Σ (74) Following the same arguments from (73), one can derive e 22·1 = Σ K X k=1 Therefore, collecting (72) and (74) yields 2KL PAe, PA  = Σ−1 22·1 e 2+γ+ kξk K X k=1 1 e2 ξ + γ. 1 + αk k   αk ξk ∆k − ξek 1 + αk 45 (75) ! e 22·1 , − 1 + log Σ22·1 − log Σ e 22·1 specified in (73) and (75), respectively. Given our specification of A = A(0) with Σ22·1 and Σ e = A(i) in (61) and (62), we further have and A ξ = 0 =⇒ Σ22·1 = γ, and η2s + γ, 2 2 1 + Imax /σmin 1 + Imax /σmin  2 = maxk∈[K] |Ik | and σmin = mini∈[p] σi2 . Consequently, KL PAe, PA can be simplified as (75) with Imax e 2 = η 2 s, ξe = ηw(i) =⇒ kξk e 22·1 ≥ Σ 2KL PAe, PA  = ≤ 1 e 2+γ = kξk η2s e 22·1 + log γ − log Σ γ   η2s η2s +γ + log γ − log 2 γ 1 + Imax /σmin ≤ η2s η2s − 2 2 )γ γ η s + (1 + Imax /σmin = 2 Imax /σmin + (η 2 s)/γ η2s · 2 γ 1 + Imax /σmin + (η 2 s)/γ ≤ η2s 2 , σmin (the concavity of log function) 2 . This concludes the proof of Lemma 14. by using γ ≥ σmin A.4 Proofs for the results from Section 4.3 We first prove the three statements of Theorem 6, then present the proofs of Remark 4. Without loss of generality, we assume that the signed permutation P is identity. Proof of Theorem 6. We first give the proof for part (a). Then, for ease of the presentation, we prove part (c) first and then part (b). b b) ⊆ supp(A b). In addition, Proof of part (a). Recall that Lemma 12 immediately implies supp(A J J b From the way we construct A bb, we have supp(A bb) ⊆ Theorem 3 yields Iba ⊆ Ia ∪ J1a , for any a ∈ K. I I b ⊆ supp(A). supp(AIb). Therefore, we have proved supp(A) On the other hand, for any (j, a) ∈ supp(AJ2 ), we know |βaj | > 2µ. This and the fact that kβbj − β j k∞ ≤ 2µ, immediately gives |βbaj | ≥ |βaj | − kβbj − β j k∞ > 0, bJ ). which implies supp(AJ2 ) ⊆ supp(A 2 bia ) = sign(Aia ) for any (i, a) ∈ b To show sign(ASb) = sign(ASb), since Lemma 10 guarantees sign(A b we focus on any fixed (j, a) ∈ Sb and j ∈ J. b First, we consider the case A bja = βbaj > 0. Sb and i ∈ I, Removing super indices, if βba > 0, (58) gives β̄a > µ. Thus, βa ≥ β̄a − kβ − β̄k∞ > 0 by recalling bja > 0, (j, a) ∈ Sb and j ∈ J, b we have Aja > 0. kβ − β̄k∞ ≤ µ. So far, we have shown that, for any A b b Since the same argument holds for any Aja < 0, the proof of sign(ASb) = sign(ASb) is completed. 46 Proof of part (c). Recall that, for any i ∈ [p] and a ∈ [K], b a ⇐⇒ A bia = i∈G 6 0. i ∈ Ga ⇐⇒ Aia 6= 0, We start our proof by rewriting the equivalent expression of TFPP and TFNP: TFPP = P i∈[p],a∈[K] 1{Aia P bia 6= 0} = 0, A i∈[p],a∈[K] 1{Aia = 0} , TFNP = P i∈[p],a∈[K] 1{Aia P bia = 0} 6= 0, A i∈[p],a∈[K] 1{Aia 6= 0} . b ⊆ supp(A). Thus, We first show TFPP = 0. From the result of part (a), we know supp(A) X bia 6= 0} = 0, 1{Aia = 0, A i∈[p],a∈[K] which implies TFPP = 0. In order to prove the result of TFNP, observe X X 1{Aia 6= 0} = |I| + si . (76) i∈J i∈[p],a∈[K] b we partition [p] = I ∪J1 ∪J2 ∪J3 = I ∪(L1 ∪L2 )∪J2 ∪J3 with si = kAi. k0 for each j ∈ J. For given I, with L1 = Ib∩J1 and L2 = J1 \L1 . Let us consider the set I ∪L1 first. Theorem 3 implies I ∪L1 = Ib bb, we have and Iba \ Ia ⊆ J1a . From the way we construct A I X i∈I∪L1 ,a∈[K] bia = 0} = 1{Aia 6= 0, A X i∈L1 ,a∈[K] bia = 0}. 1{Aia 6= 0, A Since the definition of J1 implies that, for any j ∈ J1a and a ∈ [K], |Aja | ≥ 1−4δ/ν and |Ajb | ≤ 4δ/ν, for any b 6= a, this implies X X bia = 0} = 1{Aia 6= 0, A 1{Aib 6= 0} = ti , b6=a a∈[K] for any i ∈ J1a ∩ L1 and a ∈ [K]. Thus, we have X X bia = 0} = ti . 1{Aia 6= 0, A (77) i∈L1 i∈I∪L1 ,a∈[K] Next we consider the set L2 . On the event E, for any i ∈ J1a ∩ L2 , we have bia | ≥ |Aia | − kA b − Ak∞ ≥ 1 − |A bia = Thus, A 6 0, which implies X i∈L2 ,a∈[K] 4δ − 2µ > 0. ν bia = 0} ≤ 1{Aia 6= 0, A 47 X i∈L2 ti . (78) bJ ) which yields Then we consider the set J2 . Part (a) gives supp(AJ2 ) = supp(A 2 X bia = 0} = 0. 1{Aia 6= 0, A (79) i∈J2 ,a∈[K] bja 6= 0 Finally, we consider the set J3 . By examining the proof of Part (a), it is easy to verify that A if |Aja | ≥ (2µ) ∨ (4δ/ν), for any j ∈ J3 and a ∈ [K]. Thus, X X bia = 0} ≤ 1{Aia 6= 0, A ti . (80) i∈J3 i∈J3 ,a∈[K] At last, combining (76) - (80) gives TFNP = P i∈[p],a∈[K] 1{Aia P bia = 0} 6= 0, A i∈[p],a∈[K] 1{Aia 6= 0} ≤ P j∈J1 ∪J3 tj |I| + P j∈J sj . b a ) and GFNP(G b a ) by the following: Proof of part (b). Similarly, we can express GFPP(G ba ) = GFPP(G P i∈[p] 1{Aia P bia 6= 0} = 0, A i∈[p] 1{Aia = 0} ba ) = GFNP(G , P i∈[p] 1{Aia P bia = 0} 6= 0, A i∈[p] 1{Aia 6= 0} . b GFPP(G b a ) = 0 follows immediately by noting that For any given a ∈ [K], ba | |(Ga )c | |(Ga )c ∩ G b a ), = PK GFPP(G 0 = TFPP ≥ PK c| c| |(G ) |(G ) b b b=1 b=1 b a ) = 0 if (Ga )c = 0. To show the expression of GFNP(G b a ), by the with the convention GFPP(G definition of I and Theorem 3, we obtain X X bia = 0} = 0, 1{Aia 6= 0, A 1{Aia 6= 0} = |Ia |. i∈I i∈I The latter immediately implies X i∈[p] 1{Aia 6= 0} = |Ia | + X sai i∈J In addition, following the same arguments in the proof of part (b), we have X X X bia = 0} = 0, bia = 0} = 1{Aia 6= 0, A 1{Aia 6= 0, A i∈J2 i∈J1 ∪J3 tai . i∈J1 ∪J3 \J1a Combining these two concludes the proof. Proofs of Remark 4. PK We briefly verify the first claim. It suffices to verify a=1 |Aja | ≤ 1 which is equivalent with 48 b Recall (16), since β j is feasible, the optimality of βbj immediately gives kβbj k1 ≤ 1, for any j ∈ J. kβbj k1 ≤ 1. To verify the expression of TFNP in the second claim, we assume tj = t and sj = s, for j ∈ J, and |J1 | + |J3 | = α(|I| + |J3 |). Note that |I| + |J1 | + |J2 | + |J3 | = p implies |J1 | + |J3 | = αp/(1 + α). We therefore obtain TFNP ≤ = t(|J1 | + |J3 |) t = s|J |+|I| 2 s(|J1 | + |J3 |) + s|J2 | + |I| s+ · 1+α α p  t by (1 + α)(|I| + |J2 |) = p , |I|+s|J | s + α1 · |I|+|J22| as desired. We verify the third claim. On the event E, when J2 = J, Remark 2 yields Ib = I, Ib = I and b − Ck∞ ≤ δ and Jb = J. After careful examination of the proof of Lemma 11, we derive that kC maxj∈J kθbj − θk∞ ≤ δ, on the event E. Therefore, choosing λ = δ and µ = 3kΩk∞,1 δ proves the claim, following the proof of Theorems 4 and 6 step by step. Finally, we verify the fourth claim on the hard-threshold estimator βej for any j ∈ J. For simplicity, we remove the super indices. Recall that, βe is defined coordinate-wisely by β̄a 1{|β̄a | > µ} with µ = 5kΩk∞,1 δ 0 . First, we show kβe − βk∞ ≤ 2µ. For any a ∈ [K] such that |β̄a | ≤ µ, we have |βea − βa | = |βa | ≤ kβ̄ − βk∞ + |β̄a | ≤ 2µ, e − Ak∞ ≤ 2µ where while the same bound is obtained above for the case |β̄a | > µ. This proves kA e combines A bb and βej for each j ∈ J. b To prove the same rate in Theorem 4 for A, e it suffices to A I j show that Lemma 12 still holds for βe . Recall that, on the event E, we have kβ̄ − βk∞ ≤ µ. For any βa = 0, we thus have |β̄a | ≤ kβ̄ − βk∞ ≤ µ, which implies βea = 0. This concludes the proof of e Theorem 4 for A. e and we write (i, a) ∈ Sb if |A eia | = To show part (a) of Theorem 6, let Sb denote the support of A 6 0. b Let (i, a) ∈ S be arbitrary fixed and consider the following two cases: b from Theorem 3 and the way we construct A bb, we have |A eia | = 1. Thus, |Aia | ≥ - If i ∈ I, I eia | − kA e − Ak∞ ≥ 1 − 2µ > 0. |A b then |A eia | = |βei | = |β̄ i | > µ. Therefore, |Aia | = |β i | ≥ |β̄ i | − kβ̄ i − β i k∞ > 0. - If i ∈ J, a a a a e ⊆ supp(A). To show supp(AJ ) ⊆ supp(A), e for any (i, a) ∈ Thus, we have proved that supp(A) 2 e e supp(AJ2 ), by the definition of J2 , |Aia | > 2µ. Thus, |Aia | ≥ |Aia | − kA − Ak∞ ≥ 0. Therefore, e (i, a) ∈ supp(A). e b) = sign(A b), since Lemma 10 guarantees sign(A bia ) = sign(Aia ) for any (i, a) ∈ To show sign(A S S b we focus on each (i, a) ∈ Sb and i ∈ J. b Assuming A eia = βei > 0, we know βei = β̄ i > µ. Sb and i ∈ I, a a a eia > 0 with Since Aia = βai ≥ β̄ai − kβ̄ i − β i k∞ > 0, we have proved that Aia > 0 for any A 49 b Since the same argument holds for any A eia < 0, we conclude the proof of (i, a) ∈ Sb and i ∈ J. e sign(ASb) = sign(ASb). The same conclusion in part (b) and (c) of Theorem 6 holds for GFPP, GFNP, TFPP and e as it shares the same property in part (a). TFNP based on the hard-threshold estimator A, B Cross-validation illustration We consider a simple case, when C is diagonal and the signed permutation matrix P is I, to illustrate our cross-validation method.  Example 1. Let C = diag(τ, τ, τ ), I = {1, 2}, {3, 4}, {5, 6} and   1 0 0  −1 0 0      0 1 0    0 1 0  , A= 0 −1  0    0 −1  0    0.4 0.6 0  −0.5 0 0.4  ∗ τ  0  T AI CAI =  0  0 0 τ ∗ 0 0 0 0 0 0 ∗ τ 0 0 0 0 τ ∗ 0 0 0 0 0 0 ∗ τ  0 0  0  , 0  τ ∗ where we use ∗ to reflect the fact that our algorithm ignores the diagonal elements. For the true I bI = AI , and I, we have A b T b (1) − AI CA Σ I II For = we obtain F-off ≤ ≤  b (1) − ΣII Σ II b (1) − ΣII Σ II b (1) − Σij max Σ ij i6=j  F-off F-off b T − ΣII + AI CA I F-off p b + |I|(|I| − 1) · kC − Ck∞ .   (2) b ∨ max Σij − Σij , i6=j 1 b (1) b T CV (I) = q  ΣII − AI CAI |I| |I| − 1 F-off ≤ 2.  Suppose that Ib = {1, 2}, {3, 5}, {4, 6} , so Ib = I, yet Ib = 6 I, we would have  ∗ τb1 0 0 0 0 τb1 ∗ 0 0 0 0     0 0 ∗ 0 τb 0    2 bbC bA bT =  A , I Ib  0 0 0 ∗ 0 τb3     0 0 τb2 0 ∗ 0  0 0 0 τb3 0 ∗   ∗ ∆τ1 0 ∆τ1 ∗ 0   0 0 ∗ bbC bA bT − Σ bb =  A  I II Ib  0 0 −τ   0 0 τb2 0 0 0 50 0 0 −τ ∗ 0 τb3 0 0 τb2 0 ∗ −τ  0 0   0   , τb3   −τ  ∗ baa from (11) for each a ∈ [K]. b Thus, the Here ∆τa = τba − τa , using estimates τba defined in lieu of C cross-validation criterion in (39) would satisfy 1 b b bT q  AIbC AIb − ΣIbIb b |I| b −1 |I| s τ2 4τ 2 + 2b τ22 + 2b ≥  3 − 2. b |I| b −1 |I| b ≥ CV (I) 1 b (1) −q  ΣIbIb − ΣIbIb F-off b |I| b −1 |I| F-off From noting that |b τa − τ | ≤ , for a = 2, 3, it gives r 2 2 b ≥ 4τ − 4τ  + 2 − 2 > 2 ≥ CV (I), CV (I) 15 for τ ≥ 9. We conclude in this example, with Ib = I, incorrectly specifying I will induce a large b 6= K and Ib = loss. It is easily verified that this is also the case when Ib = I but K 6 I. b For instance, On the other hand, suppose we mistakenly included some non-pure variable in I.  b suppose we found I = {1, 2}, {3, 4}, {5, 6, 7} . Then we would have     ∗ τ 0 0 0 0 0.4τ ∗ τb1 0 0 0 0 0     ∗ 0 0 0 0 −0.4τ   τ τb1 ∗ 0 0 0 0 0       0  0 0 ∗ τb2 0 0 0  0 ∗ τ 0 0 0.6τ      bb0 C bA bT =  0 0 τb2 ∗ 0 0 0  . , A ΣIb0 Ib0 =  0 0 τ ∗ 0 0 0.6τ 0     I Ib  0  0 0 0 0 ∗ τb τb  0 0 0 ∗ τ 0  3 3        0 0 0 τ ∗ 0   0  0 0 0 0 τb3 ∗ τb3  0.4τ −0.4τ 0.6τ 0.6τ 0 0 ∗ 0 0 0 0 τb3 τb3 ∗ We thus have  bb0 C bA bT − Σ b0 b0 A I I I Ib0 ∗   ∆τ1   0  =  0  0    0 −0.4τ ∆τ1 ∗ 0 0 0 0 0.4τ 0 0 ∗ ∆τ2 0 0 −0.6τ 0 0 ∆τ2 ∗ 0 0 −0.6τ  0 0 −0.4τ  0 0 0.4τ   0 0 −0.6τ   0 0 −0.6τ   ∗ ∆τ3 τb3    ∆τ3 ∗ τb3  τb3 τb3 ∗ and, by similar arguments, for τ ≥ 12, we find r 4b τ32 + 4 × 0.36τ 2 + 4 × 0.16τ 2 0 b CV (I ) ≥ − 2 > 2. 42 Thus, the cross-validation loss in this example will be large even if only one non-pure variable is mistakenly classified as pure variable. In rare cases, the cross-validation criterion might miss a very small subset of I but this can be rectified in our later estimation of AJ . 51 C C.1 Additional Simulation Results Related work on the estimation of A As we explained in Section 4.4, the existing procedures for estimating A in (1) are developed for models satisfying identifiability conditions different than our (i)-(iii). Specifically, Bai and Li [2012] propose to first optimize, via EM, a quasi-likelihood objective under the identifiability conditions (a) C = IK and (b) AT Γ−1 A is diagonal. The major advantage of this setting is that the computationally demanding EM algorithm only needs to determine A and Γ as C = IK is given. b with the property The EM algorithm, however, is only guaranteed to find stationary point B bT B b is diagonal. In the context of this problem, as the authors note, the EM algorithm that B requires a delicate initialization and is computationally demanding, even if only one of K, n and p is moderately large. Next, the authors propose to link this estimator with an estimator of a model no longer satisfying (a) and (b) as identifiability conditions, but satisfying instead (1) C is an arbitrary positive definite matrix; (2) There exists a known set S of K pure variables, with only one pure variable per latent factor allowed. No further sparsity conditions on A are imposed. To bB b T . This yields estimate A under (2), they suggest to solve for A and C the equation ACAT = B bS may not be invertible, and e=B bB b −1 of A. However, when K is relatively large, B the estimator A S −1 eS c is not sparse b = IK , the submatrix A eS = B bS B the estimator may not exist. Finally, although A S e in general. One possibility is to threshold A, but it is unclear how to choose the correct threshold level, for the following reason. Although the authors establish the asymptotic limit of the MLE of A under (1) and (2), the estimator of A explained above is not guaranteed to be the MLE in this model: if it exists, it is a transformation of a stationary point that estimates parameters under the model specifications (a) and (b), different from (1) and (2). The immediate practical implication b around A under (1) and (2) is not known, which makes the thresholding is that the variation of A b difficult to assess. For all these reasons, we cannot compare numerically our estimation level of A procedure with the procedure proposed in Bai and Li [2012], even in the (unrealistic) case when the pure variable set is known. C.2 LOVE for non-overlapping cluster estimation In applications, one may not have prior information on whether the clusters may overlap or not. Thus, one would prefer a clustering method that works well in both overlapping and non-overlapping scenarios. In the previous section, we have demonstrated that LOVE outperforms the existing clustering methods if data are generated from a model that yields variable clusters with overlaps. In this section, we study the numerical performance of the proposed method under non-overlapping data generating schemes. To generate data with non-overlapping clusters, we set the number of variables in each cluster to be 20. We generate the diagonal elements of C from the uniform distribution in [1, 2] and use the same method as in Section 5.2 to generate the off-diagonal elements. The variance σj2 of the error Ej is generated from the uniform distribution in [3, 4]. In Table 3, we compare the sensitivity and specificity of the proposed method with the CORD estimator [Bunea et al., 2016a] under non-overlapping scenarios, where the sensitivity and specificity are defined in (81). The 52 CORD estimator can be viewed as a benchmark method for variable clustering without overlaps and is shown to outperform K-means and hierarchical clustering, via an extensive numerical study presented in Bunea et al. [2016a]. For this reason, we only focus on the comparison between LOVE and CORD. From Table 3, we see that for small p (i.e., p = 100) the performance of LOVE is only slightly worse than CORD. As p increases, the specificity of LOVE and that of CORD remain close to 1, but LOVE yields in fact higher sensitivity than CORD when n = 300. This confirms that the performance of the proposed method is comparable to the benchmark method under non-overlapping scenarios. Of course, LOVE is much more flexible as it can detect possible overlaps. p n = 300 LOVE 100 500 1000 n = 500 CORD LOVE CORD SN SP SN SP SN SP SN SP 0.87 (0.09) 0.86 (0.05) 0.84 (0.05) 0.90 (0.10) 0.98 (0.01) 0.97 (0.02) 0.92 (0.05) 0.82 (0.03) 0.78 (0.03) 0.98 (0.02) 0.98 (0.01) 0.97 (0.01) 0.93 (0.05) 0.87 (0.04) 0.87 (0.04) 0.97 (0.03) 0.99 (0.00) 1.00 (0.00) 0.98 (0.02) 0.94 (0.02) 0.90 (0.02) 1.00 (0.01) 1.00 (0.01) 1.00 (0.01) Table 3: Sensitivity (SN) and specificity (SP) of the proposed method (LOVE) and CORD under non-overlapping scenarios. Numbers in parentheses are the simulation standard errors. C.3 Comparison with other overlapping clustering algorithms We adopt the same data generating procedure except that we set K = 10 and the negative entries of A are replaced by their absolute values, since existing overlapping clustering algorithms typically return an estimator of A with positive entries. We compare the proposed method with the following overlapping clustering algorithms: fuzzy K-means, and fuzzy K-medoids [Krishnapuram et al., 2001], the latter being more robust to noise and outliers. We describe the methods briefly in what follows. Both of them aim to estimate a degree of membership matrix M ∈ Rp×K by minimizing the ej = (X1j , ..., Xnj ), average within-cluster L2 or L1 distances [Bezdek, 2013]. Specifically, denote X n e = {X e1 , ..., X ep }. Let W = {w1 , ..., wK }, where wk ∈ R , be a subset of X e with K elements. and X The fuzzy algorithms aim to find the set W such that J(W ) defined as J(W ) = p X K X j=1 k=1 ej , wk ), Mjk r(X is minimized. Here, Mjk > 0 can be interpreted as the degree of membership matrix which is a ej , wk ). Some commonly used expressions of Mjk are shown by Krishnapuram known function of r(X 53 ej , wk ) is a measure of dissimilarity between X ej and wk . For instance, et al. [2001]. In addition, r(X 2 if r(x, θ) = kx−θk2 , this corresponds to the fuzzy K-means. Similarly, the fuzzy K-medoids is given e is computationally infeasible, by r(x, θ) = kx − θk1 . Since searching over all possible subsets of X an approximate algorithm for minimizing J(W ) is proposed by Krishnapuram et al. [2001], we refer to their original paper for further details. Their degree of membership matrix M plays the same role as our allocation matrix A, but is typically non-sparse. In order to construct overlapping clusters based on M one needs to specify a cut-off value v and assign variable j to cluster k if Mjk > v. Moreover, the number of clusters K is a required input of the algorithm. In the simulations presented in this section we set K = 10 for these two methods, which have been implemented by the functions FKM and FKM.med in R. We compare their performance with our proposed method LOVE. We emphasize that our method does not require the specification of K and that the tuning parameters are chosen in a data adaptive fashion, as explained in the previous sections. We follow the pairwise approach of Wiwie et al. [2015] for this comparison. Recall that G = (G1 , ..., GK ) denotes the true overlapping b 1 , ..., G b ) to denote clusters computed from an clusters. For notational simplicity, we use Gb = (G K̄ b to be different from K. For algorithm. Since LOVE estimates the number of clusters, we allow K any pair 1 ≤ j < k ≤ p, define n o b b for some 1 ≤ a ≤ K and 1 ≤ b ≤ K b , T Pjk = 1 if j, k ∈ Ga and j, k ∈ G n o b b for any 1 ≤ a ≤ K and 1 ≤ b ≤ K b , T Njk = 1 if j, k ∈ / Ga and j, k ∈ /G n o b b for some 1 ≤ b ≤ K b , F Pjk = 1 if j, k ∈ / Ga for any 1 ≤ a ≤ K and j, k ∈ G n o b b for any 1 ≤ b ≤ K b . F Njk = 1 if j, k ∈ Ga for some 1 ≤ a ≤ K and j, k ∈ /G and we define TP = X 1≤j<k≤p T Pjk , T N = X T Njk , F P = 1≤j<k≤p X 1≤j<k≤p F Pjk , F N = X F Njk . 1≤j<k≤p We use sensitivity (SN) and specificity (SP) to evaluate the performance of different methods, where TN TP SP = , and SN = . (81) TN + FP TP + FN Recall that for the fuzzy methods, variable j belongs to cluster k if the estimated membership matrix Mjk is beyond a cut-off v, i.e., Mjk > v. We search for the optimal cut-off v in a grid {0.01, 0.1, ..., 0.3} such that SP + SN is maximized. The corresponding sensitivity and specificity for LOVE, fuzzy K-means (F-Kmeans) and fuzzy K-medoids (F-Kmed) are shown in Figure 3. To save space, we only present the results for p = 500 since the other scenarios illustrate the same patterns. The following findings are observed. First, the F-Kmeans is superior to F-Kmed in most scenarios in terms of both sensitivity and specificity. Second, LOVE clearly outperforms these two existing methods and its specificity and sensitivity are very close to 1, which implies that our method leads to very few false positives and false negatives. The conclusions hold with n from 300 to 1000. Moreover, we reiterate that the true value K = 10 is used as input in the competing 54 ● ● ● 1.0 ● ● ● ● ● ● ● 0.8 0.8 1.0 methods, whereas it is estimated from the data in LOVE. This illustrates the net advantage of the proposed method over the existing overlapping clustering methods, for data generated from Model (1). ● ● ● ● ● ● ● ● ● 0.4 500 700 0.6 0.0 0.0 LOVE F−Kmeans F−Kmed 300 0.4 ● 0.2 Specificity 0.6 ● ● 0.2 Sensitivity ● ● 900 300 sample size 500 700 900 sample size Figure 3: Plot of specificity and sensitivity for LOVE, fuzzy K-means (F-Kmeans), and fuzzy K-medoids (F-Kmed) when p = 500. 55
10math.ST
MACS: AN AGENT-BASED MEMETIC MULTIOBJECTIVE arXiv:1206.1305v1 [cs.CE] 6 Jun 2012 OPTIMIZATION ALGORITHM APPLIED TO SPACE TRAJECTORY DESIGN Massimiliano Vasile – Federico Zuiani Space Advanced Research Team, University of Strathclyde James Weir Building 75 Montrose Street G1 1XJ, Glasgow, United Kingdom [email protected], [email protected] ABSTRACT This paper presents an algorithm for multiobjective optimization that blends together a number of heuristics. A population of agents combines heuristics that aim at exploring the search space both globally and in a neighborhood of each agent. These heuristics are complemented with a combination of a local and global archive. The novel agentbased algorithm is tested at first on a set of standard problems and then on three specific problems in space trajectory design. Its performance is compared against a number of state-of-the-art multiobjective optimisation algorithms that use the Pareto dominance as selection criterion: NSGA-II, PAES, MOPSO, MTS. The results demonstrate that the agent-based search can identify parts of the Pareto set that the other algorithms were not able to capture. Furthermore, convergence is statistically better although the variance of the results is in some cases higher. 1 KEYWORDS Multiobjective optimisation; trajectory optimisation; memetic algorithms; multiagent systems. 1. INTRODUCTION The design of a space mission steps through different phases of increasing complexity. In the first phase, a trade-off analysis of several options is required. The trade-off analysis compares and contrasts design solutions according to different criteria and aims at selecting one or two options that satisfy mission requirements. In mathematical terms, the problem can be formulated as a multiobjective optimization problem. As part of the trade-off analysis, multiple transfer trajectories to the destination need to be designed. Each transfer should be optimal with respect to a number of criteria. The solution of the associated multiobjective optimization problem, has been addressed, by many authors, with evolutionary techniques. Coverstone et al. [1] proposed the use of multiobjective genetic algorithms for the optimal design of low-thrust trajectories. Dachwald et al. proposed the combination of a neurocontroller and of a multiobjective evolutionary algorithm for the design of low-thrust trajectories [2]. In 2005 a study by Lee et al. [3] proposed the use of a Lyapunov controller with a multiobjective evolutionary algorithm for the design of low-thrust spirals. More recently, Schütze et al. proposed some innovative techniques to solve multiobjective optimization problems for multi-gravity low-thrust trajectories. Two of the interesting aspects of the work of Schütze et al. are the archiving of ǫ- and ∆-approximated solutions, to the known best Pareto front [4], and the deterministic pre-pruning of the search space [5]. In 2009, Delnitz et al. [6] proposed the use of multiobjective subdivision techniques for the design of low-thrust transfers to the halo orbits around the L2 libration point in the Earth-Moon system. Minisci et al. presented an interesting comparison between an EDA-based algorithm, called MOPED, and NSGA-II on some constrained and unconstrained multi-impulse orbital transfer problems [7]. In this paper, a hybrid population-based approach that blends a number of heuristics is 2 proposed. In particular, the search for Pareto optimal solutions is carried out globally by a population of agents implementing classical social heuristics and more locally by a subpopulation implementing a number of individualistic actions. The reconstruction of the set of Pareto optimal solutions is handled through two archives: a local and a global one. The individualistic actions presented in this paper are devised to allow each agent to independently converge to the Pareto optimal set. Thus creating its own partial representation of the Pareto front. Therefore, they can be regarded as memetic mechanisms associated to a single individual. It will be shown that individualistic actions significantly improve the performance of the algorithm. The algorithm proposed in this paper is an extension of the Multi-Agent Collaborative Search (MACS), initially proposed in [8, 9], to the solution of multiobjective optimisation problems. Such an extension required the modification of the selection criterion, for both global and local moves, to handle Pareto dominance and the inclusion of new heuristics to allow the agents to move toward and along the Pareto front. As part of these new heuristics, this papers introduces a dual archiving mechanism for the management of locally and globally Pareto optimal solutions and an attraction mechanisms that improves the convergence of the population. The new algorithm is here applied to a set of known standard test cases and to three space mission design problems. The space mission design cases in this paper consider spacecraft equipped with a chemical engine and performing a multi-impulse transfer. Although these cases are different from some of the above-mentioned examples, that consider a low-thrust propulsion system, nonetheless the size and complexity of the search space is comparable. Furthermore, it provides a first test benchmark for multiimpulsive problems that have been extensively studied in the single objective case but for which only few comparative studies exist in the multiobjective case [7]. The paper is organised as follows: section two contains the general formulation of the problem, the third section starts with a general introduction to the multi-agent collaborative search algorithm and heuristics before going into some of the implementation details. Section four contains a set of comparative tests that demonstrates the effec- 3 tiveness of the heuristics implemented in MACS. The section briefly introduces the algorithms against which MACS is compared and the two test benchmarks that are used in the numerical experiments. It then defines the performance metrics and ends with the results of the comparison. 2. PROBLEM FORMULATION A general problem in multiobjective optimization is to find the feasible set of solutions that satisfies the following problem: min f (x) (1) x∈D  where D is a hyperrectangle defined as D = xj | xj ∈ [blj buj ] ⊆ R, j = 1, ..., n and f is the vector function: f : D → Rm , f (x) = [f1 (x), f2 (x), ..., fm (x)]T (2) The optimality of a particular solution is defined through the concept of dominance: with reference to problem (1), a vector y ∈ D is dominated by a vector x ∈ D if fj (x) < fj (y) for all j = 1, ..., m. The relation x ≺ y states that x dominates y. Starting from the concept of dominance, it is possible to associate, to each solution in a set, the scalar dominance index: Id (xj ) = |{i | i ∧ j ∈ Np ∧ xi ≺ xj }| (3) where the symbol |.| is used to denote the cardinality of a set and Np is the set of the indices of all the solutions. All non-dominated and feasible solutions form the set: X = {x ∈ D | Id (x) = 0} (4) Therefore, the solution of problem (1) translates into finding the elements of X. If X is made of a collection of compact sets of finite measure in Rn , then once an element 4 of X is identified it makes sense to explore its neighborhood to look for other elements of X. On the other hand, the set of non dominated solutions can be disconnected and its elements can form islands in D. Hence, restarting the search process in unexplored regions of D can increase the collection of elements of X. The set X is the Pareto set and the corresponding image in criteria space is the Pareto front. It is clear that in D there can be more than one Xl containing solutions that are locally non-dominated, or locally Pareto optimal. The interest is, however, to find the set Xg that contains globally non-dominated, or globally Pareto optimal, solutions. 3. MULTIAGENT COLLABORATIVE SEARCH The key motivation behind the development of multi-agent collaborative search was to combine local and global search in a coordinated way such that local convergence is improved while retaining global exploration [9]. This combination of local and global search is achieved by endowing a set of agents with a repertoire of actions producing either the sampling of the whole search space or the exploration of a neighborhood of each agent. More precisely, in the following, global exploration moves will be called collaborative actions while local moves will be called individualistic actions. Note that not all the individualistic actions, described in this paper, aim at exploring a neighborhood of each agent, though. The algorithm presented in this paper is a modification of MACS to tackle multiobjective optimization problems. In this section, the key heuristics underneath MACS will be described together with their modification to handle problem (1) and reconstruct X. 3.1. GENERAL ALGORITHM DESCRIPTION A population P0 of npop virtual agents, one for each solution vector xi , with i = 1, ..., npop , is deployed in D. The population evolves through a number of generations. At every generation k, the dominance index (3) of each agent xi,k in the population Pk is evaluated. The agents with dominance index Id = 0 form a set Xk of nondominated solutions. Hence, problem (1) translates into finding a series of sets Xk such that Xk → Xg for k → kmax with kmax possibly a finite number. 5 The position of each agent in D is updated through a number of heuristics. Some are called collaborative actions because are derived from the interaction of at least two agents and involve the entire population at one time. The general collaborative heuristic can be expressed in the following form: xk = xk + S(xk + uk )uk (5) where uk depends on the other agents in the population and S is a selection function which yields 0 if the candidate point xk + uk is not selected or 1 if it is selected (see Section 3.2). In this implementation a candidate point is selected if its dominance index is better or equal than the one of xk . A first restart mechanism is then implemented to avoid crowding. This restart mechanism is taken from [9] and prevents the agents from overlapping or getting too close. It is governed by the crowding factor wc that defines the minimum acceptable normalized distance between agents. Note that, this heuristic increases the uniform sampling rate of D, when activated, thus favoring exploration. On the other hand, by setting wc small the agents are more directed towards local convergence. After all the collaborative and restart actions have been implemented, the resulting updated population Pk is ranked according to Id and split in two subpopulations: Pku and Pkl . The agents in each subpopulation implement sets of, so called, individualistic actions to collect samples of the surrounding space and to modify their current location. In particular, the last npop − fe npop agents belong to Pku and implement heuristics that can be expressed in a form similar to Eq. (5) but with uk that depends only on xk . The remaining fe npop agents belong to Pkl and implement a mix of actions that aim at either improving their location or exploring the neighborhood Nρ (xi,k ), with i = 1, ..., fe npop . Nρ (xi,k ) is a hyperectangle centered in xi,k . The intersection Nρ (xi,k )∩ D represents the local region around agent xi,k that one wants to explore. The size of Nρ (xi,k ) is specified by the value ρ(xi,k ): the ith edge of Nρ has length 2ρ(xi,k ) max{buj − xi,k [j], xi,k [j] − blj }. The agents in Pkl generate a number of perturbed solutions ys for each xi,k , with s = 6 1, ..., smax . These solutions are collected in a local archive Al and a dominance index is computed for all the elements in Al . If at least one element ys ∈ Al has Id = 0 then xi,k ← ys . If multiple elements of Al have Id = 0, then the one with the largest variation, with respect to xi,k , in criteria space is taken. Figure 1(a) shows three agents (circles) with a set of locally generated samples (stars) in their respective neighborhoods (dashed square). The arrows indicate the direction of motion of each agent. The figures shows also the local archive for the first agent Al1 and the target global archive Xg . The ρ value associated to an agent is updated at each iteration according to the rule devised in [9]. Furthermore, a value s(xi,k ) is associated to each agent xi,k to specify the number of samples allocated to the exploration of Nρ (xi,k ). This value is updated at each iteration according to the rule devised in [9]. The adaptation of ρ is introduced to allow the agents to self-adjust the neighborhood removing the need to set a priori the appropriate size of Nρ (xi,k ). The consequence of this adaptation is an intensification of the local search by some agents while the others are still exploring. In this respect, MACS works opposite to Variable Neighborhood Search heuristics, where the neighborhood is adapted to improve global exploration, and differently than Basin Hopping heuristics in which the neighborhood is fixed. Similarly, the adaptation of s(xi,k ) avoids setting a priori an arbitrary number of individualistic moves and has the effect of avoiding an excessive sampling of Nρ (xi,k ) when ρ is small. The value of s(xi,k ) is initialized to the maximum number of allowable individualistic moves smax . The value of smax is here set equal to the number of dimensions n. This choice is motivated by the fact that a gradient-based method would evaluate the function a minimum of n times to compute an approximation of the gradient with finite differences. Note that the set of individualistic actions allows the agents to independently move towards and within the set X, although no specific mechanism is defined as in [10]. On the other hand the mechanisms proposed in [10] could further improve the local search and will be the subject of a future investigation. All the elements of Xk found during one generation are stored in a global archive Ag . The elements in Ag are a selection of the elements collected in all the local archives. 7 Figure 1: Illustration of the a) local moves and archive and b) global moves and archive. Figure 1(b) illustrates three agents performing two social actions that yield two samples (black dots). The two samples together with the non-dominated solutions coming from the local archive form the global archive. The archive Ag is used to implement an attraction mechanism that improves the convergence of the worst agents (see Sections 3.4.1). During the global archiving process a second restart mechanism that reinitializes a portion of the population (bubble restart) is implemented. Even this second restart mechanism is taken from [9] and avoids that, if ρ collapses to zero, the agent keeps on sampling a null neighborhood. Note that, within the MACS framework, other strategies can be assigned to the agents to evaluate their moves in the case of multiple objective functions, for example a decomposition technique [11]. However, in this paper we develop the algorithm based only on the use of the dominance index. 3.2. COLLABORATIVE ACTIONS Collaborative actions define operations through which information is exchanged between pairs of agents. Consider a pair of agents x1 and x2 , with x1 ≺ x2 . One of the two agents is selected at random in the worst half of the current population (from the point of view of the property Id ), while the other is selected at random from the whole population. Then, three different actions are performed. Two of them are defined by adding to x1 a step uk defined as follows: uk = αrt (x2 − x1 ), (6) and corresponding to: extrapolation on the side of x1 (α = −1, t = 1), with the further constraint that the result must belong to the domain D (i.e., if the step uk leads out of D, its size is reduced until we get back to D); interpolation (α = 1), where a random point between x1 and x2 is sampled. In the latter case, the shape parameter t is defined 8 Algorithm 1 Main MACS algorithm 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: Initialize a population P0 of npop agents in D, k = 0, number of function evaluations neval = 0, maximum number of function evaluations Ne , crowding factor wc for all i = 1, ..., npop do xi,k = xi,k + S(xi,k + ui,k )ui,k end for Rank solutions in Pk according to Id Re-initialize crowded agents according to the single agent restart mechanism for all i = fe npop , ..., npop do Generate np mutated copies of xi,k . Evaluate the dominance of each mutated copy yp against xi,k , with p = 1, ..., np if ∃p|yp ≺ xi,k then p̄ = arg maxp kyp − xi,k k xi,k ← yp̄ end if end for for all i = 1, ..., fe npop do Generate s < smax individual actions us such that ys = xi,k + us if ∃s|ys ≺ xi,k then s̄ = arg maxs kys − xi,k k xi,k ← ys̄ end if Store candidate elements ys in the local archive Al Update ρ(xi,k ) and s(xi,k ) end for S S S Form Pk = Pkl Pku and Âg = Ag Al Pk Compute Id of all the elements in Âg Ag = {x|x ∈ Âg ∧ Id (x) = 0 ∧ kx − xAg k > wc } Re-initialize crowded agents in Pk according to the second restart mechanism Compute attraction component to Ag for all xi,k ∈ Pk \ Xk k =k+1 Termination Unless neval > Ne , GoTo Step 2 as follows: t = 0.75 s(x1 ) − s(x2 ) + 1.25 smax (7) The rationale behind this definition is that we are favoring moves which are closer to the agent with a higher fitness value if the two agents have the same s value, while in the case where the agent with highest fitness value has a s value much lower than that of the other agent, we try to move away from it because a small s value indicates that improvements close to the agent are difficult to detect. 9 The third operation is the recombination operator, a single-point crossover, where, given the two agents: we randomly select a component j; split the two agents into two parts, one from component 1 to component j and the other from component j + 1 to component n; and then we combine the two parts of each of the agents in order to generate two new solutions. The three operations give rise to four new samples, denoted by y1 , y2 , y3 , y4 . Then, Id is computed for the set x2 , y1 , y2 , y3 , y4 . The element with Id = 0 becomes the new location of x2 in D. 3.3. INDIVIDUALISTIC ACTIONS Once the collaborative actions have been implemented, each agent in Pku is mutated a number of times: the lower the ranking the higher the number of mutations. The mutation mechanisms is not different from the single objective case but the selection is modified to use the dominance index rather than the objective values. A mutation is simply a random vector uk such that xi,k + uk ∈ D. All the mutated solution vectors are then compared to xi,k , i.e. Id is computed for the set made of the mutated solutions and xi,k . If at least one element yp of the set has Id = 0 then xi,k ← yp . If multiple elements of the set have Id = 0, then the one with the largest variation, with respect to xi,k , in criteria space is taken. Each agent in Pkl performs at most smax of the following individualistic actions: inertia, differential, random with line search. The overall procedure is summarized in Algorithm 2 and each action is described in detail in the following subsections. 3.3.1. Inertia If agent i has improved from generation k − 1 to generation k, then it follows the direction of the improvement (possibly until it reaches the border of D), i.e., it performs the following step: ys = xi,k + λ̄∆I where λ̄ = min{1, max{λ : ys ∈ D}} and ∆I = (xi,k − xi,k−1 ). 10 (8) 3.3.2. Differential This step is inspired by Differential Evolution [12]. It is defined as follows: let xi1 ,k , xi2 ,k , xi3 ,k be three randomly selected agents; then ys = xi,k + e [xi1 ,k + F (xi3 ,k − xi2 ,k )] (9) with e a vector containing a random number of 0 and 1 (the product has to be intended componentwise) with probability 0.8 and F = 0.8 in this implementation. For every component ys [j] of ys that is outside the boundaries defining D then ys [j] = r(buj − blj ) + blj , with r ∈ U (0, 1). Note that, although this action involves more than one agent, its outcome is only compared to the other outcomes coming from the actions performed by agent xi,k and therefore it is considered individualistic. 3.3.3. Random with Line Search This move realizes a local exploration of the neighborhood N (xi,k ). It generates a first random sample ys ∈ N (xi,k ). Then if ys is not an improvement, it generates a second sample ys+1 by extrapolating on the side of the better one between ys and xi,k :   ys+1 = xi,k + λ̄ α2 rt (ys − xi,k ) + α1 (ys − xi,k ) (10) with λ̄ = min{1, max{λ : ys+1 ∈ D}} and where α1 , α2 ∈ {−1, 0, 1}, r ∈ U (0, 1) and t is a shaping parameter which controls the magnitude of the displacement. Here we use the parameter values α1 = 0, α2 = −1, t = 1, which corresponds to extrapolation on the side of xi,k , and α1 = α2 = 1, t = 1, which corresponds to extrapolation on the side of ys . The outcome of the extrapolation is used to construct a second order one-dimensional model of Id . The second order model is given by the quadratic function fl (σ) = a1 σ 2 +a2 σ+a3 where σ is a coordinate along the ys+1 −ys direction. The coefficients a1 , a2 and a3 are computed so that fl interpolates the values Id (ys ), Id (ys+1 ) and Id (xi,k ). In particular, for σ = 0 fl = Id (ys ), for σ = 1 fl = Id (ys+1 ) and for 11 σ = (xi,k − ys )/kxi,k − ys k fl = Id (xi,k ). Then, a new sample ys+2 is taken at the minimum of the second-order model along the ys+1 − ys direction. Algorithm 2 Individual Actions in Pkl 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: s = 1, stop = 0 if xi,k ≺ xi,k−1 then ys = xi,k + λ̄(xi,k − xi,k−1 ) with λ̄ = min{1, max{λ : ys ∈ D}}. end if if xi,k ≺ ys then s=s+1 ys = e[xi,k − (xi1 ,k + (xi3 ,k − xi2 ,k ))] ∀j|ys (j) ∈ / D, ys (j) = r(bu (j) − bl (j)) + bl (j), with j = 1, ..., n and r ∈ U (0, 1) else stop = 1 end if if xi,k ≺ ys then s=s+1 Generate ys ∈ Nρ (xi,k ). Compute ys+1 = xi,k + λ̄rt (xi,k − ys ) with λ̄ = min{1, max{λ : ys ∈ D}} and r ∈ U (0, 1). Compute ys+2 = λ̄σmin (ys+1 − ys )/k(ys+1 − ys )k, with σmin = arg minσ {a1 σ 2 + a2 σ + Id (ys )}, and λ̄ = min{1, max{λ : ys+2 ∈ D}}. s=s+2 else stop = 1 end if Termination Unless s > smax or stop = 1 , GoTo Step 4 The position of xi,k in D is then updated with the ys that has Id = 0 and the longest vector difference in the criteria space with respect to xi,k . The displaced vectors ys generated by the agents in Pkl are not discarded but contribute to a local archive Al , one for each agent, except for the one selected to update the location of xi,k . In order to rank the ys , the following modified dominance index is used:  Iˆd (xi,k ) = j | fj (ys ) = fj (xi,k ) κ+  j | fj (ys ) > fj (xi,k ) (11) where κ is equal to one if there is at least one component of f(xi,k ) = [f1 , f2 , ..., fm ]T which is better than the corresponding component of f(ys ), and is equal to zero other- 12 wise. Now, if for the sth outcome, the dominance index in Eq. (11) is not zero but is lower than the number of components of the objective vector, then the agent xi,k is only partially dominating the sth outcome. Among all the partially dominated outcomes with the same dominance index we select the one that satisfies the condition: min s  f(xi,k )) − f(ys ) , e where e is the unit vector of dimension m, e = [1,1,1,...,1]T √ m (12) . All the non-dominated and selected partially dominated solutions form the local archive Al . 3.4. THE LOCAL AND GLOBAL ARCHIVES AL AND AG Since the outcomes of one agent could dominate other agents or the outcomes of other agents, at the end of each generation, every Al and the whole population Pk are added to the current global archive Ag . The global Ag contains Xk , the current best estimate of Xg . The dominance index in Eq.(3) is then computed for all the elements S S in Âg = Ag l Al Pk and only the non-dominated ones with crowding distance kxi,k − xAg k > wc are preserved (where xAg is an element of Ag ). 3.4.1. Attraction The archive Ag is used to direct the movements of those agents that are outside Xk . All agents, for which Id 6= 0 at step k, are assigned the position of the elements in Ag and their inertia component is recomputed as: ∆I = r(xAg − xi,k ) (13) More precisely, the elements in the archive are ranked according to their reciprocal distance or crowding factor. Then, every agent for which Id 6= 0 picks the least crowded element xAg not already picked by any other agent. 13 3.5. STOPPING RULE The search is stopped when a prefixed number Ne of function evaluations is reached. At termination of the algorithm the whole final population is inserted into the archive Ag . 4. COMPARATIVE TESTS The proposed optimization approach was implemented in a software code, in Matlab, called MACS. In previous works [8,9], MACS was tested on single objective optimization problems related to space trajectory design, showing good performances. In this work, MACS was tested at first on a number of standard problems, found in literature, and then on three typical space trajectory optimization problems. This paper extends the results presented in Vasile and Zuiani (2010) [13] by adding a broader suite of algorithms for multiobjective optimization to the comparison and a different formulation of the performance metrics. 4.1. TESTED ALGORITHMS MACS was compared against a number of state-of-the-art algorithms for multiobjective optimization. For this analysis it was decided to take the basic version of the algorithms that is available online. Further developments of the basic algorithms have not been considered in this comparison and will be included in future works. Note that, all the algorithms selected for this comparative analysis use Pareto dominance as selection criterion. The tested algorithms are: NSGA-II [14], MOPSO [15], PAES [16] and MTS [17]. A short description of each algorithm with their basic parameters follows. 4.1.1. NSGA-II The Non-Dominated Sorting Genetic Algorithm (NSGA-II) is a genetic algorithm which uses the concept of dominance class (or depth) to rank the population. A crowding factor is then used to rank the individuals within each dominance class. Optimiza- 14 tion starts from a randomly generated initial population. The individuals in the population are sorted according to their level of Pareto dominance with respect to other individuals. To be more precise, a fitness value equal to 1 is assigned to the non-dominated individuals. Non-dominated individuals form the first layer (or class). Those individuals dominated only by members of the first layer form the second one and are assigned a fitness value of 2, and so on. In general, for dominated individuals, the fitness is given by the number of dominating layers plus 1. A crowding factor is then assigned to each individual in a given class. The crowding factor is computed as the sum of the Euclidean distances, in criteria space, with respect to other individuals in the same class, divided by the interval spanned by the population along each dimension of the objective space. Inside each class, the individuals with the higher value of the crowding parameter obtain a better rank than those with a lower one. At every generation, binary tournament selection, recombination, and mutation operators are used to create an offspring of the current population. The combination of the two is then sorted according to dominance first and then to crowding. The nondominated individuals with lowest crowding factor are then used to update the population. The parameters to be set are the size of the population, the number of generations, the crossover and mutation probability, pc and pm , and distribution indexes for crossover and mutation, ηc and ηm , respectively. Three different ratios between population size and number of generations were considered: 0.08, 0.33 and 0.75. The values pc and pm were set to 0.9 and 0.2 respectively and kept constant for all the tests. The values, 5, 10 and 20, were considered for ηc , while tests were run for values of ηm equal to 5, 25 and 50. 4.1.2. MOPSO MOPSO is an extension of Particle Swarm Optimization (PSO) to multiobjective problems. Pareto dominance is introduced in the selection criteria for the candidate solutions to update the population. MOPSO features an external archive which stores all the non-dominated solutions and at the same time is used to guide the search process of the 15 swarm. This is done by introducing the possibility to direct the movement of a particle towards one of the less crowded solutions in the archive. The solution space is subdivided into hypercubes through an adaptive grid. The solutions in the external archive are thus reorganized in these hypercubes. The algorithm keeps track of the crowding level of each hypercube and promotes movements towards less crowded areas. In a similar manner, it also gives priority to the insertion of new non-dominated individuals in less crowded areas if the external archive has already reached its predefined maximum size. For MOPSO three different ratios between population size and number of generations were tested: 0.08 0.33 0.75. It was also tested with three different numbers of subdivisions of the solution space: 10, 30, and 50. The inertia component in the motion of the particles was set to 0.4 and the weights of the social and individualistic components were se to 1 4.1.3. PAES PAES is a (1 + 1) Evolution Strategy with the addition of an external archive to store the current best approximation of the Pareto front. It adopts a population of only a single chromosome which, at every iteration, generates a mutated copy. The algorithm then preserves the non-dominated one between the parent and the candidate solution. If none of the two dominates the other, the algorithm then checks their dominance index with respect to the solutions in the archive. If also this comparison is inconclusive, then the algorithm selects the one which resides in the less crowded region of the objective space. To keep track of the crowding level of the objective space, the latter is subdivided in an n-dimensional grid. Every time a new solution is added to (or removed from) the archive, the crowding level of the corresponding grid cell is updated. PAES has two main parameters that need to be set, the number of subdivisions in the space grid and the mutation probability. Values of 1,2 and 4 were used for the former and 0.6 0.8 and 0.9 were used for the latter. 16 4.1.4. MTS MTS is an algorithm based on pattern search. The algorithm first generates a population of uniformly distributed individuals. At every iteration, a local search is performed by a subset of individuals. Three different search patterns are included in the local search: the first is a search along the direction of each decision variable with a fixed step length; the second is analogous but the search is limited to one fourth of all the possible search directions; the third one also searches along each direction but selects only solutions which are evenly spaced on each dimension within a predetermined upper bound and lower bound. At each iteration and for each individual, the three search patterns are tested with few function evaluations to select the one which generates the best candidate solutions for the current individual. The selected one is then used to perform the local search which will update the individual itself. The step length along each direction, which defines the size of the search neighbourhood for each individual, is increased if the local search generated a non-dominated child and is decreased otherwise. When the neighbourhood size reaches a predetermined minimum value, it is reset to 40% of the size of the global search space. The non-dominated candidate solutions are then used to update the best approximation of the global Pareto front. MTS was tested with a population size of 20, 40 and 80 individuals. 4.2. PERFORMANCE METRICS Two metrics were defined to evaluate the performance of the tested multiobjective optimizers: Mspr = Mconv = Mp 1 X fj − g i min 100 Mp i=1 j∈Np gi Np gj − fi 1 X min 100 Np i=1 j∈Mp gj (14) (15) where Mp is the number of elements, with objective vector g, in the true global Pareto front and Np is the number of elements, with objective vector f , in the Pareto front that a given algorithm is producing. Although similar, the two metrics are measuring two 17 different things: Mspr is the sum, over all the elements in the global Pareto front, of the minimum distance of all the elements in the Pareto front Np from the the ith element in the global Pareto front. Mconv , instead, is the sum, over all the elements in the Pareto front Np , of the minimum distance of the elements in the global Pareto front from the ith element in the Pareto front Np . Therefore, if Np is only a partial representation of the global Pareto front but is a very accurate partial representation, then metric Mspr would give a high value and metric Mconv a low value. If both metrics are high then the Pareto front Np is partial and poorly accurate. The index Mconv is similar to the mean Euclidean distance [15], although in Mconv the Euclidean distance is normalized with respect to the values of the objective functions, while Mspr is similar to the generational distance [18], although even for Mspr the distances are normalized. Given n repeated runs of a given algorithm, we can define two performance indexes: pconv = P (Mconv < tolconv ) or the probability that the index Mconv achieves a value less than the threshold tolconv and pspr = P (Mspr < tolspr ) or the probability that the index Mspr achieves a value less than the threshold tolconv . According to the theory developed in [7, 19], 200 runs are sufficient to have a 95% confidence that the true values of pconv and pspr are within a ±5% interval containing their estimated value. Performance index (14) and (15) tend to uniformly weigh every part of the front. This is not a problem for index (14) but if only a relatively small portion of the front is missed the value of performance index (15) might be only marginally affected. For this reason, we slightly modified the computation of the indexes by taking only the MP∗ and NP∗ solutions with a normalised distance in criteria space that was higher than 10−3 . The global fronts used in the three space tests were built by taking a selection of about 2000 equispaced, in criteria space, nondominated solutions coming from all the 200 runs of all the algorithms. 18 4.3. PRELIMINARY TEST CASES For the preliminary tests, two sets of functions, taken from the literature [14, 15], were used and the performance of MACS was compared to the results in [14] and [15]. Therefore, for this set of tests, MTS was not included in the comparison. The function used in this section can be found in Table 1. Table 1: Multiobjective test functions The first three functions were taken from [15]. Test cases Deb and Scha are two examples of disconnected Pareto fronts, Deb2 is an example of problem presenting multiple local Pareto fronts, 60 in this two dimensional case. The last three functions are instead taken from [14]. Test case ZDT 2 has a concave Pareto front with a moderately high-dimensional search space. Test case ZDT 6 has a concave Pareto front but because of the irregular nature of f1 there is a strong bias in the distribution of the solutions. Test case, ZDT4, with dimension 10, is commonly recognized as one of the most challenging problems since it has 219 different local Pareto fronts of which only one corresponds to the global Pareto-optimal front. As a preliminary proof of the effectiveness of MACS, the average Euclidean distance of 500 uniformly spaced points on the true optimal Pareto front from the solutions stored in Ag by MACS was computed and compared to known results in the literature. MACS was run 20 times to have a sample comparable to the one used for the other algorithms. The global archive was limited to 200 elements to be consistent with [14]. The value of the crowding factor wc , the threshold ρtol and the convergence ρmin were kept constant to 1e-5 in all the cases to provide good local convergence. To be consistent with [15], on Deb, Scha and, Deb2, MACS was run respectively for 4000, 1200 and 3200 function evaluations. Only two agents were used for these lower dimensional cases, with fe = 1/2. On test cases ZDT 2, ZDT 4 and ZDT 6, MACS was run for a maximum of 25000 function evaluations to be consistent with [14], with three agents and fe = 2/3 for ZDT 2 and four agents and fe = 3/4 on ZDT 4 and ZDT 6. 19 The results on Deb, Scha and, Deb2 can be found in Table 2, while the results on ZDT 2, ZDT 4 and ZDT 6 can be found in 3. On all the smaller dimensional cases MACS performs comparably to MOPSO and better than PAES. It also performs than NSGA-II on Deb and Deb2. On Scha MACS performs apparently worse than NSGA-II, although after inspection one can observe that all the elements of the global archive Ag belong to the Pareto front but not uniformly distributed, hence the higher value of the Euclidean distance. On the higher dimensional cases, MACS performs comparably to NSGA-II on ZDT2 but better than all the others on ZDT4 and ZDT6. Note in particular the improved performance on ZDT4. Table 2: Comparison of the average Euclidean distances between 500 uniformly space points on the optimal Pareto front for various optimization algorithms: smaller dimension test problems. Table 3: Comparison of the average Euclidean distances between 500 uniformly space points on the optimal Pareto front for various optimization algorithms: larger dimension test problems. On the same six functions a different test was run to evaluate the performance of different variants of MACS. For all variants, the number of agents, fe , wc , ρtol and ρmin was set as before, but instead of the mean Euclidean distance, the success rates pconv and pspr were measured for each variant. The number of function evaluations for ZDT 2, ZDT 4, ZDT 6 and Deb2 is the same as before, while for Scha and Deb it was reduced respectively to 600 and 1000 function evaluations given the good performance of MACS already for this number of function evaluations. Each run was repeated 200 times to have good confidence in the values of pconv and pspr . Four variants were tested and compared to the full version of MACS. Variant MACS no local does not implement the individualistic moves and the local archive, variant MACS ρ = 1 has no adaptivity on the neighborhood, its size is kept fixed to 1,variant MACS ρ = 0.1 has the size of the neighborhood fixed to 0.1, variant MACS no attraction has the attraction mechanisms not active. 20 The result can be found in Table 4. The values of tolconv and tolspr are respectively 0.001 and 0.0035 for ZDT 2, 0.003 and 0.005 for ZDT 4, 0.001 and 0.025 for ZDT 6, 0.0012 and 0.035 for Deb, 0.0013 and 0.04 for Scha, 0.0015 and 0.0045 for Deb2. This thresholds were selected to highlight the differences among the various variants. The table shows that the adaptation mechanism is beneficial in some cases although, in others, fixing the value of ρ might be a better choice. This depends on the problem and a general rule is difficult to derive at present. Other adaptation mechanisms could further improve the performance. The use of individualistic actions coupled with a local archive is instead fundamental, so is the use of the attraction mechanism. Note, however, how the attraction mechanism penalizes the spreading on biassed problems like ZDT 6, this is expected as it accelerates convergence. Table 4: Comparison of different variants of MACS. 4.4. APPLICATION TO SPACE TRAJECTORY DESIGN In this section we present the application of MACS to three space trajectory problems: a two-impulse orbit transfer from a Low Earth Orbit (LEO) to a high-eccentricity Molniya-like orbit, a three-impulse transfer from a LEO to Geostationary Earth Orbit (GEO) and a multi-gravity assist transfer to Saturn equivalent to the transfer trajectory of the Cassini mission. The first two cases are taken from the work of Minisci et al. [7]. In the two-impulse case, the spacecraft departs at time t0 from a circular orbit around the Earth (the gravity constant is µE = 3.9860105 km3 s−2 ) with radius r0 = 6721 km and at time tf is injected into an elliptical orbit with eccentricity eT = 0.667 and semimajor axis aT = 26610 km. The transfer arc is computed as the solution of a Lambert’s problem [20] and the objective functions are the transfer time T = tf − t0 and the sum of the two norms of the velocity variations at the beginning and at the end of the transfer arc ∆vtot . The objectives are functions of the solution vector x = [t0 tf ]T ∈ D ⊂ R2 The search space D is defined by the following intervals t0 ∈ [0 10.8], and tf ∈ [0.03 10.8]. 21 In the three-impulse case, the spacecraft departs at time t0 from a circular orbit around the Earth with radius r0 = 7000 km and after a transfer time T = t1 + t2 is injected into a circular orbit with radius rf = 42000. An intermediate manoeuvre is performed at time t0 + t1 and at position defined in polar coordinates by the radius r1 and the angle θ1 . The objective functions are the total transfer time T and the sum of the three impulses ∆vtot . The solution vector in this case is x = [t0 , t1 , r1 , θ1 , tf ]T ∈ D ⊂ R5 . The search space D is defined by the following intervals t0 ∈ [0 1.62], t1 ∈ [0.03 21.54], r1 ∈ [7010 105410], θ1 ∈ [0.01 2π − 0.01], and t2 ∈ [0.03 21.54]. The Cassini case consists of 5 transfer arcs connecting a departure planet, the Earth, to the destination planet, Saturn, through a sequence of swing-by’s with the planets: Venus, Venus, Earth, Jupiter. Each transfer arc is computed as the solution of a Lambert’s problem [21] given the departure time from planet Pi and the arrival time at planet Pi+1 . The solution of the Lambert’s problems yields the required incoming and outgoing velocities at each swing-by planet vin and vrout . The swing-by is modeled through a linked-conic approximation with powered maneuvers [22], i.e., the mismatch between the required outgoing velocity vrout and the achievable outgoing velocity vaout is compensated through a ∆v maneuver at the pericenter of the gravity assist hyperbola. The whole trajectory is completely defined by the departure time t0 and the transfer time for each leg Ti , with i = 1, ..., 5. The normalized radius of the pericenter rp,i of each swing-by hyperbola is derived a posteriori once each powered swing-by manoeuvre is computed. Thus, a constraint on each pericenter radius has to be introduced during the search for an optimal solution. In order to take into account this constraint, one of the objective functions is augmented with the weighted violation of the constraints: f (x) = ∆v0 + 4 X ∆vi + ∆vf + 4 X wi (rp,i − rpmin,i )2 (16) i=1 i=1 for a solution vector x = [t0 , T1 , T2 , T3 , T4 , T5 ]T . The objective functions are, the toP tal transfer time T = 5i Ti and f (x). The minimum normalized pericenter radii are rpmin,1 = 1.0496, rpmin,2 = 1.0496, rpmin,3 = 1.0627 and rpmin,4 = 9.3925. The 22 search space D is defined by the following intervals: t0 ∈ [−1000, 0]MJD2000, T1 ∈ [30, 400]d, T2 ∈ [100, 470]d, T3 ∈ [30, 400]d, T4 ∈ [400, 2000]d, T5 ∈ [1000, 6000]d. The best known solution for the single objective minimization of f (x) is fbest = 4.9307 km/s, with xbest = [−789.753, 158.2993, 449.3859, 54.7060, 1024.5896, 4552.7054]T . 4.4.1. Test Results For this second set of tests, each algorithm was run for the same number of function evaluations. In particular, consistent with the tests performed in the work of Minisci et al., [7] we used 2000 function evaluations for the two-impulse case and 30000 for the three-impulse case. For the Cassini case, instead, the algorithms were run for 180000, 300000 and 600000 function evaluations. Note that the version of all the algorithms used in this second set of tests is the one that is freely available online, written in c/c++. We tried in all cases to stick to the available instructions and recommendations by the author to avoid any bias in the comparison. The thresholds values for the two impulse cases was taken from [7] and is tolconv = 0.1, tolspr = 2.5. For the three-impulse case instead we considered tolconv = 5.0, tolspr = 5.0. For the Cassini case we used tolconv = 0.75, tolspr = 5, instead. These values were selected after looking at the dispersion of the results over 200 runs. Lower values would result in a zero value of the performance indexes of all the algorithms, which is not very significant for a comparison. MACS was tuned on the three-impulse case. In particular, the crowding factor wc , the threshold ρtol and the convergence ρmin were kept constant to 1e-5, which is below the required local convergence accuracy, while fe and npop were changed. A value of 1e-5 is expected to provide good local convergence and good density of the samples belonging to the Pareto front. Table 5 reports the value of performance indexes pconv and pspr over 200 runs of MACS with different settings. The index pspr and the index pconv have different, almost opposite, trends. However, it was decided to select the setting that provides the best convergence,i.e. npop = 15 and fe = 1/3. This setting will be used for all the tests in this paper. On top of the complete algorithm, two variants of MACS were tested: one without 23 individualistic moves and local archive, denoted as no local in the tables, and one with no attraction towards the global archive Ag , denoted as no att in the tables. Only these two variants are tested on these cases as they displayed the most significant impact in the previous standard test cases and more importantly were designed specifically to improve performances. NSGA-II, PAES, MOPSO and MTS were tuned as well on the three-impulse case. In particular, for NSGA-II the best result was obtained for 150 individuals and can be found in Table 6. A similar result could be obtained for MOPSO, see Table 7. For MTS only the population was changed while the number of individuals performing local moves was kept constant to 5. The results of the tuning of MTS can be found in Table 9. For the tuning of PAES the results can be found in Table 8. All the parameters tuned in the three impulse case were kept constant except for the population size of NSGA-II and MOPSO. The size of the population of NSGA-II and MOPSO was set to 100 and 40 respectively on the two impulse case and was increased with the number of function evaluations in the Cassini case. In particular for NSGAII the following ratios between population size and number of function evaluations was used: 272/180000, 353/300000, 500/600000. For MOPSO the following ratios between population size and number of function evaluations was used: 224/180000, 447/300000, 665/600000. This might not be the best way to set the population size for these two algorithms but it is the one that provided better performance in these tests. Note that the size of the global archive for MACS was constrained to be lower than the size of the population of NSGA-II, in order to avoid any bias in the computation of Mspr . The performance of all the algorithms on the Cassini case can be found in Table 12 for a variable number of function evaluations. Figure 2: Three-impulse test case: a) Complete Pareto front, b) close-up of the Pareto fronts Table 5: Indexes pconv and pspr for different settings of MACS 24 Figure 3: Cassini test case: a) Complete Pareto front, b) close-up of the Pareto fronts For the three-impulse case, MACS was able to identify an extended Pareto front (see Fig.2(a) and Fig. 2(b) where all the non-dominated solutions from all the 200 runs are compared to the global front), compared to the results in [7]. The gap in the Pareto front is probably due to a limited spreading of the solutions in that region. Note the cusp due the transition between the condition in which 2-impulse solutions are optimal and the condition in which 3-impulse solutions are optimal. Table 11 summarizes the results of all the tested algorithms on the two-impulse case. The average value of the performance metrics is reported with, in brackets, the associated variance over 200 runs. The two-impulse case is quite easy and all the algorithms have no problems identifying the front. However, MACS displays a better convergence than the other algorithms while the spreading of MOPSO and MTS is superior to the one of MACS. The three-impulse case is instead more problematic (see Table 10). NSGA-II is not able to converge to the upper-left part of the front and therefore the convergence is 0 and the spreading is comparable to the one of MACS. All the other algorithms perform poorly with a value of almost 0 for the performance indexes. This is mainly due to the fact that no one can identify the vertical part of the front. Note that the long tail identified by NSGA-II is actually dominated by two points belonging to the global front (see 2(b)). Table 12 reports the statistics for the Cassini problem. On top of the performance of the three variants tested on the other two problems, the table reports also the result for 10 agents and fe = 5. For all numbers of function evaluations MACS has better spreading than NSGA-II because NSGA-II converges to a local Pareto front. Nonetheless NSGAII displays a more regular behavior and a better convergence for low number of function evaluations although it never reaches the best front. The Pareto fronts are represented in Fig. 3(a) and Fig. 3(b) (even in this case the figures represent all the non-dominated solutions coming from all the 200 runs). Note that, the minimum f returned by MACS 25 is the best known solution for the single objective version of this problem (see [9]). All the other algorithms perform quite poorly on this case. Of all the variants of MACS tested on these problems the full complete one is performing the best. As expected, in all three cases, removing the individualistic moves severely penalizes both convergence and spreading. It is interesting to note that removing the attraction towards the global front is also comparatively bad. On the two impulse case it does not impact the spreading but reduces the convergence, while on the Cassini case, it reduces mean and variance but the success rates are zero. The observable reason is that MACS converges slower but more uniformly to a local Pareto front. Finally, it should be noted that mean and variance seem not to capture the actual performance of the algorithms. In particular they do not capture the ability to identify the whole Pareto front as the success rates instead do. Table 6: NSGAII tuning on the 3-impulse case Table 7: PAES tuning on the 3-impulse case 5. CONCLUSIONS In this paper we presented a hybrid evolutionary algorithm for multiobjective optimization problems. The effectiveness of the hybrid algorithm, implemented in a code called MACS, was demonstrated at first on a set of standard problems and then its performance was compared against NSGA-II, PAES, MOPSO and MTS on three space trajectory design problems. The results are encouraging as, for the same computational effort (measured in number of function evaluations, MACS was converging more accuTable 8: MOPSO tuning on the 3-impulse case. Table 9: MTS tuning on the 3-impulse 26 rately than NSGA-II on the two-impulse case and managed to find a previously undiscovered part of the Pareto front of the three-impulse case. As a consequence, on the three-impulse case, MACS, has better performance metrics than the other algorithms. On the Cassini case NSGA-II appears to converge better to some parts of the front although MACS yielded solutions with better f and identifies once more a part of the front that NSGA-II cannot attain. PAES and MTS do not perform well on the Cassini case, while MOPSO converges well locally but, with the settings employed in this study, yielded a very poor spreading. From the experimental tests in this paper we can argue that the following mechanisms seem to be particularly effective: the use of individual local actions with a local archive as they allow the individuals to move towards and within the Pareto set; the use of an attraction mechanism as it accelerates convergence. Finally it should be noted that all the algorithms tested in this study use the Pareto dominance as selection criterion. Different criteria, like the decomposition in scalar subproblems, can be equality implemented in MACS, without disrupting its working principles, and lead to different performance results. ACKNOWLEDGEMENTS The authors would like to thank Dr. Edmondo Minisci and Dr. Guilio Avanzini for the two and three impulse cases and the helpful advice. REFERENCES [1] V. Coverstone-Caroll, J.W. Hartmann, and W.M. Mason. Optimal multi-objective low-thrust spacecraft trajectories. Computer Methods in Applied Mechanics and Engineering, 186:387–402, 2000. [2] B. Dachwald. Optimization of interplanetary solar sailcraft trajectories using evolutionary neurocontrol. Journal of Guidance, and Dynamics, February 2004. [3] S. Lee, P. von Allmen, W. Fink, A.E. Petropoulos, and R.J. Terrile. Multiobjective evolutionary algorithms for low-thrust orbit transfer optimization. In 27 Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2005), Washington DC, USA, June 25–29 2005. [4] O. Schütze, M. M. Vasile, and C.A. Coello Coello. Approximate solutions in space mission design. In Parallel Problem Solving from Nature (PPSN 2008), Dortmund, Germany, September 13–17 2008. [5] O. Schütze, M. Vasile, O. Junge, M. Dellnitz, and D. Izzo. Designing optimal low-thrust gravity-assist trajectories using space pruning and a multi-objective approach. Engineering Optimization, 41(2), February 2009. [6] M. Dellnitz, S. Ober-Blbaum, M. Post, O. Schtze, and Bianca Thiere. A multiobjective approach to the design of low thrust space trajectories using optimal control. Celestial Mechanics and Dynamical Astronomy, 105(1), February 2009. [7] E. Minisci and G. Avanzini. Optimisation of orbit transfer manoeuvres as a test benchmark for evolutionary algorithms. In Proceedings of the 2009 IEEE Congress on Evolutionary Computation (CEC2009), Trondheim, Norway, May 2009. [8] M. Vasile. A behavioral-based meta-heuristic for robust global trajectory optimization. In Proceedings of the 2007 IEEE Congress on Evolutionary Computation (CEC2007), Singapore, September 2007. [9] M. Vasile and M. Locatelli. A hybrid multiagent approach for global trajectory optimization. Journal of Global Optimization, 44(4):461–479, August. 2009. [10] Oliver Schütze, Adriana Lara, Gustavo Sanchez, and Carlos A. Coello Coello. HCS: A new local search strategy for memetic multi-objective evolutionary algorithms. IEEE Transactions on Evolutionary Computation (to appear), 2010. [11] Q. Zhang and H. Li. Moea/d: A multiobjective evolutionary algorithm based on decomposition. IEEE Transactions on Evolutionary Computation, 11(6), November. 28 [12] K.V. Price, R.M. Storn, and J.A. Lampinen. Differential Evolution. A Practical Approach to Global Optimization. Natural Computing Series. Springer, 2005. [13] M. Vasile and F. Zuiani. A hybrid multiobjective optimization algorithm applied to space trajectory optimization. In Proceedings of the IEEE International Conference on Evolutionary Computation, Barcelona, Spain, July 2010. [14] K. A. Deb, A. Pratap, and T. Meyarivan. Fast elitist multi-objective genetic algorithm: Nga-ii. Kangal report no. 200001, KanGAL, 2000. [15] C. Coello and M. Lechuga. Mopso: A proposal for multiple objective particle swarm optimization. Technical report evocinv-01-2001., CINVESTAV. Instituto Politecnico Nacional. Col. San Pedro Zacatenco. Mexico., 2001. [16] J.D. Knowles and D.W. Corne. The pareto archived evolution strategy : A new baseline algorithm for pareto multiobjective optimisation. In Proceedings of the IEEE International Conference on Evolutionary Computation, Washington DC, US, 1999. [17] Lin-Yu Tseng and Chun Chen. Multiple trajectory search for multiobjective optimization. In Proceedings of the IEEE International Conference on Evolutionary Computation, Singapore, 25-28 September 2007. [18] D.A. Van Veldhuizen and G.B. Lamont. Evolutionary computation and convergence to a pareto front. In Late Breaking papers at the Genetic Programming, 1998. [19] M. Vasile, E. Minisci, and M. Locatelli. On testing global optimization algorithms for space trajectory design. In AIAA/AAS Astrodynamic Specialists Conference, Honolulu, Hawaii, USA, Aug 2008. [20] G. Avanzini. A simple lambert algorithm. Journal of Guidance, Control, and Dynamics, 31(6):1587–1594, Nov.–Dec. 2008. [21] R. Battin. An Introduction to the Mathematics and Methods of Astrodynamics. AIAA, 1999. 29 [22] D. R. Myatt, V.M. Becerra, S.J. Nasuto, and J.M. Bishop. mization tools for mission analysis and design. Final rept. esa ariadna itt ao4532/18138/04/nl/mv,call03/4101, ESA/ESTEC, 2004. 30 Global opti- Table 10: Summary of metrics Mconv and Mspr , and associated performance indexes pconv and pspr , on the three impulse test cases. Table 11: Metrics Mconv and Mspr , and associated performance indexes pconv and pspr , on the two impulse test cases. Table 12: Metrics Mconv and Mspr , and associated performance indexes pconv and pspr , on the Cassini case. 31 NOMENCLATURE Ag global archive Al local archive aT semimajor axis D search space eT eccentricity f cost function fe fraction of the population doing local moves Id dominance index Mconv convergence metrics Mspr spreading metrics Nρ neighborhood of solution x Ne maximum number of allowed function evaluations neval number of function evaluations npop population size Pi i-th planet Pk population at generation k pconv percentage of success on convergence pspr percentage of success on spreading r random number rp pericentre radius rpmin minimum pericentre radius S selection function s resource index T transfer time t0 departure time ti manoeuvre time tf final time U uniform distribution 32 u variation of the solution x X Pareto optimal set x solution vector y mutate individual wc tolerance on the maximum allowable crowding Greek symbols ∆v variation of velocity ρ size of the neighborhood Nρ µE gravity constant θi true anomaly of manoeuvre i 33 LIST OF TABLES Table 1: Multiobjective test functions Scha x ∈ [−5, 10] Deb x1 , x2 ∈ [0, 1] α = 2; q = 4 Deb2 x1 ∈ [0, 1] x2 ∈ [−30, 30] ZDT2 xi ∈ [0, 1]; i = 1, . . . , n n = 30 ZDT4 x1 ∈ [0, 1]; xi ∈ [−5, 5]; i = 2, . . . , n n = 10 ZDT6 xi ∈ [0, 1]; i = 1, . . . , n n = 10 2 f2 = (x  − 5) −x    −2 + x f1 = 4−x    −4 + x f1 = x1 h if if if if f2 = (1 + 10x2 ) 1 − i x1 sin(2πqx ) 1 1+10x2 x≤1 1<x<3 3<x≤4 x>4  x1 1+10x2 α − f1 = x1 f2 = g(x1 , x2 )h(x1 ,q x2 ); g(x1 , x2 ) = 11 + x22 − 10 cos(2πx2 ) n 1 − fg1 iff1 ≤ g h(x1 , x2 ) = 0 otherwise 9 Pn g = 1 + n−1 i=2 xi f1 2 h=1−( g ) f1 = x1 ; f2 = gh g = 1 + 10(n q − 1) + f1 g h=1− f1 = x1 ; f2 = gh Pn 2 i=2 [xi − 10 cos(2πqxi )]; q Pn i=2 xi g = 1 + 9 4 n−1 h = 1 − ( fg1 )2 f1 = 1 − exp(−4x1 ) sin6 (6πx1 ); f2 = gh Table 2: Comparison of the average Euclidean distances between 500 uniformly space points on the optimal Pareto front for various optimization algorithms: smaller dimension test problems. Approach MACS NSGA-II PAES MOPSO Deb2 Scha Deb 1.542e-3 (5.19e-4) 0.094644 (0.117608) 0.259664 (0.573286) 0.0011611 (0.0007205) 3.257e-3 (5.61e-4) 0.001594 (0.000122) 0.070003 (0.158081) 0.00147396 (0.00020178) 7.379e-4 (6.36e-5) 0.002536 (0.000138) 0.002881 (0.00213) 0.002057 (0.000286) 34 Table 3: Comparison of the average Euclidean distances between 500 uniformly space points on the optimal Pareto front for various optimization algorithms: larger dimension test problems. Approach MACS NSGA-II PAES ZDT2 ZDT4 ZDT6 9.0896e-4 (4.0862e-5) 0.000824 (<1e-5) 0.126276 (0.036877) 0.0061 (0.0133) 0.513053 (0.118460) 0.854816 (0.527238) 0.0026 (0.0053) 0.296564 (0.013135) 0.085469 (0.006644) Table 4: Comparison of different versions of MACS. Approach Metric ZDT2 ZDT4 ZDT6 Scha Deb Deb2 MACS pconv pspr pconv pspr pconv pspr pconv pspr pconv pspr 83.5% 22.5% 14% 1% 84% 22% 56% 5% 21% 0% 75% 28% 0% 0% 22% 7% 42% 15% 0.5% 0.5% 77% 58.5% 45% 34% 78% 63% 57% 61% 14.5% 78.5% 73% 38.5% 0.5% 0% 37% 0% 78% 88% 0.5% 0% 70.5% 83% 72.5% 4% 92% 54% 85% 94.5% 88.5% 0% 60% 67.5 % 11% 15% 21% 38% 42% 74% 0% 0% MACS no local MACS ρ=1 MACS ρ = 0.1 MACS no attraction Table 5: Indexes pconv and pspr for different settings of MACS on the 3-impulse case pconv npop = 5 npop = 10 npop = 15 fe = 1/3 fe = 1/2 fe = 2/3 45.5% 48.0% 45.0% 55.5% 51.0% 52.5% 61.0% 55.5% 43.0% pspr fe = 1/3 fe = 1/2 fe = 2/3 npop = 5 68.5% 65.0% 67.5% npop = 10 62.0% 57.0% 51.0% npop = 15 56.0% 46.0% 36.5% 35 Table 6: NSGAII tuning on the 3-impulse case Mean Mconv ηc / ηm 5 10 20 Mean Mspr ηc / ηm 5 10 20 pconv ηc / ηm 5 10 20 5 36.1 32.3 31.7 25 38.3 39.4 39.6 50 43.0 40.6 42.5 5 6.77 5.91 5.78 25 7.24 7.50 7.50 50 8.08 7.81 8.16 5 0.0% 0.0% 0.0% 25 0.0% 0.0% 0.0% 50 0.0% 0.0% 0.0% Var Mconv ηc / ηm 5 10 20 Var Mspr ηc / ηm 5 10 20 pspr ηc / ηm 5 10 20 5 201.0 182.0 175.0 25 202.0 172.0 183.0 50 185.0 182.0 169.0 5 9.97 9.74 9.75 25 9.47 8.68 8.53 50 7.25 8.34 8.04 5 44.8% 57.8% 61.0% 25 37.7% 33.1% 32.5% 50 23.4% 29.2% 24.7% Table 7: MOPSO tuning on the 3-impulse case. Mean Mconv Particles/Subdivisions 50 100 150 Mean Mspr Particles/Subdivisions 50 100 150 pconv Particles/Subdivisions 50 100 150 10 59.1 50.0 47.8 30 50.2 43.3 41.4 50 41.5 41.3 39.4 10 16.1 14.7 14.8 30 13.5 12.2 11.9 50 12.3 11.6 11.4 10 0% 0% 0% 30 0% 0% 0% 50 0% 0% 0% 36 Var Mconv Particles/Subdivisions 50 100 150 Var Mspr Particles/Subdivisions 50 100 150 pspr Particles/Subdivisions 50 100 150 10 1080.0 591.0 562.1 30 1010.2 721.1 550.2 50 713.3 778.1 608.2 10 41.3 32.8 30.0 30 37.3 25.8 22.2 50 24.0 24.5 22.5 10 0.5% 0.5% 0.5% 30 2.5% 4.5% 2% 50 3.5% 4% 4% Table 8: PAES tuning on the 3-impulse case Mean Mconv Subdivisions/Mutation 1 2 4 Mean Mspr Subdivisions/Mutation 1 2 4 pconv Subdivisions/Mutation 1 2 4 0.6 53.7 52.8 53.0 0.8 70.6 70.2 70.2 0.9 70.2 70.0 70.1 0.6 14.2 13.6 13.8 0.8 27.7 27.6 27.7 0.9 36.7 36.6 36.6 0.6 0.0% 0.0% 0.0% 0.8 0.0% 0.0% 0.0% 0.9 0.0% 0.0% 0.0% Var Mconv Subdivisions/Mutation 1 2 4 Var Mspr Subdivisions/Mutation 1 2 4 pspr Subdivisions/Mutation 1 2 4 0.6 525.0 479.0 453.0 0.8 275.0 266.0 266.0 0.9 297.0 305.0 311.0 0.6 20.0 17.5 17.2 0.8 14.3 14.6 15.8 0.9 17.3 16.8 17.0 0.6 0.0% 0.0% 0.0% 0.8 0.0% 0.0% 0.0% 0.9 0.0% 0.0% 0.0% Table 9: MTS tuning on the 3-impulse 3imp Mconv Mspr Population Mean Var Mean Var pconv pspr 20 17.8 97.6 12.6 34.7 1.0% 0.5% 40 22.6 87.8 19.9 26.2 0.0% 0.0% 80 23.6 73.2 18.4 18.6 0.0% 0.0% Table 10: Summary of metrics Mconv and Mspr , and associated performance indexes pconv and pspr , on the three impulse test cases. Metric MACS MACS no local MACS no att NSGA-II PAES MOPSO MTS Mconv 5.53 (15.1) 5.25 (3.73) 61.0% 56.0% 7.58 (26.3) 6.03 (3.95) 40.5% 36% 154.7 (235.0) 9.16 (2.07) 0.0% 0.0% 31.7 (175.0) 5.78 (9.75) 0.0% 61.0% 53.0 (453.0) 13.8 (17.2) 0.0% 0.0% 39.4 (608.1) 11.4 (22.5) 0% 4.0% 17.8 (97.6) 12.6 (34.7) 1.0% 0.5% Mspr pconv pspr 37 Table 11: Metrics Mconv and Mspr , and associated performance indexes pconv and pspr , on the two impulse test cases. Metric MACS MACS no local MACS no att NSGA-II PAES MOPSO MTS Mconv 0.0077 (1e-3) 2.89 (0.49) 98.5% 29.5% 0.0039 (1.4e-2) 6.87 (7.36) 91.5% 0% 0.0534 (9.5e-3) 3.08 0.943 84% 24% 0.283 (4.35e-3) 2.47 (0.119) 0% 62.5% 0.198 (0.332) 332.0 (2.61e4) 75.5% 0.5% 0.378 (0.0636) 2.11 (2.65) 9% 94.5% 0.151 (0.083) 1.95 (1.41) 57.5% 85.5% Mspr pconv pspr 38 Table 12: Metrics Mconv and Mspr , and associated performance indexes pconv and pspr , on the Cassini case. Approach Metric 180k 300k 600k MACS 5/15 Mconv Mspr pconv pspr 6.50 (229.1) 12.7 (126.0) 6% 27.5% 4.48 (107.1) 11.1 (83.1) 14% 31% 3.91 (62.6) 8.64 (35.5) 21.5% 41% MACS 5/10 Mconv Mspr pconv pspr 6.74 (217.9) 12.1 (83.0) 8% 26.0% 5.56 (136.4) 10.3 (63.7) 10% 31.5% 3.14 (50.1) 8.11 (30.0) 25.5% 45.5% MACS no local Mconv Mspr pconv pspr 13.5 (436.2) 31.1 (274.3) 1.0% 1.0% 10.2 (350.1) 27.9 (278.9) 1.5% 2.5% 7.86 (190.2) 21.9 (226.7) 2.5% 6% MACS no att Mconv Mspr pconv pspr 2.62 (1.46) 27.8 (83.2) 0.0% 0.0% 2.2 (0.88) 22.9 (58.0) 0.0% 0.0% 1.82 (0.478) 18.2 (28.0) 1.0% 0.0% NSGA-II Mconv Mspr pconv pspr 2.43 (18.0) 11.6 (71.4) 17.5% 15.5% 1.99 (16.8) 11.0 (47.5) 24.0% 12.5% 1.24 (1.62) 8.78 (28.2) 29.0% 25.0% MOPSO Mconv Mspr pconv pspr 2.62 (7.33) 28.0 (308.3) 0.5% 0.0% 2.4 (2.57) 24.6 (260.4) 1.0% 0.0% 2.14 (0.94) 21.8 (231.3) 1.0% 0.5% PAES Mconv Mspr pconv pspr 24.0 (54.5) 30.1 (47.3) 0.0% 0.0% 19.8 (32.9) 26.0 (33.9) 0.0% 0.0% 15.2 (16.6) 21.4 (19.5) 0.0% 0.0% MTS Mconv Mspr pconv pspr 3.71 (1.53) 18.1 (18.2) 0.0% 0.0% 3.39 (1.67) 15.6 (13.4) 0.0% 0.0% 3.02 (1.69) 13.1 (8.46) 0.0% 0.0% 39 LIST OF FIGURES 40 (a) (b) Figure 1: Illustration of the a) local moves and archive and b) global moves and archive. 41 Pareto Front Comparison 30 Global MACS NSGA−II 25 20 T [h] Part of the front not identified by NSGAII 15 10 Dominated tail 5 0 0 50 100 150 ∆v tot 200 [km/s] 250 300 350 (a) Pareto Front Comparison 8 Global MACS NSGA−II 7 6 T [h] 5 4 Dominated tail 3 2 1 0 10 20 30 40 ∆ vtot [km/s] 50 60 (b) Figure 2: Three-impulse test case: a) Complete Pareto front, b) close-up of the Pareto fronts 42 Pareto Front Comparison 7000 Global MACS NSGA−II 6000 T [day] 5000 4000 3000 2000 1000 0 50 100 150 200 250 f [km/s] (a) Pareto Front Comparison Global MACS NSGA−II 6000 5500 T [day] 5000 4500 4000 3500 3000 2500 2000 4 5 6 7 f [km/s] 8 9 10 (b) Figure 3: Cassini test case: a) Complete Pareto front, b) close-up of the Pareto fronts 43 Pareto Front Comparison 7000 Global NSGA−II MACS 6000 T [day] 5000 4000 3000 2000 1000 0 50 100 150 f [km/s] 200 250 Close−up of the Cassini Pareto fronts 7000 Global NSGA−II MACS T [day] 6000 5000 4000 3000 2000 5 5.5 6 6.5 f [km/s] 7 7.5 8
5cs.CE
Statistical Query Lower Bounds for Robust Estimation of High-Dimensional Gaussians and Gaussian Mixtures arXiv:1611.03473v2 [cs.LG] 17 May 2017 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] May 18, 2017 Abstract We describe a general technique that yields the first Statistical Query lower bounds for a range of fundamental high-dimensional learning problems involving Gaussian distributions. Our main results are for the problems of (1) learning Gaussian mixture models (GMMs), and (2) robust (agnostic) learning of a single unknown Gaussian distribution. For each of these problems, we show a super-polynomial gap between the (information-theoretic) sample complexity and the computational complexity of any Statistical Query algorithm for the problem. Statistical Query (SQ) algorithms are a class of algorithms that are only allowed to query expectations of functions of the distribution rather than directly access samples. This class of algorithms is quite broad: a wide range of known algorithmic techniques in machine learning are known to be implementable using SQs. Moreover, for the unsupervised learning problems studied in this paper, all known algorithms with non-trivial performance guarantees are SQ or are easily implementable using SQs. Our SQ lower bound for Problem (1) is qualitatively matched by known learning algorithms for GMMs. At a conceptual level, this result implies that – as far as SQ algorithms are concerned – the computational complexity of learning GMMs is inherently exponential in the dimension of the latent space – even though there is no such information-theoretic barrier. Our lower bound for Problem (2) implies that the accuracy of the robust learning algorithm in [DKK+ 16] is essentially best possible among all polynomial-time SQ algorithms. On the positive side, we also give a new (SQ) learning algorithm for Problem (2) achieving the information-theoretically optimal accuracy, up to a constant factor, whose running time essentially matches our lower bound. Our algorithm relies on a filtering technique generalizing [DKK+ 16] that removes outliers based on higher-order tensors. Our SQ lower bounds are attained via a unified moment-matching technique that is useful in other contexts and may be of broader interest. Our technique yields nearly-tight lower bounds for a number of related unsupervised estimation problems. Specifically, for the problems of (3) robust covariance estimation in spectral norm, and (4) robust sparse mean estimation, we establish a quadratic statistical– computational tradeoff for SQ algorithms, matching known upper bounds. Finally, our technique can be used to obtain tight sample complexity lower bounds for high-dimensional testing problems. Specifically, for the classical problem of robustly testing an unknown mean (known covariance) Gaussian, our technique implies an information-theoretic sample lower bound that scales linearly in the dimension. Our sample lower bound matches the sample complexity of the corresponding robust learning problem and separates the sample complexity of robust testing from standard (non-robust) testing. This separation is surprising because such a gap does not exist for the corresponding learning problem. ∗ † 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 Introduction 1.1 Background and Overview For the unsupervised estimation problems considered here, the input is a probability distribution which is accessed via a sampling oracle, i.e., an oracle that provides i.i.d. samples from the underlying distribution. Statistical Query (SQ) algorithms are a restricted class of algorithms that are only allowed to query expectations of functions of the distribution rather than directly access samples. This class of algorithms is quite broad: a wide range of known algorithmic techniques in machine learning are known to be implementable using SQs. These include spectral techniques, moment and tensor methods, local search (e.g., Expectation Maximization), and many others (see, e.g., [CKL+ 06, FGR+ 13] for a detailed discussion). Moreover, for the unsupervised learning problems studied in this paper, all known algorithms with non-trivial performance guarantees are SQ or are easily implementable using SQs. A number of techniques have been developed in information theory and statistics to characterize the sample complexity of inference tasks. These involve both techniques for proving sample complexity upper bounds (e.g., VC dimension, metric/bracketing entropy) and information-theoretic lower bounds (e.g., Fano and Le Cam methods). On the other hand, computational lower bounds have been much more scarce in the unsupervised setting. Perhaps surprisingly, it is possible to prove unconditional lower bounds on the computational complexity of any SQ algorithm that solves a given learning problem. Given the ubiquity and generality of SQ algorithms, an SQ lower bound provides strong evidence of the problem’s computational intractability. In this paper, we describe a general technique that yields the first Statistical Query lower bounds for a range of fundamental high-dimensional learning problems involving Gaussian distributions. Such problems are ubiquitous in applications across the data sciences and have been intensely investigated by different communities of researchers for several decades. Our main results are for the problems of (1) learning Gaussian mixture models (GMMs), and (2) robust (agnostic) learning of a single unknown Gaussian distribution. In particular, we show a super-polynomial gap between the (information-theoretic) sample complexity and the computational complexity of any Statistical Query algorithm for these problems. In more detail, our SQ lower bound for Problem (1) is qualitatively matched by known learning algorithms for GMMs (all of which can be implemented as SQ algorithms). For Problem (2), we give a new (SQ) algorithm in this paper whose running time nearly matches our SQ lower bound. Our SQ lower bounds are attained via a unified moment-matching technique that is useful in other contexts and may be of broader interest. Our technique yields nearly-tight lower bounds for a number of related unsupervised estimation problems. Specifically, for the problems of (3) robust covariance estimation in spectral norm, and (4) robust sparse mean estimation, we establish a quadratic statistical–computational tradeoff for SQ algorithms, matching known upper bounds. Finally, we use our technique to obtain tight sample complexity lower bounds for high-dimensional testing problems. Specifically, for the classical problem of robustly testing an unknown mean (known covariance) Gaussian, our technique implies an information-theoretic lower bound that scales linearly in the dimension. This lower bound matches the sample complexity of the corresponding robust learning problem and separates the sample complexity of robust testing from standard (non-robust) testing. This separation is surprising because such a gap does not exist for the corresponding learning problem. Before we discuss our contributions in detail, we provide the necessary background for the Statistical Query model and the unsupervised estimation problems that we study. Statistical Query Algorithms. A Statistical Query (SQ) algorithm relies on an oracle that given any bounded function on a single domain element provides an estimate of the expectation of the function on a random sample from the input distribution. This computational model was introduced by Kearns [Kea98] in the context of supervised learning as a natural restriction of the PAC model [Val84]. Subsequently, the SQ model has been extensively studied in a plethora of contexts (see, e.g., [Fel16b] and references therein). 1 A recent line of work [FGR+ 13, FPV15, FGV15, Fel16a] developed a framework of SQ algorithms for search problems over distributions – encompassing the distribution estimation problems we study in this work. It turns out that one can prove unconditional lower bounds on the computational complexity of SQ algorithms via the notion of Statistical Query dimension. This complexity measure was introduced in [BFJ+ 94] for PAC learning of Boolean functions and was recently generalized to the unsupervised setting [FGR+ 13, Fel16a]. A lower bound on the SQ dimension of a learning problem provides an unconditional lower bound on the computational complexity of any SQ algorithm for the problem. Remark. We would like to emphasize here that the SQ lower bounds shown in this paper apply to the running time of an SQ algorithm and not on its sample complexity (when we simulate the SQ algorithm by drawing samples to answer its SQ queries). Specifically, for all learning problems considered in this paper, there exist straightforward SQ algorithms (that can be simulated with sample access to the distribution) with near-optimal sample complexity, albeit with exponential running time. Specifically, lower bounds on the SQ dimension of the corresponding problems establish lower bounds on the running time of any SQ algorithm for the problem – not on its sample complexity. Learning Gaussian Mixture Models. A mixture model is a convex combination of distributions of known type. The most commonly studied case is a Gaussian mixture model (GMM). An n-dimensional k-GMM P is a distribution in Rn that is composed of k unknown Gaussian components, i.e., F = ki=1 wi N (µi , Σi ), where the weights wi , mean vectors µi , and covariance matrices Σi are unknown. The problem of learning a GMM from samples has received tremendous attention in statistics and, more recently, in TCS. A long line of work initiated by Dasgupta [Das99, AK01, VW02, AM05, KSV08, BV08] provides computationally efficient algorithms for recovering the parameters of a GMM under separability assumptions. Subsequently, efficient parameter learning algorithms have been obtained [MV10, BS10, HP15] under minimal information-theoretic separation assumptions. The related problems of density estimation and proper learning have also been extensively studied [FOS06, SOAJ14, DK14, MV10, HP15, LS15]. In density estimation (resp. proper learning), the goal is to output some hypothesis (resp. GMM) that is close to the unknown mixture in total variation distance. The sample complexity of density estimation (and proper learning) for n-dimensional k-GMMs, up to variation distance ǫ, is easily seen to be poly(n, k, 1/ǫ) – without any assumptions.(In Appendix A, we describe a simple SQ algorithm for this learning problem with sample complexity poly(n, k, 1/ǫ), albeit exponential running time). Given that there is no information-theoretic barrier for learnability in this setting, the following question arises: Is there a poly(n, k, 1/ǫ) time algorithm for density estimation (or proper learning) of n-dimensional k-GMMs? This question has been raised as an open problem in a number of settings (see, e.g., [Moi14, Dia16] and references therein). For parameter learning, the situation is somewhat subtle: In full generality, the sample complexity is of the form poly(n) · (1/γ)Ω(k) , where the parameter γ > 0 quantifies the “separation” between the components. Even in one-dimension, a sample complexity lower bound of (1/γ)Ω(k) is known [MV10, HP15]1 . The corresponding “hard” instances [MV10, HP15] consist of GMMs whose components have large overlap, so many samples are required to distinguish between them. Is this the only obstacle towards a poly(n, k) time parameter learning algorithm? Specifically, suppose that we are given an instance of the problem with the additional promise that the components are “nearly non-overlapping” – so that poly(n, k) samples suffice for the parameter learning problem as well. (In Appendix B, we show that when the total variation distance between any pair of components in the given mixture is close to 1, parameter learning reduces to proper learning; hence, there is a poly(n, k)-sample parameter learning (SQ) algorithm that runs in exponential time.) Is there a poly(n, k) time parameter learning algorithm for such instances? 1 To circumvent the information-theoretic bottleneck of parameter learning, a related line of work has studied parameter learning in a smoothed setting [HK13, BCMV14, ABG+ 14, GHK15]. 2 In summary, the sample complexity of both versions of the learning problem is poly(n)f (k). On the other hand, the running time of all known algorithms for either version scales as ng(k) , where g(k) ≥ k. This runtime is super-polynomial in the sample complexity of the problem for super-constant values of k and is tight for these algorithms, even for GMMs with almost non-overlapping components. The preceding discussion is summarized in the following: Question 1.1. Is there a poly(n, k)-time density estimation algorithm for n-dimensional k-GMMs? Is there a poly(n, k)-time parameter learning algorithm for nearly non-overlapping n-dimensional k-GMMs? Robust Learning of a Gaussian. In the preceding paragraphs, we were working under the assumption that the unknown distribution generating the samples is exactly a mixture of Gaussians. The more general and realistic setting of robust (or agnostic) learning – when our assumption about the model is approximately true – turns out to be significantly more challenging. Specifically, until recently, even the most basic setting of robustly learning an unknown mean Gaussian with identity covariance matrix was poorly understood. Without corruptions, this problem is straightforward: The empirical mean gives a sample-optimal efficient estimator. Unfortunately, the empirical estimate is very brittle and fails in the presence of corruptions. The standard definition of agnostically learning a Gaussian (see, e.g., Definition 2.1 in [DKK+ 16] and references therein) is the following: Instead of drawing samples from a perfect Gaussian, we have access to a distribution D that is promised to be close to an unknown Gaussian G – specifically ǫ-close in total variation distance. This is the only assumption about the distribution D, which may otherwise be arbitrary: the ǫfraction of “errors” can be adversarially selected. The goal of an agnostic learning algorithm is to output a hypothesis distribution H that is as close as possible to G (or, equivalently, D) in variation distance. Note that the minimum variation distance, dTV (H, G), information-theoretically achievable under these assumptions is Θ(ǫ), and we would like to obtain a polynomial-time algorithm with this guarantee. Agnostically learning a single high-dimensional Gaussian is arguably the prototypical problem in robust statistics [Hub64, HRRS86, HR09]. Early work in this field [Tuk75, DG92] studied the sample complexity of robust estimation. Specifically, for the case of an unknown mean and known covariance Gaussian, the Tukey median [Tuk75] achieves O(ǫ)-error with O(n/ǫ2 ) samples (see, e.g., [CGR15] for a simple proof). Since Ω(n/ǫ2 ) samples are information-theoretically necessary – even without noise – the robustness requirement does not change the sample complexity of the problem. The computational complexity of agnostically learning a Gaussian is less understood. Until recently, √ all known polynomial time estimators could only guarantee error of Θ(ǫ n). Two recent works [DKK+ 16, LRV16] made a first step in designing robust polynomial-time estimators for this problem. The results of [DKK+ 16] apply in the standard agnostic model; [LRV16] works in a weaker model – known as Huber’s contamination model [Hub64] – where the noisy distribution D is of the form (1 − ǫ)G + ǫN , where N is an unknown “noise” distribution. For the problem of √ robustly estimating +an unknown mean log n), while [DKK 16] obtains error Gaussian N (µ, I), [LRV16] obtains an error guarantee of O(ǫ p O(ǫ log(1/ǫ)), independent of the dimension2 . A natural and important open problem, put forth by these works [DKK+ 16, LRV16], is the following: Question 1.2. Is there a poly(n/ǫ)- time agnostic learning algorithm, with error O(ǫ), for an n-dimensional Gaussian? Statistical–Computational Tradeoffs. A statistical–computational tradeoff refers to the phenomenon that there is an inherent gap between the information-theoretic sample complexity of a learning problem and its computational sample complexity, i.e, the minimum sample complexity attainable by any polynomial time 2 The algorithm p of [LRV16] can be extended to work in the standard agnostic model at the expense of an increased error guarantee of O(ǫ log n log(1/ǫ)). 3 algorithm for the problem. The prototypical example is the estimation of a covariance matrix under sparsity constraints (sparse PCA) [JL09, CMW13, CMW15], where a nearly-quadratic gap between informationtheoretic and computational sample complexity has been established (see [BR13b, WBS16b]) – assuming the computational hardness of the planted clique problem. For a number of high-dimensional learning problems (including the problem of robustly learning a Gaussian under the total variation distance), it is known that the robustness requirement does not change the information-theoretic sample complexity of the problem. On the other hand, it is an intriguing possibility that injecting noise into a high-dimensional learning problem may change its computational sample complexity. Question 1.3. Does robustness create inherent statistical–computational tradeoffs for natural high-dimensional estimation problems? In this work, we consider two natural instantiations of the above general question: (i) robust estimation of the covariance matrix in spectral norm, and (ii) robust sparse mean estimation. We give basic background for these problems in the following paragraphs. For (i), suppose we have sample access to a (zero-mean) n-dimensional unknown-covariance Gaussian, and we want to estimate the covariance matrix with respect to the spectral norm. It is known (see, e.g., [Ver12]) that O(n/ǫ2 ) samples suffice so that the empirical covariance is within spectral error at most ǫ from the true covariance; and this bound is information-theoretically optimal, to constant factors, for any estimator. For simplicity, let us assume that the desired accuracy is a small positive constant, e.g., ǫ = 1/10. Now suppose that we observe samples from a corrupted Gaussian in Huber’s contamination model (the weaker adversarial model) where the noise rate δ ≪ 1/10. First, it is not hard to see that the injection of noise does not change the information-theoretic sample complexity of the problem: there exist (computationally inefficient) robust estimators (see, e.g., [CGR15]) that use O(n) samples. (There is a straightforward SQ algorithm for this problem as well that uses O(n) samples, but again runs in exponential time.) On the other hand, if we are willing to use Õ(n2 ) samples, a polynomial-time robust estimator with constant spectral error guarantee is known [DKK+ 16, DKK+ 17a]3 . The immediate question that follows is this: Is there a computationally efficient robust covariance estimator in spectral error that uses a strongly sub-quadratic sample size, i.e., O(n2−c ) for a constant 0 < c < 1? For (ii), suppose we want to estimate the mean µ ∈ Rn of an identity covariance Gaussian up to ℓ2 -distance ǫ, under the additional promise that µ is k-sparse, and suppose that k ≪ n1/2 . It is wellknown that the information-theoretic sample complexity of this problem is O(k log n/ǫ2 ), and the truncated empirical mean achieves the optimal bound. For simplicity, let us assume that ǫ = 1/10. Now suppose that we observe samples from a corrupted sparse mean Gaussian (in Huber’s contamination model), where the noise rate δ ≪ 1/10. As in the setting of the previous paragraph, the injection of noise does not change the information-theoretic sample complexity of the problem: there exist a (computationally inefficient) robust SQ algorithm for this problem (see [Li17]) that use O(k log n) samples. Two recent works [Li17, DBS17] gave polynomial time robust algorithms for robust sparse mean estimation with sample complexity Õ(k2 log n). In summary, in the absence of robustness, the information-theoretically optimal sample bound is known to be achievable by a computationally efficient algorithm. In contrast, in the presence of robustness, there is a quadratic gap between the information-theoretic optimum and the sample complexity of known polynomial-time algorithms. The immediate question is whether this gap is inherent: We note that the robust covariance estimators of [DKK+ 16, DKK+ 17a] provide error guarantees under the Mahalanobis distance, which is stronger than the spectral norm. Under the stronger metric, Ω(n2 ) samples are information-theoretically required even without noise. 3 4 Is there a computationally efficient robust k-sparse mean estimator that uses a strongly subquadratic sample size , i.e., O(k2−c ) for a constant 0 < c < 1? It is conjectured in [Li17] that a quadratic gap is in fact inherent for efficient algorithms. High-Dimensional Hypothesis Testing. So far, we have discussed the problem of learning an unknown distribution that is promised to belong (exactly or approximately) in a given family (Gaussians, mixtures of Gaussians). A related inference problem is that of hypothesis testing [NP33, LR05]: Given samples from a distribution in a given family, we want to distinguish between a null hypothesis and an alternative hypothesis. Starting with [GR00, BFR+ 00], this broad question has been extensively investigated in TCS with a focus on discrete probability distributions. A natural way to solve a distribution testing problem is to learn the distribution in question to good accuracy and then check if the corresponding hypothesis is close to one satisfying the null hypothesis. This testing-via-learning approach is typically suboptimal and the main goal in this area has been to obtain testers with sub-learning sample complexity. In this paper, we study natural hypothesis testing analogues of the high-dimensional learning problems discussed in the previous paragraphs. Specifically, we study the sample complexity of (i) robustly testing an unknown mean Gaussian, and (ii) testing a GMM. To motivate (i), we consider arguably the most basic high-dimensional testing task: Given samples from a Gaussian N (µ, I), where µ ∈ Rn is unknown, distinguish between the case that µ = 0 versus kµk2 ≥ ǫ. (The latter condition is equivalent, up to constant factors, to dTV (N (µ, I), N (0, I)) ≥ ǫ.) The classical test for this task is Hotelling’s T-squared statistic [Hot31], which is unfortunately not defined when the sample size is smaller than the dimension [ZB96]. More recently, testers that succeed in the sub-linear regime have been developed [SD08] (also see [ZB96, CQ10]). In Appendix C, we give a simple and natural tester for √ this problem that uses O( n/ǫ2 ) samples, and show that this sample bound is information-theoretically optimal, up to constant factors. Now suppose that our Gaussianity assumption about the unknown distribution is only approximately satisfied. Formally, we are given samples from a distribution D on Rn which is promised to be either (a) a standard Gaussian N (0, I), or (b) a δ-noisy version of N (µ, I), where µ ∈ Rn satisfies kµk2 ≥ ǫ, and the noise rate δ satisfies δ ≪ ǫ. The robust hypothesis testing problem is to distinguish, with high constant probability, between these two cases. Note that condition (b) implies that dTV (D, N (0, I)) = Ω(ǫ), and therefore the two cases are distinguishable. 4 Robust hypothesis testing is of fundamental importance and has been extensively studied in robust statistics [HR09, HRRS86, Wil97]. Perhaps surprisingly, it is poorly understood in the most basic settings, even information-theoretically. Specifically, the sample complexity of our aforementioned robust mean testing problem has remained open. It is easy to see that the tester of Appendix C fails in the robust setting. On the other hand, the testing-via-learning approach implies a sample upper bound of O(n/ǫ2 ) for our robust testing problem – by using, e.g., the Tukey median. The following question arises: Question 1.4. Is there an information-theoretic gap between robust testing and non-robust testing? What is the sample complexity of robustly testing the mean of a high-dimensional Gaussian? We conclude with our hypothesis testing problem regarding GMMs: Given samples from a distribution D on Rn , we want to distinguish between the case that D = N (0, I), or D is a 2-mixture of identity covariance Gaussians. This is a natural high-dimensional testing problem that we believe merits investigation in its own right. The obvious open question here is whether there exists a tester for this problem with sub-learning sample complexity. 4 Robust testing should not be confused with tolerant testing, where the completeness is relaxed. In our context, tolerant testing corresponds to distinguishing √ between dTV (D, N (0, I)) ≤ ǫ/2 versus dTV (D, N (0, I)) ≥ ǫ, where D = N (µ, I), and is easily seen to be solvable with O( n/ǫ2 ) samples as well. 5 1.2 Our Results The main contribution of this paper is a general technique to prove lower bounds for a range of high-dimensional estimation problems involving Gaussian distributions. We use analytic and probabilistic ideas to construct explicit families of hard instances for the estimation problems described in Section 1.1. Using our technique, we prove super-polynomial Statistical Query (SQ) lower bounds that answer Questions 1.1 and 1.2 in the negative for the class of SQ algorithms. We also show that the observed quadratic statistical–computational gap for robust sparse mean estimation and robust spectral covariance estimation is inherent for SQ algorithms. As an additional important application of our technique, we obtain information-theoretic lower bounds on the sample complexity of the corresponding testing problems. (We note that our testing lower bounds apply to all algorithms.) Specifically, we answer Question 1.4 in the affirmative, by showing that the robustness requirement makes the Gaussian testing problem informationtheoretically harder. In the body of this section, we state our results and elaborate on their implications and the connections between them. SQ Lower Bound for Learning GMMs. Our first main result is a lower bound of nΩ(k) on the complexity of any SQ algorithm that learns an arbitrary n-dimensional k-GMM to constant accuracy (see Theorem 4.1 for the formal statement): Theorem 1.1 (SQ Lower Bound for Learning GMMs). Any SQ algorithm that learns an arbitrary nΩ(1) ≥ nΩ(k) queries to an dimensional k-GMM to constant accuracy, for all n ≥ poly(k), requires 2n −O(k) SQ oracle of precision n . Theorem 1.1 establishes a super-polynomial gap between the information-theoretic sample complexity of learning GMMs and the complexity of any SQ learning algorithm for this problem. It is worth noting that our hard instance is a family of high-dimensional GMMs whose components are almost non-overlapping. P Specifically, for each GMM F = ki=1 wi N (µi , Σi ) in the family, the total variation distance between any pair of Gaussian components can be made as large as 1 − 1/poly(n, k). More specifically, for our family of hard instances, the sample complexity of both density and parameter learning is Θ(k · log n) (the standard cover-based algorithm that achieves this sample upper bound is SQ). In contrast, any SQ learning algorithm for this family of instances requires runtime at least nΩ(k) . At a conceptual level, Theorem 1.1 implies that – as far as SQ algorithms are concerned – the computational complexity of learning high-dimensional GMMs is inherently exponential in the dimension of the latent space – even though there is no such information-theoretic barrier in general. Our SQ lower bound identifies a common barrier of the strongest known algorithmic approaches for this learning problem, and provides a rigorous explanation why a long line of algorithmic research on this front either relied on strong separation assumptions or resulted in runtimes of the form nΩ(k) . SQ Lower Bound for Robustly Learning a Gaussian. Our second main result concerns the agnostic learning of a single n-dimensional Gaussian. We prove two SQ lower bounds with qualitatively similar guarantees for different versions of this problem. Our first lower bound is for the problem of agnostically learning a Gaussian with unknown mean and identity covariance. Roughly speaking, we show that any SQ 1/4 algorithm that solves this learning problem to accuracy O(ǫ) requires complexity nΩ(log (1/ǫ)) . We show (see Theorem 5.1 for a more detailed statement): Theorem 1.2 (SQ Lower Bound for Robust Learning of Unknown Mean Gaussian). Let ǫ > 0, 0 < c ≤ 1/2, and n ≥ poly(log(1/ǫ)). Any SQ algorithm that robustly learns an n-dimensional Gaussian N (µ, I), c/2 Ω(1) ≥ nΩ(log(1/ǫ) ) queries to an SQ oracle within total variation distance O(ǫ log(1/ǫ)1/2−c ), requires 2n c/2 of precision n−Ω(log(1/ǫ) ) . Some comments are in order. First, Theorem 1.2 shows a super-polynomial gap between the sample complexity of agnostically learning an unknown mean Gaussian and the complexity of SQ learning algorithms 6 for this problem. As mentioned in the introduction, O(n/ǫ2 ) samples information-theoretically suffice to agnostically learn an unknown mean Gaussian to within error O(ǫ). Second, the robust learning algo+ rithm SQ model, and achieves error pof [DKK 16] runs in poly(n, 1/ǫ) time, can be implemented in thep O(ǫ log(1/ǫ)). As a corollary of Theorem 1.2, we obtain that the O(ǫ log(1/ǫ)) error guarantee of the [DKK+ 16] algorithm is best possible among all polynomial-time SQ algorithms. Roughly speaking, Theorem 1.2 shows that any SQ algorithm that solves the (unknown mean Gaussian) 1/4 robust learning problem to accuracy O(ǫ) needs to have running time at least nΩ(log (1/ǫ)) , i.e., quasipolynomial in 1/ǫ. It is natural to ask whether this quasi-polynomial lower bound can be improved to, say, exponential, e.g., nΩ(1/ǫ) . We show √ that the lower bound of Theorem 1.2 is qualitatively tight. We design an (SQ) algorithm that uses Oǫ (n log(1/ǫ) ) SQ queries of inverse quasi-polynomial precision. Moreover, we can turn this SQ algorithm into an algorithm in the sampling oracle model with similar complexity. Specifically, we show (see Theorem 8.7 and Corollary 8.8): Theorem 1.3 (SQ Algorithm for Robust Learning of Unknown Mean Gaussian). Let D be a distribution on √ O( log(1/ǫ)) n n R such that dTV (D, N (µ, I)) ) √ ≤ ǫ for some µ ∈ R . There is an SQ algorithm that uses Oǫ (n O( log(1/ǫ)) n , and outputs µ e ∈ R such that dTV (N (e µ, I), N (µ, I)) ≤ O(ǫ). The SQ’s to D of precision ǫ/n SQ algorithm can be turned into an algorithm√(in the sample model) with the same error guarantee that has sample complexity and running time Oǫ (nO( log(1/ǫ)) ). Theorems 1.2 and 1.3 give a qualitatively tight characterization of the complexity of robustly learning an unknown mean Gaussian in the standard agnostic model, where the noisy distribution D is such that dTV (D, N (µ, I)) ≤ ǫ. Equivalently, D satisfies (1 − ǫ1 )D + ǫ1 N1 = (1 − ǫ2 )N (µ, I) + ǫ2 N2 , where N1 , N2 are unknown distributions and ǫ1 + ǫ2 ≤ ǫ. A weaker error model, known as Huber’s contamination model in the statistics literature [Hub64, HRRS86, HR09], prescribes that the noisy distribution D is of the form D = (1−ǫ)N (µ, I)+ǫN , where N is an unknown distribution. Intuitively, the difference is that in the former model the adversary is allowed to subtract good samples and add corrupted ones, while in the latter the adversary is only allowed to add corrupted ones. We note that the lower bound of Theorem 1.2 does not apply in Huber’s contamination model. This holds for a reason: Concurrent work [DKK+ 17b] gives a poly(n/ǫ) time algorithm with O(ǫ) error for robustly learning N (µ, I) in Huber’s model. Hence, as a corollary, we establish a computational separation between these two models of corruptions. We provide an intuitive justification in Section 1.3. Our second super-polynomial SQ lower bound is for the problem of robustly learning a zero-mean unknown covariance Gaussian with respect to the spectral norm. Specifically, we show (see Theorem 5.12 for a detailed statement): Theorem 1.4 (SQ Lower Bound for Robust Learning of Unknown Covariance Gaussian). Let ǫ > 0, 0 < c ≤ 1, and n ≥ poly(log(1/ǫ)). Any SQ algorithm that, given access to an ǫ-corrupted n-dimensional e with kΣ e − Σk2 ≤ O(ǫ log(1/ǫ)1−c ), requires at least Gaussian N (0, Σ), with I/2  Σ  2I, returns Σ c/4 c/4 Ω(1) ≥ nΩ(log(1/ǫ) ) queries to an SQ oracle of precision n−Ω(log(1/ǫ) ) . 2n Similarly, Theorem 1.4 shows a super-polynomial gap between the information-theoretic sample complexity and the complexity of any SQ algorithm for this problem. As mentioned in the introduction, O(n/ǫ2 ) samples information-theoretically suffice to agnostically learn the covariance to within spectral error O(ǫ). Second, the robust learning algorithm of [DKK+ 16] runs in poly(n, 1/ǫ) time, can be implemented in the SQ model, and achieves error O(ǫ log(1/ǫ)) in Mahalanobis distance (hence, also in spectral norm). Again, the immediate corollary is that the O(ǫ log(1/ǫ)) error guarantee of the [DKK+ 16] algorithm is best possible among all polynomial-time SQ algorithms. The lower bound of Theorem 1.4 does not apply in Huber’s contamination model. This holds for a reason: [DKK+ 17b] gives a poly(n) · 2poly log(1/ǫ) time algorithm with O(ǫ) error in Huber’s model. 7 Statistical–Computational Tradeoffs for SQ algorithms. Our next SQ lower bounds establish nearly quadratic statistical–computational tradeoffs for robust spectral covariance estimation and robust sparse mean estimation. We note that both these lower bounds also hold in Huber’s contamination model. For the former problem, we show (see Theorem 6.1 for the formal statement): Theorem 1.5. Let 0 < c < 1/6, and n sufficiently large. Any SQ algorithm that, given access to an ǫ-corrupted N (0, Σ), where ǫ ≤ c/ ln(n) for kΣk2 ≤ poly(n/ǫ), and returns Σ̃ with Σ̃/2  Σ  2Σ̃, c/3 requires at least 2Ω(n ) queries to an SQ oracle of precision γ = O(n)−(1−5c/2) . We note that, in order to simulate a single query of the above precision, we need to draw Ω(1/γ 2 ) = Ω(n2−5c ) samples from our distribution. Roughly speaking, Theorem 1.5 shows that if an SQ algorithm c/3 uses less than this many samples, then it needs to run in 2Ω(n ) time. This suggests a nearly-quadratic statistical-computational tradeoff for this problem. For robust sparse mean estimation we show (see Theorem 6.6 for the detailed statement): Theorem 1.6. Fix any 0 < c < 1 and let n ≥ 8k2 . Any SQ algorithm that, given access to an ǫ-corrupted N (µ, I), where ǫ = k−c/4 , and µ ∈ Rn is promised to be k-sparse with kµk2 = 1, and outputs a hypothesis c vector µ b satisfying kb µ − µk2 ≤ 1/2, requires at least nΩ(ck ) queries to an SQ oracle of precision γ = O(k)3c/2−1 . Similarly, to simulate a single query of the above precision, we need to draw Ω(1/γ 2 ) = Ω(k2−3c ) samples from our distribution. Hence, any SQ algorithm that uses this many samples requires runtime at c least nΩ(ck ) . This suggests a nearly-quadratic statistical-computational tradeoff for this problem. Sample Complexity Lower Bounds for High-Dimensional Testing. We now turn to our informationtheoretic lower bounds on the sample complexity of the corresponding high-dimensional testing problems. For the robust Gaussian mean testing problem in Huber’s contamination model, we show (see Theorem 7.5 for a more detailed statement): Theorem 1.7 (Sample Complexity Lower Bound for Robust Testing of Unknown Mean Gaussian). Fix ǫ > 0. Any algorithm with sample access to a distribution D on Rn which satisfies either (a) D = N (0, I) or (b) D is a δ-noisy N (µ, I), and kµk2 ≥ ǫ, and distinguishes between the two cases with probability 2/3 requires (i) Ω(n) samples if δ = ǫ/100, (ii) Ω(n1−c ) samples if δ = ǫ/nc/4 , for any constant 0 < c < 1. As stated in the Introduction, without the robustness requirement, for any constant ǫ > 0, the Gaussian √ mean testing problem can be solved with Oǫ ( n) samples. Hence, the conceptual message of Theorem 1.7 is that robustness makes the Gaussian mean testing problem information-theoretically harder. In particular, the sample complexity of robust testing is essentially the same as that of the corresponding learning problem. Theorem 1.7 can be viewed as a surprising fact because it implies that the effect of robustness can be very different for testing versus learning of the same distribution family. Indeed, recall that the sample complexity of robustly learning an ǫ-corrupted unknown mean Gaussian, up to error O(ǫ), is O(n/ǫ2 ) – i.e., the same as in the noiseless case. As a final application of our techniques, we show a sample complexity lower bound for the problem of testing whether a spherical GMM is close to a Gaussian (see Theorem 7.6 for the detailed statement): Theorem 1.8 (Sample Complexity Lower Bound for Testing a GMM). Any algorithm with sample access to a distribution D on Rn which satisfies either (a) D = N (0, I), or (b) D = (1/2)N (µ1 , I)+ (1/2)N (µ2 , I), such that dTV (D, N (0, I)) ≥ ǫ, and distinguishes between the two cases with probability at least 2/3 requires Ω(n/ǫ2 ) samples. Similarly, the sample lower bound of Theorem 1.8 is optimal, up to constant factors, and coincides with the sample complexity of learning the underlying distribution. 8 1.3 Our Approach and Techniques In this section, we provide a detailed outline of our approach and techniques. The structure of this section is as follows: We start by describing our Generic Lower Bound Construction, followed by our main applications to the problems of Learning GMMs and Robustly Learning an Unknown Gaussian. We continue with our applications to statistical–computational tradeoffs. We then explain how our generic technique can be used to obtain our Sample Complexity Testing Lower Bounds, which rely on essentially the same hard instances as our SQ lower bounds. We conclude with a sketch of our new (SQ) Algorithm for Robustly Learning an Unknown Mean Gaussian to optimal accuracy. Generic Lower Bound Construction. The main idea of our lower bound construction is quite simple: We construct a family of distributions D that are standard Gaussians in all but one direction, but are somewhat different in the remaining direction (Definition 3.1). Effectively, we are hiding the interesting information about our distributions in this unknown choice of direction. By exploiting the simple fact that it is possible to find exponentially many nearly-orthogonal directions (Lemma 3.7), we are able to show that any SQ algorithm with insufficient precision needs many queries in order to learn an unknown distribution from D. To prove our generic SQ lower bound, we need to bound from below the SQ-dimension of our hard family of distributions D. Roughly speaking, the SQ-dimension of a distribution family (Definition 2.11) corresponds to the number of nearly uncorrelated distributions (with respect to some fixed distribution) in the family (see Definitions 2.9 and 2.10). It is known that a lower bound on the SQ-dimension implies a corresponding lower bound on the number and precision of queries of any SQ algorithm (see Lemma 2.12). More concretely, our hard families of distributions are constructed as follows: Given a distribution A on the real-line, we define a family of high-dimensional distributions Pv (x), for v ∈ Sn a unit n-dimensional vector. The distribution Pv gives a copy of A in the v-direction, while being an independent standard Gaussian in the orthogonal directions (Definition 3.1). Our hard family will be the set D = {Pv | v ∈ Sn }. For the sake of the intuition, we make two observations: (1) If A and N (0, 1) have substantially different moments of degree at most m, for some m, then Pv and N (0, I) can be easily distinguished by comparing their mth -order moment tensors. Since these tensors can be approximated in roughly nm queries (and time), the aforementioned lower bound construction would necessarily fail unless the low-order moments of A match the corresponding low-order moments of G. We show that, aside from a few mild technical conditions (see Condition 3.2), this moment-matching condition is essentially sufficient for our purposes. If the degree at most m tensors agree, we need to approximate tensors of degree m + 1. Intuitively, in order to extract useful information from these higher degree tensors, one needs to approximate essentially all of the nm+1 many such tensor entries. (2) A natural approach to distinguish between Pv and N (0, I) would be via random projections. As a critical component of our proof, we show (see Lemma 3.5) that a random projection of Pv will be exponentially close to N (0, 1) with high probability. Therefore, a random projection-based algorithm would require exponentially many random directions until it found a good one. We now proceed with a somewhat more technical description of our proof. To bound from below the SQ-dimension of our hard family of distributions, we proceed R as follows: The definition of the pairwise correlation (Definition 2.9) implies we need to show that Pv Pv′ /G ≈ 1, where G ∼ N (0, I) is the Gaussian measure, for any pair of unit vectors v, v ′ that are nearly orthogonal. To prove this fact, we make essential use of the Gaussian (Ornstein–Uhlenbeck) noise operator and its properties (see, e.g., [O’D14]). We explain this connection in the following paragraph. By construction of the distributions Pv , Pv′ , it follows that in the directions perpendicular to both v and v ′ , the relevant factors integrate to 1. Letting y = v · x and z = v ′ · x and letting y ′ , z ′ be the orthogonal directions to y and z, we need to consider the integral Z A(y)A(z)G(y ′ )G(z ′ )/G(x) . 9 Fixing y and integrating over the orthogonal direction, we get Z Z A(y)/G(y) A(z)G(z ′ )dy ′ . Now, if v and v ′ are (exactly) orthogonal, z = y ′ and the inner integral equals G(y). When this is not the case, the A(z) term is not quite vertical and the G(z ′ ) term not quite horizontal, so instead what we get is only nearly Gaussian. In general, the inner integral is equal to Uv·v′ A(y) , √ where Ut is the member of the Ornstein–Uhlenbeck semigroup, Ut f (z) = E[f (tz + 1 − t2 G)]. We show that this quantity is close to a Gaussian, when v · v ′ is close to 0 (see Lemma 3.4). The core idea of the analysis relies on the fact that Ut A is a smeared out version of A. As such, it only retains the most prominent features of A, namely its low-order moments. In fact, we are able to show that if A and G agree in their first m moments, then Ut A is Om (tm )-close to a Gaussian (see Lemma 3.5), and thus the integral in question is Om ((|v · v ′ |)m )-close to 1. This intuition is borne out in a particularly clean way by writing A/G in the basis of Hermite polynomials. The moment-matching condition implies that the decomposition involves none of the Hermite polynomials of degrees 1 through m. However, the Ornstein–Uhlenbeck operator, Ut , is diagonalized by the basis Hi G with eigenvalue ti . Thus, if A − G can be written in this basis with no terms of degree less than m, applying Ut decreases the size of the function by a multiple of approximately tm . So far, we have provided a proof sketch of the following statement (Lemma 3.4): When two unit vectors ′ v, v are nearly orthogonal, then the distributions Pv , Pv′ are nearly uncorrelated. Since, for 0 < c < c 1/2, we can pack 2Ω(n ) unit vectors v onto the sphere so that their pairwise inner products are at most nc−1/2 (Lemma 3.7), we obtain an SQ-dimension lower bound of our hard family. In particular, to learn c the distribution Pv , for unknown v, any SQ algorithm requires either 2Ω(n ) queries or queries of accuracy better than O(n)(m+1)(c−1/2) (Proposition 3.3). This completes the proof sketch of our generic construction. In our main applications, we construct one-dimensional distributions A satisfying the necessary momentmatching conditions for m taken to be super-constant, thus obtaining super-polynomial SQ lower bounds. For our quadratic statistical–computational tradeoffs, we match a constant number of moments. In the following paragraphs, we explain how we apply our framework to bound the SQ dimension for: (i) learning k-GMMs to constant accuracy, (ii) robustly learning an ǫ-corrupted Gaussian to accuracy O(ǫ), and (iii) robustly estimating a Gaussian covariance within constant spectral error and robustly estimating a sparse Gaussian mean to constant ℓ2 -error. In all cases, we construct a distribution A on the real-line that satisfies the necessary moment-matching conditions such that the family D = {Pv | v ∈ Sn } belongs in the appropriate class, e.g., is a k-GMM for (i), an ǫ-corrupted Gaussian for (ii), etc. SQ Lower Bound for Learning k-GMMs. The properties of our one-dimensional distribution A are summarized in Proposition 4.2. Specifically, we construct a distribution A on the real line that is a k-mixture of one-dimensional “skinny” Gaussians, Ai , that agrees with N (0, 1) on the first m = 2k − 1 moments (condition (i)). For technical reasons, we require that the chi-squared divergence of A to N (0, 1) is bounded from above by an appropriate quantity (condition (iv)). The Gaussian components, Ai , have the same variance and appropriately bounded means (condition (ii)). We can also guarantee that the components Ai are almost non-overlapping (condition (iii)). This implies that the corresponding high-dimensional distributions Pv , P′v will be at total variation distance close to 1 from each other when the directions v, v ′ are nearly orthogonal, and moreover their means will be sufficiently separated. To establish the existence of a distribution A with the above properties, we proceed in two steps: First, we construct (Lemma 4.3) a discrete one-dimensional distribution B supported on k points, lying in an 10 √ O( k) length interval, that agrees with N (0, 1) on the first k moments. The existence of such a distribution B essentially follows from standard tools on Gauss-Hermite quadrature. The distribution A is then obtained (Corollary 4.4) by adding a zero-mean skinny Gaussian to an appropriately rescaled version of B. Additional technical work (Lemmas 4.5 and 4.6) gives the other conditions. Our family of hard high-dimensional instances will consist of GMMs that look like almost non-overlapping “parallel pancakes” and is reminiscent of the family of instances considered in Brubaker and Vempala [BV08]. For the case of k = 2, consider a 2-GMM where both components have the same covariance that is far from spherical, the vector between the means is parallel to the unit eigenvector with smallest eigenvalue, and the distance between the means is a large multiple of the standard deviation in this direction (but a small multiple of that in the orthogonal direction). This family of instances was considered in [BV08], who gave an efficient spectral algorithm to learn them. Our lower bound construction can be thought of as k “parallel pancakes” in which the means lie in a one-dimensional subspace, corresponding to the smallest eigenvalue of the identical covariance matrices of the components. All n − 1 orthogonal directions will have an eigenvalue of 1, which is much larger than the smallest eigenvalue. In other words, for each unit vector v, the k-GMM Pv will consist of k “skinny” Gaussians whose mean vectors all lie in the direction of v. Moreover, each pair of components will have total √ variation distance very close to 1 and their mean vectors are separated by Ω(1/ k). We emphasize once more that our hard family of instances is learnable with O(k log n) samples – both for density estimation and parameter estimation. On the other hand, any SQ learning algorithm for the family requires nΩ(k) time. SQ Lower Bounds for Robustly Learning Unknown Gaussian. In the agnostic model, there are two types of adversarial noise to handle: subtractive noise – corresponding to the good samples removed by the adversary – and additive noise – corresponding to the bad points added by the adversary. The approach of [DKK+ 16] does not do anything p to address subtractive noise, but shows that this type of noise can incur “small” error, e.g., at most O(ǫ log(1/ǫ)) for the case of unknown mean. For additive noise, [DKK+ 16] uses an iterative spectral algorithm to filter out outliers. For concreteness, let us consider the case of robustly learning N (µ, I). Intuitively, achieving error O(ǫ) in the agnostic model is hard for the following reason: the two types of noise can collude so that the first few moments of the p corrupted distribution are indistinguishable from those of a Gaussian whose mean vector has distance Ω(ǫ log(1/ǫ)) from the true mean. To formalize this intuition, for our robust SQ learning lower bound, we construct a distribution A on the real line that agrees with N (0, 1) on the first m = Ω(log1/4 (1/ǫ)) moments and is ǫ/100-close in total variation distance to G′ = N (ǫ, 1) (see Proposition 5.2). We achieve this by taking A to be the Gaussian N (ǫ, 1) outside its effective support, while in the effective support we add an appropriate degreem univariate polynomial p satisfying the appropriate moment conditions. By expressing this polynomial as a linear combination of appropriately scaled Legendre polynomials, we can prove that its L1 and L∞ norms within the effective support of G′ are much smaller than ǫ (see Lemma 5.6). This result is then used to bound from above the distance of A from G′ , which gives our SQ lower bound. We use a similar technique to prove our SQ lower bound for robust covariance estimation in spectral norm. Specifically, we construct a distribution A that agrees with N (0, 1) on the first m = Ω(log(1/ǫ)) moments and is ǫ/100-close in total variation distance to G′ = N (0, (1 − δ)2 ), for some δ = O(ǫ) (see Proposition 5.13). We similarly take A to be the Gaussian G′ outside its effective support, while in the effective support we add an appropriate degree-m univariate polynomial p satisfying the appropriate moment conditions. The analysis proceeds similarly as above. Statistical–Computational Tradeoffs for SQ algorithms. For robust covariance estimation in spectral norm, our one-dimensional distribution is selected to be A = (1 − ǫ)N (0, σ) + ǫN1 , where N1 is a mixture of 2 unit-variance Gaussians with opposite means. By selecting σ appropriately, we can have A match the first 3 moments of N (0, 1), see Theorem 6.1. For robust sparse mean estimation, it suffices to take 11 A = (1 − δ)N (ǫ, 1) + δN1 , where N1 is a unit-variance Gaussian selected so that E[A] = 0. An important aspect of both these constructions is that the chi-squared distance χ2 (A, N (0, 1)) needs to be as small as possible. Indeed, since we only match a small number of moments, our bound on χ2 (A, N (0, 1)) crucially affects the accuracy of our SQ queries (Proposition 3.3). Sample Complexity Testing Lower Bounds. Our sample complexity lower bounds follow from standard information-theoretic arguments, and rely on the same lower bound instances and correlation bounds (i.e., R bounds on Pv Pv′ /G) established in our SQ lower bounds. In particular, we consider the problem of distinguishing between the distribution G ∼ N (0, I) and the distribution Pv for a randomly chosen unit vector v ∈ Sn using N independent samples. Let G⊗N denote the distribution on N independent samples from G, and P⊗N the distribution obtained by picking a random v and then taking N independent samples from Pv . v If it is possible to reliably distinguish between these cases, itR must be QNthe case that the chi-squared diver⊗N ⊗N gence χ(Pv , G ) is substantially larger than 1. This is v,v′ ,xi i=1 Pv (xi )Pv′ (xi )/G(xi )dvdv ′ dxi . Note that after fixing v and v ′ the above integral separates as a product, giving Z v,v′ Z Pv (x)Pv′ (x)/G(x)dx N dvdv ′ . (1) Note that the inner integral was bounded from above by roughly (1 + (v · v ′ )m ). A careful analysis of the distribution of the angle between two random unit vectors allows us to show that, unless N = Ω(n), the chi-squared divergence is close to 1, and thus that this testing problem is impossible. Algorithm for Robustly Learning Unknown Mean Gaussian. We give an SQ algorithm with O(ǫ)error for robustly learning an unknown mean Gaussian, showing that our corresponding SQ lower bound is qualitatively tight. Our algorithm builds on the filter technique of [DKK+ 16], generalizing it to the more involved setting of higher-order tensors. As is suggested by our SQ lower bounds, the obstacle to learning the mean robustly, is that there are ǫ-noisy Gaussians that are Ω(ǫ)-far in variation distance from a target Gaussian G, and yet match G in all of their first O(log1/4 (1/ǫ)) moments. For our algorithm to circumvent this difficulty, it will need to approximate all of the tth -order tensors for t ≤ k = Ω(log1/4 (1/ǫ)). Note that this already requires nk SQ queries. The first thing we will need to show is that k moments suffice, for an appropriate parameter k. Because of our lower bound construction, we know that k needs to be at least Ω(log1/4 (1/ǫ)). We show that k = O(log1/2 (1/ǫ)) suffices. Specifically, we prove a one-dimensional moment-matching lemma (Lemma 8.1) establishing the following: If an ǫ-noisy one-dimensional Gaussian approximately matches a reference Gaussian G in all of its first k moments, where k = Θ(log1/2 (1/ǫ)) (i.e., quadratically larger than our lower bound), then it must be O(ǫ)-close to G in variation distance. We note that it suffices to prove this statement in the one-dimensional case, as we can just project onto the line between the means. We now proceed to describe ourpalgorithm: Using the basic filter algorithm from [DKK+ 16], we start by learning the true mean to error O(ǫ log(1/ǫ)). By translating, we can assume that the mean is this close to 0. We need to robustly approximate the low-order moments of our target Gaussian G′ . This is complicated by the fact that even a small fraction of errors can have a huge impact on the moments of the distribution. However, any large errors are easily detectable. In particular, if any tth moment tensor differs substantially from that of the standard Gaussian, it will necessarily imply the presence of errors. In particular, it will allow us to construct a polynomial p so that E[p(X)] − E[p(G′ )] (where X is a noisy version of G′ ) is much larger than ǫkp(G′ )k2 . If this is the case, then many of our errors, x, must have p(x) very far from the mean. By standard concentration inequalities, this will allow us to identify these points as almost certainly being errors. This in turn lets us build a filter to clean-up our distribution X, making it closer to G′ . 12 Repeatedly applying filters as necessary, we can reduce to the case where the higher-order moments of X are close to the higher-order moments of G. This will tell us that, in almost all directions, the first k moments of X match the corresponding moments of G. By our moment-matching lemma, this will imply that the mean of G′ is close to 0 in these directions. We will then only need to approximate the mean of the projection of G′ onto the low-dimensional subspace V in which these moments fail to match. This approximation can be done in a brute-force manner (in time exponential in dim(V ), which is still relatively small), completing the description of the algorithm. 1.4 Related Work This work studies learning and testing high-dimensional structured distributions. Distribution learning and testing are two of the most fundamental inference tasks in statistics with a rich history (see, e.g., [NP33, BBBB72, DG85, Sil86, Sco92, DL01, LR05]) that date back to Karl Pearson. The main criteria to evaluate the performance of an estimator are its sample complexity and its computational complexity. Despite intensive investigation for several decades by different communities, the (sample and/or computational) complexity of many learning and testing problems is still not well-understood, even for some surprisingly simple high-dimensional settings. In the past few decades, a long line of work within TCS [KMR+ 94, Das99, FM99, AK01, VW02, CGG02, MR05, BV08, KMV10, MV10, BS10, DDS12a, DDS12b, CDSS13, DDO+ 13, CDSS14a, CDSS14b, ADLS17, DDS15, DDKT16, DKS16b, DKS16a] has focused on designing efficient estimators in a variety of settings. We have already mentioned the most relevant references for the specific questions we consider in Section 1.1. With respect to computational lower bounds for unsupervised estimation problems, the most relevant references are the works [FGR+ 13, FPV15, KV16] that show SQ lower bounds for the planted clique and related planted-like problems. It should be noted that, beyond the fact that we also use the concept of SQ dimension, our techniques are entirely different than theirs. Prior work by Feldman, O’Donnell, and Servedio [FOS08] implicitly showed an SQ lower bound of nΩ(log k) for the problem of learning k-mixtures of product distributions over {0, 1}n . This was obtained by a straightforward reduction from the problem of learning k-leaf decision trees over n Boolean variables. Our lower bound construction for learning GMMs is entirely different from [FOS08] that relied on the obvious combinatorial structure of the discrete setting. A related line of work gives statistical-computational tradeoffs for sparse PCA [BR13a, BR13b, MW15, WBS16a], based on various computational hardness assumptions. These results are of similar flavor as our statistical–computational tradeoffs for SQ algorithms (Theorems 1.5 and 1.6). An important difference between these tradeoffs and the super-polynomial SQ lower bounds we prove in this paper (Theorems 1.1, 1.2, and 1.4) is that the aforementioned sparse problems are known to be tractable if we increase the sample size by a quadratic factor beyond the information-theoretic limit. In contrast, our main SQ lower bound results establish a super-polynomial gap between the information-theoretic limit and the computational complexity of any SQ algorithm. Finally, we remark that in the supervised setting of PAC learning Boolean functions, a number of hardness results are known based on various complexity assumptions, see, e.g., [KKMS08, KS06, FGKP06, KK14, DLS14, Dan16] for the problems of learning halfspaces and learning intersections thereof. 1.5 Discussion and Future Directions The main contribution of this paper is a technique that gives essentially tight SQ lower bounds for a number of fundamental high-dimensional learning problems, including learning GMMs and robustly learning a single Gaussian. To the best of our knowledge, these are the first such lower bounds for high-dimensional distribution learning problems in the continuous setting. As a corollary, we provide a rigorous explanation of the observed (super-polynomial) gap between the sample complexity of these problems and the runtime of the best known algorithms. Our work naturally raises a number of interesting future directions. A natural open problem is to extend our lower bound technique to broader families of high-dimensional distributions. More concretely, is there a kω(1) poly(n) SQ lower bound for learning k-mixtures of n-dimensional spherical Gaussians? Note that 13 our nΩ(k) lower bound does not apply for the spherical case, as it crucially exploits the structure of the covariance matrices. In fact, faster learning algorithms for the spherical case are known [SOAJ14], albeit with exponential dependence on the number k of components. More broadly, can we extend our techniques to other families of structured high-dimensional distributions (e.g., mixtures of other distribution families)? 1.6 Organization The structure of this paper is as follows: In Section 2, we introduce basic notation, definitions, and a number of useful facts that will be required throughout the paper. Our SQ lower bounds are established in Sections 3–6. Specifically, in Section 3, we give our generic high-dimensional SQ lower bound construction, assuming the existence of a one-dimensional density satisfying the necessary moment conditions. In Sections 4, 5, and 6, we construct the appropriate one-dimensional densities, thereby establishing our SQ lower bounds. Specifically, Sections 4 and 5 give our super-polynomial SQ lower bounds for the problems of learning GMMs and robustly learning an unknown Gaussian. Section 6 gives our quadratic statistical–computational tradeoffs (for SQ algorithms) for the problems of robust covariance estimation in spectral norm and robust sparse mean estimation. Section 7 gives our (information-theoretic) sample complexity lower bounds for high-dimensional testing. Finally, in Section 8 we present our (SQ) algorithm for robustly learning an unknown mean Gaussian with optimal accuracy, whose runtime qualitatively matches our SQ lower bound from Section 5. Acknowledgements. This project evolved over a number of years. We would like to thank Vitaly Feldman for answering numerous questions about the Statistical Query model; Andy Drucker for useful discussions on Question 1.1; Anup B. Rao for asking a question that motivated Theorem 6.1; Weihao Kong and Gregory Valiant for useful discussions on Question 1.4; and Ankur Moitra and Eric Price for feedback on a previous version of this paper. 2 Definitions and Preliminaries 2.1 Notation and Basic Definitions For n ∈ Z+ , we denote by [n] the set {1, 2, . . . , n}. We will denote by Sn the Euclidean unit sphere in Rn . If v is a vector, we will let kvk2 denote its Euclidean norm. If M is a matrix, we will let kM k2 denote its spectral norm, and kM kF denote its Frobenius norm. Our basic object of study is the Gaussian (or Normal) distribution and finite mixtures of Gaussians: Definition 2.1. The n-dimensional Gaussian distribution N (µ, Σ) with mean vector µ ∈ Rn and covariance matrix Σ ∈ Rn×n is the distribution with probability density function   1 T −1 −n/2 1/2 f (x) = (2π) det(Σ) exp − (x − µ) Σ (x − µ) . 2 Definition 2.2. An n-dimensional k-mixture of Gaussians (k-GMM) is a distribution onP Rn with probability Pk density function defined by F (x) = j=1 wj N (µj , Σj ), where wj ≥ 0, for all j, and kj=1 wj = 1. Throughout the paper, we will make extensive use of the pdf of the standard one-dimensional Gaussian N (0, 1), which we will denote by G(x). Definition 2.3. The total variation distance between two distributions (with probability density functions) R def P, Q : Rn → R+ is defined to be dTV (P, Q) = (1/2) · kP − Qk1 = (1/2) · x∈Rn |P(x) − Q(x)|dx. The R def R χ2 -divergence of P, Q is χ2 (P, Q) = x∈Rn (P(x) − Q(x))2 /Q(x)dx = x∈Rn P2 (x)/Q(x)dx − 1. 2.2 Formal Problem Definitions We record here the formal definitions of the problems that we study. Our first problem of interest is learning a mixture of k arbitrary high-dimensional Gaussians: 14 Definition 2.4 (Density Estimation/Proper Learning of GMMs). Let Gn,k be the family of n-dimensional k-GMMs. The problem of density estimation for Gn,k is the following: Given ǫ > 0 and sample access to an unknown P ∈ Gn,k , with probability 9/10, output a hypothesis distribution H such that dTV (H, P) ≤ ǫ. The problem of proper learning for Gn,k is the same with the additional requirement that H ∈ Gn,k . We also Pkconsider the more challenging task of parameter estimation: Given samples from a distribution P = i=1 Gi , where Gi is a weighted Gaussian, the goal is to learn a distribution Q that can be written as P Q = ki=1 Hi , where Hi is a weighted Gaussian and dTV (Hi , Gi ) is small for all i. Our next question is the problem of robustly learning a Gaussian in the standard agnostic model: Definition 2.5 (Robust Learning of Unknown Gaussian). The problem of robust (agnostic) learning of an unknown Gaussian is the following: Given ǫ > 0, and sample access to an unknown distribution D with dTV (D, N (µ, Σ)) ≤ ǫ, for some µ ∈ Rn and Σ ∈ Rn×n , output a hypothesis distribution H such that, with probability at least 9/10, it holds that dTV (H, N (µ, Σ)) = f (ǫ), for some f : R+ → R+ . Our SQ lower bounds apply to two special cases of this problem: when µ is unknown and Σ = I, and when µ = 0 and Σ is unknown. For the latter case, our lower bound applies even for learning with respect to the spectral norm (which is weaker than approximation in variation distance). We now define the problem of robustly testing a Gaussian in Huber’s model. We remind the reader that our tight sample complexity lower bound applies to this weaker model as well. Definition 2.6 (Robust Testing of Unknown Mean Gaussian). The problem of robust testing of an unknown mean Gaussian is the following: Given ǫ > 0, 0 < δ < ǫ/2 and sample access to an unknown distribution D over Rn with the promise that one of the following two cases is satisfied: (i) D = N (0, I), or (ii) D = (1 − δ)N (µ, I) + δN1 , where N1 is an unknown noise distribution and kµk2 ≥ ǫ, the goal is to correctly distinguish between the two cases with confidence probability 2/3. Finally, our problem of testing GMMs is the following: Definition 2.7 (Testing Spherical GMMs). The problem of testing of a spherical GMM is the following: Given ǫ > 0 and sample access to an unknown distribution D with the promise that one of the following two cases is satisfied: (a) D = N (0, I), or (b) D is a 2-GMM w1 N (µ1 , I) + w2 N (µ2 , I) in Rn which satisfies dTV (D, N (0, I)) ≥ ǫ, distinguish between the two cases with probability at least 2/3. 2.3 Basics on Statistical Query Algorithms over Distributions We begin by recording the necessary definitions of Statistical algorithms for problems over distributions. All the definitions and facts in this section are from [FGR+ 13]. We start by defining a general search problem over distributions. Definition 2.8 (Search problems over distributions). Let D be a set of distributions over Rn , let F be a set of solutions and Z : D → 2F be a map from a distribution D ∈ D to a subset of solutions Z(D) ⊆ F that are defined to be valid solutions for D. The distributional search problem Z over D and F is to find a valid solution f ∈ Z(D) given access to (an oracle or samples from) an unknown D ∈ D. For general search problems over a distribution, we define SQ algorithms as algorithms that do not see samples from the distribution but instead have access to an SQ oracle. We consider two types of SQ oracles from the literature. 1. STAT(τ ): For a tolerance parameter τ > 0 and any bounded function f : Rn → [−1, 1], STAT(τ ) returns a value v ∈ [Ex∼D [f (x)] − τ, Ex∼D [f (x)] + τ ]. 15 2. VSTAT(t): For a sample size parameter t > 0 and any bounded function f : Rn→ [0, 1], VSTAT(t)  q Varx∼D [f (x)] 1 returns a value v ∈ [Ex∼D [f (x)] − τ, Ex∼D [f (x)] + τ ], where τ = max t , , t where Varx∼D [f (x)] = Ex∼D [f (x)] (1 − Ex∼D [f (x)]). The first oracle was defined by Kearns [Kea98] and the second was introduced in [FGR+ 13]. These oracles are known to be polynomially equivalent [FGR+ 13]. Also note that these oracles can return any value within the given tolerance, and therefore can make adversarial choices. The main technical tool that allows us to prove unconditional lower bounds on the complexity of SQ algorithms is an appropriate notion of Statistical Query (SQ) dimension. Such a notion was defined in the context of PAC learning of Boolean functions in [BFJ+ 94], and subsequently generalized to search problems over distributions in [FGR+ 13]. We will require the simpler definition from Section 3 of that work that relies on pairwise correlations: Definition 2.9 (Pairwise Correlation). The pairwise correlation of two distributions with probability density functions D1 , D2 : Rn → R+ with respect to a distribution with density D : Rn → R+ , where the support def R of D contains the supports of D1 and D2 , is defined as χD (D1 , D2 ) = Rn D1 (x)D2 (x)/D(x)dx − 1. We remark that when D1 = D2 in the above definition, the pairwise correlation is identified with the def R between D1 and D, i.e., χ2 (D1 , D) = Rn D1 (x)2 /D(x)dx − 1. We will also need the following definition: χ2 -divergence Definition 2.10. We say that a set of m distributions D = {D1 , . . . , Dm } over Rn is (γ, β)-correlated relative to a distribution D over Rn if ( γ if i 6= j |χD (Di , Dj )| ≤ β if i = j. We are now ready to define our notion of dimension: Definition 2.11 (Statistical Query Dimension). For β, γ > 0, a search problem Z over a set of solutions F, and a class of distributions D over Rn , let m be the maximum integer such that there exists a reference distribution D over Rn and a finite set of distributions DD ⊆ D such that for any solution f ∈ F, Df = DD \ Z −1 (f ) is (γ, β)-correlated relative to D and |Df | ≥ m. We define the statistical (query) dimension with pairwise correlations (γ, β) of Z to be m and denote it by SD(Z, γ, β). Our lower bounds proceed by bounding from below the statistical query dimension of the considered distribution learning problems. The corresponding lower bounds on the complexity of SQ algorithms for these problems are a corollary of the following result from [FGR+ 13]: Lemma 2.12 (Corollary 3.12 in [FGR+ 13]). Let Z be a search problem over a set of solutions F and a class of distributions D over Rn . For γ, β > 0, let s = SD(Z, γ, β). For any γ ′ > 0, any SQ algorithm for √ Z requires at least s · γ ′ /(β − γ) queries to the STAT( γ + γ ′ ) or VSTAT(1/(3(γ + γ ′ ))) oracles. 3 Statistical Query Lower Bounds: From One–Dimension to High–Dimensions All our statistical query lower bounds are shown in two steps: We first construct a one-dimensional density A satisfying certain technical conditions, and then use A to construct a high-dimensional distribution which is Gaussian in all but one directions. The second step is the same for all the problems that we consider. To formally define it, we require the following construction: 16 Definition 3.1 (High-Dimensional Hidden Direction Distribution). For a distribution A on the real line with probability density function A(x) and a unit vector v ∈ Rn , consider the distribution over Rn with probability density function  Pv (x) = A(v · x) exp −kx − (v · x)vk22 /2 /(2π)(n−1)/2 . That is, Pv is the product distribution whose orthogonal projection onto the direction of v is A, and onto the subspace perpendicular to v is the standard (n − 1)-dimensional normal distribution. Suppose that we have constructed a one-dimensional distribution A satisfying the following condition: Condition 3.2. Let m ∈ Z+ . The distribution A on R is such that (i) the first m moments of A agree with the first m moments of N (0, 1), and (ii) χ2 (A, N (0, 1)) is finite. Note that Condition 3.2-(ii) above implies that the distribution A has a probability density function (pdf), which we will denote by A(x). We will henceforth blur the distinction between a distribution and its pdf. The main result of this section is the following: Proposition 3.3. Given a distribution A on R that satisfies Condition 3.2 for some m ∈ Z+ and a constant 0 < c < 1/2, consider the set of distributions {Pv }v∈Sn , for n ≥ mΩ(1/c) . For a given ǫ > 0, suppose that dTV (Pv , Pv′ ) > 2ǫ whenever |v · v ′ | is at most 1/8. Then, any SQ algorithm which, given access to Pv (x) c/2 for an unknown v ∈ Sn , outputs a hypothesis Q with dTV (Q, Pv ) ≤ ǫ needs at least 2Ω(n ) ≥ nm+1  p queries to STAT(O(n)−(m+1)(1/4−c/2) χ2 (A, N (0, 1))) or to VSTAT O(n)(m+1)(1/2−c) /χ2 (A, N (0, 1)) . An intuitive interpretation of the proposition is as follows: If we do not want our SQ algorithm to use a number of queries exponential in nΩ(1) , then we would need Ω(n)Ω(m+1) samples to simulate a single statistical query. The rest of this section is devoted to the proof of Proposition 3.3. In Section 3.1, we prove a correlation bound which is the main technical ingredient for the proof. In Section 3.2, we show a simple packing for unit vectors over the sphere and put the pieces together to complete the proof. 3.1 Main Correlation Lemma The main technical result of this section is the following: Lemma 3.4 (Correlation Lemma). Let m ∈ Z+ . If the distribution A over R agrees with the first m moments of N (0, 1), then for all v, v ′ ∈ Rn , we have that |χN (0,I) (Pv , Pv′ )| ≤ |v · v ′ |m+1 χ2 (A, N (0, 1)) . (2) Note that we may assume that χ2 (A, N (0, 1)) is finite, otherwise the lemma statement is trivial. Hence, we can henceforth assume that Condition 3.2 is satisfied. In particular the distributions A, Pv and Pv′ all have probability density functions. To prove Lemma 3.4 we proceed as follows: We start by bounding the χ2 -divergence between the onedimensional projection of Pv onto v ′ and N (0, 1). As well as being a critical component towards the proof of Lemma 3.4, this fact can be used to show that random projections of Pv are close to N (0, 1) with high probability. Specifically, we show: Lemma 3.5. Let Q be the distribution of v ′ · X, for X ∼ Pv . Then, we have that χ2 (Q, N (0, 1)) ≤ (v · v ′ )2(m+1) χ2 (A, N (0, 1)) . 17 Proof. Let θ be the angle between v and v ′ . Let x, y be orthogonal coordinates for the plane spanned by v and v ′ , with the x-axis in the v ′ direction. Note that Pv is a product of a distribution on this plane and a standard Gaussian perpendicular to it. On this plane, Pv is a product of A and N (0, 1). Thus, we have that Z Pv (x)dx Q(x) = ′ Zx:v ·x=x A(x cos θ + y sin θ)G(x sin θ − y cos θ)dy . = y∈R Let Uθ be the linear operator that maps f : R → R to Z f (x cos θ + y sin θ)G(x sin θ − y cos θ)dy , y∈R so that Q = Uθ (A). We will show that we can expand A as a linear combination of eigenfunctions of Uθ . √ Let Hei (x) denote the i-th (probabilists’) Hermite polynomial. We note R that the functions Hei (x)G(x)/ i!, for i ∈ N, are orthonormal with respect to the inner product hf, gi = x∈R f (x)g(x)/G(x)dx. Indeed, by p using the fact that the Hermite functions, which can be written as He(x) RG(x), are a complete orthonormal family for L2 (R), we get that any function f : R → R such that R f (x)g(x)/G(x)dx < ∞ is R∞ almost everywhere equal to a linear combination of these Hei (x)G(x)/i!. Since −∞ A(x)2 /G(x)dx = 1 + χ2 (A, N (0, 1)) is finite, we can write A(x) = ∞ X √ ai Hei (x)G(x)/ i! . (3) i=0 Using the orthogonality of Hei (x) we can extract these coefficients, since h √ i Z ai Hei (x)2 G(x)/i!dx = ai . EX∼A Hei (X)/ i! = (4) R Since A agrees with the first m moments of the standard Gaussian, for 0 ≤ i ≤ m, we have that √ √ EX∼A [Hei (X)/ i!] = EX∼N (0,1) [Hei (X)/ i!] = δi,0 . This implies that a0 = 1 and a1 , . . . , am = 0. Thus, we have A(x) = G(x) + ∞ X √ ai Hei (x)G(x)/ i! . (5) i=m+1 The orthonormality of these functions with respect to the inner product hf, gi = allows us to express the χ2 -divergence in terms of these coefficients: Z ∞ (A(x) − G(x))2 /G(x)dx χ2 (A, N (0, 1)) = = = Z −∞ ∞ −∞ ∞ X ∞ X i=m+1 R R f (x)g(x)/G(x)dx also !2 √ ai Hei (x)G(x)/ i! /G(x)dx a2i . (6) i=m+1 18 Now we consider the effect of Uθ on this orthogonal family. From the definition of Uθ , we have Z ∞ Uθ (Hei G)(x) = Hei (x cos θ + y sin θ)G(x sin θ − y cos θ)dy . −∞ We will use the well-known fact that Hei (x)G(x) is an eigenfunction of Uθ : Fact 3.6. We have that: Uθ (Hei G)(x) = cosi (θ)Hei (x)G(x) . For completeness, we include a proof in Appendix D. We can now use these eigenfunctions and eigenvalues with Equation (5) to get an expression for Uθ A: Uθ A(x) = G(x) + ∞ X √ ai cosi θHei (x)G(x)/ i! , (7) i=m+1 which can be used to express its χ2 -divergence: ∞ X χ2 (Uθ A, N (0, 1)) = a2i cos2i θ i=m+1 ≤ cos2(m+1) θ = cos 2(m+1) ∞ X a2i i=m+1 2 θ · χ (A, N (0, 1)) , (8) where the last line uses (6). Recalling that Q = Uθ A and cos θ = v · v ′ , this completes the proof. Proof of Lemma 3.4. We first show that the correlation between the high-dimensional densities Pv and Pv′ needed for Lemma 3.4 can be reduced to a one-dimensional correlation. Just as in the proof of Lemma 3.5, let θ = arccos(v · v ′ ) and let x, y be coordinates for the plane spanned by v and v ′ with the x-axis in the v ′ direction. Each of Pv and Pv′ is a product of a distribution on this plane and a standard Gaussian perpendicular to it. On this plane, they are both products of A and N (0, 1) with different rotations applied. Thus, we have that Z Pv (x)Pv′ (x)/G(x)dx χN (0,I) (Pv , Pv′ ) + 1 = n ZR∞ Z ∞ = A(x)G(y)A(x cos θ + y sin θ)G(x sin θ − y cos θ)/G(x)G(y)dxdy −∞ −∞ Z ∞ Z ∞ A(x cos θ + y sin θ)G(x sin θ − y cos θ)dydx A(x)/G(x) · = −∞ −∞ = 1 + χN (0,1) (A, Uθ A) . Now we can bound from above this correlation in terms of the χ2 -divergences of both distributions from N (0, 1), one of which we can bound using Lemma 3.5: Z |A(x) − G(x)||Uθ A(x) − G(x)|/G(x)dx |χN (0,1) (A, Uθ A)| ≤ sZ sRZ ≤ = p R (A(x) − G(x))2 /G(x)dx · χ2 (A, N (0, 1)) ≤ | cos m+1 2 · χ2 (U R (Uθ A(x) − G(x))2 /G(x)dx θ A, N (0, 1)) (θ)| · χ (A, N (0, 1)) , where the first line follows by triangle inequality, the second inequality is Cauchy-Schwarz, and the last line uses Lemma 3.5. The proof of Lemma 3.4 is now complete. 19 3.2 Proof of Proposition 3.3 We note that our distribution learning problem can be expressed as a search problem in the sense of [FGR+ 13]. Consider the following search problem Z: given access to (an oracle or samples from) Pv , for an unknown unit vector v, find a distribution f such that dTV (Pv , f ) ≤ ǫ. Thus, for us, the set of solutions F is the set of all distributions on Rn , and D ⊆ F is the set of Pv for all unit vectors v. For a unit vector v, Z(Pv ) is the set of all distributions f such that dTV (Pv , f ) ≤ ǫ. For a distribution f on Rd , Z −1 (f ) is the set of Pv such that dTV (f, Pv ) ≤ ǫ. To prove a lower bound on the statistical dimension, we will take D = N (0, I), D = {Pv : v ∈ Sn } and construct a suitable finite set DD . c Lemma 3.7. For any 0 < c < 1/2, there is a set S of at least 2Ω(n ) unit vectors in Rn such that for each pair of distinct v, v ′ ∈ S, it holds |v · v ′ | ≤ O(nc−1/2 ). c The lemma can be shown by a probabilistic argument. Specifically, if we take |S| = 2Ω(n ) unit vectors uniformly at random from the unit sphere Sn , then the desired event happens with positive probability. The proof is given in Appendix D. c Proof of Proposition 3.3. For a given constant 0 < c < 1/2, fix a set S of 2Ω(n ) unit vectors in Rn satisfying the statement of Lemma 3.7. Let DD = {Pv | v ∈ S}. Then, by Lemma 3.4, we have that, for v, v ′ ∈ S with v 6= v ′ , it holds χN (0,I) (Pv , Pv′ ) ≤ |v · v ′ |m+1 χ2 (A, N (0, 1)) = Ω(n)−(m+1)(1/2−c) χ2 (A, N (0, 1)) . If v = v ′ , then χN (0,I) (Pv , Pv ) = χ2 (Pv , N (0, I)) = χ2 (A, N (0, 1)). We thus have that, for def def γ = Ω(n)−(m+1)(1/2−c) χ2 (A, N (0, 1)) and β = χ2 (A, N (0, 1)) , DD is (γ, β) correlated with respect to D = N (0, I). Since dTV (Pv , Pv′ ) > 2ǫ for distinct v and v ′ in S, for any distribution f over Rn , we have that Z −1 (f ) = {Pv : v ∈ S and dTV (Pv , f ) ≤ ǫ} has |Z −1 (f )| ≤ 1 using the triangle inequality for dTV . We thus have that DD \ Z −1 (f ) is (γ, β) correlated with respect to D = N (0, I), and |DD \ Z −1 (f )| ≥ c |S| − 1 = 2Ω(n ) . That is, c SD (Z, γ, β) ≥ 2Ω(n ) . def An application of Lemma 2.12 for γ ′ = γ = Ω(n)−(m+1)(1/2−c) χ2 (A, N (0, 1)), we obtain that any SQ c algorithm requires at least 2Ω(n ) n−(m+1)(1/2−c) calls to the     p STAT O(n)−(m+1)(1/4−c/2) χ2 (A, N (0, 1)) or VSTAT O(n)(m+1)(1/2−c) /χ2 (A, N (0, 1)) oracle to solve Z. From our assumption that n ≥ mΩ(1/c) , it follows that n ≥ Ω((m + 1) log n)2/c , and c/2 c/2 therefore 2Ω(n ) ≥ nm+1 . Hence, the total number of required queries is at least 2Ω(n ) ≥ nm+1 . This completes the proof. 4 SQ Lower Bound for Learning Gaussian Mixtures The main result of this section is the following: Theorem 4.1. Fix 0 < ǫ < 1. Any SQ algorithm that given SQ access to a k-mixture P of n-dimensional Gaussians, N (µi , Σi ), i ∈ [k], for n ≥ Ω(k 8 log(1/ǫ)3 ), which are promised to satisfy dTV (Pi , Pj ) ≥ 1−ǫ, for all i 6= j, and moreover are such that     1/2 1/2 max max kµi − µj k2 , max kΣi k2 k ≤ poly(k, log(1/ǫ)) min 1/kΣ−1 , 2 i i,j i i 20 and outputs a distribution Q with dTV (P, Q) ≤ 1/2, needs at least 2Ω(n  or to VSTAT O(n)k/3 . 1/8 ) ≥ n2k calls to STAT O(n)−k/6  Remark. We remark that the well-conditioned assumption in Theorem 4.1 (i.e., that the distances between the means and the largest and smallest eigenvalues of any covariance matrix are bounded) guarantees that an SQ algorithm with a bounded number of SQ queries is possible. The proof of Theorem 4.1 follows by an application of the framework developed in Section 3 and the following proposition: Proposition 4.2. For any ǫ > 0, there exists a distribution A on R that is a mixture of k Gaussians Ai , i ∈ [k], and satisfies the following conditions: (i) A agrees with N (0, 1) on the first 2k − 1 moments.   √ 1 and mean of magnitude O( k). (ii) Each Gaussian component Ai has variance Θ k2 log2 (k+1/ǫ) (iii) It holds dTV (Ai , Aj ) ≥ 1 − ǫ, for all i 6= j. (iv) We have χ2 (A, N (0, 1)) ≤ exp(O(k)) log(1/ǫ). (v) In the high-dimensional construction of Definition 3.1, we have that dTV (Pv , Pv′ ) ≥ 1/2 whenever |v · v ′ | ≤ 1/2. Given Proposition 4.2, the proof of Theorem 4.1 follows easily. Proof of Theorem 4.1. First note that the distribution A given by Proposition 4.2, satisfies Condition 3.2 for m = 2k − 1. By Proposition 3.3, applied for c = 1/4, any algorithm that is given SQ access to Pv , for an 1/8 unknown unit vector v ∈ S, and outputs a distribution Q with dTV (P, Q) ≤ ǫ, needs at least 2Ω(n ) ≥ n2k calls to     p STAT O(n)−k/4 · exp(O(k)) log(1/ǫ) or VSTAT O(n)k/2 /(exp(O(k)) log(1/ǫ)) . For n = Ω(k8 log(1/ǫ)3 ), we have nk/2 ≥ (exp(O(k)) log(1/ǫ))3 , and so we need precision O(n)−k/6 for STAT or O(n)k/3 for VSTAT. It remains to show that Pv is a mixture of k Gaussians that satisfies the necessary conditions. Note that Pv , when expressed in an appropriate basis, is a product of the mixture of k univariate Gaussians and the standard (n − 1)-dimensional normal distribution. Recall that  the product of two Gaussians is  Pk 1 ′ a Gaussian. If A = i=1 wi N (µi , δ), where δ = Θ k 2 log(k+1/ǫ) (by Proposition 4.2 (ii)), then we  Pk ′ T . We can bound the variation distance between two have that Pv = i=1 wi N vµi , I − (1 − δ)vv components by:   dTV N (vµ′i , I − (1 − δ)vv T ), N (vµ′j , I − (1 − δ)vv T ) = dTV N (µ′i , δ), N (µ′j , δ) ≥ 1 − ǫ , by Proposition 4.2 (iii). Also, we have that n o 1/2 max maxi,j kµi − µj k2 , maxi kΣi k2 √ max {maxi,j kµi − µj k2 , 1}   = ≤ O( k/δ) ≤ poly(k log(1/ǫ)) . 1/2 δ mini 1/kΣ−1 i k2 This completes the proof. 21 4.1 Proof of Proposition 4.2 We start with the following lemma: Lemma 4.3. There is a discrete distribution B on the real line, supported on k points, that agrees with √ N (0, 1) on the first 2k − 1 moments. All points x in the support of B have |x| = O( k). Proof. This lemma essentially follows from standard techniques for Gaussian quadrature [AS72]. Given a (possibly infinite) interval [a, b], a weighting function ω(x), and an integer k > 0, we can find xi and wi for 1 ≤ i ≤ k such that Z b k X wi p(xi ) , ω(x)p(x)dx = a i=1 for all polynomials p(x) of degree at most 2k − 1. The Gauss-Hermite quadrature is a standard implemen2 x ’s to be the tation of this general scheme on the interval (−∞, ∞) with ω(x) = e−x . Here, we take the √ i 2k−1 k! π roots of the k-th (physicist’s) Hermite polynomial Hk (x). Then, we have that wi = k2 H (xi )2 . k−1 2 √1 e−x /2 , 2π the pdf of N (0, 1). To do this, we need to rescale √ def the above wi and xi , and use the probabilist’s Hermite polynomials Hek (x) = 2−k/2 Hk (x/ 2). We claim √ k! that we can take the x′i ’s to be the roots of Hek (x), i.e., x′i = 2xi and wi′ = k2 Hek−1 (x′ )2 . Indeed, we have We would like to take ω(x) = G(x) := i k X wi′ p(x′i ) = i=1 k X k! √ k2 Hek−1 ( i=1 k k−1 √ X 2xi )2 √ p( 2xi ) √ 2 k! π 1 √ 2xi ) · · p( k2 Hk−1 (xi )2 π i=1 Z ∞ √ 1 2 p( 2y)e−y dy =√ π −∞ Z ∞ √ 1 2 =√ p(x)e−x /2 (1/ 2)dx π Z ∞ −∞ p(x)G(x)dx , = = −∞ for all polynomials p(x) of degree at most 2k − 1. R∞ P Note that all the weights are nonnegative by definition. Also note that ki=1 wi′ = −∞ 1 · G(x) = 1. We take B to be the probability distribution with probability wi′ of being x′i , for each 1 ≤ i ≤ k. Then we have Z ∞ k X ′ ′j j wi x i = xj G(x)dx = EX∼N (0,1) [X j ] , EX∼B [X ] = i=1 −∞ for all integers 1 ≤ j ≤ 2k − 1. √ k), and so all roots of It is known (see, e.g., [Sze89]) that all roots of Hk (x) have absolute value O( √ Hek . Hence, all points x in the support of B have |x| = O( k). This completes the proof. On the other hand, if we want χ2 (A, N (0, 1)) to be finite, we need to have a mixture of Gaussians each with positive variance δ > 0. Corollary 4.4. For any 0 < δ < 1, there is a distribution A on R that is a mixture of k Gaussians each with variance δ that agrees √ with N (0, 1) on the first 2k − 1 moments. The means of all the Gaussian components have magnitude O( k). 22 Proof. By rescaling the distribution B given by Lemma 4.3, we can find a discrete distribution B ′ supported √ on k points with absolute value no bigger than O( k) that agrees with the first √ 2k − 1 moments of N (0, 1 − δ). The rescaled distribution B ′ assigns probability mass wi′ to the points 1 − δx′i , for 1 ≤ i ≤ k. Let X ∼ B ′ , X ′ ∼ N (0, 1 − δ), and Y ∼ N (0, δ) that is independent of X, X ′ . We take A to be the distribution of X + Y . Then, we have j   j   X X i i E[X ′i ]E[Y j−i ] = E[(X ′ + Y )j ] , E[X i ]E[Y j−i ] = E[(X + Y )j ] = j j i=0 i=0 for all integers 1 ≤ j ≤ 2k − 1. By standard facts about Gaussians, √ X ′ +Y is distributed as N (0, 1). Finally, note that the distribution of X + Y is a mixture of k Gaussians N ( 1 − δx′i , δ) with weights wi′ . To appropriately set the parameter δ, we need to consider the high-dimensional construction (Definition 3.1):  √  Lemma 4.5. For v, v ′ ∈ Sn with |v · v ′ | ≤ 1/2, we have that dTV (Pv , Pv′ ) ≥ 1 − O k δ log(1/δ) csc θ . Proof. We write Ai , for 1 ≤ i ≤ k, for the Gaussians N (µi , δ) that p A is a mixture of. Fix ǫ > 0. By a Chernoff bound, Ai is within the interval [µi − a, µi + a], where a = 2 δ log(1/ǫ) with probability at least 1 − ǫ. We again consider the plane spanned by v and v ′ . Let x, y be the orthogonal coordinates with v in the direction of the x-axis. Similarly, let x′ , y ′ be the orthogonal coordinates with v ′ in the direction of the x′ -axis. Let θ be the angle between v and v ′ . We have that Z ∞ Z ∞ Z min{Pv (x), Pv′ (x)}dx = min{A(x)G(y), A(x′ )G(y ′ )}dxdy x=−∞ y=−∞ x Z ∞ Z ∞ = min{A(x)G(y), A(x′ )G(y ′ )} csc θdxdx′ ′ x=−∞ x =−∞ Z ∞ Z ∞ min{Ai (x)G(y), Aj (x′ )G(y ′ )} csc θdxdx′ ≤ k max i,j x=−∞ x′ =−∞ Z µi +a Z µj +a min{Ai (x)G(y), Aj (x′ )G(y ′ )} csc θdxdx′ ≤ kǫ + k max i,j ≤ kǫ + x=µi −a x′ =µj −a 2 k max a csc θ max min{Ai (x)G(y), Aj (x′ )G(y ′ )} i,j x,x′ ∈R √ ≤ kǫ + ka2 csc θ/(2π δ) √ = kǫ + k δ csc θ log(1/ǫ)/π . √ √ R Taking ǫ = δ, we obtain that x min{Pv (x), Pv′ (x)}dx ≤ O(k δ log(1/δ) csc θ). On the other hand, Z 1 |Pv (x) − Pv′ (x)|dx dTV (Pv , Pv′ ) = 2 x Z 1 (max{Pv (x), Pv′ (x)} − min{Pv (x), Pv′ (x)}) dx = 2 x Z 1 (Pv (x) + Pv′ (x) − 2 min{Pv (x), Pv′ (x)}) dx = 2 x Z = 1 − min{Pv (x), Pv′ (x)}dx x √ ≥ 1 − O(k δ log(1/δ) csc θ) . This completes the proof. 23 This gives an upper bound on δ. We don’t want δ to be too small, because of the following lemma: √ Lemma 4.6. We have that χ2 (A, N (0, 1)) ≤ exp(O(k))/ δ. Proof. Each component Ai , for 1 ≤ i ≤ k, satisfies the following: Z 2 1 + χ (Ai , N (0, 1)) = Ai (x)2 /G(x)dx x Z  1 exp −(x − µi )2 /δ + x2 /2 dx =√ 2πδ Zx  1 =√ exp −x2 (1/δ − 1/2) + 2µi x/δ − µ2i /δ dx 2πδ Zx  1 =√ exp −(x − 2µi /(2 − δ))2 ((2 − δ)/2δ) + 2µ2i /(δ(2 − δ)) − µ2i /δ dx 2πδ Zx  1 =√ exp −(x − 2µi /(2 − δ))2 ((2 − δ)/2δ) + 2µ2i /(δ(2 − δ)) − (2 − δ)µ2i /δ(2 − δ) dx 2πδ x √ Z  p   2 exp(µ2i /(2 − δ)) p 1/ 2π(2δ/(2 − δ)) exp −(x − 2µi /(2 − δ))2 (1/δ − 1/2) dx = (2 − δ)δ x √  2 2 exp µi /(2 − δ) p = (2 − δ)δ √ ≤ exp(O(k))/ 2δ . Thus, for the mixture A we have that: 2 1 + χ (A, N (0, 1)) = ≤ ≤ XX i j i j i j XX XX wi wj /(1 − δ) Z Ai (x)Aj (x)/G(x)dx x q wi wj /(1 − δ) (1 + χ2 (Ai , N (0, 1)) (1 + χ2 (Aj , N (0, 1)) √ wi wj /(1 − δ) · exp(O(k))/ 2δ XX √ wi wj = exp(O(k))/ 2δ · i √ = exp(O(k))/ 2δ · 1 . j This completes the proof. The following simple lemma helps us enforce the condition that the Gaussian components are wellseparated:   1 Lemma 4.7. Given ǫ > 0, if δ ≤ O k log(1/ǫ) , then dTV (Ai , Aj ) ≥ 1 − ǫ. √ Proof. It is known (see, e.g., [Sze89]) that the difference between two roots of Hk (x) is√Ω(1/ k). Thus, the same is true of Hek (x) and by our construction, we have that |µi − µj | ≥ Ω((1 − δ)/pk), for i 6= j. By standard Chernoff bounds, with probability at least 1 − ǫ/2, Ai lies in the range (µi − p 2δ ln(2/ǫ), µi + p p2δ ln(2/ǫ)). Similarly, with probability at least 1 − ǫ/2, Aj lies in the range (µj − 2δ ln(2/ǫ), √µj + 2δ ln(2/ǫ)). If these intervals are disjoint, we have d (A , A ) ≥ 1−ǫ. This holds when (1−δ)/ k) = TV i j p Ω( δ log(1/ǫ)), which is true when δ ≤ O(1/k log(1/ǫ)). 24 We now have all the necessary tools to prove Proposition 4.2. We take δ = C/(k2 log2 (k + 1/ǫ)) for a sufficiently small constant C > 0. Combined with Corollary 4.4, this gives condition (ii). For condition (i), note that, by Corollary 4.4, A agrees with N (0, 1) on the first 2k − 1 moments. Since δ was selected to be smaller than O(1/k log(1/ǫ)), Lemma 4.7 gives condition (iii). Lemma 4.6 gives condition (iv). Finally, by our choice of δ and Lemma 4.5, we get condition (v). This completes the proof. 5 SQ Lower Bounds for Robust Learning of a Gaussian In this section, we prove our super-polynomial SQ lower bounds for robustly learning a high-dimensional Gaussian. In Section 5.1, we show our lower bound for robustly learning an unknown mean spherical Gaussian. In Section 5.2, we give our lower bound for robustly learning a zero mean unknown covariance Gaussian with respect to the spectral norm. 5.1 Robust Learning Lower Bound for Unknown Mean Gaussian In this subsection, we use the framework of Section 3 to prove the following theorem: Theorem 5.1. Let 0 < ǫ < 1 and n ≥ log(1/ǫ)Ω(1) . Fix any M ∈ Z+ such that M = O(log1/2 (1/ǫ)), where the universal constant in the O(·) is assumed to be sufficiently small. Any algorithm that, given SQ access to a distribution P on Rn which satisfies dTV (P, N (µ, I)) ≤ ǫ for an unknown µ ∈ Rn with kµk2 ≤ poly(n/ǫ), and returns a hypothesis distribution Q with dTV (Q, P) ≤ O(ǫ log(1/ǫ)1/2 /M 2 ),   1/12 requires at least 2Ω(n ) ≥ nM calls to STAT O(n)−M/6 or to VSTAT O(n)M/3 . The theorem will follow from the following proposition: Proposition 5.2. For any δ > 0 and m ∈ Z+ , there is a distribution A on R satisfying the following conditions: (i) A and N (0, 1) agree on the first m moments. p (ii) dTV (A, N (δ, 1)) ≤ O(δm2 / log(1/δ)). (iii) χ2 (A, N (0, 1)) = O(δ). Before we prove Proposition 5.2, we show how Theorem 5.1 easily follows from it using the machinery developed in Section 3. Proof of Theorem 5.1. We can assume without loss of generality that ǫ > 0 is smaller than a sufficiently small universal constant. We apply Propositions 3.3 and 5.2, with the parameter c set to c = 1/6, m = M , and δ = Cǫ ln(1/ǫ)1/2 /M 2 , where C > 0 is a sufficiently large constant. By Proposition 5.2, we have that p (i) A and N (0, 1) agree on the first m moments, (ii) dTV (A, N (δ, 1)) ≤ O(δm2 / log(1/δ)) = O(ǫ) and (iii) χ2 (A, N (0, 1)) = O(δ). Note that for any unit vector v ∈ Sn , it holds that dTV (Pv , N (vδ, I)) = dTV (A, N (δ, 1)) ≤ O(Cǫ) . Therefore, for any unit vectors v, v ′ with |v · v ′ | ≤ 1/8 we have that: dTV (Pv , Pv′ ) ≥ dTV (N (δv, I), N (δv ′ , I)) − dTV (Pv , N (vδ, I)) − dTV (Pv′ , N (v ′ δ, I)) ≥ Ω(δkv − v ′ k2 ) − O(Cǫ) √ = Ω(δ 2 − 2v · v ′ ) − O(Cǫ) = Ω(δ) − O(Cǫ) = Ω(δ) , 25 (9) where the first line is the triangle inequality, the second line uses (9) and that dTV (N (µ1 , I), N (µ2 , I)) = Ω(kµ1 − µ2 k) when kµ1 − µ2 k is smaller than an absolute constant, the third line uses the assumption that |v · v ′ | ≤ 1/8, and the last line follows from the definition of δ. We want to apply Proposition 3.3 with its “local parameter” ǫ taken to be Ω(δ). The assumption on n in the statement of Theorem 5.1, i.e., n ≥ log(1/ǫ)Ω(1) , implies the condition n ≥ mΩ(1) in the statement of Proposition 3.3. By our choice of c = 1/6, we conclude that any SQ algorithm for our learning problem  √   1/12 ) Ω(n M −M/6 δ or to VSTAT O(n)M/3 /δ to produce requires at least 2 ≥ n queries to STAT O(n) a hypothesis distribution Q with dTV (Q, Pv ) ≤ O(δ) ≤ O(ǫ ln(1/ǫ)1/2 /M 2 ) , where we used the assumption that C is sufficiently large. This completes the proof. Proof of Proposition 5.2 The rest of this section is devoted to the proof of Proposition 5.2. We start by describing the outline of the proof. We then provide a number of intermediate useful lemmas that we subsequently combine to complete the proof. p The proof plan proceeds as follows. For some C = Θ( log(1/δ)), we define the one-dimensional distribution A to be: • For x ∈ / [−C, C], we define A(x) = G(x − δ). • For x ∈ [−C, C], we define A(x) = G(x − δ) + p(x), where p(x) is the degree-m polynomial with RC −C p(x)dx = 0 and Z C i p(x)x dx = −C Z ∞ −∞ (G(x) − G(x − δ))xi dx , (10) for 1 ≤ i ≤ m. (We note that p is unique after fixing m, C and δ.) We need to show that we can p find appropriate values for the parameters m, C, and δ such that the L1 -norm of p(x) is at most O(δm2 / log(1/δ)) and that A(x) is non-negative. To achieve that, we will express p(x) as a linear combination of (appropriately scaled) Legendre polynomials, a family of orthogonal polynomials on [−C, C]. Rather than directly showing that the first m moments agree, we will instead want that the expectations of the first m scaled Legendre polynomials agree. Bounds on the coefficients of the Legendre polynomials in p(x) allow us to obtain bounds on the L1 and L∞ norms of p(x) on [−C, C]. Choosing m, δ, and C appropriately will complete the proof of the proposition. Properties of Legendre Polynomials we will need: We start by recording the properties of Legendre polynomials that Fact 5.3. [Sze89] The Legendre polynomials, Pk (x), for k ∈ Z+ , satisfy the following properties: (i) Pk (x) is a degree-k polynomial, P0 (x) = 1, and P1 (x) = x. R1 (ii) −1 Pi (x)Pj (x)dx = (2/(2i + 1))δi,j for all i, j ≥ 0. (iii) |Pk (x)| ≤ 1 for all |x| ≤ 1. (iv) Pk (x) = (−1)k Pk (−x). P⌊k/2⌋  (v) Pk (x) = (1/2k ) i=0 ki 2k−2i k−2i x . k 26 As a simple corollary we obtain the following lemma: Corollary 5.4. We have: (i) |Pk (x)| ≤ (4|x|)k for all |x| ≥ 1. √ R1 (ii) −1 |Pk (x)|dx ≤ O(1/ k). We are now ready to proceed with the formal proof. The main technical result of this section is the following lemma: P 3/2 /C 2 ), for 0 ≤ k ≤ m. Lemma 5.5. We can write p(x) = m k=0 ak Pk (x/C), where |ak | = O(δk Before we give the proof of Lemma 5.5, we deduce two corollaries that will be useful in the proof of Proposition 5.2. First, we can obtain bounds on the L1 and L∞ norms of p(x) on [−C, C]. As an immediate corollary of Lemma 5.5 and the aforementioned properties of Legendre polynomials, we deduce: RC Corollary 5.6. We have that: −C |p(x)|dx ≤ O(δm2 /C) and |p(x)| ≤ δm5/2 /C 2 , for all x ∈ [−C, C]. We now bound from above the desired χ2 -divergence:  Lemma 5.7. χ2 (A, N (0, 1)) = O δ2 + δm5/2 /C 2 · (C 2 δ2 + max|x|≤C |p(x)|/G(x)) . Proof. We have the following: Z ∞ A(x)2 /G(x)dx − 1 χ2 (A, N (0, 1)) = = −∞ ∞ Z −∞ Z G(x − δ)2 /G(x)dx − 1 + For the first term, we note that: Z ∞ Z 2 G(x − δ) /G(x)dx = −∞ ∞ −∞ C −C 2p(x)G(x − δ)/G(x)dx + Z C p(x)2 /G(x)dx . −C G(x − 2δ) exp(δ2 )dx = exp(δ2 ) ≤ 1 + 2δ2 . We bound the second term from above as follows: Z C Z 2p(x)G(x − δ)/G(x)dx = −C = C −C Z C −C 2p(x) exp(xδ − δ2 /2)dx p(x) · (1 + xδ + O(C 2 δ2 ))dx 2 2 ≤ C|a0 | + O(Cδ|a1 |) + C δ Z ≤ 0 + O(δ2 /C) + O(δ3 m5/2 ) , C −C |p(x)|dx where the last lines uses Lemma 5.5 and Corollary 5.6. Finally, for the third term we have: Z C −C p(x)2 /G(x)dx ≤ δm5/2 /C 2 max |p(x)|/G(x) , x∈[−C,C] where the inequality follows from Corollary 5.6. This completes the proof of Lemma 5.7. 27 Proof of Lemma 5.5 We first note that we can express p(x) as a linear combination of scaled Legendre polynomials whose coefficients are explicitly given by integrals: RC P Claim 5.8. We can write p(x) = m k=0 ak Pk (x/C), where ak = ((2k + 1)/2C) −C Pk (x/C)p(x)dx. Proof. Since p(x) has degree at most m and the set of polynomials Pk (x/C), Pm0 ≤ k ≤ m, contains a polynomial of each degree from 0 to m, there exists ak ∈ R such that p(x) = k=0 ak Pk (x/C). RC It follows from Fact 5.3 (ii) and a change of variables that −C Pi (x/C)Pj (x/C)dx = (2C/(2i+1))δi,j , for all i, j ≥ 0. We can use this to extract the ak ’s. For 1 ≤ k ≤ m, we have RC Pk (x/C)p(x)dx = RC Pk (x/C) ai Pi (x/C)dx = i=0 −C −C m P m P ai i=0 RC Pk (x/C)Pi (x/C)dx = (2C/(2k+1))ak . −C Since the first m moments of p are fixed, via 10, we obtain: Z C p(x)Pk (x/C)dx = −C Z ∞ −∞ (G(x) − G(x − δ))Pk (x/C)dx , (11) for any 0 ≤ k ≤ m. Since we will apply this with the parameter 1/δ exponential in m and C, we will be able to ignore O(δ2 ) terms. We use Taylor’s theorem to expand (G(x) − G(x − δ)) up to second order terms: Fact 5.9. G(x) − G(x − δ) = xG(x)δ + (ξ(x)2 − 1)/2 · G(ξ(x))δ2 , for some x ≤ ξ(x) ≤ x + δ. R∞ By (11) and Fact 5.9, to bound the magnitude of the ak ’s, it suffices to bound the terms −∞ Pk (x/C)xG(x)dx R∞ and −∞ Pk (x)(ξ(x)2 − 1)/2 · G(ξ(x))dx. This is done in the following two lemmas. √ R∞ Lemma 5.10. For k ≤ 4C, we have that −∞ Pk (x/C)xG(x)dx ≤ O( k/C). Proof. When k is even, using Fact 5.3 (iv), we have that Pk (x/C)xG(x) = −(Pk (−x/C) · (−x)G(−x)), and so the integral is zero. When k is odd, we can rewrite Fact 5.3 (v) in ascending order of terms, by using the change of variables j = (k + 1)/2 − i, as k Pk (x) = (1/2 ) (k+1)/2  X j=1 k (k − 1)/2 + j   k + 2j − 1 2j−1 x . 2j − 1 By standard results about the moments of Gaussians, for all j ≥ 1, we have that Q 1)!! := ji=1 (2i + 1). Thus, we can write Z ∞ −∞ Pk (x/C)xG(x)dx = Z ∞ k 1/2 −∞ k = (1/2 ) (k+1)/2  X j=1 (k+1)/2  X j=1 k (k − 1)/2 + j k (k − 1)/2 + j 28   R∞ −∞ x 2j G(x)dx = (2j +  k + 2j − 1 2j x G(x)/C 2j−1 dx 2j − 1  k + 2j − 1 (2j + 1)!!/C 2j−1 . 2j − 1 Note that this quantity is non-negative. We can bound it from above as follows:   Z ∞ (k+1)/2  X k k + 2j − 1 k Pk (x/C)xG(x)dx = (1/2 ) (2j + 1)!!/C 2j−1 (k − 1)/2 + j 2j − 1 −∞ j=1 X   √ k + 2j − 1 (1/ k) (2j + 1)!!/C 2j−1 2j − 1 X √ (1/ k)(k + 2j − 1)2j−1 (2j + 1)!!/C 2j−1 (2j − 1)! X √ (1/ k)2(k + 2j − 1)2j−1 /C 2j−1 (k+1)/2 ≤ j=1 (k+1)/2 ≤ j=1 (k+1)/2 ≤ j=1 X √ √ (k+1)/2 (2k/C)2j−1 ≤ 8 k/C . ≤ (2/ k) j=1 The proof of Lemma 5.10 is now complete. R∞ Lemma 5.11. For any integer 1 ≤ k ≤ 4C, we have that −∞ Pk (x)(ξ(x)2 − 1)/2 · G(ξ(x))dx ≤ O(1) , for any function ξ(x) with x ≤ ξ(x) ≤ x + δ, for all x ∈ R. Proof. We separate this integral into the interval [−C, C] and the tails. We can use Fact 5.3 (iii) to bound the integral on [−C, C], as follows: Z C Z C Pk (x)(ξ(x)2 − 1)/2 · G(ξ(x))dx ≤ (ξ(x)2 − 1)/2 · G(ξ(x))dx −C ≤ Z −C C −C (|x| + δ + 1)2 /2 · G(min{0, |x| − δ})dx ≤ O(δ) + Z C+δ −C−δ (|x| + 2δ + 1)2 /2 · G(x)dx  ≤ O δ + EX∼G [1] + EX∼G [|X|] + EX∼G [X 2 ] = O(1) . For the tails, we need Corollary 5.4(i). For the right tail, [C, ∞), we have Z ∞ Z ∞ 2 Pk (x)(ξ(x) − 1)/2 · G(ξ(x))dx ≤ (4|x|/C)k (ξ(x)2 − 1)/2 · G(ξ(x))dx C ZC∞ ≤ (4|x|/C)k (x + δ)2 G(x − δ)dx ZC∞ ≤ (4/C)k |x + 2δ|k+2 G(x − δ)dx C Z ∞ ≤ (4/C)k |x|k+2 · (1 + 2δ/C)k G(x − δ)dx C−δ Z ∞ ≤2 (4/C)k |x|k+2 G(x − δ)dx −∞ ≤ O((4/C)k (k + 3)!!) √ ≤ O((4 k/C)k ) ≤ O(1) . 29 A similar bound holds for the left tail, which completes the proof. Putting everything together, gives Lemma 5.5. To prove Proposition 5.2, we need to set C appropriately and check the bounds on m needed for A(x) to satisfy the necessary properties. p Proof of Proposition 5.2. Note that unless δ is sufficiently small and m2 ≤ O( log(1/δ)), p taking A = N (0, 1), instead of using our√construction, satisfies the proposition. We will take C = Θ( log(1/δ)), and so we can assume that m ≤ C. Recall that A(x) is defined to be G(x − δ) + p(x) on [−C, C] and G(x − δ) outside of [−C, C]. Firstly, A(x) needs to be the pdf of a distribution. Since Z ∞ Z C (G(x) − G(x − δ))Pk (x/C)dx Pk (x/C)p(x)dx = −C R∞ −∞ for k = 0, when Pk (x) = 1, we have that −∞ A(x)dx = 1. We also need that A(x) is non-negative, i.e., that A(x) = G(x − δ) + p(x) ≥ 0 for all x ∈ [−C, C]. Note that G(x) + p(x) ≥ G(C + δ) − δm5/2 /C 2 , p using Corollary 5.6. Since m2 ≤ C, we need G(C + δ) ≥ δC 3/4 . This holds when C = ln(1/δ) − δ, p p 3/4 since then we have G(C +δ) = δ/2π ≥ δ ln(1/δ) for sufficiently small δ. Note that this also implies that A(x) ≤ 2G(x − δ) for all x, and |p(x)| ≤ G(x) for all −C ≤ x ≤ C. The second of these and Lemma 5.7 imply (iii). For (i), by construction, we have that the first m moments agree. A satisfies (ii), since by Lemma 5.6 , Z p 1 C |p(x)|dx ≤ O(δm2 /C) = O(δm2 / log(1/δ)). dTV (A, N (δ, 1)) = 2 −C The proof of Proposition 5.2 is now compete. 5.2 Robust Learning Lower Bound for Unknown Covariance Gaussian In this subsection, we prove an SQ lower bound for robustly learning the covariance matrix of a high-dimensional Gaussian with known mean. We note that our lower bound applies even for spectral norm approximation. In particular, we show: Theorem 5.12. Let ǫ > 0 and n ≥ Ω(log2 (1/ǫ)). Fix any M ∈ Z+ such that M = O(log1/4 (1/ǫ)), where the universal constant in the O(·) is assumed to be sufficiently small. Any algorithm that, given SQ access to a distribution P on Rn which has dTV (P, N (0, Σ)) ≤ ǫ for some positive-definite Σ ∈ Rn×n with e with kΣ e − Σk2 ≤ O(ǫ log(1/ǫ)/M 4 ), requires at least 2n2/15 ≥ nM I/2  Σ  2I, and returnsa matrix Σ  calls to STAT O(n)−M/6 or to VSTAT O(n)M/3 . The theorem will follow from the following proposition: Proposition 5.13. For any 1/3 > δ > 0 and integer log(1/δ)1/4 ≫ m > 0, there is a distribution A on R satisfying the following conditions: (i) A and N (0, 1) agree on the first m moments. (ii) dTV (A, N (0, (1 − δ)2 ) ≤ O(δm4 / log(1/δ)). (iii) χ2 (A, N (0, 1)) = O(1 + m8 δ3/2 /log(1/δ)5/2 ). 30 As in the previous subsection, Theorem 5.12 follows easily from Proposition 3.3 and Proposition 5.13. Proof of Theorem 5.12. We apply Propositions 3.3 and 5.13 with m = M and δ = 2ǫ ln(1/ǫ)/M 4 . By Proposition 5.13, we have that (i) A and N (0, 1) agree on the first M moments, (ii) dTV (A, N (0, (1 − δ)2 )) ≤ O(δm4 / log(1/δ)) = O(ǫ) and (iii) χ2 (A, N (0, 1)) = O(1). Note that we cannot directly apply Proposition 3.3, since we are not aiming to learn within small total variation distance. Instead, we are interested in a different search problem, that of finding an approximation e to the covariance Σ with kΣ e − Σk2 ≤ ǫ log(1/ǫ)/M 4 , where Σ is the covariance of a mean 0 Gaussian Σ within ǫ total variation distance. Note that for Pv , we have that Σ = I − (1 − (1 − δ)2 )vv T . We need to e the set Z −1 (Σ) e = {Pv : argue that this search problem has at most one solution in S, i.e., that for any Σ, 2 T 4 −1 e e v ∈ S and kΣ−I −(1−(1−δ) )vv k2 ≤ ǫ log(1/ǫ)/M } has |Z (Σ)| ≤ 1, where S is as in Lemma 3.7. Lemma 5.14. For S as in Lemma 3.7 with c = 1/6 and with n larger than a sufficiently large constant, e − I − (1 − (1 − δ)2 )vv T k2 ≤ ǫ log(1/ǫ)/M 4 }| ≤ 1, for all Σ. e |{Pv : v ∈ S and kΣ e and let v, v ′ be distinct Proof. Suppose for a contradiction that this set has size at least 2 for some Σ 2 T e − Σv k2 ≤ elements. Let Σv = I − (1 − (1 − δ) )vv and define Σv′ similarly. Then we have kΣ 4 4 e ǫ log(1/ǫ)/M and kΣ − Σv′ k2 ≤ ǫ log(1/ǫ)/M . By the triangle inequality, we have kΣv − Σv′ k2 ≤ 2ǫ log(1/ǫ)/M 4 . However, we also have that |v ·v ′ | ≤ O(n−1/3 ) ≤ 1/2. Now we get that v T Σv = (1− δ)2 , but v T Σv′ v = (1 − |v · v ′ |2 ) · 1 + |v · v ′ |2 · (1 − δ)2 ≥ 3/4 + (1/4)(1 − δ)2 . We thus obtain kΣv − Σv′ k2 ≥ v T (Σv′ − Σv )v ≥ (3/4)(1 − (1 − δ)2 ) ≥ (3/2)δ − O(δ2 ) > δ , where the last inequality assumes that ǫ is at most an appropriately small universal constant. Since δ = 2ǫ ln(1/ǫ)/M 4 , this leads to a contradiction. Now we use the the proof of Proposition 3.3 with c = 1/6 and ǫ taken to be Ω(δ). Our condition on n, 8 ). We conclude that it requires at least 2n2/15 ≥ nM calls to n ≥ ln(1/ǫ)2 , implies the condition n ≥ Ω(m   e such that kΣ e − Σk2 ≤ ǫ log(1/ǫ)/M 4 . STAT O(n)−M/6 or to VSTAT O(n)M/3 to produce a a Σ Proof of Proposition 5.13. Similarly to the previous subsection, we choose to define the univariate distribution A to have probability density function given by A(x) = G(x/(1 − δ))/(1 − δ) − p(x)1[−C,C] , p where C is a sufficiently small multiple of log(1/δ) and p(x) is the unique degree-m polynomial that causes APand G(x) (the pdf of N (0, 1)) to have the same R ∞ first m moments. Once again, we may write m p(x) = k=0 ak Pk (x/C), where ak = ((2k + 1)/2C) −∞ (G(x) − G(x/(1 − δ))/(1 − δ))Pk (x/C)dx. The bulk of our proof will now be in bounding the ak ’s. The first thing to note is that since G(x) − G(x/(1 − δ)) is even, ak is 0 for k odd. For k even, we will 31 need to compute this expression using Fact 5.3 (v). In particular, we have that Z 2k + 1 ∞ ak = (G(x) − G(x/(1 − δ))/(1 − δ))Pk (x/C)dx 2C −∞  Z ⌊k/2⌋   X k 2k − 2i 2k + 1 ∞ −k (G(x) − G(x/(1 − δ))/(1 − δ))2 (x/C)k−2i dx = 2C i k −∞ i=0 2k + 1 = 2C = Z ∞ −∞ −k (G(x) − G(x/(1 − δ))/(1 − δ))2 ⌊k/2⌋  2k + 1 X 2k+1 C j=0 = k k/2 + j   k + 2j C −2j k Z ∞ −∞ ⌊k/2⌋  X k k/2 + j j=0   k + 2j (x/C)2j dx k (G(x) − G(x/(1 − δ))/(1 − δ))x2j dx   ⌊k/2⌋  k k + 2j 2k + 1 X C −2j (2j − 1)!!(1 − (1 − δ)2 j) 2k+1 C k/2 + j k j=0  ⌊k/2⌋  δ(2k + 1) X k + 2j ≤ C −2j (2j − 1)!!j C 2j j=0  ∞  δ(2k + 1) X 2k 2j ≤ C C j=1 3 ≤ δ10k C −3 , where in the last step we assume that k is less than a sufficiently small multiple of C. It is now clear that A is a pseudo-distribution that matches its first m moments with N (0, 1). Firstly, in order to check that A is a distribution, it clear that A(x) > 0 for |x| > C. For |x| ≤ C we have Pis m 4 −3 . Since this is smaller than δ 1/2 < that |A(x) − G(x/(1 − δ))/(1 − δ)| ≤ k=0 |ak | ≤ δ10m C G(x/(1 − δ))/(1 − δ), we have that A(x) ≥ 0 everywhere. Next, we need to bound from above dTV (A, N (0, 1 − δ)), i.e., the L1 -distance between A(x) and G(x/(1 − δ))/(1 − δ). This in turn is at most m Z X k=0 C −C |ak Pk (x/C)|dx ≤ m X δ20k3 C −2 = O(δm4 / log(1/δ)). k=0 Finally, we need to bound from above χ2 (A, N (0, 1)). Note that χ2 (A, N (0, 1)) ≤ O(χ2 (N (0, 1 − δ), N (0, 1)) + χ2 (A − N (0, 1 − δ), N (0, 1))) . It is easy to see that χ2 (N (0, 1 − δ), N (0, 1)) = O(1 + δ). On the other hand, we have that χ2 (A − N (0, 1 − δ), N (0, 1))) ≤ (m + 1) m X a2k k=0 = O(m7 δ2 C −6 ) = O(m8 δ3/2 C This completes the proof. 32 Z C Pk (x/C)2 /G(x)dx −C m Z C X k=0 −5 ). −C G(x)−2 dx 6 Statistical and Computational Tradeoffs In this section, we prove our SQ lower bounds establishing statistical-computational tradeoffs for two natural robust estimation problems. In Section 6.1, we give a sharp-tradeoff for the problem of robustly estimating the covariance matrix in spectral norm. In Section 6.2, we show such a tradeoff for robust sparse mean estimation. 6.1 Robust Estimation of Covariance Matrix in Spectral Norm In this subsection, we establish an SQ lower bound for robust covariance estimation in spectral norm. Our SQ lower bound provides evidence for the existence of a statistical-computational tradeoff for this problem. Roughly speaking, we show that, for any constant c > 0, given samples from a corrupted n-dimensional Gaussian N (0, Σ), any computationally efficient SQ algorithm that approximates Σ within a factor of 2 requires Ω(n2−c ) samples. Our lower bound applies even to the weaker Huber contamination model. We note that the information-theoretic optimum for this problem is known to be Θ(n) samples (and is achievable by an exponential time SQ algorithm). Hence, our lower bound establishes a nearly-quadratic gap in the sample complexity between efficient and inefficient SQ algorithms for this problem. Formally, we show: Theorem 6.1. Let 0 < c < 1/6, and n > 125. Any algorithm that, given SQ access to a distribution P on Rn of the form P = (1 − ǫ)N (0, Σ) + ǫN1 , where ǫ ≤ c/ ln(n) and N1 is a noise distribution, for some covariance Σ with kΣk2 ≤ poly(n/ǫ), and returns a matrix Σ̃ with Σ̃/2  Σ  2Σ̃, requires   c/3 at least 2Ω(n ) calls to STAT O(n)−(1−5c/2) or to VSTAT O(n)2−5c . Furthermore, the result holds even when the noise distribution N1 is a mixture of 2 Gaussians. Proof. Let ǫ = c/ ln(n). We consider the following mixture of 3 Gaussians: p p A = (1 − ǫ)N (0, (1/5 − ǫ)/(1 − ǫ)) + (ǫ/2) · N ( 4/(5ǫ), 1) + ǫ/2 · N (− 4/(5ǫ), 1) . Note that A is symmetric about 0 and so, for X ∼ A, we have EX∼A [X] = EX∼A [X 3 ] = 0. The variance of A is VarX∼A [X] = EX∼A [X 2 ] = (1/5 − ǫ) + ǫ · 4/(5ǫ) + ǫ = 1. That is, A agrees with N (0, 1) on the first 3 moments. We need a bound on χ2 (A, N (0, 1)). For this, we use the following three easy facts (see Appendix D for the simple proofs): Fact 6.2. For distributions B, C, D and w ∈ [0, 1], we have that χ2 (wB + (1 − w)C, D) = w2 χ2 (B, D)+ (1 − w)2 χ2 (C, D) + 2w(1 − w)χD (B, C). Fact 6.3. For µ, µ′ ∈ R, we have that χN (0,1) (N (µ′ , 1), N (µ, 1)) = exp(µµ′ ) − 1. p Fact 6.4. We have that χ2 (N (0, σ 2 ), N (0, 1)) = 2/σ 4 − 1/σ 2 − 1. Note that 1/6 ≤ (1/5 − ǫ)/(1 − ǫ) ≤ 1/5. Fact 6.4 now yields p √ χ2 (N (0, (1/5 − ǫ)/(1 − ǫ)), N (0, 1)) ≤ 2/(1/6)2 + 1/(1/6) − 1 = 78 − 1 ≤ 8 . Using Fact 6.2, we can write: p χ2 (A, N (0, 1)) ≤ (1 − ǫ)2 χ2 (N (0, (1/5 − ǫ)/(1 − ǫ)), N (0, 1)) + (ǫ2 /2)χ2 (N ( 4/5ǫ, 1), N (0, 1)) p p p + (ǫ2 /2)χN (0,1) (N ( 4/5ǫ, 1), N (− 4/5ǫ, 1)) + (1 − ǫ)ǫχN (0,1) (N (0, (1/5 − ǫ)), N ( 4/5ǫ, 1)) ≤ 8 + (ǫ2 /2)(exp(4/(5ǫ)) − 1) + 0 q p + (1 − ǫ)ǫ χ2 (N ( 4/5ǫ, 1), N (0, 1))χ2 (N (0, (1/5 − ǫ)/(1 − ǫ)), N (0, 1)) √ ≤ 8 + ǫ2 exp(4/(5ǫ)) + ǫ 8 exp(2/(5ǫ)) ≤ O(1 + exp(1/ǫ)) ≤ O(nc ) . 33 Note that we cannot directly apply Proposition 3.3, since we are not aiming to learn within small variation distance. Instead, we are interested in a different search problem, that of approximating the covariance Σv of the (1 − ǫ) weight component of Pv to within a factor of 2. We need to argue that this search problem has at most one solution in S, i.e., that for any Σ, the set Z −1 (Σ) = {Pv : v ∈ S and Σ  Σv  2Σ} has |Z −1 (Σ)| ≤ 1, where S is as in Lemma 3.7. Lemma 6.5. For S as in Lemma 3.7, |{Pv : v ∈ S and Σ  Σv  2Σ}| ≤ 1 for all Σ. Proof. Suppose for a contradiction that |Z −1 (Σ)| ≥ 2 for some Σ. Then there are distinct v, v ′ ∈ S with Σ  Σv  2Σ and Σ  Σv′  2Σ. However, we have that |v · v ′ | ≤ O(nc−1/2 ) ≤ n−1/3 . Now v T Σv v = (1/5 − ǫ)/(1 − ǫ) < 1/5, but v T Σv′ v = (1 − |v · v ′ |2 ) · 1 + |v · v ′ |2 · (1/5 − ǫ)/(1 − ǫ) ≥ 1 − 5|v · v ′ |2 /6 ≥ 1 − n−1/3 > 4/5 . Thus, we need v T Σv ≤ 2v T Σv v < 2/5, but v T Σv ≥ v T Σv′ v/2 > 2/5. This is a contradiction and so |Z −1 (Σ)| < 1. Now the proof of Proposition 3.3 applies and we obtain that any algorithm that outputspa Σ̃ satisfying the c/2 desired conditions uses at least 2Ω(n ) ≥ nm+1 queries to STAT(O(n)−(m+1)(1/4−c/2) χ2 (A, N (0, 1))) or to VSTAT(O(n)(m+1)(1/2−c) /χ2 (A, N (0, 1))), where m = 3. Now substituting χ2 (A, N (0, 1) ≤ c/2 O(nc ), we get that we need at least 2Ω(n ) queries to STAT(O(n)−(1−5c/2) ) or to VSTAT(O(n)(2−5c) ). The proof is now complete. 6.2 Robust Sparse Mean Estimation In this subsection, we establish an SQ lower bound for robust sparse mean estimation. Our SQ lower bound gives evidence for the existence of a statistical-computational tradeoff for this problem. Roughly speaking, we show that, for any constant c > 0, given samples from a corrupted n-dimensional Gaussian N (µ, I), where the mean vector µ is k-sparse, any computationally efficient SQ algorithm that approximates the true mean requires Ω(k2−c ) samples. Our lower bound applies even to the weaker Huber contamination model. We note that the information-theoretic optimum for this problem is known to be Θ(k log n) (and is achievable by an exponential time SQ algorithm). Hence, our lower bound establishes a nearly-quadratic gap in the sample complexity between efficient and inefficient SQ algorithms. Formally, we show: Theorem 6.6. Fix any constant 0 < c < 1. Let k, n ∈ Z+ be sufficiently large positive integers satisfying n ≥ 8k2 . Any algorithm which, given SQ access to a distribution P on Rn such that P = (1 − δ)N (µ, I) + δN1 , where N1 is an arbitrary distribution, δ = ǫ/kc/4 , and µ ∈ Rn is promised to be k-sparse with c kµk2 = ǫ, and outputs a hypothesis vector µ b satisfying kb µ − µk2 ≤ ǫ/2, requires at least Ω(nck /8 ) queries to STAT(O(k)3c/2−1 ) or to VSTAT(O(k)2−3c ). To prove our result, we will use the framework of Section 3: We will construct a suitable one-dimensional distribution A and consider an appropriate collection of distributions Pv , but this time only for k-sparse unit vectors v on Rn . We start by showing an analogue of Lemma 3.7 for k-sparse vectors, and then use it to prove an analogue of Proposition 3.3. Our analogue of Lemma 3.7 is the following: Lemma 6.7. Fix a constant 0 < c < 1. There exists a set S of k-sparse unit vectors on Rn of cardinality c |S| = ⌊nck /8 ⌋ such that for each pair of distinct vectors v, v ′ ∈ S we have that |v · v ′ | ≤ 2kc−1 . Proof. Let √ D be the uniform distribution over the set of vectors v on Rn that have exactly k coordinates equal to 1/ k and the rest n − k coordinates equal to zero. Consider the distribution D ′ of the inner product v · v ′ , with v and v ′ independently drawn from D. Then, we have that v · v ′ = i/k, where i is the number of 34 non-zero coordinates that v ′ and v ′ have in common. Note that the distribution D ′ does not change if we fix v ′ and therefore we have that      k n−k n ′ Pr[v · v = i/k] = / . i k−i k In other words the random variable k(v ·v ′ ) is distributed as the hypergeometric distribution with parameters (n, k, k). By standard tail bounds on the hypergeometric distribution, for t > 0, we have   Pr k(v · v ′ ) ≥ k(k/n + t) ≤ exp (−k · KL (t + k/n||k/n)) , where KL(a||b) = a ln(a/b) + (1 − a) ln( 1−a 1−b ). We apply this concentration inequality in a regime where a ≥ 9b, in which case KL(a||b) ≥ a ln(a/b) − 1 ≥ (a/2) ln(a/b). def Fix any constant 0 < c < 1. We apply the above concentration bound for t = kc−1 . Recalling the assumption n ≥ k2 , we have that t + k/n ≥ 9k/n, and therefore   Pr k(v · v ′ ) ≥ k(k/n + t) ≤ exp (−k · KL (t + k/n||k/n)) ≤ exp (−kt ln (tn/k))  −kt  tn n −kc = = k k2−c ≤ n−ck c /2 . ckc /4  c Now if we let S be a set of ⌊nck /8 ⌋ unit vectors drawn independently from D, there are ⌊n 2 ⌋ < c ⌊nck /2 ⌋ distinct pairs of v, v ′ ∈ S, and by a union bound the probability there exist distinct v, v ′ ∈ S with c c (v · v ′ ) ≥ 2kc−1 is less than ⌊nck /2 ⌋n−ck /2 < 1. Thus, there exists a set S such that all distinct pairs v, v ′ ∈ S satisfy |v · v ′ | ≤ 2kc−1 . This completes the proof. Before we proceed with the proof of Theorem 6.6, we make a useful observation: By following the proof of Proposition 3.3 using Lemma 6.7 instead of Lemma 3.7, mutatis mutandis, we obtain: Proposition 6.8. Given a distribution A over R that satisfies Condition 3.2 for some m ∈ Z+ , and any constant 0 < c < 1, consider the set of distributions Pv for v ∈ Sn that are k-sparse, with n ≥ max{2(m + 1) ln n, 8k2 }. For a given ǫ > 0, suppose that dTV (Pv , Pv′ ) > 2ǫ whenever |v·v ′ | is smaller than 1/8. Then, any SQ algorithm which, given access to Pv (x) for an unknown k-sparse v ∈ Sn , outputs a p hypothesis Q c /8 ck 2(m+1) −(m+1)(1/2−c) with dTV (Q, Pv ) ≤ ǫ needs at least ⌊n ⌋≥k queries to STAT(O(k) χ2 (A, N (0, 1))) (m+1)(1−2c) 2 or to VSTAT(O(k) /χ (A, N (0, 1))). The above proposition can be used for m = 1 to establish a similar but quantitatively somewhat weaker SQ lower bound. We can make a crucial improvement to this proposition for the specific A we use in the proof below. Proof of Theorem 6.6. We select the one-dimensional distribution A as follows: A = (1 − δ)N (ǫ, 1) + δN (−(1 − δ)ǫ/δ, 1) , where δ = ǫk−c/4 . Note that A has mean 0, i.e., matches m = 1 moments of N (0, 1). 2 2 2 2 We could use Facts 6.2 and 6.3 to obtain √ χ (A, N (0, 1) ≤ O(ǫ exp(ǫ /δ )). However, this would require the parameter δ to be equal to ǫ/ c ln k to get the required bounds from Proposition 6.8. The issue here is that χ2 (A, N (0, 1)) is much bigger than the variance of A, which means that the correlation inequality |χN (0,1) (Pv , Pv′ )| ≤ (v · v ′ )2 χ2 (A, N (0, 1)) is far from tight for most v and v ′ . For our choice of A, we prove the following lemma: 35 Lemma 6.9. If A = (1 − δ)N (ǫ, 1) + δN (−(1 − δ)ǫ/δ, 1), then for v, v ′ ∈ Sn , we have  1 + |χN (0,1) (Pv , Pv′ )| ≤ exp ǫ4 (v · v ′ )2 /δ4 . √ P Proof. Let θ be the angle between v and v ′ . As in (3), we willP use the expansion A(x) = √∞ i=0 ai Hei (x)G(x)/ i!. i As in (7), we also have the expansion Uθ A(x) = G(x) + ∞ i=2 ai cos θHei (x)G(x)/ i!. Thus, we can write χN (0,I) (Pv , Pv′ ) = χN (0,1) (A, Uθ A) Z ∞ = (A(x) − G(x))(Uθ A − G(x))/G(x)dx −∞ ! ∞ ! Z ∞ X ∞ X √ √ ai Hei (x)G(x)/ i! = ai cosi θHei (x)G(x)/ i! /G(x)dx −∞ = ∞ X i=1 i=2 a2i cosi θ . i=2 Since A is a distribution with mean zero, we have a0 = 1, a1 = 0. We need to take advantage of the fact than χ2 (A, N (0, 1)). that for our selected probability density function A, the coefficient a22 is much smaller √ We can find the ai explicitly using (4), which gives that ai = EX∼A [Hei (x)/ i!]. We have the following well-known fact: Fact 6.10. For µ ∈ R, we have EX∼N (µ,1) [Hei (x)] = µi . Proof. Note that the i-th derivative of G(x) isP (−1)i Hei (x)G(x). Using Taylor’s theorem, we can expand ∞ i G(x − µ) around x to obtain G(x − µ) = i=0 µ Hei (x)G(x)/i! . Taking the expectation of Hei (x) extracts the i-th term, establishing the fact. Thus, we have √ i!ai = EX∼A [Hei (x)] = (1 − δ)EX∼N (ǫ,1) [Hei (x)] + δEX∼N (−(1−δ)ǫ/δ,1) [Hei (x)] = (1 − δ)ǫi + δ(−(1 − δ)ǫ/δ)i . √ In addition to a0 = 1,a1 = 0, we can derive the bound |ai | ≤ (ǫ/δ)i / i!. Recalling the special case a1 = 0 and summing over i, we have |χN (0,I) (Pv , Pv′ )| ≤ ≤ ∞ X i=1 ∞ X i=2 a2i | cos θ|i (ǫ/δ)2i | cos θ|i /i!  = exp ǫ2 |v · v ′ |/δ2 − 1 − ǫ2 |v · v ′ |/δ2 . To complete the proof of the lemma, it is sufficient to show that exp(x)−x ≤ exp(x2 ) for all x ≥ 0. We note that both expressions are 1 and have derivative 0 at x = 0. It suffices to show that d2 (exp(x) − x)/dx2 ≤ d2 (exp(x2 )/dx2 for x ≥ 0. Note that 2 d2 ex d2 (ex − x) 2 2 2 2 / = (2ex + 4x2 ex )e−x ≥ 2ex −x = 2e(x−1/2) −1/4 ≥ 2e−1/4 > 1 . 2 2 dx dx This completes the proof. 36 We now have all the necessary ingredients to complete the proof of Theorem 6.6. For distinct k-sparse unit vectors v, v ′ ∈ S, where S is given by Lemma 6.7, we have that  |χN (0,1) (Pv , Pv′ )| ≤ exp ǫ4 (v · v ′ )2 /δ4 − 1  ≤ exp ǫ4 4k2c−2 /δ4 − 1  ≤ exp 4k2c−2 · kc − 1  = e4 exp k3c−2 − 1 ≤ e4 k3c−2 . Following the proof of Proposition 3.3, we now have that it takes Ω(nck or to VSTAT(O(k)2−3c ) to learn Pv . c /8 ) queries to STAT(O(k)3c/2−1 ) 7 Sample Complexity Lower Bounds for High–Dimensional Testing In this section, we use our framework to prove information-theoretic lower bounds on the sample complexity of our two high-dimensional testing problems: (i) robustly testing the mean of a single unknown mean identity covariance Gaussian in Huber’s contamination model, and (ii) (non-robustly) testing between a single spherical Gaussian and a mixture of 2 spherical Gaussians. Both these statements follow from the structural results established in the previous sections using the following proposition: Proposition 7.1. Let A be a distribution on R such that A has mean 0 and χ2 (A, N (0, 1)) is finite. Then, there is no algorithm that, for any n, given N < n/(8χ2 (A, N (0, 1))) samples from a distribution D over Rn which is either N (0, I) or Pv , for some unit vector v ∈ Rn , correctly distinguishes between the two cases with probability at least 2/3. Proof. At a high-level, the proof of the proposition uses the structure of the set of Pv ’s and standard information-theoretic arguments. Suppose that, after fixing the dimension n, the algorithm takes at most N samples. We can consider the testing algorithm as a (possibly randomized) function from N -tuples of samples to its output. For a distribution D, let D ⊗N denote the distribution over independent N -tuples drawn from D. We write f (D ⊗N ) for the Bernoulli distribution that gives the output of the algorithm given a single sample of D ⊗N . Let QN be the distribution obtained by choosing v uniformly at random over the unit sphere Sn , and then drawing N samples from Pv . Then, f (QN ) should be “NO” with probability at least 2/3, since the probability that ⊗N ) is “YES” with probability at least each f (P⊗N v ) is “NO” is at least 2/3. On the other hand, f (N (0, I) 2/3. By the data processing inequality, it follows that dTV (QN , N (0, I)⊗N ) ≥ dTV (f (QN ), f (N (0, I)⊗N )) ≥ 1/3 . Suppose for the sake of contradiction that N < n/(8χ2 (A, N (0, 1))). Then, we claim that dTV (QN , N (0, I)⊗N ) < 1/3 . 37 Indeed, we have that: 4dTV (QN , N (0, I)⊗N )2 + 1 ≤ χ2 (QN , N (0, I)⊗N ) + 1 = Z Z N Y (1) (N ) 2 G(x(i) )dx(N ) . . . dx(1) QN (x , . . . x ) / ··· = = = = ≤ Z Z Z x(1) ∈Rn x(1) ∈Rn v∈Sn Z Z Zv∈Sn Z v∈Sn ··· Z v′ ∈Sn v′ ∈S v′ ∈S x(N) ∈Rn x(N) ∈Rn Z i=1 Z x(1) ∈Rn v∈Sn ··· Z Z v′ ∈S (1) (N ) (1) (N ) PN )PN )/ v (x , . . . , x v′ (x , . . . , x n N Y G(x(i) )dv ′ dvdx(N ) . . . dx(1) i=1 N Y x(N) ∈Rn i=1 Pv (x(i) )Pv′ (x(i) )/G(x(i) )dx(N ) . . . dx(1) dv ′ dv (1 + χN (0,I) (Pv , Pv′ ))N dv ′ dv n n 1 + |v · v ′ |2 χ2 (A, N (0, 1)) N dv ′ dv , where the last line follows from Lemma 3.4, since A satisfies Condition 3.2 for m = 1. We will need the following facts about the Beta function B(x, y): R π/2 Fact 7.2. (i) For x > −1, y > −1 we have that: 0 sinx (θ) cosy (θ) = B((x + 1)/2, (y + 1)/2)/2. (ii) For all x, y ∈ R, we have that B(x, y + 1) = B(x, y) · y/(x + y). Consider choosing v and v ′ independently uniformly at random over Sn . To obtain our tight sample complexity results, we will need a more precise analysis for the distribution of the angle θ between v and v ′ . Specifically, we show the following: Lemma 7.3. If we choose v and v ′ uniformly at random from Sn , the angle θ between them is distributed with the probability density function sinn−2 (θ)/B((n − 1)/2, 1/2), where B(x, y) is the Beta function. Proof. Since a rotation of the sphere moves both v and v ′ , θ is invariant under such rotations. Thus, we get the same distribution by fixing v ′ = e1 , the unit vector in the x1 -direction, and choosing v uniformly at random over the sphere. Now we have that cos θ = x1 . Let Sn (r) denote the surface area of the sphere of radius r in (n + 1) dimensions and note that Sn (r) = r n Sn (1). For any measurable function f ,we have that Z π Z Z f (cos θ) sinn−2 (θ)Sn−2 (1)dθ . f (x1 )Sn−2 (x2 )ds = f (x1 )dΣ = 0 S2 Sn We thus have that the pdf of θ is proportional to sinn−2 (θ). Taking f (x1 ) ≡ 1, note that Z π Z sinn−2 (θ)Sn−2 (1)dθ = B((n − 1)/2, 1/2) , 1dΣ = Sn−2 (1) = Sn 0 using Fact 7.2 (i). We thus have that the pdf of θ is sinn−2 (θ)/Sn−2 (1) = sinn−2 (θ)/B((n − 1)/2, 1/2) . This completes the proof. 38 We now have that 4d2TV ⊗N (QN , N (0, I) )+1≤ Z Z v′ ∈S 1 + |v · v ′ |2 χ2 (A, N (0, 1)) N dv ′ dv n n Zv∈S π N = 1 + | cos θ|2 χ2 (A, N (0, 1)) sinn−2 (θ)/B((n − 1)/2, 1/2)dθ 0 =2 Z π/2 1 + cos2 (θ)χ2 (A, N (0, 1)) 0 N sinn−2 (θ)/B((n − 1)/2, 1/2)dθ N   Z π/2 X N χ2 (A, N (0, 1))i cos2i (θ) sinn−2 (θ)/B((n − 1)/2, 1/2)dθ 2 = i 0 i=0 N   X N 2 = χ (A, N (0, 1))i B((n − 1)/2, i + 1/2)/B((n − 1)/2, 1/2) . i i=0 PN We rewrite the above sum as i=0 bi , where   N 2 bi = χ (A, N (0, 1))i B((n − 1)/2, i + 1/2)/B((n − 1)/2, 1/2) . i N  N / i = (N − i)/(i + 1) and using Note that b0 = 1. Now consider the ratio bi+1 /bi . Note that that i+1 Fact 7.2, we have that B((n − 1)/2, i + 3/2)/B((n − 1)/2, i + 1/2) = (i + 1/2)/(i + n/2). Therefore, it follows that bi+1 /bi = χ2 (A, N (0, 1)) · (N − i)/(i + n/2) · (i + 1/2)/(i + 1) . For all i, we have bi+1 /bi ≤ χ2 (A, N (0, 1)) · N/(n/2) = 2N χ2 (A, N (0, 1))/n . When N ≤ n/(8χ2 (A, N (0, 1))), we have bi+1 /bi ≤ 1/4 for i ≥ 0, and therefore N X i=0 Hence, we have bi ≤ 1/(1 − 1/4) = 4/3 . 4d2TV (QN , N (0, I)⊗N ) + 1 ≤ 1/3 < 4/9 . This implies that dTV (QN , N (0, I)⊗N ) < 1/3, which is the desired contradiction. This completes the proof. Remark 7.4. It is worth noting that matching m > 1 many moments does not seem to help in the setting of the previous proposition, as long as χ2 (A, N (0, 1)) ≤ 1. This may seem to some extent unsurprising, given that O(n) samples suffice for some of the learning problems we consider here. On the other hand, we consider it somewhat surprising looking at the proof of Proposition 7.1. Specifically, for general m, we would have that N   X N 2 2 ⊗N 4dTV (QN , N (0, I) ) + 1 ≤ χ (A, N (0, 1))i B((n−1)/2, i(m+1)/2+1/2)/B((n−1)/2, 1/2) . i i=0 Note that the ratio of one term to the next approximately grows as N χ2 (A, N (0, 1))i(m−1)/2 /n(m+1)/2 . For this to be less than 1/2, for all 0 ≤ i ≤ N , we need N (m+1)/2 χ2 (A, N (0, 1)) ≤ O(n(m+1)/2 ). Thus, we need at least N = Ω(n/(χ2 (A, N (0, 1)))2/m ) samples . This suggests that we should be able to obtain a tighter lower bound if χ2 (A, N (0, 1)) > 1 using this technique. We omit the details here, as we are mainly interested in the regime χ2 (A, N (0, 1)) ≤ O(1) for our applications in this paper. 39 Using Proposition 7.1, we establish the two main results of this section: Theorem 7.5 (Sample Complexity Lower Bound for Robustly Testing Unknown Mean Gaussian). There is no algorithm that, for every ǫ > 0 and positive integer n, given fewer than Ω(n) samples from a distribution P on Rn which is promised to satisfy either (a) P = N (0, I) or (b) P = (1 − δ)N (µ, I) + δN1 , where δ = ǫ/100, kµk2 ≥ ǫ and the noise distribution N1 is a spherical Gaussian, can distinguish between the two cases with probability at least 2/3. If instead, for any constant 0 < c < 1, we are promised that P = (1 − δ)N (µ, I) + δN1 , where δ = ǫ/nc/4 in case (b), then no algorithm that takes less than Ω(n1−c ) samples can distinguish between (a) and (b) with probability at least 2/3. Proof. Let δ be the noise rate. We will take δ = ǫ/100 or δ = ǫ/nc/4 . In both cases, we select our one-dimensional distribution to be the following: A = (1 − δ)N (ǫ, 1) + δN (−(1 − δ)ǫ/δ, 1) . Now Lemma 6.9 yields that for v, v ′ ∈ Sn , we have  1 + |χN (0,1) (Pv , Pv′ )| ≤ exp ǫ4 (v · v ′ )2 /δ4 . We will not apply Proposition 7.1 directly but follow its proof using the aforementioned stronger correlation bound. We have: Z Z (1 + χN (0,I) (Pv , Pv′ ))N dv ′ dv 4dTV (QN , N (0, I)⊗N )2 + 1 ≤ ′ Zv∈Sn Zv ∈Sn  exp N ǫ4 (v · v ′ )2 /δ4 dv ′ dv ≤ ′ n v ∈Sn Zv∈S π  exp N ǫ4 (cos θ)2 /δ4 sinn−2 (θ)/B ((n − 1)/2, 1/2) dθ = 0 = ∞ X i=0 (N ǫ4 /δ4 )i B((n − 1)/2, i + 1/2)/i!B((n − 1)/2, 1/2) . Now note that the ratio of the (i + 1)-th term to the i-th term of the corresponding series is 2N ǫ4 N ǫ4 /δ4 i + 1/2 · ≤ . i + 1 i + n/2 nδ4 When N ≤ nδ4 /2ǫ4 , the 0-th term is 1 and the ratio of the (i + 1)-th to i-th term is less than 1/4. Therefore, the above sum is less than 1/(1 − 1/4) = 4/3, which implies that √ dTV (QN , N (0, I)⊗N ) ≤ 1/ 12 < 1/3 . Following the proof of Proposition 7.1, we conclude that no algorithm satisfying the necessary conditions exists. To complete the proof, note that for δ = ǫ/100, we need at least Ω(n) samples. And for δ = n−c/4 ǫ, we need at least Ω(n1−c ) samples. Theorem 7.6 (Sample Complexity Lower Bound for Testing GMMs). Fix 0 < ǫ < 1 and n ∈ Z+ . There is no algorithm that, given less than Ω(n/ǫ2 ) samples from a distribution P on Rn that is promised to be either (a) P = N (0, I), or (b) P is a mixture of two Gaussians each with weight 1/2 and identity covariance, such that dTV (P, N (0, I)) ≥ ǫ, distinguishes between the two cases with probability at least 2/3. 40 Proof. We choose our one-dimensional distribution as A = (1/2)N (−δ, 1) + (1/2)N (δ, 1) , where we set (with hindsight) δ = Θ(ǫ1/2 ). Note that A has mean 0. By Claims 6.2 and 6.3, we have that   χ2 (A, N (0, 1)) = (1/2) exp(δ2 )/2 + exp(−δ2 )/2 − 1 = (1/2) cosh(δ2 ) − 1 = Θ(δ4 ) . Similarly, it can be shown that dTV (A, N (0, 1)) = Θ(δ2 ), which is Ω(ǫ) by our choice of δ. Applying Proposition 7.1 completes the proof. 8 SQ Algorithms for Robustly Learning and Testing a Gaussian The structure of this section is as follows: In Section 8.1, we prove a moment–matching structural result that forms the basis of our algorithms. In Section 8.2, we present our robust testing algorithm, and in Section 8.3 we give our robust learning algorithm. 8.1 One-Dimensional Moment Matching Lemma The main result of this section is the following structural result: p Lemma 8.1. Let G ∼ N (0, 1). For δ > ǫ > 0, define k = 2⌈ǫ ln(1/ǫ)/δ⌉. Let G′ be an ǫ-noisy onedimensional Gaussian with unit variance so that for all t ≤ k we have that the tth moments of G and G′ agree to within an additive (t − 1)!(δ/ǫ)t ǫ/t. Then, we have that dTV (G, G′ ) = O(δ). e = N (µ, 1) be such that dTV (G′ , G) e ≤ ǫ. We can assume without loss of generality that µ > 0. Proof. Let G p Looking at just the mean andp variance suffices to get dTV (G, G′ ) = O(δ log(1/δ)) using techniques similar to the proof of the O(ǫ log(1/ǫ)) filter algorithm from [DKK+ 16]. This allows us to focus on the case that µ ≥ 1. Formally, we have the following claim: e is at least 1. Claim 8.2. Lemma 8.1 holds when the mean µ of G Proof. We start by noting that we can assume ǫ > 0 is smaller that a sufficiently small universal constant. Assuming otherwise and recalling that δ > ǫ gives that dTV (G, G′ ) ≤ 1 = O(δ), in which case the lemma statement is trivial. Let µ′ be the mean of G′ . We can write e + ǫ′ E − ǫ′ L , G′ = G (12) e ≥ ǫ′ L . G (13) e ≤ ǫ. Moreover, it holds for distributions E, L with disjoint supports where ǫ′ = dTV (G′ , G) Since k ≥ 2 by definition, the lemma assumptions imply that |µ′ | ≤ δ and EX∼G′ [X 2 ] ≤ δ2 /ǫ. By (12) we have that µ′ = µ + ǫ′ EX∼E [X] − ǫ′ EX∼L [X], and similarly EX∼G′ [(X − µ′ )2 ] = 1 + (µ − µ′ )2 + ǫ′ EX∼E [(X − µ′ )2 ] − ǫ′ EX∼L [(X − µ′ )2 ]. Therefore, we get ǫ′ EX∼E [(X − µ′ )2 ] ≤ δ2 /ǫ − 1 − (µ′ − µ)2 + ǫ′ EX∼L [(X − µ)2 ] . 41 Note that PrX∼L [|X − µ′ | ≥ T ] ≤ PrX∼Ge [|X − µ′ | ≥ T ]/ǫ′ . As in Corollary 8.8 of [DKK+ 16], we have that Z ∞ ′ 2 PrX∼L [|X − µ′ | ≥ T ]2T dT EX∼L [(X − µ ) ] = 0 Z ∞  2T min 1, PrX∼N (µ,1) [|X − µ′ | ≥ T ]/ǫ′ dT ≤ Z0 ∞ 2T min{1, exp(−((T − |µ − µ′ |)2 /2)2T /ǫ′ }dT ≤ 0 Z √2 ln(1/ǫ′ )+|µ−µ′ | Z ∞ e = 2T dT + √ exp(−T 2 /2)2(T + |µ − µ′ |)/dTV (G′ , G)dT 2 ln(1/ǫ′ ) 0 ′ ′ 2 = O(ln(1/ǫ ) + 1 + |µ − µ | ) . By combining the above, we get that ǫ′ EX∼E [(X − µ′ )2 ] ≤ δ2 /ǫ − 1 − (1 − O(ǫ′ ))|µ − µ′ |2 + O(ǫ′ ln(1/ǫ′ )) , and thus EX∼E [(X − µ′ )2 ] ≤ δ2 /(ǫǫ′ ). ′ 2 ′ 2 ′ 2 However, the means of L and E, µL and µE have p |µL − µ | ′ ≤′ EX∼L [(X −pµ ) ] and |µE′ − µ | ≤ ′ 2 ′ ′ ′ EX∼E [(X − µ ) ],p and therefore ǫ |µL − µ | ≤ O(ǫ ln 1/ǫ′ + ǫ |µ − µ|) ≤ O(ǫ ln 1/ǫ + ǫ|µ − µ|) and ′ ′ ǫ |µE − µ| ≤ O(ǫ δ2 /ǫǫ′ ) = O(δ). p We thus have that µ′ − µ = ǫ′ µE − ǫ′ µL satisfies |µ′ − µ| ≤ O(δ) + O(ǫ ln 1/ǫ) + O(ǫ|µ − µ′ |). Since ǫ is sufficiently small, we have |µ′ − µ| ≤ O(δ) + 1/2. Since |µ′ | ≤ δ, We thus have that µ ≤ O(δ) + 1/2. Since we assumed that µ ≥ 1, we get that δ = Ω(µ − 1/2) = Ω(1/2) and so µ = O(δ). We therefore conclude that dTV (G, G′ ) = O(µ) = O(δ). e = Θ(µ). Suppose for the sake We will henceforth assume that µ ≤ 1 and thus we have that dTV (G, G) ′ e ≥ of contradiction that dTV (G, G ) = Ω(δ), for a sufficiently large constant in the big-Ω. Then, dTV (G, G) 2 e dTV (G, G) − ǫ ≫ δ. We may assume that µ ≥ C δ for a sufficiently large constant C > 0. Thus, we have that ǫ ≤ µ/C 2 ≤ 1/C 2 . The proof will proceed as follows: Let f (x) = sin(xCǫ/µ). We note that f (x) has a simple expectation e and we can easily get a lower bound on their difference. We will also use the Taylor series under G or G, for f (x) and our moment bounds to derive an upper bound on this difference which contradicts this lower bound. For x ∈ R+ , we want an expression for EX∼N (x,1) [f (X)]. By standard facts on the Fourier transform, we have that EX∼N (x,1) [exp(−iωX)] = exp(−iωx)EX∼N (0,1) [exp(−iωX)] = exp(−ω 2 /2 − iωx) , for any ω ∈ R. Since sin(xCǫ/µ) = (exp(−ixCǫ/µ) − exp(ixCǫ/µ))/2i, we obtain that EX∼N (x,1) [f (X)] = exp(−(Cǫ/µ)2 /2) sin(xCǫ/µ) . Therefore, EX∼N (0,1) [f (X)] = 0 and EX∼N (µ,1) [f (X)] ≥ exp(1/C) sin(Cǫ) > (C/2)ǫ, and thus EX∼G′ [f (X)] ≥ EX∼Ge [f (X)] − ǫ > (C/3)ǫ. (14) Let h be the degree-(k − 1) Taylor polynomial of f plus the term (Cxǫ/µ)k /k!. By the Lagrange form of the remainder in Taylor’s theorem, we have that h(x) − (Cxǫ/µ)k /k! − f (x) ≤ f (k) (ξ)xk /k!, for some 42 ξ ∈ [0, x]. Since k is even, we have that the k-th derivative of f , |f (k) (ξ)| = (Cǫ/µ)k | sin(ξCǫ/µ)| ≤ (Cǫ/µ)k . Thus, we get f (x) ≤ h(x) ≤ f (x) + 2(xCǫ/µ)k /k! . Our goal will be to show that EX∼G′ [h(X)] is substantially larger than EX∼N (0,1) [h(X)], which will contradict the assumption about approximately matching moments. We start by considering EX∼N (µ,1) [h(X)] versus EX∼N (0,1) [h(X)]. We can write EX∼N (µ,1) [h(X)] − EX∼N (0,1) [h(X)] h i h i  = EX∼N (µ,1) [f (X)] − EX∼N (0,1) [f (X)] + O EX∼N (µ,1) (XCǫ/µ)k /k! − EX∼N (0,1) (XCǫ/µ)k /k! h i h i  , ≥ (C/3)ǫ + O EX∼N (µ,1) (XCǫ/µ)k /k! − EX∼N (0,1) (XCǫ/µ)k /k! where the last inequality follows from (14). To bound this latter term, we make the following claim: Claim 8.3. We have that √ |G(x − µ) − G(x)| ≤ O(µ)G(x/ 2). Proof. First, we note that G(x − µ)/G(x) = exp(−2xµ + µ2 /2). Recalling our assumption that 0 ≤ µ < 1, for |x| ≤ O(1/µ), √ we have that |G(x − µ) − G(x)| ≤ 2 O(|x|µ + µ )G(x) ≤ O((|x| + 1)µ)G(x). √ Then, since G(x)/G(x/ 2) = O(G(x)) ≤ O(1/(|x| + 1)), we get |G(x − µ) − G(x)| ≤p O(µ)G(x/ 2). For |x| ≥ 5/µ,√since 2 ln(1/µ) + 2 ≤ 2 ln(1/µ) + 3 ≤ 2/µ + 3 ≤ x, we have that G(|x| − 2) ≤ µ. Thus, G(x)/G(x/ 2) ≤ O(G(x)) ≤ O(µ) and √ G(x − µ)/G(x/ 2) = O(exp(−x2 /4 + µx − µ2 /2)) √ = O(G((x − 2µ)/ 2) exp(µ2 /2)) ≤ O(G(|x| − 2)) ≤ O(µ) , √ and hence |G(x − µ) − G(x)| ≤ O(µ)G(x/ 2). Using the previous claim, we note that Z ∞ −∞ √ (xCǫ/µ)k /k! |G(x − δ) − G(x)| dx = O(ǫ)EX∼N (0,1/2) [(Cǫ/µ)k /k!] = O(ǫ/(C/ 2)k ) = O(ǫ). Therefore, we have that EX∼Ge [h(X)] ≥ EX∼G [h(X)] + (C/3)ǫ. Next, we wish to compare EX∼G′ [h(X)] to EX∼Ge [h(X)]. Using (12), we have the following for ǫ′ = e dTV (G′ , G): EX∼G′ [h(X)] = EX∼Ge [h(X)] + ǫ′ (EX∼E [h(X)] − EX∼L [h(X)]) h i  ≥ EX∼Ge [h(X)] + ǫ′ EX∼E [f (X)] − EX∼L [f (X)] − EX∼L (Xǫ/δ)k /k! h i = EX∼Ge [h(X)] + O(ǫ) − ǫ′ EX∼L (XCǫ/µ)k /k! . e ≥ ǫ′ L, it follows that L satisfies the concentration inequality From (13), i.e., G Pr [|X − µ| > T ] ≤ 2 exp(−T 2 /2)/ǫ′ . X∼L 43 We now proceed to bound the subtractive term from above: h i ǫ′ EX∼L (XCǫ/µ)k /k! ≤ ǫ′ ∞ X J=0 Pr X∼L h |X − µ| ≥ 2J p log(1/ǫ) i k p 2(J + 1) log(1/ǫ) + µ (Cǫ/µ)k /k! ∞ k  p X p 2ǫJ (2(J + 2) log(1/ǫ)Cǫ/µ)k /k! ≤ ǫ 3 log(1/ǫ)Cǫ/µ /k! + J=1 ≤ǫ·O p log(1/ǫ)Cǫ/µ k /k! · 1+ ∞ X ǫJ (J + 2)k J=1 ! k √ p log(1/ǫ)ǫ/Cδ /k! ≤ ǫ · O log(1/ǫ)ǫ/Cδ /( 2πk(k/e)k ) ≤ǫ·O p √ √ ≤ ǫO( log(1/ǫ)ǫ/Cδk)k / k ≤ O(ǫ/ kC k ) ≤ O(ǫ) . p k Therefore, we conclude that EX∼G′ [h(X)] ≥ EX∼N (µ,1) [h(X)] + O(ǫ) ≥ EX∼N (0,1) [h(X)] + (C/4)ǫ . On the other hand, P recalling that h is the degree-(k − 1) Taylor expansion of f (x) = sin(xCǫ/µ), we k−1 i i i can write h(x) = i=0 ai x , with ai = O((Cǫ/µ) /i!) = O((ǫ/Cδ) /i!). Therefore, the difference EX∼G′ [h(X)] − EX∼N (0,1) [h(X)] is the sum over i of ai times the difference in the ith moments, which by assumption is at most ǫ k−1 k−1 X X (1/i)2 = O(ǫ) . (i − 2)!(δ/Cǫ)i O((ǫ/δ)i /i!) = O(ǫ) i=1 i=0 This contradicts the fact that their difference is at least (C/4)ǫ, and concludes the proof. 8.2 Robust Testing Algorithm In this subsection, we give a robust testing algorithm, i.e., an algorithm that distinguishes between an ǫ-noisy Gaussian and N (0, I). This algorithm will form the basis for our robust learning algorithm of the following subsection. Theorem 8.4 (Robust Testing Algorithm). Let G′ be an ǫ-noisy version of an n-dimensional Gaussian with identity covariance. Let δ be at least a sufficiently large constant multiple of ǫ. There p exists an SQ algorithm that makes O(nk ) queries to STAT(ǫ · O(n log(n/ǫ)2 )−k ) where k = 2⌈O(ǫ log(1/ǫ)/δ)⌉, and distinguishes between the cases that G′ is the standard normal distribution N (0, I), and the case that G′ is at least δ-far from N (0, I). The algorithm has running time nO(k) . By simulating the statistical queries with samples, we obtain: Corollary 8.5. Given sample access to G′ , an ǫ-noisy version of an n-dimensional Gaussian with identity covariance and ǫ, δ > 0 with δ be at least a sufficiently large constant multiple of ǫ, there is an algorithm that with probability 9/10 distinguishes between the cases that G′ is the standard normal distribution N (0, I), and the case that G′ is at leastp δ-far from N (0, I) and requires at most (n log(1/ǫ))O(k) /ǫ2 samples and running time where k = 2⌈O(ǫ log(1/ǫ)/δ)⌉. e = N (µ, I) be such that dTV (G′ , G) e ≤ ǫ. We need Proof. In the case when G′ is δ-far from N (0, I), let G ′ ′ to show that we can distinguish between the cases G = N (0, I) and G is an ǫ-noisy version of a Gaussian 44 e = N (µ, I) with dTV (G, e G) ≥ δ − ǫ. We assume from now on that the completeness case is to show that G e dTV (G, G) ≥ δ, since replacing δ with δ + ǫ does not affect the statement of the theorem. The algorithm is quite simple. Let C be a sufficiently large universal constant such that the O(δ) total variation distance bound in Lemma 8.1 is less than Cδ. We assume that δ > 4Cǫ. Robust Testing Algorithm: • For each coordinate axis 1 ≤ i ≤ n, use STAT to approximate PrX∼G′ [X ≤ ǫ] and PrX∼G′ [X ≥ ǫ] to within ǫ/2. If any of these approximations are bigger than 1/2 + ǫ, then output “NO”. p • Let k = 2⌈2Cǫ ln(1/ǫ)/δ⌉. Let C ′ be a sufficiently large constant. p • Using access to STAT, find all the mixed moments of X ∼ G′ , conditioned on kXk2 ≤ C ′ k n log(n/ǫ), of order at most k to within error n−k/2 ǫ/2. • If the difference between any moment of order t ≤ k that we measured and that of N (0, I) is more than ((t − 1)!(δ/2Cǫ)t /t − 1) · n−k/2 ǫ, then output “NO”. • Otherwise, output “YES”. The idea is to use Lemma 8.1 with the approximations the moments. However, we have the issue that the STAT oracle p can only be used to approximate the expectation of a bounded function. Using the condition kXk2 ≤ C ′ k n log(n/ǫ) allows us to avoid this. But we first need to show that conditioning on it does not affect the moments too much and does not move the distribution far in total variational distance. Note that the first step of the algorithm will reject if the median of N (µ, I) projected onto any coordinate axis is outside of the interval [−ǫ, ǫ]. If this occurs, then µ 6= 0. If this step does not reject, then µ projected √ onto any coordinate axis is O(ǫ), and so kµk2 ≤ O(ǫ n). p The condition kxk2 ≤ C ′ k n log(n/ǫ) ensures that the any degree less than k monomial in X is at most (C ′ nk2 log(n/ǫ)))k/2 . Thus, we can approximate this expectation to precision n−k/2 ǫ using √ STAT(ǫ · O(n log(n/ǫ)2 )−k ). However, since kµk2 ≤ O(ǫ n), by standard concentration bounds, the probability that X ∼ N (µ, I) does not satisfy this condition is at most ǫ · (C ′ nk2 log(n/ǫ)))−k . Let G′′ be p G′ conditioned on kXk2 ≤ C ′ k n log(n/ǫ). If G′ = N (0, I), then we need to show that the moments of G′′ and G′ are within ln−k/2 (ǫ/2). To show this, we use the following lemma: Lemma 8.6. For 0 ≤ δ ≤ exp(−k), the difference between any mixed moment of degree at most k of p N (0, I) and N (0, I) conditioned on kxk2 ≤ O( nk log(1/δ)), is at most δ. Proof. Let X be distributed as N (0, I). Let ǫ be δ/(k + ln 1/δ)(k−1) C for ap sufficiently large constant C. Thus, ln(1/ǫ) = ln(1/δ) + ln C + (k − 1) ln(k + ln(1/δ)). Let T be 2n log 1/ǫ. Then, T = p OC ( nk log(1/δ)) and by standard concentration inequalities, we have that Pr[kXk2 ≥QT ] ≤ ǫ. For a ∈ Nn with kak1 ≤ k, consider the monomial of degree ma (x) = ni=1 xai i . First we Qnat most k, E(Xiai ) = 0, sinceQthe odd moments consider its mean and variance. If any ai is odd, E(ma )(X) = i=1 Q n ai ai /2 (a /2)! ≤ of Xi ∼ N (0, 1) are zero. If all ai are even, then E(ma )(X) = Q i i=1 E(Xi ) = i2 Q 2a n a a ! ≤ 2k k!. 2] = i E(X ) = 2 2k/2 (k/2)!. For the variance, we have Var[m (X)] ≤ E[m (X) i a a i i=1 i i √ Let pa (X) = ma (X)/2k/2 k!. Then we have that 0 ≤ E[pa (X)] ≤ 1 and Var[pa (X)] ≤ 1. By the standard concentration inequality given in Lemma 8.16 below, we have that for all t > 0, Pr[|pa (X)| ≥ t + 1] ≤ exp(2 − (t/R)2/k ) for some R > 0. Thus, we have Pr[|pa (X)| ≥ c + 1] ≤ ǫ, for 45 c = R(ln(1/ǫ) − 2)k/2 . Let I(x) be the indicator function of kxk2 ≥ T . Then we have that |E[I(X)pa (X)]| ≤ E[I(X)|pa (X)|] Z ∞ Pr[I(X)|pa (X)| ≥ t]dt = 0 Z ∞ Z c+1 exp(2 − (t − 1/R)2/k )dt ǫdt + ≤ c+1 0 Z ∞ exp(2 − (t/R)2/k )dt = (c + 1)ǫ + Zc ∞ = (c + 1)ǫ + exp(2 − x)(dt/dx)dx ln(1/ǫ) Z ∞ exp(2 − x)xk/2−1 dx = (c + 1)ǫ + (Rk/2) (where x = (t/R)2/k ) ln(1/ǫ) k/2−1 = (c + 1)ǫ + (Rk/2)ǫ · k/2 ≤ R ln(1/ǫ) where the integral ma (x), we have R∞ 2 X j=0 ((k/2)!/(k/2 − j)!) ln(1/ǫ)k/2−j ǫ + (k /8)ǫ(k + log(1/ǫ))k/2−1 ≤ O(k2 ǫ(k + log(1/ǫ))k/2−1 ) , ln(1/ǫ) exp(2 − x)xk/2−1 dx is calculated explicitly below in Claim 8.18. In terms of √ |E[I(X)ma (X)]| ≤ O(k2 ǫ(k + log(1/ǫ))k/2−1 2k/2 k!) ≤ O(ǫ(k + log(1/ǫ)(k−1) ) ≤ O(δ/C) ≤ δ/2 . Then, for X ′ distributed as N (0, I) conditioned on kX ′ k2 ≤ T , we have |E[ma (X)] − E[ma (X ′ )]| = |E[ma (X)] − E[ma (X)(1 − I(X))]/(1 − Pr[kXk2 > T ])| = |(E[I(X)ma (X)] − E[ma (X)] Pr[kXk2 > T ]) /1 − Pr[kXk2 > T ])|  √  ≤ δ/2 + 2k/2 kǫ /(1 − ǫ) ≤ 2δ/3(1 − ǫ) ≤ δ . p p Applying Lemma 8.6 for δ = n−k/2 ǫ, noting that C ′ k n log(n/ǫ) = Ω(C ′ nk log(1/δ)) yields that the moments of G′′ and G′ = N (0, I) are within ln−k/2 (ǫ/2). Thus, in this case, the approximations of the moments of G′′ are within n−k/2 ǫ of the moments of G′ . For the soundness case, we just note that since (t − 1)!(δ/2Cǫ)t ǫ/t − 1 ≥ (δ/2Cǫ)/2 − 1 ≥ 1, the bounds on the moments we need to fail are bigger than the precision of the statistical queries we use to approximate them, and therefore we never output “NO” when G′ = N (0, I). e Then G′′ is a 2ǫ-noisy Now suppose that G′ is an ǫ-noisy version of an identity covariance Gaussian G. e e version of G. We will denote µ the mean vector of G and will assume that kµk2 ≥ δ. We need to show that the algorithm outputs “NO”. Consider the unit vector v = µ/kµk2 which has v · µ ≥ δ. Consider the one-dimensional distributions ev of the form v · X, where either X ∼ G′′ or X ∼ G. e Note that G ev = N (kµk2 , 1) has mean larger G′′v and G ′′ ev ) ≤ 2ǫ. We can now apply the contrapositive of Lemma 8.1 with δ/C in place than δ and that dTV (Gv , G 46 of δ and 2ǫ in place of ǫ, which implies that there is a t ≤ k such that the t-th moment of G′v is more than (t − 1)!(δ/2Cǫ)t ǫ/t far from that of N (0, 1). That is, |EX∼G′ [(v · X)t ] − EX∼N (0,I) [(v · X)t ]| ≥ (t − 1)!(δ/2Cǫ)t ǫ/t . Q ai n Now consider the polynomial (v·x)t . Note that the coefficient of a monomial i xi , for a ∈ Z>0 , kak1 = t, Q n ai t is given by the multinomial theorem as a1 ,...,a i=1 vi . The L1 -norm of its coefficients is the same as the n Q L1 -norm of entries of the rank-t tensor v ⊗t , which has i-th entry tj=1 vij , for i ∈ {0, . . . , n}t , since there  Q t entries in this symmetric tensor which are given by ni=1 viai for any a. The Frobenius norm of are a1 ,...,a n Q P P Q v ⊗t , the L2 -norm of its entries, is i∈{0,...,n}t tj=1 vi2j = tj=1 ni=1 vi2 = 1. Since there are nt entries, the L1 -norm of its entries must be at most nt/2 ≤ nk/2 . We can write EX∼G′′ [(v·X)t ]−EX∼N (0,I) [(v·X)t ] as a linear combination of differences in moments with these coefficients, and we can thus bound this from above by the product of the L1 -norm of Qthe coefficients and the L∞ -norm of the differences in moments. Hence, there must be some moment E[ i Xiai ] with a ∈ Zn>0 , kak ≤ k, such that " " # # Y a Y a EX∼G′ Xi i − EX∼N (0,I) Xi i ≥ (t − 1)!(δ/2Cǫ)t ǫ/t · n−k/2 . i i This in turn means that the difference in the approximation of this moment of G′′ and that of N (0, I) is at most ((t − 1)!(δ/2Cǫ)t /t − 1) · n−k/2 ǫ. Thus, the testing algorithm outputs “NO”. 8.3 Robust Learning Algorithm In this section, we build on the testing algorithm of the previous section to design our robust learning algorithm. Formally, we prove: Theorem 8.7. Let G′ be an ǫ-noisy version of an n-dimensional Gaussian with identity covariance matrix, N (µ, I) with kµk2 ≤ poly(n, ǫ). There is an algorithm that, given statistical query access√to G′ , outO( log(1/ǫ)) +√ puts an approximation µ e to the mean µ such that√ kµ − µ ek2 ≤ O(ǫ). The algorithm uses √ √ n O( 2log(1/ǫ) log(1/ǫ)) calls to STAT(ǫ/(n ln(1/ǫ))O( log(1/ǫ)) ) and has running time nO( log(1/ǫ)) O( +2log(1/ǫ) log(1/ǫ)) By simulating the statistical queries with samples, we obtain: Corollary 8.8. Given sample access to G′ , an ǫ-noisy version of an n-dimensional Gaussian N (µ, I),√there is an algorithm that µ e with kµ−e µk2 ≤ O(ǫ) and requires (n log(1/ǫ))O( log(1/ǫ)) /ǫ2 √ √ with probability 9/10 outputs samples and nO( log(1/ǫ)) O( /ǫ2 + 2log(1/ǫ) log(1/ǫ)) time. The work [DKK+ 16] gives algorithms which can compute an approximation µ′ with kµ − µ′ k2 ≤ p O(ǫ log(1/ǫ)). These algorithms can be expressed as Statistical Query algorithms. However, due to the model of adversary used for robustness in [DKK+ 16], the algorithms were expressed there in terms of operations on sets of samples that were drawn before the execution of the algorithm. The filtering algorithms work by successively removing samples from this set and then computing expectations of the current set of remaining samples. The samples that are removed are those that satisfy an explicit condition, we say that they are rejected by a filter. We can implement these algorithms as SQ algorithms by replacing expectations of the current set of remaining samples with the conditional expectation of the input distribution, conditioned on all previous filters accepting. This is similar to the filtering algorithm for learning binary Bayesian networks given in [DKS16c]. Even there, we still used samples to compute the threshold for the filter. We note that using arguments similar to those we use for the algorithm below, all theses algorithms can be expressed as SQ algorithms. In particular, this is the case for Algorithm Filter-Gaussian-Unknown-Mean, p which we will use as a black box pre-processing step to approximate the mean within O(ǫ log(1/ǫ)). Instead of dealing with moments, i.e., the expectations of monomials, directly, we will consider expectations of Hermite polynomials, which have a simpler form for normal distributions. 47 . Definition Q 8.9. We define multi-dimensional normalized Hermite polynomials as follows: for a ∈ Zn , Q Hea (x) = ni=1 Heai (xi ). We define n(a) = ni=1 ai !. Thus we have the following: Fact 8.10. EX∼N (0,I) [Hea (X)Heb (X)] = δab n(a). We define a linear combination of these Hermite polynomials with degree t associated with a tensor of rank t. For i ∈ {0, . . . , n}t , we define the count vector c(i) ∈ Zn≥0 such that c(i)j is the number of coordinates of i that are j. Definition 8.11. For a rank-t tensor A over Rn , we define X √ hA (x) = Hec(a) (x)/ t! . i∈{0,...,n}t We are now ready to describe our learning algorithm. Robust Learning Algorithm: p 1. Let k = 2⌈ ln(1/ǫ))⌉. p 2. Compute an approximation µ′ with kµ′ − µk2 ≤ O(ǫ log(1/ǫ)) by iterating Algorithm Filter-Gaussian-Unknown-Mean from [DKK+ 16]. We change the origin so that µ′ = 0. p 3. Let N be the filter that accepts when kxk2 ≤ 2n log(1/ǫ). √ 4. For 1 ≤ t ≤ k, let Pet be the rank-t tensor with i1 , . . . , it entry given by t! times the result of asking an SQ oracle for EX∼G′ [hc(i) (X)] conditioned on N accepting to within precision ǫ/nt/2 . 5. While kPet kF ≥ ǫΩ(log(1/ǫ))t/2 for some t, ′ • Let t′ be the least t such that kPet′ kF ≥ ǫΩ(log(1/ǫ))t /2 . √ P • Let A = Pet′ /kPet′ kF . Let hA (x) = i1 ,...it′ Ai Hec(i) (x)/ t! For each positive integer T , approximate Pr [|hA (X)| ≥ T + 1] e X∼G until one is found that is at least ′ ′ 3 exp(2 − Ω(T )2/t )) + ǫ/Cn2t for a sufficiently large constant C. Let F be the filter that accepts when |hA (x)| ≤ T + 1. • Recalculate Pet , for all 1 ≤ t ≤ k, where all expectations are conditioned N and the filters F from all previous iterations. 6. End while. 7. For 1 ≤ t ≤ k, compute the SVD of M (Pet ), Pet considered as an n × nt−1 matrix, and let Vt ⊆ Rn be the subspace spanned by all right singular vectors of Pt with singular value more than ǫ. 8. Let V be the span of V1 , . . . , Vk . 9. Let S ⊂ V be a set of unit vectors of size | dim(V )|O(dim(V )) such that for any unit vector v ∈ V , there is a v ′ ∈ S with kv − v ′ k2 ≤ 1/2. 48 √ 10. For each v ∈ S, compute the median mv of v T X, for X ∼ G′ , to within ǫ/ pdim V using bisection and statistical queries to approximate the Pr[v T X ≤ m] for m = µ′ + O(ǫ log(1/ǫ)). (We don’t need to condition on any filters here). 11. Find a feasible point µ eV of the LP µ eV ∈ V with |v T µ eV − v T mv | ≤ O(ǫ) for all v ∈ S. 12. Return µ eV . Using similar techniques to those used to express this algorithm in terms of Statistical Queries, we can e run Algorithm Filter-Gaussian-Unknown-Mean using poly(n/ǫ) time and calls to STAT(O(ǫ/poly(n))). Note that we can approximate conditional expectations easily as a ratio of expectations approximated by two SQ queries. Since, as we will show, our filters only throw away at most an O(ǫ) fraction of points, we will not need to increase the precision beyond a constant factor to √ do this. O( log(1/ǫ)) . To show that we can use the The algorithm needs approximate expectations to within ǫ/n √ O( log(1/ǫ)) ) to obtain this, we need to note that√the distributions we approxioracle STAT(ǫ/(n ln(1/ǫ)) mate the expectations of are supported p in an interval of length (n ln(1/ǫ))O( log(1/ǫ)) . Thanks to the naive pruning of Step 3, only x with kxk2 ≤ 2n log(1/ǫ) contribute to these expectations. This suffices √ to show that the maximum value of all polynomials we consider on any such x is at most (n ln(1/ǫ))O( We need to show the following for the filter step of our algorithm: log(1/ǫ)) . Proposition 8.12. The loop in Step 5 takes O(n2k ) iterations and all filters together accept with probability at least 1 − O(ǫ). 8.3.1 Proof of Proposition 8.12 We now proceed with the proof. By standard concentration bounds, N accepts with probability 1 − O(ǫ). Let F ′ be the event that N and all filters F from previous iterations accept. We assume inductively that PrG′ [F ′ ] ≤ O(ǫ), and need to show that the same holds if we include the filter F produced in the current iteration. p e = N (µ, I) be a Gaussian with dTV (G′ , G) e ≤ ǫ such that kµk2 ≤ O(ǫ log(1/ǫ)). We write Let G G′ |F ′ for the distribution obtained by conditioning on F ′ . Since PrG′ [F ′ ] ≤ Cǫ, we have that e ≤ dTV (G′ , G) e + dTV (G′ , G′ |F ′ ) ≤ (C + 1)ǫ . dTV (G′ |F, G) e + dTV (G′ |F, G)E e − dTV (G′ |F, G)L, e Thus, for the first iteration, we have G′ |F ′ = G for distributions E and L with disjoint supports. e + wE E − wL L, for distributions E and L with disjoint For any iteration, we will write G′ |F ′ = wGe G supports, where wE + wL = O(ǫ) and wGe = 1 + O(ǫ). In the first iteration, we will take wGe = 1 and e wE = wL = dTV (G′ |F ′ , G). We will need properties of the polynomials hA (x) for the analysis. In particular, we show the following: Lemma 8.13. Given a rank-t symmetric tensor A over Rn , let hA (x) be as in Definition 8.11. Then, we have: (i) EX∼N (0,I) [hA (X)2 ] = kAk2F . (ii) If PB is a rank-t tensor with Bi = i Ai Bi . √ t!EX∼P [Hec(i) (X)], for a distribution P, then EX∼P [hA (X)] = (iii) We can recover A from hA (x) using √ t!Ai1 ,...,it = ∂ ∂xi1 · · · ∂x∂i hA (x). t (iv) If O is an orthogonal matrix, then hA (Ox) = hB (x) for a symmetric rank-t tensor B with kBkF = kAkF . 49 √ (v) If B is a rank-t tensor with Bi = t!EX∼P [Hec(i) (X)], for a distribution P, and j > 0, v ∈ Rn , √ then EX∼P [Hej (v · X)]/ t! = B(v, . . . , v). Proof. For (i), we first need Pto get an expression for√the coefficients of each Hea (x), since they appear multiple times in hA (x) = i∈{0,...,n}t Ai Hec(a) (x)/ t!. Let c−1 (a) be a function mapping a ∈ Zt≥0 with −1 kak1 = t to i ∈ {1, . . . , n}t , with c(c−1 (a)) = a for all a. Since A is  symmetric, the choice of c does t not affect Ac−1 (a) for any a. Note that, for a given a, there are a1 ,...,an = t!/n(a) possible i with c(i) = a. Thus, we have: X √ hA (x) = Ai Hec(a) (x)/ t! i∈{0,...,n}t X = kak1 =t = √ t!/n(a) · Ac−1 (a) Hea (x)/ t! X √ t!/n(a) · Ac−1 (a) Hea (x) . kak1 =t Now, by orthogonality of Hea (x) with distinct a, we have that, for X ∼ N (0, I), it holds: X E[hA (X)2 ] = t!/n(a)2 · A2c−1 (a) E[Hea (X)2 ] kak1 =t = X kak1 =t = X i t!/n(a) · A2c−1 (a) A2i = kAk2F . For (ii), we now have that √ X EX∼P [hA (X)] = 1/ t! · Ai EX∼P [Hec(i) (x)] = X i Ai Bi . i Q For (iii), note that a with kak1 = t, Hea (x) has only one monomial of degree t, which is xai i . Thus, given i ∈ {1, . . . , n}t , there is only one a with kak1 = t and ∂x∂i · · · ∂x∂i Hea (x) 6= 0, which is a = c(i) t 1 and has ∂ ∂ ∂ ∂ Y c(i)j Hec(i) (x) = xj ··· ··· ∂xi1 ∂xit ∂xi1 ∂xit j Y = c(i)j ! = n(c(i)) . j Thus, we have √ ∂ ∂ hA (x) = n(c(i)) · t!/n(a) · Ac−1 (a) ··· ∂xi1 ∂xit √ = t!Ai . For (iv), consider the linear transformation of rank-t tensors O⊗t , which for our purposes can be defined as the unique function such that (O ⊗t A)(v1 , . . . , vt ) = A(OT v1 , . . . , OT vt ), for all rank-t tensors over Rn , A, 50 and vectors v1 . . . vt ∈ Rn . It is a fact that kO⊗t AkF = kAkF . Now, P we∂gconsider the t-th order directional derivatives of a function f , ∇v1 , · · · ∇vt f (x), where ∇v g(x) = i vi ∂xi (x). These can be expressed in terms of the rank-t tensor F , with Fi = ∂x∂i · · · ∂x∂i f (x), as ∇v1 , . . . ∇vt f (x) = F (v1 , . . . vt ). We have t 1 that, for all i, ∂ ∂ hA (Ox) ··· ∂xi1 ∂xit = ∇ei1 · · · ∇eit hA (Ox) = ∇OT ei · · · ∇OT eit hA (x) 1 √ = t!A(OT ei1 , . . . , O T eit ) √ = t!(O⊗t A)i ∂ ∂ h ⊗t (a) . ... = ∂xi1 ∂xit O A Since hA (Ox) and hO⊗t A (x) are both multivariate polynomials of degree t, that these derivatives agree means that the coefficients of all monomials of degree-t agree. We thus have hA (Ox) = hO⊗t A (x) + p(x), where p is a polynomial of degree at most t − 1. Since hO⊗t A (x) is a linear combination of Hermite polynomials of degree t, which are orthogonal to all polynomials of degree smaller than t, we have EX∼N (0,I) [hO⊗t A (X)p(X)] = 0, and so 1 = kAkF = EX∼N (0,I) [hA (Ox)2 ] = EX∼N (0,I) [hO⊗t A (X)2 ] + EX∼N (0,I) [p(X)2 ] + 2EX∼N (0,I) [hO⊗t A (X)p(X)] = kO ⊗t AkF + EX∼N (0,I) [p(X)2 ] + 0 = 1 + EX∼N (0,I) [p(X)2 ] . Since EX∼N (0,I) [p(X)2 ] = 0, we must have p(x) ≡ 0, and thus hA (Ox) = hO⊗t A (x) . Taking B = O⊗t A gives (iv). For (v), let O be an orthogonal matrix that gives a rotation mapping e1 to v, a = {t, 0, . . . , 0} and T1 be the rank-t tensor with (1, . . . , 1) entry 1 and every other entry 0. Then, we can rewrite √ √ Het (v · x) = Het ((Ox)1 ) = Hea ((Ox)1 ) = t!hT1 (Ox) = t!hO⊗t T1 (x) . For any i, we have (O⊗t T1 )i = (O ⊗t T1 )(ei1 , . . . , eit ) = T1 (OT ei1 , . . . , O T eit ) = t Y (OT eij )1 j=1 = t Y (Oe1 )ij j=1 = t Y vi j . j=1 51 Thus we have O⊗t T1 = v ⊗t , the tensor with entries Qt j=1 vij , and so √ EX∼P [Het (v · X)]/ t! = EX∼P [hv⊗t (X)] = X Bi i t Y vij = B(v, . . . , v) . (by (ii)) j=1 This completes the proof. √ We write Pt′ or Gt′ for the rank-t′ tensor with entries t!E[hc(i) (X)], where X is distributed according e respectively. We know that kPet′ kF ≥ ǫΩ(log(1/ǫ)t′ /2 ). to G′ |F ′ or G ′ Lemma 8.14. When kPet′ kF ≥ ǫΩ(log(1/ǫ)t /2 ), we have |EX∼G′ [hA (X)]| ≥ ǫ · Ω(log(1/ǫ))t/2 . Proof. The assumption on the SQ errors imply that the corresponding entries of Pt′ and Pet′ are within ′ ǫ/nt /2 . It follows that √ kPt′ − Pet′ kF ≤ t′ !ǫ . Using Lemma 8.13 (iii), we have EX∼G′ [hA (X)] = X Ai (Pt′ )i i∈[n]t′ = 1/kPet kF · X i∈[n] t′  (Pet′ )i (Pt′ )i = 1/kPet kF · kPet′ k2F + X i∈[n] t′  (Pet′ )i (Pt′ − Pet′ )i  ≥ kPet′ kF − kPt′ − Pet′ kF ≥ kPet′ kF − p t′ ′ ≥ ǫΩ(log(1/ǫ)t /2 )) − ǫ log(1/ǫ) √ t′ !ǫ ′ ≥ ǫΩ(log(1/ǫ)t /2 ) . Lemma 8.15. EX∼Ge [hA (X)] = O(ǫ p log(1/ǫ))t and EX∼Ge [hA (X)2 ] = O(1). Proof. Since for all a ∈ Zk>0 , EX∼N (0,I) [Hea (X)] = 0, we have EX∼N (0,I) [hA (X] = 0. By Lemma 8.13 (i), EX∼N (0,I) [hA (X)2 ] = kAk2F = 1. e = N (µ, I) instead of N (0, I). Consider a rotation given We need to take these expectations under G by an orthogonal matrix O that maps kµk2 e1 to µ. By Lemma 8.13 (i), there is a symmetric rank-t tensor B with kBkF = 1 such that hA (OX) = hB (X). Now we have that EX∼G′ [hA (X)] = EX∼N (kµk2 e1 ,I) [hA (OX)] = EX∼N (kµk2 e1 ,I) [hB (X)] , and similarly for hA (X)2 . n−1 for the vector dropping the first coordinate of a, we have For a ∈ Zn≥0 with a 6= 0, writing a−1 ∈ Z≥0 EX∼N (kµk2 e1 ,I) [Hea (X)] = EX∼N (0,I) [Hea−1 (X)]EX∼N (kµk2 ,1) [Hea1 (X)] = δa−1 ,0 EX∼N (0,1) [Hea1 (X + kµk2 )] . 52 Note that there is only one index i such that c(i) is zero in all except the first coordinate, and so we have √ EX∼Ge [hA (X)] = EX∼N (kµk2 e1 ,I) [hB (X)] = B1,...,1 EX∼N (0,1) [Het (X + kµk2 )/ t!] . Since kBkF = 1, we have √ EX∼Ge [hB (X)] ≤ |EX∼N (0,1) [Het (X + kµk2 )/ t!]|. i By standard results, we have that dHe dx (x) = iHei−1 (x), and so by Taylor’s theorem we have Hei (x +  Pi j kµk2 ) = j=0 ji kµk2 Hei−j (x). Thus, |EX∼N (0,1) [Het (X + kµk2 )]| = = This gives t   X t i=0 kµkt2 i kµki2 |EX∼N (0,1) [Het−i (X)] . p √ √ EX∼Ge [hA (X)] ≤ kµkt2 / t! = O(ǫ log(1/ǫ))t / t! , as required. Similarly, we have, for all a, b ∈ Zn>0 , EX∼N (kµk2 e1 ,I) [Hea (X)Heb (X)] = EX∼N (0,I) [Hea−1 (X)Heb−1 (X)]EX∼N (kµk2 ,1) [Hea1 (X)Heb1 (X)] = δa−1 b−1 · EX∼N (0,1) [Hea1 (X + kµk2 )Heb1 (X + kµk2 )] . When kak1 = kbk1 = t, if a−1 = b−1 , then a = b (since a1 = b1 = t − kak1 ). For 1 ≤ j ≤ t, we have:  !2  j   X j EX∼N (0,1) [Hej (X + kµk2 )2 ] = EX∼N (0,1)  kµki2 Hej−i (x)  i i=0 = = = ≤ j  2 X j i=0 j  X i=0 j X i=0 j X j i 2 2 kµk2i 2 |EX∼N (0,1) [Hej−i (X) ] kµk2i 2 i! 2 kµk2i 2 (j!/(j − i)!) /i! 2 kµk2i 2 j i/i! i=0 j X ≤2 i 2−2i i=0 (since kµk2 ≤ 1/2k ≤ 1/2j) ≤3. Putting these together, for a, b with kak1 = kbk1 = t, we have EX∼N (kµk2 e1 ,I) [Hea (X)Heb (X)] ≤ 3δab . The sum of squares of coefficients of all Hea (x) in hB (X) is EX∼N (0,1) [hB (X)2 ] = kBkF = 1, and so we have that EX∼N (kµk2 e1 ,I) [hB (X)2 ]| ≤ 3. Finally, recall that EX∼G [h(A)2 ] = EX∼N (kµk2 e1 ,I) [hB (X)2 ]|, and so this is O(1), as required. 53 Now consider the equation EX∼G′ [hA (X)] = wGe EX∼Ge [hA (X)] + wE EX∼E [hA (X)] − wL EX∼L [hA (X)]. We know that the LHS is Ω(ǫ log(1/ǫ)t/2 ) and that the first term on the RHS is smaller. Therefore, one e we will use standard concentration inequalities to show of the last two terms is small. Since wL L ≤ G, t/2 that wL EX∼L [hA (X)] is O(ǫ log(1/ǫ) ). If we cannot find a filter, then wE E ≤ G′ must satisfy similar concentration inequalities, which would imply that wE EX∼E [hA (X)] is O(ǫ log(1/ǫ)t/2 ). Since some term on the RHS must be bigger than this, we can find a filter. Lemma 8.16. For X ∼ N (0, I), if p(x) is a degree-d polynomial with E[p(X)2 ] ≤ 1, we have that Pr [|p(X)| ≥ T + E[p(X)]] ≤ exp(2 − Ω(T )2/d )) . ′ Lemma 8.17. We have that wL |EX∼L [hA (X)]| ≤ ǫ · O(log(1/ǫ))t /2 ). Proof. We start with the following claim: Claim 8.18. For any R > 0, d ∈ Z+ , ǫ > 0, and exp(−(a/R)2/d ) = ǫ, we have Z ∞ exp(−(T /R)2/d )T dT ≤ (d2 /2)ǫ(d + ln(1/ǫ))d−1 . a Proof. Note that (a/R)2/d = ln(1/ǫ). First, we change variables to x = (T /R)2/d to obtain Z ∞ Z ∞ dT 2/d exp(−x)xd/2 exp(−(T /R) )T dT = dx dx ln(1/ǫ) ln(1/ǫ) Z ∞ exp(−x)xd/2 · (Rd/2)xd/2−1 dx = ln(1/ǫ) Z ∞ exp(−x)xd−1 dx . = (Rd/2) ln(1/ǫ) We can now integrate by parts Z Z ∞ d−1 d−1 exp(−x)x dx = ǫ ln(1/ǫ) + (d − 1) ln(1/ǫ) ∞ exp(−x)xd−2 dx . ln(1/ǫ) By a simple induction, we have Z ∞ exp(−x)xd−1 dx = ǫ ln(1/ǫ) d−1 X j=0 d!/(d − j)! ln(1/ǫ)(d−j−1) . Now we have Z ∞ 2/d exp(−(T /R) )T dt = (d/2)ǫ a d−1 X j=0 d!/(d − j)! ln(1/ǫ)(d−j−1) 2/d ≤ (d/2) exp(−(a/R) 2 ) d−1 X j=0 d−1 ≤ (d /2)ǫ(d + ln(1/ǫ)) 54 . dj ln(1/ǫ)(d−j−1) Let µh = EX∼Ge [hA (X)]. We have the following sequence of inequalities: Z ∞ T wL Pr [|hA (X)| > T ]dT wL EX∼L| [hA (X)2 ] = X∼L 0 Z ∞ T min{wL , Pr [|hA (X)| > T ]}dT ≤ e X∼G 0 Z ∞ ′ T min{wL , exp(2 − Ω(T − µh )2/t ))}dT ≤ Z0 ∞ ′ T min{wL , exp(2 − ((T − µh )/R)2/t ))}dT (for some R > 0) ≤ 0 Z ∞ ′ (T + µh ) min{wL , exp(2 − (T /R)2/t ))}dT = −µ Z ∞ Z ch ′ exp(2 − (T /R)2/t )(T + µh )dT (T + µh )wL dT + = c −µh ′ ≤ wL (c + µh )2 /2 + e2 (c + µh )/c · t′ ′2 ′ Z (where c = (R ln 1/wL )t /2 ) ∞ ′ exp(−(T /R)2/t )T dT c ′ ≤ wL O(ln(1/wL )) + O(t wL (t + ln(1/wL ))t −1 ) ′ ≤ ǫ · O(ln(1/ǫ))t , p where the last line follows from t′ ≤ k = O( log(1/ǫ)) ≤ O(log(1/ǫ)). Then, by an application of the Cauchy-Schwarz inequality, we have that q t′ /2 2E 2 ). wL |EX∼L [hA (X)]| ≤ wL EX∼L [|hA (X)|] ≤ wL X∼L [hA (X)] ≤ ǫ · O(log(1/ǫ)) This completes the proof of the lemma. ′ Lemma 8.19. If PrX∼G′ |F ′ [|hA (X)| ≥ T + 1] ≤ O(exp(2 − Ω(T )2/d )) + ǫ/(2n)2t ), for all integers T , ′ then wE |EX∼E [hA (X)]| ≤ O(ǫ ln(1/ǫ)t /2 ). ′ includes the filter M , we have that the support of G′ |F ′ and the support of E includes only Proof. Since F p x with kxk2 ≤ 2n ln(1/ǫ): p p Claim 8.20. When kxk2 ≤ 2n ln(1/ǫ), then |hA (x)| ≤ (2n ln(1/ǫ))t . p Proof. Note that t′ ≤ k ≤ 2n log(1/ǫ). Using the explicit formula for the coefficient Hei (x), we can 55 show that for |x| ≤ p 2n ln(1/ǫ), with k ≥ i, the Hei (x) is dominated by its leading coefficient: |Hei (x)| = ≤ ≤ ≤ ⌊i/2⌋ X j=0 ⌊i/2⌋ i!(−1)j xi−2j /j!(i − 2j)!2j X j!(3/2)j |x|i−2j X p j!(3/2)j ( 2n ln(1/ǫ))i−2j j=0 ⌊i/2⌋ j=0 ⌊i/2⌋ X (2n log(1/ǫ))(i−j)/2 j=0 ≤ 2 · (n log(1/ǫ))i/2 . Therefore, for any a ∈ Zn≥0 with P i ai = t, and kxk2 ≤ |ha (x)| = ≤ ′ n Y i=1 n Y i=1 p 2n log(1/ǫ), we have that p |Heai (x)/ ai !| p ai 2 n log(1/ǫ) p ≤ (2 n log(1/ǫ))t . t the L1 -norm of the entries is at most nt/2 . Thus, we have that Since kAkF = 1 and p A has n tentries, p t/2 |hA (x)| ≤ n · (2 n log(1/ǫ)) = (2n log(1/ǫ))t . We note that since ′ Pr [|hA (X)| ≥ T + 1] ≤ O(exp(2 − Ω(T )2/d )) + ǫ/(2n)2t ) , Pr [|hA (X)| ≥ T + 2] ≤ O(exp(2 − Ω(T )2/d )) + ǫ/(2n)2t ) , X∼G′ |F ′ for integers T , that X∼G′ |F ′ ′ for all T . 56 Similarly to the proof of Lemma 8.17, we obtain: Z ∞ T wE Pr [|hA (X)| > T ]dT wE EX∼E [hA (X)2 ] = X∼E 0 √ Z t (2n log(1/ǫ)) = ≤ ≤ ≤ ≤ T wE Pr [|hA (X)| > T ]dT Z Z Z Z 0 (2n √ X∼E log(1/ǫ))t T min{wE , Pr ′ [|hA (X)| > T ]}dT 0 (2n √ (2n √ 0 −2 (2n √ X∼G log(1/ǫ))t ′ T min{wE , O(exp(2 − Ω(T − 2)2/t ) + ǫ/Cn2t )}dT log(1/ǫ))t −1 ′ (T + 2) min{wE , O(exp(2 − (T /R)2/t ) + ǫ/Cn2t )}dT log(1/ǫ))t 2t′ O(T ǫ/(2n) )dT + 0 Z c (T + 2)wE dT −2 Z ∞ O(exp(−(T /R)2/t ))T dT (where c = (R ln 1/wE )t/2 ) + (c + 1)/c · c p ′ ′ = (2n log(1/ǫ))2t · ǫ/(2n)2t + O(wE c2 /2) + O(t′2 wE (t′ + ln(1/wE ))t −1 ) ≤ ǫ · (4 log(1/ǫ)t + wE · O(ln 1/wE )t ≤ ǫ · O(log(1/ǫ))t . Then, by the Cauchy-Schwarz inequality, we conclude that q t/2 2E 2 . wE |EX∼E [hA (X)]| ≤ wE EX∼E [|hA (X)|] ≤ wE X∼E [hA (X)] ≤ ǫ · O(log(1/ǫ)) This completes the proof. As an immediate consequence, we obtain: Corollary 8.21. There is an integer 0 ≤ T ≤ O(n Pr X∼G′ |F ′ p log(1/ǫ))t such that ′ [|hA (X)| ≥ T + 1] ≥ 3 exp(2 − Ω(T )2/d )) + 2ǫ/Cn2t . We can now prove the following crucial lemma: Lemma 8.22. The algorithm finds a T with Pr X∼G′ |F ′ ′ [|hA (X)| ≥ T + 1] ≤ 3 exp(2 − Ω(T )2/d )) + ǫ/Cn2t . Proof. 8.21, such a T exists, and therefore our algorithm will find one after enumerating p By Corollary t O(n log(1/ǫ)) possibilities. Let F be the event that the new filter accepts. In the next iterations, we will use G′ |F ′ ∩ F instead of G′ |F ′ . We need to show that the parameters wGe , wE and wL improve in such a way that we only need a bounded number of iterations: e + w′ E ′ − w′ L′ , where L′ and E ′ have disjoint supports Claim 8.23. We can write G′ |F ′ ∩ F = w′e G E L G ′ ′ , w ′ > 0 and w ′ + w ′ ≤ w + w − ǫ/Cn2t . The probability that the filter rejects is at most wE E L L E L ′ − w ′ ). O(wE + wL − wE L 57 Proof. This proof is very similar to that of Claim 26 from [DKS16c]. Let ¬F be the event that the filter ′ rejects, i.e., that |hA (X)| ≥ T + 1. We have that PrG′ |F ′ [¬F ] ≥ 3 exp(2 − Ω(T )2/d )) + ǫ/Cn2t . On the other hand, by the concentration inequality, PrGe [¬F ] ≤ exp(2 − Ω(T )2/d )). Thus, we have that ′ Pr [¬F ] ≥ 3 Pr[¬F ] + ǫ/Cn2t . G′ |F ′ e G e E and L yields for the event ¬F that However, the defining relation between G′ |F ′ and G, Pr [¬F ] ≥ wGe Pr[¬F ] + wE Pr[¬F ] − wE Pr[¬F ] . G′ |F ′ E e G E Since Pr [¬F ] ≤ wGe Pr′ [¬F ] + wE Pr[¬F ] , G′ |F ′ and wGe ≤ 1 + O(ǫ), we must have E G Pr [¬F ] ≤ (2 + O(ǫ))wE Pr[¬F ] , G′ |F ′ E and Pr′ [¬F ] ≤ (1/3 + O(ǫ))wE Pr[¬F ]. E G Then, we get that     ′ ′ 1 − Pr [¬F ] (G |F )(x) = 1 − Pr [¬F ] (G′ |F ′ ∩ ¬F )(x) G′ |F ′ G′ |F ′     e e = wGe G(x) + wE 1 − Pr[¬F ] E(x) + wL 1 − Pr[¬F ] L(x) − wGe Pr′ [¬F ]G(x) . E L G Thus, we have wL (1 − PrL [¬F ]) − wGe PrG′ [¬F ] 1 − PrPe [¬F ]   ≤ wL + (1 + O(ǫ)) Pr′ [¬F ] + O ǫ Pr[¬F ] G Pe   ≤ wL + (1/3 + O(ǫ)) wE Pr[¬F ] + O ǫ Pr [¬F ] . ′ wL = E Also we have G′ |F ′ wE (1 − PrE [¬F ]) 1 − PrG′ |F ′ [¬F ]     ≤ wE 1 − Pr[¬F ] + O ǫ Pr [¬F ] . ′ wE = E Thus, wL + wE − ′ wL − ′ wE G′ |F ′  ≥ (2/3 − O(ǫ)) wE Pr[¬F ] − O ǫ Pr[¬F ] E  ≥ (1/3 − O(ǫ)) Pr [¬F ] ≥ ǫ/Cn Pe 2t′ G′ |F ′ Note that the penultimate inequality also gives that ′ ′ Pr [¬F ] ≤ (3 + O(ǫ)) (wL + wE − wL − wE ). G′ |F ′ This completes the proof. Proposition 8.12 now follows using induction on the iterations. 58 . 8.3.2 Completing the Proof of Correctness Lemma 8.24. dim(V ) ≤ O(log(1/ǫ))k . Proof. After leaving the filter loop, for all 1 ≤ t ≤ k, we have that kPet kF ≤ ǫO(log(1/ǫ))t/2 . M (Pet ) has the same Frobenius norm, and thus the L2 -norm of its singular values, when considered as a matrix. Thus, t/2 singular values bigger than ǫ. So, we have that dim(V ) = O(log(1/ǫ))t/2 , there are at most O(log(1/ǫ)) t Pk and so dim(V ) ≤ t=1 dim Vt ≤ O(log(1/ǫ))k . Let µV be the projection of µ onto the subspace V . Now we can show using our moment matching lemma that it suffices to approximate µV . Lemma 8.25. We have that kµV − µk2 ≤ O(ǫ). Proof. Let v = (µV − µ)/kµV − µk2 . Note that v is a unit vector perpendicular to V and we need to show that v T µ ≤ O(ǫ). We will apply Lemma 8.1 to G′′ , the projection G′ conditioned on the event that all the e G′ |F ′ ) ≤ O(ǫ), and so we have that filters we produced accept F ′ , onto v. Note that G′ |F ′ has dTV (G, ′′ T dTV (G , N (0, v µ)) ≤ O(ǫ). We can bound the expectation of the Hermite polynomials as follows, for 1 ≤ t ≤ k: √ √ |EX∼G′′ [Het (X)/ t!]| = |EX∼G′ [Het (v · X)/ t!]| = |P t (v, . . . , v)| = |(v ⊗t−1 )T M (P t )v| ≤ kv ⊗t−1 k2 kM (P t )vk2 ≤ 1 · O(ǫ) . √ √ On the other hand, we have EX∼N (0,1) [Het (X)/ t!] = 0, for 1 ≤ t ≤ k. For t = 0, Het (X)/ t! = 1, which has expectation 1 under both G′′ and N (0, 1). We want to consider the difference in the expectations of X t , for√1 ≤ t ≤ k. We can write xt as a linear combination of Hermite polynomials, xt = Pt we have that EX∼N (0,1) [(X t )2 ] = Pi=02 ai Hei (x)/ i. Using the orthonormality of these polynomials, t 2 t i ai . On the other hand, by standard results, EX∼N (0,1) [(X ) ] = 2 t!. Thus, we have: |EX∼G′′ [X t ] − EX∼N (0,1) [X t ]| = t X i=0  √ √  ai EX∼G′′ [Hei (X)/ i!] − EX∼N (0,1) [Hei (X)/ i!] ≤ O(ǫ) · ≤ O(ǫ) · t X ai i=0 √ t· √ 2t t! √ √ √ Note that for t ≥ 10, t2t t! ≤ (t − 1)!/t. Thus, there is a constant c > 0 such that this O(ǫ) · t · 2t t! is smaller than (t − 1)!ct ǫ/t, for all 1 ≤ t ≤ k. Now we can apply Lemma 8.1 with p δ = cǫ and obtain T that |v µ| ≤ O(δ) = O(ǫ). We need to set k to be a sufficiently high multiple of ǫ ln(1/ǫ) to make this work. It remains to analyze the rest of the algorithm and show that µ eV it produces is close to µV . Lemma 8.26. We can construct a set S ⊂ V of unit vectors of size dim(V )O(dim(V )) such that for any unit vector v ∈ V , there is a v ′ ∈ S with kv − v ′ k2 ≤ 1/2, in time dim(V )O(dim(V )) . 59 Proof. Let ℓ = dim(V ). We will construct such a cover for Rℓ and translate that to V by using the orthonormal basis for V given by the right singular vectors of M (Pt√ ) with singular values bigger than ǫ. We can divide the cube [−1, 1]ℓ into ℓO(ℓ) cubes of side length 1/(2 ℓ). For each cube, we check if it has a corner with L2 -norm ≥ 1 and a corner with L2 -norm ≤ 1. If it does not, it does not contain any unit vectors so we can ignore it. If the cube does contain any unit vectors, then if its center is v, we add the normalized vector v/kvk2 to S. Since there is a unit vector v ′ in the cube, and all vectors in the cube have √ kv ′ − vk2 ≤ ℓkv ′ − vk∞ ≤ 1/4, we have |kvk2 − 1| ≤ 1/4, and so kv − v/kvk2 k2 ≤ 1/4. Thus, for any unit vector v ′ in this cube, we have kv ′ − v/kvk2 k2 ≤ 1/4 + 1/4 ≤ 1/2. Since every unit v ′ is in some cube whose normalized center we added to S, we are done. Firstly, we note that in order to approximate v T µ, it is sufficient to find an x with PrX∼G′ [v T X ≥ x] = 1/2 + O(ǫ): Lemma 8.27. For all x ∈ R with | PrX∼G′ [v T X ≥ x] − 1/2| ≤ 3ǫ, we have that |v T µ − x| ≤ O(ǫ) . e projected onto v has G(x − v T µ) ≥ 1/2 for all x with |x − v T µ| ≤ O(ǫ). Proof. First note that the pdf of G T Supposing that |x − v µ| ≥ 8ǫ, we have that | PrX∼Ge [v T X ≥ x] − 1/2| ≥ 4ǫ, and so | PrX∼G′ [v T X ≥ e ≥ 3ǫ. x] − 1/2| ≥ 4ǫ − dTV (G′ , G) To show that we can find such a point by bisection, we need to show that there is an interval of such points of reasonable length where we are looking for them: Lemma 8.28. Given a unit vector v ∈ Rn , there is an interval [a, b] such that • for all x ∈ [a, b], we have that | PrX∼G′ [v T X ≥ x] − 1/2| ≤ 2ǫ, • b − a = Θ(ǫ), • and |a|, |b| ≤ O(ǫ p log 1/ǫ). Proof. We can take [a, b] to be the set of x with | PrX∼Ge [v T X ≥ x] − 1/2| ≤ ǫ. This is an interval since e ≤ 2ǫ. PrX∼Ge [v T X ≥ x] is monotone. All x in it have | PrX∼G′ [v T X ≥ x] − 1/2| ≤ ǫ + dTV (G′ , G) T T T Thus, pby the previous lemma, |b − v µ|, |a p− v µ| ≤ O(ǫ) and thus |b − a| ≤ O(ǫ), and since |v µ| ≤ O(ǫ log 1/ǫ), we have that |a|, |b| ≤ O(ǫ log 1/ǫ). Thus, we obtain: Lemma 8.29. Given a unit vector v ∈ Rn , we can find an mv with |v T µ−mv | ≤ O(ǫ) using O(log log 1/ǫ) statistical queries of precision ǫ/2. Proof. We use bisection to find a point where our SQ approximation pe to PrX∼G′ [v T X ≥ x] is within 5ǫ/2 of 1/2. If we find such a point, it has |v T µ − mv | ≤ O(ǫ), by Lemma 8.27. Lemma p8.28 yields that there is an interval [a, b] of length O(ǫ) containing such points in the interval |x| ≤ O(ǫ log(1/ǫ)). Indeed, if our test point x has pe > 1/2 + 5ǫ/2, then x > b and if pe < 1/2 − 5ǫ/2, then x < a. Thus, [a, b] remains a subinterval of the interval we are considering. We now have that µv is a feasible point of the LP considered in Step 11. The following lemma completes the proof: Lemma 8.30. Any feasible point of the LP considered in Step 11, µ eV has kµV − µ eV k2 ≤ O(ǫ). 60 Proof. Consider the vector v = (µV − µ eV )/kµV − µ eV k2 . Note that v is in V , since µC , µ eV are. Since ′ ′ v is a unit vector in V , there is a v ∈ S with kv − v k2 ≤ 1/2. Since µ eV is a solution to the LP, v ′T (µV − µ eV ) ≤ O(ǫ). Thus, we have that kµV − µ eV k2 = v T (µV − µ eV ) = v ′T (µV − µ eV ) + (v − v ′ )T (µV − µ eV ) ≤ O(ǫ) + kµV − µ eV k2 /2 . Therefore, kµV − µ eV k2 ≤ O(ǫ), as required. Proof of Theorem 8.7. Since the LP has a feasible point, we can find such a point µ eV that has kµV − µ eV k2 ≤ O(ǫ). By the previous lemma, we have that kµV −µk2 ≤ O(ǫ). Thus, the algorithm is correct. All statistical queries are of the claimed precision. We need to get bounds on the running time and number of statistical queries. Step 2 that uses the algorithm from [DKK+ 16], takes poly(n/ǫ) time and statistical queries. Finding Pet , for each 1 ≤ t ≤ k, takes nt statistical queries, giving nO (k) time total. There are at most O(n2k ) iterations of the loop. Each iteration takes poly(n/ǫ) time and statistical queries to find T , and nt statistical queries to recompute Pet . It suffices to compute the SVD to within Frobenius norm 1/poly(n/ǫ), which takes time O(k) k . Computing it takes poly(n/ǫ). The set S has size dim(V )O(dim(V )) = log(1/ǫ)kO(log(1/ǫ)) = 2log(1/ǫ) O(k) O(k) log(1/ǫ) log(1/ǫ) statistical queries and time. The LP has . Approximating the medians takes 2 time 2 O(k) O(k) O(k) log(1/ǫ) bits, and so with a constraints and log(1/ǫ) variables. The size of the LP is 2log(1/ǫ) 2 O(k) time. polynomial time LP solver, we can get 2log(1/ǫ) We thus have that the total time and statistical queries are both at most √ √ log(1/ǫ)O( log(1/ǫ)) O(k) log(1/ǫ)O(k) O( log(1/ǫ)) . +2 n poly(1/ǫ) + 2 =n References [ABG+ 14] J. Anderson, M. Belkin, N. Goyal, L. Rademacher, and J. R. Voss. The more, the merrier: the blessing of dimensionality for learning large gaussian mixtures. In Proceedings of The 27th Conference on Learning Theory, COLT 2014, pages 1135–1164, 2014. [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. [AK01] S. Arora and R. Kannan. Learning mixtures of arbitrary Gaussians. In Proceedings of the 33rd Symposium on Theory of Computing, pages 247–257, 2001. [AM05] D. Achlioptas and F. McSherry. On spectral learning of mixtures of distributions. In Proceedings of the Eighteenth Annual Conference on Learning Theory (COLT), pages 458–469, 2005. [AS72] M. Abramowitz and I. Stegun. Handbook of Mathematical Functions. Dover, 1972. [BBBB72] R.E. Barlow, D.J. Bartholomew, J.M. Bremner, and H.D. Brunk. Statistical Inference under Order Restrictions. Wiley, New York, 1972. 61 [BCMV14] A. Bhaskara, M. Charikar, A. Moitra, and A. Vijayaraghavan. Smoothed analysis of tensor decompositions. In Symposium on Theory of Computing, STOC 2014, pages 594–603, 2014. [BFJ+ 94] A. Blum, M. Furst, J. Jackson, M. Kearns, Y. Mansour, and S. Rudich. Weakly learning DNF and characterizing statistical query learning using Fourier analysis. In Proceedings of the Twenty-Sixth Annual Symposium on Theory of Computing, pages 253–262, 1994. [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. [BR13a] Q. Berthet and P. Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In COLT 2013 - The 26th Annual Conference on Learning Theory, pages 1046– 1066, 2013. [BR13b] Q. Berthet and P. Rigollet. Optimal detection of sparse principal components in high dimension. Ann. Statist., 41(4):1780–1815, 2013. [BS10] M. Belkin and K. Sinha. Polynomial learning of distribution families. In FOCS, pages 103– 112, 2010. [BV08] S. C. Brubaker and S. Vempala. Isotropic PCA and Affine-Invariant Clustering. In Proc. 49th IEEE Symposium on Foundations of Computer Science, pages 551–560, 2008. [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 nearlinear time using variable-width histograms. In NIPS, pages 1844–1852, 2014. [CFJ13] T. Cai, J. Fan, and T. Jiang. Distributions of angles in random packing on spheres. Journal of Machine Learning Research, 14(1):1837–1864, 2013. [CGG02] M. Cryan, L. Goldberg, and P. Goldberg. Evolutionary trees can be learned in polynomial time in the two state general Markov model. SIAM Journal on Computing, 31(2):375–397, 2002. [CGR15] M. Chen, C. Gao, and Z. Ren. Robust covariance matrix estimation via matrix depth. CoRR, abs/1506.00691, 2015. [CKL+ 06] C.-T. Chu, S. K. Kim, Y. A. Lin, Y. Yu, G. Bradski, A. Y. Ng, and K. Olukotun. Map-reduce for machine learning on multicore. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pages 281–288, Cambridge, MA, USA, 2006. MIT Press. [CMW13] T. T. Cai, Z. Ma, and Y. Wu. Sparse pca: Optimal rates and adaptive estimation. Ann. Statist., 41(6):3074–3110, 12 2013. [CMW15] T. Cai, Z. Ma, and Y. Wu. Optimal estimation and rank detection for sparse spiked covariance matrices. Probability Theory and Related Fields, 161(3):781–815, 2015. [CQ10] S. X. Chen and Y. L. Qin. A two-sample test for high-dimensional data with applications to gene-set testing. Ann. Statist., 38(2):808–835, 04 2010. 62 [Dan16] A. Daniely. Complexity theoretic limitations on learning halfspaces. In Proceedings of the 48th Annual Symposium on Theory of Computing, STOC 2016, pages 105–117, 2016. [Das99] S. Dasgupta. Learning mixtures of Gaussians. In Proceedings of the 40th Annual Symposium on Foundations of Computer Science, pages 634–644, 1999. [DBS17] S. Du, S. Balakrishnan, and A. Singh. Computationally efficient robust estimation of sparse functionals. CoRR, abs/1702.07709, 2017. [DDKT16] C. Daskalakis, A. De, G. Kamath, and C. Tzamos. A size-free CLT for poisson multinomials and its applications. In Proceedings of 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. [DDS15] A. De, I. Diakonikolas, and R. Servedio. Learning from satisfying assignments. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, pages 478–497, 2015. [DG85] L. Devroye and L. Györfi. Nonparametric Density Estimation: The L1 View. John Wiley & Sons, 1985. [DG92] D. L. Donoho and M. Gasko. Breakdown properties of location estimates based on halfspace depth and projected outlyingness. Ann. Statist., 20(4):1803–1827, 12 1992. [Dia16] I. Diakonikolas. Learning structured distributions. In P. Bühlmann, P. Drineas, M. Kane, and M.J. van Der Laan, editors, Handbook of Big Data, Chapman & Hall/CRC Handbooks of Modern Statistical Methods, chapter 15, pages 267–284. Taylor & Francis, 2016. [DK14] C. Daskalakis and G. Kamath. Faster and sample near-optimal algorithms for proper learning mixtures of gaussians. In Proceedings of The 27th Conference on Learning Theory, COLT 2014, pages 1183–1213, 2014. [DKK+ 16] I. Diakonikolas, G. Kamath, D. M. Kane, J. Li, A. Moitra, and A. Stewart. Robust estimators in high dimensions without the computational intractability. In Proceedings of FOCS’16, 2016. [DKK+ 17a] I. Diakonikolas, G. Kamath, D. M. Kane, J. Li, A. Moitra, and A. Stewart. Being robust (in high dimensions) can be practical. CoRR, abs/1703.00893, 2017. [DKK+ 17b] I. Diakonikolas, G. Kamath, D. M. Kane, J. Li, A. Moitra, and A. Stewart. Robustly learning a gaussian: Getting optimal error, efficiently. CoRR, abs/1704.03866, 2017. [DKS16a] 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. [DKS16b] I. Diakonikolas, D. M. Kane, and A. Stewart. Optimal learning via the fourier transform for sums of independent integer random variables. In Proceedings of COLT 2016, pages 831–849, 2016. Full version available at https://arxiv.org/abs/1505.00662. 63 [DKS16c] I. Diakonikolas, D. M. Kane, and A. Stewart. Robust learning of fixed-structure bayesian networks. CoRR, abs/1606.07384, 2016. [DL01] L. Devroye and G. Lugosi. Combinatorial methods in density estimation. Springer Series in Statistics, Springer, 2001. [DLS14] A. Daniely, N. Linial, and S. S.-Shwartz. From average case complexity to improper learning complexity. In Symposium on Theory of Computing, STOC 2014, pages 441–448, 2014. [Fel16a] V. Feldman. A general characterization of the statistical query complexity. abs/1608.02198, 2016. [Fel16b] V. Feldman. Statistical query learning. In Encyclopedia of Algorithms, pages 2090–2095. 2016. [FGKP06] V. Feldman, P. Gopalan, S. Khot, and A. Ponnuswami. New results for learning noisy parities and halfspaces. In Proc. 47th IEEE Symposium on Foundations of Computer Science (FOCS), pages 563–576, 2006. [FGR+ 13] V. Feldman, E. Grigorescu, L. Reyzin, S. Vempala, and Y. Xiao. Statistical algorithms and a lower bound for detecting planted cliques. In Proceedings of STOC’13, pages 655–664, 2013. [FGV15] V. Feldman, C. Guzman, and S. Vempala. Statistical query algorithms for stochastic convex optimization. CoRR, abs/1512.09170, 2015. [FM99] Y. Freund and Y. Mansour. Estimating a mixture of two product distributions. In Proceedings of the 12th Annual COLT, pages 183–192, 1999. [FOS06] J. Feldman, R. O’Donnell, and R. Servedio. PAC learning mixtures of Gaussians with no separation assumption. In Proc. 19th Annual Conference on Learning Theory (COLT), pages 20–34, 2006. [FOS08] J. Feldman, R. O’Donnell, and R. A. Servedio. Learning mixtures of product distributions over discrete domains. SIAM J. Comput., 37(5):1536–1564, 2008. [FPV15] V. Feldman, W. Perkins, and S. Vempala. On the complexity of random satisfiability problems with planted solutions. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC, 2015, pages 77–86, 2015. [GHK15] R. Ge, Q. Huang, and S. M. Kakade. Learning mixtures of gaussians in high dimensions. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, pages 761–770, 2015. [GR00] O. Goldreich and D. Ron. On testing expansion in bounded-degree graphs. Technical Report TR00-020, Electronic Colloquium in Computational Complexity, 2000. [HK13] D. Hsu and S. M. Kakade. Learning mixtures of spherical gaussians: moment methods and spectral decompositions. In Innovations in Theoretical Computer Science, ITCS ’13, pages 11–20, 2013. [Hot31] H. Hotelling. The generalization of student’s ratio. Ann. Math. Statist., 2(3):360–378, 08 1931. 64 CoRR, [HP15] M. Hardt and E. Price. Tight bounds for learning a mixture of two gaussians. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, pages 753–760, 2015. [HR09] P.J. Huber and E. M. Ronchetti. Robust statistics. Wiley New York, 2009. [HRRS86] F. R. Hampel, E. M. Ronchetti, P. J. Rousseeuw, and W. A. Stahel. Robust statistics. The approach based on influence functions. Wiley New York, 1986. [Hub64] P. J. Huber. Robust estimation of a location parameter. Ann. Math. Statist., 35(1):73–101, 03 1964. [JL09] I. M. Johnstone and A. Y. Lu. On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 104(486):682–693, 2009. [Kea98] M. Kearns. Efficient noise-tolerant learning from statistical queries. Journal of the ACM, 45(6):983–1006, 1998. [KK14] A. R. Klivans and P. Kothari. Embedding hard learning problems into gaussian space. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2014, pages 793–809, 2014. [KKMS08] A. Kalai, A. Klivans, Y. Mansour, and R. Servedio. Agnostically learning halfspaces. SIAM Journal on Computing, 37(6):1777–1805, 2008. [KMR+ 94] M. Kearns, Y. Mansour, D. Ron, R. Rubinfeld, R. Schapire, and L. Sellie. On the learnability of discrete distributions. In Proc. 26th STOC, pages 273–282, 1994. [KMV10] A. T. Kalai, A. Moitra, and G. Valiant. Efficiently learning mixtures of two Gaussians. In STOC, pages 553–562, 2010. [KS06] A. Klivans and A. Sherstov. Cryptographic hardness for learning intersections of halfspaces. In Proc. 47th IEEE Symposium on Foundations of Computer Science (FOCS), pages 553–562, 2006. [KSV08] R. Kannan, H. Salmasian, and S. Vempala. The spectral method for general mixture models. SIAM J. Comput., 38(3):1141–1156, 2008. [KV16] R. Kannan and S. Vempala. Beyond spectral: Tight bounds for planted gaussians. CoRR, abs/1608.03643, 2016. [Li17] J. Li. Robust sparse estimation tasks in high dimensions. CoRR, abs/1702.05860, 2017. [LR05] E. L. Lehmann and J. P. Romano. Testing statistical hypotheses. Springer Texts in Statistics. Springer, 2005. [LRV16] K. A. Lai, A. B. Rao, and S. Vempala. Agnostic estimation of mean and covariance. In Proceedings of FOCS’16, 2016. [LS15] J. Li and L. Schmidt. A nearly optimal and agnostic algorithm for properly learning a mixture of k gaussians, for any constant k. CoRR, abs/1506.01367, 2015. To appear in COLT’17. [Moi14] A. Moitra. Algorithmic aspects of machine learning. http://people.csail.mit.edu/moitra/docs/bookex.pdf. 65 2014. Available online at [MR05] E. Mossel and S. Roch. Learning nonsingular phylogenies and Hidden Markov Models. In To appear in Proceedings of the 37th Annual Symposium on Theory of Computing (STOC), 2005. [MV10] A. Moitra and G. Valiant. Settling the polynomial learnability of mixtures of Gaussians. In FOCS, pages 93–102, 2010. [MW15] T. Ma and A. Wigderson. Sum-of-squares lower bounds for sparse pca. In Proceedings of the 28th International Conference on Neural Information Processing Systems, NIPS’15, pages 1612–1620, 2015. [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. [O’D14] R. O’Donnell. Analysis of Boolean Functions. Cambridge University Press, New York, NY, USA, 2014. [Sco92] D.W. Scott. Multivariate Density Estimation: Theory, Practice and Visualization. Wiley, New York, 1992. [SD08] M. S. Srivastava and M. Du. A test for the mean vector with fewer observations than the dimension. Journal of Multivariate Analysis, 99(3):386 – 402, 2008. [Sil86] B. W. Silverman. Density Estimation. Chapman and Hall, London, 1986. [SOAJ14] A. T. Suresh, A. Orlitsky, J. Acharya, and A. Jafarpour. Near-optimal-sample estimators for spherical gaussian mixtures. In Advances in Neural Information Processing Systems (NIPS), pages 1395–1403, 2014. [Sze89] G. Szegö. Orthogonal Polynomials, volume XXIII of American Mathematical Society Colloquium Publications. A.M.S, Providence, 1989. [Tuk75] J.W. Tukey. Mathematics and picturing of data. In Proceedings of ICM, volume 6, pages 523–531, 1975. [Val84] L. Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. [Ver12] R. Vershynin. How close is the sample covariance matrix totheactual covariance matrix? Journal of Theoretical Probability, 25(3):655–686, 2012. [VW02] S. Vempala and G. Wang. A spectral algorithm for learning mixtures of distributions. In Proceedings of the 43rd Annual Symposium on Foundations of Computer Science, pages 113– 122, 2002. [WBS16a] T. Wang, Q. Berthet, and R. J. Samworth. Statistical and computational trade-offs in estimation of sparse principal components. Ann. Statist., 44(5):1896–1930, 10 2016. [WBS16b] T. Wang, Q. Berthet, and R.J. Samworth. Statistical and computational trade-offs in estimation of sparse principal components. Ann. Statist., 44(5):1896–1930, 2016. [Wil97] R. R. Wilcox. Introduction to robust estimation and hypothesis testing. Statistical modeling and decision science. Acad. Press, San Diego, Calif. [u.a.], 1997. [ZB96] H. Saranadasa Z. Bai. Effect of high dimension: by an example of a two sample problem. Statist. Sinica,, 6:311–329, 1996. 66 Appendix A Sample Complexity Upper Bound for Learning GMMs In this section, we show that learning a k-mixture of n-dimensional Gaussians to variation distance error ǫ is easy information theoretically. In particular, we have: Theorem A.1. Given ǫ > 0 and positive integers k and n, there exists an algorithm that, given a probability distribution P which is a k-mixture of n-dimensional Gaussians, takes O(n2 k3 log2 (k)/ǫ5 ) samples from P and with probability at least 2/3 returns a distribution Q with dTV (P, Q) < ǫ. Note that the algorithm given in Theorem A.1 will not be computationally efficient. The basic idea of Theorem A.1 will be to make many guesses as to the mixture, at least one of which is close, and then run a tournament to find the true answer. We approximate the mixture by first guessing approximations to the weights and then approximating each individual Gaussian. If we had polynomially many samples from a single part of the mixture, it would be easy to learn: Lemma A.2 (Folklore). Let G be an n-dimensional Gaussian, and let δ > 0. There exists a polynomial time algorithm that, given O(n2 /δ2 ) independent samples from G, returns a probability distribution P so that, with probability at least 2/3, dTV (G, P) < δ. Note that we can easily improve the success probability in Lemma A.3 to 1− δ at the cost of multiplying the sample complexity by log(1/δ). In particular, we have: Corollary A.3. Let G be an n-dimensional Gaussian, and let ǫ > 0. There exists a polynomial time algorithm that given M independent samples from G returns a probability distribution P so that with probability at least 1 − exp(−Ω(M ǫ2 /d2 )), we have dTV (G, P) < ǫ. Unfortunately, we cannot simply run this algorithm for each component in our mixture, since we do not know which samples come from which component. However, if we manage to correctly guess where each sample comes from this will not be an issue. Proposition A.4. Given ǫ > 0 and positive integers k and n, there exists an algorithm that given a probability distribution P, which is a k-mixture of n-dimensional Gaussians, and Θ(n2 k3 log(k)/ǫ3 ) independent samples from P, returns a set of exp(O(n2 k3 log2 (k)/ǫ3 )) distributions Qi so that with probability at least 2/3 there exists an i so that dTV (Pi , Qi ) < ǫ. Proof. If our algorithm is given N samples, it will return a qi for each function f : [N ] → [k]. Intuitively, f encodes our guess as to which sample came from which component of the mixture. Note that there are only exp(N log(k)) many such f ’s. The algorithm is quite simple. Let s1 , s2 , . . . , sN be our samples, and let Si = {sj : f (j) = i}. Letting A be the algorithm from Corollary A.3 with δ taken to be ǫ/(10k), we let Qf =  k  X |Si | i=1 N A(Si ). We claim that at least one of these works Pkwith probability 2/3. In particular, let P be the mixture i=1 wi Gi . Consider the case where f correctly guesses which part of the mixture each sample was taken from. In particular, f (i) = j if and only if si was taken from Gj . We claim that, with probability at least 2/3, this choice of f leads to dTV (Qf , P) < ǫ. We will henceforth use Si to denote the set of samples actually taken from the ith component of the mixture. 67 Firstly, note that by standard concentration bounds, we have that |SNi | − wi < ǫ/(10k), for all i, with probability at least 9/10. Secondly, note that after conditioning on which samples of P were taken form which part, the samples themselves are independent samples from the appropriate Gi ’s, that with probability at least 9/10 we have that dTV (Gi , A(Si )) < ǫ/(10k) for all i with |Si | ≫ n2 k2 log(k)/ǫ2 . We claim that if both of the above conditions hold (which happens with probability at least 2/3) that dTV (P, Qf ) < ǫ. Letting S be the set of indices i so that wi < ǫ/(5k), we note that for i 6∈ S that |Si | ≫ n2 k2 log(k)/ǫ2 . We then have that  k  k X 1 X |Si | dTV (P, Qf ) = wi Gi − A(Si ) 2 N i=1 i=1 1   k X |Si | 1 ≤ wi Gi − A(Si ) 2 N 2 i=1      k k |Si | |Si | 1X 1X max wi , wi − + |Gi − A(Si )|1 ≤ 2 N 2 N i=1 i=1 X 1X (wi + ǫ/(10k))|Gi − A(Si )|1 + dTV (Gi , A(Si )) ≤ ǫ/20 + 2 i∈S X 1X ≤ ǫ/20 + 3ǫ/(10k) + ǫ/(10k) 2 i∈S i6∈S i6∈S ≤ ǫ/20 + 3ǫ/20 + ǫ/20 <ǫ. This completes the proof. Theorem A.1 now follows immediately form a standard tournament argument (see, e.g., [DL01, DDS12b, DDS15]). B Sample Complexity Upper Bound for Parameter Estimation of Separated GMMs Next we consider P the more complicated task of parameter estimation. In particular, given samples from a distribution P = ki=1 Gi , where each Gi is a weighted Gaussian, we would like to learn a distribution P Q that is not only close to P but that can be written as Q = ki=1 Hi with kHi − Gi k1 small for all i. Now, in general, this task will require number of samples exponential in k, simply because there are pairs of mixtures that are ǫΩ(k) -close in variation distance and yet ǫ-far in terms of their individual components. However, we will show that if the components are separated, this cannot be the case and thus learning the distribution in variation distance will be sufficient. Before we begin, we need to clarify R our notion of separation. Given two pseudo-distributions, p and q, we define their overlap as V (p, q) := min(dp, dq). We should note that if p and q are honest distributions, then dTV (p, q) = 1 − V (p, q). We have the following theorem: P P Theorem B.1. There exists a constant C so that if we have two mixtures p = ki=1 Gi and q = ki=1 Hi , where p and q are normalized distributions with Hi , Gi weighted Gaussians, such that dTV (p, q) < (δ/k)C for some sufficiently small δ > 0, and so that for any i 6= j, V (Gi , Gj ), V (Hi , Hj ) < (δ/k)C , then there exists a permutation π : [k] → [k] so that kGi − Hπ(i) k1 < δ for all i. 68 We begin by producing a proxy for the overlap between distributions. In particular, for pseudo-distributions p and q, we define Z  p h(p, q) = − log dpdq . Notice that if p and q are true distributions, this is related to the Hellinger distance by H(p, q) = 2(1 − e−h(p,q) ). We also note the relationship to the overlap: Lemma B.2. If p and q are pseudo-distributions with L1 norm at most 1, then V (p, q) = exp(−Θ(h(p, q)) + O(1)) . Proof. On the one hand, there is an easy upper bound Z Z p dpdq = exp(−h(p, q)). V (p, q) = min(dp, dq) ≤ The lower bound is by Cauchy-Schwarz exp(−h(p, q)) = Z p This completes our proof. dpdq ≤ Z 1/2 Z 1/2 p ≤ 2V (p, q). min(dp, dq) max(dp, dq) Ideally we would like to show that h is nearly a metric for Gaussians. Namely that h(A, C) = O(h(A, B) + h(B, C)). This would imply that Hi could not have large overlap with more than one Gj , since if V (Hi , Ga ) and V (Hi , Gb ) were both large, then h(Hi , Ga ), h(Hi , Gb ) would be small and therefore, h(Ga , Gb ) would be small. This would contradict our assumption that Ga and Gb have small overlap. Unfortunately, this is not true. In one dimension, a very wide Gaussian may have non-trivial overlap with two narrow Gaussians with widely separated means, neither of which overlaps the other substantially. We will need to develop techniques to deal with this circumstance. To do this, we introduce an intermediate notation. If Gi = wi N (µi , Σi ) are weighted Gaussians, we define hΣ (G1 , G2 ) := h(N (0, Σ1 ), N (0, Σ2 )). This is useful because it does satisfy an approximate triangle inequality. Proposition B.3. For F, G, H weighted Gaussians, we have that hΣ (F, H) = O(hΣ (F, G) + hΣ (G, H)). Before we prove this, we will first need to find an approximation to hΣ . Lemma B.4. If G and H are weighted Gaussians with covariance matrices A and B respectively, then   hΣ (G, H) = Θ Σλ eigenvalue of B −1/2 AB −1/2 min(| log(λ)|, | log(λ)|2 ) . Proof. By making an appropriate change of variables, we can assume that H has identity covariance and G has covariance B −1/2 AB −1/2 . Thus, it suffices to consider the case where B = I. In this case, we may 69 diagonalize A to get A = diag(λi ). We then have that hΣ (G, H) = h(N (0, A), N (0, I)) = − log (2π)−n/2 = − log = n X n Y −1/4 λi n Y −1/4 λi i=1 Z exp − −1/2 ((1 + λ−1 i )/2) i=1 ! n X ! x2i /2(1/(2λi ) + 1/2) dx i=1 ! log(λi )/4 + log((1 + λ−1 i )/2)/2. i=1 We claim that log(λ)/4 + log((1 + λ−1 )/2)/2 = Θ(min(| log(λ)|, | log(λ)|2 )). To see this note that when λ = 1 + ǫ for small values of ǫ, the left hand side above is (ǫ/4 − ǫ2 /8 + O(ǫ3 )) + (−ǫ/4 + 3ǫ/16 + O(ǫ3 )) = ǫ2 /16 + O(ǫ3 ) = Θ(ǫ2 ). On the other hand, when λ ≫ 1, this is asymptotic to | log(λ)|/4, and when λ ≪ 1, it is similarly asymptotic to − log(λ)/4. Finally, since it is easily verified that log(λ)/4+log((1+λ−1 )/2)/2 is never 0 unless λ = 1, this proves the claim, from which our lemma follows easily. We will also need the following fact about eigenvalues of a product of matrices: Lemma B.5. Let A and B be symmetric matrices with eigenvalues ν1 ≥ ν2 ≥ . . . ≥ νn > 0 and µ1 ≥ µ2 ≥ . . . ≥ µn > 0, respectively. Let λ1 ≥ λ2 ≥ . . . ≥ λ2n > 0 be the sorting of the νi and µi together. Let M be a matrix with M T M = A. Then, the kth largest eigenvalue of M T BM is at most λ2k . Proof. We need to show that there is an (n − k + 1)-dimensional subspace V so that for v ∈ V we have that vA1/2 BA1/2 v ≤ λ2k |v|2 . Suppose that λ1 , . . . , λk−1 contains m of the νi and k − m − 1 of the µi . Let V be the subspace of vectors v so that v is perpendicular to the top m eigenvectors of A and so that A1/2 v is perpendicular to the top m − k − 1 eigenvalues of B. Then vM T BM v ≤ λk |M v|2 = λk vAv ≤ λ2k |v|2 . This completes the proof. We are now ready to prove Proposition B.3. Proof. Let F, G, H have covariance matrices A, B, C respectively. Let Σ1 = A−1/2 BA−1/2 , Σ2 = B −1/2 CB −1/2 and Σ3 = A−1/2 CA−1/2 = (A−1/2 B 1/2 )Σ2 (B 1/2 A−1/2 ). Let the eigenvalues of Σi be (i) (i) (i) λ1 ≥ λ2 ≥ . . . ≥ λn > 0. Let f (x) = max(0, min(log(x), log 2 (x))). We have by Lemma B.4 that ! n X (1) (1) f (λi ) + f (1/λi ) , hΣ (F, G) = Θ i=1 hΣ (G, H) = Θ n X (2) f (1/λi ) (3) f (λi ) (3) f (1/λi ) i=1 hΣ (F, H) = Θ n X ! (2) f (λi ) + i=1 70 + ! , . (3) (1) On the other hand, Lemma B.5 says that λi is at most the square of the ith largest of the λj Therefore, ! n n n X X X (2) (1) (3) f (λi ) . f (λi ) + f (λi ) = O i=1 i=1 i=1 (2) and λj . Similarly, by considering the inverses of these matrices, we find that n X (3) f (1/λi ) = O n X (1) f (1/λi ) + (2) ! f (1/λi ) . i=1 i=1 i=1 n X Together these complete the proof. In addition to this, we need to know what else contributes to h(G, H). We define hµ (G, H) = h(G, H) − hΣ (G, H). We make the following claim: Proposition B.6. −1 hµ (w1 N (µ1 , Σ1 ), w2 N (µ2 , Σ2 )) = −1/2 log(w1 w2 )+inf ((x−µ1 )Σ−1 1 (x−µ1 )+(x−µ2 )Σ2 (x−µ2 ))/4. x Proof. We have that h(w1 N (µ1 , Σ1 ), w2 N (µ2 , Σ2 ))  Z −1 −1 −n/2 −1/4 (2π) (det(Σ1 Σ2 )) exp(−((x − µ1 )Σ1 (x − µ1 ) + (x − µ2 )Σ2 (x − µ2 ))/4)dx . = − 1/2 log(w1 w2 ) − log −1 Letting x0 achieve the minimum value of ((x − µ1 )Σ−1 1 (x − µ1 ) + (x − µ2 )Σ2 (x − µ2 ))/4, this is −1 −1/2 log(w1 w2 ) + ((x0 − µ1 )Σ−1 1 (x0 − µ1 ) + (x0 − µ2 )Σ2 (x0 − µ2 ))/4 Z  −1 −1 −n/2 −1/4 + log (2π) (det(Σ1 Σ2 )) exp(−(x − x0 )(Σ1 + Σ2 )(x − x0 )/4)dx . Noting that the term at the end is simply hΣ (w1 N (µ1 , Σ1 ), w2 N (µ2 , Σ2 )) completes the proof. We need one further proposition from which Theorem B.1 will follow easily. Proposition B.7. Under the assumptions of Theorem B.1, for each i there exists at most one j so that √ C h(Gi , Hj ) > (δ/k) . To prove this, we will need one further lemma: √ Lemma B.8. If h(Gi , Hj ) > (δ/k) C , with ΣG and ΣH the covariance matrices of the corresponding Gaussians, then for A a sufficiently large constant (independent of C) ΣG ≤ AΣH . Proof. Suppose for sake of contradiction that this is not the case. By making a change of variables, we can ′ assume that ΣG = I. This p means that ΣH has some eigenvector v with eigenvalue less than 1/A. Let H be 1/4 log(k/δ) in the direction closer to the mean of Gi . We have that Hj translated by C √ h(Hj , H ′ ) = hµ (Hj , H ′ ) = Θ(A C log(k/δ)). 71 Therefore, V (Hj , H ′ ) = (δ/k)Ω(A √ C) . On the other hand, h(Gi , H ′ ) = hΣ (Gi , H ′ ) + hµ (Gi , H ′ ) √ ≤ hΣ (Gi , H) + O( C log(k/δ)) √ ≤ h(Gi , H) + O( C log(k/δ)) √ = O( C log(k/δ)). √ This means that V (G, H ′ ) = (δ/k)O( C) . √ P P This means that p = ℓ Gℓ has V (p,√H ′ ) = (δ/k)O( C) , and since p is close to q = ℓ Hℓ , there must be some ℓ so that V (H ′ , Hℓ ) > (δ/k)O( C) . Note that ℓ here cannot be j. On the other hand, this implies that h(Hj , Hℓ ) = hΣ (Hj , Hℓ ) + hµ (Hj , Hℓ ) √ ≤ hΣ (H ′ , Hℓ ) + O(hµ (H ′ , Hℓ ) + A C log(k/δ)) √ ≤ O(h(H ′ , Hℓ ) + A C log(k/δ)) √ = O(A C log(k/δ)). Therefore, V (Hℓ , Hj ) = (δ/k)O(A the proof. √ C) , which for C ≫ A2 contradicts our assumptions. This completes We are now prepared to prove Proposition B.7. √ Proof. Suppose for sake of contradiction that V (Gi , Hj ), V (Gi , Hℓ ) > (δ/k) C for some j 6= ℓ. Then, by Lemma B.8, we have that all of the covariance matrices of Gi , Hj , Hℓ are comparable to each other (namely each is no more than a constant√multiple of any other). We claim that this implies that hµ (Hj , Hℓ ) = O(hµ (Hj , Gi ) + hµ (Hℓ , Gi ) + C log(k/δ)). This is because, letting ΣG be the covariance matrix of Gi , ′ ′ and letting √ wG = |Gi |1 , wH = |Hj |1 , wH = |Hℓ |1 , we have the following: First, each of wG , wH , wH = exp(O( C log(δ/k))), because each distribution has large overlap with some other. Next, we have that √ hµ (Gi , Hj ) = O( C log(δ/k)) + inf Θ((x − µGi )ΣG (x − µGi ) + (x − µHj )ΣG (x − µHh ) x √ = O( C log(δ/k)) + Θ((µGi − µHj )ΣG (µGi − µHj )). Similarly, √ hµ (Gi , Hℓ ) = O( C log(δ/k)) + Θ((µGi − µHℓ )ΣG (µGi − µHℓ )), and √ hµ (Hj , Hℓ ) = O( C log(δ/k)) + Θ((µHj − µHℓ )ΣG (µHj − µHℓ )). This implies that hµ (Hj , Hℓ ) = O(hµ (Hj , G) + hµ (G, Hℓ )). Therefore, we have that h(Hj , Hℓ ) = hΣ (Hj , Hℓ ) + hµ (Hj , Hℓ ) = O(hΣ (Hj , G) + hµ (Hj , G) + hΣ (G, Hℓ ) + hµ (G, Hℓ )) = O(h(Hj , G) + h(G, Hℓ )) = O(log(1/V (Hj , G)) + log(1/V (G, Hℓ ))) √ = O( C log(k/δ)). 72 √ However, this implies that V (Hj , Hℓ ) = (δ/k)O( This completes our proof. C) , a contradiction. We are now ready to prove Theorem B.1 √ Proof. For each Gi that has overlap more than (δ/k) C with some Hj , let π(i) be that j. For other i, define π(i) arbitrarily subject to π being √ a permutation. Note that V (Gi , Hj ) < (δ/k) C for any j 6= π(i). Also note that V (Gi , q) ≥ V (Gi , p) − |p − q|1 = |Gi |1 − 2(δ/k)C . On the other hand, V (Gi , q) ≤ X V (Gi , Hj ) j ≤ V (Gi , Hπ(i) ) + X V (Gi , Hj ) j6=π(i) ≤ V (Gi , Hπ(i) ) + δ/3. Therefore V (Gi , Hπ(i) ) ≥ |Gi |1 − δ/2. It is also at most |Gi |1 − δ/2. On the other hand |Gi − Hπ(i) |1 = |Gi |1 + |Hπ(i) |1 − 2V (Gi , Hπ(i) ) ≤ δ. This completes the proof. C Testing the Mean of a High-Dimensional Gaussian √ Theorem C.1. There exists an algorithm that given ǫ > 0 and k = O( n/ǫ2 ) samples from an ndimensional Gaussian G = N (µ, I) distinguishes between the cases • µ=0 • kµk2 > ǫ with probability at least 2/3. Proof. The tester is fairly simple. Let Xi be the ith sample, and let k 1 X Xi . Z := √ k i=1 The algorithm returns “YES” if kZk22 < ǫ2 k/2 + n and “NO” √ otherwise. To show correctness, note that Z is distributed as N (µ k, I). If µ = 0, then kZk22 has mean n and variance O(n), and so it is less than n + ǫ2k/2 with probability at least 2/3, assuming that k is a sufficiently √ large multiple of n/ǫ2 . On the other hand, if kµk2 > ǫ, we note that kZk22 has mean n + kkµk22 and √ variance O(n) + O(kkµk22 ). Thus, if kkµk22 ≫ n, the algorithm rejects with probability 2/3. Again, this √ happens if kµk2 > ǫ and k is a sufficiently large multiple of n/ǫ2 . This completes the proof. We also note that this tester can be implemented in the SQ model simply by verifying that each √ coordinate-wise median has absolute value less than ǫ/ n, which can be verified by showing that Pr(xi > √ 0) = 1/2 + O(ǫ/ n). We also show that the tester above is sample-optimal, up to a constant factor: √ Theorem C.2. There is no algorithm that given k = o( n/ǫ2 ) samples from an n-dimensional Gaussian G = N (µ, I) distinguishes between the cases 73 • µ=0 • kµk2 > ǫ with probability at least 2/3. Proof. Suppose for sake of contradiction that such an algorithm does exist. Consider the following scenario: √ Let µ be taken from the distribution N (0, (2ǫ/ n)I). Note that kµk2 > ǫ with probability at least 9/10. Let Y1 , Y2 , . . . , Yk be independent samples taken from N (µ, I). And let Z1 , . . . , Zk be independent samples from N (0, I). Assuming that our algorithm exists, it can distinguish between a sample from Y1 , . . . , Yk and a sample from Z1 , . . . , Zk with probability better than 1/2. This means that these distributions must have constant variational distance. However, note that the vector (Z1 , . . . , Zk ) is simply a standard nkdimensional Gaussian. The vector (Y1 , . . . , Yk ) on the other hand is an nk-dimensional Gaussian with mean 0 and with  2  1 + 2ǫ /n , if ab = cd Cov(Yab , Ycd ) = 2ǫ2 /n , if b = d and a 6= c   0, otherwise . By standard results, G′ = N (0, Σ) has constant variation distance from N (0, I) if and only if kΣ−IkF ≫ 1. Taking Σ to be the covariance matrix for the Y ’s, we have that √ kΣ − Ik2F = nk(2ǫ/ n)2 = 4kǫ2 /n = o(1) . This implies that the distribution on Y ’s is close, in total variation distance, to the distribution on Z’s, and gives a contradiction. D Omitted Proofs D.1 Proof of Fact 3.6 We will need the following claim: Claim D.1. We have that: Hei (x cos θ + y sin θ) = i   X i j j=1 cosj θ sini−j θHej (x)Hei−j (y) . Proof. The Hei (x) are monic polynomials: the lead term is xi with coefficient 1. Thus, all the degree-i terms of Hei (x cos θ + y sin θ) are given by i   X i (x cos θ + y sin θ)i cosj θ sini−j θxj y i−j . j j=1 It follows that the degree-i terms of the LHS and RHS of the lemma agree. Therefore, we have i   X i Hei (x cos θ + y sin θ) = p(x, y) + cosj θ sini−j θHej (x)Hei−j (y) , j j=1 for some polynomial p(x, y) of degree at most i − 1. We need to show that p(x, y) is identically zero. To show this we consider E[Hei (X cos θ + Y sin θ)2 ], for (X, Y ) ∼ N (0, I). Since the Gaussian is unaltered by rotations, by a change of coordinates we have that: Z ∞Z ∞ 2 E[Hei (X cos θ + Y sin θ) ] = Hei (x cos θ + y sin θ)2 G(x)G(y)dxdy −∞ Z−∞ ∞ Z ∞ = Hei (x′ )2 G(x′ )G(y ′ )dx′ dy ′ = i! . −∞ −∞ 74 However, pairs of distinct Hej (x)Hei−j (y) are orthogonal to each other and they are all orthogonal to the lower degree polynomial p(x, y). Thus, we have E[Hei (X cos θ + Y sin θ)2 ] = E[p(X, Y )2 ] + i  2 X i j=1 = E[p(X, Y )2 ] + j i  2 X i j=1 = E[p(X, Y )2 ] + i! j cos2j θ sin2(i−j) θi!(i − j)! i   X i j=1 2 cos2j θ sin2(i−j) θE[Hej (X)2 Hei−j (Y )2 ] j cos2j θ sin2(i−j) θ = E[p(X, Y ) ] + i!(cos2 θ + sin2 θ)i = E[p(X, Y )2 ] + i! . We must therefore have that E[p(X, Y )2 ] = 0. Since the Gaussian has positive pdf everywhere, this implies that p(X, Y ) is identically zero. We now have: Uθ (Hei G)(x) = = = Z ∞ Z−∞ ∞ Hei (x cos θ + y sin θ)G(x cos θ + y sin θ)G(x sin θ − y cos θ)dy Hei (x cos θ + y sin θ)G(x)G(y)dy −∞ i  X j=1 i  Z ∞ i j i−j Hej (x)Hei−j (y)G(x sin θ − y cos θ)dy cos θ sin θ j −∞ = cos θHei (x)G(x) , since R∞ −∞ Hei−j (y)G(y)dy = δij . This completes the proof. D.2 Proof of Lemma 3.7 We use the following lemma: Lemma D.2 (Proposition 1 from [CFJ13]). Given any 0 < ǫ < π/2, let θ be the angle between two random unit vectors uniformly distributed over Sn . Then we have that: √ Pr[|θ − π/2| ≥ ǫ] ≤ O( n(cos ǫ)n−2 ) . As a corollary, we have: Corollary D.3. Let θ be the angle between two random unit vectors uniformly distributed over Sn . Then we have that:    Pr | cos θ| ≥ Ω(n−α ) ≤ exp −Ω(n1−2α ) , for any 0 ≤ α ≤ 1/2. Proof. We apply Lemma D.2 with ǫ = n−α . If n−α = O(1), the result is trivial, so we may assume that ǫ ≤ 1/100. Then we have that cos ǫ ≤ 1 − ǫ2 /2 + ǫ2 /24 ≤ 1 − ǫ2 /3 ≤ exp(ǫ2 /4). Lemma D.2 now gives that    √ Pr |θ − π/2| ≥ n−α ≤ O n exp(−n−2α /4)n−2 ≤ exp(−n1−2α /5) . Note that if |θ − π/2|≤n−α , it follows that | cos θ| ≤ |θ − π/2| ≤ n−α . 75 Using Corollary D.3 for α = 1/2 − c, and a union bound over all pairs of distinct vectors in S, the probability that there exist v 6= v ′ ∈ S such that |v · v ′ |≥Ω(nc−1/2 ) is less than |S|2 2−Ω(n 2c ) <1. Therefore, the set S will satisfy the statement of Lemma 3.7 with positive probability, as desired. D.3 Proof of Fact 6.2 We have: Z 2 1 + χ (wB + (1 − w)C, D) = (wB(x) + (1 − w)C(x))2 /D(x)dx Z Z Z 2 2 2 2 =w B(x) /D(x)dx + (1 − w) C(x) /D(x)dx + 2w(1 − w) B(x)C(x)/D(x)dx = w2 (1 + χ2 (B, D)) + (1 − w)2 (1 + χ2 (C, D)) + 2w(1 − w)(1 + χD (B, C)) = 1 + w2 χ2 (B, D) + (1 − w)2 χ2 (C, D) + 2w(1 − w)χD (B, C) . This completes the proof. D.4 Proof of Fact 6.3 By definition, we can write Z ∞ ′ G(x − µ′ )G(x − µ)/G(x)dx 1 + χN (0,1) (N (µ , 1), N (µ, 1)) = −∞ Z ∞ √  = (1/ 2π) · exp −(x − µ′ )2 /2 − (x − µ)2 /2 + x2 /2 dx Z−∞ ∞ √  exp −x2 /2 + (µ′ + µ)x − µ2 /2 − µ′2 /2 dx = (1/ 2π) · −∞ Z ∞  G(x − µ − µ′ ) exp −µ2 /2 + −µ′2 /2 + (µ + µ′ )2 /2 dx = −∞ = exp(µ′ µ) . This completes the proof. D.5 Proof of Fact 6.4 By definition, we have that Z ∞ 2 2 G(x/σ)2 /G(x)dx 1 + χ (N (0, σ ), N (0, 1)) = (1/σ) −∞ Z ∞ 1 = √ exp(x2 /2 − x2 /σ 2 )dx 2 σ 2π −∞ p Z ∞ p 2/σ 2 − 1 1 p G(x/ 2/σ 2 − 1)dx = · σ2 2/σ 2 − 1 −∞ p 2/σ 2 − 1 p = = 2/σ 4 − 1/σ 2 . σ2 This completes the proof. 76
8cs.DS
PROC. OF THE 15th PYTHON IN SCIENCE CONF. (SCIPY 2017) 1 MatchPy: A Pattern Matching Library Manuel Krebber‡∗ , Henrik Bartels‡ , Paolo Bientinesi‡ arXiv:1710.06915v1 [cs.PL] 16 Oct 2017 F Abstract—Pattern matching is a powerful tool for symbolic computations, based on the well-defined theory of term rewriting systems. Application domains include algebraic expressions, abstract syntax trees, and XML and JSON data. Unfortunately, no lightweight implementation of pattern matching as general and flexible as Mathematica exists for Python [Pö16], [Hao14], [Sch14], [Jen15]. Therefore, we created the open source module MatchPy which offers similar pattern matching functionality in Python using a novel algorithm which finds matches for large pattern sets more efficiently by exploiting similarities between patterns. Index Terms—pattern matching, symbolic computation, discrimination nets, term rewriting systems Introduction Pattern matching is a powerful tool which is part of many functional programming languages as well as computer algebra systems such as Mathematica. It is useful for many applications including symbolic computation, term simplification, term rewriting systems, automated theorem proving, and model checking. In this paper, we present a Python-based pattern matching library and its underlying algorithms. The goal of pattern matching is to find a match substitution given a subject term and a pattern which is a term with placeholders [BN98]. The substitution maps placeholders in the pattern to replacement terms. A match is a substitution that can be applied to the pattern yielding the original subject. As an example consider the subject f (a) and the pattern f (x) where x is a placeholder. Then the substitution σ = {x 7→ a} is a match because σ ( f (x)) = f (a). This form of pattern matching without any special properties of function symbols is called syntactic matching. For syntactic patterns, the match is unique if it exists. Among the existing systems, Mathematica [WR16] arguably offers the most expressive pattern matching. Its pattern matching offers similar expressiveness as Python’s regular expressions, but for symbolic tree structures instead of strings. While pattern matching can handle nested expressions up to arbitrary depth, regular expressions cannot properly handle such nesting. Patterns are used widely in Mathematica, e.g. in function definitions or for manipulating terms. It is possible to define custom function symbols which can be associative and/or commutative. Mathematica also offers sequence variables which can match a sequence of terms instead of a single one. These are especially useful when * Corresponding author: [email protected] ‡ RWTH Aachen University, AICES, HPAC Group c 2017 Manuel Krebber et al. This is an open-access article Copyright ○ distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. working with variadic function symbols. Mathics [Pö16] is an open source computer algebra system written in Python that aims to replicate the syntax and functionality of Mathematica. To our knowledge, no existing work covers pattern matching with function symbols which are either commutative or associative but not both at the same time. However, there are functions with those properties, e.g. matrix multiplication or arithmetic mean. Most of the existing pattern matching libraries for Python only support syntactic patterns. Associativity, commutativity and sequence variables make multiple distinct matches possible for a single pattern. In addition, pattern matching with either associativity or commutativity is NP-complete in both cases [BKN87]. While the pattern matching in SymPy [MSP+ 17] can work with associative/commutative functions, it is limited to finding a single match. Nonetheless, for some applications it is interesting to find all possible matches for a pattern, e.g. because matches need to be processed further recursively to solve an optimization problem. Furthermore, SymPy does not support sequence variables and is limited to a predefined set of mathematical operations. In many applications, a fixed set of patterns is matched repeatedly against different subjects. The simultaneous matching of multiple patterns is called many-to-one matching, as opposed to one-to-one matching which denotes matching with a single pattern. Many-to-one matching can gain a significant speed increase compared to one-to-one matching by exploiting similarities between patterns. This has already been the subject of research for both syntactic [Chr93], [Grä91], [NWE97] and associative-commutative pattern matching [KL91], [BCR93], [LM94], [BCR+ 95], [Eke95], [KM01], but not with the full feature set described above. Discrimination nets [BW84] are the state-of-the-art solution for many-to-one matching. Our goal is to generalize this approach to support all the aforementioned features. In this paper, we present the open-source library for Python MatchPy which provides pattern matching with sequence variables and associative/commutative function symbols. In addition to standard one-to-one matching, MatchPy also includes an efficient many-to-one matching algorithm that uses generalized discrimination nets. First, we give an overview of what MatchPy can be used for. Secondly, we explain some of the challenges arising from the non-syntactic pattern matching features and how we solve them. Then we give an overview of how many-to-one matching is realized and optimized in MatchPy. Next, we present our experiments where we observed significant speedups of the many-to-one matching over one-to-one matching. Finally, we draw some conclusions from the experiments and propose future work on MatchPy. 2 PROC. OF THE 15th PYTHON IN SCIENCE CONF. (SCIPY 2017) Usage Overview Operation MatchPy can be installed using pip and all necessary classes can be imported from the toplevel module matchpy. Expressions in MatchPy consist of constant symbols and operations. For patterns, wildcards can also be used as placeholders. We use Mathematica’s notation for wildcards, i.e. we append underscores to wildcard names to distinguish them from symbols. MatchPy can be used with native Python types such as list and int. The following is an example of how the subject [0, 1] can be matched against the pattern [x_, 1]. The expected match here is the replacement 0 for x_. We use next because we only want to use the first (and in this case only) match of the pattern: >>> x_ = Wildcard.dot(’x’) >>> next(match([0, 1], Pattern([x_, 1]))) {’x’: 0} In addition to regular (dot) variables, MatchPy also supports sequence wildcards. They can match a sequence of arguments and we denote them with two or three trailing underscores for plus and star wildcards, respectively. Star wildcards can match an empty sequence, while plus wildcards require at least one argument to match. The terminology is borrowed from regular expressions where *, + and . are used for similar concepts. >>> y___ = Wildcard.star(’y’) >>> next(match([1, 2, 3], Pattern([x_, y___]))) {’x’: 1, ’y’: (2, 3)} In the following, we omit the definition of new variables as they can be done in the same way. In addition to native types, one can also define custom operations by creating a subclass of the Operation class: class MyOp(Operation): name = ’MyOp’ arity = Arity.variadic associative = True commutative = True The name is a required attribute, while the others are optional and influence the behavior of the operations. By default, operations are variadic and neither commutative nor associative. Nested associative operations have to be variadic and are automatically flattened. Furthermore, regular variables behave similar to sequence variables as arguments of associative functions, because the associativity allows arbitrary parenthesization of arguments: >>> next(match(MyOp(0, 1, 2), Pattern(MyOp(x_, 2)))) {’x’: MyOp(0, 1)} The argument of commutative operations are automatically sorted. Note that patterns with commutative operations can have multiple matches, because their arguments can be reordered arbitrarily. >>> list(match(MyOp(1, 2), Pattern(MyOp(x_, z_)))) [{’x’: 2, ’z’: 1}, {’x’: 1, ’z’: 2}] We can use the CustomConstraint class to create a constraint that checks whether a is smaller than b: a_lt_b = CustomConstraint(lambda a, b: a < b) The lambda function gets called with the variable substitutions based on their name. The order of arguments is not important and it is possible to only use a subset of the variables in the pattern. With this constraint we can define a replacement rule that basically describes bubble sort: >>> pattern = Pattern([h___, b_, a_, t___], a_lt_b) >>> rule = ReplacementRule(pattern, lambda a, b, h, t: [*h, a, b, *t]) Symbol Arity Multiplication Addition × + variadic variadic Transposition Inversion Inversion and Transposition T −1 unary unary unary −T Properties associative associative, commutative TABLE 1: Linear Algebra Operations The replacement function gets called with all matched variables as keyword arguments and needs to return the replacement. This replacement rule can be used to sort a list when applied repeatedly with replace_all: >>> replace_all([1, 4, 3, 2], [rule]) [1, 2, 3, 4] Sequence variables can also be used to match subsequences that match a constraint. For example, we can use the this feature to find all subsequences of integers that sum up to 5. In the following example, we use anonymous wildcards which have no name and are hence not part of the match substitution: >>> x_sums_to_5 = CustomConstraint( ... lambda x: sum(x) == 5) >>> pattern = Pattern([___, x__, ___], x_sums_to_5) >>> list(match([1, 2, 3, 1, 1, 2], pattern)) [{’x’: (2, 3)}, {’x’: (3, 1, 1)}] More examples can be found in MatchPy’s documentation [Kre17a]. Application Example: Finding matches for a BLAS kernel BLAS is a collection of optimized routines that can compute specific linear algebra operations efficiently [LHKK79], [DCHH88], [DCHD90]. As an example, assume we want to match all subexpressions of a linear algebra expression which can be computed by the ?TRMM BLAS routine. These have the form α × op(A) × B or α × B × op(A) where op(A) is either the identity function or transposition, and A is a triangular matrix. For this example, we leave out all variants where α 6= 1. In order to model the linear algebra expressions, we use the operations shown in Table 1. In addition, we have special symbol subclasses for scalars, vectors and matrices. Matrices also have a set of properties, e.g. they can be triangular, symmetric, square, etc. For those patterns we also use a special kind of dot variable which is restricted to only match a specific kind of symbol. Finally, we construct the patterns using sequence variables to capture the remaining operands of the multiplication: A_ = Wildcard.symbol(’A’, Matrix) B_ = Wildcard.symbol(’B’, Matrix) A_is_triangular = CustomConstraint( lambda A: ’triangular’ in A.properties) trmm_patterns = [ Pattern(Times(h___, A_is_triangular), Pattern(Times(h___, A_is_triangular), Pattern(Times(h___, A_is_triangular), Pattern(Times(h___, A_is_triangular), ] A_, B_, t___), Transpose(A_), B_, t___), B_, A_, t___), B_, Transpose(A_), t___), MATCHPY: A PATTERN MATCHING LIBRARY With these patterns, we can find all matches for the ?TRMM routine within a product. In this example, M1, M2 and M3 are matrices, but only M3 is triangular: >>> expr = Times(Transpose(M3), M1, M3, M2) >>> for i, pattern in enumerate(trmm_patterns): ... for substitution in match(expr, pattern): ... print(’{} with {}’.format(i, substitution)) 0 with {A -> M3, B -> M2, t -> (), h -> ((M3)^T, M1)} 1 with {A -> M3, B -> M1, t -> (M3, M2), h -> ()} 2 with {A -> M3, B -> M1, t -> (M2), h -> ((M3)^T)} 3 Sequence Variables in Commutative Functions The distribution of n subjects subterms onto m sequence variables within a commutative function symbol can yield up to mn distinct solutions. Enumerating all of the solutions is accomplished by generating and solving several linear Diophantine equations. As an example, lets assume we want to match f(a, b, b, b) with f(x___, y__, y__) where f is commutative. This means that the possible distributions are given by the non-negative integer solutions of these equations: As can be seen in the output, a total of three matches are found. 1 = xa + 2ya 3 = xb + 2yb Design Considerations There are plenty of implementations of syntactic matching and the algorithms are well known. Implementing pattern matching for MatchPy poses some challenges such as associativity and commutativity. Associativity/Sequence variables Associativity enables arbitrary grouping of arguments for matching: For example, 1 + a + b matches 1 + x_ with {x 7→ a + b} because we can group the arguments as 1 + (a + b). Basically, when regular variables are arguments of an associative function, they behave like sequence variables. Both can result in multiple distinct matches for a single pattern. In contrast, for syntactic patterns there is always at most one match. This means that the matching algorithm needs to be non-deterministic to explore all potential matches for associative terms or terms with sequence variables. We employ backtracking with the help of Python generators to enable this. Associative matching is NPcomplete [BKN87]. Commutativity Matching commutative terms is difficult because matches need to be found independent of the argument order. Commutative matching has been shown to be NP-complete, too [BKN87]. It is possible to find all matches by matching all permutations of the subjects arguments against all permutations of the pattern arguments. However, with this naive approach, a total of n!m! combinations have to be matched where n is the number of subject arguments and m the number of pattern arguments. It is likely that most of these combinations do not match or yield redundant matches. Instead, we interpret the arguments as a multiset, i.e. an orderless collection that allows repetition of elements. Also, we use the following order for matching the subterms of a commutative term: 1. Constant arguments 2. Matched variables, i.e. variables that already have a value assigned in the current substitution 3. Non-variable arguments 4. Repeat step 2 5. Regular variables 6. Sequence variables Each of those steps reduces the search space for successive steps. This also means that if one step finds no match, the remaining steps do not have to be performed. Note that steps 3, 5 and 6 can yield multiple matches and backtracking is employed to check every combination. Since step 6 is the most involved, it is described in more detail in the next section. xa determines how many times a is included in the substitution for x. Because y__ requires at least one term, we have the additional constraint ya + yb ≥ 1. The only possible solution xa = xb = yb = 1 ∧ ya = 0 corresponds to the match substitution {x 7→ (a, b), y 7→ (b)}. Extensive research has been done on solving linear Diophantine equations and linear Diophantine equation systems [Wei60], [Bon67], [Lam88], [CF89], [AHL00]. In our case the equations are actually independent expect for the additional constraints for plus variables. Also, the non-negative solutions can be found more easily. We use an adaptation of the algorithm used in SymPy which recursively reduces any linear Diophantine equation to equations of the form ax + by = d. Those can be solved efficiently with the Extended Euclidian algorithm [MVO96]. Then the solutions for those can be combined into a solution for the original equation. All coefficients in those equations are likely very small since they correspond to the multiplicity of sequence variables. Similarly, the number of variables in the equations is usually small as they map to sequence variables. The constant is the multiplicity of a subject term and hence also usually small. Overall, the number of distinct equations that are solved is small and the solutions are cached. This reduces the impact of the sequence variables on the overall run time. Optimizations Since most applications for pattern matching repeatedly match a fixed set of patterns against multiple subjects, we implemented many-to-one matching for MatchPy. The goal of many-to-one matching is to utilize similarities between patterns to match them more efficiently. In this section, we give a brief overview of the many-to-one matching algorithm used by MatchPy. Full details can be found in the master thesis [Kre17b]. Many-to-one Matching MatchPy includes two additional algorithms for matching: ManyToOneMatcher and DiscriminationNet. Both enable matching multiple patterns against a single subject much faster than matching each pattern individually using match. The latter can only be used for syntactic patterns and implements a state-of-the-art deterministic discrimination net. A discrimination net is a data structure similar to a decision tree or a finite automaton [Chr93], [Grä91], [NWE97]. The ManyToOneMatcher utilizes a generalized form of non-deterministic discrimination nets that support sequence variables and associative function symbols. Furthermore, as elaborated in the next section, it can also match commutative terms. In Figure 1, an example for a non-deterministic discrimination net is shown. It contains three patterns that match Python lists: 4 PROC. OF THE 15th PYTHON IN SCIENCE CONF. (SCIPY 2017) ] 0 [y , 0] y Patterns Subjects Patterns Subjects 1 x a 1 1 x a 1 2 x a 2 2 x a 2 [ 1 ] x [1, x ] ] [1] Fig. 2: Example for Order in Bipartite Graph. Fig. 1: Example Discrimination Net. One matches the list that consists of a single 1, the second one matches a list with exactly two elements where the last element is 0, and the third pattern matches any list where the first element is 1. Note, that these patterns can also match nested lists, e.g. the second pattern would also match [[2, 1], 0]. Matching starts at the root and proceeds along the transitions. Simultaneously, the subject is traversed in preorder and each symbol is checked against the transitions. Only transitions matching the current subterm can be used. Once a final state is reached, its label gives a list of matching patterns. For non-deterministic discrimination nets, all possibilities need to be explored via backtracking. The discrimination net allows to reduce the matching costs, because common parts of different pattern only need to be matched once. For non-matching transitions, their whole subtree is pruned and all the patterns are excluded at once, further reducing the match cost. In Figure 1, for the subject [1, 0], there are two paths and therefore two matching patterns: [y_, 0] matches with {y 7→ 1} and [1, x___] matches with {x 7→ 0}. Both the y-transition and the 1-transition can be used in the second state to match a 1. Compared to existing discrimination net variants, we added transitions for the end of a compound term to support variadic functions. Furthermore, we added support for both associative function symbols and sequence variables. Finally, our discrimination net supports transitions restricted to symbol classes (i.e. Symbol subclasses) in addition to the ones that match just a specific symbol. We decided to use a non-deterministic discrimination net instead of a deterministic one, since the number of states of the later would grow exponentially with the number of patterns. While the DiscriminationNet also has support for sequence variables, in practice the net became to large to use with just a dozen patterns. Commutative Many-to-one Matching Many-to-one matching for commutative terms is more involved. We use a nested CommutativeMatcher which in turn uses another ManyToOneMatcher to match the subterms. Our approach is similar to the one used by Bachmair and Kirchner in their respective works [BCR+ 95], [KM01]. We match all the subterms of the commutative function in the subject with a many-to-one matcher constructed from the subpatterns of the commutative function in the pattern (except for sequence variables, which are handled separately). The resulting matches form a bipartite graph, where one set of nodes consists of the subject subterms and the other contains all the pattern subterms. Two nodes are connected by an edge iff the pattern matches the subject. Such an edge is also labeled with the match substitution(s). Finding an overall match is then accomplished by finding a maximum matching in this graph. However, for the matching to be valid, all the substitutions on its edges must be compatible, i.e. they cannot have contradicting replacements for the same variable. We use the Hopcroft-Karp algorithm [HK73] to find an initial maximum matching. However, since we are also interested in all matches and the initial matching might have incompatible substitutions, we use the algorithm described by Uno, Fukuda and Matsui [FM94], [Uno97] to enumerate all maximum matchings. To avoid yielding redundant matches, we extended the bipartite graph by introducing a total order over its two node sets. This enables determining whether the edges of a matching maintain the order induced by the subjects or whether some of the edges "cross". Formally, for all edge pairs (p, s), (p0 , s0 ) ∈ M we require (s ≡ s0 ∧ p > p0 ) =⇒ s > s0 to hold where M is the matching, s, s0 are subjects, and p, p0 are patterns. An example of this is given in Figure 2. The order of the nodes is indicated by the numbers next to them. The only two maximum matchings for this particular match graph are displayed. In the left matching, the edges with the same subject cross and hence this matching is discarded. The other matching is used because it maintains the order. This ensures that only unique matches are yielded. Once a matching for the subpatterns is obtained, the remaining subject arguments are distributed to sequence variables in the same way as for one-to-one matching. Experiments To evaluate the performance of MatchPy, we conducted experiments on an Intel Core i5-2500K 3.3 GHz CPU with 8GB of RAM. Our focus is on relative performance of one-to-one and many-to-one matching rather than the absolute performance. Linear Algebra The operations for the linear algebra problem are shown in Table 1. The patterns all match BLAS kernels similar to the example pattern which was previously described. The pattern set consists of 199 such patterns. Out of those, 61 have an addition as outermost operation, 135 are patterns for products, and 3 are patterns for single matrices. A lot of these patterns only differ in terms of constraints, e.g. there are ten distinct patterns matching A × B with different constraints on the two matrices. By removing the sequence variables from the product patterns, these pattern can be made syntactic when ignoring the multiplication’s associativity. In the following, we refer to the set of patterns with sequence variables as LinAlg and the set of syntactic product patterns as Syntactic. The subjects were randomly generated such that matrices had random properties and each factor could randomly be transposed/inverted. The number of factors was chosen according to a normal distribution with µ = 5. The total subject set consisted of 70 random products and 30 random sums. Out of the pattern set, random subsets were used to examine the influence of the pattern set size on the matching time. Across multiple subsets and repetitions per subject, the mean match and setup times were measured. Matching was performed both with the match MATCHPY: A PATTERN MATCHING LIBRARY 5 Setup Time power Match Time 60 Match Time [ms] Setup Time [ms] 10 40 20 match MTOM trailer 5 arglist atom 0 0 50 100 50 150 Number of Patterns 100 150 testlist gexp Number of Patterns Fig. 3: Timing Results for LinAlg. Speedup Fig. 6: AST of the isinstance pattern. Break Even 8 Number of Subjects 20 Speedup isinstance ( any , ( any . . . any ) ) 15 10 5 0 50 100 6 4 2 0 150 reaching a speedup of up to 60. However, because it also has the highest setup time, it only outperforms the many-to-one matcher after about 100 subjects for larger pattern set sizes. In practice, the discrimination net is likely the best choice for syntactic patterns, as long as the discrimination net does not grow to large. In the worst case, the size of the discrimination net can grow exponentially in the number of patterns. 50 Number of Patterns 100 150 Number of Patterns Fig. 4: Comparison for LinAlg. Abstract Syntax Trees function and the ManyToOneMatcher (MTOM). The results are displayed in Figure 3. As expected, both setup and match times grow with the pattern set size. The growth of the many-to-one match time is much slower than the one for one-to-one matching. This is also expected since the simultaneous matching is more efficient. However, the growth of setup time for the many-to-one matcher beckons the question whether the speedup of the many-to-one matching is worth it. Figure 4 depicts both the speedup and the break even point for many-to-one matching for LinAlg. The first graph indicates that the speedup of many-to-one matching increases with larger pattern sets. But in order to profit from that speedup, the setup cost of many-to-one matching must be amortized. Therefore, the second graph shows the break even point for many-to-one matching in terms of number of subjects. If for a given number of patterns and subjects the corresponding point is above the line, then many-toone matching is overall faster. In this example, when matching more than eight times, many-to-one matching is overall always faster than one-to-one matching. For the syntactic product patterns we compared the match function, the ManyToOneMatcher (MTOM) and the DiscriminationNet (DN). Again, randomly generated subjects were used. The resulting speedups and break even points are displayed in Figure 5. In this case, the discrimination net is the fastest overall Speedup Number of Subjects Speedup 60 Break Even MTOM DN 40 20 0 100 MTOM DN 50 0 20 40 60 80 100 Number of Patterns 120 20 40 60 80 100 Number of Patterns Fig. 5: Comparison for Syntactic. 120 Python includes a tool to convert code from Python 2 to Python 3. It is part of the standard library package lib2to3 which has a collection of "fixers" that each convert one of the incompatible cases. To find matching parts of the code, those fixers use pattern matching on the abstract syntax tree (AST). Such an AST can be represented in the MatchPy data structures. We converted some of the patterns used by lib2to3 both to demonstrate the generality of MatchPy and to evaluate the performance of manyto-one matching. Because the fixers are applied one after another and can modify the AST after each match, it would be difficult to use many-to-one matching for lib2to3 in practice. The following is an example of such a pattern: power< ’isinstance’ trailer< ’(’ arglist< any ’,’ atom< ’(’ args=testlist_gexp< any+ > ’)’ > > ’)’ > > It matches an isinstance expression with a tuple as second argument. Its tree structure is illustrated in Figure 6. The corresponding fixer cleans up duplications generated by previous fixers. For example isinstance(x, (int, long)) would be converted by another fixer into isinstance(x, (int, int)), which in turn is then simplified to isinstance(x, int) by this fixer. Out of the original 46 patterns, 36 could be converted to MatchPy patterns. Some patterns could not be converted, because they contain features that MatchPy does not support yet. The features include negated subpatterns (e.g. not atom<’(’ [any] ’)’>) and subpatterns that allow an aritrary number of repetitions (e.g. any (’,’ any)+). Furthermore, some of the AST patterns contain alternative or optional subpatterns, e.g. power<’input’ args=trailer<’(’ [any] ’)’>>. These features are also not directly supported by MatchPy, but they can be replicated by using multiple patterns. For those lib2to3 patterns, all combinations of the alternatives were generated and added as invividual patterns. This resulted in about 1200 patterns for the many-to-one matcher that completely cover the original 36 patterns. 6 For the experiments, we used a file that combines the examples from the unittests of lib2to3 with about 900 non-empty lines. We compared the set of 36 patterns with the original matcher and the 1200 patterns with the many-to-one matcher. A total of about 560 matches are found. Overall, on average, our manyto-one matcher takes 0.7 seconds to find all matches, while the matcher from lib2to3 takes 1.8 seconds. This yields a speedup of approximately 2.5. However, the construction of the many-toone matcher takes 1.4 seconds on average. However, this setup cost will be amortized by the faster matching for sufficiently large ASTs. The setup time can also mostly be eliminated by saving the many-to-one matcher to disk and loading it once required. Compared to the one-to-one matching in MatchPy, the manyto-one matching achieves a speedup of about 60. This is due to the fact that for any given subject less than 1% of patterns match. By taking into account the setup time of the many-to-one matcher, the break even point for it is at about 200 subjects. Conclusions We have presented MatchPy, a pattern matching library for Python with support for sequence variables and associative/commutative functions. This library includes algorithms and data structures for both one-to-one and many-to-one matching. Because nonsyntactic pattern matching is NP-hard, in the worst case the pattern matching times grows exponentially with the length of the pattern. Nonetheless, our experiments on real world examples indicate that many-to-one matching can give a significant speedup over one-to-one matching. However, the employed discrimination nets come with a one-time construction cost which needs to be amortized to benefit from their speedup. In our experiments, the break even point for many-to-one matching was always reached well within the typical number of subjects for the respective application. Therefore, many-to-one matching is likely to result in a compelling speedup in practice. For syntactic patterns, we also compared the syntactic discrimination net with the many-to-one matcher. As expected, discrimination nets are faster at matching, but also have a significantly higher setup time. Furthermore, the number of states can grow exponentially with the number of patterns, making them unsuitable for some pattern sets. Overall, if applicable, discrimination nets offer better performance than a many-to-one matcher. Which pattern matching algorithm is the fastest for a given application depends on many factors. Hence, it is not possible to give a general recommendation. Yet, the more subjects are matched against the same pattern set, the more likely it is that many-to-one outperforms one-to-one matching. In the experiments, a higher number of patterns lead to an increase of the speedup of manyto-one matching. In terms of the size of the many-to-one matcher, the growth of the net was sublinear in our experiments and still feasible for large pattern sets. The efficiency of using many-toone matching also heavily depends on the actual pattern set, i.e. the degree of similarity and overlap between the patterns. PROC. OF THE 15th PYTHON IN SCIENCE CONF. (SCIPY 2017) Additional pattern features In the future, we plan to implement similar functionality to the Repeated, Sequence, and Alternatives functions from Mathematica. These provide another level of expressive power which cannot be fully replicated with the current feature set of MatchPy. Another useful feature are context variables as described by Kutsia [Kut06]. They allow matching subterms at arbitrary depths which is especially useful for structures like XML. With context variables, MatchPy’s pattern matching would be as powerful as XPath [RDS17] or CSS selectors [RJE17] for such structures. Similarly, function variables which can match a function symbol would also be useful for those applications. Integration Currently, in order to use MatchPy, existing data structures must be adapted to provide their children via an iterator. Where that is not possible, for example because the data structures are provided by a third party library, translation functions need to be applied. Also, some native data structures such as dicts are currently not supported directly. Therefore, it would be useful, to have a better way of using existing data structures with MatchPy. In particular, easy integration with SymPy is an important goal, since it is a popular tool for working with symbolic mathematics. SymPy already implements a form of pattern matching which is less powerful than MatchPy. It lacks support for sequence variables, symbol wildcards and constraints. Each constant symbol in SymPy can have properties that allow it to be commutative or non-commutative. One benefit of this approach is easier modeling of linear algebra multiplication, where matrices and vectors do not commute, but scalars do. Better integration of MatchPy with SymPy would provide the users of SymPy with more powerful pattern matching tools. However, Matchpy would require selective commutativity to be fully compatible with SymPy. Also, SymPy supports older Python versions, while MatchPy requires Python 3.6. Performance If pattern matching is a major part of an application, its running time can significantly impact the overall speed. Reimplementing parts of MatchPy as a C module would likely result in a substantial speedup. Alternatively, adapting part of the code to Cython could be another option to increase the speed [BBS09], [WLØ09]. Furthermore, generating source code for a pattern set similar to parser generators for formal grammars could improve matching performance. While code generation for syntactic pattern matching has been the subject of various works [Aug85], [FM01], [Mar08], [MRV03], its application with the extended feature set of MatchPy is another potential area of future research. Also, additonal research on the viability of pattern matching with increasingly complex and large subjects or patterns is desirable. Parallelizing many-to-one matching is also a possibility to increase the overall speed which is worth exploring. Functional pattern matching Future Work We plan on extending MatchPy with more powerful pattern matching features to make it useful for an even wider range of applications. The greatest challenge with additional features is likely to implement them for many-to-one matching. In the following, we discuss some possibilities for extending the library. Since Python does not have pattern matching as a language feature, MatchPy could be extended to provide a syntax similar to other functional programming languages. However, without a switch statement as part of the language, there is a limit to the syntax of this pattern expression. The following is an example of what such a syntax could look like: MATCHPY: A PATTERN MATCHING LIBRARY with match(f(a, b)): if case(f(x_, y_)): print("x={}, y={}".format(x, y))) elif case(f(z_)): .... There are already several libraries for Python which implement such a functionality for syntactic patterns and native data structures (e.g. MacroPy [Hao14], patterns [Sch14] or PyPatt [Jen15]). However, the usefulness of this feature needs further evaluation. R EFERENCES [AHL00] Karen Aardal, Cor A. J. Hurkens, and Arjen K. Lenstra. Solving a system of linear diophantine equations with lower and upper bounds on the variables. Mathematics of Operations Research, 25(3):427–442, August 2000. doi:10.1287/moor.25.3. 427.12219. [Aug85] Lennart Augustsson. Compiling pattern matching. In Proc. of a Conference on Functional Programming Languages and Computer Architecture, pages 368–381, New York, NY, USA, 1985. Springer-Verlag New York, Inc. [BBS09] Stefan Behnel, Robert W. Bradshaw, and Dag Sverre Seljebotn. Cython tutorial. In Gaël Varoquaux, Stéfan van der Walt, and Jarrod Millman, editors, Proceedings of the 8th Python in Science Conference, pages 4–14, Pasadena, CA USA, 2009. [BCR93] Leo Bachmair, Ta Chen, and I. V. Ramakrishnan. Associativecommutative Discrimination Nets, pages 61–74. 1993. doi: 10.1007/3-540-56610-4_56. [BCR+ 95] Leo Bachmair, Ta Chen, I. V. Ramakrishnan, Siva Anantharaman, and Jacques Chabin. Experiments with associative-commutative discrimination nets. In Proceedings of the 14th International Joint Conference on Artificial Intelligence - Volume 1, IJCAI’95, pages 348–354. Morgan Kaufmann, 1995. [BKN87] Dan Benanav, Deepak Kapur, and Paliath Narendran. Complexity of matching problems. Journal of Symbolic Computation, 3(1):203–216, February 1987. doi:10.1016/S07477171(87)80027-5. [BN98] Franz Baader and Tobias Nipkow. Term Rewriting and All That. Cambridge University Press, New York, NY, USA, 1998. [Bon67] James Bond. Calculating the general solution of a linear diophantine equation. The American Mathematical Monthly, 74(8):955, October 1967. doi:10.2307/2315274. [BW84] Alan Bundy and Lincoln Wallen. Discrimination Net, pages 31– 31. 1984. doi:10.1007/978-3-642-96868-6_59. [CF89] Michael Clausen and Albrecht Fortenbacher. Efficient solution of linear diophantine equations. Journal of Symbolic Computation, 8(1-2):201–216, July 1989. doi:10.1016/s07477171(89)80025-2. [Chr93] Jim Christian. Flatterms, discrimination nets, and fast term rewriting. Journal of Automated Reasoning, 10(1):95–113, 1993. doi:10.1007/BF00881866. [DCHD90] J. J. Dongarra, Jeremy Du Croz, Sven Hammarling, and I. S. Duff. A set of level 3 basic linear algebra subprograms. ACM Transactions on Mathematical Software, 16(1):1–17, March 1990. doi:10.1145/77626.79170. [DCHH88] Jack J. Dongarra, Jeremy Du Croz, Sven Hammarling, and Richard J. Hanson. An extended set of FORTRAN basic linear algebra subprograms. ACM Transactions on Mathematical Software, 14(1):1–17, March 1988. doi:10.1145/42288. 42291. [Eke95] S. M. Eker. Associative-commutative matching via bipartite graph matching. The Computer Journal, 38(5):381–399, May 1995. doi:10.1093/comjnl/38.5.381. [FM94] K. Fukuda and T. Matsui. Finding all the perfect matchings in bipartite graphs. Applied Mathematics Letters, 7(1):15–18, January 1994. doi:10.1016/0893-9659(94)90045-0. [FM01] Fabrice Le Fessant and Luc Maranget. Optimizing pattern matching. In Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming - ICFP ’01. Association for Computing Machinery (ACM), 2001. doi: 10.1145/507635.507641. [Grä91] Albert Gräf. Left-to-right tree pattern matching. In Proceedings of the 4th International Conference on Rewriting Techniques and Applications, RTA-91, pages 323–334, New York, NY, USA, 1991. Springer-Verlag New York, Inc. 7 [Hao14] Li Haoyi. Macropy. https://github.com/lihaoyi/macropy, 2014. URL: https://github.com/lihaoyi/macropy. [HK73] John E. Hopcroft and Richard M. Karp. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, 2(4):225–231, December 1973. doi:10.1137/ 0202019. [Jen15] Grant Jenks. Pypatt. https://pypi.python.org/pypi/pypatt, 2015. URL: https://pypi.python.org/pypi/pypatt. [KL91] E. Kounalis and D. Lugiez. Compilation of pattern matching with associative-commutative functions. In TAPSOFT ’91, pages 57– 73. Springer Nature, 1991. doi:10.1007/3-540-539824_4. [KM01] Hélène Kirchner and Pierre-Etienne Moreau. Promoting rewriting to a programming language: A compiler for non-deterministic rewrite programs in associative-commutative theories. International Journal of Foundations of Computer Science, 11(2):207– 251, March 2001. doi:10.1142/S0129054101000412. [Kre17a] Manuel Krebber. Matchpy documentation. http://matchpy.readthedocs.io/, 06 2017. URL: http://matchpy.readthedocs.io/. [Kre17b] Manuel Krebber. Non-linear associative-commutative many-toone pattern matching with sequence variables. Master’s thesis, 2017. arXiv:1705.00907. [Kut06] Temur Kutsia. Context sequence matching for XML. Electronic Notes in Theoretical Computer Science, 157(2):47–65, May 2006. doi:10.1016/j.entcs.2005.12.045. [Lam88] J. L. Lambert. Finding a partial solution to a linear system of equations in positive integers. Computers & Mathematics with Applications, 15(3):209–212, 1988. doi:10.1016/08981221(88)90172-1. [LHKK79] C. L. Lawson, R. J. Hanson, D. R. Kincaid, and F. T. Krogh. Basic linear algebra subprograms for fortran usage. ACM Transactions on Mathematical Software, 5(3):308–323, September 1979. doi: 10.1145/355841.355847. [LM94] D. Lugiez and J. L. Moysset. Tree automata help one to solve equational formulae in AC-theories. Journal of Symbolic Computation, 18(4):297–318, October 1994. doi:10.1006/jsco. 1994.1049. [Mar08] Luc Maranget. Compiling pattern matching to good decision trees. In Proceedings of the 2008 ACM SIGPLAN Workshop on ML - ML ’08. Association for Computing Machinery (ACM), 2008. doi:10.1145/1411304.1411311. [MRV03] Pierre-Etienne Moreau, Christophe Ringeissen, and Marian Vittek. A Pattern Matching Compiler for Multiple Target Languages, pages 61–76. 2003. doi:10.1007/3-540-36579-6_5. [MSP+ 17] Aaron Meurer, Christopher P. Smith, Mateusz Paprocki, Ondřej Čertík, Sergey B. Kirpichev, Matthew Rocklin, AMiT Kumar, Sergiu Ivanov, Jason K. Moore, Sartaj Singh, Thilina Rathnayake, Sean Vig, Brian E. Granger, Richard P. Muller, Francesco Bonazzi, Harsh Gupta, Shivam Vats, Fredrik Johansson, Fabian Pedregosa, Matthew J. Curry, Andy R. Terrel, Štěpán Roučka, Ashutosh Saboo, Isuru Fernando, Sumith Kulal, Robert Cimrman, and Anthony Scopatz. Sympy: Symbolic computing in python. Peerj Computer Science, 3:e103, January 2017. doi: 10.7717/peerj-cs.103. [MVO96] Alfred J. Menezes, Scott A. Vanstone, and Paul C. Van Oorschot. Handbook of Applied Cryptography. CRC Press, Inc., Boca Raton, FL, USA, 1st edition, 1996. [NWE97] Nadia Nedjah, Colin D. Walter, and Stephen E. Eldridge. Optimal Left-to-right Pattern-matching Automata, pages 273–286. 1997. doi:10.1007/BFb0027016. [Pö16] Jan Pöschko. Mathics. http://mathics.github.io/, October 2016. URL: http://mathics.github.io/. [RDS17] Jonathan Robie, Michael Dyck, and Josh Spiegel. XML path language (XPath) 3.1. W3C recommendation, W3C, March 2017. [RJE17] Florian Rivoal, Tab Atkins Jr., and Elika Etemad. CSS snapshot 2017. W3C note, W3C, January 2017. [Sch14] Alexander Schepanovski. patterns. https://github.com/Suor/patterns, 2014. URL: https: //github.com/Suor/patterns. [Uno97] Takeaki Uno. Algorithms for enumerating all perfect, maximum and maximal matchings in bipartite graphs. In Algorithms and Computation, pages 92–101. Springer Nature, 1997. doi:10. 1007/3-540-63890-3_11. [Wei60] Robert Weinstock. Greatest common divisor of several integers and an associated linear diophantine equation. The Amer- 8 [WLØ09] [WR16] PROC. OF THE 15th PYTHON IN SCIENCE CONF. (SCIPY 2017) ican Mathematical Monthly, 67(7):664, August 1960. doi: 10.2307/2310105. Ilmar M. Wilbers, Hans Petter Langtangen, and Åsmund Ødegård. Using cython to speed up numerical python programs. In Proceedings of Mekit’09, pages 495–512, 2009. Inc. Wolfram Research. Mathematica, 2016. URL: https://www.wolfram.com.
6cs.PL
The One Hundred Layers Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation arXiv:1611.09326v3 [cs.CV] 31 Oct 2017 Simon Jégou1 Michal Drozdzal2,3 David Vazquez1,4 Adriana Romero1 Yoshua Bengio1 1 Montreal Institute for Learning Algorithms 2 École Polytechnique de Montréal 3 Imagia Inc., Montréal, 4 Computer Vision Center, Barcelona [email protected], [email protected], [email protected], [email protected], [email protected] Abstract State-of-the-art approaches for semantic image segmentation are built on Convolutional Neural Networks (CNNs). The typical segmentation architecture is composed of (a) a downsampling path responsible for extracting coarse semantic features, followed by (b) an upsampling path trained to recover the input image resolution at the output of the model and, optionally, (c) a post-processing module (e.g. Conditional Random Fields) to refine the model predictions. Recently, a new CNN architecture, Densely Connected Convolutional Networks (DenseNets), has shown excellent results on image classification tasks. The idea of DenseNets is based on the observation that if each layer is directly connected to every other layer in a feed-forward fashion then the network will be more accurate and easier to train. In this paper, we extend DenseNets to deal with the problem of semantic segmentation. We achieve state-of-the-art results on urban scene benchmark datasets such as CamVid and Gatech, without any further post-processing module nor pretraining. Moreover, due to smart construction of the model, our approach has much less parameters than currently published best entries for these datasets. Code to reproduce the experiments is publicly available here : https://github.com/SimJeg/FC-DenseNet Figure 1. Diagram of our architecture for semantic segmentation. Our architecture is built from dense blocks. The diagram is composed of a downsampling path with 2 Transitions Down (TD) and an upsampling path with 2 Transitions Up (TU). A circle represents concatenation and arrows represent connectivity patterns in the network. Gray horizontal arrows represent skip connections, the feature maps from the downsampling path are concatenated with the corresponding feature maps in the upsampling path. Note that the connectivity pattern in the upsampling and the downsampling paths are different. In the downsampling path, the input to a dense block is concatenated with its output, leading to a linear growth of the number of feature maps, whereas in the upsampling path, it is not. 1. Introduction Convolutional Neural Networks (CNNs) are driving major advances in many computer vision tasks, such as image classification [29], object detection [25, 24] and semantic image segmentation [20]. The last few years have witnessed outstanding improvements on CNN-based models. Very deep architectures [29, 11, 31] have shown impressive results on standard benchmarks such as ImageNet [6] or MSCOCO [19]. State-of-the-art CNNs heavily reduce the input resolution through successive pooling layers and, 1 thus, are well suited for applications where a single prediction per input image is expected (e.g. image classification task). Fully Convolutional Networks (FCNs) [20, 27] were introduced in the literature as a natural extension of CNNs to tackle per pixel prediction problems such as semantic image segmentation. FCNs add upsampling layers to standard CNNs to recover the spatial resolution of the input at the output layer. As a consequence, FCNs can process images of arbitrary size. In order to compensate for the resolution loss induced by pooling layers, FCNs introduce skip connections between their downsampling and upsampling paths. Skip connections help the upsampling path recover fine-grained information from the downsampling layers. Among CNN architectures extended as FCNs for semantic segmentation purposes, Residual Networks (ResNets) [11] make an interesting case. ResNets are designed to ease the training of very deep networks (of hundreds of layers) by introducing a residual block that sums two signals: a non-linear transformation of the input and its identity mapping. The identity mapping is implemented by means of a shortcut connection. ResNets have been extended to work as FCNs [4, 8] yielding very good results in different segmentation benchmarks. ResNets incorporate additional paths to FCN (shortcut paths) and, thus, increase the number of connections within a segmentation network. This additional shortcut paths have been shown not only to improve the segmentation accuracy but also to help the network optimization process, resulting in faster convergence of the training [8]. Recently, a new CNN architecture, called DenseNet, was introduced in [13]. DenseNets are built from dense blocks and pooling operations, where each dense block is an iterative concatenation of previous feature maps. This architecture can be seen as an extension of ResNets [11], which performs iterative summation of previous feature maps. However, this small modification has some interesting implications: (1) parameter efficiency, DenseNets are more efficient in the parameter usage; (2) implicit deep supervision, DenseNets perform deep supervision thanks to short paths to all feature maps in the architecture (similar to Deeply Supervised Networks [18]); and (3) feature reuse, all layers can easily access their preceding layers making it easy to reuse the information from previously computed feature maps. The characteristics of DenseNets make them a very good fit for semantic segmentation as they naturally induce skip connections and multi-scale supervision. In this paper, we extend DenseNets to work as FCNs by adding an upsampling path to recover the full input resolution. Naively building an upsampling path would result in a computationally intractable number of feature maps with very high resolution prior to the softmax layer. This is because one would multiply the high resolution feature maps with a large number of input filters (from all the layers below), resulting in both very large amount of computation and number of parameters. In order to mitigate this effect, we only upsample the feature maps created by the preceding dense block. Doing so allows to have a number of dense blocks at each resolution of the upsampling path independent of the number of pooling layers. Moreover, given the network architecture, the upsampled dense block combines the information contained in the other dense blocks of the same resolution. The higher resolution information is passed by means of a standard skip connection between the downsampling and the upsampling paths. The details of the proposed architecture are shown in Figure 1. We evaluate our model on two challenging benchmarks for urban scene understanding, Camvid [2] and Gatech [22], and confirm the potential of DenseNets for semantic segmentation by improving the state-of-the-art. Thus, the contributions of the paper can be summarized as follows: • We carefully extend the DenseNet architecture [13] to fully convolutional networks for semantic segmentation, while mitigating the feature map explosion. • We highlight that the proposed upsampling path, built from dense blocks, performs better than upsampling path with more standard operations, such as the ones in [27]. • We show that such a network can outperform current state-of-the-art results on standard benchmarks for urban scene understanding without neither using pretrained parameters nor any further post-processing. 2. Related Work Recent advances in semantic segmentation have been devoted to improve architectural designs by (1) improving the upsampling path and increasing the connectivity within FCNs [27, 1, 21, 8]; (2) introducing modules to account for broader context understanding [36, 5, 37]; and/or (3) endowing FCN architectures with the ability to provide structured outputs [16, 5, 38]. First, different alternatives have been proposed in the literature to address the resolution recovery in FCN’s upsampling path; from simple bilinear interpolation [10, 20, 1] to more sophisticated operators such as unpooling [1, 21] or transposed convolutions [20]. Skip connections from the downsampling to the upsampling path have also been adopted to allow for a finer information recovery [27]. More recently, [8] presented a thorough analysis on the combination of identity mapping [11] and long skip connections [27] for semantic segmentation. Second, approaches that introduce larger context to semantic segmentation networks include [10, 36, 5, 37]. In 3. Fully Convolutional DenseNets As mentioned in Section 1, FCNs are built from a downsampling path, an upsampling path and skip connections. Skip connections help the upsampling path recover spatially detailed information from the downsampling path, by reusing features maps. The goal of our model is to further exploit the feature reuse by extending the more sophisticated DenseNet architecture, while avoiding the feature explosion at the upsampling path of the network. In this section, we detail the proposed model for semantic segmentation. First, we review the recently proposed DenseNet architecture. Second, we introduce the construction of the novel upsampling path and discuss its advantages w.r.t. a naive DenseNet extension and more classical architectures. Finally, we wrap up with the details of the main architecture used in Section 4. 3.1. Review of DenseNets Figure 2. Diagram of a dense block of 4 layers. A first layer is applied to the input to create k feature maps, which are concatenated to the input. A second layer is then applied to create another k features maps, which are again concatenated to the previous feature maps. The operation is repeated 4 times. The output of the block is the concatenation of the outputs of the 4 layers, and thus contains 4 ∗ k feature maps [10], an unsupervised global image descriptor is computed added to the feature maps for each pixel. In [36], Recurrent Neural Networks (RNNs) are used to retrieve contextual information by sweeping the image horizontally and vertically in both directions. In [5], dilated convolutions are introduced as an alternative to late CNN pooling layers to capture larger context without reducing the image resolution. Following the same spirit, [37] propose to provide FCNs with a context module built as a stack of dilated convolutional layers to enlarge the field of view of the network. Third, Conditional Random Fields (CRF) have long been a popular choice to enforce structure consistency to segmentation outputs. More recently, fully connected CRFs [16] have been used to include structural properties of the output of FCNs [5]. Interestingly, in [38], RNN have been introduced to approximate mean-field iterations of CRF optimization, allowing for an end-to-end training of both the FCN and the RNN. Finally, it is worth noting that current state-of-the-art FCN architectures for semantic segmentation often rely on pre-trained models (e.g. VGG [29] or ResNet101 [11]) to improve their segmentation results [20, 1, 4]. Let x` be the output of the `th layer. In a standard CNN, x` is computed by applying a non-linear transformation H` to the output of the previous layer x`−1 x` = H` (x`−1 ), (1) where H is commonly defined as a convolution followed by a rectifier non-linearity (ReLU) and often dropout [30]. In order to ease the training of very deep networks, ResNets [11] introduce a residual block that sums the identity mapping of the input to the output of a layer. The resulting output x` becomes x` = H` (x`−1 ) + x`−1 , (2) allowing for the reuse of features and permitting the gradient to flow directly to earlier layers. In this case, H is defined as the repetition (2 or 3 times) of a block composed of Batch Normalization (BN) [14], followed by ReLU and a convolution. Pushing this idea further, DenseNets [13] design a more sophisticated connectivity pattern that iteratively concatenates all feature outputs in a feedforward fashion. Thus, the output of the `th layer is defined as x` = H` ([x`−1 , x`−2 , ..., x0 ]), (3) where [ ... ] represents the concatenation operation. In this case, H is defined as BN, followed by ReLU, a convolution and dropout. Such connectivity pattern strongly encourages the reuse of features and makes all layers in the architecture receive direct supervision signal. The output dimension of each layer ` has k feature maps where k, hereafter referred as to growth rate parameter, is typically set to a small value (e.g. k = 12). Thus, the number of feature maps in DenseNets grows linearly with the depth (e.g. after ` layers, the input [x`−1 , x`−2 , ..., x0 ] will have ` × k feature maps). A transition down is introduced to reduce the spatial dimensionality of the feature maps. Such transformation is composed of a 1×1 convolution (which conserves the number of feature maps) followed by a 2 × 2 pooling operation. In the remainder of the article, we will call dense block the concatenation of the new feature maps created at a given resolution. Figure 2 shows an example of dense block construction. Starting from an input x0 (input image or output of a transition down) with m feature maps, the first layer of the block generates an output x1 of dimension k by applying H1 (x0 ). These k feature maps are then stacked to the previous m feature maps by concatenation ([x1 , x0 ]) and used as input to the second layer. The same operation is repeated n times, leading to a new dense block with n × k feature maps. 3.2. From DenseNets to Fully Convolutional DenseNets The DenseNet architecture described in Subsection 3.1 constitutes the downsampling path of our Fully Convolutional DenseNet (FC-DenseNet). Note that, in the downsampling path, the linear growth in the number of features is compensated by the reduction in spatial resolution of each feature map after the pooling operation. The last layer of the downsampling path is referred to as bottleneck. In order to recover the input spatial resolution, FCNs introduce an upsampling path composed of convolution, upsampling operations (transposed convolutions or unpooling operations) and skip connections. In FC-DenseNets, we substitute the convolution operation by a dense block and an upsampling operation referred to as transition up. Transition up modules consist of a transposed convolution that upsamples the previous feature maps. The upsampled feature maps are then concatenated to the ones coming from the skip connection to form the input of a new dense block. Since the upsampling path increases the feature maps spatial resolution, the linear growth in the number of features would be too memory demanding, especially for the full resolution features in the pre-softmax layer. In order to overcome this limitation, the input of a dense block is not concatenated with its output. Thus, the transposed convolution is applied only to the feature maps obtained by the last dense block and not to all feature maps concatenated so far. The last dense block summarizes the information contained in all the previous dense blocks at the same resolution. Note that some information from earlier dense blocks is lost in the transition down due to the pooling operation. Nevertheless, this information is available in the downsampling path of the network and can be passed via skip connections. Hence, the dense blocks of the upsampling path are computed using all the available feature maps at a given resolution. Figure 1 illustrates this idea in detail. Therefore, our upsampling path approach allows us to build very deep FC-DenseNets without a feature map explosion. An alternative way of implementing the upsampling path would be to perform consecutive transposed convolutions and complement them with skip connections from the downsampling path in a U-Net [27] or FCN-like [20] fashion. This will be further discussed in Section 4 3.3. Semantic Segmentation Architecture In this subsection, we detail the main architecture, FCDenseNet103, used in Section 4. First, in Table 1, we define the dense block layer, transition down and transition up of the architecture. Dense block layers are composed of BN, followed by ReLU, a 3 × 3 same convolution (no resolution loss) and dropout with probability p = 0.2. The growth rate of the layer is set to k = 16. Transition down is composed of BN, followed by ReLU, a 1 × 1 convolution, dropout with p = 0.2 and a non-overlapping max pooling of size 2 × 2. Transition up is composed of a 3 × 3 transposed convolution with stride 2 to compensate for the pooling operation. Second, in Table 2, we summarize all Dense103 layers. This architecture is built from 103 convolutional layers : a first one on the input, 38 in the downsampling path, 15 in the bottleneck and 38 in the upsampling path. We use 5 Transition Down (TD), each one containing one extra convolution, and 5 Transition Up (TU), each one containing a transposed convolution. The final layer in the network is a 1 × 1 convolution followed by a softmax non-linearity to provide the per class distribution at each pixel. It is worth noting that, as discussed in Subsection 3.2, the proposed upsampling path properly mitigates the DenseNet feature map explosion, leading to reasonable pre-softmax feature map number of 256. Finally, the model is trained by minimizing the pixelwise cross-entropy loss. 4. Experiments We evaluate our method on two urban scene understanding datasets: CamVid [2], and Gatech [22]. We trained our models from scratch without using any extra-data nor postprocessing module. We report the results using the Intersection over Union (IoU) metric and the global accuracy (pixel-wise accuracy on the dataset). For a given class c, predictions (oi ) and targets (yi ), the IoU is defined by P (oi == c ∧ yi == c) , IoU (c) = Pi i (oi == c ∨ yi == c) (4) where ∧ is a logical and operation, while ∨ is a logical or operation. We compute IoU by summing over all the pixels i of the dataset. Layer Batch Normalization ReLU 3 × 3 Convolution Dropout p = 0.2 Transition Down (TD) Batch Normalization ReLU 1 × 1 Convolution Dropout p = 0.2 2 × 2 Max Pooling Transition Up (TU) 3 × 3 Transposed Convolution stride = 2 Table 1. Building blocks of fully convolutional DenseNets. From left to right: layer used in the model, Transition Down (TD) and Transition Up (TU). See text for details. 4.1. Architecture and training details We initialize our models using HeUniform [12] and train them with RMSprop [33], with an initial learning rate of 1e − 3 and an exponential decay of 0.995 after each epoch. All models are trained on data augmented with random crops and vertical flips. For all experiments, we finetune our models with full size images and learning rate of 1e − 4. We use validation set to earlystop the training and the finetuning. We monitor mean IoU or mean accuracy and use patience of 100 (50 during finetuning). We regularized our models with a weight decay of 1e−4 and a dropout rate of 0.2. For batch normalization, we use current batch statistics at training, validation and test time. Architecture Input, m = 3 3 × 3 Convolution, m = 48 DB (4 layers) + TD, m = 112 DB (5 layers) + TD, m = 192 DB (7 layers) + TD, m = 304 DB (10 layers) + TD, m = 464 DB (12 layers) + TD, m = 656 DB (15 layers), m = 896 TU + DB (12 layers), m = 1088 TU + DB (10 layers), m = 816 TU + DB (7 layers), m = 578 TU + DB (5 layers), m = 384 TU + DB (4 layers), m = 256 1 × 1 Convolution, m = c Softmax Table 2. Architecture details of FC-DenseNet103 model used in our experiments. This model is built from 103 convolutional layers. In the Table we use following notations: DB stands for Dense Block, TD stands for Transition Down, TU stands for Transition Up, BN stands for Batch Normalization and m corresponds to the total number of feature maps at the end of a block. c stands for the number of classes. 4.2. CamVid dataset CamVid1 [2] is a dataset of fully segmented videos for urban scene understanding. We used the split and image resolution from [1], which consists of 367 frames for training, 101 frames for validation and 233 frames for test. Each frame has a size 360 × 480 and its pixels are labeled with 11 semantic classes. Our models were trained with crops of 224 × 224 and batch size 3. At the end, the model is finetuned with full size images. In Table 3, we report our results for three networks with respectively (1) 56 layers (FC-DenseNet56), with 4 layers per dense block and a growth rate of 12; (2) 67 layers (FCDenseNet67) with 5 layers per dense block and a growth rate of 16; and (3) 103 layers (FC-DenseNet103) with a growth rate k = 16 (see Table 2 for details). We also trained an architecture using standard convolutions in the upsampling path instead of dense blocks (Classic Upsampling). In the latter architecture, we used 3 convolutions per resolution level with respectively 512, 256, 128, 128 and 64 filters, as in [27]. Results show clear superiority of the proposed upsampling path w.r.t. the classic one, consistently improving the IoU significantly for all classes. Particularly, we observe that unrepresented classes benefit notably from the FC-DenseNet architecture, namely sign, pedestrian, fence, cyclist experience a crucial boost in performance (ranging from 15% to 25%). As expected, when comparing FC-DenseNet56 or FCDenseNet67 to FC-DenseNet103, we see that the model benefits from having more depth as well as more parameters. When compared to other methods, we show that FCDenseNet architectures achieve state-of-the-art, improving upon models with 10 times more parameters. It is worth mentioning that our small model FC-DenseNet56 already outperforms popular architectures with at least 100 times more parameters. It is worth noting that images in CamVid correspond to video frames and, thus, the dataset contains temporal information. Some state-of-the-art methods such as [17] incorporate long range spatio-temporal regularization to the out1 http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/ put of a FCN to boost their performance. Our model is able to outperform such state-of-the-art model, without requiring any temporal smoothing. However, any post-processing temporal regularization is complementary to our approach and could bring additional improvements. Unlike most of the current state-of-the-art methods, FCDenseNets have not been pretrained on large datasets such as ImageNet [6] and could most likely benefit from such pretraining. More recently, it has been shown that deep networks can also boost their performance when pretrained on data other than natural images, such as video games [26, 28] or clipart [3], and this an interesting direction to explore. Figure 3 shows some qualitative segmentation results on the CamVid dataset. Qualitative results are well aligned with the quantitative ones, showing sharp segmentations that account for a lot of details. For example, trees, column poles, sidewalk and pedestrians appear very well sketched. Among common errors, we find that thin details found in trees can be confused with column poles (see fifth row), buses and trucks can be confused with buildings (fourth row), and shop signs can be confused with road signs (second row). 4.3. Gatech dataset Gatech2 [23] is a geometric scene understanding dataset, which consists of 63 videos for training/validation and 38 for testing. Each video has between 50 and 300 frames (with an average of 190). A pixel-wise segmentation map is provided for each frame. There are 8 classes in the dataset: sky, ground, buildings, porous (mainly trees), humans, cars, vertical mix and main mix. The dataset was originally built to learn 3D geometric structure of outdoor video scenes and the standard metric for this dataset is mean global accuracy. We used the FC-DenseNet103 model pretrained on CamVid, removed the softmax layer, and finetuned it for 10 epochs with crops of 224 × 224 and batch size 5. Given the high redundancy in Gatech frames, we used only one out of 10 frames to train the model and tested it on all full resolution test set frames. In Table 4, we report the obtained results. We compare the results to the recently proposed method for video segmentation of [34], which reports results of their architecture with 2D and 3D convolutions. Frame-based 2D convolutions do not have temporal information. As it can be seen in Table 4, our method gives an impressive improvement of 23.7% in global accuracy with respect to previously published state-of-the-art with 2D convolutions. Moreover, our model (trained with only 2D convolutions) also achieves a significant improvement over state-of-the-art models based on spatio-temporal 3D convolutions (3.4% improvement). 2 http://www.cc.gatech.edu/cpl/projects/videogeometriccontext/ 5. Discussion Our fully convolutional DenseNet implicitly inherits the advantages of DenseNets, namely: (1) parameter efficiency, as our network has substantially less parameters than other segmentation architectures published for the Camvid dataset; (2) implicit deep supervision, we tried including additional levels of supervision to different layers of our network without noticeable change in performance; and (3) feature reuse, as all layers can easily access their preceding layers not only due to the iterative concatenation of feature maps in a dense block but also thanks to skip connections that enforce connectivity between downsampling and upsampling path. Recent evidence suggest that ResNets behave like ensemble of relatively shallow networks [35]: ”Residual networks avoid the vanishing gradient problem by introducing short paths which can carry gradient throughout the extent of very deep networks”. It would be interesting to revisit this finding in the context of fully convolutional DenseNets. Due to iterative feature map concatenation in the dense block, the gradients are forced to be passed through networks of different depth (with different numbers of nonlinearities). Thus, thanks to the smart connectivity patterns, FC-DenseNets might represent an ensemble of variable depth networks. This particular ensemble behavior would be very interesting for semantic segmentation models, where the ensemble of different paths throughout the model would capture the multi-scale appearance of objects in urban scene. 6. Conclusion In this paper, we have extended DenseNets and made them fully convolutional to tackle the problem semantic image segmentation. The main idea behind DenseNets is captured in dense blocks that perform iterative concatenation of feature maps. We designed an upsampling path mitigating the linear growth of feature maps that would appear in a naive extension of DenseNets. The resulting network is very deep (from 56 to 103 layers) and has very few parameters, about 10 fold reduction w.r.t. state-of-the-art models. Moreover, it improves stateof-the-art performance on challenging urban scene understanding datasets (CamVid and Gatech), without neither additional post-processing, pretraining, nor including temporal information. Aknowledgements The authors would like to thank the developers of Theano [32] and Lasagne [7]. Special thanks to Frédéric Bastien for his work assessing the compilation issues. Thanks to Francesco Visin for his well designed dataloader [9], as well as Harm de Vries for his support 76.1 82.2 84.0 85.6 Classic Upsampling FC-DenseNet56 (k=12) FC-DenseNet67 (k=16) FC-DenseNet103 (k=16) 7 7 7 7 20 1.5 3.5 9.4 73.5 77.6 80.2 83.0 72.2 72.0 75.4 77.3 92.4 92.4 93.0 93.0 66.2 73.2 78.2 77.3 Global accuracy 88.7 89.0 89.0 91.3 Mean IoU 71.0 74.6 76.2 77.2 31.0 50.1 55.5 57.2 62.5 86.9 85.9 88.7 88.0 − 79.0 88.3 25.1 31.1 52.1 50.5 55.2 58.9 65.8 66.9 86.8 88.9 90.8 91.5 Cyclist 77.8 81.5 82.6 84.0 46.4 63.1 48.9 58.8 57.0 61.6 65.3 66.1 Sidewalk 58.5 Pole 87.0 Fence Car 52.0 Pedestrian Sky 68.7 Road Tree 29.5 29.5 252 32.3 134.5 37.3 140.8 140.8 Sign ! ! ! ! ! ! ! ! Building # parameters (M) Pretrained SegNet [1] Bayesian SegNet [15] DeconvNet [21] Visin et al. [36] FCN8 [20] DeepLab-LFOV [5] Dilation8 [37] Dilation8 + FSO [17] Model 13.4 25.3 17.9 16.0 60.5 24.8 32.7 42.3 46.9 49.9 86.2 n/a n/a n/a 91.2 92.2 92.2 92.5 41.7 48.4 56.3 59.1 24.4 27.2 35.8 37.6 19.9 14.3 23.4 16.9 72.7 75.4 75.3 76.0 26.9 31.8 40.9 43.9 90.0 92.8 94.7 94.5 37.7 37.9 58.4 59.6 22.7 26.2 30.7 37.1 30.8 32.6 38.4 37.8 69.6 79.9 81.9 82.2 Table 3. Results on CamVid dataset. Note that we trained our own pretrained FCN8 model Acc. Model 2D models (no time) 2D-V2V-from scratch [34] 55.7 FC-DenseNet103 79.4 3D models (incorporate time) 3D-V2V-from scratch [34] 66.7 3D-V2V-pretrained [34] 76.0 [6] [7] Table 4. Results on Gatech dataset [8] in network parallelization, and Tristan Sylvain. We acknowledge the support of the following agencies for research funding and computing support: Imagia Inc., Spanish projects TRA2014-57088-C2-1-R & 2014-SGR-1506, TECNIOspring-FP7-ACCI grant. [9] References [1] V. Badrinarayanan, A. Kendall, and R. Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. CoRR, abs/1511.00561, 2015. [2] G. J. Brostow, J. Shotton, J. Fauqueur, and R. Cipolla. Segmentation and recognition using structure from motion point clouds. In European Conference on Computer Vision (ECCV), 2008. [3] L. Castrejon, Y. Aytar, C. Vondrick, H. Pirsiavash, and A. Torralba. Learning aligned cross-modal representations from weakly aligned data. CoRR, abs/1607.07295, 2016. [4] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. CoRR, abs/1606.00915, 2016. [5] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Semantic image segmentation with deep con- [10] [11] [12] [13] [14] [15] [16] volutional nets and fully connected crfs. In International Conference of Learning Representations (ICLR), 2015. J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2009. S. Dieleman, J. Schlter, C. Raffel, E. Olson, and et al. Lasagne: First release., Aug. 2015. M. Drozdzal, E. Vorontsov, G. Chartrand, S. Kadoury, and C. Pal. The importance of skip connections in biomedical image segmentation. CoRR, abs/1608.04117, 2016. A. R. F. Visin. Dataset loaders: a python library to load and preprocess datasets. https://github.com/fvisin/ dataset_loaders, 2017. C. Gatta, A. Romero, and J. van de Weijer. Unrolling loopy top-down semantic feedback in convolutional deep networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) workshop, 2014. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. CoRR, abs/1502.01852, 2015. G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. CoRR, abs/1608.06993, 2016. S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. CoRR, abs/1502.03167, 2015. A. Kendall, V. Badrinarayanan, and R. Cipolla. Bayesian segnet: Model uncertainty in deep convolutional encoderdecoder architectures for scene understanding. CoRR, abs/1511.02680, 2015. P. Krähenbühl and V. Koltun. Efficient inference in fully connected crfs with gaussian edge potentials. In Advances in Neural Information Processing Systems (NIPS). 2011. Figure 3. Qualitative results on the CamVid test set. Pixels labeled in yellow are void class. Each row represents (from left to right): original image, original annotation (ground truth) and prediction of our model. [17] A. Kundu, V. Vineet, and V. Koltun. Feature space optimization for semantic video segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [18] C. Lee, S. Xie, P. W. Gallagher, Z. Zhang, and Z. Tu. Deeplysupervised nets. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. [19] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollr, and C. L. Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision (ECCV), 2014. [20] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. [21] H. Noh, S. Hong, and B. Han. Learning deconvolution network for semantic segmentation. arXiv preprint arXiv:1505.04366, 2015. [22] S. H. Raza, M. Grundmann, and I. Essa. Geometric context from video. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013. [23] S. H. Raza, M. Grundmann, and I. Essa. Geometric context from video. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013. [24] J. Redmon, S. K. Divvala, R. B. Girshick, and A. Farhadi. You only look once: Unified, real-time object detection. CoRR, abs/1506.02640, 2015. [25] S. Ren, K. He, R. B. Girshick, and J. Sun. Faster R-CNN: towards real-time object detection with region proposal networks. CoRR, abs/1506.01497, 2015. [26] S. R. Richter, V. Vineet, S. Roth, and V. Koltun. Playing for data: Ground truth from computer games. In European Conference on Computer Vision (ECCV), 2016. [27] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention (MICAI), 2015. [28] 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 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [29] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [30] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15:1929–1958, 2014. [31] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. E. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014. [32] Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv eprints, abs/1605.02688, May 2016. [33] T. Tieleman and G. Hinton. rmsprop adaptive learning. In COURSERA: Neural Networks for Machine Learning, 2012. [34] D. Tran, L. D. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Deep end2end voxel2voxel prediction. CoRR, abs/1511.06681, 2015. [35] A. Veit, M. J. Wilber, and S. J. Belongie. Residual networks are exponential ensembles of relatively shallow networks. CoRR, abs/1605.06431, 2016. [36] F. Visin, M. Ciccone, A. Romero, K. Kastner, K. Cho, Y. Bengio, M. Matteucci, and A. Courville. Reseg: A recurrent neural network-based model for semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) workshop, 2016. [37] F. Yu and V. Koltun. Multi-scale context aggregation by dilated convolutions. In International Conference of Learning Representations (ICLR), 2016. [38] S. Zheng, S. Jayasumana, B. Romera-Paredes, V. Vineet, Z. Su, D. Du, C. Huang, and P. Torr. Conditional random fields as recurrent neural networks. In International Conference on Computer Vision (ICCV), 2015.
7cs.IT
On the Fine-grained Complexity of One-Dimensional Dynamic Programming arXiv:1703.00941v1 [cs.CC] 2 Mar 2017 Marvin Künnemann Ramamohan Paturi Stefan Schneider University of California, San Diego March 6, 2017 Abstract In this paper, we investigate the complexity of one-dimensional dynamic programming, or more specifically, of the Least-Weight Subsequence (LWS) problem: Given a sequence of n data items together with weights for every pair of the items, the task is to determine a subsequence S minimizing the total weight of the pairs adjacent in S. A large number of natural problems can be formulated as LWS problems, yielding obvious Opn2 q-time solutions. In many interesting instances, the Opn2 q-many weights can be succinctly represented. Yet except for near-linear time algorithms for some specific special cases, little is known about when an LWS instantiation admits a subquadratic-time algorithm and when it does not. In particular, no lower bounds for LWS instantiations have been known before. In an attempt to remedy this situation, we provide a general approach to study the fine-grained complexity of succinct instantiations of the LWS problem. In particular, given an LWS instantiation we identify a highly parallel core problem that is subquadratically equivalent. This provides either an explanation for the apparent hardness of the problem or an avenue to find improved algorithms as the case may be. More specifically, we prove subquadratic equivalences between the following pairs (an LWS instantiation and the corresponding core problem) of problems: a low-rank version of LWS and minimum inner product, finding the longest chain of nested boxes and vector domination, and a coin change problem which is closely related to the knapsack problem and pmin, `qconvolution. Using these equivalences and known SETH-hardness results for some of the core problems, we deduce tight conditional lower bounds for the corresponding LWS instantiations. We also establish the pmin, `q-convolution-hardness of the knapsack problem. Furthermore, we revisit some of the LWS instantiations which are known to be solvable in near-linear time and explain their easiness in terms of the easiness of the corresponding core problems. 1 Introduction Dynamic programming (DP) is one of the most fundamental paradigms for designing algorithms and a standard topic in textbooks on algorithms. Scientists from various disciplines have developed DP formulations for basic problems encountered in their applications. However, it is not clear This research is supported by the Simons Foundation. This research is support ed by NSF grant CCF-1213151 from the Division of Computing and Communication Foundations. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. 1 whether the existing (often simple and straightforward) DP formulations are in fact optimal or nearly optimal. Our lack of understanding of the optimality of the DP formulations is particularly unsatisfactory since many of these problems are computational primitives. Interestingly, there have been recent developments regarding the optimality of standard DP formulations for some specific problems, namely, conditional lower bounds assuming the Strong Exponential Time Hypothesis (SETH) [27]. The longest common subsequence (LCS) problem is one such problem for which almost tight conditional lower bounds have been obtained recently. The LCS problem is defined as follows: Given two strings x and y of length at most n, compute the length of the longest string z that is a subsequence of both x and y. The standard DP formulation for the LCS problem involves computing a two-dimensional table requiring Opn2 q steps. This algorithm is only slower than the fastest known algorithm due to Masek and Paterson [34] by a polylogarithmic factor. However, there has been no progress in finding more efficient algorithms for this problem since the 1980s, which prompted attempts as early as in 1976 [6] to understand the barriers for efficient algorithms and to prove lower bounds. Unfortunately, there have not been any nontrivial unconditional lower bounds for this or any other problem in general models of computation. This state of affairs prompted researchers to consider conditional lower bounds based on conjectures such as 3-Sum conjecture [19] and more recently based on ETH [28] and SETH [27]. Researchers have found ETH and SETH to be useful to explain the exact complexity of several NP-complete problems (see the survey paper [33]). Surprisingly, Ryan Williams [39] has found a simple reduction from the CNF-SAT problem to the orthogonal vectors problem which under SETH leads to a matching quadratic lower bound for the orthogonal vectors problem. This in turn led to a number of conditional lower bound results for problems in P (including LCS and related problems) under SETH [7, 1, 11, 2, 23]. Also see [37] for a recent survey. The DP formulation of the LCS problem is perhaps the conceptually simplest example of a twodimensional DP formulation. In the standard formulation, each entry of an n ˆ n table is computed in constant time. The LCS problem belongs to the class of alignment problems which, for example, are used to model similarity between gene or protein sequences. Conditional lower bounds have recently been extended to a number of alignment problems [9, 7, 1, 11, 3]. In contrast, there are many problems for which natural quadratic-time DP formulations compute a one-dimensional table of length n by spending Opnq-time per entry. In this work, we investigate the optimality of such DP formulations and obtain new (conditional) lower bounds which match the complexity of the standard DP formulations. 1-dimensional DP: The Least-Weight Subsequence (LWS) Problem. In this paper, we investigate the optimality of the standard DP formulation of the LWS problem. A classic example of an LWS problem is airplane refueling [25]: Given airport locations on a line, and a preferred distance per hop k (in miles), we define the penalty for flying k 1 miles as pk ´ k 1 q2 . The goal is then to find a sequence of airports terminating at the last airport that minimizes the sum of the penalties. We now define the LWS problem formally. Problem 1.1 (LWS). We are given a sequence of n ` 1 data items x0 , . . . , xn , weights wi,j P t´W, . . . , W u Y t8u for every pair i ă j of indices where the weights may also be functions of the values of data items xi , and an arbitrary function g : Z Ñ Z. The LWS problem is to determine T rns which is defined by the following DP formulation. T r0s “ 0, T rjs “ min gpT risq ` wi,j 0ďiăj 2 for j “ 1, . . . , n. (1) To formulate airplane refueling as an LWS problem, we let xi be the location of the i’th airport, g be the identity function, and wi,j “ pxj ´ xi ´ kq2 . In the definition of the LWS problem, we did not specify the encoding of the problem (in particular, the type of data items and the representation of the weights wi,j ) so we can capture a larger variety of problems: it not only encompasses classical problems such as the pretty printing problem due to Knuth and Plass [31], the airplane refueling problem [25] and the longest increasing subsequence (LIS) [18], but also the unbounded subset sum problem [36, 10], a more general coin change problem that is effectively equivalent to the unbounded knapsack problem, 1-dimensional k-means clustering problem [24], finding longest R-chains (for an arbitrary binary relation R), and many others (for a more complete list of problems definitions, see Section 2). Under mild assumptions on the encoding of the data items and weights, any instantiation of the LWS problems can be solved in time Opn2 q using (1) for determining the values T rjs, j “ 1, . . . , n in time Opnq each. However, the best known algorithms for the LWS problems differ quite significantly in their time complexity. Some problems including the pretty printing, airline refueling and LIS turn out to be solvable in near-linear time, while no subquadratic algorithms are known for the unbounded knapsack problem or for finding the longest R-chain. The main goal of the paper is to investigate the optimality of the LWS DP formulation for various problems by proving conditional lower bounds. Succinct LWS instantiations. In the extremely long presentation of an LWS problem, the weights wi,j are given explicitly. This is however not a very interesting case from a computational point of view, as the standard DP formulation takes linear time (in the size of the input) to compute T rns. In the example of the airplane refueling problem the size of the input is only Opnq assuming that the values of the data items are bounded by some polynomial in n. For such succinct representations, we ask if the quadratic-time algorithm based on the standard LWS DP formulation is optimal. Our approach is to study several natural succinct versions of the LWS problem (by specifying the type of data items and the weight function1 ) and determine their complexity. We refer to Section 2 for examples of succinct instantiations of the LWS problem. Our Contributions and Results. The main contributions of our paper include a general framework for reducing succinct LWS instantiations to what we call the core problems and proving subquadratic equivalences between them. The subquadratic equivalences are interesting for two reasons. First, they allows us to conclude conditional lower bounds for certain LWS instantiations, where previously no lower bounds are known. Second, subquadratic (or more general fine-grained) equivalences are more useful since they let us translate hardness as well as easiness results. Our results include tight (up to subpolynomial factors) conditional lower bounds for several LWS instantiations with succinct representations. These instantiations include the coin change problem, low rank versions of the LWS problem, and the longest subchain problems. Our results are somewhat more general. We propose a factorization of the LWS problem into a core problem and a fine-grained reduction from the LWS problem to the core problem. The idea is that core problems (which are often well-know problems) capture the hardness of the LWS problem and act as a potential barrier for more efficient algorithms. While we do not formally define the notion of a core problem, we identify several core problems which share several interesting properties. For example, they do not admit natural DP formulations and are easy to parallelize. In contrast, the quadratic-time DP formulation of LWS problems requires the entries T ris to be computed in order, suggesting that the general problem might be inherently sequential. 1 In all our applications, the function g is the trivial identity function. 3 The reductions between LWS problems and core problems involve a natural intermediate problem, which we call the Static-LWS problem. We first reduce the LWS problem to the Static-LWS problem in a general way and then reduce the Static-LWS problem to a core problem. The first reduction is divide-and-conquer in nature and is inherently sequential. The latter reduction is specific to the instantiation of the LWS problem. The Static-LWS problem is easy to parallelize and does not have a natural DP formulation. However, the problem is not necessarily a natural problem. The Static-LWS problem can be thought of as a generic core problem, but it is output-intensive. In the other direction, we show that many of the core problems can be reduced to the corresponding LWS instantiations thus establishing an equivalency between LWS instantiations and their core problems. This equivalence enables us to translate both the hardness and easiness results (i.e., the subquadratic-time algorithms) for the core problems to the corresponding LWS instantiations. The first natural succinct representation of the LWS problem we consider is the low rank LWS problem, where the weight matrix W “ pwi,j q is of low rank and thus representable as W “ L ¨ R where L and RT are pn ˆ nop1q q-matrices. For this low rank LWS problem, we identify the minimum inner product problem (MinInnProd) as a suitable core problem. It is only natural and not particularly surprising that MinInnProd can be reduced to the low-rank LWS problem which shows the SETH-hardness of the low-rank LWS problem. The other direction is more surprising: Inspired by an elegant trick of Vassilevska Williams and Williams [40], we are able to show a subquadratic-time reduction from the (highly sequential) low-rank LWS problem to the (highly parallel) MinInnProd problem. Thus, the very compact problem MinInnProd problem captures exactly the complexity of the low-rank LWS problem (under subquadratic reductions). We also show that the coin change problem is subquadratically equivalent to the pmin, `qconvolution problem. In the coin change problem, the weight matrix W is succinctly given as a Toeplitz matrix. At this point, the conditional hardness of the pmin, `q-convolution problem is unknown. The quadratic-time hardness of the pmin, `q-convolution problem would be very interesting, since it is known that the pmin, `q-convolution problem is reducible to the 3-sum problem and the APSP problem, However, recent results give surprising subquadratic-time algorithms for special cases of pmin, `q-convolution [14]. If these subquadratic-time algorithms extend to the general pmin, `q-convolution problem, our equivalence result also provides a subquadratic-time algorithm for the coin change problem and the closely related unbounded knapsack problem. As a corollary, our reductions also give a quadratic-time pmin, `q-convolution-based lower bound for the bounded case of knapsack. We next consider the problem of finding longest chains: here, we search for the longest subsequence (chain) in the input sequence such that all adjacent pairs in the subsequence are contained in some binary relation R. We show that for any binary relation R satisfying certain conditions the chaining problem is subquadratically equivalent to a corresponding (highly parallel) selection problem. As corollaries, we get equivalences between finding the longest chain of nested boxes (NestedBoxes) and VectorDomination as well as between finding the longest subset chain (SubsetChain) and the orthogonal vectors (OV) problem. Interestingly, these results have algorithmic implications: known algorithms for low-dimensional vector domination and lowdimensional orthogonal vectors translate to faster algorithms for low-dimensional NestedBoxes and SubsetChain for small universe size. Table 1 lists the LWS succinct instantiations (as discussed above) and their corresponding core problems. All LWS instantiations and core problems considered in this paper are formally defined in Section 2. Finally, we revisit classic problems including the longest increasing subsequence problem, the 4 Name Coin Change LowRankLWS R-chains NestedBoxes SubsetChain Weights Equivalent Core Reference Toeplitz matrix: pmin, `q-convolution Theorem 4.8 wi,j “ wj´i Remark: Subquadratically equivalent to UnboundedKnapsack Low rank representation: MinInnProd Theorem 3.9 wi,j “ xσi , µj y matrix induced by R: SelectionpRq Theorem 5.3 wi,j “ wj if Rpxi , xj q and 8 o/w Theorem 5.7 Remark: Result below are corollaries. wi,j “ ´1 if Bj contains Bi VectorDomination wi,j “ ´1 if Si Ď Sj OrthogonalVectors Table 1: Summary of our results Name Longest Increasing Subsequence Unbounded Subset Sum Concave 1-dim. DP Weights matrix induced by Ră : wi,j “ ´1 if xi ă xj Toeplitz t0, 8u matrix: wi,j “ wj´i P t0, 8u concave matrix: wi,j ` wi1 ,j 1 ď wi1 ,j ` wi,j 1 for i ď i1 ď j ď j 1 Õpnq-time reducible to Sorting Convolution SMAWK problem Reference [18], Observation 2 [10], Observation 3 [25, 21, 38], Observation 4 Table 2: Near-linear time algorithms following from the proposed framework. unbounded subset sum problem and the concave LWS problem and analyze the Static-LWS instantiations to immediately infer that the corresponding core problem can be solved in near-linear time. Table 2 gives an overview of some of the problems we look at in this context. Related Work. LWS has been introduced by Hirschberg and Lamore [25]. If the weight function satisfies the quadrangle inequality 2 formalized by Yao [41], one obtains the concave LWS problem, for which they give an Opn log nq-time algorithm. Subsequently, improved algorithms solving concave LWS in time Opnq were given [38, 21]. This yields a fairly large class of weight functions (including, e.g., the pretty printing and airplane refueling problems) for which linear-time solutions exist. To generalize this class of problems, further works address convex weight functions3 [20, 35, 30] as well as certain combinations of convex and concave weight functions [16] and provide near-linear time algorithms. For a more comprehensive overview over these algorithms and further applications of the LWS problem, we refer the reader to Eppstein’s PhD thesis [17]. Apart from these notions of concavity and convexity, results on the succinct LWS problems are typically more scattered and problem-specific (see, e.g., [18, 31, 10, 24]; furthermore, a closely related recurrence to (1) pops up when solving bitonic TSP [15]). An exception to this rule is a study of the parallel complexity of LWS [22]. Organization. Section 3 contains the result on low-rank LWS. This is also where we formally 2 See 3A Section 2 for definitions. weight function is convex if it satisfies the inverse of the quadrangle inequality. 5 introduce Static-LWS. Section 4 proves the subquadratic equivalence of the coin change problem and pmin, `q-convolution, while Section 5 discusses chaining problems and their corresponding selection (core) problem. Our results on near-linear time algorithms are given in Section 6. 2 Preliminaries In this section, we state our notational conventions and list the main problems considered in this work. Problem A subquadratically reduces to problem B, denoted A ď2 B, if for any ε ą 0 there is a δ ą 0 such that an algorithm for B with time Opn2´ε q implies an algorithm for A with time Opn2´δ q. We call the two problems subquadratically equivalent, denoted A ”2 B, if there are subquadratic reductions both ways. We let rns :“ t1, . . . , nu. When stating running time, we use the notation Õp¨q to hide polylogarithmic factors. For a problem P , we write T P for its time complexity. We generally assume the word-RAM model of computation with word size w “ Θplog nq. For most problems defined in this paper, we consider inputs to be integers in the range t´W, . . . , W u where W fits in a constant number of words4 . For vectors, we use d for the dimension and generally assume d “ nop1q . Core Problems and Hypotheses. One of the most popular problems in the field of quadratictime conditional hardness is the following problem. Problem 2.1 (Orthogonal Vectors (OV)). Given a1 , . . . , an , b1 , . . . , bn P t0, 1ud, determine if there is a pair i, j satisfying xai , bj y “ 0. Recall that for OV (and the related problems below) we assume d “ nop1q . Thus the naive algorithm solves OV in time Opn2 ¨ dq “ Opn2`op1q q. One of the reasons for the popularity of OV is its surprising connection to the Strong Exponential Time Hypothesis (SETH) [27]: It states that for every ε ą 0 there is a k, such that the k-SAT problem requires time Ωp2p1´εqn q. By an elegant reduction due to Williams [39], OV is quadratictime SETH-hard, i.e., there is no algorithm with running time time Opn2´ε q for any ε ą 0 unless SETH is false. We consider the following generalizations of OV. Problem 2.2 (MinInnProd). Given a1 , . . . , an , b1 , . . . , bn P t´W, . . . , W ud and a natural number r P Z, determine if there is a pair i, j satisfying xai , bj y ď r. Problem 2.3 (AllInnProd). Given a1 , . . . , an P t´W, . . . , W ud and b1 , . . . , bn P t´W, . . . , W ud , determine for all j P rns, the value miniPrns xai , bj y. Problem 2.4 (VectorDomination). Given a1 , . . . , an , b1 , . . . , bn P t´W, . . . , W ud determine if there is a pair i, j such that ai ď bj component-wise. Problem 2.5 (SetContainment). Given sets a1 , . . . , an , b1 , . . . , bn Ď rds given as vectors in t0, 1ud determine if there is a pair i, j such that ai Ď bj . Note that SetContainment is a special case of VectorDomination and computationally equivalent to OV, as xa, by “ 0 if and only if a Ď b (in this slight misuse of notation we think of the Boolean vectors a, b as sets and let b̄ denote the complement of b). 4 For op1q the purposes of our reductions, even values up to W “ 2n 6 would be fine. Since subquadratic solutions to any of these problems trivially give a subquadratic solution to OV, these problems are also quadratic-time SETH-hard. However, the converse does not necessarily hold. In particular, the strongest currently known upper bounds differ: while for OV and SetContainment for small dimension d “ c ¨ logpnq, an n2´1{Oplog cq -time algorithm is known [4], 2 for VectorDomination the best known algorithm runs only in time n2´1{Opc log cq [26, 13]. Another fundamental quadratic-time problem is pmin, `q-convolution, defined below. Problem 2.6 (pmin, `q-convolution). Given vectors a “ pa0 , . . . , an´1 q, b “ pb0 , . . . , bn´1 q P t´W, . . . , W un , determine its pmin, `q-convolution a ˚ b defined by pa ˚ bqk “ min 0ďi,jăn:i`j“k ai ` b j for all 0 ď k ď 2n ´ 2. As opposed to the classical convolution, which we denote as a f b, solvable in time Opn log nq using FFT, no strongly subquadratic algorithm for pmin, `q-convolution is known. Compared to OV, we have less support for believing that no Opn2´ε q-time algorithm for pmin, `q-convolution exists. In particular, interesting special cases can be solved in subquadratic-time [14] and there are subquadratic-time co-nondeterministic and nondeterministic algorithms [8, 12]. At the same time, breaking this long-standing quadratic-time barrier is a prerequisite for progress on refuting the 3SUM and APSP conjectures. This makes it an interesting target particularly for proving subquadratic equivalences, since both positive and negative resolutions of this open question appear to be reasonable possibilities. Succinct LWS Versions and Applications. In the definition of LWS (Problem 1.1) we did not fix the encoding of the problem (in particular, the choice of data items, as well the representation of the weights wi,j and the function g). Assuming that g can be determined in Õp1q and that W “ polypnq, this problem can naturally be solved in time Õpn2 q, by evaluating the central recurrence (1) for each j “ 1, . . . , n – this takes Õpnq time for each j, since we take the minimum over at most n expressions that can be evaluated in time Õp1q by accessing the previously computed entries T r0s, . . . , T rj ´ 1s as well as computing g. In all our applications, g will be the identity function, hence it will suffice to define the type of data items and the corresponding weight matrix. Throughout this paper, whenever we fix a representation of the weight matrix W “ pwi,j qi,j , we denote the corresponding problem LWSpWq. In the remainder of this section, we list problems considered in this paper that can be expressed as an LWS instantiations. At this point, we typically give the most natural formulations of these problems – the corresponding definitions as LWS instantiations are given in the corresponding sections. We start off with a natural succinct “low-rank” version of LWS. Problem 2.7 (LowRankLWS). LowRankLWS is the LWS problem where the weight matrix W is of rank d ! n. The input is given succinctly as two matrices A and B, which are pn ˆ dq- and pd ˆ nq-matrices respectively, and W “ A ¨ B. Alternatively, LowRankLWS may be interpreted in the following way: There are places 0, 1, . . . , n, each of which is equipped with an in- and an out-vector. The cost of going from place i to j is then defined as the inner product of the out-vector of i with the in-vector of j, and the task is to compute the minimum-cost monotonically increasing path to reach place n starting from 0. In Section 3, we prove subquadratic equivalence to MinInnProd. We consider the following coin change problem and variations of Knapsack. 7 Problem 2.8 (CC). We are given a weight sequence w “ pw1 , . . . , wn q with wi P t´W, . . . , W u Y t8u, i.e., the ř the weight of the multiset of denominations I ř coin with value i has weight wi . Find such that iPI i “ n and the sum of the weights iPI wi is minimized. Problem 2.9 (UnboundedKnapsack). We are given a sequence of profits p “ pp1 , . . . , pn q with pi P t0, 1, . . . , W u, ř i.e., the item of size i has profit ř pi . Find the total profit of the multiset of indices I such that iPI i ď n and the total profit iPI pi is maximized. Note that if we replace multiset by set in the above definition, we obtain the bounded version of the problem, which we denote by Knapsack. We remark that our perspective on CC and UnboundedKnapsack (as well as UnboundedSubsetSum below) using LWS is slightly different than many classical accounts of Knapsack: We define the problem size as the budget size instead of the number of items, thus our focus is on pseudo-polynomial time algorithms for the typical formulations of these problems. Note that we state the coin change problem as allowing positive or negative weights, but UnboundedKnapsack only allows for positive profits. Furthermore, CC is a minimization problem, while UnboundedKnapsack is a maximization problem. For CC, the maximization problem is trivially equivalent as we can negate all weights. Furthermore, we can freely translate the range of the weights in the coin change problem by defining wi1 “ i ¨ M ` wi for all i and sufficiently large or small M . The most significant difference between CC and UnboundedKnapsack is that for CC the indices have to sum to exactly n, while for UnboundedKnapsack n is only an upper bound. We will encounter an important generalization of the two problems above, defined as follows. Problem 2.10 (oiCC). The output-intensive version of CC is to determine, given an input to CC, the weight of the optimal multiset such that the denominations sum up to j for all 1 ď j ď n. It is easy to see that oiCC is at least as hard as both CC and UnboundedKnapsack. We will relate the above Knapsack variants to pmin, `q-convolution in Section 4. In Section 6, we will revisit near-linear time algorithms for the following special case of the coin change problem. Problem 2.11 (UnboundedSubsetSum). Given a subset S Ď rns, determine whether there is a multiset of elements of S that sums up to exactly n. We also discuss problems where the goal is to find the longest chain among data items, where the notion of a chain is defined by some binary relation R. We first give the definition of the general problem which is parameterized by R. Problem 2.12 (ChainLWS). Fix a set X of objects and a relation R Ď X ˆ X. The Weighted Chain Least-Weight Subsequence Problem for R, denoted ChainLWSpRq, is the following problem: Given data items x0 , . . . , xn P X, weights w1 , . . . , wn´1 P t´W, . . . , W u, find the weight of the increasing sequence i0 “ 0 ă i1 ă i2 ă . . . ă ř ik “ n such that for all j with 1 ď j ď k the pair k´1 pxij´1 , xij q is in the relation R and the weight j“1 wij is minimized. The following problems are specializations of this problem for different relations. Problem 2.13 (NestedBoxes). Given n boxes in d dimensions, given as non-negative, d-dimensional vectors pb1 , . . . , bn q, find the longest chain such that each box fits into the next (without rotation). We say box that box a fits into box b if for all dimensions 1 ď i ď d, ai ď bi . 8 Problem 2.14 (SubsetChain). Given n sets from a universe U of size d, given as Boolean, d-dimensional vectors pb1 , . . . , bn q, find the longest chain such that each set is a subset of the next. Note that SubsetChain is a special case of NestedBoxes. Problem 2.15 (LIS). Given a sequence of n integers x1 , . . . , xn , compute the length of the longest subsequence that is strictly increasing. Finally, we will briefly discuss the following class of LWS problems that turn out to be solvable in near-linear time. Problem 2.16 (ConcLWS). Given an LWS instance in which the weights satisfy the quadrangle inequality for i ď i1 ď j ď j 1 , wi,j ` wi1 ,j 1 ď wi1 ,j ` wi,j 1 solve it. The weights are not explicitly given, but each wi,j can be queried in constant time. 3 LowRankLWS Let us first analyze the following canonical succinct representation of a low-rank weight matrix W “ pwi,j qi,j : If W is of rank d ! n, we can write it more succinctly as W “ A ¨ B, where A and B are pn ˆ dq- and pd ˆ nq matrices, respectively. We can express the resulting natural LWS problem equivalently as follows. Problem 3.1 (LowRankLWS). We define the following LWS instantiation LowRankLWS “ LWSpWLowRankq. Data items: out-vectors µ0 , . . . , µn´1 P t´W, . . . , W ud , in-vectors σ1 , . . . , σn P t´W, . . . , W ud Weights: wpi, jq “ xµi , σj y for 0 ď i ă j ď n In this section, we show that this problem is equivalent, under subquadratic reductions, to the following non-sequential problem. Problem 3.2 (MinInnProd). Given a1 , . . . , an , b1 , . . . , bn P t´W, . . . , W ud and a natural number r P Z, determine if there is a pair i, j satisfying xai , bj y ď r. We first give a simple reduction from MinInnProd that along the way proves quadratic-time SETH-hardness of LowRankLWS. Lemma 3.3. It holds that T MinInnProdpn, d, W q ď T LowRankLWSp2n ` 1, d ` 2, dW q ` Opndq. Proof. Given a1 , . . . , an , b1 , . . . , bn P t´W, . . . , W ud , let O “ p0, . . . , 0q P Zd be the all-zeroes vector and define the following in- and out-vectors µ0 “ pdW, 0, Oq, µi “ p0, dW, ai q, µn`j “ p0, 0, Oq, σ2n`1 “ pdW, dW, Oq, σi “ p0, 0, Oq, σn`j “ pdW, 0, bj q, for i “ 1, . . . , n, for j “ 1, . . . , n. To prove correctness, we show that in the constructed LowRankLWS instance, we have T r2n`1s “ mini,j xai , bj y, from which the results follows immediately. Inductively, we have T ris “ 0 for i “ 1, . . . , n, since xµi1 , σi y “ 0 for all 0 ď i1 ă i ď n. Similarly, for j “ 1, . . . , n one can inductively show 9 that T rn ` js “ min1ďiďn,j 1 ďj xai , bj 1 y, using that xµ0 , σn`j y “ pdW q2 ě maxi,j xai , bj y, xµi , σn`j y “ xai , bj y and xµn`j 1 , σn`j y “ 0 for all 1 ď i, j ď n and j 1 ď j. Finally, using (1) xµ0 , σ2n`1 y “ pdW q2 ě maxi,j xai , bj y and T r0s “ 0, (2) xµi , σ2n`1 y “ pdW q2 ě maxi,j xai , bj y and T ris “ 0 for i “ 1, . . . , n and (3) xµn`j , σ2n`1 y “ 0 and T rn ` js “ min1ďiďn,1ďj 1 ďj xai , bj 1 y for all j “ 1, . . . , n, we can finally determine T r2n ` 1s “ mini,j xai , bj y. To prove the other direction, we will give a quite general approach to compute the sequential LWS problem by reducing to a natural static subproblem of LWS: Problem 3.4 (Static-LWSpWq). Fix an instance of LWSpWq. Given intervals I :“ ta`1, . . . , a` N u and J :“ ta`N `1, . . . , a`2N u, together with the correctly computed values T ra`1s, . . . , T ra` N ` 1s, the Static Least-Weight Subsequence Problem (Static-LWS) asks to determine T 1 rjs :“ min T ris ` wi,j for all j P J. iPI Lemma 3.5 (LWSpWq ď2 Static-LWSpWq). For any choice of W, if Static-LWSpWq can be solved in time OpN 2´ε q for some ε ą 0, then LWSpWq can be solved in time Õpn2´ε q. Proof. In what follows, we fix LWS as LWSpWq and Static-LWS as Static-LWSpWq. We define the subproblem Spti, . . . , ju, pti , . . . , tj qq that given an interval spanned by 1 ď i ď j ď n and values tk “ min0ďk1 ăi T rk 1 s ` wk1 ,k for each point k P ti, . . . , ju, computes all values T rks for k P ti, . . . , ju. Note that a call to Sprns, pw0,1 , . . . , w0,n qq solves the LWS problem, since T r0s “ 0 and thus the values of tk , k P rns are correctly initialized. We solve S using Algorithm 1. We briefly argue correctness, using the invariant that tk “ Algorithm 1 Reducing LWS to Static-LWS 1: function S(ti, . . . , ju, pti , . . . , tj q) 2: if i “ j then 3: return T ris Ð ti 4: m Ð r j´i 2 s 5: pT ris, . . . , T ri ` m ´ 1sq Ð Spti, . . . , i ` m ´ 1u, pti , . . . , ti`m´1 qq 6: solve Static-LWS on the subinstance given by I :“ ti, . . . , i`m´1u and J :“ ti`m, . . . , i` 2m ´ 1u: 7: Ź obtains values T 1 rks “ miniďk1 ăi`m T rk 1 s ` wk1 ,k for k “ i ` m, . . . , i ` 2m ´ 1. 1 8: tk Ð minttk , T 1 rksu for all k “ i ` m, . . . , i ` 2m ´ 1. 9: pT ri ` ms, . . . , T ri ` 2m ´ 1sq Ð Spti ` m, . . . , i ` 2m ´ 1u, pt1i`m , . . . , t1i`2m´1 qq 10: if j “ i ` 2m then 11: T rjs :“ minttj , miniďkăj T rks ` wk,j u. 12: return pT ris, . . . , T rjsq min0ďk1 ăi T rk 1 s ` wk1 ,k in every call to S. If S is called with i “ j, then the invariant yields ti “ min0ďk1 ăi T rk 1 s ` wk1 ,i “ T ris, thus T ris is computed correctly. For the call in Line 5, the invariant is fulfilled by assumption, hence the values pT ris, . . . , T ri ` m ´ 1sq are correctly computed. For the call in Line 9, we note that for k “ i ` m, . . . , i ` 2m ´ 1, we have t1k “ minttk , T 1 rksu “ mint min T rk 1 s ` wk1 ,k , 1 0ďk ăi min iďk1 ăi`m 10 T rk 1 s ` wk1 ,k u “ min 0ďk1 ăi`m T rk 1 s ` wk1 ,k . Hence the invariant remains satisfied. Thus, the values pT ri ` ms, . . . , T ri ` 2m ´ 1sq are correctly computed. Finally, if j “ i ` 2m, we compute the remaining value T rjs correctly, since tj “ min0ďkăi T rks ` wk,j by assumption. To analyze the running time T S pnq of S on an interval of length n :“ j ´ i ` 1, note that each call results in two recursive calls of interval lengths at most n{2. In each call, we need an additional overhead that is linear in n and T Static-LWS pn{2q. Solving the corresponding recursion T S pnq ď 2T S pn{2q ` T Static-LWS pn{2q ` Opnq, we obtain that an OpN 2´ε q-time algorithm StaticLWS, with 0 ă ε ă 1 yields T LWSpnq ď T S pnq “ Opn2´ε q. Similarly, an OpN logc N q-time algorithm for Static-LWS would result in an Opn logc`1 nq-time algorithm for LWS. For the special case of LowRankLWS, it is straightforward to see that the static version boils down to the following natural reformulation. Problem 3.6 (AllInnProd). Given a1 , . . . , an P t´W, . . . , W ud and b1 , . . . , bn P t´W, . . . , W ud , determine for all j P rns, the value miniPrns xai , bj y. (Again, we typically assume that d “ nop1q and op1q W “ 2n .) Lemma 3.7 (Static-LWSpWLowRank q ď2 AllInnProd). We have T Static-LWSpWLowRank q pn, d, W q ď T AllInnProdpn, d ` 1, nW q ` Opndq. Proof. Consider Static-LWSpWLowRankq. Let I “ ta ` 1, . . . , a ` N u, J “ ta ` N ` 1, . . . , a ` 2N u and values T ra ` 1s, . . . , T ra ` N s be given. To determine T 1 rjs “ miniPI T ris ` wi,j for all j P J, it is sufficient to solve AllInnProd on the vectors aa`1 , . . . , aa`N , ba`N `1 , . . . , ba`2N P tnW, . . . , nW ud`1 defined by ai :“ pµi , T risq bj “ pσj , 1q, for all i P I, j P J, since then xai , bj y “ T ris ` xµi , σj y “ T ris ` wi,j . The claim immediately follows (note that |T ris| ď nW ). Finally, inspired by an elegant trick of [40], we reduce AllInnProd to MinInnProd. Lemma 3.8 (AllInnProd ď2 MinInnProd). We have ? T AllInnProdpn, d, W q ď Opn ¨ T MinInnProdp n, d ` 3, ndW 2 q ¨ log2 nW q. Proof. We first observe that we can tune MinInnProd to also return a witness pi, jq with xai , bj y ď r, if it exists. To do so, we replace each ai by the pd` 2q-dimensional vector a1i “ pai ¨n, pi ´ 1qn, ´1q and similarly, each bj by the pd ` 2q-dimensional vector b1j “ pbj ¨ n, ´1, j ´ 1q. Clearly, we have xa1i , b1j y “ xai , bj yn2 ´ pi ´ 1qn ´ pj ´ 1q. Thus xa1i , b1j y ď rn2 if and only if xai , bj y ď r since i, j P rns. Using a binary search over r, we can find mini,j xa1i , b1j y, from whose precise value we can determine also a witness, if it exists. Thus the running time witpn, d, W q for finding such a witness is bounded by Oplog nW q ¨ T MinInnProdpn, d ` 2, nW q. To solve AllInnProd, i.e., to compute pj :“ miniPrns xai , bj y for all j P rns, we employ a parallel binary search. Consider in particular the following problem P: Given arbitrary r1 , . . . , rn , determine for all j P rns whether there exists i P rns ? such that xai , bj y ď rj . We will show below that this problem can be solved in time Opn ¨ witp n, d ` 1, dW 2 qq. The claim then follows, since starting from feasible intervals R1 “ ¨ ¨ ¨ “ Rn “ t´dW 2 , . . . , dW 2 u satisfying pj P Rj , we can 11 halve the sizes of each interval simultaneously by a single call to P. Thus, after OplogpdW qq calls, the true in the T AllInnProdpn, d, wq “ ? time guarantee ? values pj 2can be determined, resulting MinInnProd 2 p n, d ` 3, ndW q log2 pnW qq, as desired. Opn ¨ witp n, d ` 1, dW q ¨ logpdW qq “ Opn ¨ T We complete the proof of the claim by showing how to solve P. Without loss of generality, we 2 can assume that rj ď dW? for every j, since no larger inner product may exist. We group the ? vectors a1 , . . . , an in g :“ r ns groups A1 , . . . , Ag of size at most n each, and do the same for the vectors b1 , . . . , bn to obtain B1 , . . . , Bg . Now, we iterate over all pairs of groups Ak , Bℓ , k, ℓ P rgs: For each such choice of pairs, we do the following process. For each vector ai P Ak , we define the pd ` 1q-dimensional vector ãi :“ pai , ´1q and for every vector bj P Bℓ , we define b̃j :“ pbj , rj q. In the obtained instance tãi uaPAk , tb̃j ubPBℓ , we try to find some i, j such that xãi , b̃j y ď 0, which is equivalent to xai , bj y ď rj . If we succeed in finding such a witness, we delete bj and b˜j (but remember its witness) and repeat finding witnesses (an deleting the witnessed bj ) until we cannot find any. The process then ends and we turn to the next pair of groups. It is easy to see that for all j P rns, we have xai , bj y ď rj for some i P rns if and only if the above process finds a witness for bj at some point. To argue about the running time, we charge the running time of every call to witness finding to either (1) the pair Ak , Bℓ , if the call is the first call in the process for Ak , Bℓ , or (2) to bj , if the call resulted from finding a witness for bj in the previous call. Note that every pair Ak , Bℓ is charged by exactly one call and every bj is charged by at most one call (since in after a witness for bj is found, we delete bj and no further bj can be ? witness for 2 2 found). Thus in total, we obtain a running time of at most pg ` nq ¨ witp n, d ` 1, dW q ` Opnq “ ? Opn ¨ witp n, d ` 1, dW 2 qq. Theorem 3.9. We have LowRankLWS ”2 MinInnProd. Proof. In Lemmas 3.3, 3.5, 3.7, and 3.8, we have proven MinInnProd ď2 LowRankLWS “ LWSpWLowRank q ď2 Static-LWSpWLowRank q ď2 AllInnProd ď2 MinInnProd, proving the claim. 4 Coin Change and Knapsack Problems In this section, we focus on the following problem related to Knapsack: Assume we are given coins of denominations d1 , . . . , dm with corresponding weights w1 , . . . , wm and a target value n, determine a way to represent n using these coins (where each coin can be used arbitrarily often) minimizing the total sum of weights of the coins used. Since without loss of generality di ď n for all i, we can assume that m ď n and think of n as our problem size. In particular, we describe the input by weights w1 , . . . , wn where wi denotes the weight of the coin of denomination i (if no coin with denomination i exists, we set wi “ 8). It is straightforward to see that this problem is an LWS instance LWSpWcc q, where the weight matrix Wcc is a Toeplitz matrix. Problem 4.1 (CC). We define the following LWS instantiation CC “ LWSpWcc q. Data items: weight sequence w “ pw1 , . . . , wn q with wi P t´W, . . . , W u Y t8u Weights: wi,j “ wj´i for 0 ď i ă j ď n 12 Translated into a Knapsack-type formulation (i.e., denominations are weights, weights are profits, and the objective becomes to maximize the profit), the problem differs from UnboundedKnapsack only in that it searches for the most profitable multiset of items of weight exactly n, instead of at most n. Problem 4.2 (UnboundedKnapsack). We are given a sequence of profits p “ pp1 , . . . , pn q with pi P t0, 1, . . . , W u, ř i.e., the item of size i has profit ř pi . Find the total profit of the multiset of indices I such that iPI i ď n and the total profit iPI pi is maximized. The purpose of this section is to show that both CC and UnboundedKnapsack are subquadratically equivalent to the pmin, `q-convolution problem. Along the way, we also prove quadratic-time pmin, `q-convolution-hardness of Knapsack. Recall the definition of pmin, `qconvolution. Problem 4.3 (pmin, `q-convolution). Given vectors a “ pa0 , . . . , an´1 q, b “ pb0 , . . . , bn´1 q P t´W, . . . , W un , determine its pmin, `q-convolution a ˚ b defined by pa ˚ bqk “ min 0ďi,jăn:i`j“k ai ` b j for all 0 ď k ď 2n ´ 2. As opposed to the classical convolution, which we denote as a f b, solvable in time Opn log nq using FFT, no strongly subquadratic algorithm for pmin, `q-convolution is known. Compared to the popular orthogonal vectors problem, we have less support for believing that no Opn2´ε q-time algorithm for pmin, `q-convolution exists. In particular, interesting special cases can be solved in subquadratic time [14] and there are subquadratic-time co-nondeterministic and nondeterministic algorithms [8, 12]. At the same time, breaking this long-standing quadratic-time barrier is a prerequisite for progress on refuting the 3SUM and APSP conjectures. This makes it an interesting target particularly for proving subquadratic equivalences, since both positive and negative resolutions of this open question appear to be reasonable possibilities. To obtain our result, we address two issues: (1) We show an equivalence between the problem of determining only the value T rns, i.e., the best way to give change only for the target value n, and to determine all values T r1s, . . . , T rns, which we call the output-intensive version. (2) We show that the output-intensive version is subquadratic equivalent to pmin, `q-convolution. Problem 4.4 (oiCC). The output-intensive version of CC is to determine, given an input to CC, all values T r1s, . . . , T rns. We first consider issue (2) and provide a pmin, `q-convolution-based lower bound for oiCC. Lemma 4.5 (pmin, `qconv ď2 oiCC). We have T pmin,`qconv pn, W q ď T oiCCp6n, 4p2W ` 1qq ` Opnq. Proof. We first do a translation of the input. Note that for any scalars α, β, we have pa`αq˚pb`βq “ pa ˚ bq ` α ` β. Let M :“ 2W ` 1. Without loss of generality, we may assume that 2M ď ai ď 3M 0 ď bj ď M for all i “ 0, . . . , n ´ 1, for all j “ 0, . . . , n ´ 1. We now define a CC instance with a problem size n1 “ 6n and W 1 “ 4M by defining w “ p4M qn ˝ pan´1 , . . . , a0 q ˝ p4M qn ˝ pbn´1 , . . . , b0 q ˝ p4M q2n . 13 We now claim that T r4n ` is “ pa ˚ bq2n´i for i “ 1, . . . , 2n, which immediately yields the lemma. To do so, we will prove the following sequence of identities. T ris “ 4M T rn ` is “ an´i T r2n ` is “ 4M T r3n ` is “ bn´i for i P rns, for i P rns, (2) (3) for i P r2ns, (6) for i P rns, for i P rns, T r4n ` is “ pa ˚ bq2n´i (4) (5) In the last line, we define, for our convenience, pa ˚ bq2n´1 “ 4M (note that before, we defined only the entries pa ˚ bqk with k ď 2n ´ 2). For later convenience, observe that 0 ď wi ď 4M for all i P rn1 s. It is easy to see that this implies 0 ď T ris ď 4M for i P rn1 s. The identities in (2) are obvious. To prove the identities in (3) inductively over i, recall that T rn ` is “ minj“1,...,n`i tT rn ` i ´ js ` wj u. Observe that T rn ` i ´ js ` wj ă 4M can only occur if j ě n ` 1 (since otherwise wj “ 4M ), which implies n ` i ´ j ď n and T rn ` i ´ js “ 4M except for the case j “ n ` i. In this case, we have T rn ` i ´ js ` wj “ T r0s ` wn`i “ an´i ď 4M . To prove the identities in (4), observe that for 1 ď j ď 3n, we have wj ě 2M by assumption mini ai ě 2M . Similarly, we have already argued that T ri1 s ě 2M for 1 ď i1 ď 2n. Thus, we can inductively show that T r2n ` is “ mintT r0s ` w2n`i , minj“1,...,2n`i´1 T r2n ` i ´ js ` wj u “ 4M using w2n`i “ 4M and that every sum in the inner minimum expression is at least 4M . To prove the identities in (5), note that for T r3n ` i ´ js ` wj ă 4M to hold, we must have either n ` 1 ď j ď 2n or 3n ` 1 ď j ď 3n ` i, since otherwise wj “ 4M . We observe that for n ` 1 ď j ď 2n, we have wj ě mini ai ě 2M and T r3n ` i ´ js ě mini ai ě 2M . Thus, we may assume that 3n ` 1 ď j ď 3n ` i. Note that in this case, we have T r3n ` i ´ js “ 4M except for the case j “ 3n ` i, where we have T r3n ` i ´ js ` wj “ T r0s ` w3n`i “ bn´i ă 4M . Finally, for the identities in (6), we might have T r4n ` is ` wj ă 4M only if n ` 1 ď j ď 2n or 3n ` 1 ď j ď 4n. First consider the case that i “ 1. We have T r4n ` 1s “ mintw4n`1 , T r4n ` 1 ´ js `wj , min n`1ďjď2n looooooomooooooon “4M min T r4n ` 1 ´ js `wj u “ 4M. 3n`1ďjď4n looooooomooooooon “4M Inductively over 1 ă i ď 2n, we will prove T r4n ` is “ pa ˚ bq2n´i . By definition, T r4n ` is “ mintw4n`i , min n`1ďjď2n T r4n ` i ´ js ` wj , min 3n`1ďjď4n T r4n ` i ´ js ` wj u T rn ` i ´ j 1 s ` bn´j 1 u “ mintw4n`i , min T r3n ` i ´ j 1 s ` an´j 1 , min 1 1 1ďj ďn 1ďj ďn (7) Note that min 1ďj 1 ďn T rn ` i ´ j 1 s loooooomoooooon “4M for j 1 ěi or `bn´j 1 “ min maxt1,i´nuďj 1 ďminti´1,nu an´pi´j 1 q ` bn´j 1 “ pa ˚ bq2n´i j 1 ăi´n where the last equation follows from noting that the choice of j 1 lets n ´ j 1 and n ´ pi ´ j 1 q range over all admissible pairs of values in t0, . . . , n ´ 1u summing up to 2n ´ i. Similarly, we inductively prove that min T r3n ` i ´ j 1 s ` an´j 1 “ 1ďj 1 ďn min maxt1,i´nuďj 1 ďminti´1,nu 14 an´pi´j 1 q ` bn´j 1 “ pa ˚ bq2n´i , since an´j 1 ě 2M and T r3n ` i ´ j 1 s ě 2M whenever j 1 ě i or j 1 ă i ´ n (where the last regime uses T r4n ` i1 s “ pa ˚ bq2n´i1 ě 2M inductively for i1 ă i). Finally, since pa ˚ bq2n´i ď pmaxi ai q ` pmaxj bj q ď 4M , we can simplify (7) to T r4n ` is “ pa ˚ bq2n´i . Using the notion of Static-LWS, the other direction is straight-forward. Lemma 4.6. We have oiCC ď2 Static-LWSpWcc q ď2 pmin, `qconv. Proof. In Lemma 3.5, we have in fact reduced the output-intensive version of LWSpWq to our static problem Static-LWSpWq, thus specialized to the coin change problem, we only need to show that Static-LWSpWcc q subquadratically reduces to pmin, `q-convolution. Consider an input instance to Static-LWS given by I “ ta ` 1, . . . , a ` N u, J “ ta ` N ` 1, . . . , a ` 2N u and values T ris, i P I. Defining M :“ 2W ` 1 and the vectors N times hkkkkkkikkkkkkj u :“ pnM, T ra ` 1s, . . . , T ra ` N s, nM, . . . , nM q, v :“ pnM, w1 , . . . , w2N q, we have pu ˚ vqN `k “ mini“1,...,N T ra ` is ` wN `k´i “ T 1 ra ` N ` ks for all k “ 1, . . . , N , thus a pmin, `q-convolution of two p2n ` 1q-dimensional vectors solves Static-LWSpWcc q, yielding the claim. The last two lemmas resolve issue (2). We proceed to issue (1) and show that the outputintensive version is subquadratically equivalent to both CC and UnboundedKnapsack that only ask to determine a single output number. We introduce the following notation for our convenience: Recall that ř weight wi denotes the weight of a coin of denomination i. For a multiset S Ď rns, we let dpSq :“ iPS i denote its total denomination, i.e., sum of the denomination of theřcoins in S (where multiples uses of the same coin is allowed, since S is a multiset). We let wpSq :“ iPS w ři denote the weight of the multiset. Analogously, when considering a Knapsack instance, ppSq “ i pi denotes the total profit of the item (multi)set S. It is trivial to see that UnboundedKnapsack ď2 oiCC. Furthermore, we can give the following simple reduction from CC to UnboundedKnapsack. Oberservation 1 (CC ď2 UnboundedKnapsack ď2 oiCC). We have T CC pn, W q ď T UnboundedKnapsackpn, nW q ` Opnq and T UnboundedKnapsackpn, W q ď T oiCCpn, W q ` Opnq. Proof. Given a CC instance, for every weight wi ă 8, we create an item of size i and profit pi :“ i ¨ M ´ wi in our resulting UnboundedKnapsack instance for a sufficiently large constant M ě nW . This way, all profits are positive and every multiset S whose sizes sum up to B has a profit of ppSq “ B ¨ M ´ wpSq. Since M ě nW ě maxS,dpSqďn |wpSq|, this ensures that the maximumprofit multiset of total size/denomination at most n has a total size/denomination of exactly n. Thus, the optimal multiset S ˚ has profit pps˚ q “ n ¨ M ´ minS:dpSq“n wpSq “ n ¨ M ´ T rns, from which we can derive T rns, as desired. Given an UnboundedKnapsack instance, we define for every item of size i and profit pi the corresponding weight wi “ ´pi in a corresponding CC instance. It remains to compute all T r1s, . . . , T rns in this instance and determining their minimum, concluding the reduction. 15 The remaining part is similar in spirit to Lemma 3.8: Somewhat surprisingly, the same general approach works despite the much more sequential nature of the Knapsack/CoinChange problem – this sequentiality can be taken care of by a more careful treatment of appropriate subproblems that involves solving them in a particular order and feeding them with information gained during the process. In what follows, to clarify which instance is currently considered, we let T I denote the T -table of the (oi)CC LWS problem (see Problem 1.1) corresponding to instance I. Dropping the superscript always refers to T I . ? Lemma 4.7 (oiCC ď2 CC). We have that T oiCCpn, W q ď OplogpnW q ¨ n ¨ T CC p24 n, 3n2 W qq. ? Proof. Let I be an oiCC instance. To define our subproblems, we set N :“ r ns and define N ranges W1 :“ t1, . . . , N u, . . . , WN :“ tpN ´ 1qN ` 1, . . . , N 2 u. To determine all T ris “ minS:dpSq“i wpSq, we will compute T ris for all i P Wj successively over all j “ 1, . . . , N . The case of j “ 1 and j “ 2 can be computed by the naive algorithm in time OpN 2 q “ Opnq. Consider now any fixed j ě 3 and assume that all values T ris for i P Wj 1 with j 1 ă j have already been computed. We employ a parallel binary search. For every i P Wj , we set up a feasible range Ri initialized to t´nW, . . . , nW u. We will maintain the invariant that T ris P Ri and will halve the size of all feasible ranges Ri , i P Wj simultaneously using a small number of calls to the following problem PpM, W̄ q: Given an instance J for CC specified by the weights w̃1 , . . . , w̃M , as well as values r̃1 , . . . , r̃M P t´W̄ , . . . , W̄ u Y t´8, 8u, determine whether there exists an i P rM s with T J ris ď r̃i , and if so, also return a witness i. We will later prove that this problem can be solved in time T P pM, W̄ q “ OpT CC p2M, 3M 2 W̄ qq. Clearly, after OplogpnW qq rounds of this parallel binary search, the feasible ranges consists of single values, thus determining the values of all T ris for i P Wj . Since we will show that halving all feasible ranges for range Wj takes OpN q calls to Pp12N, nW q, and we need to determine at most N ranges W3 , . . . , WN , the total time for this process amounts to OplogpnW qN 2 ¨ T P p12N, nW qq “ OplogpnW qN 2 ¨ T CC p24N, 3n2 W qq. We now describe how to use P to halve the size of all feasible ranges Ri , i P Wj : we set ri to the median of Ri and aim to determine, for all i P Wj , whether T ris ď ri , i.e., whether some multiset S with dpSq “ i and wpSq ď ri exists. We achieve this by the following process: For every k “ 1, . . . , j, we consider only two ranges, namely Wk “ tpk ´ 1qN ` 1, . . . , kN u and Wj´k Y Wj´k`1 “ tpj ´ k ´ 1qN ` 1, . . . , pj ´ k ` 1qN u. Let us first consider the case k ě 2. Here, we can define the 2N -dimensional vectors a, b with # wpk´1qN `ℓ for ℓ P rN s, aℓ “ 8 for ℓ ą N, bℓ “ T rpj ´ k ´ 1qN ` ℓs for ℓ P r2N s. (Note that all T ris, i P Wj´k Y Wj´k`1 for k ě 2 have already been computed by assumption.) We are interested in all those values of the pmin, `q-convolution a˚b of these vectors that correspond to summing up some wpk´1qN `ℓ with some T rpj ´ k ´ 1qN ` ℓ1 s such that pj ´ 2qN ` ℓ ` ℓ1 P Wj . More specifically, we aim to determine whether there is some ℓ with pa ˚ bqN `ℓ ď rpj´1qN `ℓ . To do so, we use the reduction from pmin, `q-convolution to oiCC given in Lemma 4.5 to create an oiCC instance J . From this instance of problem size 12N we can read off the values of a ˚ b as a certain interval in the corresponding T J -table. Thus, we can test whether pa ˚ bqN `ℓ ď rpj´1qN `ℓ for some ℓ using Pp12N, nW q: for every ℓ, we let i be the unique index in the T J -table representing 16 the entry pa ˚ bqN `ℓ and set r̃i :“ rpj´1qN `ℓ . For all other i1 , we set r̃i1 “ ´8, thus enforcing that those indices will never be reported. For the special case k “ 1, we proceed slightly differently: Here, we define the 2N -dimensional vectors a, b with aℓ “ T rℓs for ℓ P r2N s # T rpj ´ 2qN ` ℓs for ℓ P rN s bℓ “ 8 for ℓ ą N. (Note that all necessary T ris, i P W1 Y W2 and T ris, i P Wj´1 have already been computed by assumption.) Analogously to above, we use Pp12N, nW q to test whether pa ˚ bqN `ℓ ď rpj´1qN `ℓ using the reduction from pmin, `q-convolution to oiCC given in Lemma 4.5. Once an i P Wj has been reported to satisfy T ris ď ri for some witnessing subproblem given by the ranges Wk and Wj´k Y Wj´k`1 for some k, we set ri :“ ´8 and repeat on the same subproblem k (analogously to the approach of Lemma 3.8). Note that for every j, we have j ď N subproblems and at most N many indices i P Wj that can be reported. Thus, we use at most OpN q many calls to the subproblem P. To briefly argue correctness, note that by construction, we only determine some i with T ris ď ri if we have found a witness. For the converse, let k be the largest index such that the optimal multiset for i includes a coin in Wk . Then the subproblem given by the ranges Wk and Wj´k Y Wj´k`1 will give a witness. This is obvious for k ě 2. For k “ 1, note that no weight in Wk1 with k 1 ą 1 is used in an optimal multiset for T ris P Wj . In particular, the optimal multiset S can be represented as S “ S 1 Y S 2 , where S 1 is a multiset of total denomination i1 P Wj´1 and S 2 is a multiset of total denomination i ´ i1 P W1 Y W2 . Thus, in the instance constructed from a, b, we will find the witness T ris ď T ri1 s ` T ri ´ i1 s ď ri . We finally describe how to solve PpM, W̄ q in time T CCp2M, 3M 2 W̄ q. First consider the problem without finding a witnessing i. Let w̃1 , . . . , w̃M , r̃1 , . . . , r̃M be an instance J of PpM, W̄ q. We define a CC instance K of problem size 2M by giving the weights wi1 :“ w̃i 1 w2M´i for all i P rM s, :“ ´3M W̄ ´ r̃i for all i P rM s. We claim that T K r2M s ď ´3M W̄ iff the input instance to P is a yes instance: First observe that T K r1s “ T J r1s, . . . , T K rM s “ T J rM s since the first M weights agree for both J and K. Consider the case that there is some i P rM s with T J ris ď r̃i . Then we have T Kr2M s ď T K ris ` w2M´i “ pT J ris ´ r̃i q ´ 3M W̄ ď ´3M W̄ , as desired. Conversely, assume that all T J ris ą r̃i . We distinguish the cases whether the optimal subsequence S uses only weights among w̃1 , . . . , w̃M or not. In the first case, since |w̃i | ď W for i P rM s, we have that wpSq ě 2M ¨ miniPrns |w̃i | ě ´2M W̄ ą ´3M W̄ . Otherwise, S uses exactly one weight among w̃M`1 , . . . , w̃2M . Let this weight be w̃2M´i . Then wpSq “ T K ris ` w̃2M´i “ pT J ris ´ r̃i q ´ 3M W̄ ą ´3M W̄ since T J ris ą r̃i , yielding the claim. Very similar to Lemma 3.8, we can now tune the above reduction to also produce a witness i such that T J ris ď r̃i . For this, we scale all weights wi1 , i P r2M s by a factor of M and subtract a value of i ´ 1 for every wi1 , i P rM s. It is easy to see that a yes instance K attains some value T K r2M s “ ´κ ¨ M ´ i for some integers κ ě 3 and 0 ď i ă n, where i ` 1 is a witness for T J ri ` 1s ď r̃i`1 , thus computing T K r2M s lets us derive a witness as well. Thus, problem P can be solved by a single call to T CCp2M, 3M 2 W̄ q. 17 The results above prove the following theorem. Theorem 4.8. We have pmin, `qconv ”2 CC ”2 UnboundedKnapsack. Furthermore, the bounded version of Knapsack admits no strongly subquadratic-time algorithm unless pmin, `qconvolution can be solved in strongly subquadratic time. Proof. Lemmas 4.5 and 4.6 prove pmin, `qconv ”2 oiCC, while Observation 1 and Lemma 4.7 establish oiCC ”2 CC ”2 UnboundedKnapsack, yielding the first claim. The second claim follows from inspecting the proofs of Lemma 4.5, Lemma 4.7 and the first claim of Observation 1 and observing that we only reduce to CC/Knapsack instances in which the optimal multiset (for each total size) is always a set, i.e., uses each element at most once. 5 Chain LWS In this section we consider a special case of of Least-Weight Subsequence problems called the Chain Least-Weight Subsequence. This captures problems in which edge weights are given implicitly by a relation R that determines which pairs of data items we are allowed to chain – the aim is to find the longest chain. An example of a Chain Least-Weight Subsequence problem is the NestedBoxes problem. Given n boxes in d dimensions, given as non-negative, d-dimensional vectors b1 , . . . , bn , find the longest chain such that each box fits into the next (without rotation). We say box that box a fits into box b if for all dimensions 1 ď i ď d, ai ď bi . NestedBoxes is not immediately a least-weight subsequence problem, as for least weight subsequence problems we are given a sequence of data items, and require any sequence to start at the first item and end at the last. We can easily convert NestedBoxes into a LWS problem by sorting the vectors by the sum of the entries and introducing two special boxes, one very small box K such that K fits into any box bi and one very large box J such that any bi fits into J. We define the chain least-weight subsequence problem with respect to any relation R and consider a weighted version where data items are given weights. To make the definition consistent with the definition of LWS the output is the weight of the sequence that minimizes the sum of the weights. Problem 5.1 (ChainLWS). Fix a set of objects X and a relation R Ď X ˆ X. We define the following LWS instantiation ChainLWSpRq “ LWSpWChainLWSpRq q. Data items: sequence of objects x0 , . . . , xn P X with weights w1 , . . . , wn P t´W, . . . , W u. # wj if pxi , xj q P R, for 0 ď i ă j ď n. Weights: wi,j “ 8 otherwise, The input to the (weighted) chain least-weight subsequence problem is a sequence of data items, and not a set. Finding the longest chain in a set of data items is NP-complete in general. For example, consider the box overlap problem: The input is a set of boxes in two dimensions, given by the top left corner and the bottom right corner, and the relation consists of all pairs such that the two boxes overlap. This problem is a generalization of the Hamiltonian path problem on induced subgraphs of the two-dimensional grid, which is an NP-complete problem [29]. We relate ChainLWSpRq to the class of selection problems with respect to the same relation R. 18 Problem 5.2 (Selection Problem). Given data items a1 , . . . , an , b1 , . . . , bn and a relation Rpai , bj q, determine if there is a pair i, j satisfying Rpai , bj q. We denote this selection problem with respect to a relation R by SelectionpRq. The class of selection problems includes several well studied problems including MinInnProd, OV [39, 4] and VectorDomination [26]. We will use the selection problems in the search variant, where we find a pair satisfying the R if such a pair exists. To reduce the the search variant to the decision variants in a fine-grained way, we can use a simple, binary search type reduction from the decision problem to the search problem: We give a subquadratic reduction from ChainLWSpRq to SelectionpRq that is independent of R. Theorem 5.3. For all relations R such that R can be computed in time subpolynomial in the number of data items n, ChainLWSpRq ď2 SelectionpRq. The proof is again based on Static-LWS and a variation on a trick of [40]. As an intermediate step, we define Static-ChainLWS as the equivalent of Static-LWS in the special case for chains. Problem 5.4 (Static-ChainLWS). Fix an instance of ChainLWSpRq. Given intervals I :“ ta ` 1, . . . , a ` N u and J :“ ta ` N ` 1, . . . , a ` 2N u for some a and N , together with the correctly computed values T ra ` 1s, . . . , T ra ` N s, the Static Chain Least-Weight Subsequence Problem (Static-ChainLWS) asks to determine T 1 rjs :“ min iPI:Rpi,jq T ris ` wj for all j P J. Similar to the definition of ChainLWS, Static-ChainLWS is the special case of Static-LWS where the the weights wi,j are restricted to be either wj or 8, depending on R. As a result, Lemma 3.5 applies directly. Corollary 5.5 (ChainLWSpRq ď2 Static-LWSpRq). For any R, if Static-ChainLWSpRq can be solved in time Opn2´ε q for some ε ą 0, then ChainLWSpRq can be solved in time Õpn2´ε q. We now reduce Static-ChainLWSpRq to SelectionpRq with a variation on the trick by [40]. Lemma 5.6 (Static-ChainLWSpRq ď2 SelectionpRq). For all relations R such that R can be computed in time subpolynomial in the number of data items n, Static-ChainLWSpRq ď2 SelectionpRq. Proof. As a first step, we sort the data items ai , i P I “ ta ` 1, . . . , a ` N u by T ris in increasing order and we will assume for the remainder of the proof that for all?a ` 1 ď i ă a ` N we have T ris ď T ri ` 1s. We then split the set aa`1 , . . . , aa`N into g :“ r N s groups A1 , . . . , Ag with Ai “ tapi´1qrN {gs , . . . , airN {gs´1 u. We split the set ba`N `1 , . . . , ba`2N into B1 , . . . , Bg in a similar fashion. We then iterate over all pairs Ak , Bl with k, l P rgs in lexicographic order, and for each pair we do the following. Call the oracle for SelectionpRq on the input Ak , Bl to find a pair ai , bj such that the relation R is satisfied on the pair. If there is no such pair, move to the next pair Ak˚ , Bl˚ of sets of data items. If there is such a pair, find the first element ai˚ P Ak such that Rpai˚ , bj q using a simple linear scan. As we first sorted A and iterate over sets Ak , Bl in lexicographic order, we have T 1 rjs “ T ri˚ s ` wj . We then remove bj from Bl and repeat. 19 For the runtime analysis, we observe, that the oracle can find a pair of elements at most OpN q times, as each time we find a pair we remove an element from the input. In the case where we do find a pair of elements we do a linear scan that takes OpN {gq time. Furthermore, each pair of sets Ak , Bl can fail to find a?pair at most once. Hence, if T Selection is the time to solve the selection problem and using g “ N we get a time of ? ? ? ? T pN q “ N T Selection p N q ` N pT Selection p N q ` N q “ N T Selection p N q (8) which is subquadratic if T Selection pN q is subquadratic. Theorem 5.7. Let D be the set of possible data items. For any relation R such that • There is a data item K such that pK, dq P R for all d P D. • There is a data item J such that pd, Jq P R for all d P D. • For any set of data items d1 , . . . , dn there is a sequence i1 , . . . , in such that for any j ă k, pdij , dik q R R. This ordering can be computed in time Opn2´δ q for δ ą 0. We call this ordering the natural ordering. Then SelectionpRq ď2 ChainLWSpRq. Proof. We construct an unweighted ChainLWS problem with all weights set to ´1, so that the problem is to find the longest chain. Let a1 , . . . an and b1 , . . . , bn be the data items of SelectionpRq and sort both sets according to the natural ordering. We claim that for the sequence of data items K, a1 , . . . an , b1 , . . . , bn , J the weight of the least weight subsequence is ´3 exactly if there is a pair pai , bj q P R. Because of the property of the natural ordering, any valid subsequence starting at K and ending at J contains at most one element ai and at most one element bj . If there is a pair pai , bj q P R, then the sequence K, ai , bj , J will have value ´3. If there is no such pair, any valid sequence contains at most one element other than K and J and its value is therefore at least ´2. The proof is in the appendix. In the rest of the section we give some interesting instantiations of the subquadratic equivalence of Selection and ChainLWS. Corollary 5.8 (NestedBoxes ”2 VectorDomination). The weighted NestedBoxes problem 2 on d “ c log n dimensions can be solved in time n2´p1{Opc log cqq . For d “ ωplognq, the (unweighted) NestedBoxes problem cannot be solved in time Opn2´ε q for any ε ą 0 assuming SETH. Proof. Let R be the relation that contains all pairs of non-negative, d-dimensional vectors a, b such that ai ď bi for all i. Now SelectionpRq is VectorDomination, and ChainLWSpRq is the NestedBoxes problem. Using the reduction from Theorem 5.3 and the algorithms for vector domination of the stated runtime [26, 13] we immediately get an algorithm for NestedBoxes. We apply Theorem 5.7 with J “ W d where W is the largest coordinate in all input vectors, K “ 0d and use the sum of the coordinates of the boxes as the natural ordering. SETH-hardness of NestedBoxes then follows from the SETH-hardness of vector domination [39]. 20 If we restrict NestedBoxes and VectorDomination to Boolean vectors, then we get SubsetChain and SetContainment respectively. In this case the upper bound improves to n2´1{Oplog cq [4]. We would like to point out that the definition of ChainLWS requires the input to be a sequence of data items, and not a set. Consider the following definition: Problem 5.9 (ChainSet). Let a set of data items data items tx0 , . . . , xn u, weights w1 , . . . , wn´1 P t´W, . . . , W u and a relation Rpxi , xj q be given. The chain set problem for R, denoted ChainSetpRq asks to find the weight sequence i0 , i1 , i2 , . . . , ik such that for all j with 1 ď j ď k the pair pxij´1 , xij q řk´1 is in the relation R and the weight j“1 wij is minimized. While ChainLWS can always be solved in quadratic time, ChainSet is NP-complete. For example, consider the box overlap problem: The input is a set of boxes in two dimensions, given by the top left corner and the bottom right corner, and the relation consists of all pairs such that the two boxes overlap. This problem is a generalization of the Hamiltonian path problem on induced subgraphs of the two-dimensional grid, which is an NP-complete problem [29]. This is a formal barrier to a more general reduction than Theorem 5.7, as we need some mechanism to impose an ordering on the data items. 6 Near-linear time algorithms In this section, we classify problems to be solvable in near-linear time using the lens of our framework. Note that in these instances, near-linear time solutions have already been known, however, our focus on the static variants of LWS provides a simple, general approach to find fast algorithms by identifying a simple “core” problem. Since in this paper, we generally ignore subpolynomial factors in the running time, we concentrate here on the reduction from some LWS variant to its corresponding core problem and disregard reductions in the other direction. 6.1 Longest Increasing Subsequence The longest increasing subsequence problem LIS has been first investigated by Fredman [18], who gave an Opn log nq-time algorithm and gave a corresponding lower bound based on Sorting. The following LWS instantiation is equivalent to LIS. Problem 6.1 (LIS). We define the following LWS instantiation LIS “ LWSpWLIS q. Data items: integers # x1 , . . . , xn P t1, . . . , W u ´1 if xi ă xj Weights: wi,j “ 8 ow. It is straightforward to verify that ´T rns yields the value of the longest increasing subsequence of x1 , . . . , xn . Using the static variant of LWS introduced in Section 3, we observe that LIS effectively boils down to Sorting. Oberservation 2. LIS can be solved in time Õpnq. Proof. By Lemma 3.5, we can reduce LIS to the static variant Static-LWSpWLISq. It is straightforward to see that the latter can be reformulated as follows: Given pa1 , T r1sq, . . . , paN , T rN sq and 21 b1 , . . . , bN , determine for every j “ 1, . . . , N , the value T 1 rjs “ ´1 ` min1ďiďN,ai ăbj T ris. To do so, it suffices to sort the first list as pai1 , T ri1 sq, . . . , paiN , T riN sq with ai1 ď ¨ ¨ ¨ ď aiN and the second as bj1 , . . . , bjN with bj1 ď ¨ ¨ ¨ ď bjN . Finally, a single pass over both lists will do: For each k “ 1, . . . , N , we search for the largest ℓ such that aiℓ ă bjk , then the T 1 -value corresponding to bjℓ is ´1 ` min1ďℓ1 ďℓ T riℓ1 s. By this approach, it is easy to see that after sorting, these values can be computed in time OpN q. For the exact running time, note that solving Static-LWSpWLIS q takes time OpN log N q due to sorting, yielding a Opn log2 nq-time algorithm for LIS by Lemma 3.5. 6.2 Unbounded Subset Sum UnboundedSubsetSum is a variant of the classical SubsetSum, in which repetitions of elements are allowed. While improved pseudo-polynomial-time algorithms for SubsetSum could only recently be found [32, 10], there is a simple algorithm solving UnboundedSubsetSum in time Opn log nq [10]. It can be cast into an LWS formulation as follows. Problem 6.2 (UnboundedSubsetSum). We define the following LWS instantiation LIS “ LWSpWUSS q. Data items: S Ď#rns 0 if j ´ i P S Weights: wi,j “ 8 ow. Note that in this formulation, T rns “ 0 iff there is a multiset of numbers from S that sums up to n. It is a straightforward observation that the static variant of UnboundedSubsetSum can be solved by classical convolution, i.e., p¨, `q-convolution. Oberservation 3. UnboundedSubsetSum can be solved in time Õpnq. Proof. Noting that all weights wi,j are either 0 or 8, it is easy to see that the static variant Static-LWSpWUSS q can be reformulated as follows: Given a subset X Ď I “ ta ` 1, . . . , a ` N u, determine, for all j P J “ ta`N `1, . . . , a`2N u, whether there exists some i P X such that j ´i P S. To do so, we do the following: We represent X as an N -bit vector x “ px1 , . . . , xN q P t0, 1uN with xi “ 1 iff. a ` i P X. Furthermore, we represent the “relevant part” of S by defining a 2N -bit vector s “ ps1 , . . . , s2N q P t0, 1u2N with si “ 1 iff. i P S. Then the p¨, `q-convolution r “ x f s of x and s allows us to determine T 1 ra ` N ` js for j “ 1, . . . , N : this values is 0 iff rN `j ą 0 and 8 otherwise. Correctness follows from the observation that rN `j ą 0 is equivalent to the existence of some i P rN s and k P r2N s with i ` k “ N ` j and xi “ sk “ 1. This in turn is equivalent to a ` i P X and pa ` N ` jq ´ pa ` iq “ N ` j ´ i “ k P S, as desired. Thus Static-LWSpWUSS q can be solved by a single convolution computation, which can be performed in time OpN log N q. Thus by Lemma 3.5, this gives rise to a Opn log2 nq-time algorithm for UnboundedSubsetSum. 6.3 Concave LWS The concave LWS problem is a special case of LWS in which the weights satisfy the quadrangle inequality. Since a complete description of the input instance consists of Ωpn2 q weights, we use the standard assumption that each wi,j can be queried in constant time. This allows for sublinear solutions in the input description, in particular there exist Opnq-time algorithms [38, 21]. 22 Problem 6.3 (ConcLWS). We define the following LWS instantiation LIS “ LWSpWconc q. Weights: wi,j given by oracle access, satisfying wi,j ` wi1 ,j 1 ď wi1 ,j ` wi,j 1 for i ď i1 ď j ď j 1 . We revisit ConcLWS and its known connection to the problem of computing column (or row) minima in a totally monotone5 pn ˆ nq-matrix, which we call the SMAWK problem because of its remarkable Opnq-time solution called the SMAWK algorithm [5]. Oberservation 4. ConcLWS can be solved in time Õpnq. Proof. The static variant of ConcLWS can be formulated as follows: Given intervals I “ ta ` 1, . . . , a ` N u and J “ ta ` N ` 1, . . . , a ` 2N u, we define a matrix M :“ pmi,j qiPI,jPJ q with mi,j “ T ris ` wi,j . It is easy to see that M is a totally monotone matrix since w satisfies the quadrangle inequality. Note that the minimum of column j P J in M is miniPI T ris ` wi,j “ T 1 rjs by definition. Thus, using the SMAWK algorithm we can determine all T 1 rjs in simultaneously in time OpN q. Thus by Lemma 3.5, we obtain an Opn log nq-time algorithm for ConcLWS. Acknowledgments. We would like to thank Karl Bringmann and Russell Impagliazzo for helpful discussions and comments. References [1] Amir Abboud, Arturs Backurs, and Virginia Vassilevska Williams. Quadratic-time hardness of LCS and other sequence similarity measures. In Proc. 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS’15), pages 59–78, 2015. [2] Amir Abboud, Thomas Dueholm Hansen, Virginia Vassilevska Williams, and Ryan Williams. Simulating branching programs with edit distance and friends or: A polylog shaved is a lower bound made. In Proc. 48th Annual ACM Symposium on Symposium on Theory of Computing (STOC’16), 2016. To appear. [3] Amir Abboud, Virginia Vassilevska Williams, and Oren Weimann. Consequences of faster alignment of sequences. In Proc. 41st International Colloquium on Automata, Languages, and Programming (ICALP’14), pages 39–51, 2014. [4] Amir Abboud, Ryan Williams, and Huacheng Yu. More applications of the polynomial method to algorithm design. In Proc. 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’15), pages 218–230, 2015. [5] Alok Aggarwal, Maria M. Klawe, Shlomo Moran, Peter W. Shor, and Robert E. Wilber. Geometric applications of a matrix-searching algorithm. Algorithmica, 2:195–208, 1987. [6] Alfred V. Aho, Daniel S. Hirschberg, and Jeffrey D. Ullman. Bounds on the complexity of the longest common subsequence problem. Journal of the ACM, 23(1):1–12, 1976. 5 A matrix M “ pm q 1 1 i,j i,j is totally monotone if for all i ă i and j ă j , we have that mi,j ą mi1 ,j implies that mi,j 1 ą mi1 ,j 1 . For a more comprehensive treatment, we refer to [5, 21]. 23 [7] Arturs Backurs and Piotr Indyk. Edit distance cannot be computed in strongly subquadratic time (unless SETH is false). In Proc. 47th Annual ACM Symposium on Theory of Computing (STOC’15), pages 51–58, 2015. [8] David Bremner, Timothy M. Chan, Erik D. Demaine, Jeff Erickson, Ferran Hurtado, John Iacono, Stefan Langerman, Mihai Patrascu, and Perouz Taslakian. Necklaces, convolutions, and X+Y. Algorithmica, 69(2):294–314, 2014. [9] Karl Bringmann. Why walking the dog takes time: Frechet distance has no strongly subquadratic algorithms unless SETH fails. In Proc. 55th Annual IEEE Symposium on Foundations of Computer Science (FOCS’14), pages 661–670, 2014. [10] Karl Bringmann. A near-linear pseudopolynomial time algorithm for subset sum. In Proc. 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’17), pages 1073–1084, 2017. [11] Karl Bringmann and Marvin Künnemann. Quadratic conditional lower bounds for string problems and dynamic time warping. In Proc. 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS’15), pages 79–97, 2015. [12] Marco L. Carmosino, Jiawei Gao, Russell Impagliazzo, Ivan Mihajlin, Ramamohan Paturi, and Stefan Schneider. Nondeterministic extensions of the strong exponential time hypothesis and consequences for non-reducibility. In Proc. 7th ACM Conference on Innovations in Theoretical Computer Science (ITCS’16), pages 261–270, 2016. [13] Timothy M Chan. Speeding up the four russians algorithm by about one more logarithmic factor. In Proc. 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’15), pages 212–217. Society for Industrial and Applied Mathematics, 2015. [14] Timothy M. Chan and Moshe Lewenstein. Clustered integer 3sum via additive combinatorics. In Proc. 47th Annual ACM Symposium on Theory of Computing, (STOC’15), pages 31–40, 2015. [15] Mark de Berg, Kevin Buchin, Bart M. P. Jansen, and Gerhard J. Woeginger. Fine-grained complexity analysis of two classic TSP variants. In Proc. 43rd International Colloquium on Automata, Languages, and Programming (ICALP’16), pages 5:1–5:14, 2016. [16] David Eppstein. Sequence comparison with mixed convex and concave costs. J. Algorithms, 11(1):85–101, 1990. [17] David A. Eppstein. Efficient algorithms for sequence analysis with concave and convex gap costs. PhD thesis, Columbia University, 1989. [18] Michael L. Fredman. On computing the length of longest increasing subsequences. Discrete Mathematics, 11(1):29 – 35, 1975. [19] Anka Gajentaan and Mark H Overmars. On a class of o (n2) problems in computational geometry. Computational geometry, 5(3):165–185, 1995. [20] Zvi Galil and Raffaele Giancarlo. Speeding up dynamic programming with applications to molecular biology. Theoretical Computer Science, 64(1):107–118, 1989. 24 [21] Zvi Galil and Kunsoo Park. A linear-time algorithm for concave one-dimensional dynamic programming. Inf. Process. Lett., 33(6):309–311, 1990. [22] Zvi Galil and Kunsoo Park. Parallel algorithms for dynamic programming recurrences with more than O(1) dependency. J. Parallel Distrib. Comput., 21(2):213–222, 1994. [23] Jiawei Gao, Russell Impagliazzo, Antonina Kolokolova, and Ryan Williams. Completeness for first-order properties on sparse structures with algorithmic applications. In Proc. 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’17), pages 2162–2181, 2017. [24] A. Grønlund, K. Green Larsen, A. Mathiasen, J. Sindahl Nielsen, S. Schneider, and M. Song. Fast Exact k-Means, k-Medians and Bregman Divergence Clustering in 1D. ArXiv e-prints, January 2017. arXiv:1701.07204. [25] Daniel S. Hirschberg and Lawrence L. Larmore. The least weight subsequence problem. SIAM Journal on Computing, 16(4):628–638, 1987. [26] Russell Impagliazzo, Shachar Lovett, Ramamohan Paturi, and Stefan Schneider. 0-1 integer linear programming with a linear number of constraints. arXiv preprint arXiv:1401.5512, 2014. [27] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. Journal of Computer and System Sciences, 62(2):367 – 375, 2001. [28] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63(4):512–530, 2001. [29] Alon Itai, Christos H Papadimitriou, and Jayme Luiz Szwarcfiter. Hamilton paths in grid graphs. SIAM Journal on Computing, 11(4):676–686, 1982. [30] Maria M. Klawe and Daniel J. Kleitman. An almost linear time algorithm for generalized matrix searching. SIAM J. Discrete Math., 3(1):81–97, 1990. [31] Donald E. Knuth and Michael F. Plass. Breaking paragraphs into lines. Softw., Pract. Exper., 11(11):1119–1184, 1981. [32] Konstantinos Koiliaris and Chao Xu. A faster pseudopolynomial time algorithm for subset sum. In Proc. 28th Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA’17), pages 1062–1072, 2017. [33] Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Lower bounds based on the exponential time hypothesis. Bulletin of the EATCS, 105:41–72, 2011. [34] William J. Masek and Mike Paterson. A faster algorithm computing string edit distances. Journal of Computer and System Sciences, 20(1):18–31, 1980. [35] Webb Miller and Eugene W. Myers. Sequence comparison with concave weighting functions. Bulletin of Mathematical Biology, 50(2):97–120, 1988. [36] David Pisinger. Dynamic programming on the word RAM. Algorithmica, 35(2):128–145, 2003. [37] Virginia Vassilevska Williams. Hardness of Easy Problems: Basing Hardness on Popular Conjectures such as the Strong Exponential Time Hypothesis (Invited Talk). In Proc. 10th International Symposium on Parameterized and Exact Computation (IPEC’15), pages 17–29, 2015. 25 [38] Robert E. Wilber. The concave least-weight subsequence problem revisited. J. Algorithms, 9(3):418–425, 1988. [39] Ryan Williams. A new algorithm for optimal 2-constraint satisfaction and its implications. Theoretical Computer Science, 348(2):357–365, 2005. [40] Virginia Vassilevska Williams and Ryan Williams. Subcubic equivalences between path, matrix and triangle problems. In Proc. 51st Annual IEEE Symposium on Foundations of Computer Science (FOCS’10), pages 645–654, 2010. [41] F. Frances Yao. Efficient dynamic programming using quadrangle inequalities. In Proc. 12th Annual ACM Symposium on Theory of Computing (STOC’80), pages 429–435, 1980. 26
8cs.DS
arXiv:1504.06363v1 [cs.DS] 23 Apr 2015 On the Runtime of Randomized Local Search and Simple Evolutionary Algorithms for Dynamic Makespan Scheduling Frank Neumann Optimisation and Logistics School of Computer Science The University of Adelaide Adelaide, Australia Carsten Witt DTU Compute Technical University of Denmark 2800 Kgs. Lyngby, Denmark February 20, 2018 Abstract Evolutionary algorithms have been frequently used for dynamic optimization problems. With this paper, we contribute to the theoretical understanding of this research area. We present the first computational complexity analysis of evolutionary algorithms for a dynamic variant of a classical combinatorial optimization problem, namely makespan scheduling. We study the model of a strong adversary which is allowed to change one job at regular intervals. Furthermore, we investigate the setting of random changes. Our results show that randomized local search and a simple evolutionary algorithm are very effective in dynamically tracking changes made to the problem instance. Optimization problems in real-world applications often change due to a changing environment. Evolutionary algorithms, ant colony optimization and other bio-inspired search heuristics have been frequently applied to dynamically changing problems. An important approach to gain a theoretical understanding of evolutionary algorithms and other types of bio-inspired computation methods is the computational complexity analysis of these algorithms. During the last 20 years, a large body of results and methods has been built up. This includes the development of methods for the analysis of bio-inspired computing [4, 6, 7, 25] and results for some of the best-known combinatorial optimization problems such as the traveling salesperson problem [21], set cover [5, 26], and makespan scheduling [22, 23] as well as different multi-objective problems [8, 17, 19]. These studies often consider the algorithms called Randomized Local Search (RLS) and (1+1) EA, which we also investigate in this paper. Although these algorithms seem to be relatively simple, it should be noted that upper bounds on the expected optimization time of these algorithms can often be translated to population-based evolutionary algorithms with more complicated variation operators, e. g., crossover by increasing the upper bounds by only a linear factor with respect 1 to population and problem size [7]. We refer the reader to [1, 11, 16] for comprehensive presentations of this research area. In recent years, the computational complexity analysis of these algorithms on dynamically changing problems has gained increasing interest [9, 12, 14, 15, 18, 20]. We study one of the classical combinatorial optimization problems, namely makespan scheduling on two machines. We consider RLS and (1+1) EA and analyze how they are able to keep track of changes that occur to the processing times of the given jobs. In our investigations, we examine two models of dynamic changes where in each iteration at most the processing time of one job can be changed. In the adversary model, an adversary is able to change the processing time pi ∈ [L,U] of an arbitrary job i, possibly repeated at regular intervals. First, we show that even for very frequent and arbitrary changes, the algorithms are able to obtain solutions of discrepancy at most U frequently during the run of the algorithm. Afterwards, we show that RLS and (1+1) EA can maintain solutions of discrepancy at most U if the period of changes is not too small. In the random model, processing times are from the set {1, . . . , n} and an adversary is able to pick the job i to be changed. The processing time pi of the chosen job is undergoing a random change and is either increased or decreased by 1. For the random model, we show that the (1+1) EA obtains solutions of discrepancy O(log n) in time O(n4 log n) regardless of the initial solution and that the expected ratio between discrepancy and makespan is at most 6/n at least once in a phase of O(n3/2 ) iterations. The outline of the paper is as follows. We introduce the dynamic makespan problem and the algorithms under investigation in Section 1. Our analyses for the adversary model is presented in Section 2 and the random model is investigated in Section 3. Finally, we finish with some conclusions. 1 Preliminaries We investigate the performance of randomized local search and a simple evolutionary algorithm for a dynamic version of the classical makespan problem. Given n jobs and their processing times pi > 0, 1 ≤ i ≤ n, the goal is to assign each job to one of two machines M1 and M2 such that the makespan is minimized. A candidate solution is given by a vector x ∈ {0, 1}n, where job i is assigned to machine M1 if xi = 0 and assigned to machine M2 if xi = 1, 1 ≤ i ≤ n. The makespan of a candidate solution x is given by ) ( f (x) = max n n i=1 i=1 ∑ pi (1 − xi), ∑ pi xi x∗ and the goal is to find a solution which minimizes f . We denote by |M j | the load of machine j = 1, 2. We consider the dynamic version of the problem where exactly one job changes. We will also allow such changes to be repeated at regular intervals. We assume pi ∈ [L,U], 1 ≤ i ≤ n, where L is a lower bound on the processing time of any job and U is an upper bound. We denote by R = U/L the ratio between upper and lower bound. Randomized local search (RLS) (see Algorithm 1) starts with a candidate solution x and produces in each iteration a new solution y by flipping one randomly chosen bit of 2 Algorithm 1: RLS. choose x ∈ {0, 1}n; while stopping criteria not fullfilled do y ← x; flip one bit of y chosen uniformly at random; if f (y) ≤ f (x) then x ← y Algorithm 2: (1+1) EA. choose x ∈ {0, 1}n; while stopping criteria not fullfilled do y ← x; flip each bit of y independently with prob. 1/n; if f (y) ≤ f (x) then x ← y x. (1+1) EA (see Algorithm 2) works with a more flexible mutation operator which flips each bit with probability 1/n. The two introduced algorithms are standard benchmark algorithms in the area of runtime analysis of evolutionary computation [1, 11, 16]. While evolutionary algorithms usually work with a larger population and potentially also a crossover operator, usually positive statements on (1+1) EA transfer to elitist population-based evolutionary algorithms by losing only a polynomial factor dependent on the problem and population size [7]. This holds for all results obtained in this paper as well as long as there is in each iteration an inverse polynomial probability of selecting each individual of the parent population, selection does not accept worsenings of the worst fitness value from the population, and only the variation operator of (1+1) EA is applied. We study the runtime behaviour of RLS and (1+1) EA on the introduced dynamic makespan scheduling problem and their ability to obtain solutions of good discrepancy. For our theoretical investigations, we do not consider any stopping criteria and measure runtime by the number of iterations of the while-loop to achieve a solution of desired quality. The expected number of iterations is referred to as the expected time to reach the desired goal. In our investigations, we denote by ! ! n d(x) = ∑ pi (1 − xi) i=1 n − ∑ p i xi , i=1 the discrepancy of the solution x. We will study the expected time, for different scenarios, until RLS and (1+1) EA have produced solutions of small discrepancy. We state an important property on the number of jobs on the fuller machine (i. e., the heavier loaded machine, which determines the makespan), which can easily be derived by taking into account the upper (U) and lower (L) bound on the processing times. 3 • Every solution has at least ⌈(P/2)/U⌉ ≥ ⌈(n/2)(L/U)⌉ = ⌈(n/2) · R−1⌉ jobs on the fuller machine. 2 Adversary Model In this section, we consider the case of a strong adversary. In one change, the adversary is allowed to pick one job i to be changed and is able to choose an arbitrary new processing time pi ∈ [L,U]. 2.1 Obtaining a discrepancy of at most U We start our analysis by presenting upper bounds for RLS and (1+1) EA to obtain a discrepancy of at most U from any starting solution. 2.1.1 RLS We first consider RLS and show that the algorithm obtains a solution of discrepancy at most U in expected time O(n min{log n, log R}). This bound holds independently of the initial solution and the number of changes made by the adversary. The only requirement is that the adversary makes at most one change at a time. The proof uses the fact that for RLS the number of jobs on the fuller machine does not increase until the fuller machine switches. Theorem 1 The expected time until RLS has obtained a solution x with d(x) ≤ U is O(n min{log n, log R}) independently of the initial solution and the number of changes made by the adversary. Proof. We assume that we are starting with an arbitrary solution assigning the jobs to the two machines. Let x be the current solution and consider in each point in time the fuller machine. The number of jobs on the fuller machine does not increase as this would lead to a larger discrepancy. We claim that if the fuller machine switched (either by moving a single job or by a single change of the adversary) then a solution of discrepancy at most U has been obtained in the step before and after the switch. Note that moving one job to another machine changes the load on each machine by at most U and that the adversary can change the load on each machine by at most U − L. So, the step switching the fuller machine (accepted or rejected) reduces the load on the fuller machine from P/2 + α , where P = ∑ni=1 pi , to P/2 − β where α + β ≤ U. This implies min{α , β } ≤ U/2 and therefore a discrepancy of at most U directly before and/or after the fuller machine has switched. Note, that such a step is only accepted by RLS iff β ≤ α and that a discrepancy of at most U has been obtained if the step is accepted. On the other hand, the case α < β which is rejected by RLS implies a discrepancy of at most U before the switch. The fuller machine has at least ⌈(n/2) · R−1 ⌉ jobs. Let k be the number of jobs on the fuller machine. Then the probability to reduce the number of jobs on the fuller 4 machine is nk and the expected waiting time for such a step is n/k. Summing up, the expected time to switch the fuller machine is at most n n k k=max{⌈(n/2)·R−1 ⌉,1} ∑ We have two cases. If R ≥ n/2, the sum is at most nHn = O(n log n), where Hn is the n-th Harmnoic number. If R < n/2, the sum is at most n ln n + 1 − n ln(n/(2R)) = O(n log R). Altogether, after at most O(n min{log n, log R}) steps a solution of discrepancy at most U has been obtained. 2.1.2 (1+1) EA In Theorem 1, we exploited that accepted steps of RLS cannot increase the number of jobs on the fuller machines. In contrast, the (1+1) EA may move few big jobs from the fuller to the emptier machine and many small jobs the other way round if the accumulated effect of the step decreases the discrepancy. Such multiple-bit flips, which may increase the number of jobs on the fuller machine, arise in a similar way in the analysis of the (1+1) EA on linear functions, where they complicate the analysis considerably [24]. However, it is also known that the number of incorrectly set bits in the (1+1) EA (corresponding to the number of jobs on the fuller machine) has a drift towards 0. We are going to show that this drift leads in time O(n3/2 ) to the situation that the fuller machine switches, which was analyzed in Theorem 1. We cannot show the bound O(n log n) using the advanced drift techniques from [24] since the dynamics of the job sizes do not allow us to use the potential function from the literature. Theorem 2 The expected time until the (1+1) EA has obtained a solution x with d(x) ≤ U is O(n3/2 ) independently of the initial solution and the number of changes made by the adversary. Proof. We start with a given search point x0 , where the time index w. l. o. g. is 0. W. l. o. g., M1 is the fuller machine w. r. t. x0 . We write ℓt to denote the load of M1 after t steps. Now, let T denote the first point in time where ℓt ≤ P/2 + U/2. At this time, M1 might still be the fuller machine, which implies a discrepancy at most U. Only if ℓT < P/2 −U/2, the discrepancy is greater than U. Note that ℓT −1 > P/2 +U/2 and each job size is at most U. Each step resulting in ℓT < P/2−U/2 must flip at least 2 bits and can be converted into a step resulting in ℓT ∈ [P/2 −U/2, P/2 +U/2] by conditioning on that a certain subset of bits do not flip. Note that the step defined by the stopping time T may be required to flip already more than one bit to reach ℓT ≤ P/2 + U/2 or even no bits may flip at all if the adversary is responsible for reaching ℓT ≤ P/2 +U/2; in the latter case, already discrepancy at most U has been obtained. Note also that flipping bits in addition to the ones required to reach ℓT ≤ P/2 + U/2 may result in a rejected step. If we condition on the step flipping as few additional bits as possible, we are guaranteed to enter the interval [P/2 − U/2, P/2 + U/2] for the load of the fuller machine, resulting in an accepted step. The probability of not flipping a certain subset of bits is at least (1 − 1/n)n ≥ e−2 . Hence, if the step leading to time T flips more than 5 the required bits, we repeat the following analysis and increase the expected time by a factor of at most e2 . We denote by N1 (xt ) the number of jobs on M1 with respect to xt , the current search point after t steps. Based on this, we define the potential function ( N1 (xt ) if t < T d(xt ) := 0 otherwise. Hence, the potential function reflects the number of jobs on the fuller machine before time T and is set to 0 afterwards. As we have argued, the discrepancy at time T is at most U with probabiblity at least e−2 . The aim now is to bound E[T ], which is achieved by bounding the expression E[d(xt ) − d(xt+1 ) | xt ;t < T ] from below and performing drift analysis. In what follows, we use the notation Xt := d(xt ). Since it is necessary to move at least one job from the fuller machine to change the d-value, which happens with probability at least 1/(en) for each of these jobs, and each job on the emptier machine switches machine with probability at most 1/n, we get the bound on the drift   Xt n − Xt X2 E[Xt − Xt+1 | Xt ;t < T ] ≥ (1) 1− = t2 , en n en which is at least 1/(en2). Hence, despite the fact that the number of jobs on the fuller may increase, its decreases in expectation. Since the maximal d-value is n, we get E[T ] = O(n3 ) by additive drift analysis [6]. However, the pessimistic process analyzed here has already been more closely investigated in the literature. It has been (apart from irrelevant differences in details) modeled by a process called PO-EA by [10], which was recently revisited by [2]. Using this analysis, the bound can be improved to O(n3/2 ). In the following, we present a self-contained proof of the O(n3/2 ) bound using a novel potential function that is easier to handle than the one proposed in the literature. Intuitively, our potential function exploits that the process mostly moves due to √ the variance of the one-step change (instead of the very small drift) in the regime√Xt ≤ n whereas it is governed by the actual drift E[Xt − Xt+1 | Xt ] when Xt is above n. For x ≥ 0, let the potential function be ( √ √ x(ln( n) + 2 − ln(x)) if x ≤ n, g(x) := √ otherwise. 3 n − nx We note that g(x) is monotone increasing and continuous on [0, n]. Moreover, the derivative satisfies ( √ √ ln( n) + 1 − ln(x) if x ≤ n, dg ′ = n g (x) := dx otherwise. x2 6 and is non-increasing and continuous as well. Hence, g(x) is a concave function. The second derivative equals ( √ −1/x if x ≤ n, d2 g ′′ g (x) := 2 = dx otherwise. − 2n x3 and satisfies g′′ (x) ≤ −1/x for x ≤ n. By the mean-value theorem, we get for all x ≤ n and for y ≥ 0 that g(x) − g(x − y) ≥ yg′ (x) ≥ g(x + y) − g(x). (2) Moreover, by developing Taylor expansions of g(x − y) and g(x + y) up to terms of fourth order, it is easy to see that (g(x) − g(x − y)) − (g(x + y) − g(x)) ≥ − d2 g 1 ≥ . dx2 x (3) We are now going to analyze the drift of the process defined by Yt := g(Xt ). To this end, it is useful to decompose the drift into a positive and negative part. Define ∆− X := (Xt − Xt+1 ) · 1{Xt+1 ≤ Xt } and ∆+ X := (Xt+1 − Xt ) · 1{Xt+1 ≥ Xt } + − and Y and∆Y with respect to the Y -process. Note that E[Xt − Xt+1 | Xt ] =  accordingly   ∆+ − E ∆X | Xt − E ∆X | Xt and accordingly for the drift of the Y -process. Combining this decomposition with (2), we obtain E[Yt − Yt+1 | Xt ]    +  ′ ≥ g′ (Xt ) · E ∆− X | Xt − g (Xt )E ∆X | Xt = g′ (Xt )E[Xt − Xt+1 | Xt ]. If Xt > √ n, plugging in the expression for g′ (Xt ) and the bound (1) yields E[Yt − Yt+1 | Xt ] ≥ 1 n Xt2 = , · Xt2 en2 en which does √ not depend on Xt . If Xt ≤ n, we combine the decomposition with (3) and get for some value a(Xt ) that E[Yt − Yt+1 | Xt ]      +  1 E ∆− ≥ a(Xt ) + X | Xt − a(Xt )E ∆X | Xt Xt  −  E ∆X | Xt ≥ + a(Xt )E[Xt − Xt+1 | Xt ] X  −t  E ∆X | Xt ≥ Xt 7 since  E[Xt − Xt+1 | Xt ] ≥ 0 according to (1). Hence, we are left with a bound on E ∆− X | Xt . Here we again argue that the number of jobs decreases by 1 if one of the X the fuller machine moves and no other jobs moves. Consequently,  from  t jobs Xt ≥ E ∆− | X and t X en 1 E[Yt − Yt+1 | Xt ] ≥ en √ 1 if Xt ≤ n. Together with the bound derived above, we have E[Yt − Yt+1 | Xt ] ≥ en for every Xt ≤ n. Now, since Y0 ≤ 3n1/2, the additive drift theorem yields E[T ] ≤ 3en3/2 = O(n3/2 ) as suggested. 2.2 Recovering a discrepancy of at most U We now consider the situation where the algorithms have obtained a solution of discrepancy at most U and the processing time of one arbitrary job is changed afterwards. We show an upper bound of O(min{R, n}) on the time needed to obtain a discrepancy of U after this change. Theorem 3 Let x be the current solution that has a discrepancy of at most U before changing the processing time of a job on the fuller machine. Then, the expected time of RLS and (1+1) EA to obtain a discrepancy of at most U is O(min{R, n}). Proof. We use multiplicative drift analysis [3] to show the O(n) bound and consider drift according to the discrepancy d(x). Let P = ∑ni=1 pi and Xt be the random variable for d(x) of the search point x at time t ≥ 0. With respect to the parameters from the multiplicative drift theorem, we have s0 ≤ U + (U − L), smin = U and therefore s0 /smin ≤ 2. W. l. o. g., let 1, . . . , f be the jobs on the fuller machine and p1 , . . . p f be their processing times. Furthermore let y(i) be the search point obtained by flipping the bit i for i = 1, . . . , f . As long as the current solution x has discrepancy greater than U, each of these single bit flips is accepted. We get   1 n−1 f 1 · ∑ (d(x) − d(y(i)) E[Xt − Xt+1 | Xt ] ≥ · 1 − n n i=1 ! f 1 2 ≥ ∑ 2 · pi ≥ en (P/2 + d(x)/2)) en i=1 = 1 1 (P + d(x)) ≥ d(x). en en We set δ = 1/(en) and get en ln(s0 /smin ) ≤ en ln 2 = O(n) as an upper bound. It remains to show the O(R) bound. From the previous calculation, we already have E[Xt − Xt+1 | Xt ] ≥ 1 (P + d(x)) ≥ P/(en). en Using additive drift analysis, the expected time to reach a discrepancy of at most U when starting with a solution x with d(x) ≤ U + (U − L) is (U − L)/(P/(en)) ≤ en(U − L)/(nL) = e(R − 1) = O(R). 8 Altogether the upper bound is O(min{R, n}), which completes the proof. The previous theorem implies that both algorithms are effectively tracking solutions of discrepancy O(U) if the time where no changes to the processing times are happening is at least c · min{R, n}, where c is an appropriate constant. In particular, changes happening every c′ n iterations where c′ is an appropriate constant can be tracked effectively regardless of the ratio R = U/L. Furthermore, a small ratio R, e. g. a constant, implies that very frequent changes (every c′′ R iterations, c′′ an appropriate constant) can be tracked by RLS and (1+1) EA. These statements can be obtained by combining drift analysis with an averaging argument over a number of phases. Due to space restrictions, this analysis is not spelt out here. 3 Random Model We now consider a model with less adversarial power. Dynamic changes are still possible, but each change is limited in effect. More precisely, we consider a random model as common in the average-case analysis of algorithms [23]. For simplicity, we consider the model where all jobs sizes are in {1, . . . , n}; generalizations to other sets are possible. At each point of time, at most one job size can be changed by the adversary. The adversary can only choose the job to change, but neither amount or direction of change. If a job i is chosen to change, then its processing time changes from its current value pi to one of the two values pi + 1 and pi − 1, each with probability 1/2. Two exceptions are made if pi = n, which results in job size n − 1, and if pi = 1, which results in job size 2 afterwards. In other words, the size of each job performs a fair random walk on {1, . . . , n}, with reflecting barriers. With respect to the initial job sizes, we consider both arbitrary (worst-case) initializations and the case that the sizes are drawn uniformly at random and independently from {1, . . . , n}. Then each initial job size is (n + 1)/2 in expectation. It is useful to denote the random processing time of job i at time t by the random variable Xi (t). It is well known [13] that the random walk described by the process Xi (t), t ≥ 0, has a stationary probability distribution given by ( 1/(2n − 2) if j = 1 or j = n lim Pr(Xi (t) = j) = t→∞ 1/(n − 1) otherwise Hence, the probability values in the stationary distribution differ from the initial uniform distribution by a factor of at most 2. It is also well known in the theory of random walks that the so-called mixing time (informally, the time to get sufficiently close to the stationary distribution) of the considered random walk is O(n2 ) steps. Hence, for any i, j ∈ {1, . . ., n} and for any t ≥ cn2 , where t denotes the number of changes to job pi and c is a sufficiently large constant, we have c2 c1 ≤ Pr(Xi (t) = j) ≤ n n for two constants c1 , c2 > 0. Hereinafter, we asssume this bracketing of Xi (t) to hold, i. e., the mixing time has elapsed for every job. 9 The aim is to analyze the discrepancies obtainable in our model. We summarize in the following lemma a useful property of the distribution of the processing times Xi (t), and drop the time index for convenience. Roughly speaking, it shows that there are no big gaps in the set of values that is taken by at least one job. Lemma 4 Let φ (i) := |{X j | X j = i ∧ j ∈ {1, . . . , n}}|, where i ∈ {1, . . . , n}, be the frequency of jobs size i. Let G := max{ℓ | ∃i : φ (i) = φ (i + 1) = · · · = φ (i + ℓ) = 0} the maximum gap size, i. e. maximum size of intervals with zero frequency everywhere. Then, for some constant c > 0, Pr(G ≥ ℓ) ≤ n2−cℓ . Proof. Recall that we assume to be close to the stationary distribution, more precisely for each i, j ∈ {1, . . . , n}, we have Pr(X j = i) ≥ c1 /n. By considering disjoint events, Pr(X j ∈ {i, . . . , i + ℓ}) ≥ c1 ℓ n for each ℓ ≤ n. Then for each ℓ ≥ 1, we get from the independence of the job sizes that   c1 ℓ n , Pr(∀ j ∈ {1, . . ., n} : X j ∈ / {i, . . . , i + ℓ}) ≤ 1 − n which is at most cℓ3 for some constant c3 < 1. Hence, by a union bound the probability that there is an i such that for all j ∈ {1, . . . , n} : X j ∈ / {i, . . . , i + ℓ} is at most ncℓ3 , which −cℓ equals n2 for some constant c > 0. Hereinafter, with high probability means probability at least 1 − O(n−c ) for any constant c > 0. We prove the following theorem stating that with high probability discrepancy O(log n) can be reached in polynomial time. Its proof is inspired by the average-case analysis from [23]. Note also that the theorem is restricted to the (1+1) EA since its proof analyzes improvements made by swapping two jobs between the fuller and emptier machine. Theorem 5 Regardless of the initial solution, the following claim holds: with high probability the time for the (1+1) EA after a one-time change to obtain a discrepancy of at most O(log n) is O(n4 log n). Proof. According to Lemma 4, there is for any constant c > 0 a sufficiently large constant c′ > 0 such that there is not gap of size G := c′ log n or larger with probabiilty at least 1 − n · n−c−1 = 1 − n−c. In the following, we assume this maximum gap size to hold. If the current discrepancy is larger than G, then there must be either at least one pair of jobs j, j′ with j on the fuller machine and j′ on the emptier machine such that X j′ < X j and X j − X j′ ≤ G, or a job j on the fuller machine of size of at most G. To see this, imagine that despite the gap size of at most G, there is no such pair as in the first case. Then all jobs of size at least G must be on the fuller machine, resulting in the second case. 10 Now, in the first case it is sufficient to swap jobs j and j′ to decrease the discrepancy by at least 1. In the second case, it is enough to move job j from the fuller to the emptier machine to decrease the discrepancy by at least 1. In any case, the probability of decreasing the discrepancy is at least (1 − 1/n)n−1 n12 = Ω(n−2 ). Since the maximum discrepancy is O(n2 ), the expected number of decreases is also at most O(n2 ). Multiplying this with the waiting time for an improvement, we have an expected time of O(n4 ). By a simple application of Markov’s inequality and repeating phases of length cn4 for some constant c, it is easy to see that the time is O(n4 log n) with high probability. The previous theorem covers a worst-case initialization with all jobs on one machine, where the discrepancy can be up to n2 . Under random initialization, this is unlikely to happen, as the following theorem shows. √ Theorem 6 The expected discrepancy of the random initial solution is Θ(n n). Under a random initial solution, the time for the (1+1) EA after a one-time change to obtain a discrepancy of O(log n) is O(n3.5 log2 n) with high probability. √ √ Proof. We prove that the initial discrepancy is Θ(n n) in expectation and O(n n log n) with high probability. From the last property, the statement on the time to obtain a discrepancy of O(log n) follows with the same √ ideas as in the proof of Theorem 5 if the initial discrepancy is estimated with O(n n log n) instead of O(n2 ). We are left with the proofs on the initial discrepancy. Let K denote the number of jobs thatpare initially put √ on the first machine. Then E[K] = n/2 but also E[|K − n/2|] ≤ Var(K) = Θ( n), where we used Jensen’s inequality and the fact that K ∼ Bin(n, 1/2).√Moreover, by the properties of the binomial distribution we have that√Pr(K ≥ n/2 + c n) = Ω(1) for some constant√c > 0. Altogether, E[|K − n/2|] = Θ( n). In other words, there are in expectation Θ( n) more jobs on one machine than on the other. Each job size is initially uniformly distributed on {1, . . . , n} and√has expectation (n +√1)/2. By linearity of expectation, the discrepancy is at least Θ( n)(n + 1)/2 = Θ(n n). This consideration just subtracts the total load of the machine having the minority of the jobs from the total load of the machine having the majority (hereinafter called machine “majority”). Should this difference be negative, the discrepancy is still positive. However, by approximating the sum of the job √ sizes on machine “majority” n), one can also see that the by a normal distribution with standard deviation Θ(n √ discrepancy is O(n n) even if machine “majority” is allowed to have √ a total load less than the other machine. Altogether the expected discrepancy is Θ(n n). √ The statement that the discrepancy is O(n n log n) with high probability follows by using Chernoff bounds on the difference √ in the number of jobs between the two machines (stating that there are at most O( n log n) more jobs on one machine than the other), approximating the tails of the sum of the √ job sizes on the machines by a normal distribution and arguing that a deviation of c n log n from the mean has probability 2 e−Ω(c ) . Finally, we turn to the case that job sizes change frequently. In the extreme case, at every point of time one job size is allowed to increase or decrease by 1. Then it seems 11 hard to obtain a discrepancy of O(log n) as shown in Theorem 5. However, we can apply the results from Section 2, noting that the maximum job size is n at any time. In relation to the makespan, the discrepancy, which will also be at most n, is negligible. Theorem 7 In the model with random changes, the following holds: the expected time until the (1+1) EA (RLS) has obtained a solution with discrepancy at most n is O(n3/2 ) (respectively O(n log n)) independently of the initial solution and the number of changes. The expected ratio between discrepancy and makespan is at most 6/n then. Proof. Since R = U = n in the notation of Theorem 1 and Theorem 2, we immediately obtain the first statement of our theorem. To compute the expected ratio, note that at any time the sum of all job sizes has an expected value of n(n + 1)/2 and is at least n2 /3 + n with probability 1 − 2−Ω(n) using the approximation by Normal distribution. In this case, the makespan must be at least n2 /6 + n/2, and the ratio is at most n/(n2 /6 + n/2) ≤ 6/n − 3/n. If the sum of the job sizes is less than n2 /3 + n, then the ratio is at most n/n since all job sizes are at least one. Altogether, the expected ratio is bounded from above by 6/n − 3/n + 2−Ω(n) ≤ 6/n. 4 Conclusions We have shown that randomized local search and evolutionary algorithms are provably successful in tracking solutions of good discrepancy for the dynamic makespan scheduling. Investigating the adversary model, we have shown that the algorithms obtain solutions of discrepancy at most U every O(n log n) (for RLS) and every O(n3/2 ) (for (1+1) EA) iterations even if changes are arbitrary and frequent. Furthermore, such a discrepancy is maintained if the period of changes is not too small. For the random model, we have shown that discrepancies of O(log n) are obtained and that a ratio of at most 6/n between discrepancy and makespan is obtained frequently during the optimization process. Acknowledgements Frank Neumann has been supported by the Australian Research Council (ARC) through grants DP130104395 and DP140103400. Carsten Witt has been supported by the Danish Council for Independent Research (DFF) through grant 4002-00542. We thank Mojgan Pourhassan and three anonymous reviewers for providing valuable feedback that helped to improve the paper. Bibliography [1] Anne Auger and Benjamin Doerr. Theory of Randomized Search Heuristics: Foundations and Recent Developments. World Scientific Publishing Co., Inc., 2011. [2] Sylvain Colin, Benjamin Doerr, and Gaspard Férey. Monotonic functions in EC: anything but monotone! In Proc. of GECCO ’14, pages 753–760. ACM Press, 2014. 12 [3] Benjamin Doerr, Daniel Johannsen, and Carola Winzen. Multiplicative drift analysis. Algorithmica, 64(4):673–697, 2012. [4] Stefan Droste, Thomas Jansen, and Ingo Wegener. On the analysis of the (1+1) evolutionary algorithm. Theoretical Computer Science, 276:51–81, 2002. [5] Tobias Friedrich, Jun He, Nils Hebbinghaus, Frank Neumann, and Carsten Witt. Approximating covering problems by randomized search heuristics using multiobjective models. Evolutionary Computation, 18(4):617–633, 2010. [6] Jun He and Xin Yao. Drift analysis and average time complexity of evolutionary algorithms. Artificial Intelligence, 127(1):57–85, 2001. [7] Jun He and Xin Yao. Towards an analytic framework for analysing the computation time of evolutionary algorithms. Artificial Intelligence, 145(1-2):59–97, 2003. [8] Christian Horoba. Exploring the runtime of an evolutionary algorithm for the multi-objective shortest path problem. Evolutionary Computation, 18(3):357–381, 2010. [9] Thomas Jansen and Christine Zarges. Evolutionary algorithms and artificial immune systems on a bi-stable dynamic optimisation problem. In Proc. of GECCO ’14, pages 975–982. ACM Press, 2014. [10] Thomas Jansen. On the brittleness of evolutionary algorithms. In Proc. of FOGA ’07, pages 54–69. ACM Press, 2007. [11] Thomas Jansen. Analyzing Evolutionary Algorithms – The Computer Science Perspective. Natural Computing Series. Springer, 2013. [12] Timo Kötzing and Hendrik Molter. ACO beats EA on a dynamic pseudo-boolean function. In Proc. of PPSN’ 12, pages 113–122. Springer, 2012. [13] David A. Levin, Yuval Peres, and Elizabeth L. Wilmer. Markov Chains and Mixing Times. American Mathematical Society, 2009. [14] Andrei Lissovoi and Carsten Witt. MMAS versus population-based EA on a family of dynamic fitness functions. Algorithmica, 2015. In press, final version: http://dx.doi.org/10.1007/s00453-015-9975-z. [15] Andrei Lissovoi and Carsten Witt. Runtime analysis of ant colony optimization on dynamic shortest path problems. Theoretical Computer Science, 561:73–85, 2015. [16] Frank Neumann and Carsten Witt. Bioinspired Computation in Combinatorial Optimization: Algorithms and Their Computational Complexity. Springer, 2010. [17] Frank Neumann. Expected runtimes of a simple evolutionary algorithm for the multi-objective minimum spanning tree problem. European Journal of Operational Research, 181(3):1620–1629, 2007. 13 [18] Pietro S. Oliveto and Christine Zarges. Analysis of diversity mechanisms for optimisation in dynamic environments with low frequencies of change. In Proc. of GECCO ’13, pages 837–844. ACM Press, 2013. [19] Chao Qian, Yang Yu, and Zhi-Hua Zhou. An analysis on recombination in multiobjective evolutionary optimization. Artificial Intelligence, 204:99–119, 2013. [20] Philipp Rohlfshagen, Per Kristian Lehre, and Xin Yao. Dynamic evolutionary optimisation: An analysis of frequency and magnitude of change. In Proc. of GECCO ’09, pages 1713–1720. ACM Press, 2009. [21] Andrew M. Sutton and Frank Neumann. A parameterized runtime analysis of evolutionary algorithms for the Euclidean traveling salesperson problem. In Proc. of AAAI ’12, 2012. [22] Andrew M. Sutton and Frank Neumann. A parameterized runtime analysis of simple evolutionary algorithms for makespan scheduling. In Proc. of PPSN ’12, pages 52–61. Springer, 2012. [23] Carsten Witt. Worst-case and average-case approximations by simple randomized search heuristics. In Proc. of STACS ’05, pages 44–56. Springer, 2005. [24] Carsten Witt. Tight bounds on the optimization time of a randomized search heuristic on linear functions. Combinatorics, Probability & Computing, 22(2):294– 318, 2013. [25] Yang Yu and Zhi-Hua Zhou. A new approach to estimating the expected first hitting time of evolutionary algorithms. In Proc. of AAAI ’06. AIII Press, 2006. [26] Yang Yu, Xin Yao, and Zhi-Hua Zhou. On the approximation ability of evolutionary optimization with application to minimum set cover: Extended abstract. In Proc. of IJCAI ’13. IJCAI/AAAI, 2013. 14
9cs.NE
Neural Responding Machine for Short-Text Conversation Lifeng Shang Zhengdong Lu Hang Li Noah’s Ark Lab Huawei Technologies Co. Ltd. Sha Tin, Hong Kong {Shang.Lifeng,Lu.Zhengdong,HangLi.HL}@huawei.com arXiv:1503.02364v2 [cs.CL] 27 Apr 2015 Abstract We propose Neural Responding Machine (NRM), a neural network-based response generator for Short-Text Conversation. NRM takes the general encoder-decoder framework: it formalizes the generation of response as a decoding process based on the latent representation of the input text, while both encoding and decoding are realized with recurrent neural networks (RNN). The NRM is trained with a large amount of one-round conversation data collected from a microblogging service. Empirical study shows that NRM can generate grammatically correct and content-wise appropriate responses to over 75% of the input text, outperforming state-of-the-arts in the same setting, including retrieval-based and SMT-based models. 1 Introduction Natural language conversation is one of the most challenging artificial intelligence problems, which involves language understanding, reasoning, and the utilization of common sense knowledge. Previous works in this direction mainly focus on either rule-based or learning-based methods (Williams and Young, 2007; Schatzmann et al., 2006; Misu et al., 2012; Litman et al., 2000). These types of methods often rely on manual effort in designing rules or automatic training of model with a particular learning algorithm and a small amount of data, which makes it difficult to develop an extensible open domain conversation system. Recently due to the explosive growth of microblogging services such as Twitter1 and Weibo2 , the amount of conversation data available on the web has tremendously increased. This makes a data-driven approach to attack the conversation problem (Ji et al., 2014; Ritter et al., 2011) possible. Instead of multiple rounds of conversation, the task at hand, referred to as Short-Text Conversation (STC), only considers one round of conversation, in which each round is formed by two short texts, with the former being an input (referred to as post) from a user and the latter a response given by the computer. The research on STC may shed light on understanding the complicated mechanism of natural language conversation. Previous methods for STC fall into two categories, 1) the retrieval-based method (Ji et al., 2014), and 2) the statistical machine translation (SMT) based method (Ritter et al., 2011). The basic idea of retrieval-based method is to pick a suitable response by ranking the candidate responses with a linear or non-linear combination of various matching features (e.g. number of shared words). The main drawbacks of the retrieval-based method are the following • the responses are pre-existed and hard to be customized for the particular text or requirement from the task, e.g., style or attitude. • the use of matching features alone is usually not sufficient for distinguishing positive responses from negative ones, even after time consuming feature engineering. (e.g., a penalty due to mismatched named entities is difficult to be incorporated into the model) The SMT-based method, on the other hand, is generative. Basically it treats the response generation as a translation problem, in which the model is trained on a parallel corpus of post-response pairs. Despite 1 2 https://twitter.com/. http://www.weibo.com/. its generative nature, the method is intrinsically unsuitable for response generation, because the responses are not semantically equivalent to the posts as in translation. Actually one post can receive responses with completely different content, as manifested through the example in the following figure: Post UserA UserB UserC 1.1 Having my fish sandwich right now For god’s sake, it is 11 in the morning Enhhhh... sounds yummy which restaurant exactly? Overview In this paper, we take a probabilistic model to address the response generation problem, and propose employing a neural encoder-decoder for this task, named Neural Responding Machine (NRM). The neural encoder-decoder model, as illustrated in Figure 1, first summarizes the post as a vector representation, then feeds this representation to decoder to generate responses. We further generalize this scheme to allow the post representation dynamically change during the generation process, following the idea in (Bahdanau et al., 2014) originally proposed for neural-network-based machine translation with automatic alignment. For god's sake, it is 11 in the morning Enhhhh... sounds yummy which restaurant exactly? Decoder vector Encoder Having my fish sandwich right now Figure 1: The diagram of encoder-decoder framework for automatic response generation. NRM essentially estimates the likelihood of a response given a post. Clearly the estimated probability should be complex enough to represent all the suitable responses. Similar framework has been used for machine translation with a remarkable success (Kalchbrenner and Blunsom, 2013; Auli et al., 2013; Sutskever et al., 2014; Bahdanau et al., 2014). Note that in machine translation, the task is to estimate the probability of a target language sentence conditioned on the source language sentence with the same meaning, which is much easier than the task of STC which we are considering here. In this paper, we demonstrate that NRM, when equipped with a reasonable amount of data, can yield a satisfying estimator of responses (hence response generator) for STC, despite the difficulty of the task. Our main contributions are two-folds: 1) we propose to use an encoder-decoder-based neural network to generate a response in STC; 2) we have empirically verified that the proposed method, when trained with a reasonable amount of data, can yield performance better than traditional retrieval-based and translation-based methods. 1.2 RoadMap In the remainder of this paper, we start with introducing the dataset for STC in Section 2. Then we elaborate on the model of NRM in Section 3, followed by the details on training in Section 4. After that, we report the experimental results in Section 5. In Section 6 we conclude the paper. 2 The Dataset for STC Our models are trained on a corpus of roughly 4.4 million pairs of conversations from Weibo 3 . 3 The dataset and its English translation (by machine translation system) will be released soon. 2.1 Conversations on Sina Weibo Weibo is a popular Twitter-like microblogging service in China, on which a user can post short messages (referred to as post in the reminder of this paper) visible to the public or a group of users following her/him. Other users make comment on a published post, which will be referred to as response. Just like Twitter, Weibo also has the length limit of 140 Chinese characters on both posts and responses, making the post-response pair an ideal surrogate for short-text conversation. Training Test Data Labeled Dataset (retrieval-based) Fine Tuning (SMT-based) #posts #responses #pairs #test posts #posts #responses #labeled pairs #posts #responses #pairs 219,905 4,308,211 4,435,959 110 225 6,017 6,017 2,925 3,000 3,000 Table 1: Some statistics of the dataset. Labeled Dataset and Fine Tuning are used by retrieval-based method for learning to rank and SMT-based method for fine tuning, respectively. 2.2 Dataset Description To construct this million scale dataset, we first crawl hundreds of millions of post-response pairs, and then clean the raw data in a similar way as suggested in (Wang et al., 2013), including 1) removing trivial responses like “wow”, 2) filtering out potential advertisements, and 3) removing the responses after first 30 ones for topic consistency. Table 1 shows some statistics of the dataset used in this work. It can be seen that each post have 20 different responses on average. In addition to the semantic gap between post and its responses, this is another key difference to a general parallel data set used for traditional translation. 3 Neural Responding Machines for STC The basic idea of NRM is to build a hidden representation of a post, and then generate the response based on it, as shown in Figure 2. In the particular illustration, the encoder converts the input sequence x = (x1 , · · · , xT ) into a set of high-dimensional hidden representations h = (h1 , · · · , hT ), which, along with the attention signal at time t (denoted as αt ), are fed to the context-generator to build the context input to decoder at time t (denoted as ct ). Then ct is linearly transformed by a matrix L (as part of the decoder) into a stimulus of generating RNN to produce the t-th word of response (denoted as yt ). In neural translation system, L converts the representation in source language to that of target language. In NRM, L plays a more difficult role: it needs to transform the representation of post (or some part of it) to the rich representation of many plausible responses. It is a bit surprising that this can be achieved to a reasonable level with a linear transformation in the “space of representation”, as validated in Section 5.3, where we show that one post can actually invoke many different responses from NRM. The role of attention signal is to determine which part of the hidden representation h should be emphasized during the generation process. It should be noted that αt could be fixed over time or changes dynamically during the generation of response sequence y. In the dynamic settings, αt can be function of historically generated subsequence (y1 , · · · , yt−1 ), input sequence x or their latent representations, more details will be shown later in Section 3.2. We use Recurrent Neural Network (RNN) for both encoder and decoder, for its natural ability to summarize and generate word sequence of arbitrary lengths (Mikolov et al., 2010; Sutskever et al., 2014; Cho et al., 2014). Decoder Attention Signal Context Generator Encoder Figure 2: The general framework and dataflow of the encoder-decoder-based NRM. ͙͘ ͙͘ ͙͘ Figure 3: The graphical model of RNN decoder. The dashed lines denote the variables related to the function g(·), and the solid lines denote the variables related to the function f (·). 3.1 The Computation in Decoder Figure 3 gives the graphical model of the decoder, which is essentially a standard RNN language model except conditioned on the context input c. The generation probability of the t-th word is calculated by p(yt |yt−1 , · · · , y1 , x) = g(yt−1 , st , ct ), (1) where yt is a one-hot word representation, g(·) is a softmax activation function, and st is the hidden state of decoder at time t calculated by st = f (yt−1 , st−1 , ct ), (2) and f (·) is a non-linear activation function and the transformation L is often assigned as parameters of f (·). Here f (·) can be a logistic function, the sophisticated long short-term memory (LSTM) unit (Hochreiter and Schmidhuber, 1997), or the recently proposed gated recurrent unit (GRU) (Chung et al., 2014; Cho et al., 2014). Compared to “ungated” logistic function, LSTM and GRU are specially designed for its long term memory: it can store information over extended time steps without too much decay. We use GRU in this work, since it performs comparably to LSTM on squence modeling (Chung et al., 2014), but has less parameters and easier to train. 3.2 The Computation in Encoder We consider three types of encoding schemes, namely 1) the global scheme, 2) the local scheme, and the hybrid scheme which combines 1) and 2). Global Scheme: Figure 4 shows the graphical model of the RNN-encoder and related context generator for a global encoding scheme. The hidden state at time t is calculated by ht = f (xt , ht−1 ) (i.e. still GRU unit), and with a trivial context generation operation, we essentially use the final hidden state hT as the global representation of the sentence. The same strategy has been taken in (Cho et al., 2014) and (Sutskever et al., 2014) for building the intermediate representation for machine translation. This scheme however has its drawbacks: a vectorial summarization of the entire post is often hard to obtain and may lose important details for response generation, especially when the dimension of the hidden state is not big enough4 . In the reminder of this paper, a NRM with this global encoding scheme is referred to as NRM-glo. Context Generator ͙͘ Figure 4: The graphical model of the encoder in NRM-glo, where the last hidden state is used as the context vector ct = hT . Local Scheme: Recently, Bahdanau et al. (2014) and Graves (2013) introduced an attention mechanism that allowsPthe decoder to dynamically select and linearly combine different parts of the input sequence ct = Tj=1 αtj hj , where weighting factors αtj determine which part should be selected to generate the new word yt , which in turn is a function of hidden states αtj = q(hj , st−1 ), as pictorially shown in Figure 5. Basically, the attention mechanism αtj models the alignment between the inputs around position j and the output at position t, so it can be viewed as a local matching model. This local scheme is devised in (Bahdanau et al., 2014) for automatic alignment between the source sentence and the partial target sentence in machine translation. This scheme enjoys the advantage of adaptively focusing on some important words of the input text according to the generated words of response. A NRM with this local encoding scheme is referred to as NRM-loc. Attention Signal Context Generator ͙͘ Figure 5: The graphical model P of the encoder in NRM-loc, where the weighted sum of hidden sates is used as the context vector ct = Tj=1 αtj hj . 4 Sutskever et al. (2014) has to use 4, 000 dimension for satisfying performance on machine translation, while (Cho et al., 2014) with a smaller dimension perform poorly on translating an entire sentence. 3.3 Extensions: Local and Global Model In the task of STC, NRM-glo has the summarization of the entire post, while NRM-loc can adaptively select the important words in post for various suitable responses. Since post-response pairs in STC are not strictly parallel and a word in different context can have different meanings, we conjecture that the global representation in NRM-glo may provide useful context for extracting the local context, therefore complementary to the scheme in NRM-loc. It is therefore a natural extension to combine the two models by concatenating their encoded hidden states to form an extended hidden representation for each time stamp, as illustrated in Figure 6. We can see the summarization hgT is incorporated into ct and αtj to provide a global context for local matching. With this hybrid method, we hope both the local and global information can be introduced into the generation of response. The model with this context generation mechanism is denoted as NRM-hyb. It should be noticed that the context generator in NRM-hyb will evoke different encoding mechanisms in the global encoder and the local encoder, although they will be combined later in forming a unified representation. More specifically, the last hidden state of NRM-glo plays a role different from that of the last state of NRM-loc, since it has the responsibility to encode the entire input sentence. This role of NRM-glo, however, tends to be not adequately emphasized in training the hybrid encoder when the parameters of the two encoding RNNs are learned jointly from scratch. For this we use the following trick: we first initialize NRM-hyb with the parameters of NRM-loc and NRM-glo trained separately, then fine tune the parameters in encoder along with training the parameters of decoder. ͙͘ Context Generator global encoder ͙͘ Attention Signal local encoder Figure graphical model for the encoder in NRM-hyb, while context generator function is ct = PT 6: The l ; hg ], here [hl ; hg ] denotes the concatenation of vectors hl and hg α [h j j j=1 tj j T T T To learn the parameters of the model, we maximize the likelihood of observing the original response conditioned on the post in the training set. For a new post, NRMs generate their responses by using a left-to-right beam search with beam size = 10. 4 Experiments We evaluate three different settings of NRM described in Section 3, namely NRM-glo, NRM-loc, and NRM-hyb, and compare them to retrieval-based and SMT-based methods. 4.1 Implementation Details We use Stanford Chinese word segmenter 5 to split the posts and responses into sequences of words. Although both posts and responses are written in the same language, the distributions on words for the two are different: the number of unique words in post text is 125,237, and that of response text is 679,958. We therefore construct two separate vocabularies for posts and responses by using 40,000 most frequent words on each side, covering 97.8% usage of words for post and 96.2% for response respectively. All the 5 http://nlp.stanford.edu/software/segmenter.shtml remaining words are replaced by a special token “UNK”. The dimensions of the hidden states of encoder and decoder are both 1,000, and the dimensions of the word-embedding for post and response are both 620. Model parameters are initialized by randomly sampling from a uniform distribution between -0.1 and 0.1. All our models were trained on a NVIDIA Tesla K40 GPU using stochastic gradient descent algorithm with mini-batch. The training stage of each model took about two weeks. 4.2 Competitor Models Retrieval-based: with retrieval-based models, for any given post p∗ , the response r ∗ is retrieved from a big post-response pairs (p, r) repository. Such models rely on three key components: a big repository, sets of feature functions Φi (p∗ , (p, r)), and a machine learning model to combine these features. In this work, the whole 4.4 million Weibo pairs are used as the repository, 14 features, ranging from simple cosine similarity to some deep matching models (Ji et al., 2014) are used to determine the suitability of a post to a given post p∗ through the following linear model score(p∗ , (p, r)) = X ωi Φi (p∗ , (p, r)). (3) i Following the ranking strategy in (Ji et al., 2014), we pick 225 posts and about 30 retrieved responses for each of them given by a baseline retriever6 from the 4.4M repository, and manually label them to obtain labeled 6,017 post-response pairs. We use ranking SVM model (Joachims, 2006) for the parameters ωi based on the labeled dataset. In comparison to NRM, only the top one response is considered in the evaluation process. SMT-based: In SMT-based models, the post-response pairs are directly used as parallel data for training a translation model. We use the most widely used open-source phrase-based translation modelMoses (Koehn et al., 2007). Another parallel data consisting of 3000 post-response pairs is used to tune the system. In (Ritter et al., 2011), the authors used a modified SMT model to obtain the “Response” of Twitter “Stimulus”. The main modification is in replacing the standard GIZA++ word alignment model (Och and Ney, 2003) with a new phrase-pair selection method, in which all the possible phrasepairs in the training data are considered and their associated probabilities are estimated by the Fisher’s Exact Test, which yields performance slightly better than default setting8 . Compared to retrieval-based methods, the generated responses by SMT-based methods often have fluency or even grammatical problems. In this work, we choose the Moses with default settings as our SMT model. 5 Results and Analysis Automatic evaluation of response generation is still an open problem. The widely accepted evaluation methods in translation (e.g. BLUE score (Papineni et al., 2002)) do not apply, since the range of the suitable responses is so large that it is practically impossible to give reference with adequate coverage. It is also not reasonable to evaluate with Perplexity, a generally used measurement in statistical language modeling, because the naturalness of response and the relatedness to post can not be well evaluated. We therefore resort to human judgement, similar to that taken in (Ritter et al., 2011) but with important difference. 5.1 Evaluation Methods We adopt human annotation to compare the performance of different models. Five labelers with at least three-year experience of Sina Weibo are invited to do human evaluation. Responses obtained from the five evaluated models are pooled and randomly permuted for each labeler. The labelers are instructed to imagine that they were the authors of the original posts and judge whether a response (generated or retrieved) is appropriate and natural to a input post. Three levels are assigned to a response with scores from 0 to 2: 6 8 we use the default similarity function of Lucene 7 Reported results showed that the new model outperformed the baseline SMT model 57.7% of the time. Post ᝅཝ࡟⾷॰䠂㘷ᱥ‫ޡ‬ѠӰ...འ཮ᕖҼ There are always 8 players at the Italian restricted area. Unbelievable! Related Criterion Labels Response1 ᡇᱥᝅཝ࡟䱕Ⲻ⨹䘭θㅿᖻ∊䎑ᔶခȾ I am a big fan of the Italy team, waiting for the football game to start Logic Consistency Unsuitable Response2 ᝅཝ࡟Ⲻ伕⢟འ㗄઩Ҽ Italian food is absolutely delicious. Semantic Relevance Unsuitable Response3 འ཮ᕖҼ੝! Unbelievable! Generality Neutral Response4 ૾૾૾ԃ❬ᱥ0φ0 Ⱦ䘎⋗ⵁࡦ䘑⨹Ⱦ Ha!Ha!Ha! it is still 0:0, no goal so far. Scenario Dependence Neutral Response5 䘏↙ᱥᝅཝ࡟ᕅ䱨ᆾ䏩⨹Ⱦ This is exactly the Italian defending style football game. ²² Suitable Figure 7: An example post and its five candidate responses with human annotation. The content of the post implies that the football match is already started, while the author of Response1 is still waiting for the match to start. Response2 talks about the food of Italy. Response3 is a widely used response, but it is suitable to this post. Response4 states that the current score is still 0:0, it is a suitable response only in this specific scenario. Models NRM-glo NRM-loc NRM-hyb Rtr.-based SMT-based Mean Score 0.969 1.065 1.156 0.984 0.313 Suitable (+2) 34.0% 36.0% 39.3% 29.8% 5.6 % Neutral (+1) 28.9% 34.5% 37.1% 38.7% 20.0% Unsuitable (0) 37.1% 29.5% 23.6% 31.5% 74.4% Agreement 0.397 0.247 0.309 0.346 0.448 Table 2: The results of evaluated methods. Mean score is the average value of annotated scores over all annotations. (Rtr.-based means the retrieval-based method) ID Post ∅ᒪ‫ݹ‬ᰜ䜳ᶛ儎✝Ⱦ 1 High fever attacks me HYHU\1HZ<HDU¶V'D\ ৾㘷Ҽж኷θ᝕䉘ᡇԢ 㓺θᡇᖾ儎ު 2 I gain one more year. Grateful to my group, so happy NRM-glo NRM-loc NRM-hyb Rtr.-based ཐՇᚥθ໔ᕰ‫࣑⯡ރ‬έ∅ᒪ‫ݹ‬ᰜ䜳ৱॱ䲘ⵁ ⾓ᰟᰛᓭགྷθ䓡։‫ ڛ‬儎✝« ⯻ ᓭέ Go to see a doctor Rest more to boost Get well soon and stay +LJKIHYHU« your immune system. HYHU\1HZ<HDU¶V'D\ healthy! ⭕ᰛᘡ҆έ≮䘒᭥ᤷ ֖έ Happy birthday! Will stand by you forever! ⭕ᰛᘡ҆έ≮䘒ᒪ䖱 ┸Ӥέ Happy birthday! Wish you always stay young and pretty! 㘷Ҽ㘷Ҽθ኷ᴾу侬 ᡇਠᱥ㘷Ҽж኷ Ӱ஀έ Getting old now. Time I just gain only one more year. has no mercy. ਹ㍖ㅢжཟθඐᤷօθ ᗻ亱ᶛ᭥ᤷέࣖ⋯έ ඐᤷօθඐᤷсৱȾ ∅ཟ䜳ᱥ㍖伕ѱѿ㘻 ඐᤷօέ ፊᵫ᣿Ⱦ 3 First day of being a Hold on, keep it up. I come to offer my I have been being a Hold on! support. Keep it up! vegetarian. Hold on, vegetarian everyday CuiDuoLa 䘏〃ཟ≊ⵕᓊ䈛ᑜѠᐻ 䘏ᱥଠ‫஀ݵ‬ϋⵕ㗄έ 䱩‫ݿ‬᱄აθᗹ᛻㡈⭻Ⱦ䘏〃ཟ≊ⵕуᱥⴌⲺȾᮽኧ஀ ࠰ৱ䑅䶈ሱ ᢴ⚫᝕ ૾૾ 䬻࠰ৱ䑅䶈䎅㣧 Where is it? It is so Such a nice sunny day! It is indeed a very nice WenShanOHW¶VJRRXW We should go out with 4 to get some I am in a great mood. weather. some cute guys to enjoy beautiful! inspiration. Ha! Ha! a great outing in such a nice weather. Figure 8: Some responses generated by different models (originally in Chinese with their literal English translation), where the words in boldfaces are entity names. • Suitable (+2): the response is evidently an appropriate and natural response to the post; • Neutral (+1): the response can be a suitable response in a specific scenario; • Unsuitable (0): it is hard or impossible to find a scenario where response is suitable. To make the annotation task operable, the suitability of generated responses is judged from the following five criteria: (a) Grammar and Fluency: Responses should be natural language and free of any fluency or grammatical errors; (b) Logic Consistency: Responses should be logically consistent with the test post; (c) Semantic Relevance: Responses should be semantically relevant to the test post; (d) Scenario Dependence: Responses can depend on a specific scenario but should not contradict the first three criteria; (e) Generality: Responses can be general but should not contradict the first three criteria; If any of the first three criteria (a), (b), and (c) is contradicted, the generated response should be labeled as “Unsuitable”. The responses that are general or suitable to post in a specific scenario should be labeled as “Neutral”. Figure 7 shows an example of the labeling results of a post and its responses. The first two responses are labeled as “Unsuitable” because of the logic consistency and semantic relevance errors. Response4 depends on the scenario (i.e., the current score is 0:0), and is therefore annotated as “Neutral”. Model A Model B NRM-loc NRM-hyb NRM-hyb Rtr.-based Rtr.-based Rtr.-based SMT SMT NRM-glo NRM-glo NRM-loc NRM-glo NRM-loc NRM-hyb NRM-hyb Rtr.-based Average rankings (1.463, 1.537) (1.434, 1.566) (1.465, 1.535) (1.512, 1.488) (1.533, 1.467) (1.552, 1.448) (1.785, 1.215) (1.738, 1.262) p value 2.01% 0.01% 3.09% 48.1% 6.20% 0.32% 0.00 % 0.00 % Table 3: p-values and average rankings of Friedman test for pairwise model comparison. (Rtr.-based means the retrieval-based method) 5.2 Results Our test set consists of 110 posts that do not appear in the training set, with length between 6 to 22 Chinese words and 12.5 words on average. The experimental results based on human annotation are summarized in Table 2, consisting of the ratio of three categories and the agreement among the five labelers for each model. The agreement is evaluated by Fleiss’ kappa (Fleiss, 1971), as a statistical measure of inter-rater consistency. Except the SMT-based model, the value of agreement is in a range from 0.2 to 0.4 for all the other models, which should be interpreted as “Fair agreement”. The SMT-based model has a relatively higher kappa value 0.448, which is larger than 0.4 and considered as “Moderate agreement”, since the responses generated by the SMT often have the fluency and grammatical errors, making it easy to reach an agreement on such unsuitable cases. From Table 2, we can see the SMT method performs significantly worse than the retrieval-based and NRM models and 74.4% of the generated responses were labeled as unsuitable mainly due to fluency and relevance errors. This observation confirms with our intuition that the STC dataset, with one post potentially corresponding to many responses, can not be simply taken as parallel corpus in a SMT model. Surprisingly, more than 60% of responses generated by all the three NRM are labeled as “Suitable” or “Neutral”, which means that most generated responses are fluent and semantically relevant to post. Among all the NRM variants • NRM-loc outperforms NRM-glo, suggesting that a dynamically generated context might be more effective than a “static” fixed-length vector for the entire post, which is consistent with the observation made in (Bahdanau et al., 2014) for machine translation; • NRM-hyp outperforms NRM-loc and NRM-glo, suggesting that a global representation of post is complementary to dynamically generated local context. The retrieval-based model has the similar mean score as NRM-glo, and its ratio on neutral cases outperforms all the other methods. This is because 1) the responses retrieved by retrieval-based method are actually wrote by human, so they do not suffer from grammatical and fluency problems, and 2) the combination of various feature functions potentially makes sure the picked responses semantically relevant to test posts. However the picked responses are not customized for new test posts, so the ratio of suitable cases is lower than the three neural generation models. To test statistical significance, we use the Friedman test (Howell, 2010), which is a non-parametric test on the differences of several related samples, based on ranking. Table 3 shows the average rankings over all annotations and the corresponding p-values for comparisons between different pairs of methods. The comparison between retrieval-based and NRM-glo is not significant and their difference in ranking is tiny. This indicates that the retrieval-based method is comparable to the NRM-glo method. The NRMhyb outperforms all the other methods, and the difference is statistically significant (p < 0.05). The difference between NRM-loc and retrieval-based method is marginal (p = 0.062). SMT is significantly worse than retrieval-based and NRM-hyb methods. 5.3 Case Study Figure 8 shows some example responses generated by our NRMs (only the one with biggest likelihood is given) and the comparable retrieval-based model. It is intriguing to notice that three NRM variants give suitable but quite distinct responses, with different perspectives and choices of words. This, as we conjecture, is caused by both the architecture variations among models as well as the variations from random effects like the initialization of parameters. Another interesting observation is on the forth example, where the retrieval-based method returns a response with the a mismatched entity name “WenShan”, which is actually a quite common problem for retrieval-based model, where the inconsistency details (e.g., dates, named entities), which often render the response unsuitable, cannot be adequately considered in the matching function employed in retrieving the responses. In contrast, we observe that NRMs tend to make general response and barely generate those details. Post R1 ਹ㍖ㅢжཟθඐᤷօθፊᵫ᣿Ⱦ First day of being a vegetarian. Hold on, CuiDuoLa ඐᤷօθඐᤷ㍖伕έ Hold on, Keep up your vegetarian diet. ᜩ㾷‫ڛ‬ᓭ੍ϋᜩ㾷䮵ስ੍ϋ䛙ቧީ⌞ᡇⲺᗤঐ੝Ⱦ R2 Would you like to be healthy? Would you like to live long? If so, follow me on Weibo. R3 䘏ቧᱥՖ䈪ѣⲺਹ㍖੍ϋ This is the so-called vegetarian diet ? ਹ侧Ҽᢃᴿ࣑≊ࠅ㛛 R4 Eat up so that you will have enough energy to go for a diet! 䓡։ᱥ䶟ળⲺᵢ䫧θу㾷⵶ᙛέ R5 Health is the essence for winning your future battles. No rush! Figure 9: Multiple responses generated by the NRM-hyb. We also use the NRM-hyb as an example to investigate the ability of NRM to generate multiple responses. Figure 9 lists 5 responses to the same post, which are gotten with beam search with beam size = 500, among which we keep only the best one (biggest likelihood) for each first word. It can be seen that the responses are fluent, relevant to the post, and still vastly different from each other, validating our initial conjecture that NRM, when fueled with large and rich training corpus, could work as a generator that can cover a lot of modes in its density estimation. 6 Conclusions and Future Work In this paper, we explored using encoder-decoder-based neural network system, with coined name Neural Responding Machine, to generate responses to a post. Empirical studies confirm that the newly proposed NRMs, especially the hybrid encoding scheme, can outperform state-of-the-art retrieval-based and SMTbased methods. Our preliminary study also shows that NRM can generate multiple responses with great variety to a given post. In future work, we would consider adding the intention (or sentiment) of users as an external signal of decoder to generate responses with specific goals. References [Auli et al.2013] Michael Auli, Michel Galley, Chris Quirk, and Geoffrey Zweig. 2013. Joint language and translation modeling with recurrent neural networks. In EMNLP, pages 1044–1054. [Bahdanau et al.2014] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473. [Cho et al.2014] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078. [Chung et al.2014] Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555. [Fleiss1971] Joseph L Fleiss. 1971. Measuring nominal scale agreement among many raters. Psychological bulletin, 76(5):378. [Graves2013] Alex Graves. arXiv:1308.0850. 2013. Generating sequences with recurrent neural networks. preprint [Hochreiter and Schmidhuber1997] Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735–1780. [Howell2010] David C. Howell. 2010. Fundamental Statistics for the Behavioral Sciences. PSY 200 (300) Quantitative Methods in Psychology Series. Wadsworth Cengage Learning. [Ji et al.2014] Zongcheng Ji, Zhengdong Lu, and Hang Li. 2014. An information retrieval approach to short text conversation. arXiv preprint arXiv:1408.6988. [Joachims2006] Thorsten Joachims. 2006. Training linear svms in linear time. In SIGKDD, pages 217–226. ACM. [Kalchbrenner and Blunsom2013] Nal Kalchbrenner and Phil Blunsom. 2013. Recurrent continuous translation models. In EMNLP, pages 1700–1709. [Koehn et al.2007] Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, et al. 2007. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th annual meeting of the ACL on interactive poster and demonstration sessions, pages 177–180. ACL. [Litman et al.2000] Diane Litman, Satinder Singh, Michael Kearns, and Marilyn Walker. 2000. Njfun: a reinforcement learning spoken dialogue system. In Proceedings of the 2000 ANLP/NAACL Workshop on Conversational systems, pages 17–20. ACL. [Mikolov et al.2010] Tomas Mikolov, Martin Karafiát, Lukas Burget, Jan Cernockỳ, and Sanjeev Khudanpur. 2010. Recurrent neural network based language model. In INTERSPEECH 2010, pages 1045–1048. [Misu et al.2012] Teruhisa Misu, Kallirroi Georgila, Anton Leuski, and David Traum. 2012. Reinforcement learning of question-answering dialogue policies for virtual museum guides. In SIGDIAL, pages 84–93. ACL. [Och and Ney2003] Franz Josef Och and Hermann Ney. 2003. A systematic comparison of various statistical alignment models. Computational linguistics, 29(1):19–51. [Papineni et al.2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pages 311–318. Association for Computational Linguistics. [Ritter et al.2011] Alan Ritter, Colin Cherry, and William B Dolan. 2011. Data-driven response generation in social media. In EMNLP, pages 583–593. Association for Computational Linguistics. [Schatzmann et al.2006] Jost Schatzmann, Karl Weilhammer, Matt Stuttle, and Steve Young. 2006. A survey of statistical user simulation techniques for reinforcement-learning of dialogue management strategies. The knowledge engineering review, 21(02):97–126. [Sutskever et al.2014] Ilya Sutskever, Oriol Vinyals, and Quoc VV Le. 2014. Sequence to sequence learning with neural networks. In NIPS, pages 3104–3112. [Wang et al.2013] Hao Wang, Zhengdong Lu, Hang Li, and Enhong Chen. 2013. A dataset for research on shorttext conversations. In EMNLP, pages 935–945. [Williams and Young2007] Jason D Williams and Steve Young. 2007. Partially observable markov decision processes for spoken dialog systems. Computer Speech & Language, 21(2):393–422.
9cs.NE
Synchronization Strings: Efficient and Fast Deterministic Constructions over Small Alphabets∗ Kuan Cheng† Bernhard Haeupler ‡ Xin Li§ Amirbehshad Shahrasbi ¶ Ke Wuk arXiv:1803.03530v1 [cs.IT] 8 Mar 2018 March 12, 2018 Abstract Synchronization strings are recently introduced by Haeupler and Shahrasbi [15] in the study of codes for correcting insertion and deletion errors (insdel codes). A synchronization string is an encoding of the indices of the symbols in a string, and together with an appropriate decoding algorithm it can transform insertion and deletion errors into standard symbol erasures and corruptions. This reduces the problem of constructing insdel codes to the problem of constructing standard error correcting codes, which is much better understood. Besides this, synchronization strings are also useful in other applications such as synchronization sequences and interactive coding schemes. For all such applications, synchronization strings are desired to be over alphabets that are as small as possible, since a larger alphabet size corresponds to more redundant information added. Haeupler and Shahrasbi [15] showed that for any parameter ε > 0, synchronization strings of arbitrary length exist over an alphabet whose size depends only on ε. Specifically, [15] obtained an alphabet size of O(ε−4 ), which left an open question on where the minimal size of such alphabets lies between Ω(ε−1 ) and O(ε−4  ). In this work, we partially bridge this gap by  providing an improved lower bound of Ω ε−3/2 , and an improved upper bound of O ε−2 . We also provide fast explicit constructions of synchronization strings over small alphabets. Further, along the lines of previous work on similar combinatorial objects, we study the extremal question of the smallest possible alphabet size over which synchronization strings can exist for some constant ε < 1. We show that one can construct ε-synchronization strings over alphabets of size four while no such string exists over binary alphabets. This reduces the extremal question to whether synchronization strings exist over ternary alphabets. ∗ Supported in part by NSF grants CCF-1527110, CCF-1618280, CCF-1617713 and NSF CAREER award CCF1750808. † [email protected]. Department of Computer Science, Johns Hopkins University. ‡ [email protected]. Department of Computer Science, Carnegie Mellon University § [email protected]. Department of Computer Science, Johns Hopkins University. ¶ [email protected]. Department of Computer Science, Carnegie Mellon University k [email protected]. Department of Computer Science, Johns Hopkins University. 1 1 Introduction This paper focuses on the study of a combinatorial object called synchronization string. Intuitively, a synchronization string is a (finite or infinite) string that avoids similarities between pairs of intervals in the string. Such nice properties and synchronization strings themselves can actually be motivated from at least two different aspects: coding theory and pattern avoidance. We now discuss the motivations and previous work in each aspect below. 1.1 Motivation and Previous Work in Coding Theory The general and most important goal of the coding theory is to obtain a reliable transmission of information in the presence of noise or adversarial error. Starting from the pioneering works of Shannon, Hamming, and many others, coding theory has evolved into an extensively studied field, with applications found in various areas in computer science. Regarding the general goal of correcting errors, we now have a very sophisticated and almost complete understanding of how to deal with symbol erasures and corruptions. On the other hand, the knowledge of codes for synchronization errors such as insertions and deletions, has lagged far behind despite also being studied intensively since the 1960s. In practice, this is one of the main reasons why communication systems require a lot of effort and resources to maintain synchronization strictly. One major difficulty in designing codes for insertion and deletion errors is that in the received codeword, the positions of the symbols may have changed. This is in contrast to standard symbol erasures and corruptions, where the positions of the symbols always stay the same. Thus, many of the known techniques in designing codes for standard symbol erasures and corruptions cannot be directly utilized to protect against insertion and deletion errors. In this context, a recent work of Haeupler and Shahrasbi [15] introduced synchronization strings, which enable a black-box transformation of Hamming-type error correcting codes to codes that protect against insertions and deletions. Informally, a synchronization string of length n is an encoding of the indices of the n positions into a string over some alphabet Σ, such that, despite some insertion and deletion errors, one can still recover the correct indices of many symbols. With the correct indices of these symbols, a standard error correcting code can then be used to recover the original message. This then gives a code for insertion and deletion errors, which is the combination of a standard error correcting code and a synchronization string. The simplest example of a synchronization string is just to record the index of each symbol, i.e, the string 1, 2, · · · , n. It can be easily checked that even if (1 − ε) fraction of these indices are deleted, one can still correctly recover the positions of the remaining εn symbols. However, this synchronization string uses an alphabet whose size grows with the length of the string. The main contribution of [15] is to show that under a slight relaxation, there exist synchronization strings of arbitrary length n over an alphabet with fixed size. Further, [15] provided efficient and streaming methods to correctly recover the indices of many symbols from a synchronization string after being altered by insertion and deletion errors. Formally, [15] defines ε-synchronization strings as follows. A string S is an ε-synchronization string if the edit distance of any two consecutive substrings S[i, j) and S[j, k) is at least (1 − ε)(k − i). Using the construction and decoding methods for ε-synchronization strings, [15] gives a code that for any δ ∈ (0, 1) and ε > 0, can correct δ fraction of insertion and deletion errors with rate 1 − δ − ε. Besides this, synchronization strings have found a variety of applications, such as in synchronization sequences [22], interactive coding schemes [8, 9, 11, 10, 13, 19, 18, 16], coding against synchronization errors [16, 17], and edit distance tree codes [3, 18]. For all such applications, synchronization strings are desired to be over alphabets that are as small 2 as possible, since a larger alphabet size corresponds to more redundant information added. Thus a natural question here is how small the alphabet size can be. In [15], Haeupler and Shahrasbi showed that ε-synchronization strings with arbitrary length exist over an alphabet of size O(ε−4 ), they also gave a randomized polynomial time algorithm to construct such strings. In a very recent work [16], they further gave various efficient deterministicconstructions for finite/infinite ε-synchronization strings, which have alphabets of size poly ε−1 for some unspecified large polynomials. On the other hand, the definition of synchronization strings implies that any ε−1 consecutive symbols in an ε-synchronization string have to be distinct—providing an Ω ε−1 lower-bound for the alphabet size. 1.2 Motivation and Previous Work in Pattern Avoidance Apart from applications in coding theory and other communication problems involving insertions and deletions, synchronization strings are also interesting combinatorial objects from a mathematical perspective. As a matter of fact, plenty of very similar combinatorial objects have been studied prior to this work. A classical work of Axel Thue [26] introduces and studies square-free strings, i.e., strings that do not contain two identical consecutive substrings. Thue shows that such strings exist over alphabets of size three and provides a fast construction of such strings using morphisms. The seminal work of Thue inspired further works on the same problem [27, 21, 7, 24, 25, 28] and problems with a similar pattern avoidance theme. Krieger et. al. [20] study strings that satisfy relaxed variants of square-freeness, i.e., strings that avoid approximate squares. Their study provides several results on strings that avoid consecutive substrings of equal length with small additive or multiplicative Hamming distance in terms of their length. In each of these regimes, [20] gives constructions of approximate square free strings over alphabets with small constant size for different parameters. Finally, Camungol and Rampersad [5] study approximate squares with respect to edit distance, which is equivalent to the ε-synchronization string notion except that the edit distance property is only required to hold for pairs of consecutive substrings of equal length. [5] employs a technique based on entropy compression to prove that such strings exist over alphabets that are constant in terms of string length but exponentially large in terms of ε−1 . We note that the previous result of Haeupler and Shahrasbi [15] already improves this dependence to O(ε−4 ). Again, a main question addressed in most of the above-mentioned previous work on similar mathematical objects is how small the alphabet size can be. 1.3 Our Results In this paper we study the question of how small the alphabet size of an ε-synchronization string can be. We address this question both for a specified ε and  for unspecified ε. In the first case we −4 provided in [15] and the lower bound of try to bridge the gap between the upper bound of O ε  Ω ε−1 . In the second case we study the question of how small the alphabet size can be to ensure the existence of an ε-synchronization string for some constant ε < 1. In both cases we also give efficient constructions that improve previous results. 1.3.1 New Bounds on Minimal Alphabet Size for a given ε Our first theorem gives improved upper bound and lower bound for the alphabet size of an ε-synchronization string for a given ε. 3  Theorem 1.1. For any 0 < ε < 1, there exists an alphabet Σ of size O ε−2 such that an infinite ε-synchronization string exists over Σ. In addition, ∀n ∈ N, a randomized algorithm can construct an ε-synchronization string of length n in expected time O(n5 log n). Further, the alphabet  size of any ε-synchronization string that is long enough in terms of ε has to be at least Ω ε−3/2 . Next, we provide efficient and even linear-time constructions of ε-synchronization strings over drastically smaller alphabets than the efficient constructions in [16]. Theorem 1.2. For every n ∈ N and any constant ε ∈ (0, 1), there is a deterministic construction of a (long-distance) ε-synchronization string of length n over an alphabet of size O(ε−2 ) that runs in poly(n) time. Further, there is a highly-explicit linear time construction of such strings over an alphabet of size O(ε−3 ). Moreover, in Section 4.3, we present a method to construct infinite synchronization strings using constructions for finite ones that only increases the alphabet size by a constant factor—as opposed to the construction in [16] that increases the alphabet size quadratically. Theorem 1.3. For any constant 0 < ε < 1, there exists an explicit construction of an infinite ε-synchronization string S over an alphabet of size O(ε−2 ). Further, there exists a highly-explicit construction of an infinite ε-synchronization string S over an alphabet of size O(ε−3 ) such that for any i ∈ N, the first i symbols can be computed in O(i) time and S[i, i + log i] can be computed in O(log i) time. 1.3.2 Minimal Alphabet Size for Unspecified ε: Three or Four? One interesting question that has been commonly addressed by previous work on similar combinatorial objects is the size of the smallest alphabet over which one can find such objects. Along the lines of [26, 28, 20, 5], we study the existence of synchronization strings over alphabets with minimal constant size. It is easy to observe that no such string can exist over a binary alphabet since any binary string of length four either contains two consecutive identical symbols or two consecutive identical substrings of length two. On the other hand, one can extract constructions over constant-sized alphabets from the existence proofs in [15, 16], but the unspecified constants there would be quite large. In Section 6.2, for some ε < 1, we provide a construction of arbitrarily long ε-synchronization strings over an alphabet of size four. This narrows down the question to whether such strings exist over alphabets of size three. To construct such strings, we introduce the notion of weak synchronization string, which requires substrings to satisfy a similar property as that of an ε-synchronization string, except that the lower bound on edit distance is rounded down to the nearest integer. We show that weak synchronization strings exist over binary alphabets and use one such string to modify a ternary square-free string ([26]) into a synchronization string over an alphabet of size four. Finally, in Appendix A, we provide experimental evidence for the existence of synchronization strings over ternary alphabets by finding lower-bounds for ε for which ε-synchronization strings over alphabets of size 3, 4, 5, and 6 might exist. Similar experiments have been provided for related combinatorial objects in the previous work [20, 5]. 1.3.3 Constructing Synchronization Strings Using Uniform Morphisms Morphisms have been widely used in previous work as a tool to construct similar combinatorial objects. A uniform morphism of rank r over an alphabet Σ is a function φ : Σ → Σr that maps 4 any symbol of an alphabet Σ to a string of length r over the same alphabet. Using this technique, some similar combinatorial objects in previous work have been constructed by taking a symbol from the alphabet and then repeatedly using an appropriate morphism to replace each symbol with a string [28, 20]. Here we investigate whether such tools can also be utilized to construct synchronization strings. In Section 6.1, we show that no such morphism can construct arbitrarily long ε-synchronization strings for any ε < 1. 2 Some Notations and Definitions Usually we use Σ (probably with some subscripts) to denote the alphabet and Σ∗ to denote all strings over alphabet Σ. Definition 2.1 (Subsequence). The subsequence of a string S is any sequence of symbols obtained from S by deleting some symbols. It doesn’t have to be continuous. Definition 2.2 (Edit distance). For every n ∈ N, the edit distance ED(S, S 0 ) between two strings S, S 0 ∈ Σn is the minimum number of insertions and deletions required to transform S into S 0 . Definition 2.3 (Longest Common Subsequence). For any strings S, S 0 over Σ, the longest common subsequence of S and S 0 is the longest pair of subsequence that are equal as strings. We denote by LCS(S, S 0 ) the length of the longest common subsequence of S and S 0 . Note that ED(S, S 0 ) = |S| + |S 0 | − 2LCS(S, S 0 ) where |S| denotes the length of S. Definition 2.4 (ε-synchronization string). A string S is an ε-synchronization string if ∀1 ≤ i < j < k ≤ |S| + 1, ED(S[i, j), S[j, k)) > (1 − ε)(k − i). Definition 2.5 (square-free string). A string S is a square free string if ∀1 ≤ i < i + 2l ≤ |S| + 1, (S[i, i + l) and S[i + l, i + 2l)) are different as words. We also introduce the following generalization of a synchronization string, which will be useful in our deterministic constructions of synchronization strings. Definition 2.6 (ε-synchronization circle). A string S is an ε-synchronization circle if ∀1 ≤ i ≤ |S|, Si , Si+1 , . . . , S| S|, S1 , S2 , . . . , Si−1 is an ε-synchronization string. 3 ε-synchronization Strings and Circles with Alphabet Size O(ε−2 ) In this section we show that by using a non-uniform sample space together with the Lovász Local Lemma, we can have a randomized polynomial time construction of an ε-synchronization string with alphabet size O(ε−2 ). We then use this to give a simple construction of an ε-synchronization circle with alphabet size O(ε−2 ) as well. Although the constructions here are randomized, the parameter ε can be anything in (0, 1) (even sub-constant), while our deterministic constructions in later sections usually require ε to be a constant in (0, 1). We first recall the General Lovász Local Lemma. Lemma 3.1. (General Lovász Local Lemma) Let A1 , ..., An be a set of bad events. G(V, E) is a dependency graph for this set of events if V = {1, . . . , n} and each event Ai is mutually independent of all the events {Aj : (i, j) ∈ / E}. 5 If there exists x1 , ..., xn ∈ [0, 1) such that for all i we have Y (1 − xj ) Pr(Ai ) ≤ xi (i,j)∈E Then the probability that none of these events happens is bounded by Pr[ n ^ i=1 Āi ] ≥ n Y (1 − xi ) > 0 i=1 Using this lemma, we have the following theorem showing the existence of ε-synchronization strings over an alphabet of size O(ε−2 ). Theorem 3.2. ∀ε ∈ (0, 1) and ∀n ∈ N, there exists an ε-synchronization string S of length n over alphabet Σ of size Θ(ε−2 ). Proof. Suppose |Σ| = c1 ε−2 where c1 is a constant. Let t = c2 ε−2 and 0 < c2 < c1 . The sampling algorithm is as follows: 1. Randomly pick t different symbols from Σ and let them be the first t symbols of S. If t ≥ n, we just pick n different symbols. 2. For t + 1 ≤ i ≤ n, we pick the ith symbol S[i] uniformly randomly from Σ \ {S[i − 1], . . . , S[i − t + 1]} Now we prove that there’s a positive probability that S contains no bad interval S[i, k] which violates the requirement that ED(S[i, j], S[j + 1, k]) > (1 − ε)(k − i) for any i < j < k. This requirement is equivalent to LCS(S[i, j], S[j + 1, k]) < 2ε (k − i). Notice that for k − i ≤ t, the symbols in S[i, k] are completely distinct. Hence we only need to consider the case where k − i > t. First, let’s upper bound the probability that an interval is bad:   εl l Pr[interval I of length l is bad] ≤ (|Σ| − t)− 2 εl εl el εl (|Σ| − t)− 2 εl p ε |Σ| − t −εl ≤( ) e = C −εl ≤ The first inequality holds because if the interval is bad, then it has to contain a repeating sequence a1 a2 . . . ap a1 a2 . . . ap where p is at least εl2 . Such sequence can be specified via choosing εl positions in the interval and the probability that a given sequence is valid for the string in this construction εl is at most (|Σ| − t)− 2 . The second inequality comes from Stirling’s inequality. The inequality above indicates that the probability that an interval of length l is bad can be upper bounded by C −εl , where C is a constant and can be arbitrarily large by modifying c1 and c2 . Now we use general Lovász local lemma to show that S contains no bad interval with positive probability. First we’ll show the following lemma. Claim. The badness of interval I = S[i, j] is mutually independent of the badness of all intervals that do not intersect with I. 6 Proof. Suppose the intervals before I that do not 0 . We denote the indicator variables are I10 , . . . , Im 0 is, ( ( 0 if I is not bad 0 if Ik b= , bk = 1 if I is bad 1 if Ik intersect with I are I1 , . . . , Im , and those after I of each interval being bad as b, bk and b0k0 . That is not bad , is bad b0k0 ( 0 if Ik0 0 is not bad = 1 if Ik0 0 is bad First we prove that there exists p ∈ (0, 1) such that ∀x1 , x2 , . . . , xm ∈ {0, 1}, Pr[b = 1|bk = xk , k = 1, . . . , m] = p According to our construction, we can see that for any fixed prefix S[1, i − 1], the probability that I is bad is a fixed real number p0 . That is, ∀ valid S̃ ∈ Σi−1 , Pr[b = 1|S[1, i − 1] = S̃] = p0 This comes from the fact that, the sampling of the symbols in S[i, k] only depends on the previous h = min{i − 1, t − 1} different symbols, and up to a relabeling these h symbols are the same h symbols (e.g., we can relabel them as {1, · · · , h} and the rest of the symbols as {h + 1, · · · , |Σ|}). On the other hand the probability that b = 1 remains unchanged under any relabeling of the symbols, since if two sampled symbols are the same, they will stay the same; while if they are different, they will still be different. Thus we have: Pr[b = 1|bk = xk , i = 1, . . . , m] Pr[b = 1, bk = xk , i = 1, . . . , m] = Pr[bk = xk , k = 1, . . . , m] P Pr[b = 1, S[1, i − 1] = S̃] = S̃P S̃ Pr[S[1, i − 1] = S̃] X Pr[b = 1, S[1, i − 1] = S̃] Pr[S[1, i − 1] = S̃] ) = ( P 0 Pr[S[1, i − 1] = S̃] S̃ 0 Pr[S[1, i − 1] = S̃ ] S̃ X Pr[S[1, i − 1] = S̃] ) = (Pr[b = 1|S[1, i − 1] = S̃] P 0 S̃ 0 Pr[S[1, i − 1] = S̃ ] S̃ =p0 X Pr[S[1, i − 1] = S̃] 0 S̃ 0 Pr[S[1, i − 1] = S̃ ] P S̃ 0 =p In the equations, S̃ indicates all valid string that prefix S[1, i − 1] can be such that bk = xk , k = 1, . . . , m. Hence, b is independent of {bk , k = 1, . . . , m}. Similarly, we can prove that the joint distribution of {b0k0 , k 0 = 1, . . . , m0 } is independent of that of {b, bk , k = 1, . . . , m}. Hence b is independent of {bk , b0k0 , k = 1, . . . , m, k 0 = 1, . . . , m0 }, which means, the badness of interval I is mutually independent of the badness of all intervals that do not intersect with I. Obviously, an interval of length l intersects at most l + l0 intervals of length l0 . To use Lovász local lemma, we need to find a sequence of real numbers xi,k ∈ [0.1) for intervals S[i, k] for which Y Pr[S[i, k]is bad] ≤ xi,k (1 − xi0 ,k0 ) S[i,k]∩S[i0 ,k0 ]6=∅ 7 The rest of the proof is the same as that of Theorem 5.7 in [15]. We propose xi,k = D−ε(k−i) for some constant D ≥ 1. Hence we only need to find a constant D such that for all S[i, k], n Y C −ε(k−i) ≤ D−ε(k−i) [1 − D−εl ]l+(k−i) l=t That is, for all l0 ∈ {1, ..., n}, C −l0 ≤D −l0 n Y l+l0 [1 − D−εl ] ε l=t which means that D C≥Q n −εl ] l=t [1 − D l/l0 +1 ε Notice that the righthand side is maximized when n = ∞, l0 = 1. Hence it’s sufficient to show that D C≥Q ∞ l=t [1 Let L = maxD>1 Q ∞ D −εl ] l=t [1 − D l+1 ε − D−εl ] . We only need to guarantee that C > L. We claim that L = Θ(1). Since that t = c2 ε−2 = ω( D Q∞ l=t [1 l+1 ε − D−εl ] l+1 ε log ε 1 ε ), D l+1 −εl ] l=t [1 − ε D < Q∞ < = = 1− D P∞ l+1 1− 1 ε 1− 1 2tD−εt ε (1−D−ε )2 l=t ε D−εl D −εl l=t (l + 1)D P∞ D D = 1 1− 2 D− ε ε3 (1−D−ε )2 (1) (2) (3) (4) (5) Inequality (1) comes from the fact that (1 − x)α > 1 − αx, (2) comes from he fact that Q∞ P∞ P∞ xt (1+t−tx) 2txt l < (1−x) 2 , x < 1. i=1 (1 − xi ) ≥ 1 − i=1 xi and (3) is a result from l=t (l + 1)x = (1−x)2 −1 D ε We can see that for D = 7, maxε { ε23 (1−D −ε )2 } < 0.9. Therefore (5) is bounded by a constant, which means L = Θ(1) and the proof is complete. Using a modification of an argument in [15], we can also obtain a randomized construction. Lemma 3.3. There exists a randomized algorithm which for any ε ∈ (0, 1) and any n ∈ N, constructs an ε-synchronization string of length n over alphabet of size O(ε−2 ) in expected time O(n5 log n). Proof. The algorithm is similar to that of Lemma 5.8 in [15], using algorithmic Lovász Local lemma [23] and the extension in [14]. It starts with a string sampled according to the sampling algorithm in the proof of Theorem 3.2, over alphabet Σ of size Cε−2 for some large enough constant C. Then 8 the algorithm checks all O(n2 ) intervals for a violation of the requirements for ε-synchronization string. If a bad interval is found, this interval is re-sampled by randomly choosing every symbol s.t. each one of them is different from the previous t − 1 symbols, where t = c0 ε−2 with c0 being a constant smaller than C. One subtle point of our algorithm is the following. Note that in order to apply the algorithmic framework of [23] and [14], one needs the probability space to be sampled from n independent random variables P = {P1 , · · · , Pn } so that each event in the collection A = {A1 , · · · , Am } is determined by some subset of P. Then, when some bad event Ai happens, one only resamples the random variables that decide Ai . Upon first look, it may appear that in our application of the Lovász Local lemma, the sampling of the i’th symbol depends on the the previous h = min{i − 1, t − 1} symbols, which again depend on previous symbols, and so on. Thus the sampling of the i’th symbol depends on the sampling of all previous symbols. However, we can implement our sampling process as follows: for the i’th symbol we first independently generate a random variable Pi which is uniform over {1, 2, · · · , |Σ| − h}, then we use the random variables {P1 , · · · , Pn } to decide the symbols, in the following way. Initially we fix some arbitrary order of the symbols in Σ, then for i = 1, · · · , n, to get the i’th symbol, we first reorder the symbols Σ so that the previous h chosen symbols are labeled as the first h symbols in Σ, and the rest of the symbols are ordered in the current order as the last |Σ| − h symbols. We then choose the i’th symbol as the (h + Pi )’th symbol in this new order. In this way, the random variables {P1 , · · · , Pn } are indeed independent, and the i’th symbol is indeed chosen uniformly from the |Σ| − h symbols excluding the previous h symbols. Furthermore, the event of any interval S[i, k] being bad only depends on the random variables (Pi , · · · , Pk ) since no matter what the previous h symbols are, they are relabeled as {1, · · · , h} and the rest of the symbols are labeled as {h + 1, · · · , |Σ|}. From here, the same sequence of (Pi , · · · , Pk ) will result in the same behavior of S[i, k] in terms of which symbols are the same. We can thus apply the same algorithm as in [15]. Note that the time to get the i’th symbol from the random variables {P1 , · · · , Pn } is O(n log 1ε ) since we need O(n) operations each on a symbol of size Cε−2 . Thus resampling each interval takes O(n2 log 1ε ) time since we need to resample at most n symbols. For every interval, the edit distance can be computed using the Wagner-Fischer dynamic programming within O(n2 log 1ε ) time. [14] shows that the expected number of re-sampling is O(n). The algorithm will repeat until no bad interval can be found. Hence the overall expected running time is O(n5 log 1ε ). √ Note that without loss of generality we can assume that ε > 1/ n because for smaller errors we can always use the indices directly, which have alphabet size n. So the overall expected running time is O(n5 log n). We can now construct an ε-synchronization circle using Theorem 3.2. Theorem 3.4. For every ε ∈ (0, 1) and every n ∈ N, there exists an ε-synchronization circle S of length n over alphabet Σ of size O(ε−2 ). Proof. First, by Theorem 3.2, we can have two ε-synchronization strings: S1 with length d n2 e over Σ1 and S2 with length b n2 c over Σ2 . Let Σ1 ∩ Σ2 = ∅ and |Σ1 | = |Σ2 | = O(ε−2 ). Let S be the concatenation of S1 and S2 . Then S is over alphabet Σ = Σ1 ∪ Σ2 whose size is O(ε−2 ). Now we prove that S is an ε-synchronization circle. ∀1 ≤ m ≤ n, consider string S 0 = sm , sm+1 , . . . , sn , s1 , s2 , . . . , sm−1 . Notice that for two strings T and T 0 over alphabet Σ, LCS(T, T 0 ) ≤ 2ε (|T |+|T 0 |) is equivalent to ED(T, T 0 ) ≥ (1−ε)(|T |+|T 0 |). For any i < j < k, we call an interval S 0 [i, k] good if LCS(S 0 [i, j], S 0 [j + 1, k]) ≤ 2ε (k − i). It suffices to show that ∀1 ≤ i, k ≤ n, the interval S 0 [i, k] is good. Without loss of generality let’s assume m ∈ [d n2 e, n]. 9 Intervals which are substrings of S1 or S2 are good intervals, since S1 and S2 are ε-synchronization strings. We are left with intervals crossing the ends of S1 or S2 . If S 0 [i, k] contains sn , s1 but doesn’t contain sd n2 e : If j < n − m + 1, then there’s no common subsequence between s0 [i, j] and S 0 [n − m + 2, k]. Thus ε ε LCS(S 0 [i, j], S 0 [j + 1, k]) ≤ LCS(S 0 [i, j], S 0 [j + 1, n − m + 1]) ≤ (n − m + 1 − i) < (k − i) 2 2 If j ≥ n − m + 1, then there’s no common subsequence between S 0 [j + 1, k] and S 0 [i, n − m + 1]. Thus ε ε LCS(S 0 [i, j], S 0 [j + 1, k]) ≤ LCS(S 0 [n − m + 2, j], S 0 [j + 1, k]) ≤ (k − (n − m + 2)) < (k − i) 2 2 Thus intervals of this kind are good. Figure 1: Example where S 0 [i, k] contains sn , s1 but doesn’t contain sd n2 e If S 0 [i, k] contains sb n2 c , sd n2 e but doesn’t contain sn : If j ≤ n − m + b n2 c + 1, then there’s no common subsequence between S 0 [i, j] and S 0 [n − m + d n2 e + 1, k], thus ε n LCS(S 0 [i, j], S 0 [j + 1, k]) ≤ LCS(S 0 [i, j], S 0 [j + 1, n − m + b c + 1]) < (k − i) 2 2 If j ≥ n−m+b n2 c+1, then there’s no common subsequence between S 0 [j+1, k] and S 0 [i, n−m+b n2 c+1]. Thus n ε LCS(S 0 [i, j], S 0 [j + 1, k]) ≤ LCS(S 0 [n − m + d e + 1, j], S 0 [j + 1, k]) < (k − i) 2 2 10 Thus intervals of this kind are good. Figure 2: Example where S 0 [i, k] contains sb n2 c , sd n2 e If S 0 [i, k] contains sd n2 e and sn : If n − m + 2 ≤ j ≤ n − m + b n2 c + 1, then the common subsequence is either that of S 0 [i, n − m + 1] and S 0 [n − m + d n2 e + 1, k] or that of S 0 [n − m + 2, j] and S 0 [j + 1, n − m + b n2 c + 1]. This is because Σ1 ∩ Σ2 = ∅. Thus LCS(S 0 [i, j], S 0 [j + 1, k]) n ≤ max{LCS(S 0 [i, n − m + 1], S 0 [n − m + d e + 1, k]), 2 n 0 0 LCS(S [n − m + 2, j], S [j + 1, n − m + b c + 1])} 2 ε < (k − i) 2 11 Figure 3: Example where S 0 [i, k] contains sd n2 e and sn If j ≤ n − m + 1, then there’s no common subsequence between S 0 [i, j] and S 0 [n − m + 2, n − m + b n2 c + 1]. Thus LCS(S 0 [i, j], S 0 [j + 1, k]) n ≤LCS(S 0 [i, j], S 0 [j + 1, n − m + 1]) + LCS(S 0 [i, j], S 0 [n − m + d e + 1, k]) 2 ε n ε < (n − m + 1 − i) + (n − d e) 2 2 2 ε ε ≤ (n − m + 1 − i) + (k − (n − m + 2)) 2 2 ε = (k − 1 − i) 2 ε < (k − i) 2 If j ≥ S 0 [n − m + d n2 e + 1], the proof is similar to the case where j ≤ n − m + 1. This shows that S 0 is an -synchronization string. Thus by the definition of synchronization circle, the construction gives an -synchronization circle. 4 Deterministic Constructions of Long-Distance Synchronization Strings In this section, we give deterministic constructions of synchronization strings. In fact, we consider a generalized version of synchronization strings, i.e., f (l)-distance ε-synchronization strings first defined by Haeupler and Shahrasbi [16]. Throughout this section, ε is considered to be a constant in (0, 1). 12 Definition 4.1 (f (l)-distance ε-synchronization string). A string S ∈ Σn is an f (l)-distance εsynchronization string if for every 1 ≤ i < j ≤ i0 < j 0 ≤ n + 1, ED (S[i, j), S[i0 , j 0 )) > (1 − ε)(l) for i0 − j ≤ f (l) where l = j + j 0 − i − i0 . As a special case, 0-distance synchronization strings are standard synchronization strings. Similar to [16], we focus on f (l) = n · 1l>c log n where 1l>c log n is the indicator function for l > c log n. This function considers the edit distance of all pairs of large intervals and adjacent small intervals. Definition 4.2 (c-long-distance ε-synchronization strings). We call n·1l>c log n -distance ε-synchronization strings c-long-distance ε-synchronization strings. 4.1 Polynomial Time Constructions of Long-Distance Synchronization Strings Here, by combining the deterministic Lovász local lemma of Chandrasekaran et al. [6] and the non-uniform sample space used in Theorem 3.2, we give a deterministic polynomial-time construction of c-long ε-synchronization strings over an alphabet of size O(ε−2 ). First we recall the following property of c−long synchronization strings. Lemma 4.3 (Corollary 4.4 of [16]). If S is a string which satisfies the c-long-distance ε-synchronization property for any two non-adjacent intervals of total length 2c log n or less, then it satisfies the property for all pairs of non-adjacent intervals. We now have the following theorem. Theorem 4.4. For any n ∈ N and any constant ε ∈ (0, 1), there is a deterministic construction of a O(1/ε)-long-distance ε-synchronization string of length n, over an alphabet of size O(ε−2 ), in time poly(n). Proof. To prove this, we will use the Lovśz Local Lemma and its deterministic algorithm in [6]. Suppose the alphabet is Σ with |Σ| = q = c1 ε−2 where c1 is a constant. Let t = c2 ε−2 and 0 < c2 < c1 . We denote |Σ| − t as q. The sampling algorithm of string S (1-index based)is as follows: • Initialize an arbitrary order for Σ. • For ith symbol: – Denote h = min{t−1, i−1}. Generate a random variable Pi uniformly over {1, 2, . . . , |Σ|− h}. – Reorder Σ such that the previous h chosen symbols are labeled as the first h symbols in Σ, and the rest are ordered in the current order as the last |Σ| − h symbols. – Choose the (Pi + h)’th symbol in this new order as S[i]. Define the bad event Ai1 ,l1 ,i2 ,l2 as intervals S[i1 , i1 + l1 ) and S[i2 , i2 + l2 ) violating the c = O(1/ε)long-distance synchronization string property for i1 + l1 ≤ i2 . In other words, Ai1 ,l1 ,i2 ,l2 occurs if and only if ED(S[i1 , i1 + l1 ), S[i2 , i2 + l2 )) ≤ (1 − ε)(l1 + l2 ), which is equivalent to LCS(S[i1 , i1 + l1 ), S[i2 , i2 + l2 )) ≥ 2ε (l1 + l2 ). Note that according to the definition of c-long distance ε-synchronization string and Lemma 4.3, we only need to consider Ai1 ,l1 ,i2 ,l2 where l1 + l2 < c log n and c log n ≤ l1 + l2 ≤ 2c log n. Thus we can upper bound the probability of Ai1 ,l1 ,i2 ,l2 ,    ε(l1 +l2 ) l1 l2 Pr [Ai1 ,l1 ,i2 ,l2 ] ≤ (|Σ| − t)− 2 ε(l1 + l2 )/2 ε(l1 + l2 )/2 13  ≤ = ≤ ε(l1 +l2 )/2  ε(l1 +l2 )/2 ε(l1 +l2 ) l2 e l1 e (|Σ| − t)− 2 ε(l1 + l2 )/2 ε(l1 + l2 )/2 !ε(l1 +l2 ) √ 2e l1 l2 p ε(l1 + l2 ) |Σ| − t !εl !εl el e p p = = Ĉ εl , εl |Σ| − t ε |Σ| − t where l = l1 + l2 and Ĉ is a constant which depends on c1 and c2 . However, to apply the deterministic Lovśz Local Lemma (LLL), we need to have two additional requirements. The first requirement is that each bad event depends on up to logarithmically many variables, and the second is that the inequalities in the Lovśz Local Lemma hold with a constant exponential slack [16]. The first requirement may not be true under the current definition of badness. Consider for example the random variables Pi1 , . . . , Pi1 +l1 −1 , Pi2 , Pi2 +l2 −1 for a pair of split intervals S[i1 , i1 + l1 ), S[i2 , i2 + l2 ) where the total length l1 + l2 is at least 2c log n. The event Ai1 ,l1 ,i2 ,l2 may depend on too many random variables (i.e., Pi1 , . . . , Pi2 +l2 −1 ). To overcome this, we redefine the badness of the split interval S[i1 , i1 + l1 ) and S[i2 , i2 + l2 ) as follows: let Bi1 ,l1 ,i2 ,l2 be the event that there exists Pi1 +l1 , . . . , Pi2 −1 (i.e., the random variables chosen between the two intervals) such that the two intervals generated by Pi1 . . . , Pi1 +l1 −1 and Pi2 , . . . , Pi2 +l2 −1 (together with Pi1 +l1 , . . . , Pi2 −1 ) makes LCS(S[i1 , i1 + l1 ), S[i2 , i2 + l2 )) ≥ 2ε (l1 + l2 ) according to the sampling algorithm. Note that if Bi1 ,l1 ,i2 ,l2 does not happen, then certainly Ai1 ,l1 ,i2 ,l2 does not happen. Notice that with this new definition of badness, Bi1 ,l1 ,i2 ,l2 is independent of {Pi1 +l1 , . . . , Pi2 −1 } and only depends on {Pi1 . . . , Pi1 +l1 −1 , Pi2 , . . . , Pi2 +l2 }. In particular, this implies that Bi1 ,l1 ,i2 ,l2 is independent of the badness of all other intervals which have no intersection with (S[i1 , i1 + l1 ), S[i2 , i2 + l2 )). We now bound Pr[Bi1 ,l1 ,i2 ,l2 ]. When considering the two intervals S[i1 , i1 + l1 ), S[i2 , i2 + l2 ) and their edit distance under our sampling algorithm, without loss of generality we can assume that the order of the alphabet at the point of sampling S[i1 ] is (1, 2, . . . , q) just by renaming the symbols. Now, if we fix the order of the alphabet at the point of sampling S[i2 ] in our sampling algorithm, then S[i2 , i2 + l2 ) only depends on {Pi2 , . . . , Pi2 +l2 } and thus LCS(S[i1 , i1 + l1 ), S[i2 , i2 + l2 )) only depends on {Pi1 . . . , Pi1 +l1 −1 , Pi2 , . . . , Pi2 +l2 }. Conditioned on any fixed order of the alphabet at the point of sampling S[i2 ], we have that LCS(S[i1 , i1 + l1 ), S[i2 , i2 + l2 )) ≥ 2ε (l1 + l2 ) happens with probability at most Ĉ εl by the same computation as we upper bound Pr[Ai1 ,l1 ,i2 ,l2 ]. Note that there are at most q! different orders of the alphabet. Thus by a union bound we have Pr[Bi1 ,l1 ,i2 ,l2 ] ≤ Ĉ εl × q! = C εl , for some constant C. In order to meet the second requirement of the deterministic algorithm of LLL, we also need to find real numbers xi1 ,i1 +l1 ,i2 ,i2 +l2 ∈ [0, 1] such that for any Bi1 ,l1 ,i2 ,l2 , 1.01  Y Pr[Bi1 ,l1 ,i2 ,l2 ] ≤ xi1 ,l1 ,i2 ,l2 (1 − xi01 ,l10 ,i02 ,l20 ) [S[i1 ,i1 +l1 )∪S[i2 ,i2 +l2 )]∩[S[i01 ,i01 +l10 )∪S[i02 ,i02 +l20 )]6=∅ 14 . We propose xi1 ,l1 ,i2 ,l2 = D−ε(l1 +l2 ) for some D > 1 to be determined later. D has to be chosen such that for any i1 , l1 , i2 , l2 and l = l1 + l2 : e p ε |Σ| 1.01  !εl D−εl ≤  Y 1−D −ε(l10 +l20 )   (6) [S[i1 ,i1 +l1 )∪S[i2 ,i2 +l2 )]∩[S[i01 ,i01 +l10 )∪S[i02 ,i02 +l20 )]6=∅ Notice that  Y D−εl 0 0 1 − D−ε(l1 +l2 )  (7) [S[i1 ,i1 +l1 )∪S[i2 ,i2 +l2 )]∩[S[i01 ,i01 +l10 )∪S[i02 ,i02 +l20 )]6=∅ ≥ D −εl l0  Y 2cY log n 1 − D−εl 0 [(l1 +l10 )+(l1 +l20 )+(l2 +l10 )+(l2 +l20 )]n l0 =c log n l10 =1 × = D cY log n  1 − D−εl l00 =t 2cY log n −εl l+l00 00 l0  Y (8) 1 − D−εl 0 4(l+l0 )n cY log n  × = D −εl  1−D −εl0 4l0 (l+l0 )n × "c log n Y  (9) 1−D −εl00  #l × cY log n  1 − D−εl 00 l00 (10) l00 =t  2cX log n ≥ D−εl 1 − l+l00 l00 =t l0 =c log n  00 l00 =t l0 =c log n l10 =1 2cY log n 1 − D−εl 4l0 (l + l0 )n D  −εl0  l0 =c log n " × 1− cX log n #l D −εl00 × 1− l00 =t  ≥ D−εl 1 − cX log n ! 00 l D −εl00 (11) l00 =t 2cX log n  0 (4 · 2c log n(2c log n + 2c log n)n) D−εl  (12) l0 =c log n " × 1− ∞ X #l D −εl00 × 1− l00 =t  ∞ X ! l00 D −εl00 (13) l00 =t 2cX log n  " −1 −c2 ε × 1− D = D 1 − 32c n log n D 1 − D−ε l0 =c log n ! D−c2 /ε (D−ε + c2 /ε2 − c2 D−ε /ε2 ) × 1− (1 − D−ε )2 " #l   −c2 ε−1 D ≥ D−εl 1 − 32c3 n log3 nD−εc log n 1 − 1 − D−ε ! D−c2 /ε (D−ε + c2 /ε2 − c2 D−ε /ε2 ) × 1− (1 − D−ε )2 −εl 2 2  #l −εl0 15 (14) (15) Equation 8 holds because there are two kinds of pairs of intervals. The first kind contains all pairs of intervals whose total length is between c log n and 2c log n intersecting with S[i1 , i1 + l1 ) or S[i2 , i2 + l2 ). The number of such pairs is at most (l1 + l10 ) + (l1 + l20 ) + (l2 + l10 ) + (l2 + l20 ). The second kind contains all adjacent intervals of total length less than c log n. Notice that according to our sampling algorithm, every t consecutive symbols are distinct, thus any adjacent intervals whose total length is less than t cannot be bad. Hence the second term contains intervals such that t ≤ l00 = l100 + l200 ≤ c log n. The rest of the proof is the same as that of Theorem 4.5 in [16]. Equation 11 comes from the fact that for 0 < x, y < 1: (1 − x)(1 − y) > 1 − x − y For D = 2 and c = 2/ε, 2−c2 /ε =0 ε→0 1 − 2−ε lim Thus, for sufficiently small ε, 2−c2 /ε 1−2−ε < 21 . Moreover, 0 32c2 n log2 nD−εl = −c2 /ε 28 log3 n = o(1) ε3 n −ε 2 −ε 2 (D +c2 /ε −c2 D /ε ) Finally, for sufficiently small ε, 1 − D > 2−ε . Therefore, for sufficiently (1−D−ε )2 small ε and sufficiently large n, 15 is satisfied under the condition:   Y 0 0 D−εl 1 − D−ε(l1 +l2 ) [S[i1 ,i1 +l1 )∪S[i2 ,i2 +l2 )]∩[S[i01 ,i01 +l10 )∪S[i02 ,i02 +l20 )]6=∅ 1 1 4−εl ≥ 2−εl (1 − )(2−ε )l (1 − ) ≥ 2 2 4 So for LLL to work, the following should be guaranteed: e p ε |Σ| − t ! εl 1.01 2 4−εl 42.02(1+ε)e ≤ ⇐ ≤ |Σ| − t 4 ε2 Hence the second requirement holds for |Σ| − t = 44.04 e2 ε2 = O(ε−2 ). Corollary 4.4.1. For any n ∈ N and any constant ε ∈ (0, 1), there is a deterministic construction of an ε-synchronization string of length n, over an alphabet of size O(ε−2 ), in time poly(n). By a similar concatenation construction used in the proof of Theorem 3.4, we also have a deterministic construction for synchronization circles. Corollary 4.4.2. For any n ∈ N and any constant ε ∈ (0, 1), there is a deterministic construction of an ε-synchronization circle of length n, over an alphabet of size O(ε−2 ), in time poly(n). 4.2 Deterministic linear time constructions of c-long distance ε-synchronization string Here we give a much more efficient construction of a c-long distance ε-synchronization string, using synchronization circles and standard error correcting codes. We show that the following algorithm gives a construction of c-long distance synchronization strings. 16 Algorithm 1 Explicit Linear Time Construction of c-long distance ε-synchronization string Input: • An ECC Cˆ ⊂ Σm , with distance δm and block length m = c log n. Ĉ • An ε0 -synchronization circle SC = (sc1 , . . . , scm ) of length m over alphabet ΣSC . Operations: • Construct a code C ⊂ Σm such that ˆ C = {((ĉ1 , sc1 ), . . . , (ĉm , scm ))|(ĉ1 , . . . , ĉm ) ∈ C} where Σ = ΣĈ × ΣSC . • Let S be concatenation of all codewords C1 , . . . , CN from C. Output: S. To prove the correctness, we first recall the following theorem from [15]. Theorem 4.5 (Theorem 4.2 of [15]). Given an ε0 -synchronization string S with length n, and 0 an efficient ECC C with block length n, that corrects up to nδ 1+ε 1−ε0 half-errors, one can obtain an 0 insertion/deletion code C that can be decoded from up to nδ deletions, where C 0 = {(c01 , . . . , c0n )|∀i ∈ [n], c0i = (ci , S[i]), (c1 , . . . , cn ) ∈ C}. We have the following property of longest common subsequence. Lemma 4.6. Suppose T1 is the concatenation of `1 strings, T1 = S1 ◦ · · · ◦ S`1 and T2 is the concatenation of `2 strings, T2 = S10 ◦ · · · ◦ S`0 2 . If there exists an integer t such that for all i, j, we have LCS(Si , Sj0 ) ≤ t, then we have LCS(T1 , T2 ) ≤ (`1 + `2 )t. Proof. We rename the strings in T2 by S`1 +1 , · · · , S`1 +`2 . Suppose the longest common subsequence between T1 and T2 is T̃ , which can be viewed as a matching between T1 and T2 . we can divide T̃ sequentially into disjoint intervals, where each interval corresponds to a common subsequence between a different pair of strings (Si , Sj ), where Si is from T1 and Sj is from T2 . In addition, if we look at the intervals from left to right, then for any two consecutive intervals and their corresponding pairs (Si , Sj ) and (Si0 , Sj 0 ), we must have i0 ≥ i and j 0 ≥ j since the matchings which correspond to two intervals cannot cross each other. Furthermore either i0 > i or j 0 > j as the pair (Si , Sj ) is different from (Si0 , Sj 0 ). Thus, starting from the first interval, we can label each interval with either i or j such that every interval receives a different label, as follows. We label the first interval using either i or j. Then, assuming we have already labeled some intervals and now look at the next interval. Without loss of generality assume that the previous interval is labeled using i, now if the current i0 > i then we can label the current interval using i0 ; otherwise we must have j 0 > j so we can label the current interval using j 0 . Thus the total number of the labels is at most l1 + l2 , which means the total number of the intervals is also at most l1 + l2 . Note that each interval has length at most t, therefore we can upper bound LCS(T1 , T2 ) by (l1 + l2 )t. 1−ε0 Lemma 4.7. The output S in Algorithm 1 is an ε1 -synchronization circle, where ε1 ≤ 10(1 − 1+ε δ). 0 17 Proof. Suppose Cˆ can correct up to δm half-errors. Then according to lemma 4.5, C can correct up 0 to 1−ε 1+ε0 δm deletions. 0 Let α = 1 − 1−ε 1+ε0 δ. Notice that C has the following properties: 1. LCS(C) = maxc1 ,c2 ∈C LCS(c1 , c2 ) ≤ αm 2. Each codeword in C is an ε-synchronization circle over Σ. Consider any shift of the start point of S, we only need to prove that ∀1 ≤ i < j < k ≤ n, LCS(S[i, j], S[j + 1, k]) < ε21 (k − i). Suppose S1 = S[i, j] and S2 = S[j + 1, k]. Let ε1 = 10α. Case 1: k − i > m. Let |S1 | = s1 and |S2 | = s2 , thus s1 + s2 > m. If we look at each Sh for h = 1, 2, then Sh can be divided into some consecutive codewords, plus at most two incomplete codewords at both ends. In this sense each Sh is the concatenation of `h strings with `h < smh + 2. An example of the worst case appears in Figure 4. Figure 4: Example of the worst case, where j splits a codeword, and there are two incomplete codewords at both ends. Now consider the longest common subsequence between any pair of these strings where one is from S1 and the other is from S2 , we claim that the length of any such longest common subsequence is at most αm. Indeed, if the pair of strings are from two different codewords, then by the property of the code C we know the length is at most αm. On the other hand, if the pair of strings are from a single codeword (this happens when j splits a codeword, or when S[i] and S[k] are in the same codeword), then they must be two disjoint intervals within a codeword. In this case, by the property that any codeword is also a synchronization circle, the length of the longest common subsequence of this pair is at most ε20 m. 2ε0 ε0 1−ε0 0 Note that α = 1 − 1−ε 1+ε0 δ ≥ 1 − 1+ε0 = 1+ε0 ≥ ε0 (since δ, ε0 ∈ (0, 1)). Thus 2 m < αm. Therefore, by Lemma 4.6, we have LCS(S1 , S2 ) s1 s2 <( + 2 + + 2)αm m m =α(s1 + s2 + 4m) (16) <5α(s1 + s2 ) ε1 (k − i) 2 Case 2: If k − i ≤ m, then according to the property of synchronization circle SC, we know that the longest common subsequence of S1 and S2 is less than ε20 (k − i) ≤ α(k − i) ≤ ε21 (k − i). As a result, the longest common subsequence of S[i, j] and S[j + 1, k] is less than ε21 (k − i), which means that S is an ε1 -synchronization circle. =5α(k − i) = Similarly, we also have the following lemma. 18 Lemma 4.8. The output S of algorithm 1 is a c-long distance ε-synchronization string of length 0 n = N m where N is the number of codewords in C, ε = 12(1 − 1−ε 1+ε0 δ). Proof. By Lemma 4.7, S is an ε1 -synchronization string, thus the length of longest common subsequence for adjacent intervals S1 , S2 with total length l < c log n is less than ε21 l. We only need to consider pair of intervals S1 , S2 whose total length l ∈ [c log n, 2c log n]. Notice that the total length of S1 and S2 is at most 2c log n, which means that S1 and S2 each intersects with at most 3 codewords from C. Using Lemma 4.6, we have that LCS(S1 , S2 ) ≤ 6αl. 0 Thus picking ε = max{12α, ε1 } = 12α = 12(1 − 1−ε 1+ε0 δ), S from algorithm 1 is a c-long distance ε-synchronization circle. We need the following code constructed by Guruswarmi and Indyk [12]. Lemma 4.9 (Theorem 3 of [12]). For every 0 < r < 1, and all sufficiently small ε > 0, there exists −4 −1 a family of codes of rate r and relative distance (1 − r − ε) over an alphabet of size 2O(ε r log(1/ε)) such that codes from the family can be encoded in linear time and can also be uniquely decoded in linear time from 2(1 − r − ε) fraction of half errors. Lemma 4.10 (ECC by Brute Force Search). For any n ∈ N, any ε ∈ [0, 1], one can construct n εn a ECC in time O(2εn ( 2e ε ) n log(1/ε)) and space O(2 n log(1/ε)), with block length n, number of εn codewords 2 , distance d = (1 − ε)n, alphabet size 2e/ε. We can now use Algorithm 1 to give a linear time construction of c − long − distance εsynchronization strings. Theorem 4.11. For every n ∈ N and any constant 0 < ε < 1, there is a deterministic construction of a c = O(ε−2 ) − long − distance ε-synchronization string S ∈ Σn where |Σ| = O(ε−3 ), in time n O(n). Moreover, S[i, i + log n] can be computed in O( log ) time. ε2 Proof. Suppose we have an error correcting code Cˆ with distance rate 1 − ε0 = ε 1+ 36 ε 1− 36 ε (1 − 12 ), message rate rc = O(ε02 ), over an alphabet of size |Σc | = O(ε0−1 ), with block length m = O(ε0−2 log n). ε Let c = O(ε0−2 ) = O(ε−2 ). We apply Algorithm 1, using Ĉ and an 36 -synchronization circle −2 SC of length m over an alphabet of size O(ε ). Here SC is constructed by Corollary 4.4.2 in 1− ε time poly(m) = poly(log n). By Lemma 4.8, we have a c-long-distance 12(1 − 1+ 36ε (1 − ε0 )) = ε36 synchronization string of length m · |Σc |rc m ≥ n. It remains to show that we can have such a Cˆ with linear time encoding. We use the code in Lemma 4.9 as the outer code and the one in Lemma 4.10 as inner code. Let Cout be an instantiation of the code in Lemma 4.9 with rate ro = εo = 13 ε0 , relative distance do = (1 − 2εo ) and alphabet size −5 4 εo log n 2O(εo log(1/εo )) , and block length no = log(1/ε , which is encodable and decodable in linear time. o) Further, according to Lemma 4.10 one can find a code Cin with rate ri = O(εi ) where εi = 13 ε0 , −6 relative distance 1 − εi , over an alphabet of size 2e εi , and block length ni = O(εi log(1/εi )). Note that since the block length and alphabet size are both constant because ε is a constant. So the encoding can be done in constant time. Concatenating Cout and Cin gives the desire code Cˆ with rate O(ε02 ), distance 1 − O(ε0 ) and alphabet of size O(ε0−1 ) and block length O(ε0−2 log n). Moreover, the encoding of Cˆ can be done in linear time, because the encoding of Cout is in linear time and the encoding of Cin is in constant time. n Note that since every codeword of Cˆ can be computed in time O( log ), S[i, i + log n] can be ε2 log n computed in O( ε2 ) time. 19 Corollary 4.11.1. For every n ∈ N and any constant 0 < ε < 1, there is a deterministic construction of an ε-synchronization string S ∈ Σn where |Σ| = O(ε−3 ), in time O(n). Moreover, n S[i, i + log n] can be computed in O( log ) time. ε2 4.3 Explicit Constructions of Infinite Synchronization Strings In this section we focus on the construction of infinite synchronization strings. The definition of infinite synchronization strings is similar to that of standard synchronization strings except that the length of the string is infinite. Definition 4.12 (Infinite ε-synchronization string). A string S is an infinite ε-synchronization string if it has infinite length and ∀1 ≤ i < j < k, ED(S[i, j), S[j, k)) > (1 − ε)(k − i). To measure the efficiency of the construction of an infinite string, we consider the time complexity for computing the first n elements of that string. An infinite synchronization string is said to have an explicit construction if there is an algorithm that computes any position S[i] in time poly(i). Moreover, it is said to have a highly-explicit construction if there is an algorithm that computes any position S[i] in time O(log i). We have the following algorithm. Algorithm 2 Construction of infinite ε-synchronization string Input: • A constant ε ∈ (0, 1). Operations: • Let q ∈ N be the size of an alphabet large enough to construct an 2ε -synchronization string. Let Σ1 and Σ2 be two alphabets of size q such that Σ1 ∩ Σ2 = ∅. • Let k = 4ε . For i = 1, 2, . . ., construct an 2ε -synchronization string Ski of length k i , where Ski is over Σ1 if i is odd and over Σ2 otherwise. • Let S be the sequential concatenation of Sk , Sk2 , Sk3 , . . . , Skt , . . . Output: S. Lemma 4.13. If there is a construction of 2ε -synchronization strings with alphabet size q, then Algorithm 2 constructs an infinite ε-synchronization string owith alphabet size 2q. Proof. Algorithm 2 can be shown as in the figure below. Figure 5: Sk and Sk3 are over alphabet Σ1 and Sk2 is over Σ2 . Now we show that S is an infinite ε-synchronization string. Claim. Let x < y < z be positive integers and let t be such that k t ≤ |S[x, z)| < k t+1 . Then ED(S[x, y), S[y, z)) ≥ (1 − 2ε )(z − x)(1 − k2 ). 20 P i+1 Proof. Let li be the index of S where Ski+1 starts. Then li = ij=1 k j = k k−1−k . Notice that lt−1 < 2k t−1 and |S[x, z)| ≥ k t , one can throw away all elements of S[x, z) whose indices are less t−1 than lt−1 without losing more than 2kkt = k2 fraction of the elements of S[x, z). We use S[x0 , z) to denote the substring after throwing away the symbols before lt−1 . Thus x0 ≥ lt−1 . Since x0 ≥ lt−1 , S[x0 , z) either entirely falls into a synchronization string Skl or crosses two synchronization strings Skl and Skl+1 over two entirely different alphabets Σ1 and Σ2 . Thus the edit distance of S[x0 , y) and S[y, z) is at least (1 − 2ε )(z − x). Since k = 4ε , we have that     ε 2 2 ε = 1− (z − x) ≥ (1 − ε)(z − x). (z − x) 1 − ED(S[x, y), S[y, z)) ≥ 1 − 2 k 2 This shows that S is an ε-synchronization string. If we instantiate Algorithm 2 using Corollary 4.4.1, then we have the following theorem. Theorem 4.14. For any constant 0 < ε < 1, there exists an explicit construction of an infinite ε-synchronization string S over an alphabet of size O(ε−2 ). Proof. We combine Algorithm 2 and Corollary 4.4.1. In the algorithm, we can construct every substring Ski in polynomial time with alphabet size q = O(ε−2 ), by Corollary 4.4.1. So the first n symbols of S can be computed in polynomial time. By Lemma 4.13, S is an infinite ε-synchronization string over an alphabet of size 2q = O(ε−2 ). If we instantiate Algorithm 2 using Corollary 4.11.1, then we have the following theorem. Theorem 4.15. For any constant 0 < ε < 1, there exists a highly-explicit construction of an infinite ε-synchronization string S over an alphabet of size O(ε−3 ). Moreover, for any i ∈ N, the first i symbols can be computed in O(i) time and S[i, i + log i] can be computed in O(log i) time. Proof. Combine Algorithm 2 and Corollary 4.11.1. In the algorithm, we can construct every substring Ski in linear time with alphabet size q = O(ε−3 ), by Corollary 4.11.1. So the first i symbols can be computed in O(i) time. Also any substring S[i, i + log i] can be computed in time O(log i). By Lemma 4.13, S is an infinite ε-synchronization string over an alphabet of size 2q = O(ε−3 ). 5  Ω ε−3/2 Lower-Bound on Alphabet Size The twin word problem was introduced by Axenovich, Person, and Puzynina [1] and further studied by Bukh and Zhou [4]. Any set of two identical disjoint subsequences in a given string is called a twin word. [1, 4] provided a variety of results on the relations between the length of a string, the size of the alphabet over which it is defined, and the size of the longest twin word it contains. We will make use of the following result from [4] that is built upon Lemma 5.9 from [2] to provide a new lower-bound on the alphabet size of synchronization strings. Theorem 5.1 (Theorem 3 from [4]). There exists a constant c so that every word of length n over a q-letter alphabet contains two disjoint equal subsequences of length cnq −2/3 . Further, Theorem 6.4 of [15] states that any ε-synchronization string of length n has to satisfy ε-self-matching property which essentially means that it cannot contain two (not necessarily disjoint) subsequences of length εn or more. These two requirements lead to the following inequality for an ε-synchronization string of length n over an alphabet of size q. cnq −2/3 ≤ εn ⇒ c0 ε−3/2 ≤ q 21 6 Synchronization Strings over Small Alphabets In this section, we focus on synchronization strings over small constant-sized alphabets. We study the question of what is the smallest possible alphabet size over which arbitrarily long ε-synchronization strings can exist for some ε < 1, and how such synchronization strings can be constructed. Throughout this section, we will make use of square-free strings introduced by Thue [26], which is a weaker notion than synchronization strings that requires all consecutive equal-length substrings to be non-identical. Note that no synchronization strings or square-free strings of length four or more exist over a binary alphabet since a binary string of length four either contains two consecutive similar symbols or two identical consecutive substrings of length two. However, for ternary alphabets, arbitrarily long square-free strings exist and can be constructed efficiently using uniform morphism [28]. In Section 6.1, we will briefly review this construction and show that no uniform morphism can be used to construct arbitrary long synchronization strings. In Section 6.2, we make use of ternary square-free strings to show that arbitrarily long ε-synchronization strings exist over alphabets of size four for some ε < 1. Finally, in Section A, we provide experimental lower-bounds on ε’ for which ε-synchronization strings exist over alphabets of size 3, 4, 5, and 6. 6.1 Morphisms cannot Generate Synchronization Strings Previous works show that one can construct infinitely long square-free or approximate-square-free strings using uniform morphisms. A uniform morphism of rank r over an alphabet Σ is a function φ : Σ → Σr that maps any symbol out of an alphabet Σ to a string of length r over the same alphabet. Applying the function φ over some string S ∈ Σ∗ is defined as replacing each symbol of S with φ(S). [20, 27, 21, 7, 28] show that there are uniform morphisms that generate the combinatorial objects they study respectively. More specifically, one can start from any letter of the alphabet and repeatedly apply the morphism on it to construct those objects. For instance, using the uniform morphisms of rank 11 suggested in [28], all such strings will be square-free. In this section, we investigate the possibility of finding similar constructions for synchronization strings. We will show that no such morphism can possibly generate an infinite ε-synchronization strings for any fixed 0 < ε < 1. The key to this claim is that a matching between two substrings is preserved under an application of the uniform morphism φ. Hence, we can always increase the size of a matching between two substrings by applying the morphism sufficiently many times, and then adding new matches to the matching from previous steps. Theorem 6.1. Let φ be a uniform morphism of rank r over alphabet Σ. Then φ does not generate an infinite ε-synchronization string, for any 0 < ε < 1. Proof. To prove this, we show that for any 0 < ε < 1, applying morphism φ sufficiently many times over any symbol of alphabet Σ produces a strings that has two neighboring intervals which contradict ε-synchronization property. First, we claim that, without loss of generality, it suffices to prove this for morphisms φ for which φ(σ) contains all elements of Σ for any σ ∈ Σ. To see this, consider the graph G with |Σ| vertices where each vertex corresponds to a letter of the alphabet and there is a (σ1 , σ2 ) edge if φ(σ1 ) contains σ2 . It is straightforward to verify that after applying morphism φ over a letter sufficiently many times, the resulting string can be split into a number of substrings so that the symbols in any of them belong to a subset of Σ that corresponds to some strongly connected component in G. As ε-synchronization string property is a hereditary property over substrings, this gives that one can, without loss of generality, prove the above-mentioned claim 22 for morphisms φ for which the corresponding graph G is strongly connected. Further, let d be the greatest common divisor of the size of all cycles in G. One can verify that, for some sufficiently large k, φkd will be a morphism that, depending on the letter σ to perform recursive applications of the morphism on, will always generate strings over some alphabet Σσ and φkd (σ 0 ) contains all symbols of Σσ for all σ 0 ∈ Σσ . As proving the claim for φkd implies it for φ as well, the assumption mentioned above does not harm the generality. We now proceed to prove that for any morphism φ of rank r as described above, any positive integer n ∈ N, and any positive constant 0 < δ < 1, there exists m ∈ N so that n    1 m m − δ · rm LCS(φ (a), φ (b)) ≥ 1 − 1 − |Σ|2 r for any a, b ∈ Σ where φm represents m consecutive applications of morphism φ and LCS(., .) denotes the longest common substring. Having such claim proved, one can take δ = (1 − ε)/2 and n large enough so that m applications of φ over any pair of symbols entail strings with a longest common substring that is of a fraction larger than 1 − (1 − ε) = ε in terms of the length of those strings. Then, for any string S ∈ Σ∗ , one can take two arbitrary consecutive symbols of φ(S) like S[i] and S[i + 1]. Applying morphism φ, m more times on φ(S) makes the corresponding intervals of φm+1 (S) have an edit distance that is smaller than 1 − ε fraction of their combined lengths. This shows that φm+1 (S) is not an ε-synchronization string and finishes the proof. Finally, we prove the claim by induction on n. For the base case of n = 1, given the assumption of all members of Σ appearing in φ(σ) for all σ ∈ Σ, φ(a) and φ(b) have a non-empty common subsequence. This gives that        1 1 LCS(φ(a), φ(b)) ≥ 1 = 1 − 1 − ·r > 1− 1− − δ · r. r |Σ|2 r Therefore, choosing m = 1 finishes the induction base. We now prove the induction step. Note that by induction hypothesis, for some given n, one can find m1 such that   n  1 δ m1 m1 LCS(φ (a), φ (b)) ≥ 1 − 1 − − · rm1 . |Σ|2 r 2   Now, let m2 = logr 2δ . Consider φm2 (a) and φm2 (b). Note that among all possible pairs of symbols m from Σ2 , one appears at least r|Σ|22 times in respective positions of φm2 (a) and φm2 (b). Let (a0 , b0 ) be such pair. As φ(a0 ) and φ(b0 ) contain all symbols of Σ, one can take one specific occurrence of a fixed arbitrary symbol σ ∈ Σ in all appearances of the pair φ(a0 ) and φ(b0 ) to find a common m m +1 subsequence of size r|Σ|22 = r|Σ|22 r or more between φm2 +1 (a) and φm2 +1 (b) (See Figure 6). 𝜙 𝑚2 (𝑎) 𝜙 𝑚2 (⋅) 𝜙 𝑚2 +1 (𝑎) 𝜙(⋅) 𝑎 𝑎 𝑏 𝑐 𝑏 𝑎 𝜙(𝑎) 𝑏 𝑐 𝑎 𝑏 𝑎 𝑏 𝜙(𝑐) 𝜙(𝑏) 𝜎 𝜙(𝑐) 𝜙(𝑎) 𝜙(𝑏) 𝜎 𝜙 𝑚2 (𝑏) 𝜙(𝑏) 𝜎 𝜙(𝑎) 𝜙(𝑎) 𝜙(𝑏) 𝜎 𝜙 𝑚2 +1 (𝑏) Figure 6: Induction step in Theorem 6.1; Most common pair (a0 , b0 ) = (b, a). 23 Note that one can apply the morphism φ further times over φm2 +1 (a) and φm2 +1 (b) and such common subsequence will still be preserved; However, one might be able to increase the size of it by adding new elements to the common subsequence from equal length pairs of intervals between current common subsequence elements (denoted by blue dashed line in Figure 6). The total length of such intervals is 1 1 r δ 1− − m2 +1 = 1 − − 2 2 |Σ| r r |Σ| r 2 or more. In fact, using the induction hypothesis, by applying the morphism m1 more times, one can get the following for m = m1 + m2 + 1. "   n  1 δ 1 m m + 1− 1− − LCS(φ (a), φ (b)) ≥ |Σ|2 r |Σ|2 r 2 #   1 δ · 1− rm − |Σ|2 r 2 " #  n+1 1 ≥ 1− 1− − δ rm |Σ|2 r This completes the induction step and finishes the proof. 6.2 Synchronization Strings over Alphabets of Size Four In this section, we show that synchronization strings of arbitrary length exist over alphabets of size four. In order to do so, we first introduce the notion of weak ε-synchronization strings. This weaker notion is very similar to the synchronization string property except the edit distance requirement is rounded down. Definition 6.2 (weak ε-synchronization strings). String S of length n is a weak ε-synchronization string if for every 1 ≤ i < j < k ≤ n, ED(S[i, j), S[j, k)) ≥ b(1 − ε)(k − i)c. We start by showing that binary weak ε-synchronization strings exist for some ε < 1. 6.2.1 Binary Weak ε-Synchronization Strings Here we prove that an infinite binary weak ε-synchronization string exists. The main idea is to take a synchronization string over some large alphabet and convert it to a binary weak synchronization string by mapping each symbol of that large alphabet to a binary string and separating each binary encoded block with a block of the form 0k 1k . Theorem 6.3. There exists a constant ε < 1 and an infinite binary weak ε-synchronization string. Proof. Take some arbitrary ε0 ∈ (0, 1). According to [15], there exists an infinite ε0 -synchronization string S over a sufficiently large alphabet Σ. Let k = dlog |Σ|e. Translate each symbol of S into k binary bits, and separate the translated k-blocks with 0k 1k . We claim that this new string T is a weak ε-synchronization binary string for some ε < 1. First, call a translated k-length symbol followed by 0k 1k a full block. Call any other (possibly empty) substring a half block. Then any substring of T is a half-block followed by multiple full blocks and ends with a half block. 24 Let A and B be two consecutive substrings in T . Without loss of generality, assume |A| ≤ |B| (because edit distance is symmetric). Let M be a longest common subsequence between A and B. Partition blocks of B into the following 4 types of blocks: 1. Full blocks that match completely to another full block in A. 2. Full blocks that match completely but not to just 1 full block in A. 3. Full blocks where not all bits within are matched. 4. Half blocks. The key claim is that the 3k elements in B which are matched to a type-2 block in A are not contiguous and, therefore, there is at least one unmatched symbol in B surrounded by them. To see this, assume by contradiction that all letters of some type-2 block in A are matched contiguously. The following simple analysis over 3 cases contradicts this assumption: • Match starts at middle of some translated k-length symbol, say position p ∈ [2, k]. Then the first 1 of 1k in A will be matched to the (k − p + 2)-th 0 of 0k in B, contradiction. • Match starts at 0-portion of 0k 1k block, say at the p-th 0. Then the p-th 1 of 1k in A will be matched to the first 0 of 0k in B, contradiction. • Match starts at 1-portion of 0k 1k block, say at the p-th 1. Then the p-th 0 of 0k in A will be matched to the first 1 of 1k in B, contradiction. Let the number of type-i blocks in B be ti . For every type-2 block, there is an unmatched letter in A between its first and last matches. Hence, |A| ≥ |M | + t2 . For every type-3 block, there is an unmatched letter in B within. Hence, |B| ≥ |M | + t3 . Therefore, |A| + |B| ≥ 2|M | + t2 + t3 . Since |A| ≤ |B|, the total number of full blocks in both A and B is at most 2(t1 + t2 + t3 ) + 1. (the additional +1 comes from the possibility that the two half-blocks in B allows for one extra full block in A) Note t1 is a matching between the full blocks in A and the full blocks in B. So due to the ε0 -synchronization property of S, we obtain the following. t1 ≤ ε0 ε0 ε0 (2(t1 + t2 + t3 ) + 1) =⇒ t1 ≤ (t + t ) + 2 3 2 1 − ε0 2(1 − ε0 ) |A|+|B| Furthermore, t1 + t2 + t3 + 2 > |B| 3k ≥ 6k . This, along with the above inequality, implies the following. |A| + |B| 1 4 − 3ε0 (t + t ) + > . 2 3 0 0 1−ε 2(1 − ε ) 6k The edit distance between A and B is ED(A, B) = |A| + |B| − 2|M | ≥ t2 + t3 1 − ε0 4 − 3ε0 1 − ε0 > (|A| + |B|) − > (|A| + |B|) − 2. 6k 2 6k Set ε = 1 − 1−ε0 18k . If |A| + |B| ≥ 1 1−ε , then   1 − ε0 1 − ε0 (|A| + |B|) − 2 ≥ − 2(1 − ε) (|A| + |B|) 6k 6k = (1 − ε)(|A| + |B|) ≥ b(1 − ε)(|A| + |B|)c. As weak ε-synchronization property trivially holds for |A| + |B| < weak ε-synchronization string. 25 1 1−ε , this will prove that T is a 6.2.2 ε-Synchronization Strings over Alphabets of Size Four A corollary of Theorem 6.3 is the existence of infinite synchronization strings over alphabets of size four. Here we make use of the fact that infinite ternary square-free strings exist, which was proven in previous work [26]. We then modify such a string to fulfill the synchronization string property, using the existence of an infinite binary weak synchronization string. Theorem 6.4. There exists some ε ∈ (0, 1) and an infinite ε-synchronization string over an alphabet of size four.  Proof. Take an infinite ternary square-free string T over alphabet {1, 2, 3} [26] and some ε ∈ 11 12 , 1 . Let S be an infinite weak binary ε0 = (12ε − 11)-synchronization string. Consider the string W that is similar to T except that the i-th occurrence of symbol 1 in T is replaced with symbol 4 if S[i] = 1. Note W is still square-free. We claim W is an ε-synchronization string as well. Let A = W [i, j), B = W [j, k) be two consecutive substrings of W . If k − i < 1/(1 − ε), then ED(A, B) ≥ 1 > (1 − ε)(k − i) by square-freeness. Otherwise, k − i ≥ 1/(1 − ε) ≥ 12. Consider all occurrences of 1 and 4 in A and B, which form consecutive subsequences As and Bs of S respectively. Note that |As | + |Bs | ≥ (k − i − 3)/4, because, by square-freeness, there cannot be a length-4 substring consisting only of 2’s and 3’s in W . By weak synchronization property, ED(As , Bs ) ≥ b(1 − ε0 )(|As | + |Bs |)c ≥ b3(1 − ε)(k − i − 3)c > 3(1 − ε)(k − i) − 9(1 − ε) − 1 ≥ (1 − ε)(k − i), and hence, ED(A, B) ≥ ED(As , Bs ) ≥ (1 − ε)(k − i). Therefore, W is an ε-synchronization string. Organization and Acknowledgements All detailed proofs appear in the appendix. Specifically, proofs in Section 3 appear in Appendix A, proofs in Section 4 appear in Appendix B, and proofs in Section 6 appear in Appendix C. The authors thank Raymond Kang for valuable discussions in the early stages of this work, contributions to Theorem 6.1, and experiments in Appendix A. We also thank Noga Alon for referring us to the previous work on the twin word problem. References [1] Maria Axenovich, Yury Person, and Svetlana Puzynina. A regularity lemma and twins in words. Journal of Combinatorial Theory, Series A, 120(4):733–743, 2013. [2] Paul Beame and Dang-Trinh Huynh-Ngoc. On the value of multiple read/write streams for approximating frequency moments. In Foundations of Computer Science, 2008. FOCS’08. IEEE 49th Annual IEEE Symposium on, pages 499–508. IEEE, 2008. [3] Mark Braverman, Ran Gelles, Jieming Mao, and Rafail Ostrovsky. Coding for interactive communication correcting insertions and deletions. IEEE Transactions on Information Theory, 63(10):6256–6270, 2017. 26 [4] Boris Bukh and Lidong Zhou. Twins in words and long common subsequences in permutations. Israel Journal of Mathematics, 213(1):183–209, 2016. [5] Serina Camungol, Narad Rampersad, et al. Avoiding approximate repetitions with respect to the longest common subsequence distance. inv lve, page 657, 2016. [6] Karthekeyan Chandrasekaran, Navin Goyal, and Bernhard Haeupler. Deterministic algorithms for the lovász local lemma. SIAM Journal on Computing, 42(6):2132–2155, 2013. [7] Max Crochemore. Sharp characterizations of squarefree morphisms. Theoretical Computer Science, 18(2):221–226, 1982. [8] Ran Gelles. Coding for interactive communication: A survey, 2015. [9] Ran Gelles and Bernhard Haeupler. Capacity of interactive communication over erasure channels and channels with feedback. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1296–1311. Society for Industrial and Applied Mathematics, 2015. [10] Mohsen Ghaffari and Bernhard Haeupler. Optimal error rates for interactive coding ii: Efficiency and list decoding. In Foundations of Computer Science (FOCS), 2014 IEEE 55th Annual Symposium on, pages 394–403. IEEE, 2014. [11] Mohsen Ghaffari, Bernhard Haeupler, and Madhu Sudan. Optimal error rates for interactive coding i: Adaptivity and other settings. In Proceedings of the forty-sixth annual ACM symposium on Theory of computing, pages 794–803. ACM, 2014. [12] V. Guruswami and P. Indyk. Linear-time encodable/decodable codes with near-optimal rate. IEEE Transactions on Information Theory, 51(10):3393–3400, Oct 2005. doi:10.1109/TIT. 2005.855587. [13] Bernhard Haeupler. Interactive channel capacity revisited. In Foundations of Computer Science (FOCS), 2014 IEEE 55th Annual Symposium on, pages 226–235. IEEE, 2014. [14] Bernhard Haeupler, Barna Saha, and Aravind Srinivasan. New constructive aspects of the lovász local lemma. Journal of the ACM (JACM), 58(6):28, 2011. [15] Bernhard Haeupler and Amirbehshad Shahrasbi. Synchronization strings: codes for insertions and deletions approaching the singleton bound. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, pages 33–46. ACM, 2017. [16] Bernhard Haeupler and Amirbehshad Shahrasbi. Synchronization strings: Explicit constructions, local decoding, and applications. arXiv preprint arXiv:1710.09795, 2017. [17] Bernhard Haeupler, Amirbehshad Shahrasbi, and Madhu Sudan. Synchronization strings: List decoding for insertions and deletions, 2018. [18] Bernhard Haeupler, Amirbehshad Shahrasbi, and Ellen Vitercik. Synchronization strings: Channel simulations and interactive coding for insertions and deletions. arXiv preprint arXiv:1707.04233, 2017. [19] Gillat Kol and Ran Raz. Interactive channel capacity. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 715–724. ACM, 2013. 27 [20] Dalia Krieger, Pascal Ochem, Narad Rampersad, and Jeffrey Shallit. Avoiding approximate squares. In International Conference on Developments in Language Theory, pages 278–289. Springer, 2007. [21] John Leech. 2726. a problem on strings of beads. The Mathematical Gazette, 41(338):277–278, 1957. [22] Hugues Mercier, Vijay K Bhargava, and Vahid Tarokh. A survey of error-correcting codes for channels with symbol synchronization errors. IEEE Communications Surveys & Tutorials, 12(1), 2010. [23] Robin A Moser and Gábor Tardos. A constructive proof of the general lovász local lemma. Journal of the ACM (JACM), 57(2):11, 2010. [24] Robert Shelton. Aperiodic words on three symbols. Journal für die Reine und Angewandte Mathematik, 321:195–209, 1981. [25] Robert O Shelton and Raj P Soni. Aperiodic words on three symbols. iii. Journal für die Reine und Angewandte Mathematik, 330:44–52, 1982. [26] A Thue. Über unendliche zeichenreihen (1906). Selected Mathematical Papers of Axel Thue. Universitetsforlaget, 1977. [27] Axel Thue. Über die gegenseitige Lage gleicher Teile gewisser Zeichenreihen, von Axel Thue... J. Dybwad, 1912. [28] Boris Zolotov. Another solution to the thue problem of non-repeating words. arXiv preprint arXiv:1505.00019, 2015. 28 Appendices A Lower-bounds for ε in Infinite ε-Synchronization Strings It is known from Section 6.2 that infinite synchronization strings exist over alphabet sizes |Σ| ≥ 4. A natural question to ask is the optimal value of ε for each such |Σ|. Formally, we seek to discover Bk = inf{ε : there exists an infinite ε-synchronization string with |Σ| = k} for small values of k. To that end, a program was written to find an upper bound for Bk for k ≤ 6. The program first fixes an ε, then exhaustively enumerates all possible ε-synchronization strings over an alphabet size of k by increasing length. If the program terminates, then this ε is a proven lower bound for Bk . Among every pair of consecutive substrings in each checked string that failed the ε-synchronization property, we find the one that has the lowest edit distance relative to their total length and such fraction would be a lower-bound for Bk as well. Such experimentally obtained lower-bounds for alphabets of size 3, 4, 5, and 6 are listed in Table 1. k 3 4 5 6 Bk ≥ · 12/13 10/13 2/3 18/29 Table 1: Computationally proven lower-bounds of Bk 29
8cs.DS
PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) 53 Predictive Modelling of Toxicity Resulting from Radiotherapy Treatments of Head and Neck Cancer arXiv:1412.6399v1 [physics.med-ph] 19 Dec 2014 Jamie A Dean∗† , Liam C Welsh† , Kevin J Harrington† , Christopher M Nutting† , Sarah L Gulliford† F Abstract—In radiotherapy for head and neck cancer, the radiation dose delivered to the pharyngeal mucosa (mucosal lining of the throat) is thought to be a major contributing factor to dysphagia (swallowing dysfunction), the most commonly reported severe toxicity. There is a variation in the severity of dysphagia experienced by patients. Understanding the role of the dose distribution in dysphagia would allow improvements in the radiotherapy technique to be explored. The 3D dose distributions delivered to the pharyngeal mucosa of 249 patients treated as part of clinical trials were reconstructed. Pydicom was used to extract DICOM (digital imaging and communications in medicine) data (the standard file formats for medical imaging and radiotherapy data). NumPy and SciPy were used to manipulate the data to generate 3D maps of the dose distribution delivered to the pharyngeal mucosa and calculate metrics describing the dose distribution. Multivariate predictive modelling of severe dysphagia, including descriptions of the dose distribution and relevant clinical factors, was performed using Pandas and SciKit-Learn. Matplotlib and Mayavi were used for 2D and 3D data visualisation. A support vector classification model, with feature selection using randomised logistic regression, to predict radiationinduced severe dysphagia, was trained. When this model was independently validated, the area under the receiver operating characteristic curve was 0.54. The model has poor predictive power and work is ongoing to improve the model through alternative feature engineering and statistical modelling approaches. Index Terms—radiotherapy, radiation oncology, head and neck cancer, dysphagia, pharyngeal mucosa, toxicity, predictive modelling, machine learning, statistical learning 1 Fig. 1: Example of a head and neck treatment plan. The colour wash shows the calculated 3D dose distribution and the pharyngeal mucosa contours, delineated by a radiation oncologist, are shown in green. I NTRODUCTION Head and neck cancer is the fifth most common cancer worldwide, with an annual incidence of approximately 500,000 cases globally [Jemal]. Radiotherapy is the primary nonsurgical treatment of head and neck cancer and is commonly given in combination with chemotherapy and/or surgery. The aims of the treatment are to achieve loco-regional disease control whilst preserving organ function. Modern radiotherapy techniques allow the radiation dose delivered to the patient to be modulated in order to create highly conformal dose distributions, which minimise the doses delivered to normal tissues in close proximity to the tumour. A typical example of a head and neck radiotherapy treatment plan dose distribution * Corresponding author: [email protected] † The Institute of Cancer Research and The Royal Marsden NHS Foundation Trust, London, UK c 2014 Jamie A Dean et al. This is an open-access artiCopyright ○ cle distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. http://creativecommons.org/licenses/by/3.0/ is shown in Figure 1. However, there are still high rates of toxicity, which reduce patients’ quality of life and limit the amount of dose that can be delivered to the tumour and hence the probability of controlling the disease. The most commonly reported severe radiation-induced toxicity, during and following treatment, is dysphagia (swallowing dysfunction). A variation in the severity of radiation-induced dysphagia between patients is observed. The radiation dose delivered to the pharyngeal mucosa (mucosal lining of the throat) is thought to be a major contributing factor to this side effect [Eisbruch]. Understanding the role of the radiotherapy dose distribution in the onset of dysphagia would allow further improvements to the radiotherapy technique, aiming to reduce the number of patients who experience severe dysphagia. Python allows seamless integration of radiotherapy data handling, manipulation, processing and statistical modelling using machine learning through the Pydicom, NumPy, SciPy, Pandas and SciKit-Learn modules. In this manuscript we outline our application of Python to manipulate radiotherapy 54 PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) treatment plan data to map the planned dose distribution onto the pharyngeal mucosa, compute metrics describing the dose distributions delivered to the mucosa, and train and assess multivariate predictive models of radiation-induced severe dysphagia. 2 2.1 M ATERIALS AND M ETHODS Patient Data Data were available for 249 head and neck cancer patients treated in clinical trials at The Royal Marsden NHS Foundation Trust [Nutting], [Guerrero-Urbano], [Powell]. All data were anonymised. Toxicity outcome data were collected for patients as part of the trial protocols. The severity of dysphagia was graded, according to the Common Terminology Criteria for Adverse Events [CTCAE], on a scale from 0 to 5, with higher grades representing higher severity. These toxicity grades were dichotomised into ‘mild’ and ‘severe’ dysphagia, with severe defined as grade 3 or higher. Grade 3 dysphagia corresponds to the patient requiring the insertion of a percutaneous endoscopic gastrostomy (feeding) tube. It requires a surgical procedure and represents a pronounced detriment to a patient’s quality of life and is thus of high clinical importance. This reasoning warranted the decision to dichotomise the outcomes, as well as the choice of threshold. In addition to its clinical importance, the cut point of grade 3 dysphagia is relatively objective compared with other toxicity outcome measures and so minimises noise in the outcome data. Clinical factors that are potentially relevant to dysphagia were also collected as part of the trial protocols. These included patient age, gender, comorbidities and concomitant treatments. 2.2 Preparation of Radiotherapy Treatment Plan Data The pharyngeal mucosa was defined by head and neck radiation oncologists, who contoured the structure on axial slices of computed tomography (CT) scans using either the Pinnacle (Philips Radiation Oncology Systems, Fitchburg, WI), CadPlan (Varian Medical Systems, Palo Alto, CA) or Eclipse (Varian Medical Systems, Palo Alto, CA) proprietary radiotherapy treatment planning software and the structure definition described in [Bhide]. The treatments were planned and the doses calculated by physicists and dosimetrists, following the trial protocols, using the same software. All scientific computing tasks were performed using Python v.2.7.6 [Python]. A script was used to anonymise the identifying data in the radiotherapy treatment plan files. When treatment planning is performed, the radiation oncologist names the organs that they delineate. This commonly leads to inconsistencies in the names given to the same organ between patients. A script was written to change the name of the pharyngeal mucosa structure from the one assigned by the radiation oncologist (the user selects the name to change, e.g. ‘Pharyngeal Mucosa’, ‘Pharynx’ or ‘pharyngeal mucosa’, from a list of all of the structures) to ‘PM’. This allowed for batch processing of the tasks relating to the radiotherapy treatment plans. The user can pass a list of the patient identification numbers and the name of the organ of interest, in this case ‘PM’, and the dose maps and metrics outlined below are calculated for all patients, without the need for interventions from the user. 2.3 Generating 3D Dose Maps Radiotherapy treatment plans are produced using proprietary software. There is a standardised format for radiotherapy treatment plan data, DICOM RT, in which the treatment plan data is exported from the planning software. The information in a treatment plan is saved in four different types of file: • CT - These files contain the computed tomography images used to model the patient and calculate the dose distribution in the treatment planning software. There is one file per 2D slice of the 3D image volume acquired. • RTDOSE - This file contains the calculated dose distribution, described by points on a 3D grid. • RTSTRUCT - This file contains the coordinates of the contours of the structures delineated by the radiation oncologist. • RTPLAN - This file contains the parameters of the radiation beams. To study the dose-toxicity response relationship for the pharyngeal mucosa, it was necessary to reconstruct the planned dose to this structure from the DICOM RT files. This was achieved using Pydicom v.0.9.3-1 [Pydicom], NumPy v.1.8.11 [NumPy], SciPy v.0.14.0-3 [SciPy] and Matplotlib v.1.3.1-9 [Matplotlib]. The resolutions of the dose grids are courser than the image grid upon which the structure contour points are defined. Moreover, the dose grid does not cover the entire image grid, only the volume that is irradiated. Therefore, the dose grid was tri-linearly interpolated to match the resolution of the image grid (tri-linear interpolation does not lead to noticeable distortions of the dose distributions with the acquired dose grid resolution of 2.5 mm x 2.5 mm x 2.5 mm) and the translational offset between the dose grid and image grid calculated using the image coordinates located in the metadata of the RTSTRUCT files. The matplotlib.path.Path.contains_points() function and the coordinates of the pharyngeal mucosa structure contours were used to determine which voxels were included in the structure. Since the pharyngeal mucosa is a ‘wall’-type structure as opposed to a ‘solid’ volume the numpy.logical_xor() function was used to exclude those voxels located within one of the contours, but not part of the mucosa structure. This informed a binary mask consisting of ‘1’s for the voxels in the structure and ‘0’s for the voxels not included in the structure. Multiplying the 3D dose grid with this binary mask produced a 3D map of just the dose delivered to the pharyngeal mucosa. 2.4 Extracting Dose Metrics In most radiotherapy dose-outcome studies, the 3D dose distribution is reduced to a cumulative dose-volume histogram (DVH), describing the volume of an organ that receives each dose level. DVHs were extracted from the 3D dose maps using the NumPy histogram function: import numpy as np PREDICTIVE MODELLING OF TOXICITY RESULTING FROM RADIOTHERAPY TREATMENTS OF HEAD AND NECK CANCER def dose_volume_histogram(organDose): """Computes the cumulative dose-volume histogram""" hist = np.histogram(organDose, range = (0, 80), bins = 80, density = True)[0] dvh = 1.0 - np.cumsum(hist) return dvh The mean and maximum doses were also calculated using NumPy. 2.5 Statistical Modelling The volumes of pharyngeal mucosa receiving cumulative doses in the range 10 Gy (V10) to 80 Gy (V80) in 5 Gy intervals were extracted from the DVHs for inclusion as model covariates. The mean and maximum doses were also used as model inputs. The clinical factors included as covariates were: age, gender, smoking status (smoker at the time of treatment vs. non-smoker at the time of treatment), alcohol status, induction chemotherapy (binary) and concurrent chemotherapy (binary). Data preparation for statistical modelling was carried out using Pandas v.0.14.1-2 [Pandas]. In order for the model to be able to inform clinical practice it must have high interpretability and low dimensionality. These requirements informed the choice of modelling strategies employed. Feature selection is often challenging when working with high-dimensionality data. An additional complication to the feature selection problem associated with radiotherapy dose-outcome studies is high collinearity between covariates. This is due to the nature of the physical processes that govern how the radiation dose is deposited in the patient. Adjacent dose levels in the DVH are highly correlated making it challenging to distinguish the dose levels that are important for predicting toxicity outcomes from those that merely correlate with the dose levels that cause toxicity. To have the best chance of overcoming this problem a combination of large variation in the DVHs between patients and a suitable feature selection strategy must be employed. Statistical modelling was performed using SciKit-Learn v.0.15.1-1 [SciKit-Learn]. A subset of 25 patients (10 % of the entire cohort) were separated out for use as an independent test set of model performance: import sklearn from sklearn import cross_validation # Split data into training set and independent test # set xTrain, xTest, yTrain, yTest = cross_validation.train_test_split(xData, yData, test_size = 0.1, random_state = 42) The model training pipeline consisted of data centring about 0 and scaling to unit variance followed by a feature selection step and, finally, a model fitting step: from sklearn.preprocessing import StandardScaler from sklearn.linear_model import RandomizedLogisticRegression from sklearn import svm # z-scale data scaler = StandardScaler() # Feature selection method 55 featureSelection = RandomizedLogisticRegression( fit_intercept = False) # Model fitting method modelFitting = svm.SVC(probability = True) # Create pipeline estimators = [(’scaler’, scaler), (’featureSelection’, featureSelection), (’modelFitting’, modelFitting)] classifier = Pipeline(estimators) Since the toxicity outcomes were known, supervised learning techniques could be utilised. There is no obvious solution to the problem of collinearity between the variables. Discriminant analysis techniques, such as linear discriminant analysis and quadratic discriminant analysis, cannot robustly handle correlated variables, making them inappropriate. One potential strategy is to remove the collinearity by performing PCA. However, this results in a model with low interpretability and so would not allow the causal features to be determined. An alternative approach is to initially remove features using interpretable dimensionality reduction techniques, for example, univariate feature selection and recursive feature elimination and then remove remaining correlated variables. These approaches, however, may be unstable and suffer from reduced generalisability as different features may be selected with different datasets. Randomised logistic regression (RLR) [Meinshausen] was chosen for feature selection in order to maximise the stability of the selected features. Support vector classification (SVC) with linear and radial basis function kernels [Cortes] was employed for model fitting as this technique is capable of producing high performance, complex (incorporating nonlinearity and interactions), yet interpretable, models. A crossvalidated grid search, with stratified 5-fold cross-validation, was used over the whole pipeline to tune the hyper-parameters of the models used for feature selection and model fitting on the reduced set of features: from sklearn.grid_search import GridSearchCV featureSelectionParams = { ’featureSelection__C’: [ 0.01, 0.1, 1.0, 10.0, 100.0], ’featureSelection__scaling’: [0.25, 0.5, 0.75], ’featureSelection__selection_threshold’: [ 0.3, 0.4, 0.5]} modelFittingParams = { ’modelFitting__C’: [0.01, 0.1, 1.0, 10.0, 100.0], ’modelFitting__kernel’: [’linear’, ’rbf’], ’modelFitting__gamma’: [0.01, 0.1, 1.0]} parameters = dict(featureSelectionParams.items() + modelFittingParams.items()) skf = cross_validation.StratifiedKFold(yTrain, n_folds = 5) gridSearch = GridSearchCV(clf, param_grid = parameters, cv = 5, scoring = ’roc_auc’) gridSearch.fit(xTrain, yTrain) bestParameters, bestScore = gridSearch.best_params_, gridSearch.best_score_ print ’Best Parameters:’, bestParameters print ’Best Score:’, bestScore To obtain an unbiased estimate of the model prediction score on new data a nested 5-fold cross-validation was carried out, with area under the receiver operating characteristic (ROC) 56 PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) curve used as the scoring function: # Nested 5-fold stratified cross-validation for model # evaluation scores = cross_validation.cross_val_score(gridSearch, xTrain, yTrain, cv = skf, scoring = ’roc_auc’) print ’Cross-validation: ROC AUC = %0.2f (+/- %0.2f)’ % (scores.mean(), scores.std()*2) All cross-validations were stratified to reduce variance in the estimate of model performance. Data from the 25 patients in the independent test dataset, not used in any part of the model training process, were used to perform an independent test of model performance: # Test classifier on independent test data yPred = gridSearch.predict(xTest) print classification_report(yTest, yPred) print ’ROC AUC: ’, roc_auc_score(yTest, yPred) 3 R ESULTS Figure 2 shows an example of a 3D map of the dose delivered to the pharyngeal mucosa. Mayavi v.4.3.1-2 [Mayavi] was used for 3D data visualisation. This pharyngeal mucosa dose distribution is typical of head and neck radiotherapy treatments. The region receiving the highest doses is included in the treatment target volume and there is a dose fall-off superiorly and inferiorly of this region. Figure 3 shows the dose-volume histograms of the 249 patients included in the analysis. Matplotlib was used for 2D data visualisation. It can be observed that there is variation in the pharyngeal mucosa DVHs across the cohort. This variation is largely due to the geometry of the treatment target volume: both its size and location within the pharynx (throat). The correlation matrix for the input variables is shown in Figure 4. The correlation matrix highlights the high correlation coefficients between adjacent dose levels in the DVH suggesting high collinearity. Principal component analysis (PCA) was used for data visualisation. Figure 5 displays the variance explanation and Figure 6 shows the data projected into the first two principal components space. Visualising the data using PCA shows that the different outcomes are highly overlapping in the first two principal components space (the first two principal components explain a relatively large amount of the variance in the data). The model hyper-parameters chosen are shown in Table 1. During model training the area under the ROC curve was determined to be 0.54 +/- 0.23 and when the model was validated on the independent dataset it was 0.54. Figure 7 shows the ROC curve for the independent validation. 4 Fig. 2: 3D map of pharyngeal mucosa dose distribution for one patient. D ISCUSSION Python was deemed to be a well-suited platform for achieving our aims of training predictive models of severe radiationinduced dysphagia. This is due to its strong functionality in handling DICOM data, manipulation, processing and visualisation of 3D data, and machine learning. The overlap of the two outcome classes in the first two principal components space upon PCA suggests that generalised linear models, such as logistic regression, are unlikely to make Fig. 3: DVHs for the 249 patients analysed. Blue curves represent patients who did not experience severe dysphagia and red curves represent patients who did. PREDICTIVE MODELLING OF TOXICITY RESULTING FROM RADIOTHERAPY TREATMENTS OF HEAD AND NECK CANCER Hyper-parameter RLR regularisation constant (C) RLR threshold RLR scaling SVC regularisation constant (C) SVC kernel SVC kernel hyperparameter (gamma) 57 Value 1.0 0.4 0.75 100.0 Radial function 1.0 basis TABLE 1: Model hyper-parameters. Fig. 4: Correlation matrix of model covariates. Fig. 7: ROC curve for the independent validation. Fig. 5: Variance explanation against principal component index from PCA analysis. Fig. 6: Data projection into the first two principal components space. Red points represent patients who experienced severe dysphagia, blue points represent patients who did not experience severe dysphagia. good classifiers in this instance. Non-linear kernel modelling is likely to result in models with greater predictive power for this dataset. During model hyper-parameter tuning, the SVC kernel selected was the radial basis function, supporting this observation. The area under the ROC curve is low for both the internal and external validation indicating that the model is unable to correctly classify patients better than chance. The uncertainty on the area under the ROC curve from the nested crossvalidation is large suggesting that the model is unstable. Our present model is thus unsuitable to support clinical decision making and inform on the causal features of radiation-induced severe dysphagia. However, we are currently exploring improvements to our methodology with promising preliminary results. There are many potential reasons why our model suffers from low predictive power. These include insufficient characterisation of chemotherapy treatments, smoking status or alcohol status, the influence of other organs, not considered in our study, involved in the onset of severe dysphagia, and the impact of other factors not considered, such as surgery or genetic susceptibility to radiation-induced mucosal damage. However, we suspect that the low predictive power may, at least in part, be due to limitations associated with the dosimetric input data. In reducing the 3D dose distribution to a DVH much of the information is discarded. We believe that 58 PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) some of this discarded information is likely to be important for predicting toxicity. We are developing several novel dose metrics that more fully characterise the dose distribution, which we aim to use as model inputs in the future. We anticipate that these may improve the predictive power of the models. Furthermore, there are discrepancies between the planned doses calculated using the treatment planning software (and extracted for use in our study) and the doses that are actually delivered to the patients. These are due to movement of the patients’ internal anatomy whilst the radiation is delivered and weight loss over the course of treatment. In the future we plan to explore the magnitude of these effects and attempt to develop strategies to minimise their impact. The machine learning pipeline developed has been designed to enable simple addition of different feature selection and model fitting algorithms enabling alternative statistical techniques to be utilised in the future. It also transferable to other toxicities and organs at risk from radiotherapy treatments, for example, lung pneumonitis resulting from radiotherapy for the treatment of lung cancer, as well as studying tumour control. 5 C ONCLUSIONS In this study we have shown that Python can be successfully applied to studies of radiotherapy dose-toxicity relationships. The Pydicom, NumPy, SciPy, Pandas and SciKit-Learn modules allow for both manipulation and processing of the treatment planning data, and statistical modelling using machine learning, making Python well suited to this type of study. Whilst initial attempts to generate a predictive model of severe dysphagia were unsuccessful, preliminary investigation of using novel dose metrics to characterise the dose distribution appear promising. Ongoing work involves using NumPy and SciPy to calculate novel dose metrics expected to influence toxicity and the application of alternative statistical methods within the machine learning pipeline. R EFERENCES [Jemal] A. Jemal et al. Global cancer statistics, CA: A Cancer Journal for Clinicians, 61:69-90, 2011. [Eisbruch] A. Eisbruch. Dysphagia and aspiration following chemo-irradiation of head and neck cancer: major obstacles to intensification of therapy, Annals of Oncology, 15:363-364, 2004. [Nutting] C.M. Nutting et al. Parotid-sparing intensity modulated versus conventional radiotherapy in head and neck cancer (PARSPORT): a phase 3 multicentre randomised controlled trial, Lancet Oncology, 12:127-136, 2011. [Guerrero-Urbano] T. Guerrero Urbano et al. A phase I study of doseescalated chemoradiation with accelerated intensity modulated radiotherapy in locally advanced head and neck cancer, Radiotherapy and Oncology, 85:36-41, 2007. [Powell] C. Powell et al. Fatigue during chemoradiotherapy for nasopharyngeal cancer and its relationship to radiation dose distribution in the brain, Radiotherapy and Oncology, 110:416-421, 2014. [CTCAE] The National Cancer Institute. Common terminology criteria for adverse events v3.0, 2006. [Bhide] S.A. Bhide et al. Characteristics of response of oral and pharyngeal mucosa in patients receiving chemoIMRT for head and neck cancer using hypofractionated accelerated radiotherapy, Radiotherapy and Oncology, 97:86-91, 2010. [Python] [NumPy] [SciPy] [Pydicom] [Pandas] [SciKit-Learn] [Matplotlib] [Mayavi] [Meinshausen] [Cortes] Python Software Foundation. Python Language Reference, version 2.7, Available at http://www.python.org. T Oliphant et al. Numerical Python (NumPy), http://www. numpy.org [Online; accessed 2014-09-29]. E. Jones et al. SciPy: Open source scientific tools for Python, http://www.scipy.org/ [Online; accessed 2014-08-20], 2001. D. Mason. Pydicom, https://code.google.com/p/ pydicom/ [Online; accessed 2014-08-20]. W. McKinney. Data structures for statistical computing in Python, Proceedings of the 9th Python in Science Conference, 51-56, 2010. F. Pedregosa et al. Scikit-learn: Machine learning in Python, Journal of Machine Learning Research, 12:2825-2830, 2011. J.D. Hunter. Matplotlib: A 2D graphics environment, Computing in Science and Engineering, 9:90-95, 2007. P. Ramachandran and G. Varoquaux. Mayavi: 3D visualization of scientific data, IEEE Computing in Science & Engineering, 13:40-51, 2011. N. Meinshausen and P. Buhlmann. Stability selection, Journal of the Royal Statistical Society: Series B, 72:417-473, 2010. C. Cortes and V. Vapnik. Support-vector networks, Machine learning, 20:273-297, 1995.
5cs.CE
Dynamic compensation and homeostasis: a feedback control perspective arXiv:1801.04959v1 [cs.SY] 15 Jan 2018 Michel Fliessa,c , Cédric Joinb,c,d a LIX (CNRS, UMR 7161), École polytechnique, 91128 Palaiseau, France. [email protected] b CRAN (CNRS, UMR 7039), Université de Lorraine, BP 239, 54506 Vandœuvre-lès-Nancy, France [email protected] c AL.I.E.N. (ALgèbre pour Identification & Estimation Numériques), 7 rue Maurice Barrès, 54330 Vézelise, France. {michel.fliess, cedric.join}@alien-sas.com d Projet Non-A, INRIA Lille – Nord-Europe, France Abstract “Dynamic compensation” is a robustness property where a perturbed biological circuit maintains a suitable output [Karin O., Swisa A., Glaser B., Dor Y., Alon U. (2016). Mol. Syst. Biol., 12: 886]. In spite of several attempts, no fully convincing analysis seems now to be on hand. This communication suggests an explanation via “model-free control” and the corresponding “intelligent” controllers [Fliess M., Join C. (2013). Int. J. Contr., 86, 2228-2252], which are already successfully applied in many concrete situations. As a byproduct this setting provides also a slightly different presentation of homeostasis, or “exact adaptation,” where the working conditions are assumed to be “mild.” Several convincing, but academic, computer simulations are provided and discussed. Keywords: Systems biology, homeostasis, exact adaptation, dynamic compensation, integral feedback control, PID, model-free control, intelligent proportional controller. Research Report. École polytechnique, Palaiseau, France, January 2018 1. Introduction In systems biology, i.e., an approach of growing importance to theoretical biology (see, e.g., Alon (2006); Klipp et al. (2016); Kremling (2012)), basic control notions, like feedback loops, are becoming more and more popular (see, e.g., Åström et al. (2008); Cowan et al. (2014); Cosentino et al. (2011); Del Vecchio et al. (2015)). This communication intends to show that a peculiar feedback loop permits to clarify the concept of dynamic compensation (DC ) of biological circuits, which was recently introduced by Karin et al. (2016). DC is a robustness property. It implies, roughly speaking, that biological systems are able of maintaining a suitable output despite environmental fluctuations. As noticed by Karin et al. (2016) such a property arises naturally in physiological systems. The DC of blood glucose, for instance, with respect to variation in insulin sensitivity and insulin secretion is obtained by controlling the functional mass of pancreatic beta cells. The already existing and more restricted homeostasis, or exact adaptation, deals only with constant reference trajectories, i.e., setpoints. It is achievable via an integral feedback (see, e.g., Alon et al. (1999); Briat et al. (2016); Miao et al. (2011); Stelling et al. (2004); Yi et al. (2000)) Remark 1.1. PIDs (see, e.g., Åström et al. (2008); O’Dwyer (2009)) read: Z u = KP e + KI e + KD ė (1) where • u, y, y ⋆ are respectively the control and output variables, and the reference trajectory. • e = y − y ⋆ is the tracking error, • KP , KI , KD ∈ R are the tuning gains. To the best of our knowledge, they are, strangely enough, more or less missing 2 in the literature on theoretical biology,1 although they lead to the most widely used control strategies in industry. From KP = KD = 0 in Equation (1), the following integral feedback is deduced: u = KI Z e (2) Compare Equation (2) with the references above on homeostasis, and Somvanshi et al. (2015). See Abouaı̈ssa et al. (2017b), and the references therein, for an application to ramp metering on freeways in order to avoid traffic congestion. Conditions for DC have already been investigated by several authors: Karin et al. (2017a,b); Sontag (2017); Villaverde et al. (2017). Parameter identification, which plays a key rôle in most of those studies, leads, according to the own words of Karin et al. (2017b), to some kind of “discrepancy,” which is perhaps not yet fully cleared up. We suggest therefore another roadmap, i.e., intelligent feedback controllers as defined by Fliess et al. (2013). Many concrete applications have already been developed all over the world. Some have been patented. The bibliography contains for obvious reasons only recent works in biotechnology: Bara et al. (2016); Join et al. (2017a); Lafont et al. (2015); MohammadRidha et al. (2018); Tebbani et al. (2016).2 An unexpected byproduct is derived from Remark 1.1 and the comparison in Abouaı̈ssa et al. (2017b) between Equation (2) and our intelligent proportional controller (Fliess et al. (2013)). Exact adaptation means now a “satisfactory” behavior thanks to the feedback loop defined by Equation (2) when the working conditions are “mild.” The result by Karin et al. (2016) via a mechanism for DC based on known hormonal circuit reactions, which states that exact adaptation does not guarantee dynamical compensation, remains therefore valid in this new context. 1 This is of course less the case in synthetic biology, i.e., a blending between biology and engineering (see, e.g., Del Vecchio et al. (2016) and the references therein). 2 A rather comprehensive bibliography of concrete applications is provided Abouaı̈ssa et al. (2017a). 3 by This exploratory research report is organized as follows. Intelligent controllers are summarized in Section 2, where the connection between classic PIs and intelligent proportional controllers is also presented. Section 3, which is hevily influenced by Abouaı̈ssa et al. (2017b), defines dynamic compensation and exact adaptation. Section 4 displays various convincing, but academic, computer experiments. Some concluding remarks may be found in Section 5. 2. Model-free control and intelligent controllers See Fliess et al. (2013) for full details. 2.1. Generalities 2.1.1. The ultra-local model The poorly known global description of the plant, which is assumed for simplicity’s sake to be SISO (single-input single output),3 is replaced by the ultra-local model : y (ν) = F + αu (3) where: • the control and output variables are respectively u and y; • the derivation order ν is often equal to 1, sometimes to 2; in practice ν ≥ 3 has never been encountered; • the constant α ∈ R is chosen by the practitioner such that αu and y (ν) are of the same magnitude; therefore α does not need to be precisely estimated. The following comments might be useful: • Equation (3) is only valid during a short time lapse and must be continuously updated; 3 For a multivariable extension, see, e.g., Lafont et al. (2015); Menhour et al. (2017). 4 • F is estimated via the knowledge of the control and output variables u and y; • F subsumes not only the system structure, which most of the time will be nonlinear, but also any external disturbance. 2.1.2. Intelligent controllers Set ν = 2. Close the loop with the following intelligent proportional-integralderivative controller, or iPID, u=− F − ẏ ∗ + KP e + KI α R e + KD ė (4) where: • e = y − y ⋆ is the tracking error, • KP , KI , KD ∈ R are the tuning gains. When KI = 0, we obtain the intelligent proportional-derivative controller, or iPD, u=− F − ẏ ∗ + KP e + KD ė α (5) When ν = 1 and KI = KD = 0, we obtain the intelligent proportional controller, or iP, which is the most important one, u=− F − ẏ ∗ + KP e α (6) Combining Equations (3) and (6) yields: ė + KP e = 0 (7) where F does not appear anymore. The tuning of KP is therefore straightforward. Remark 2.1. See Join et al. (2017b) for a comment on those various controllers. 5 2.1.3. Estimation of F Assume that F in Equation (3) is “well” approximated by a piecewise constant function Fest .4 The estimation techniques below are borrowed from Fliess et al. (2003, 2008) and Sira-Ramı́rez et al. (2014). Let us summarize two types of computations: 1. Rewrite Equation (3) in the operational domain (see, e.g., Erdélyi (1962)): sY = Φ + αU + y(0) s where Φ is a constant. We get rid of the initial condition y(0) by multiplying both sides on the left by Y +s d ds : dU Φ dY =− 2 +α ds s ds Noise attenuation is achieved by multiplying both sides on the left by s−2 , since integration with respect to time is a lowpass filter. It yields in the time domain the realtime estimate, thanks to the equivalence between d ds and the multiplication by −t, Fest (t) = − 6 τ3 Z t [(τ − 2σ)y(σ) + ασ(τ − σ)u(σ)] dσ (8) t−τ where τ > 0 might be quite small. This integral may of course be replaced in practice by a classic digital filter. 2. Close the loop with the iP (6). It yields: Z t  1 ⋆ Fest (t) = (ẏ − αu − KP e) dσ τ t−τ Remark 2.2. From a hardware standpoint, a real-time implementation of our intelligent controllers is also cheap and easy (Join et al. (2013)). 2.2. PI and iP Consider the classic continuous-time PI controller Z u(t) = kp e(t) + ki e(τ )dτ 4 This is a weak assumption (see, e.g., Bourbaki (1976)). 6 (9) R A crude sampling of the integral e(τ )dτ through a Riemann sum I(t) leads to Z e(τ )dτ ≃ I(t) = I(t − h) + he(t) where h is the sampling interval. The corresponding discrete form of Equation (9) reads: u(t) = kp e(t) + ki I(t) = kp e(t) + ki I(t − h) + ki he(t) Combining the above equation with u(t − h) = kp e(t − h) + ki I(t − h) yields u(t) = u(t − h) + kp (e(t) − e(t − h)) + ki he(t) (10) Remark 2.3. A trivial sampling of the “velocity form” of Equation (9) u̇(t) = kp ė(t) + ki e(t) (11) yields u(t) − u(t − h) = kp h  e(t) − e(t − h) h  + ki e(t) which is equivalent to Equation (10). Replace in Equation (6) F by ẏ(t) − αu(t − h) and therefore by y(t) − y(t − h) − αu(t − h) h It yields u(t) = u(t − h) − e(t) − e(t − h) KP − e(t) hα α (12) FACT.- Equations (10) and (12) become identical if we set kp = − 1 , αh ki = − KP αh (13) Remark 2.4. This path breaking result was first stated by d’Andréa-Novel et al. (2010): 7 • It is straightforward to extend it to the same type of equivalence between PIDs and iPDs. • It explains apparently for the first time the ubiquity of PIs and PIDs in the industrial world. 3. Exact adaptation and dynamic compensation Equation (11) shows that integral and proportional-integral controllers are close when 1. ė remains small, 2. the reference trajectory y ∗ starts at the initial condition y(0) or, at least, at a point in a neighborhood, 3. the measurement noise corruption is low. The following conditions might be helpful: • the reference trajectory y ∗ is “slowly” varying, and starts at the initial condition y(0) or, at least, at a point in its neighborhood,5 • the disturbances and the corrupting noises are rather mild. Then the performances of the integral controller should be decent: this is exact adaptation, or homeostasis. When the above conditions are not satisfied, dynamic compensation means that one at least of the feedback loops in Section 2.1 is negative, i.e., fluctuations around the reference trajectory due to perturbations and input changes are attenuated.6 5 Setpoints 6 The are therefore recovered. wording “negative feedback” is today common in biology, but, to some extent, ne- glected in engineering, where it was quite popular long time ago (see, e.g., Küpfmüller et al. (2017)). Historical details are given by Zeron (2008) and Del Vecchio et al. (2015). 8 4. Two computer experiments The two academic examples below provide easily implementable numerical examples. They are characterized by the following features: • KI = 0.5 (resp. KI = 1) for the integral feedback in the linear (resp. nonlinear) case. • α = KP = 1 for the the iP (6) in both cases. • The sampling period is 10ms. • In order to be more realistic, the output is corrupted additively by a zeromean white Gaussian noise of standard deviation 0.01. 4.1. Linear case Consider the input-output system defined by the transfer function 2(s + 1) s2 + s + 1 Several reference trajectories are examined: (i) Setpoint and 50% efficiency loss of the actuator: see Figures 1 see 2. (ii) Slow connection between two setpoints: see Figures 3 and 4. (iii) Fast connection: see Figures 5 and 6. (iv) Complex reference trajectory: see Figures 7 and 8. In the first scenario, the control efficiency loss is attenuated much faster by the iP than by the integral feedback. The behaviors of the integral feedback and the iP with respect to a slow connection are both good and cannot be really distinguished. The situation change drastically with a fast connection and a complex reference trajectory: the iP becomes vastly superior to the integral feedback. Exact adaptation works well only in the second scenario, whereas dynamic compensation yields always excellent results. 9 1.2 1.3 Output Reference trajectory Reference 1.2 1 1.1 0.8 1 0.9 0.6 0.8 0.4 0.7 0.6 0.2 0.5 0 0.4 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 1: Integral feedback, constant reference trajectory, control efficiency loss 1.2 1.3 Output Reference trajectory Reference 1.2 1 1.1 0.8 1 0.6 0.9 0.8 0.4 0.7 0.2 0.6 0 0.5 -0.2 0.4 0 5 10 15 20 25 30 35 40 45 50 0 Time(s) 5 10 15 20 25 30 35 Time(s) (a) Control (b) Output Figure 2: iP, constant reference trajectory, control efficiency loss 10 40 45 50 1.2 0.5 1 0.4 Output Reference trajectory Reference 0.8 0.3 0.6 0.2 0.4 0.1 0.2 0 0 -0.1 -0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 3: Integral feedback, slow connection 1.2 0.8 1 0.6 Output Reference trajectory Reference 0.8 0.4 0.6 0.2 0.4 0 0.2 -0.2 0 -0.4 -0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 Time(s) 15 20 25 30 Time(s) (a) Control (b) Output Figure 4: iP, slow connection 11 35 40 45 50 0.6 1.2 0.5 1 0.4 0.8 0.3 0.6 0.2 0.4 0.1 0.2 0 0 -0.1 -0.2 0 5 10 15 20 25 30 35 40 45 50 Output Reference trajectory Reference 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 5: Integral feedback, fast connection 0.8 1.2 0.6 1 0.4 0.8 0.2 0.6 0 0.4 -0.2 0.2 -0.4 0 -0.6 Output Reference trajectory Reference -0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 Time(s) 15 20 25 30 Time(s) (a) Control (b) Output Figure 6: iP, fast connection 12 35 40 45 50 0.8 1.6 0.7 1.4 0.6 1.2 0.5 1 0.4 0.8 0.3 0.6 0.2 0.4 0.1 0.2 0 Output Reference trajectory Reference 0 -0.1 -0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 7: Integral connection, complex reference trajectory 0.8 1.4 1.2 0.6 1 0.4 0.8 0.2 Output Reference trajectory Reference 0.6 0.4 0 0.2 -0.2 0 -0.4 -0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 Time(s) 25 30 Time(s) (a) Control (b) Output Figure 8: iP, complex reference trajectory 13 35 40 45 50 4.2. Nonlinear case Consider ẏ + y = u3 + Ppert where Ppert is a perturbation. Introduce three scenarios: (i) Setpoint without any perturbation, i.e., Ppert = 0: see Figures 9 and 10. (ii) Setpoint with a sine wave perturbation which starts at t = 25s, i.e., Ppert (t) = 0.2 sin( 2π 5 (t − 25)) if t ≥ 25s, and Ppert (t) = 0 if t ≤ 25s: see Figures 11 and 12. (iii) Non-constant reference trajectory without any perturbation, i.e., Ppert = 0: see Figures 13 and 14. A clear-cut superiority of the iP with respect to the integral feedback is indisputable. The behavior of dynamic compensation (resp. exact adaptation) is always (resp. never) satisfactory. Remark 4.1. Do not believe that integral feedbacks are never adequate if nonlinearities occur. See • an example related to ramp metering in Abouaı̈ssa et al. (2017b), • theoretical investigations in Sontag (2010). 5. Conclusion In order to be fully convincing, this preliminary annoucement on homeostasis extensions needs of course to exhibit true biological examples. In our context noise corruption is also a hot topic (see, e.g., Briat et al. (2016); Sun et al. (2010)). The estimation and identification techniques sketched in Section 2.1 might lead to a better understanding (see also Fliess (2006, 2008)). 14 1.4 1.4 Output Reference trajectory Reference 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0 0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 9: Integral feedback, constant reference trajectory, without any perturbation 1.4 1.4 Output Reference trajectory Reference 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0 0.2 0 5 10 15 20 25 30 35 40 45 50 0 Time(s) 5 10 15 20 25 30 35 40 Time(s) (a) Control (b) Output Figure 10: iP, constant reference trajectory, without any perturbation 15 45 50 1.4 1.4 Output Reference trajectory Reference 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0 0.2 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 11: Integral feedback, constant reference trajectory, with perturbation 1.2 1.4 1 1.2 0.8 1 0.6 0.8 0.4 0.6 0.2 0.4 Output Reference trajectory Reference 0 0.2 0 5 10 15 20 25 30 35 40 45 50 0 Time(s) 5 10 15 20 25 30 Time(s) (a) Control (b) Output Figure 12: iP, constant reference trajectory, with perturbation 16 35 40 45 50 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 0 5 10 15 20 25 30 35 40 45 50 Output Reference trajectory Reference 0 5 10 15 20 Time(s) 25 30 35 40 45 50 Time(s) (a) Control (b) Output Figure 13: Integral feedback, non-constant reference trajectory, without any perturbation 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 Output Reference trajectory Reference -0.2 0 5 10 15 20 25 30 35 40 45 50 0 Time(s) 5 10 15 20 25 30 35 40 Time(s) (a) Control (b) Output Figure 14: iP, non-constant reference trajectory, without any perturbation 17 45 50 References Abouaı̈ssa H., Alhaj Hasan O., Join C., Fliess M., Defer D. (2017a). Energy saving for building heating via a simple and efficient model-free control design: First steps with computer simulations. 21st Int. Conf. Syst. Theor. Contr. Comput., Sinaia. https://hal.archives-ouvertes.fr/hal-01568899/en/ Abouaı̈ssa H., Fliess M., Join C. (2017b). On ramp metering: Towards a better understanding of ALINEA via model-free control. Int. J. Contr., 90, 10181026. Alon U. (2006). An Introduction to Systems Biology: Design Principles of Biological Circuits. Chapman and Hall. Alon U., Surette M.G., Barkai N., Leibler S. (1999). Robustness in bacterial chemotaxis. Nature, 397, 168-171. d’Andréa-Novel B., Fliess M., Join C., Mounier H., Steux B. (2010). A mathematical explanation via “intelligent” PID controllers of the strange ubiquity of PIDs. 18th Medit. Conf. Contr. Automat., Marrakech. https://hal.archives-ouvertes.fr/inria-00480293/en/ Åström K.J., Murray R.M. (2008). Feedback Systems: An Introduction for Scientists and Engineers. Princeton University Press. Bara O., Fliess M., Join C., Day J., Djouadi S.M. (2016). Model-free immune therapy: A control approach to acute inflammation. Europ. Contr. Conf., Aalborg. https://hal.archives-ouvertes.fr/hal-01341060/en/ Bourbaki N. (1976). Fonctions d’une variable réelle. Hermann. English translation (2004): Functions of a Real Variable. Springer. Briat C., Gupta A., Khammash M. (2016). Antithetic integral feedback ensures robust perfect adaptation in noisy biomolecular networks. Cell Syst., 2, 15-26. Cowan N.J., Ankarali M.M., Dyhr J.P., Madhav M.S., Roth E., Sefati S., Sponberg S., Stamper S.A., Fortune E.S., Daniel T.L. (2014). Feedback control as 18 a framework for understanding tradeoffs in biology. Integr. Compar. Biol., 54, 223-237. Cosentino C., Bates D. (2011). An Introduction to Feedback Control in Systems Biology. CRC Press. Del Vecchio meets D., synthetic Dy A.J., biology. J. Qian Roy. Y. Soc. (2016). Interface, Control 13: theory 20160380. http://dx.doi.org/10.1098/rsif.1916.0380 Del Vecchio D., Murray R.M. (2015). Biomolecular Feedback Systems. Princeton University Press. Erdélyi A. (1962). Operational Calculus and Generalized Functions. Holt Rinehart Winston. Fliess M. (2006). Analyse non standard du bruit. C. R. Math., 342, 797-802. Fliess M. (2008). Critique du rapport signal à bruit en communications numériques. Revue Afric. Recher. Informat. Math. Appli., 9, 419-429. https://hal.archives-ouvertes.fr/inria-00311719/en/ Fliess M., Join C. (2013). Model-free control. Int. J. Contr., 86, 2228-2252. Fliess M., Sira-Ramı́rez H. (2003). An algebraic framework for linear identification. ESAIM Contr. Optimiz. Calc. Variat., 9, 151-168. Fliess M., Sira-Ramı́rez H. (2008). Closed-loop parametric identification for continuous-time linear systems via new algebraic techniques. H. Garnier & L. Wang (Eds): Identification of Continuous-time Models from Sampled Data, Springer, pp. 362-391. Join C., Bernier J., Mottelet S., Fliess M., Rechdaoui-Guérin S., Azimi S., Rocher V. (2017a). A simple and efficient feedback control strategy for wastewater denitrification. 20th World Congr. Int. Feder. Automat. Contr., Toulouse. https://hal.archives-ouvertes.fr/hal-01488199/en/ 19 Join C., Chaxel F., Fliess M. (2013). “Intelligent” controllers on cheap and small programmable devices. 2nd Int. Conf. Contr. Fault-Tolerant Syst., Nice. https://hal.archives-ouvertes.fr/hal-00845795/en/ Join C., Delaleau E., Fliess M., Moog C.H. (2017b). Un résultat intrigant en commande sans modèle. ISTE OpenScience Automat., 1, 9 p. https://hal.archives-ouvertes.fr/hal-01628322/en/ Karin O., Alon U. (2017a). Biphasic response as a mechanism against mutant takeover in tissue homeostasis circuits. Molec. Syst. Biol., 13, 933. Karin O., Alon U., Sontag E. (2017b). A note on dynamical compensation and its relation to parameter identifiability. bioRxiv doi: https://doi.org/10.1101/123489 Karin O., Swisa A., Glaser B., Dor Y., Alon U. (2016). Dynamical compensation in physiological circuits. Mol. Syst. Biol., 12: 886. DOI 10.15252/msb.19167216 Klipp E., Liebermeister W., Wierling C., Kowald A. (2016). Systems Biology (2nd ed.). Wiley-VCH. Kremling A. (2012). Kompendium Systembiologie – Mathematische Modellierung und Modellanalyse. Vieweg + Teubner. English translation (2014): Systems Biology. CRC Press. Küpfmüller K., Mathis W., Reibiger, W. (2017). Theoretische Elektrotechnik – Eine Einführung (20. Auflage).7 Springer. Lafont F., Balmat J.-F., Pessel N., Fliess M. (2015). A model-free control strategy for an experimental greenhouse with an application to fault accommodation. Comput. Electron. Agricult., 110, 139–149. 7 The first edition was published in 1932. Karl Küpfmüller was its sole author. He died in 1977. 20 Menhour L., d’Andréa-Novel B., Fliess M., Gruyer D., Mounier H (2017). An efficient model-free setting for longitudinal and lateral vehicle control. Validation through the interconnected pro-SiVIC/RTMaps prototyping platform. IEEE Trans. Intel. Transport. Syst., 2017. DOI: 10.1109/TITS.1917.2699283 Miao H., Xia X., Perelson A.S., Wu H. (2011). On identifiability of nonlinear ODE models and applications in viral dynamics. SIAM Rev., 53, 3-39. MohammadRidha T., Aı̈t-Ahmed M., Chailloux L., Krempf M., Guilhem I., Poirier J.-Y., Moog C.H. (2018). Model free iPID control for glycemia regulation of type-1 diabetes. IEEE Trans. Biomed. Engin., 65, 199-206. O’Dwyer A. (2009). Handbook of PI and PID Controller Tuning Rules (3rd ed.). Imperial College Press. Sira-Ramı́rez H., Garcı́a-Rodrı́guez C., Cortès-Romero J., Luviano-Juárez A. (2013). Algebraic Identification and Estimation Methods in Feedback Control Systems. Wiley. Somvanshi P.R., Patel A.K, Bhartiya S., Venkatesh K.V. (2015). Implementation of integral feedback control in biological systems. Wiley Interdisc. Rev.: Syst. Biol. Med., 7, 301-316. Sontag E.D. (2010). Remarks on feedforward circuits, adaptation, and pulse memory. IET Syst. Biol., 4, 39-51. Sontag ity, E.D. (2017). Dynamic compensation, and equivariances. PLoS Comput. Biol., parameter 13: identifiabil- e1005447. doi: 10.1371/journal.pcbi.1005447 Sun L., Becskei A. (2010). The cost of feedback control. Nature, 467, 163-164. Stelling J., Sauer U., Szallasi Z., Doyle F.J., Doyle J. (2004). Robustness of cellular functions. Cell, 118, 675-685. Tebbani S., Titica M., Join C., Fliess M., Dumur D. (2016). Model-based versus model-free control designs for improving microalgae growth in a closed 21 photobioreactor: Some preliminary comparisons. 24th Medit. Conf. Contr. Automat., Athens. https://hal.archives-ouvertes.fr/hal-01312251/en/ Villaverde A.F., Banga J.R. (2017). Dynamical compensation and structural identifiability of biological models: Analysis, implications, and reconciliation. PLoS Comput. Biol., 13, e1005878. https://doi.org/10.1371/journal.pcbi.1005878 Yi T.-M., Huang Y., Simon M.I., Doyle J. (2000). Robust perfect adaptation in bacterial chemotaxis through integral feedback control. Proc. Nat. Acad. Sci., 97, 4649-4653. Zeron E.S. (2008). Positive and negative feedback in engineering and biology. Math. Model. Nat. Phenom., 3, 67-84. 22
3cs.SY
1 Framework of Channel Estimation for Hybrid Analog-and-Digital Processing Enabled Massive MIMO Communications arXiv:1712.08846v1 [cs.IT] 23 Dec 2017 Leyuan Pan, Student Member, IEEE, Le Liang, Student Member, IEEE, Wei Xu, Senior Member, IEEE, and Xiaodai Dong, Senior Member, IEEE Abstract—We investigate a general channel estimation problem in the massive multiple-input multiple-output (MIMO) system which employs the hybrid analog/digital precoding structure with limited radio-frequency (RF) chains. By properly designing RF combiners and performing multiple trainings, the proposed channel estimation can approach the performance of fullydigital estimations depending on the degree of channel spatial correlation and the number of RF chains. Dealing with the hybrid channel estimation, the optimal combiner is theoretically derived by relaxing the constant-magnitude constraint in a specific singletraining scenario, which is then extended to the design of combiners for multiple trainings by Sequential and Alternating methods. Further, we develop a technique to generate the phase-only RF combiners based on the corresponding unconstrained ones to satisfy the constant-magnitude constraints. The performance of the proposed hybrid channel estimation scheme is examined by simulations under both nonparametric and spatial channel models. The simulation results demonstrate that the estimated CSI can approach the performance of fully-digital estimations in terms of both mean square error and spectral efficiency. Moreover, a practical spatial channel covariance estimation method is proposed and its effectiveness in hybrid channel estimation is verified by simulations. Index Terms—Massive MIMO, channel estimation, hybrid precoding, millimeter wave I. I NTRODUCTION M ASSIVE multiple-input multiple-output (MIMO) is potentially one of the most promising and key technologies to meet the stringent performance requirements for the next-generation, i.e., 5G, wireless communications [1], [2]. It has attracted considerable research interests from both academia and industry since the seminal work [3] was published in 2010 [4]–[7]. Most notably, with an excessive amount of antennas mounted at the transmitter and/or receiver, signal processing, including both transmission precoding and receiving combining, can be greatly simplified while achieving highly optimal performance [8]–[11]. Simple linear precoding schemes, such as zero-forcing (ZF), are virtually optimal and comparable to the capacity-achieving nonlinear dirty paper L. Pan and X. Dong are with the Department of Electrical and Computer Engineering, University of Victoria, Victoria, BC V8P 5C2, Canada (Email: [email protected], [email protected]). L. Liang is with the School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, GA 30332, USA (Email: [email protected]). W. Xu is with the National Mobile Communications Research Laboratory, Southeast University, Nanjing, Jiangsu 210096, China (Email: [email protected]). coding (DPC). Thanks to the employment of millimeter wave (mmWave) bands, a large number of antennas can be packed into a small area due to the short wavelength [12]. However, the conventional signal processing is typically performed at the baseband, which means that the signal received from each antenna port needs to be properly filtered, down-converted, and then sampled, where the hardware module performing such tasks is normally referred to as a radio-frequency (RF) chain. Analogous procedure exists for signal transmission. Given a large number of antennas in a massive MIMO system, it would be formidable to feed each antenna with a dedicated RF chain due to high cost and power consumption. To circumvent the challenging requirement of massive RF chains, an analog/digital hybrid structure has been proposed for massive MIMO systems operated on both centimeter wave (cmWave) [13] and mmWave [14] bands1. On the transmitter side of a hybrid system, low-dimensional baseband signals (after digital processing) are converted to the RF domain, feeding a phase-shifting network to properly adjust the phases of transmission signals which are then transmitted to wireless channels by antennas [12], [13]. The design of the RF and baseband precoding/combining matrices in a hybrid structure is a challenging problem and has been extensively studied in recent years, e.g., [14], [16]–[19]. However, these papers all assume the availability of channel state information (CSI). Other beamforming solutions without the explicit need of channel knowledge depending on iterative beam trainings and multi-stage codebooks have been developed in [20]–[23]. These solutions, however, naturally have the common disadvantage that the beamforming converges towards a single beam which is not capable to achieve multiplexing gains or support multiple streams in multi-user systems. Hence, the explicit channel estimation is one of the most important elements in reaping all the advantages and gains of massive MIMO, and unsurprisingly has been under extensive investigation. It is a challenging task, yet is even more difficult to fulfill under the limited RF-chain hybrid structure constraint. The main task of the channel estimation in a hybrid precoding system is to recover the M -dimensional channel vector from L observations at baseband, where L (< M ) is the number of limited RF chains. The conventional fully-digital MIMO channel estimation methods in the literature cannot 1 According to the notation in [15], the cmWave bands generally denote 1 − 10 GHz while mmWave denotes 10 − 100 GHz. 2 be applied in a hybrid structure to obtain full CSI [24]– [28]. So far, only a few papers have studied channel estimation with limited RF chains in hybrid structured mmWave communications. An adaptive compressed sensing solution for the hybrid channel estimation was proposed in [29] from the perspective of angular sparsity of mmWave channels. Scanning in the angular domain is performed at both the transmitter and receiver sides. As such, the complexity and resource consumption of the proposed channel estimation scheme is dominated by the sparsity of channel scattering. For instance, it will consume much more resource with higher complexity to achieve a desired angular resolution in channel estimation when the scattering paths are rich, compared to the case of very sparse channels. A similar method was developed in a frequency-selective channel scenario [30]. In [31], channel estimation with phase-shifters or switches in a hybrid structured system was discussed. Still, it employs the high-complexity compressed sensing method with angular domain scanning to estimate the angle of arrival/angle of departure (AoA/AoD) of each scattering path. Few prior literature has considered the general problem of channel estimation in a hybrid structured massive MIMO system without significant dependence on the channel sparsity. Since the degree of freedom (DoF) of the received signals at baseband is limited by the number of RF chains, it becomes prohibitively difficult to obtain satisfactory higher-dimensional vector channel estimates, especially for rich scattering environments, in a hybrid precoding system using conventional channel estimation approaches. In this paper, we consider the uplink channel estimation of a multi-user massive MIMO system with the hybrid RFbaseband processing structure where the base station (BS) is equipped with a large number of antennas but driven by a far smaller number of RF chains, and each mobile station (MS) is equipped with a single antenna, and propose an efficient channel estimation scheme by exploiting the spatial correlation of massive MIMO channels where both single and multiple trainings are investigated. One may suspect the necessity of investigation on multiple trainings. Theoretically, one pilot symbol is optimal, and in fact enough, for a singleantenna user to assist uplink estimation of uncorrelated MIMO channels under some mild assumptions [32]. In a massive MIMO system with limited RF chains, however, only much smaller L-dimensional (compared to the number of antennas, M ) signal is captured at baseband per training. It is, therefore, evident that a single training symbol becomes insufficient for the BS to conduct full-dimensional channel estimation of M (independent) channel coefficients. To approach the performance of fully-digital channel estimation, multiple trainings are required to achieve the DoF of fully-digital baseband signal measurements. That is, T L observations can be utilized to estimate the M -dimensional MIMO channels, where T is the number of trainings. Hence, it needs to properly design RF combiners for different training phases to capture the channel energy and then recover the CSI as accurately as possible. Furthermore, how many trainings are required to achieve the performance of fully-digital channel estimation? Empirically, T = M/L training symbols can be utilized to achieve the DoF of a fully-digital training in the estimation of uncorrelated channels. However, such conclusions may not hold for correlated channels. As revealed in both [33] and [34], the optimal number of training symbols can be reduced due to the fact that the dimension of statistically dominant subspaces is less than the number of antennas. In practice, massive MIMO and mmWave channels are inevitably spatially correlated due to the limited number of propagation paths and angular spreads [24], [29], [35]. Thus, less than M/L trainings could be sufficient to achieve the fully-digital channel estimation performance in such spatially correlated channels. Finally, we summarize the main contributions of this paper as follows: • • • RF Combiner Design for Single Training: We investigate the channel estimation in a hybrid precoding system and formulate an optimization problem on channel estimation following the minimum mean square error (MMSE) criteria. To solve the problem, the constantmagnitude constraint of the RF combiner is temporarily relaxed. By employing the properties of Block Generalized Rayleigh Quotient, the theoretical optimizer of the formulated optimization problem is solved and the corresponding optimal RF combiner is designed in the single training scenario. Analyses of the designed combiner show that the mean square error (MSE) of the channel estimation decreases when (1) the channel is more spatially correlated, (2) more RF chains for channel estimation are deployed, (3) larger transmission power for training pilots is utilized. Moreover, the closed-form expression of the MSE is derived and verified to be quite accurate compared to the simulation results, thus providing useful guidelines in practical system designs. RF Combiner Design for Multiple Trainings: We formulate the optimization problem to design RF combiners for multiple trainings and solve it by Sequential and Alternating methods with the assistance of the singletraining result. The Sequential method can achieve stepwisely minimum MSE with low complexity while the Alternating one solves the joint optimization problem iteratively with high complexity, however, achieving the local optimum. The performance and complexity of the proposed RF combiners are examined in simulations under both nonparametric and parametric channel models [36]. Spatial Channel Covariance Estimation in HybridStructured System: To perform the proposed RF combiner design and channel estimation, the spatial channel covariance matrix needs be known by the BS to perform the design of RF combiners for channel estimation. In this paper, a covariance estimation method is proposed in the hybrid-structured massive MIMO system. From simulation results, it achieves comparable spectral efficiency with the estimated covariance matrix compared to that with the perfect one, which proves the effectiveness of the proposed method. Note that the considered system structure and channel estimation scheme is also applicable to mmWave channels [15], [17], [37]. 3 Apart from the contributions, we also present the main characteristics differentiating this paper from the existing works as summarized below. • Compared to the typical fully-digital massive MIMO systems, the signal dimension in the considered system is reduced after the processing of the phase-shifting network. That is, it converts the received M -dimensional RF signal to L-dimensional baseband signal where M denotes the number of antenna elements and L represents the number of RF chains typically satisfying L < M in hybrid precoding/combining systems. As such, the channel estimation performed in baseband cannot utilize the complete training information as the fully-digital massive MIMO does. • Compared to existing work on channel estimation in a hybrid-structure mmWave system, no explicit usage of channel sparsity is required by our proposed methods to perform the estimation, which is adaptive to both nonsparse cmWave and sparse mmWave channel scenarios. In addition, the complexity of our proposed scheme is determined by the number of RF chains and training phases which are fixed in an online system, rather than the scattering circumstance which is time-variant and difficult to be guaranteed. Organization: The rest of this paper is organized as follows. Section II illustrates the system model of the massive MIMO system with the hybrid precoding structure and the channel models adopted in this paper. In Section III, the channel estimation schemes in the hybrid structure are proposed and analyzed. Section ?? proposes the method to generate the channel covariance matrices which can be employed in practical system implementations. The numerical and simulation results are presented in Section V. Finally, Section VI concludes our work in this paper. Notation: The boldface capital and lowercase letters are used to denote matrices and vectors, respectively, while the plain lowercase letters are scalars. Superscripts (·)∗ , (·)T and (·)H stand for the conjugate, transpose and conjugate-transpose of a vector or matrix, respectively. IM represents the identity matrix of size M . Operators k · k, k · kF and tr(·) denote the Euclidean norm of a vector, the Frobenius norm and the trace of a matrix, respectively. blkdiag{A1 , · · · , AL } stands for the block matrix with diagonal elements as A1 , · · · , AL in sequence. For statistical vectors and matrices, E{·} and Var{·} are utilized to represent the expectation and variance, respectively. Moreover, x ∼ CN (0, Σ) represents the complex Gaussian random vector x with zero mean and covariance matrix Σ. Finally, a ≻ b means that a majorizes (or dominates) b and vice versa. II. S YSTEM M ODEL We investigate a single-cell hybrid massive MIMO communication structure as shown in Fig. 1 where K single-antenna mobile stations (MSs) are served by a base station (BS) equipped with M antennas driven by L RF chains which are interfaced by an analog RF phase-shifting network converting the high-dimensional received signal to low-dimensional one RF Chain Baseband Processing L RF Chain Base Station Analog RF Combiner F gK MS K g1 MS 1 M Mobile Station Fig. 1: Block diagram of massive MIMO with a hybrid structure. through phase-only linear combing. Here, L < M means limited RF chains while L = M implies full chains. The combined RF signal after the phase-shifting network is then down-converted to baseband and sampled by analog-to-digital converter(s) for further digital processing [12]. Due to its reciprocity in TDD operation, the channel between the BS and each MS can be obtained by the uplink training and used for downlink precoding within a coherence interval [38]. Different from the downlink training employed in [39], the uplink training requires the pilot sequences transmitted by all MSs to be orthogonal to each other to avoid pilot contamination. Hence, the duration of each pilot sequence should be at least K symbols to guarantee the orthogonality conditions [38]. Among all, the identity matrix IK is one of the simplest orthogonal pilots, which implies that the MSs transmit pilot sequentially and all others keep mute when a MS is transmitting pilot. Moreover, the performance of channel estimation with identity matrix as pilot is the same as that with others under block-fading channels. On the other hand, it is more practical to design the channel-estimation-used analog combiner based on the corresponding spatial channel covariance matrix of a single MS per training, which can be understood from the perspective of hybrid beamforming that the beamformer is toward one of the uncorrelated MSs when it is transmitting pilot signal and leads to better performance in sparse mmWave channels where the number of scattering paths is limited. Consequently, the channel estimation of each MS can be performed one by one with similar manipulations. For simplicity, we select a single MS to illustrate the hybrid channel estimation framework in the following elaborations. During the uplink training period, a single-antenna MS transmits T pilots to the BS. Considering the tth (t = 1, 2, · · · , T ) pilot training, the received baseband signal at BS after pilot compensation can be expressed as √ √ yt = Ft ( ρgϕt + ñt ) ϕ∗t = ρFt g + Ft nt , (1) where g ∈ CM×1 represents the uplink channel from the MS to BS which is assumed to remain static throughout a coherence interval, ϕt stands for the tth training symbol with ϕt ϕ∗t = 1, ρ is the pilot power per transmission, ñt ∈ CM×1 denotes the additive white Gaussian noise (AWGN) with zero mean and unit variance, nt , ñt ϕ∗t which persists as CN (0, IM ) AWGN, and Ft ∈ CL×M is the RF phaseshifting matrix constructed by unit-magnitude elements. For T pilot transmissions, the received signal can be stacked as a 4 concatenated vector yc = [y1T , y2T , · · · , yTT ]T ∈ CT L×1 given by √ (2) yc = ρFc g + Fd nc , where the pilot power is identical for each training peT T riod, the compact matrices Fc = [FT 1 , · · · , FT ] , Fd = T T T blkdiag{F1 , · · · , FT }, and nc = [n1 , · · · , nT ] . In this paper, we consider the spatially correlated MIMO channel model, which is a typical case in most MIMO scenarios due to the limited number of incident paths and angular spreads on BS [24]. The spatial channel covariance matrix can be expressed by R = E{ggH }. Without loss of generality, we normalize tr (R) = M . In Section III, R is assumed to be known by the BS while the estimation of the covariance matrix in practice will be discussed in Section IV. through numerical approaches without sustainable resource consumption due to the non-convex constraint. To facilitate further analysis, we temporarily drop the constant-magnitude constraint in the following design. This is a good way to begin with because it is capable to derive some closed-form expressions and provide guidelines for the design of phase-only combiners. Note that the design of phase-only combiners will be considered in Section III-C. Without the phase-only constraint, it can be shown that the optimal RF unconstrained combiner has a structure characterized in the following lemma. Lemma 1. For any optimal solution to the unconstrained RF combiners given their singular value decompositions (SVD) as F̃opt = Ut [Σt 0][Vt,L Vt,R ]H , t (7) it is safe to reconstruct the optimal combiners according to III. C HANNEL E STIMATION WITH H YBRID S TRUCTURE For channel estimation at the BS, the task is to obtain the channel estimate in the MMSE sense with the designed phase-shifting matrix. By employing the MMSE aimed linear estimator, the channel estimation problem can be formulated as follows:  minimize E kg − ĝk2 Fc ,W subject to: ĝ = Wyc √ yc = ρFc g + Fd nc (3) Fi ∈ F , i = 1, · · · , T where W represents the baseband processing matrix, and F denotes the set of all feasible phase-only RF combiners. In order to minimize MSE, the optimal solution to W is the well-known Weinner filter [40] given by −1 √ H , (4) W = ρRFH c ρFc RFc + RFd where Fc is assumed to be known as a prior and RFd , Fd FH d for notation simplification. Using (4), the objective function in (3) equals o n 2 MSE =E kg − ĝk   −1 H Fc R =tr R − ρRFH c ρFc RFc + RFd  −1  −1 , (5) =tr R−1 + ρFH R F c c Fd where the last equality holds due to the Woodbury matrix identity [41] and it is assumed that R is in full rank. If R is rank deficient, remedies similar to the one discussed in [33] can be applied which does not affect the MSE. Combining (3)–(5), the primal channel estimation problem is readily equivalent to the following problem as  −1  −1 minimize tr R−1 + ρFH c RFd Fc Fc (6) subject to: Ft ∈ F , t = 1, · · · , T. The optimization problem (6) aims to find the optimal and feasible RF combiners Ft (t = 1, · · · , T ) for the T -length training sequence. However, it is difficult to directly obtain the optimal solution in either closed-form expressions or H = Vt,L , Fopt t which yields the same MSE performance as t = 1, · · · , T (8) F̃opt t does, where Proof: See Appendix A Lemma 1 indicates that the optimal unconstrained RF combiner Fopt can always be restricted as row-unitary and t is thus independent of both Ut and Σt . Hence, we can set both of them to be identity matrices and equivalently simplify the MSE in (5) as  !−1  T X , MSE = tr  Λ−1 + ρ Ṽt ṼtH (9) t=1 where Ṽt , UH Vt,L , Λ = diag{λ1 , · · · , λM } and U are the eigenvalues and corresponding eigenvectors of R, i.e., R = UΛUH , respectively. Without loss of generality, it is assumed that the eigenvalues are arranged the decreasing order, i.e., Pin M λ1 ≥ · · · ≥ λM , and hence t=1 λt = tr(R) = M . In addition, there exists ṼtH Ṽt = IL due to the unitary property of both U and Vt,L . To design the optimal RF combiners, we first investigate the single-pilot strategy, i.e., T = 1, and then extend to the multiple pilot trainings where T > 1. A. Optimal Combiner Design of Single Training When T = 1, the MSE expressed in (9) reduces to   −1  Ṽ1H Λ MSE = tr Λ − ΛṼ1 Ṽ1H ΛṼ1 + ρ−1 IM (10a)   −1  H 2 −1 H Ṽ1 Λ Ṽ1 , = tr(Λ) − tr Ṽ1 Λ + ρ IM Ṽ1 (10b) where (10a) follows from the Woodbury matrix identity [41] and (10b) is derived on the fact that tr(AB) = tr(BA). From (10), the design of the unconstrained optimal RF combiner in (6) can be reformulated as the following optimization problem:    −1 H 2 H −1 maximize tr Ṽ1 Λ + ρ IM Ṽ1 Ṽ1 Λ Ṽ1 Ṽ1 subject to: Ṽ1H Ṽ1 = IL . (11) 5 To solve (11), we employ the block generalized Rayleigh quotient which is presented as Lemma 2 in Appendix B. Applying Lemma 2, the objective function of (11) is the block generalized Rayleigh quotient of Ṽ1 with respect to the pencil (Λ2 , Λ + ρ−1 IM ). The property of block generalized Rayleigh quotient described by Lemma 2 indicates that the maximizer of (11) is the matrix spanned by the L generalized eigenvectors corresponding to the L largest eigenvalues of the pencil (Λ2 , Λ + ρ−1 IM ) if the matrix happens to satisfy the constraint in (11). As Λ2 and Λ+ρ−1 IM are both diagonal, the generalized eigenvalues and corresponding ieigenvectors can h be directly obtained as Λ̃ = λ̃1 , · · · , λ̃M and Ũ = IM , respectively, where λ̃i = λ2i /(λi + ρ−1 ) (i = 1, · · · , M ) and λ̃1 ≥ · · · ≥ λ̃M according to the decreasing order of λi . Therefore, the maximizer of (11) is constructed by the eigenvectors corresponding to the largest L eigenvalues of the pencil (Λ2 , Λ + ρ−1 IM ), denoted as Ṽ1opt = Ũ[1:L] = IM[1:L] , (12) where (Ṽ1opt )H Ṽ1opt = IL satisfies the constraint in (11). Now, we can arrive at the following Theorem 1 which presents the optimal design of the unconstrained single-training RF combiner. Theorem 1. The optimal unconstrained RF combiner for the single pilot strategy can be designed as follows: Fopt = (U[1:L] )H , 1 (13) where U is the matrix spanned by the eigenvectors of R. Proof: By substituting (12) into (8) with the transition defined by Ṽt , UH Vt,L , the optimal unconstrained singletraining RF combiner can be obtained. Theorem 1 implies that the RF combiner should receive the training pilots along the largest L dominant eigen-directions of R to minimize the MSE of channel estimations. More explicitly, we substitute (12) into (10) and obtain the optimal MSE as follows: −1 !   IL −1 MSE =tr Λ +ρ 0M−L = L X l=1 M X λl + λl 1 + ρλl =M − l=L+1 L X l=1 λ2l , λl + 1/ρ (14) where (14) P is obtained by applying the power constraint M defined by i=1 λi = M . Prior to stating more insights obtained from (14), we define a useful concept of one channel being more spatially correlated than another in the following way. Definition 1. Let channel vectors g1 ∈ CM and g2 ∈ CM have covariance matrices R1 ∈ RM×M and R2 ∈ RM×M , respectively. We say g1 is more spatially correlated than g2 if and only if λ1 ≻ λ2 , where λ1 and λ2 are composed of the eigenvalues sorted in a descending order of R1 and R2 , respectively. By Definition 1 and observing (14), we can conclude the following corollaries on the design insights of the optimal unconstrained RF combiner revealed in Theorem 1. Corollary 1. Given the number of RF chains and pilot power fixed, the MSE of channel estimation with the optimal unconstrained single-training RF combiner decreases if the channel is more spatially correlated. Proof: See Appendix C. Corollary 2. Given the channel correlation and pilot power fixed, the MSE of channel estimation with the optimal unconstrained single-training RF combiner decreases with more RF chains deployed. Corollary 3. Given the channel correlation and number of RF chains fixed, the MSE of channel estimation with the optimal unconstrained single-training RF combiner decreases with increasing pilot power. Corollary 2 and 3 can be directly proved by checking the fact that the MSE in (14) monotonously decreases with the increase of ρ and/or L. B. Combiner Design of Multiple Trainings In a typical fully-digital MIMO system, the M -dimensional signal can be observed at baseband to estimate the M dimensional MIMO channels. However, the hybrid structure MIMO system can only capture L-dimensional signal from the phase-shifting network fed by M antennas for each training. Note that L < M in the limited RF chain scenario. Hence, the observed low-dimensional signal is not sufficient to recover the high-dimensional channel information for a single training. To approach the performance of fully-digital channel estimation, multiple trainings can be employed to achieve the DoF of fully-digital baseband signal measurements, namely, T L observations can be utilized to estimate the M -dimensional MIMO channels. Typically, it is assumed that T L ≤ M . Therefore, the RF combiner for each training phase needs to be properly designed to capture the channel energy for channel recovery as accurate as possible. In this subsection, we investigate the design of unconstrained combiners for multiple trainings, i.e., F1 , · · · , FT . Intuitively, the multiple trainings can be performed by simply repeating the single-pilot training for multiple times. Inspired by Theorem 1 where the most dominated L eigen-directions of R are selected to construct the combiner, it is heuristic to select the most dominated T L eigen-directions to establish the T combiners for multiple trainings, namely, the Block Selection method, where the RF combiner for the tth (t = 1, 2, · · · , T ) training can be composed of the tth most dominated Leigenvector block of R, as expressed by Fopt = (U[(t−1)L+1:tL] )H . t (15) Evidently, the Block Selection method has low complexity, yet leading to non-optimal performance. In order to improve the performance of channel estimation with multiple trainings, we formulate the optimization problem 6 to design combiners for multiple trainings by recalling (9) shown as follows: maximize MSE Ṽt subject to: ṼtH Ṽt = IL , (16) t = 1, · · · , T where the MSE of the objective function is expressed by (9). The designed Ṽt can be employed to construct the RF combiners according to Theorem 1. Hence, it is necessary to find the optimizer of (16) to design RF combiners for multiple trainings. Dealing with the optimization problem, we propose two methods to solve it in the following part of this section. 1) Sequential Optimization: It has been investigated in Subsection III-A that the closed-form expression of the optimal combiner can be obtained in the single-training scenario. For multiple trainings, however, it is difficult to obtain the global optimal solution directly. Nevertheless, we propose a sequential approach, namely, the Sequential Optimization (short as Sequential) method, to minimize MSE step-wisely when T > 1. To illustrate the Sequential Optimization method, recall (9) and reformulate it in the following form:  −1  −1 H , (17) MSE = tr ΓT + ρṼT ṼT where Γ−1 t = ( H Γ−1 t−1 + ρṼt−1 Ṽt−1 , t > 1 −1 Λ , t = 1. (18) Following the iterative definition of Γ−1 denoted by (18), the t MSE can be minimized by the Sequential Optimization method as follows. Firstly, by setting T = 1 the problem reduces to the singlepilot training case which can be solved as presented in Section III-A. Subsequently, with T = 2, the MSE denoted by (17) can be reformulated as  −1  −1 H . (19) MSE = tr Γ2 + ρṼ2 Ṽ2 By applying the same manipulations as in Section III-A, the optimal Ṽ2 to minimize the MSE expressed by (19) can be obtained. Similar to (12), the optimal Ṽ2 , say Ṽ2opt , is constructed by the most dominated L eigen-directions of the pencil (Γ22 , Γ2 +ρ−1 IM ). In other words, Ṽ2opt is combined by L generalized eigenvectors corresponding to the L largest generalized eigenvalues of (Γ22 , Γ2 + ρ−1 IM ). For ease of exposition, we denote Γ2 = diag{γ1,2 , · · · , γM,2 }. The generalized eigenvalues and eigenvectors of pencil (Γ22 , Γ2 + ρ−1 IM ) can T be obtained as γ̃2 = [γ̃1,2 , · · · , γ̃M,2 ] and IM , respectively, 2 −1 where γ̃j,2 = γj,2 /(γj,2 + ρ ) for j = 1, · · · , M . Therefore, Ṽ2opt = IM[j1 ,··· ,jL ] , (20) where the indices [j1 , · · · , jL ] are the first L numbers of [j1 , · · · , jM ] which follow from the descending order of γ̃i,2 shown as γ̃j1 ,2 ≥ · · · ≥ γ̃jM ,2 . In the similar manner as T = 2, we can obtain each ṼTopt for any T > 2 successively according to the generalized eigenvalues and eigenvectors of pencil (Γ2T , ΓT + ρ−1 IM ). Finally, the combiners are derived by applying the definition of Ṽi and Lemma 1. For instance, the optimal F2,opt can be expressed by (21) Fopt = UH 2 [j1 ,··· ,jL ] . By reviewing (18) and the Sequential Optimization method, a natural question arises here: Whether Γt is invertible or not? To check this question, we start with considering a twostage training with Γ1 and Γ2 . Note that the known covariance matrix R is assumed to be symmetric and full-rank2, thus it is positive definite with all eigenvalues positive. Hence, Γ1 is composed of positive diagonal elements which indicates that it is invertible. By setting T = 2 in (18), we have −1 H Γ−1 2 = Γ1 + ρṼ1 Ṽ1 . In addition to positive diagonal Γ1 , the optimal Ṽ1 solved in Section III-A is shown to be IM[1:L] . H Hence, it is guaranteed that Γ−1 1 + ρṼ1 Ṽ1 is always diagonal with positive entries for ρ > 0. So is Γ2 invertible. Using the similar manipulation, one can successively verify that ΓT −1 is composed of positive diagonal entries and hence ΓT is diagonal and invertible for any T > 2. Remark 1. In the aforementioned illustrations, each Ṽtopt (t = 1, · · · , T ) during the Sequential Optimization has the same structure in which they are constructed by column-wise permutations of IM which denotes the set of generalized eigenvectors of pencil (Γ2t , Γt + ρ−1 IM ), and the selected columns correspond to the L largest generalized eigenvalues of this pencil. Accordingly, each combiner for the multiple trainings, namely Fopt t , is the Hermitian of the matrix constructed by the consistent column-wise permutations of U as the construction of Ṽtopt . Note that the eigenvectors of the above pencil always compose an identity matrix due to diagonal Γt . Remark 2. Inevitably, the optimum Ṽtopt (t = 1, · · · , T ) obtained by the Sequential Optimization method is not a global minimizer of the MSE in (9). Nevertheless, it minimizes the MSE reformulated by (17) for each step of iterations, namely the step-wise minimizer. The performance of such sub-optimal combiners will be evaluated by numerical results in Section V. 2) Alternating Optimization: For further performance enhancement, we solve (16) via joint optimization over Ṽt ’s. It in many cases can achieve near optimal performance via the alternating optimization to solve non-convex problems. More specifically, we consider fixing all the other Ṽt (t 6= j) while optimizing only a single Ṽj . And then, iterations are taken to update each Ṽj (j = 1, · · · , T ) alternatively until convergence. This solution is named as Alternating Optimization (short as Alternating) throughout this paper. For an explicit exposure of alternating optimization, we reformulate the MSE expressed by (9) to separate Ṽj from the sum as given by  −1  H Ṽ , j = 1, · · · , T + ρ Ṽ MSE(Ṽj ) = tr Q−1 j j j (22) 2 If R is rank deficient, the method mentioned below (5) can be employed for adjustment. 7 PT where Q−1 = Λ−1 + ρ t=1,t6=j Ṽt ṼtH . With given values j of Ṽt (t 6= j), Ṽj can be solved in the same manner as Subsection III-A where Lemma 2 is applied. In this paper, the relative MSE increment of each iteration round, namely,        (n) (n−1) (n) (n−1) ǫj = MSE Ṽj − MSE Ṽj , MSE Ṽj will be taken as the error measurement. The iterations continue (n) until ǫj falls below a prescribed tolerance ǫ and the last (n) iterate Ṽj is taken as the solution. Finally, the unconstrained near-optimal RF combiners are computed from the solved Ṽtopt (t = 1, · · · , T ) by applying Lemma 1. The alternating optimization method is summarized step-by-step in Algorithm 1. Algorithm 1 Alternating Optimization to Design Optimal Unconstrained Combiners for Multiple Trainings Input: M , T and R Output: Optimal unconstrained RF combiners for multiple trainings, Fopt (t = 1, · · · , T ) t (0) 1: Initialize n = 0 and Ṽt for t = 1, · · · , T 2: loop (n) (n) 3: Use Ṽt (t 6= j) to obtain Ṽj which minimizes MSE expressed by (22) for j = 1, · · · , T sequentially (n) and update Ṽj  with the new solved values (n) 4: 5: 6: 7: 8: 9: 10: 11: if MSE Ṽj (n−1) −MSE Ṽj   (n−1) MSE Ṽj < ǫ then Stop loop else Update n by 1 (i.e., n = n + 1) end if end loop Compute Fopt with Ṽtopt by applying Lemma 1 t opt Output Ft Since Algorithm 1 is implemented via iterations, the convergence issue is needed to be addressed here. During each (n) iteration, the solution Ṽj always minimizes (22). Hence, the objective MSE is monotonically decreasing as the increasing of iterations until it achieves the minimal MSE. This proves the convergence of Algorithm 1. C. Design of Phase-only RF Combiners In the previous subsections, we first omit the phase-only constraints when designing the RF combiners. However, the RF combiners are implemented using phase shifters in practical hybrid systems, which can only perform phase rotations on the received RF signals. Hence, the magnitude of each element of a RF combiner matrix must keep constant. In this subsection, we propose a method to design the phaseonly RF combiners based on the unconstrained optimal ones. Moreover, the performance loss incurred by the constantmagnitude constraint is characterized by numerical evaluation shown in Section V-A3. Inspired by the fact that the phase shifters only perform phase adjustments on the received signal, we take out the phase of each unconstrained combiner and construct the constantmagnitude RF combiners according to (i,j) Ft (i,j) = ejφt (i,j) denotes the phase where φt (i,j) (i,j) (i,j) i.e., Ft,opt = at ejφt . , t = 1, · · · , T, (23) of the (i,j)th element of Ft,opt , It is interesting to find that such heuristic phase-only RF combiners achieve desirable performance via simulation verifications in Section V. Besides its effectiveness, the very low complexity is another advantage of this design. Furthermore, the performance of the phase-only combiners designed above will be examined and analyzed in Subsections V-A3 and V-A4 in terms of both MSE of channel estimation and spectral efficiency in hybrid precoded multiuser massive MIMO communications. IV. E STIMATION OF S PATIAL C HANNEL C OVARIANCE The prior knowledge of spatial channel correlations, which can be characterized by the channel covariance matrix, is one of the most important prerequisites to improve the performance of not only channel estimations but also precoding designs [42]. While it has been assumed to be known by the BS in our proposed channel estimation framework, the covariance estimation should not be overlooked in practice. Due to the limited RF chains, it is infeasible to estimate the covariance matrix in hybrid precoding systems by employing conventional approaches [43]–[46]. Dealing with this problem, some of the prior works have made their efforts, but still have limitations when applied to practical hybrid-structured massive MIMO or mmWave systems. [47] has proposed a parallel subspace estimation and tracking by recursive least squares from partial observations, namely the PETRELS method, which can be employed in the hybrid massive MIMO system to perform covariance estimation, whereas tremendous observations are needed to achieve desirable performance due to no consideration on the symmetry property of a spatial channel covariance matrix. A less complicated method has been proposed in [48], however, by employing a parallel switch network which increases the hardware cost. In [49], a compressive sensing based spatial channel covariance estimation has been proposed while a strong condition is assumed that AoAs do not change during the long-term covariance estimations which is impractical. In this section, we propose a practical covariance matrix estimation method which can be employed in a hybridstructured massive MIMO system with limited RF chains. The estimates of spatial channel covariance matrix can be utilized in our proposed channel estimation framework. Let T = M/L and consider the ith (i = 1, · · · , Nc ) coherence interval, (2) can be rewritten as √ (24) yc [i] = ρFc [i]g[i] + Fd [i]nc [i], where Fc [i] ∈ CM×M denotes the compacted phase shifting matrix in the ith coherence interval, Fd [i] , T T ML×1 [FT is the AWGN and Nc 1 [i], · · · , FT [i]] , nc [i] ∈ C stands for the number of coherence intervals during which the spatial channel covariance matrix can be viewed constant, i.e.,  R = E g[i]g[i]H . For the purpose of simplifying trainings, 8 By substituting (26) into (25), it derives the estimate of the spatial channel covariance matrix. Note that it may need many trainings to approximate the covariance matrix of the received signal with its sample covariance, which increases the overhead of channel estimation. One may concern how much resource is consumed to estimate channel covariance in practical systems. Theoretically, the covariance matrix exploits the second-order statistics of the Wide-Sense Stationary Uncorrelated Scattering (WSSUS) channel nature which varies slowly over time and frequency, and a one-time estimate can be used for long-term communications [50]. In fact, the experimental results in [51] have revealed that the spatial covariance matrix can be viewed constant over 22.6 s, 9.7 s and 4.8 s in the urban, rural and indoor environment, respectively. Considering a system with 10 MSps, for example, the estimated spatial channel covariance can be used for 1 × 109 times within 10 s, which is far more than the consumption of channel usage on covariance estimation. Therefore, the overhead of covariance estimation is negligible in practice. Apart from overhead, the estimation accuracy of covariance matrix and its impact on channel estimation performance is another issue need to be considered in practical systems. According to (25) and (26), the estimation accuracy of R is determined by R̂yc , which can be increased by extending the averaging time. In Section V, simulation results will demonstrate the number of channel usages needed to achieve the required estimation accuracy. V. N UMERICAL AND S IMULATION R ESULTS In this section, we evaluate the performance of the proposed channel estimation scheme by employing both unconstrained and phase-only RF combiners to perform uplink channel estimation in the massive MIMO system with the hybrid precoding structure. The evaluations are performed with nonparametric channel models followed by parametric ones. In simulations, we consider both single-user and multi-user scenarios. In the single-user scenario, a single-antenna MS is served by a BS deployed in the hybrid analog/digital system structure which is shown by Fig. 1 with K = 1. The multiuser scenario adopts K = 8 single-antenna MSs served by the BS with the same structure as that employed in the singleuser case. Without explicit indications, the BS is equipped with M = 64 antennas followed by L = 8 RF chains. As the power of noise is normalized to 1, the transmission power ρ can be used to denote the received signal-to-noise ratio (SNR). Each simulation result is obtained by averaging over 10, 000 channel realizations. Moreover, we adopt the low-complexity hybrid precoding scheme proposed by Liang et al. in [17] to preprocess the transmission signal in downlink communications. A. Performance with Nonparametric Channel Model In this subsection, the nonparametric channel model denoted by g = R1/2 h is considered, where h ∈ CM×1 stands for the small-scale fading of the channel constructed by independently and identically distributed (i.i.d.) Gaussian random variables, i.e., h ∼ CN (0, IM ), and R is modeled by exponential correlation model as [R]m,n = a|m−n| with [R]m,n denoting the (m, n)th element of R and 0 ≤ a < 1 being a real number that controls the correlation introduced to the channel model [24], [25]. Here, a larger a corresponds to a more spatially correlated channel and g degenerates to an i.i.d. Rayleigh fading channel when a = 0. 0 Normalized MSE (dB) it is durable to employ the same phase shifting matrix for each coherence interval, i.e., Fc [i] = Fc . Further, we can select an invertible Fc from the feasible constant-magnitude matrix set F for training purpose, e.g., the DFT matrix. Hence, the spatial covariance matrix of the channel can be derived from (24) as  −1 H 1 , (25) Fc Ryc − Fd FH R = F−1 d c ρ  where Ryc = E yc [i]yc [i]H denoting the covariance matrix of the received signal. From (25), the estimation of spatial channel covariance matrix can be converted to that of the received signal covariance, where both phase shifting matrix Fc and pilot transmission power ρ are assumed to be known by the BS. In practice, the statistical covariance of the received signal can be approximated with the sample covariance matrix constructed as follows: Nc 1 X R̂yc = yc [i]yc [i]H . (26) Nc i=1 L=[4,8,16,32,48] -5 -10 -15 -20 -25 -20 Unconstrained combiner simulation Unconstrained combiner closed-form DFT combiner Fully-digital estimation -10 0 10 20 SNR (dB) Fig. 2: Performance comparison of the single-training hybrid channel estimation with different RF chains. (M = 64, a = 0.8) 1) Single Training Performance Evaluation: Fig. 2 shows the normalized MSE performance of the hybrid channel estimations with the designed single-training unconstrained combiner at different numbers of RF chains. As a benchmark, the performance of the fully-digital estimation is also presented. Note that the fully-digital estimation is performed with single training throughout this section. From the comparison, it is evident to find that the MSE decreases with the increase of the pilot training power, which verifies Corollary 3. Moreover, with more RF chains equipped at the BS, the channel estimation performance is also improved, which confirms Corollary 2. Note that in Fig. 2, we also plot the estimation performance 9 with RF combiners composed of the columns randomly selected from a discrete Fourier transform (DFT) matrix. Its poor performance as compared to the designed combiners proposed in this paper justifies the necessity to properly design RF combiners and the effectiveness of our design. Furthermore, it is observed that the derived closed-form expressions are quite accurate in characterizing the MSE performance of the channel estimations throughout the whole SNR range, thus providing valuable guidelines in practical system designs. Finally, the figure also shows that the performance gap between the fully-digital estimation and the limited-chain hybrid channel estimations is tolerably small at low SNR regions. There is only about 0.5 dB MSE gap between the hybrid 16-chain and the conventional fully-digital estimations at SNR=0 dB, where three-quarter RF chains are saved with the hybrid structure. However, one may argue: how about the performance gap at high SNR regions? Due to limited chains, the single training is not sufficient to achieve the performance of fully-digital channel estimation. To improve the performance of the hybrid channel estimations at full SNR regions, multiple trainings are introduced in this paper and the performance is examined in the next subsection. 0 -5 0 T=[1,2,4,6,8] -10 Normalized MSE (dB) Normalized MSE (dB) T=[1,2,4,6,8] to find that even T = 2 trainings can outperform the fullydigital estimation. This phenomenon reveals the fact that, when the dimension of the dominated subspaces of the correlated channels is far less than M , the limited-chain estimation can suppress noise better than the fully-digital one due to multiple trainings, which results in the distinct performance gap in the low SNR regions. On top of that, more performance differences can also be compared from the observation of Fig. 3. In the figure, the normalized MSE of the Block Selection method denoted by the triangle curve is always larger than or equal to that of the other two methods, i.e., the Sequential and Alternating solutions. The performance gap is particularly obvious at the low SNR regions. Such performance loss of Block Selection is caused by the fact that the noise is not considered when designing the combiners for the second and later pilot trainings. However, little performance gap can be observed between Block Selection and the others at high SNR regions due to the less significance of noise to channel estimation. By comparing the performances between the Sequential and Alternating solutions, it is evidenced that they achieve almost the same MSE no matter at high or low SNR regions which implies that the Sequential method can achieve the local optimum in solving (16). On the other hand, the lower designing complexity of the Sequential designates its superiority than the Alternating method. -15 -20 -25 -20 Block selection Sequential solution Alternating solution Fully-digital estimation -10 0 10 20 -5 -10 -15 -20 SNR (dB) Fig. 3: Performance comparison of the multiple-training hybrid channel estimation with different training times. (M = 64, L = 8, a = 0.8) 2) Multiple Trainings Performance Evaluation: In this paper, the design of unconstrained combiners for multiple trainings is formulated as (16), which are solved by both Sequential and Alternating approaches alongside of the intuitive Block Selection method. The performance is examined in Fig. 3 with T = 1, 2, 4, 6 and 8. The figure shows that the normalized MSE of the hybrid channel estimation decreases as the increasing of training times due to the increased DoF of baseband observations. Additionally, it is interesting to find that the MSE performance with L = 8 and T = 8 almost achieves that of the fully-digital estimation at high SNRs. This phenomenon verifies that the performance of fullydigital channel estimation can be achieved by the limited-chain hybrid channel estimation with sufficient DoF of trainings, i.e., T × L = M . In the low SNR regions, it is evident -25 -20 Phase-only combiners Unconstrained combiners Fully-digital estimation -10 0 10 20 SNR (dB) Fig. 4: Performance comparison of channel estimation between unconstrained and phase-only combiners with the Sequential method under different pilot trainings. (M = 64, L = 8, a = 0.8) 3) Performance Evaluation of Phase-only RF Combiners: In the previous two subsections, the performance of the hybrid channel estimation with unconstrained RF combiners are evaluated. However, only phase shifters can be employed in the current practical applications with hybrid precoding structure, which means that only phase-only combiners are applicable in practice. In this subsection, we examine the performance in hybrid channel estimation with the phase-only combiners and compare it to that of the corresponding unconstrained ones, where the combiners for multiple trainings are designed by employing the Sequential method. In Fig. 4, the dashed 10 Normalized MSE (dB) a=[0.1,0.3,0.5,0.7,0.9] -5 -10 -15 Phase-only combiners Unconstrained combiners -20 -10 0 10 20 SNR (dB) Fig. 5: Channel estimation performance of both unconstrained and phase-only combiners with the Sequential method under different channel correlations. (M = 64, L = 8, T = 6) lines marked by triangles denote the MSE performance of the hybrid channel estimation with phase-only combiners which are designed according to (23), where the performance of the unconstrained combiners are denoted by the circled solid lines. From comparisons, it is obvious that the performance loss caused by the phase-only combiners is tolerable at high SNR regions and is negligible throughout the low SNR regions. For instance, there is only 1.5 dB MSE loss at SNR=20 dB while 0.08 dB loss at SNR=−20 dB when T = 8. The figure also shows that the performance loss is smaller with fewer trainings, i.e., smaller T . Therefore, the hybrid channel estimation with phase-only combiners achieve the desirable performance measured by the normalized MSE. Furthermore, we also present the performance of hybrid channel estimation at different channel correlation shown in Fig. 5. It is evident that the normalized MSE of the hybrid channel estimation decreases, thus the performance increases, as the increasing of a, namely, with more spatially correlated channels, which verifies Corollary 1. Moreover, it is obvious that the performance between the phase-only and unconstrained combiners is tight throughout the SNR regions, e.g., there exist only 0.7 dB of MSE gap at SNR=20 dB when a = 0.9. 4) Spectral Efficiency Evaluation with Hybrid Channel Estimation: Apart from the normalized MSE performance presented in previous subsections, the spectral efficiency of the hybrid channel estimation is examined in this part. In the simulation, the spatial channel covariance matrix of each user is estimated by the method proposed in Section IV with 300 training intervals. The following channel estimation is performed with the estimated covariance matrix. Within each coherence interval, K MSs transmit orthogonal training pilots to the BS for channel estimations during uplink communications, while the BS broadcasts data to all MSs during the downlink communications by employing the hybrid precoding with the estimated channels. Note that the uplink and downlink channels are assumed reciprocal in this simulation and the spectral efficiency is calculated over the downlink data transmissions. Fig. 6 shows comparisons of the spectral efficiency with the precoding scheme designed from the perfect CSI and estimated CSI with perfect and estimated covariance matrices, respectively, where the phase shifters are considered both ideal with no quantizations and non-ideal with 2-bit, 3-bit and 4bit quantizations, respectively. From the figure, we observe that the spectral efficiency curves denoting the estimated and ideal covariance matrices are very tight which means that the estimated covariance matrix with 300 training intervals is accurate enough to be comparable with the ideal one when employed in hybrid channel estimations. By recalling the example in Section IV, it is shown that the overhead of covariance estimation is only 2.4 × 10−6 per user, which is negligible in practice. The figure further shows that the spectral efficiency with the estimated CSI approaches that with the perfect one, especially in low SNR region which is always the scenario in realistic massive MIMO systems. Moreover, we can see that the hybrid precoding scheme with estimated CSI achieves highly desirable performance as compared to the gene-assisted system where perfect CSI is available to the transmitter, particularly in the low SNR regions, where the negligible performance gap is introduced by the constantmagnitude constraint. Finally, the curves denoting different phase quantizations show that the 2-bit quantization is not sufficient to achieve the no-quantization performance while the 3-bit, especially the 4-bit, quantized phase shifters produce comparable spectral efficiency to the no-quantized ideal phase shifters, with only slight performance gap, which means that our proposed hybrid channel estimation is insensitive to the quantization of phase shifters. 70 Spectral efficiency (bits/s/Hz) 0 60 Perfect CSI Estimated CSI, perfect covariance Estimated CSI, estimated covariance 50 40 No quant. 4-bit quant. 3-bit quant. 2-bit quant. 30 20 10 0 -20 -10 0 10 20 SNR (dB) Fig. 6: Spectral efficiency performance with the hybrid precoding scheme using both estimated and perfect CSI where the non-perfect CSI is estimated with both perfect and estimated spatial channel covariance matrix. (M = 64, L = 8, K = 8, T = 8, Nc = 300, ρ = 10 dB and a = 0.8) B. Performance with Spatial Channel Model In Subsection A, the nonparametric channel models are employed in simulations to evaluate the performance of the 11 proposed channel estimation design in the hybrid precoding system. In this subsection, the proposed channel estimation framework is evaluated in the practical spatial channel model (SCM) under suburban macro, urban macro and urban micro environments. The SCM channels are generated from the open source software provided by [52] with default settings (6 scattering paths with 20 subpaths each, which is rich scattering) and random seed 1. The spatial channel covariance matrix is estimated by the proposed method in Section IV. Fig. 7 shows the spectral efficiency performances of the perfect and estimated CSI obtained by the proposed method and by the compressed sensing based channel estimation in [29], respectively. From the figure, it is obvious that the spectral efficiency with the proposed channel estimation method almost overlaps that with the perfect CSI in all three environments with only visible minor performance gap in the high SNR region, i.e., 15 to 20 dB, which explicitly show the high accuracy of the proposed channel estimation frame. Note that only 6 trainings are employed in the simulation which verifies that less than M/L trainings can be sufficient to achieve the performance of the perfect CSI in spatially correlated channels. Moreover, the comparisons with the compressed sensing based hybrid channel estimations proposed in [29] evidently show that our proposed method is more effective in the rich scattering channels which verifies that no sparsity is required by our proposed method to estimate CSI. Spectral efficiency (bits/s/Hz) 80 70 60 50 40 A PPENDIX A. Proof of Lemma 1 By applying the eigenvalue decomposition of a positivedefinite R, i.e., R = UΛUH , the objective function in (6) can be derived as  −1  −1 MSE =tr R−1 + ρFH c RFd Fc  −1  −1 =tr Λ−1 + ρUH FH R F U c c Fd  ! !−1  p X H −1 , FH Fi U =tr  Λ−1 + ρUH i (Fi Fi ) i=1 Perfect CSI: suburban macro Perfect CSI: urban macro Perfect CSI: urban micro Estimated CSI: suburban macro Estimated CSI: urban macro Estimated CSI: urban micro Ref.: suburban macro Ref.: urban macro Ref.: urban micro (27) where the last equality uses  −1 H −1 . , · · · , (FT FH R−1 T) Fd = blkdiag (F1 F1 ) Substituting (7) into the above equation yields  !−1  T X H , UH Vi,L Vi,L U MSE = tr  Λ−1 + ρ 30 (28) (29) i=1 which indicates that the MSE is independent of both Ui and Σi . Hence, we can safely set both of them to identity H matrices and obtain Fopt = Vi,L from (7) without loss of the i optimality, which completes the proof. 20 10 0 -20 theoretical analyses have shown that the channel estimation performance can improve when the channel is more spatially correlated, the BS deploys more RF chains or the MSs increase training power, which has been verified by simulation results. In addition, the RF combiners have been designed in the case of multiple trainings to increase the DoF of the received signal measurements at BS. The simulation results reveal that multiple trainings can approach the performance of fullydigital estimation with single training and even outperform it at low SNR regions when the channel is highly correlated. Finally, this paper has proposed a practical spatial channel covariance matrix estimation method in the hybrid-structured massive MIMO system. The simulation results have shown the effectiveness of the proposed method under various scenarios in terms of the spectral efficiency with the hybrid precoding. -10 0 SNR (dB) 10 20 Fig. 7: Spectral efficiency performance with the hybrid precoding scheme in practical SCM channels using both perfect and estimated CSI. The Ref. result follows the channel estimation algorithm proposed in [29]. (M = 64, L = 8, T = 6, Nc = 1000, ρ = 20 dB and 3-bit phase quantization) VI. C ONCLUSIONS This paper has investigated and proposed a channel estimation framework for massive MIMO systems employing a hybrid transceiver structure with a limited number of RF chains and a phase shifting network. The optimal RF combiners have been designed in the case of single training by exploiting the channel covariance matrix and the complete CSI is estimated in the hybrid structured massive MIMO system. The B. Block Generalized Rayleigh Quotient Lemma 2. (Block Generalized Rayleigh Quotient) [53] Given a full column rank matrix V, the block generalized Rayleigh quotient with respect to the pencil (A, B) is defined as   −1 T GRQ(V) = tr VT BV V AV , (30) where V ∈ CN ×T . Suppose the generalized eigenvalues and the corresponding eigenvectors of the pencil (A, B) are denoted by λ1 ≥ · · · ≥ λN and (v1 , · · · , vN ), respectively, where the eigenvalues are arranged in decreasing order, without loss of generality. For a matrix containing a subset of distinct generalized eigenvectors, the generalized Rayleigh quotient evaluates to the sum of the associated eigenvalues: GRQ([vi1 , · · · , viT ]) = T X j=1 λij (31) 12 and bounds can be placed on the Rayleigh quotient of an N × T matrix as λ1 + λ2 + · · · + λT ≥ GRQ(V) ≥ λN −T +1 + · · · + λN , (32) where an equality in this bound indicates that V is composed of the extreme eigenvectors as colsp(V) = colsp([v1 , · · · , vT ]) or colsp(V) = colsp([vN −T +1 , · · · , vN ]). Here colsp(·) represents the column space spanned by the specified matrix. C. Proof of Corollary 1 We start with the definition of function φ : RL → R as φ(x) = L X ψ(xl ), (33) l=1 x2 l where ψ(xl ) , xl +1/ρ . Note that the MSE shown in (14) can be denoted by MSE = M − φ(λ). It is straightforward to show that ψ(xl ) is convex and hence φ(x) is Schur-convex according to [54]. Suppose channel g1 ∈ CM is more spatially correlated than g2 ∈ CM which can be mathematically expressed as λ1 ≻ λ2 , where λ1 = [λ1,1 , · · · , λM,1 ]T and λ2 = [λ1,2 , · · · , λM,2 ]T denote the eigenvalues sorted in descending order of the covariance matrices of channel g1 and g2 , respectively. Applying the majorization theory on the Schur-convex function φ(x), there exists φ(λ1 ) ≥ φ(λ2 ). (34) Hence, MSE(g1 ) ≤ MSE(g2 ), which proves Corollary 1. R EFERENCES [1] J. G. Andrews, S. Buzzi, W. Choi, S. V. Hanly, A. Lozano, A. C. K. Soong, and J. C. Zhang, “What will 5G be?” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1065–1082, Jun. 2014. [2] W. Chin, Z. Fan, and R. Haines, “Emerging technologies and research challenges for 5G wireless networks,” IEEE Wireless Commun., vol. 21, no. 2, pp. 106–112, Apr. 2014. [3] T. L. Marzetta, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Trans. Wireless Commun., vol. 9, no. 11, pp. 3590–3600, Nov. 2010. [4] 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, Feb. 2013. [5] E. G. Larsson, O. Edfors, F. Tufvesson, and T. L. Marzetta, “Massive MIMO for next generation wireless systems,” IEEE Commun. Mag., vol. 30, no. 1, pp. 186–195, Feb. 2014. [6] S. Jin, X. Wang, Z. Li, and K.-K. Wong, “Zero-forcing beamforming in massive MIMO systems with time-shifted pilots,” in Proc. IEEE ICC, Jun. 2014, pp. 4801–4806. [7] Y. Dai and X. Dong, “Power allocation for multi-pair massive MIMO two-way AF relaying with linear processing,” IEEE Trans. Wireless Commun., vol. 15, no. 9, pp. 5932–5946, Sep. 2016. [8] L. Pan, Y. Dai, W. Xu, and X. Dong, “A novel block-shifted pilot design for multipair massive MIMO relaying,” in Proc. EUSIPCO, Aug. 2016, pp. 848–852. [9] F. Rusek, D. Persson, B. K. Lau, E. G. Larsson, T. L. Marzetta, O. Edfors, and F. Tufvesson, “Scaling up MIMO: Opportunities and challenges with very large arrays,” IEEE Signal Process. Mag., vol. 30, no. 1, pp. 40–60, Jan. 2013. [10] E. Björnson, L. Sanguinetti, J. Hoydis, and M. Debbah, “Optimal design of energy-efficient multi-user MIMO systems: Is massive MIMO the answer?” IEEE Trans. Wireless Commun., vol. 14, no. 6, pp. 3059 – 3075, Jun. 2015. [11] L. Pan, Y. Dai, W. Xu, and X. Dong, “Multipair massive MIMO relaying with pilot-data transmission overlay,” IEEE Trans. Wireless Commun., vol. PP, no. 99, pp. 1–1, Mar. 2017. [12] R. W. Heath Jr., N. González-Prelcic, S. Rangan, W. Roh, and A. M. Sayeed, “An overview of signal processing techniques for millimeter wave MIMO systems,” IEEE J. Sel. Topics Signal Process, vol. 10, no. 3, pp. 436–453, Apr. 2016. [13] X. Zhang, A. F. Molisch, and S.-Y. Kung, “Variable-phase-shift-based RF-baseband codesign for MIMO antenna selection,” IEEE Trans. Signal Process., 2005. [14] O. E. Ayach, R. W. Heath, Jr., S. Abu-Surra, S. Rajagopal, and Z. Pi, “The capacity optimality of beam steering in large millimeter wave MIMO systems,” in Proc. IEEE SPAWC, Jun. 2012, pp. 100–104. [15] A. F. Molisch, V. V. Ratnam, S. Han, Z. Li, S. L. H. Nguyen, L. Li, and K. Haneda, “Hybrid beamforming for massive MIMO A survey,” arXiv preprint arXiv:1609.05078, Apr. 2016. [Online]. Available: https://arxiv.org/pdf/1609.05078.pdf [16] O. E. Ayach, S. Rajagopal, S. Abu-Surra, Z. Pi, and R. W. Heath, Jr., “Spatially sparse precoding in millimeter wave MIMO systems,” IEEE Trans. Wireless Commun., vol. 13, no. 3, pp. 1499–1513, Mar. 2014. [17] L. Liang, W. Xu, and X. Dong, “Low-complexity hybrid precoding in massive multiuser MIMO systems,” IEEE Wireless Commun. Lett., vol. 3, no. 6, pp. 653–656, Dec. 2014. [18] A. Alkhateeb, G. Leus, and R. W. Heath Jr., “Limited feedback hybrid precoding for multi-user millimeter wave systems,” IEEE Trans. Wireless Commun., vol. 14, no. 11, pp. 6481–6494, Nov. 2015. [19] A. Alkhateeb and R. W. Heath Jr., “Frequency selective hybrid precoding for limited feedback millimeter wave systems,” IEEE Trans. Commun., vol. 64, no. 5, pp. 1801–1818, May 2016. [20] J. Wang, Z. Lan, C.-W. Pyo, T. Baykas, C.-S. Sum, M. A. Rahman, J. Gao, R. Funada, F. Kojima, H. Harada, and S. Kato, “Beam codebook based beamforming protocol for multi-Gbps millimeter-wave WPAN systems,” IEEE J. Sel. Areas Commun., vol. 27, no. 8, pp. 1390–1399, Oct. 2009. [21] L. Chen, Y. Yang, X. Chen, and W. Wang, “Multi-stage beamforming codebook for 60GHz WPAN,” in Proc. ICST CHINACOM, Aug. 2011, pp. 1–5. [22] S. Hur, T. Kim, D. J. Love, J. V. Krogmeier, T. A. Thomas, and A. Ghosh, “Millimeter wave beamforming for wireless backhaul and access in small cell networks,” IEEE Trans. Commun., vol. 61, no. 10, pp. 4391–4403, Oct. 2013. [23] Y. M. Tsang, A. S. Y. Poon, and S. Addepalli, “Coding the beams: improving beamforming training in mmWave communication system,” in Proc. IEEE GLOBECOMM 2011, Kathmandu, Nepal, Dec. 2011, pp. 1–6. [24] J. Choi, D. J. Love, and P. Bidigare, “Downlink training techniques for FDD massive MIMO systems: open-loop and closed-loop training with memory,” IEEE J. Sel. Topics Signal Process, vol. 8, no. 5, pp. 802–814, Oct. 2014. [25] M. Biguesh and A. B. Gershman, “Training-based MIMO channel estimation: A study of estimator tradeoffs and optimal training signals,” IEEE Trans. Signal Process., vol. 54, no. 3, pp. 884 – 893, Mar. 2006. [26] C.-K. Wen, S. Jin, K.-K. Wong, J.-C. Chen, and P. Ting, “Channel estimation for massive MIMO using Gaussian-mixture Bayesian learning,” IEEE Trans. Wireless Commun., vol. 14, no. 3, pp. 1356–1368, Mar. 2015. [27] D. Fan, Z. Zhong, G. Wang, and F. Gao, “Channel estimation for wireless cellular systems with massive linear receiving antennas,” in Proc. 10th Int. Conf. Commun. and Netw. in China (ChinaCom), Aug. 2015, pp. 95–99. [28] H. Xie, F. Gao, S. Zhang, and S. Jin, “UL/DL channel estimation for TDD/FDD massive MIMO systems using DFT and angle reciprocity,” in Proc. VTC Spring, May 2016, pp. 1–5. [29] A. Alkhateeb, O. E. Ayach, G. Leus, and R. W. Heath, Jr., “Channel estimation and hybrid precoding for millimeter wave cellular systems,” IEEE J. Sel. Topics Signal Process, vol. 8, no. 5, pp. 831–846, Oct. 2014. [30] Z. Gao, C. Hu, L. Dai, and Z. Wang, “Channel estimation for millimeterwave massive MIMO with hybrid precoding over frequency-selective fading channels,” IEEE Commun. Lett., vol. 20, no. 6, pp. 1259–1262, Jun. 2016. [31] R. Méndez-Rial, C. Rusut, A. Alkhateeb, N. González-Prelcic, and R. W. Heath Jr., “Channel estimation and hybrid combining for mmWave: Phase shifters or switches?” in Proc. ITA, Feb. 2015, pp. 90–97. [32] B. Hassibi and B. M. Hochwald, “How much training is needed in multiple-antenna wireless links?” IEEE Trans. Inf. Theory, vol. 49, no. 4, pp. 951–963, Apr. 2003. [33] J. H. Kotecha and A. M. Sayeed, “Transmit signal design for optimal estimation of correlated MIMO channels,” IEEE Trans. Signal Process., vol. 52, no. 2, pp. 546–557, Feb. 2004. 13 [34] E. Björnson and B. Ottersten, “A framework for training-based estimation in arbitrarily correlated Rician MIMO channels with Rician disturbance,” IEEE Trans. Signal Process., vol. 58, no. 3, Mar. 2010. [35] A. Alkhateebt, O. E. Ayach, G. Leus, and R. W. Heath, Jr., “Singlesided adaptive estimation of multi-path millimeter wave channels,” in Proc. IEEE SPAWC, Jun. 2014, pp. 125–129. [36] A. Forenza, D. J. Love, and R. W. Heath Jr., “Simplified spatial correlation models for clustered MIMO channels with different array configuration,” IEEE Trans. Veh. Technol., vol. 56, no. 4, pp. 1924– 1934, Jul. 2007. [37] T. E. Bogale, L. B. Le, A. Haghighat, and L. Vandendorpe, “On the Number of RF Chains and Phase Shifters, and Scheduling Design With Hybrid AnalogDigital Beamforming,” IEEE Trans. Wireless Commun., vol. 15, no. 5, pp. 3311–3326, May 2016. [38] T. L. Marzetta, “How much training is required for multiuser MIMO?” in Proc. ACSSC, Oct. 2006, pp. 359–363. [39] A. Alkhateeb, G. Leus, and R. W. Heath Jr., “Compressed sensing based multi-user millimeter wave systems: How many measurements are needed?” in Proc. IEEE ICASSP, Apr. 2015, pp. 1–5. [40] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation Theory, 1st ed. Prentice Hall PTR, Apr. 1993, vol. 1. [41] N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd ed. SIAM, 2002. [42] A. Liu and V. K. N. Lau, “Two-stage subspace constrained precoding in massive MIMO cellular systems,” IEEE Trans. Wirelss Commun., vol. 14, no. 6, pp. 3271–3279, Jun. 2015. [43] B. D. Carlson, “Covariance matrix estimation errors and diagonal loading in adaptive arrays,” IEEE Trans. Aerosp. Electron. Syst, vol. 24, no. 4, pp. 397–401, Jul. 1988. [44] Y.-C. Liang and F. P. S. Chin, “Downlink channel covariance matrix (DCCM) estimation and its applications in wireless DS-CDMA systems,” IEEE J. Sel. Areas Commun., vol. 19, no. 2, pp. 222–232, Feb. 2001. [45] W. L. Melvin and G. A. Showman, “An approach to knowledge-aided covariance estimation,” IEEE Trans. Aerosp. Electron. Syst, vol. 42, no. 3, pp. 1021–1042, Jul. 2006. [46] R. Méndez-Rial, N. González-Prelcic, and R. W. Heath Jr., “Augmented covariance estimation with a cyclic approach in DOA,” in Proc. IEEE ICASSP, Apr. 2015, pp. 2784–2788. [47] Y. Chi, Y. C. Eldar, and R. Calderbank, “PETRELS: Parallel subspace estimation and tracking by recursive least square from partial observations,” IEEE Trans. Signal Process., 2013. [48] R. Méndez-Rial, N. González-Prelcic, and R. W. Heath Jr., “Adaptive hybrid precoding and combining in mmWave multiuser MIMO systems based on compressed covariance estimation,” in Proc. IEEE CAMSAP, Dec. 2015, pp. 213–216. [49] S. Park and R. W. Heath Jr., “Spatial channel covariance estimation for mmWave hybrid MIMO architecture,” in Proc. IEEE Asilomar 2016, 2016, pp. 1–5. [50] S. Haghighatshoar and G. Caire, “Massive MIMO channel subspace estimation from low-dimensional projections,” IEEE Trans. Signal Process., vol. 65, no. 2, pp. 303–318, Jan. 2017. [51] I. Viering, H. Hofstetter, and W. Utschick, “Spatial long-term variations in urban, rural and indoor environments,” in Proc. European Cooperation in the Field of Scienific and Technical Research (COST), Sep. 2002, pp. 1–9. [52] J. Salo, G. D. Galdo, J. Salmi, P. Kyosti, M. Milojevic, D. Laselva, and C. Schneider, “MATLAB implementation of the 3GPP Spatial Channel Model (3GPP TR 25.996),” Jan. 2005. [Online]. Available: http://www.tkk.fi/Units/Radio/scm/ [53] C. G. Baker, “Riemannian manifold trust-region methods with applications to eigenproblems,” Ph.D. dissertation, Florida State University, May 2008. [54] A. W. Marshal, I. Olkin, and B. C. Arnold, Inequalities: Theory of Majorization and Its Applications, 2nd ed. Springer, 2010.
7cs.IT
1 Low-complexity implementation of convex optimization-based phase retrieval Sercan Ö. Arık, and Joseph M. Kahn, Fellow, IEEE Abstract— Phase retrieval has important applications in optical imaging, communications and sensing. Lifting the dimensionality of the problem allows phase retrieval to be approximated as a convex optimization problem in a higherdimensional space. Convex optimization-based phase retrieval has been shown to yield high accuracy, yet its low-complexity implementation has not been explored. In this paper, we study three fundamental approaches for its low-complexity implementation: the projected gradient method, the Nesterov accelerated gradient method, and the alternating direction method of multipliers (ADMM). We derive the corresponding estimation algorithms and evaluate their complexities. We compare their performance in the application area of directdetection mode-division multiplexing. We demonstrate that they yield small estimation penalties (less than 0.2 dB for transmitter processing and less than 0.6 dB for receiver equalization) while yielding low computational cost, as their implementation complexities all scale quadratically in the number of unknown parameters. Among the three methods, ADMM achieves convergence after the fewest iterations and the fewest computational operations. Index Terms—Phase retrieval, convex optimization, alternative direction method of multipliers, optical communications, modedivision multiplexing. P I. INTRODUCTION HASE retrieval corresponds to the extraction of phase information about signals solely from their measured intensities, possibly with the aid of various transformations. Phase retrieval problems are commonly encountered in applications where phase measurements are impossible or impractical. One such field is optics, due to the fundamental difficulty of measuring phase at carrier frequencies of hundreds of THz [1]. The applications of phase retrieval in optics include imaging (crystallographic imaging [2-4], speckle imaging [5], coherent diffractive imaging [6,7], astronomical imaging [8,9]), sensing (wavefront sensing [11]), and communications (direct-detection mode-division multiplexing, MDM [10]). There are also important applications of phase retrieval outside of optics, such as multiinput multi-output (MIMO) wireless communications [12], This manuscript was submitted in September 2017. This work was supported in part by Huawei Technologies Co., Ltd. S. Ö. Arık is with Baidu Silicon Valley Artificial Intelligence Lab, Sunnyvale, CA 94089 (e-mail: [email protected]). J. M. Kahn is with the E. L. Ginzton Laboratory, Department of Electrical Engineering, Stanford University, Stanford, CA 94305 USA (e-mail: [email protected]). speech recognition [13] and compressed sensing [14-16]. The traditional setting of phase retrieval is in the recovery of signals from measured intensities in the space/spatial frequency or time/temporal frequency domains. This setting is encountered in many applications, because many systems (e.g., optical systems such as graded-index media, lenses, or simply free-space propagation) transform signals from the spatial domain into the spatial frequency domain, and many detection systems measure only intensities. The approaches typically used for phase retrieval in this traditional problem setting are of the form of sequential gradient descent. For example, the Gerchberg-Saxton algorithm is based on iteratively transforming a candidate solution back and forth between the two domains (e.g., space and spatial frequency), imposing constraints in one domain before transforming to the other [17,18]. Despite the good performance of such heuristic approaches, there is no algorithm for phase retrieval that guarantees achievement of a globally optimal solution at a low (non-deterministic polynomial-time hard) computational complexity. A fundamental challenge is the non-convexity of the intensity constraint after an orthogonal transformation [19]. Furthermore, in many applications, the problem setting for phase retrieval is more general than that addressed by traditional algorithms. An important generalization is encountered in recovery of unknown signals from the measured intensities of their inner products with known signals. (When the known signals are complex exponentials, we obtain the special case described in the previous paragraph.) The inner product operation occurs in linear systems when measurements are performed in the appropriate domain. For example, for a linear MIMO optical channel at a given frequency, the known signals may correspond to (baseband envelopes of) known training sequence vectors, and the signals to be recovered may correspond to rows of the channel transfer matrix [10]. In such settings, generalization of low-complexity heuristic approaches based on sequential gradient descent is challenging, as there might not be an orthogonal transformation between the known signals (e.g., Fourier transformation) with a low-complexity implementation (e.g., fast Fourier transform algorithm). The concept of sequential algorithms may be generalized in the form of alternating minimization, based on alternation between the missing phase information and the candidate solutions [20], but such methods do not reliably achieve good performance [2,10]. Addressing phase retrieval problems in a general setting, 2 Candes et al. recently proposed an approach of lifting the optimization problem to a high-dimensional space, where a convex optimization problem can efficiently approximate the original phase retrieval problem [21]. Convex optimizationbased phase retrieval has been demonstrated to achieve high performance in imaging [21-23] and in communications [10]. Implementation complexity is critical in many applications, yet the low-complexity implementation of convex optimization-based phase retrieval has not yet been explored. For example, in short-reach optical communications [10], transceiver power consumption is an important concern, and can determine the practical feasibility of any proposed technology. Specialized low-complexity algorithms are required for such applications. Methods employed in generalpurpose optimization software, such as interior-point methods, are typically not suitable for such applications. In this paper, we study three fundamental methods for lowcomplexity implementation of convex optimization-based phase retrieval: the projected gradient method in Section III, the Nesterov accelerated gradient method in Section IV, and the alternating direction method of multipliers (ADMM) in Section V. For each method, we describe adaptive algorithms and present the associated computational complexities. In comparing the performance of these methods, we focus on an application area in optical communications: direct-detection MDM, whose architecture is described in detail in Section VI. We demonstrate that all these methods yield excellent performance at low implementation complexity in either transmitter- or receiver-based MIMO processing. We focus on the problem of extracting unknown signal vectors from the magnitudes of their inner products with known signal vectors. We assume that D-dimensional known complex vectors x (n ) are used for estimation of Ddimensional unknown complex vectors h l . With additive (n ) , the available measurements are h l H x (n ) 2 + n l (n ) = d l (n ), N min rank(Cl ) + λ ∑ x( ) n H Cl x (n ) − d l (n ) 2 , n =1 (1) where 1 ≤ n ≤ N and 1 ≤ l ≤ L . We might have L = D , e.g., in direct-detection MDM for a D × D MIMO channel, or we might have L >> D , e.g., in diffractive imaging when multiple illuminations are used. In the absence of noise, the formulation (1) can be expressed equivalently as L different rank-minimization problems. Defining D × D complex Hermitian matrix parameters C l , we have min rank(Cl ) . (2) (n ) s.t. Cl ≥ 0 and x(n )H Cl x(n ) = dl , for 1 ≤ n ≤ N Optimal solutions to (2) are obtained for the matrix parameters ˆ = h H h . To consider the effect of noise, the equality C l l l constraints in (2) can be expressed as an additive penalty term in a maximum-likelihood formulation of signal retrieval with additive noise . In this paper, we focus on spatially white zero- (3) s.t. Cl ≥ 0 where λ is a tradeoff constant and ≥ denotes that the matrix is positive semidefinite. Generalization of (3) to other noise types is possible by considering the maximum-likelihood formulation for the corresponding noise statistics, which might or might not be convex in x (n ) . As rank-minimization problems are non-deterministic polynomial-time hard, it is desired to apply a convex relaxation that can approximate the optimization problem (3) efficiently, while yielding a global optimal solution. An efficient convex relaxation is based on substituting the trace function [21] in place of the rank function, which yields N min g (Cl ) = tr (Cl ) + λ ∑ x( ) n H Cl x ( n ) − d l (n ) n=1 2 . (4) s.t. Cl ≥ 0 After computing the optimal matrix parameter Ĉ l , its first ˆ = ∑D χ ˆ ˆ ˆ H ˆ 1,1 u ˆ 1,1 , where C χ l k =1 i ,k u i ,k u i ,k principal component , yields the estimate for h l . The overall dimensionality of the problem is squared in exchange for the benefit of convex approximation. We will next focus on three techniques that aim to approximately solve the increased-dimensionality problem efficiently with low computational complexity. In estimating () () II. CONVEX OPTIMIZATION-BASED PHASE RETRIEVAL noise n l mean real-valued Gaussian noise, for which the rankminimization problem can be expressed as * computational complexity, we assume ℜ , ℑ and ( ) operations have negligible cost. We quantify the computational complexity of other operations, which are generally performed on complex numbers, in terms of the number of floating point operations (flops) required. We assume optimal ordering of algebraic operations to minimize complexity. For example, multiplication of a matrix, vector and scalar can be done with lower complexity by first multiplying the matrix and the vector and then the scalar, or by first multiplying the vector and the scalar and then the matrix, as opposed to first multiplying the scalar and the matrix and then the vector. We also assume that any computed result can be reused at multiple steps without being recomputed, by utilizing a working memory that can store intermediate results. The structure of the objective function in (4) forms the basis for the reduced-complexity algorithms. III. PROJECTED GRADIENT METHOD Projected gradient methods represent an efficient first-order approach for constrained convex optimization problems. The principle is based on iteratively searching for optimal values of the variables along a direction determined by gradient values, while imposing the constraints at each step. Starting with an initial guess Cl 0 , the projected gradient method applies the following update equation recursively at iteration step k + 1 : (5) Cl k +1 ← P Cl k − t k ∇g Cl k . [] [ ] ( [ ] [ ] ( [ ])) 3 ( ) denotes the gradient operator corresponding to objective function and P( ) denotes the projection In (5), ∇g the operator that is required to satisfy the constraints. We will next derive the various operators and analyze their computational complexities. The step size can be updated by a search algorithm. A common approach is a back-tracking line search algorithm: while ( g C l k < g Cl k − t k ∇g Cl k ): ( [ ]) ( [ ] [ ] ( [ ])) do t [k ] = t [k ] ⋅ τ (6) where 0 < τ < 1 . The computational complexity of backtracking line search is dominated by the complexity of the ( ) objective function computation, which is O D 2 LN flops per iteration step. Computation of ∇g Cl , the gradient with respect to C l , requires computing the following derivatives for 1 ≤ i ≤ D and i +1 ≤ k ≤ D : 2 ∂g (C) ⎛N ⎞ = 1 + 2λ ⎜ ∑ x i(n ) ℜ x (n )H C l x (n ) ⎟ ∂ℜ(C lii ) ⎝ n =1 ⎠ , (7) N 2 ⎛ (n ) (n ) ⎞ − 2λ ⎜ ∑ ℜ d l xi ⎟ ⎝ n =1 ⎠ N ∂g (C) ⎛ ⎞ = 2λℜ⎜ ∑ x i(n ) x (kn )* x (n )H C l x (n ) ⎟ ∂ℜ(C lik ) ⎝ n =1 ⎠ , (8) ⎛ N (n ) (n ) (n )* ⎞ − 2λℜ⎜ ∑ d l x i x k ⎟ ⎝ n =1 ⎠ ∂g (C) ⎛ N (n ) (n )* (n )H ⎞ = 2λℑ⎜ ∑ xi x k x Cl x(n ) ⎟ ∂ℑ(Clik ) ⎝ n =1 ⎠ . (9) N ⎛ (n ) (n ) (n )* ⎞ − 2λℑ⎜ ∑ dl xi x k ⎟ ⎝ n =1 ⎠ 2 ( n) Computation of the x and x (n )* x (n ) terms require ( ) ( ) ( ) ( ) ( ) i i k ( ) 2 O ND flops in total. For all expressions in (7)-(9), the x (n )H Cl x (n ) terms are computed once with a complexity of 2 ( ) O D2 L flops. Given (n )* (n ) x i(n ) , x i x k , and x (n )H Cl x (n ) terms, of computation N (n ) (n )* (n )H C x (n ) ∑ xi x k x l n =1 N (n ) 2 ℜ x (n )H C x (n ) require l ∑ xi n =1 ( ) ( ) or 2 N − 1 flops for each i, k ( ) and l, yielding a total complexity of O D2 LN flops. To construct all the derivatives, performing all the additions and subtractions in (7)-(9) requires O D2 L flops. The total ( ) ( ) complexity of computing all the derivatives is O D2 LN flops. Imposing the constraint is based on the projection operator onto the positive-semidefinite cone: ⎛D ⎞ D P⎜⎜ ∑ λiuiui H ⎟⎟ = ∑ max(0, λi )uiui H . (10) ⎝ i =1 ⎠ i =1 Computation of the projection operator requires eigenvalue decomposition. Hardware-efficient eigenvalue decomposition techniques depend on the size of the matrix. For D = 3, techniques based on the analytical expressions of the eigenvalues and eigenvectors are fastest [1]. For D > 25, divide-and-conquer is the fastest algorithm [2]. For 3 < D < 25, (the range of interest for practical applications, e.g., in MDM systems), tridiagonal QR iteration is the fastest ( ) algorithm, with a complexity of O D3 flops [24]. After replacing any negative eigenvalues by 0, the reconstruction of ( ) the projection requires O D3 flops. Overall, applying ( ) projection L times requires in total O D 3 L flops per iteration, For the projected gradient method, the overall computational cost is dominated by the computation of gradient and projection operations, and is flops per iteration. The total max O D 2 LN , O D 3 L computational complexity is also proportional to the number of iterations. Hence, minimization of the total number of iterations is also crucial. (( ) ( )) IV. NESTEROV ACCELERATED GRADIENT METHOD Optimal first-order methods are derived from classical projected gradient methods, with the goal of reducing the number of iterations required to achieve convergence. One modification of the projected gradient method, pioneered by Nesterov [25], is the accelerated gradient method [26], which has update equations: Cl [k + 1] ← P(K l [k ] − t[k + 1]∇g (K l [k ])), γ[k + 1] ← 1 ⎛1 ⎜ + 1+ 1 ⎜2 4 γ[k ]2 ⎝ ⎞ ⎟ ⎟ ⎠ , (11) (12) γ[k + 1](1 − γ[k ]) (C l [k + 1]− C l [k ]) . (13) γ[k ] For determining the step size in (11), as above, the backtracking line search algorithm (6) can be used. The fundamental distinction of the Nesterov accelerated gradient method is the adjustment of the step size using the γ k K l [k + 1] ← C l [k + 1] + [] [] parameter. The evolution of γ k as a function of the iteration number is shown in Fig. 1. The Nesterov accelerated gradient method has a slightly higher complexity than the projected gradient method. The computational cost for the update step (12) is O 1 flops and ( ) () 2 for (13) is O D L flops. The major computational cost is step (( ) ( )) (11), which requires max O D 2 LN , O D 3 L flops per iteration, similar to the projected gradient algorithm. Again, the total computational complexity is proportional to the number of iterations. The modification for acceleration reduces the number of steps required for convergence, despite a slight increase in the computational cost per iteration step. V. ALTERNATING DIRECTION METHOD OF MULTIPLIERS A general approach to address constrained convex optimization problems with complicated objective functions is 4 1 N 1 ( N ) = λ x (n ) x (n )* x (n ) x (n )* . Tikab ∑ i k b a (22) 0.8 0.6 0.6 0.4 0.4 0.2 0.2 γ[k] 0.8 0 0 5 10 15 20 (γ[k + 1](1 − γ[k]))/γ[k] n =1 0 25 Iteration number Fig. 1 γ[k ] vs. iteration number for the Nesterov accelerated projected The minimization problem (17) reduces to a set of D 2 linear equations. Consider the matrix representation of the set of linear equations (20) ⎡ C l11 [k + 1] ⎤ ⎢ C [k + 1] ⎥ l12 ⎢ ⎥ ~ ⎥ = b l(N ) [k ], (23) X (N ) + ρI ⎢ ⎢ ⎥ ⎢C lD(D −1) [k + 1]⎥ ⎢ C lDD[k +1] ⎥ ⎣ ⎦ ( ) ( ) where b l N [k ] is a vector of size D 2 × 1 such that (N ) − (E [k ] / 2 + ρD [k ]) − δ / 2 , b l(n(()i −1)D + k ) [k ] = U lik lik lik i ,k N T ~ (N ) 2 2 X = λ ∑ X(n )X(n ) is a matrix of size D × D , and n =1 gradient method. to decompose them into smaller problems, each of which is then easier to handle. The ADMM technique combines the benefits of the dual decomposition and augmented Lagrangian methods for constrained optimization, We start by observing that the optimization problem can be equivalently expressed in equality constraint form: min g (Cl ) + I ≥0 (Dl ) s.t. Cl = Dl , (14) ( ) 2 ) (n )* (n ) X((in−1 )D + k = xi x k is a vector of size D × 1 . For the case of (~ ) invertible X(N ) + ρI , the solution of (23) is given by ⎡ Cl11[k + 1] ⎤ ⎢ C [k + 1] ⎥ ⎢ l12 ⎥ ~ −1 ⎢ ⎥ = X(N ) + ρI bl(N )[k ] = F (N )bl(N )[k ]. (24) ⎢ ⎥ ⎢ClD(D −1)[k + 1]⎥ ⎢ ClDD[k +1] ⎥ ⎣ ⎦ ( ) where I ≥0 D l is the indicator function such that ⎧ 0, D l ≥ 0 . (15) I ≥0 (D l ) = ⎨ ⎩∞, otherwise The corresponding augmented Lagrangian is in the form L(C l , D l , E l ) = g (C l ) + I ≥0 (D l ) . (16) 2 + El , Dl − Cl + ρ Dl − Cl F ADMM is based on replacing minimization of (16) by alternating minimization, where each step optimizes the matrix parameters C l , D l and E l separately: Inverting an ordinary matrix of size D 2 × D 2 requires O D 6 flops using naïve algorithms such as Gauss-Jordan C l [k + 1] ← argmin L(C l , D l [k ], E l [k ]) , (17) D l [k + 1] ← arg min L(C l [k + 1], D l , E l [k ]) , (18) N −1 T T ⎛ ⎞ = ⎜ λX (N ) X (N ) + λ ∑ X (n ) X (n ) + ρI ⎟ n =1 ⎝ ⎠ E l [k + 1] ← E l [k ]+ ρ (Dl [k + 1]− Cl [k + 1]). (19) ( ) ( ~ F (N ) = X (N ) + ρI ( Cl Dl We now analyze the steps (17)-(19). For step (17), we find the analytical solution by setting the first partial derivatives with respect to Clik to zero (since the second derivatives are always positive), which yield D ( ) (N ) = ρClik [k + 1] + ∑ Clab [k + 1]Tikab a ,b =1 ( N ) − ⎛ Elik [k ] + ρD [k ]⎞ − δ i , k Ulik ⎜ ⎟ lik 2 ⎝ 2 ⎠ where δ i ,k is a Kronecker delta function, and N ( N ) = λ d (n ) x (n ) x (n )* , U lik ∑ l i k n =1 , (20) ) elimination, and requires O D4.746 flops with optimized Coppersmith-Winograd-like construction methods [27]. Iterative computation of the matrix inverse term F ( N ) is also possible using the Sherman–Morrison–Woodbury lemma, exploiting its structure: = F (N −1) − −1 ) −1 . (25) F (N −1) X (N ) X ( N )T F (N −1) 1 / λ + X (N )T F (N −1) X (N ) ~ Note that we have the initial conditions X (0) = 0 and F (0) = I / ρ . Computation of X (N ) requires O D 2 flops. 4 Given X (N ) and F (N −1) , the update of F ( N ) requires ( ) ( ) OD flops. As the update is repeated for all n , the total complexity of computing F ( N ) becomes O D 4 N flops. Computation of ( ) ( ) ( N ) terms requires an additional all U lik O D2 NL flops. Given ( ) ( N ), computation of all b (N ) [k ] vectors requires U lik O D2 L l flops. (21) Overall, (( 2 computation ) ( 4 )) of Cl [k + 1] max O D LN , O D N flops at each iteration. requires 5 For step (18), an analytical solution can be obtained by equating the gradient to zero. We have the gradient 2 ⎞ ⎛ 1 ∇ D[k ]⎜ El [k ] + (Dl [k ] − Cl [k + 1]) ⎟ = ⎜ 2ρ ⎟ F⎠ ⎝ . (26) ⎛ 1 ⎞ 2⎜⎜ El [k ] + (Dl [k ] − Cl [k + 1])⎟⎟ 2 ρ ⎝ ⎠ 1 If Cl [k + 1] − El [k ] ≥ 0 , then the optimal solution is 2ρ 1 D l [k + 1] = C l [k + 1] − E l [k ] . For the general case, the 2ρ ⎛ ⎞ 1 optimal D l k + 1 is the projection P⎜⎜ C l [k + 1] − E l [k ]⎟⎟ . 2 ρ ⎝ ⎠ The overall update equation becomes ⎛ ⎞ 1 (27) D l [k + 1] ← P⎜⎜ C l [k + 1] − E l [k ]⎟⎟ . 2ρ ⎝ ⎠ [ modulus) of each modal field amplitude is available at the receiver. This has important consequences for MIMO signal (a) (b) ] Computation of the ( ) 1 C l [k + 1] − E l [k ] terms requires 2ρ (c) O D2 L flops in total. The projection operator is applied L times and dominates the computational complexity, requiring O D 3 L flops per iteration. ( ) ( ) ) ( )) Lastly, step (19) requires O D2 L flops at each step. The overall computational complexity per step is 2 4 3 flops per iteration, and is max O D LN , O D N , O D L again proportional to the total number of iterations. The computational complexities of the three methods are summarized in Table I. (( ) ( TABLE I COMPUTATIONAL COMPLEXITIES OF PHASE RETRIEVAL METHODS Computational complexity per iteration ( ( ( ( ) ( ) ( )) )) Projected gradient max O D 2 LN , O D 3 L Nesterov max O D 2 LN , O D 3 L ADMM max O D 2 LN , O D 4 N , O D 3 L (( ) ( ) ( )) VI. APPLICATION EXAMPLE: DIRECT-DETECTION MODEDIVISION MULTIPLEXING In this section, we study application of the phase retrieval techniques described above in direct-detection MDM [10]. MDM aims to increase the data throughput per fiber by employing a fiber supporting D propagating modes. At the transmitter, D independent data signals are multiplexed onto these modes, ideally providing a D-fold increase in throughput. During transmission, the data signals are intermixed by random coupling between modes, which corresponds to a D × D channel transfer matrix that has offdiagonal entries. We assume that group velocity dispersion and modal dispersion are negligible, such that memoryless signal processing and channel estimation are sufficient. Using direct detection simplifies receiver implementation, making the technique potentially suitable for short-reach communications. However, only the intensity (squared Fig. 2 Direct detection MDM systems using: (a) digital MIMO precoding at the transmitter, (b) optical MIMO precoding at the transmitter, and (c) optical MIMO equalization at the receiver. Mux: Multiplexer, mod.: modulator, det.: detector, I: in-phase, Q: quadrature. processing, channel transfer matrix estimation and information decoding. First, compensating for modal crosstalk requires complex-valued D × D MIMO signal processing. As shown in Fig. 2, direct-detection MDM can be implemented using a digital MIMO precoder or optical MIMO precoder at the transmitter, or using an optical MIMO equalizer at the receiver (additional details are given in [10]). Second, adjustment of the MIMO precoder or equalizer requires estimation of the D × D channel transfer matrix using phase retrieval. Third, information must be demodulated from the optical carrier using noncoherent or differentially coherent detection. Here, we are concerned with the second consequence, namely, how to perform channel estimation using phase retrieval. Estimation is facilitated using a known training sequence, which is composed of N D-dimensional signals. For a given D , the required size of the training signals can be found empirically. If the number of training vectors N is not large enough, high estimation error is obtained due to insufficient measurement diversity. On the other hand, increasing N beyond a certain threshold does not improve estimation accuracy significantly, and it is desired to set the value of N around this threshold. Note that for optical precoding or equalization methods, the training vectors can be transmitted at a low symbol rate, and high-speed digital signal processing can be avoided. For all three methods (digital or optical MIMO precoding or optical equalization), channel estimation corresponds to the phase retrieval problems described in Section 2. 6 For a MIMO precoder, the channel transfer matrix needs to be estimated up to a constant diagonal unitary matrix [10]. We have L = D , since for each transmitted sequence, D different the receiver is thermal noise-limited, so the received modal intensities are corrupted by additive, spatially white real Gaussian noise. Realizations of the channel transfer matrix are Group 1 (a) 2×2 MIMO MMF Spatial Demux Group 2 SNR = 12 dB -1 a2 10 SNR = 14 dB b1 4×4 MIMO Crosstalk-free Interior point-based Projected gradient Nesterov accelerated gradient ADMM SNR = 8 dB a1 b2 -2 10 b3 (b) Polarization Beam Spatial Splitter Mode 1 4 × 4 MIMO Processing using Mach-Zehnder Array Average BER b4 -3 10 -4 10 -5 10 Spatial Mode 2 -6 10 -7 10 Polarization Converter Fig. 3 (a) Demultiplexing using receiver MIMO processing in mode group subspaces, (b) implementation of optical MIMO processing using MachZehnder array. inner products are generated by the D rows of the channel transfer matrix, i.e., h l in (1) corresponds to the l th row of the channel transfer matrix. For a MIMO equalizer, the channel transfer matrix needs to be estimated up to a complex exponential, hence an additional optimization procedure is used to estimate the unknown phases of each row of the channel transfer matrix, yielding L = D + 1 [10]. Considering L = D or L = D + 1 with Table I, for a MIMO precoder or a MIMO equalizer, we estimate the computational complexity per iteration to be max O D 3 N , O D 4 for the projected gradient and Nesterov accelerated gradient methods, and O D 4 N for the ADMM. In other words, they are of the order of the dimensionality of the high-dimensional space, which is the square of the number of unknowns. In short-reach systems, the end-to-end link may be optimized to have negligible modal crosstalk between mode groups [28]. In this case, MIMO processing can be implemented within each mode group separately. Fig. 3 illustrates processing in mode group subspaces in a system using receiver MIMO equalization implemented by an array of Mach-Zehnder interferometers [29]. Processing in mode group subspaces can reduce the total hardware complexity of MIMO processing, as the required number of Mach-Zehnder interferometers scales with the square of the number of modes processed. In addition, mode group subspace processing can significantly reduce the computational complexity of channel estimation, as the estimation algorithms can be implemented separately for each mode group (e.g., of sizes D = 2 and D = 4 for the system shown in Fig. 3). (( ( ) ( )) ) VII. NUMERICAL RESULTS In the simulations presented here, we consider a directdetection MDM system employing on-off keying. We assume 0 10 20 30 40 Number of iterations 50 60 70 Fig. 4 Average BER vs. number of iterations for a direct-detection MDM system using on-off keying, transmitter MIMO precoding, D = 6 modes and N = 300 training signals. Horizontal lines show the performance achieved in the two reference cases: for the ideal crosstalk-free channel and when an interior-point technique [28] is used to implement convex estimation-based phase retrieval. ADMM: alternating direction method of multipliers. chosen from an ensemble of fully random complex-valued D × D unitary matrices to model worst-case modal crosstalk. We assume D = 6 modes and, accordingly, we choose N = 300 training signals to obtain low estimation error. We assume that these N training signals are generated randomly, with each vector element an independent, identically distributed circularly symmetric Gaussian random variable. The convex optimization formulation tradeoff constant is chosen as λ = 10, as in [10], as this choice yielded the lowest estimation error in the original convex optimization problem formulation (4). For projected gradient and Nesterov accelerated gradient methods, the backtracking line search parameter is chosen as τ = 0.3, which is at an optimal point when the tradeoff between the number of backtracking line search iterations and the direction of search accuracy is considered (when the value of τ is close to 1, convergence of the backtracking line search would be slow and when the value of τ value is too small, the estimation error would be high when moving in the direction of the step size). The system electrical signal-to-noise ratio (SNR) is defined as ⎡ SNR = ⎢ ⎣ where D ∑i =1 y i (n ) 2 (D ⋅ σ )⎤⎥ 2 , (28) ⎦ denotes an average over training signals. Since (28) is proportional to the square of the optical power per mode, a 1-dB change of the optical power per mode corresponds to a 2-dB change of 10 log10 (SNR ). A range of SNR values is considered that corresponds to practical short-reach optical links. Link performance is quantified by the average bit-error ratio (BER). Note that short-reach communication systems typically use forward error-correction codes with low complexity, necessitating BER targets around 10-3 to 10-4. 7 We compare the performance of the three low-complexity convex optimization-based phase retrieval techniques to the performance achieved in two reference cases. The first Average BER 10-2 Crosstalk-free Interior point-based Projected gradient Nesterov ADMM 10-3 10-4 10-5 7 8 9 10 11 12 13 14 SNR (dB) Fig. 5 Average BER vs. SNR for a direct-detection MDM system using onoff keying, transmitter MIMO precoding, D = 6 modes and N = 300 training signals. ADMM: alternating direction method of multipliers. Average BER 10-2 Crosstalk-free Interior point-based Projected gradient Nesterov ADMM 10-3 10-4 10-5 7 8 9 10 11 SNR (dB) 12 13 14 Fig. 6 Average BER vs. SNR for a direct-detection MDM system using onoff keying, receiver MIMO equalization, D = 6 modes and N = 300 training signals. ADMM: alternating direction method of multipliers. reference case is the ideal crosstalk-free channel, where additive noise is the only impairment. The second reference case includes modal crosstalk and uses CVX [30], a wellknown interior-point-based package, for convex estimationbased phase retrieval to determine the MIMO precoder or equalizer. Fig. 4 shows the average BER vs. number of iterations using transmitter MIMO precoding. The convergence speed is rather insensitive to the SNR value. The projected gradient method converges after ~50 iterations, the Nesterov accelerated gradient method converges after ~10 iterations, and the ADMM converges after just a few iterations. In the remainder of the simulations, we fix the total number of iterations to 70 for the projected gradient method, 30 for the Nesterov accelerated gradient method and 5 for the ADMM, to ensure convergence beyond the respective knees of the curves shown in Fig. 4. Table II provides estimates of the number of operations per second required for channel estimation based on the assumptions described in Sections III-V. We note that the mapping of an algorithm to hardware can be optimized given tradeoffs between the costs of computation, memory, and communication on a chip. Hence, the numerical values in Table II should be considered as rough order-of-magnitude estimates for straightforward hardware mapping on a singlecore processor without parallelization of the computation. The operation counts in Table II are computed assuming channel estimation at intervals of 1, 10 and 100 ms. Based on studies of channel dynamics [31], we estimate that short-reach multimode links with D~6 modes will change on time scales of ms to tens of ms [31]. Even if a direct-detection MDM system must update channel estimates at 1 ms intervals, the operation count for ADMM is only ~5 Gflop/s. This is about two orders of magnitude smaller than the operation count for a long-haul coherent MDM receiver [28]. TABLE II OPERATIONS PER SECOND FOR CONVEX OPTIMIZATION-BASED PHASE RETRIEVAL IN A DIRECT-DETECTION MDM SYSTEM USING TRANSMITTER MIMO PRECODING, ASSUMING L = D = 6, N = 300. Update interval Projected gradient Nesterov ADMM Operations per second required for channel estimation for update intervals indicated 1 ms 10 ms 100 ms ~50 Glops/s ~5 Gflops/s ~500 Mflops/s ~20 Gflops/s ~2 Gflops/s ~200 Mflops/s ~5 Gflops/s ~0.5 Gflops/s ~50 Mflops/s Fig. 5 shows the average BER vs. SNR using transmitter MIMO precoding. All three techniques exhibit performance very close to CVX, incurring SNR penalties (with respect to crosstalk-free case) less than 0.3 dB for target average BERs of 10-3 to 10-4. Fig. 6 shows the average BER vs. SNR using receiver MIMO equalization. Receiver MIMO equalization necessitates estimation procedures to determine the transmitter MIMO precoder, as well as additional estimation to disambiguate common phase factors [10]. Consequently, there are more opportunities for estimation errors than in transmitter precoding. The projected gradient and Nesterov accelerated gradient methods yield similar performance, incurring SNR penalties (with respect to crosstalk-free case) less than 0.6 dB for target average BERs of 10-3 to 10-4. For ADMM, the SNR penalty is slightly higher, but still less than 0.8 dB for the same target average BER range. VIII. CONCLUSIONS We have studied three low-complexity approaches for implementing convex optimization-based phase retrieval: the projected gradient method, the Nesterov accelerated gradient method and ADMM. The projected gradient method is a firstorder technique, which aims to impose the constraint at each iteration step. The Nesterov accelerated gradient method achieves an acceleration of the projected gradient method by using an adaptive step size parameter. The ADMM is based on redefining the convex optimization objective for uncoupled solutions of the separable objective functions using alternating minimization. We have demonstrated application of the three techniques to direct-detection MDM. All three methods accurately approximate the solution to the original phase retrieval problem, incurring small estimation penalties. The computational complexities of all three methods scale with the square of the number of unknowns per iteration. Among the 8 three, ADMM yields convergence after the smallest number of iterations. ACKNOWLEDGEMENTS Discussions with Prof. Emmanuel J. Candes are gratefully acknowledged. REFERENCES [1] A. Walther, “The question of phase retrieval in optics,” J. Mod. Opt. vol. 10, no. 1, pp. 41-49, 1963. [2] E. J. Candes, X. Li, and M. Soltanolkotabi, “Phase retrieval via Wirtinger flow: Theory and algorithms,” IEEE Trans. Inf. Theory, vol. 61, no. 4, pp. 1985-2007, Feb. 2015. [3] F. Fogel, I. Waldspurger, A. d’Aspremont, “Phase retrieval for imaging problems,” Math. Program. Comp. vol. 8, no. 3, pp. 311-355, Mar. 2016. [4] R. P. Millane, “Phase retrieval in crystallography and optics,” J. Opt. Soc. Am. A vol. 7, no. 3, pp. 394-411, 1990. [5] R. Horisaki, R. Egami, J. Tanida, “Single-shot phase imaging with randomized light (SPIRaL),” Opt. Expr. vol. 24, no. 4, pp. 3765-3773, Feb. 2016. [6] M. H. Seaberg, A. d'Aspremont, and J. J. Turner, “Coherent diffractive imaging using randomly coded masks,” App. Phys. Lett. vol. 107, no. 23, 231103, Nov. 2015. [7] J. A. Rodriguez, R. Xu, C. C. Chen, Y. Zou, and J. Miao, “Oversampling smoothness: an effective algorithm for phase retrieval of noisy diffraction intensities,” J. App. Crystallogr. vol. 46, pp. 312-318, 2013. [8] J. C. Dainty, and J. R. Fienup, “Phase retrieval and image reconstruction for astronomy,” in Image Recovery: Theory and Applications, H. Stark, (Academic Press Inc., 1987), pp. 231-275. [9] F. Roddier, Adaptive Optics in Astronomy (Cambridge University Press, 1999). [10] S. O. Arik and J. M. Kahn, “Direct-detection mode-division multiplexing in modal basis using phase retrieval,” Opt. Lett. vol. 41, no. 18, pp. 42654268, Sep. 2016. [11] R. A. Gonsalves and R. Chidlaw, “Wavefront sensing by phase retrieval,” Proc. SPIE 0207, Applications of Digital Image Processing III no. 32, Dec. 1979. [12] G. Wunder, H. Boche, T. Strohmer, and P. Jung, “Sparse signal processing concepts for efficient 5G system design,” IEEE Access vol. 3, pp. 195-208 Feb. 2015. [13] R. Balan, P. Casazza, and D. Edidin, “On signal reconstruction without phase,” App. and Comp. Harmonic Anal. vol. 20, no. 3, pp. 345-356, May 2006. [14] M. B. McCoy and J. A. Tropp, “The achievable performance of convex demixing,” [Online]. Available: https://arxiv.org/abs/1309.7478. [15] C. Hegde and R. B. Baraniuk, “Signal recovery on incoherent manifolds,” IEEE Trans. on Info. Theory vol. 58, no. 12, pp/ 7204-7214, Jul. 2012. [16] P. Schniter and S. Rangan, “Compressive phase retrieval via generalized approximate message passing,” IEEE Trans. Signal Process. vol. 63, no. 4, pp. 1043-1055, Feb. 2015. [17] R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of the phase from image and diffraction plane pictures,” Optik vol. 35, pp. 237-246, 1972. [18] J. R. Fienup, “Phase retrieval algorithms: a comparison,” App. Opt. vol. 21, no. 15, pp. 2758-2769, Aug. 1982. [19] V. Elser, “Phase retrieval by iterated projections,” J. Opt. Soc. Am. A vol. 20, no. 1, pp. 40-55, 2003. [20] P. Netrapalli, P. Jain, and S. Sanghavi, “Phase retrieval using alternating minimization,” IEEE Trans. Signal Process. vol. 63, no. 18, pp. 4814-4826, Jun. 2015. [21] E. J. Candes, T. Strohmer, and V. Voroninski, “Phaselift: Exact and stable signal recovery from magnitude measurements via convex programming,” Commun. Pure and App. Math. vol. 66, no. 8, pp. 1241-1274, Aug. 2013. [22] E. J. Candes, Y. C. Eldar, T. Strohmer, and V. Voroninski, “Phase retrieval via matrix completion,” SIAM J. Imaging Sci. vol. 57, no. 2, pp. 225251, 2015. [23] L. H. Yeh, J. Dong, J. Zhong, L. Tian, M. Chen, G. Tang, M. Soltanolkotabi, and L. Waller, “Experimental robustness of Fourier ptychography phase retrieval algorithms,” Opt. Expr. vol. 23, no. 26, pp. 33214-33240, Dec. 2015. [24] J. W. Demmel, Applied Numerical Linear Algebra (Siam, 1997). [25] Y. Nesterov, Introductory Lectures on Convex Optimization, (Kluwer Academic Publishers, 2004). [26] A. Beck and M. Teboulle, “A fast iterative shrinkage-thresholding algorithm for linear inverse problems,” SIAM J. Imaging Sci. vol. 2, no. 1, pp. 183–202, 2009. [27] W. Williams, “Multiplying matrices faster than Coppersmith-Winograd,” in Proceedings of ACM Symposium on Theory of Computing 2012, pp. 887898. [28] S. O. Arık, K. P. Ho, J. M. Kahn, “Group delay management and multiinput multi-output signal processing in mode-division multiplexing systems," J. Lightw. Techn. vol. 34, no. 11, pp. 2867-2880, Jun. 2016. [29] D. A. B. Miller, “Self-aligning universal beam coupler,” Opt. Expr. vol 21, no. 5, pp. 6360-6370, Mar. 2013. [30] M. Grant and S. Boyd, "CVX: Matlab Software for Disciplined Convex Programming," [Online]. Available: http://cvxr.com/cvx. [31] K. Choutagunta and J. M. Kahn, “Dynamic Channel Modeling for ModeDivision Multiplexing", J. Lightw. Techn. vol. 35, no. 12, pp. 2451-2463, Jun. 2017.
7cs.IT
Compositional Construction of Finite State Abstractions for Stochastic Control Systems arXiv:1709.09546v1 [cs.SY] 27 Sep 2017 Kaushik Mallik, Sadegh Esmaeil Zadeh Soudjani, Anne-Kathrin Schmuck and Rupak Majumdar Abstract— Controller synthesis techniques for continuous systems with respect to temporal logic specifications typically use a finite-state symbolic abstraction of the system. Constructing this abstraction for the entire system is computationally expensive, and does not exploit natural decompositions of many systems into interacting components. We have recently introduced a new relation, called (approximate) disturbance bisimulation for compositional symbolic abstraction to help scale controller synthesis for temporal logic to larger systems. In this paper, we extend the results to stochastic control systems modeled by stochastic differential equations. Given any stochastic control system satisfying a stochastic version of the incremental input-to-state stability property and a positive error bound, we show how to construct a finite-state transition system (if there exists one) which is disturbance bisimilar to the given stochastic control system. Given a network of stochastic control systems, we give conditions on the simultaneous existence of disturbance bisimilar abstractions to every component allowing for compositional abstraction of the network system. I. I NTRODUCTION In abstraction-based controller synthesis, a finite-state symbolic model of a continuous system is used to synthesize a symbolic controller for a logical specification, and the controller is then refined to a controller for the original system. This technique has recently gained a lot of attention due to two main advantages. First, it allows for fully automated controller synthesis for systems with continuous dynamics while handling complex specifications (given e.g. as ω-regular languages) in addition to stability. Second, it naturally accounts for the complex interplay between discrete and continuous components within a control loop. The soundness of the abstraction-based synthesis technique relies on notions of behavioral closeness of the original system and its abstraction, which is formalized using system equivalence relations (see e.g. [11], [8] and the references therein). Recently, abstraction-based controller synthesis has been extended to stochastic control systems [12], [2]. In the stochastic setting, behavioral closeness of the original system and its abstraction is formalized using the n-th moment of the trajectories. Despite its nice theoretical properties and applicability to many different system classes, abstraction based controller synthesis does not scale very well because both the abstraction step and the controller synthesis step are exponential in the dimension of the continuous state space. This issue motivated us to propose disturbance bisimulation [5], an equivalence relation that exploits the intrinsic compositionality of systems. Given a network of metric systems All authors are with MPI-SWS, Kaiserslautern, Germany {kmallik, sadegh, akschmuck, rupak}@mpi-sws.org and their equivalently interconnected disturbance bisimilar abstractions, the main result of [5] shows that the overall network system is also disturbance bisimilar to the network of the abstractions. This result has an interesting consequence: given a construction of a disturbance bisimilar abstraction for a given system class, we can compositionally abstract a network of systems from this class whenever all local abstractions are guaranteed to exist simultaneously. In [5] we exploited this fact for large networks of incremental input-tostate stable deterministic control systems and demonstrated the effectiveness of our approach in a case study. In this paper, we extend these results to the class of stochastic control systems which satisfy a stochastic version of the incremental input-to-state stability condition. Our main contribution in this paper is to show how a stochastic control system, which may be connected to other components within a network, allows for the algorithmic computation of (1) a metric system capturing its time-sampled dynamics and (2) a metric system capturing its abstract symbolic dynamics, such that the two constructed systems are disturbance bisimilar. This construction allows us to use the results from [5] to provide a compositional abstraction-based controller synthesis technique for a given network of continuous and stochastic dynamical systems. Our results relate to recent results in [13] on compositional abstraction for stochastic systems. The main difference between our work and [13] is the type of abstraction: while we work with finite state symbolic abstractions, their abstractions are infinite state. There have been some efforts for improving scalability of abstraction techniques for stochastic systems in a different setting, where abstract models are Markov chains and the goal is to match distributions on states up to a fixed horizon. In [9], the state space discretization is done adaptively and, in [10], the abstract state space of a monolithic system is represented compositionally. The paper is organized as follows. After introducing preliminaries on stochastic control systems in Sec. II, we define metric systems in Sec. III, and present how the two particular metric systems discussed above can be obtained from a stochastic control system. Given these two metric systems, we give sufficient conditions for them to be disturbance bisimilar in Sec. IV, after recalling the notion of disturbance bisimulation from [5]. In Sec. V, we invoke results from [5] to extend our result from a single stochastic control system to a network of such systems. All proofs can be found in the appendix. II. S TOCHASTSIC C ONTROL S YSTEMS Most part of this section is adapted from [12] to systems with stochastic disturbance inputs. A. Notation We use the symbols N, R, R>0 , R≥0 and Z to denote the set of natural, real, positive real, non-negative real numbers, and integers, respectively. The symbols In , 0n , and 0n×m denote the identity matrix, the zero vector, and the zero matrix in Rn×n , Rn , and Rn×m , respectively. Given a vector x ∈ Rn , we denote by xi the i-th element of x and by k x k the infinity norm of x. A continuous function γ : R≥0 → R≥0 is said to belong to class K if it is strictly increasing and γ(0) = 0; γ is said to belong to class K∞ if γ ∈ K and limr→∞ γ(r) = ∞. A continuous function β : R≥0 × R≥0 → R≥0 is said to belong to class KL if, for each fixed s, the function β(·, s) : R≥0 → R≥0 belongs to class K∞ and, for each fixed r, the map β(r, ·) : R≥0 → R≥0 is decreasing and lims→∞ β(r, s) = 0. Let f : R≥0 → Rk be a measurable function. We define the (essential) supremum k f k of f as k f k := ess(sup){k f (t) k | t ≥ 0}. A function f is bounded if k f k < ∞. Given a square matrix M , we denote by T r(M ) the trace of M , and by λmin (M ) and λmax (M ) the minimum and maximum eigenvalue of M respectively. Given a matrix M = {mij } ∈ Rn×m , we Pm denote by k M k := max1≤i≤n j=1 |mij | the infinity norm p of M , and by kM kF := Tr (M M T ) the Frobenius norm of M . We denote by Diag(a1 , . . . , an ) the diagonal matrix with diagonal entries a1 , . . . , an ∈ R. If a1 , . . . , an are matrices, then Diag(a1 , . . . , an ) is a block diagonal matrix of appropriate dimension. B. Stochastic Control System We fix the probability space for the whole paper as (Ω, F , P), where Ω is a sample space, F is a sigma algebra over Ω representing the set of events, and P is a probability measure. Let (Ω, F , P) admits a filtration F = (Fs )s≥0 which is complete and right continuous [4, p. 89]. Let (Bs )s≥0 be a r-dimensional F-Brownian motion. Definition 2.1: A stochastic control system is a tuple Σ = (X, U, U, W, W, f, σ), where X = Rn is the state space, U ⊆ Rm is the input set that is assumed to be compact, U is a subset of set of all measurable, locally essentially bounded functions of time from R≥0 to U , W ⊆ Rp is the disturbance input space that is assumed to be compact, W is a set of stochastic processes with elements ν : Ω × R≥0 → W , f : X × U × W → X is a continuous function of its arguments representing the drift of Σ, σ : X → Rn×r is a function representing the diffusion of Σ. A stochastic process ξ : Ω × R≥0 → X is called a solution process of Σ if there exists µ ∈ U and ν ∈ W satisfying the following stochastic differential equation: process of Σ from the initial condition ξaµν (0) = a P-a.s., and under effect of input signal µ ∈ U and disturbance signal ν ∈ W. Note that given any time instant t, ξaµν (t) represents a random variable from Ω to X measurable in Ft . We make the following two assumptions on stochastic control systems to ensure a unique global continuous solution. Assumption 1 (Lipschitz condition): There exist constants Lf , Lσ ∈ R≥0 such that the following inequalities hold kf (x, u, w)−f (x′ , u′ , w′ )k ≤ Lf (kx−x′ k+ku−u′k+kw− w′ k), and kσ(x) − σ(x′ )k ≤ Lσ kx − x′ k, for all x, x′ ∈ X, u, u′ ∈ U and w, w′ ∈ W . Assumption 2 (Linear growth): There exists a positive constant K such that for all x ∈ X, u, ∈ U and w ∈ W ,  max(kf (x, u, w)k2 , kσ(x)k2 ) ≤ K 1 + kxk2 . (II.2) Assump. 1 on Lipschitz continuity gives uniqueness and Assump. 2 on linear growth gives global existence ([7, Thm. 5.2.1]). The latter will also be used in Sec. V-B (cf. Prop. 5.3) to provide an upper bound on the second moment of the solution process. In this paper the disturbances in the set W are allowed to be stochastic. This is necessary because, as will be described later, in our setting the disturbances play the role of trajectories of other stochastic control systems after interconnection. For the results of this paper to hold, we require the process (ξ, ν) : Ω × R≥0 → X × W to be an Itô process, i.e., (ξ, ν) has to be the solution of a possibly time-inhomogeneous Itô diffusion. C. δ-ISS-Mq We now generalize the notion of incremental input-tostate stability in the q-the moment (δ-ISS-Mq ) for stochastic control systems from [12] by considering disturbances. In the absence of noise, these notions correspond to δ-ISS for deterministic systems [1]. Definition 2.2: A stochastic control system Σ = (X, U, U, W, W, f, σ) is stochastically incrementally inputto-state stable in the q-th moment (δ-ISS-Mq ), if there exists a KL function β and K∞ functions ρu and ρd such that for any t ∈ R≥0 , any µ, µ′ ∈ U, any ν, ν ′ ∈ W, and any Rn -valued random variables a and a′ that are measurable in F0 , the following condition is satisfied: (II.1)  q  q E [kξaµν (t) − ξa′ µ′ ν ′ (t)k ] ≤ β E ka − a′ k , t  q  + ρu (k µ − µ′ k) + ρd E k ν − ν ′ k . (II.3) The δ-ISS-Mq property can be characterized in terms of the existence of stochastic incremental Lyapnuov functions. Definition 2.3: [12, Def. 3.2] Define the diagonal set ∆ as ∆ = {(x, x) | x ∈ Rn }. Consider a stochastic control system Σ = (X, U, U, W, W, f, σ) and a continuous function V : X × X → R≥0 which is smooth on {Rn × Rn }\∆. Function V is called a δ-ISS-Mq Lyapunov function for Σ if there exist K∞ functions α, α, σu , σd , and a constant κ ∈ R>0 such that P-almost surely (P-a.s.). For succinctness of representation, we use the notation ξaµν to denote a stochastic solution (i) α is a convex function, and α and σd are concave functions; d ξ(t) = f (ξ(t), µ(t), ν(t)) d t + σ(ξ(t)) d Bt , (ii) for any x, x′ ∈ X, α(kx − x′ kq ) ≤ V (x, x′ ) ≤ α(kx − x′ kq ); (iii) for any x, x′ ∈ X, x 6= x′ , any u, u′ ∈ U , and any w,w′ ∈ W ,   ′ ′ f (x, u, w) Lu,u ,w,w V (x, x′ ) := [∂x V ∂x′ V ] f (x′ , u′ , w′ )      ∂x,x V ∂x,x′ V 1 σ(x)  T T ′ σ (x) σ (x ) + Tr σ(x′ ) ∂x′ ,x V ∂x′ ,x′ V 2 ′ ′ ≤ −κV (x, x ) + σu (k u − u k) + σd (k w − w′ kq ), ′ ′ where Lu,u ,w,w is the infinitesimal generator ([7, Section 7.3]) associated to the stochastic control system (II.1), which depends on two separate controls u, u′ ∈ U and two separate disturbances w, w′ ∈ W . In this case we say that the stochastic control system Σ admits a δ-ISS-Mq Lyapunov function, witnessed by α, α, σu , σd , and κ ∈ R>0 . Note that condition (i) is not required in the context of deterministic control systems. Condition (ii) implies that the growth rates of the functions α and α are linear, as a concave function is supposed to dominate a convex one. These conditions are not restrictive provided we are interested in the dynamics of Σ on a compact subset D ⊂ Rn , which is often the case in practice. It can be readily verified that the δ-ISS-Mq Lyapunov function in Definition 2.3 is a stochastic bisimulation function between Σ and itself, as defined in [3], Def. 5. The following theorem describes δ-ISS-Mq in terms of the existence of δ-ISS-Mq Lyapunov functions. It generalizes the corresponding theorem [12, Thm. 3.3] in the presence of disturbances. Theorem 2.4: A stochastic control system Σ is δ-ISS-Mq if it admits a δ-ISS-Mq Lyapunov function. In order to keep the notation simple, we present the results only for second moment in the rest of paper with the understanding that they can be generalized for other moments. The following lemma (compare [12, Lemma 3.4]) provides a sufficient condition on a particular function V to be a δISS-Mq Lyapunov function. Lemma 2.5: Let Σ = (X, U, U, W, W, f, σ) be a stochastic control system. Let P ∈ Rn×n be a symmetric positive definite matrix. Consider the function V : Rn × Rn → R≥0 defined as: V (x, x′ ) := 1 (x − x′ )T P (x − x′ ) 2 (II.4) and satisfying (x − x′ )T P (f (x, u, w) − f (x′ , u, w))+ (II.5) 2 1 √ P (σ(x) − σ(x′ )) ≤ −2e κV (x, x′ ), + 2 F or, if f is differentiable, satisfying (x − x′ )T P ∂x f (z, u, w)(x − x′ )+ 1 √ + P (σ(x) − σ(x′ )) 2 (II.6) 2 F ≤ −2e κV (x, x′ ), for all x, x′ , z ∈ X, for all u ∈ U , for all w ∈ W , and for some constant κ e ∈ R>0 . Then V is a δ-ISS-M2 Lyapunov function for Σ. D. Noisy and Noise Free Trajectories In this section we provide an upper bound on the distance between a stochastic state trajectory and its associated noisefree trajectory at any instant of time. This bound is a generalization of the bound in [12, Lemma 3.10] to the case when there is disturbance in the system. The bound will be instrumental in proving closeness between the trajectories of a stochastic control system and its abstraction in Sec. III. Lemma 2.6: Consider a stochastic control system Σ = (X, U, U, W, W, f, σ). Suppose there exists a δ-ISS-M2 Lyapunov function V of Σ s.t. its Hessian matrix in R2n×2n satisfies 0 ≤ ∂x,x V (x, x′ ) ≤ P , for some positive semidefinite matrix P ∈ R2n×2n and for any x, x′ ∈ Rn . Define ξ xµν as the solution of the ordinary differential equation (ODE)  ξ˙ xµν (t) = f ξ xµν (t), µ(t), ν(t) (II.7) starting from the initial condition x. Then for any x in a compact set D ⊂ Rn , any µ ∈ U and any ν ∈ W, we have i h 2 ≤ h(σ, t), E ξxµν (t) − ξ xµν (t) where 1 √ h(σ, t) := α−1 k P k2 · n · min{n, r} · e−κt · L2σ · 2 Z t   β supx∈D k x k2 , s + ρu (supu∈U k u k) · 0   +ρd supw∈W k w k2 ds . (II.8) The non-negative valued function h tends to zero as t → 0, t → ∞, or as Lσ → 0, where Lσ is the Lipschitz constant introduced in Assump. 1. Remark 2.7: Eqn. (II.8) gives a representation of the function h in terms of ρu and ρd . This representation of h can be translated into a form using σu and σd instead, as shown in [12, Lemma 3.10, Cor. 3.11]. III. F ROM S TOCHASTIC C ONTROL S YSTEMS S YSTEMS TO M ETRIC We now introduce (deterministic) metric systems and interpret stochastic control systems and their abstractions as metric systems. As in [12], [5], we consider metric systems that are time sampled w.r.t. a globally fixed time sampling parameter τ ∈ R>0 . Definition 3.1: Given the probability space Ω and a time sampling parameter τ ∈ R>0 , a stochastic metric system1 S = (X, U, Uτ , W, Wτ , δτ ) consists of a (possibly infinite) set of states X, given by a set of random variables, and equipped with a metric d : X×X → R≥0 , a set of piece-wise 1 Often, metric systems are defined with an additional output space and an output map from states to the output space. We omit the output space for notational simplicity; for us, the state and the output space coincide, and the output map is the identity function. constant inputs Uτ of duration τ taking values in U ⊆ Rm , i.e., Uτ = {µ : [0, τ ] → U | ∀t1 , t2 ∈ [0, τ ] . µ(t1 ) = µ(t2 )}, (III.1) a set of disturbances Wτ taking values in W ⊆ Rp , i.e., Wτ ⊆ {ν : Ω × [0, τ ] → W }, (III.2) and a transition function δτ : X × Uτ × Wτ → 2X . We write µ,ν x −−→ x′ if x′ ∈ δτ (x, µ, ν), and we denote the unique value τ of µ ∈ U over [0, τ ] by uµ ∈ U . A deterministic metric system is a special type of a stochastic metric system where the states are deterministic points (i.e. random variables with Dirac delta distributions), and disturbances are deterministic signals of the form [0, τ ] → W . If the metric system S is undisturbed, we define W = {0}. In this case we occasionally represent S by the tuple S = (X, U, Uτ , δτ ) and use δτ : X × Uτ → 2X with the understanding that x′ ∈ δτ (x, µ, ν) holds for the zero trajectory ν : R≥0 → {0} whenever x′ ∈ δτ (x, µ). By slightly abusing notation we write x′ = δτ (x, µ, ν) as a short form when the set δτ (x, µ, ν) = {x′ } is a singleton. If X, Uτ and Wτ are finite (resp. countable), S is called finite (resp. countable). We also assign to a transition x′ = δτ (x, µ, ν) any continuous time evolution ξ : [0, τ ] → X s.t. ξ(0) = x and ξ(τ ) = x′ . In the following we introduce two approaches to capture an abstracted version of the dynamics of a stochastic control systems Σ by a metric system conforming to Def. 3.1. The first approach results in a sampled time abstraction which we denote by Pτ (Σ). Definition 3.2: Given a stochastic control system Σ = (X, U, U, W, W, f, σ), a time-sampling parameter τ ∈ R>0 , and a probability space (Ω, F , P), the discrete-time stochastic metric system induced by Σ is defined by Pτ (Σ) = (Xr , U, Uτ , W, Wτ , δτ ) s.t. Xr is the set of all X-valued random variables, Uτ and Wτ are defined over U and W , respectively, as in Eqn. (III.1)-(III.2) and δτ (x, µ, ν) = x′ if x and x′ are measurable in Ft and Ft+τ , respectively, for some t ∈ R≥0 , and there exists a solution process ξ : Ω × R≥0 → Rn of Σ satisfying ξ(0) = x and ξxµν (τ ) = x′ P-a.s. Since we allow any state to be initial, all states in X need to be measurable on F0 . We equip Xr with the metric 1/2 d(x, x′ ) := E[k x − x′ k2 ] . Remark 3.3: Recall that the disturbances in the set W are stochastic. Hence the above metric system must be constructed by looking at the sampled version of (ξ, ν), which is the solution process of the Itô diffusion associated with (x, w). The second approach additionally imposes a quantization of the state, input and disturbance spaces and results in a metric system denoted by Pτ ηω (Σ). Before defining this system formally we introduce notation for quantization. For any A ⊆ Rn and any vector η with elements ηi > 0, we define [A]η := {(a1 , . . . , an ) ∈ A | ai = 2kηi , k ∈ Z, i = 1, . . . , n}. For x ∈ Rn and vector λ with elements λi > 0, let Bλ (x) = {x′ ∈ Rn | k xi − x′i k ≤ λi } denote the closed rectangle centered at x. Note that for any λ ≥ η (elementwise), the collection of sets Bλ (q) with q ∈ [Rn ]η is a cover of Rn , that is, Rn ⊆ ∪{Bλ (q) | q ∈ [Rn ]η }. We will use this insight to discretize the state and the input space of Σ using discretization parameters η and ω, respectively. Also we need to define a vector-valued metric for comparing two disturbance vectors. Let A1 , . . . , Ak be a finite set of metric spaces, where each AiQ , i = 1, . . . , k has a metric k di : Ai × Ai → R≥0 . Let A = i=1 Ai . We construct the k metric e : A × A → R≥0 as an extension of the metrics di on Ai : for any a = (a1 , . . . , ak ) and a′ = (a′1 , . . . , a′k ), we define e(a, a′ ) := (d1 (a1 , a′1 ), . . . , dk (ak , a′k )). (III.3) For the disturbance space W we allow the discretization of W to be predefined. We make the following general assumptions on the discretizaion of W which will be useful when we deal with networks of stochastic control systems in Sec. V. Assumption 3: Let Σ = (X, U, U, W, W, f, σ) be a stochastic control system. Then we assume that there exists f ⊆ W , that exists a vector ε̃ ∈ Rp , and a a countable set W ≥0 vector-valued metric e : W × W → Rp≥0 , s.t. for all w ∈ W f for which there exists a w̃ ∈ W e(w, w̃) ≤ ε̃ and k w − w̃ k ≤ k e(w, w̃) k. (III.4) Using this assumption we formally define the abstract metric system Pτ ηω (Σ) induced by Σ as follows. Definition 3.4: Let Σ = (X, U, U, W, W, f, σ) be a stochastic control system for which Assump. 3 holds. Given three constants τ ∈ R>0 , η ∈ R>0 , and ω ∈ R>0 , the discrete-time discrete-space deterministic metric system induced by Σ is defined by f , Wτ ηω , δτ ηω ) Pτ ηω (Σ) = (Xτ ηω , [U ]ω , Uτ ηω , W (III.5) s.t. Xτ ηω = [X]η , Uτ ηω is defined over [U ]ω , as in (III.1), f | ∀t, k ∈ [0, τ ] . ν(t) = ν(k)}, Wτ ηω := {ν : [0, τ ] → W and δτ ηω (x, µ, ν) = {x′ ∈ Xτ ηω | k ξ xµν (τ ) − x′ k ≤ η}, where ξ xµν (·) are the noise free trajectories of Σ defined via Eqn. (II.7). We equip Xτ ηω with the metric d(x, x′ ) := k x − x′ k naturally inherited from X. We denote f. the unique value of ν ∈ Wτ ηω over [0, τ ] by wν ∈ W Remark 3.5: Let us emphasize that even though Pτ (Σ) is a stochastic metric system and Pτ ηω (Σ) is a deterministic metric system, since we are interested in studying the closeness of their trajectories in the next section, it is important that Xr and Xτ ηω are part of the same state space. We interpret Xτ ηω to be contained in Xr , since a set of points can be associated with a set of random variables with Dirac delta distributions. IV. D ISTURBANCE B ISIMULATION This section contains the main contribution of the paper; after recalling the notion of disturbance bisimulation from [5] we present sufficient conditions under which the two metric systems Pτ ηω (Σ) and Pτ (Σ) associated with a stochastic control system Σ are disturbance bisimilar. For this analysis, we restrict our attention to δ-ISS-M2 stochastic control systems with f (0n , 0m , 0p ) = 0n and σ(0n ) = 0n×r , whose evolution is restricted to a compact region D ⊂ Rn . Definition 4.1: Let Si = (Xi , Ui , Uτ,i , Wi , Wτ,i , δτ,i ), i = 1, 2, be two metric systems, with state-spaces X1 , X2 ⊆ X and disturbance sets W1 , W2 ⊆ W ⊆ Rp . Furthermore, let X admit the metric d : X × X → R≥0 and W admit the vector-valued metric e : W × W → Rp≥0 . A binary relation R ⊆ X1 × X2 is a disturbance bisimulation with parameters (ε, ε̃) where ε ∈ R≥0 and ε̃ ∈ Rp≥0 , iff for each (x1 , x2 ) ∈ R: (a) d(x1 , x2 ) ≤ ε; (b) for every µ1 ∈ Uτ,1 there exists a µ2 ∈ Uτ,2 such that for all ν2 ∈ Wτ,2 and ν1 ∈ Wτ,1 with e(ν1 (0), ν2 (0)) ≤ ε̃, we have that (δτ,1 (x1 , µ1 , ν1 ), δτ,2 (x2 , µ2 , ν2 )) ∈ R; and (c) for every µ2 ∈ Uτ,2 there exists a µ1 ∈ Uτ,1 such that for all ν1 ∈ Wτ,1 and ν2 ∈ Wτ,2 with e(ν1 (0), ν2 (0)) ≤ ε̃, we have that (δτ,1 (x1 , µ1 , ν1 ), δτ,2 (x2 , µ2 , ν2 )) ∈ R. S1 and S2 are said to be disturbance bisimilar with parameters (ε, ε̃) if there is a disturbance bisimulation relation R between S1 and S2 with parameters (ε, ε̃). In order to prove the existence of a disturbance bisimulation between Pτ ηω (Σ) and Pτ (Σ) we require two additional assumptions. Assumption 4: Let Σ be a stochastic control system admitting a δ-ISS-M2 Lyapunov function V . There exists a K∞ and concave function γ b s.t. for any x, x′ , x′′ ∈ X, |V (x, x′ ) − V (x, x′′ )| ≤ b γ (k x′ − x′′ k). (IV.1) This assumption is not restrictive as we are interested in the dynamics of Σ on a compact subset D ⊂ Rn . Assumption 5: Let Σ be a stochastic control system with the associated metric systems Pτ (Σ) and Pτ ηω (Σ) introduced in Sec. III. Then there exists a K∞ function ψ s.t. for all disturbance pairs ν ∈ Wτ and ν̂ ∈ Wτ ηω with d(ν(0), ν̂(0)) ≤ k ε̃ k, the following holds for all t ∈ [0, τ ]: d(ν(t), ν̂(t)) = E[k ν̂(t) − ν(t) k2 ]  21 ≤ ψ(t) + k ε̃ k. (IV.2) Given Assump. 4 and Assump. 5, we present our first main result in the following theorem. Theorem 4.2: Let Σ be a stochastic control system admitting a δ-ISS-M2 Lyapunov function V witnessed by κ, α, α, σu , and σd , that satisfies Assump. 4 with K∞ function γ b. f ⊆ W s.t. (III.4) holds and let Pτ ηω (Σ) be Fix τ > 0 and W the countable deterministic metric system associated wih Σ according to Def. 3.4 such that Assump. 5 holds. If n  b−1 (1 − e−κτ )α(ε2 ) 0 ≤ η ≤ min (α)−1 ◦ α(ε2 ), γ o  1 1 1 − σu (ω) − σd (ψ(τ ) + k ε̃ k) − (h(σ, τ )) 2 , eκ eκ (IV.3) where h(σ, τ ) is as in (II.8), then the relation  Rε ε̃ = (x̂, x) ∈ Xτ ηω × Xr | E[V (x̂, x)] ≤ α(ε2 ) (IV.4) is a disturbance bisimulation relation (in the second moment) with parameters (ε, ε̃) between Pτ ηω (Σ) and Pτ (Σ). Remark 4.3: Given any fixed τ and ε̃, one can always find sufficiently small η and ω s.t. (IV.3) and (IV.4) hold, as long as ε is lower bounded according to    1 1 2 σ (ψ(τ ) + k ε̃ k) + γ b h(σ, τ ) eκ d  . (IV.5) ε2 > α−1  (1 − e−κτ ) The lower bound on ε can be minimized by choosing an optimal Lyapunov function V for a given system Σ (see e.g. [12, Rem. 3.6]). Note that, when the system does not experience any disturbance, (IV.5) reduces to [12, V.5]. V. C OMPOSITIONAL A BSTRACTION Let us first summarize what we have presented so far. In Sec. III we have introduced two different metric systems Pτ (Σ) and Pτ ηω (Σ) associated with a given stochastic control system Σ. Recall that Pτ (Σ) is an infinite state system, whereas Pτ ηω (Σ) is a finite state system under the assumption that the state space of Pτ ηω (Σ) is restricted to a compact subset of Rn . Then we gave sufficient conditions for these two abstractions to be disturbance bisimilar in Sec. IV. In this section, we consider a network of stochastic control systems {Σi }i∈I , and the respective local abstractions {Pτ (Σi )}i∈I and {Pτ ηi ωi (Σi )}i∈I of {Σi }i∈I , s.t. for all i ∈ I, Pτ (Σi ) and Pτ ηi ωi (Σi ) are disturbance bisimilar with parameters (εi , ε̃i ). Then we adapt our result from [5], and prove that the isomorphic networks of {Pτ (Σi )}i∈I and {Pτ ηi ωi (Σi )}i∈I , which are isomorphic to the network of {Σi }i∈I as well, are again disturbance bisimilar. A. Network of Stochastic Control Systems We first formalize networks of stochastic control systems and their abstractions by locally treating state trajectories of neighboring systems as disturbances. Let I be an index set (e.g., I = {1, . . . , N } for some natural number N ) and let I ⊆ I × I be a binary irreflexive connectivity relation on I. Furthermore, let I ′ ⊆ I be a subset of systems with I ′ := (I ′ ×I ′ )∩I. For i ∈ I we define NI (i) = {j | (j, i) ∈ I} and extend this notion to subsets of systems I ′ ⊆ I as NI (I ′ ) = {j | ∃i ∈ I ′ .j ∈ NI\I ′ (i)}. Intuitively, a set of systems can be imagined to be the set of vertices {1, 2, . . . , |I|} of a directed graph G, and I to be the corresponding adjacency relation. Given any vertex i of G, the set of incoming (resp. outgoing) edges are the inputs (resp. outputs) of a subsystem i, and NI (i) is the set of neighboring vertices from which the incoming edges originate. Let Σi = (Xi , Ui , Ui , Wi , Wi , fi , σi ), for i ∈ I, be a collection of stochastic control systems. We say that the set of stochastic control systems {Σi }i∈I is compatible for composition w.r.t. the interconnection relation I, if for each Q i ∈ I, we have Wi = Qj∈NI (i) Xj . By slightly abusing notation we write wi = j∈NI (i) {xj } for xj ∈ Xj and wi ∈ Wi as a short form for the single element of the set Q j∈NI (i) {xj }. We extend this notation to all sets with a single element. Let I ′ ⊂ I be a subset of systems in the network. We divide the set of disturbances Wi for any i ∈ I ′ into the c sets of coupling and external Q disturbances, defined by Wi = Q e j∈NI\I ′ (i) Xj , respectively. j∈NI ′ (i) Xj and Wi = If {Σi }i∈I is compatible, we define the composition of any subset I ′ ⊆ I of systems as the stochastic control system JΣi Ki∈I ′ = (X, U, U, Q X, U and Q W, W, f, σ) where W are Q defined as X = i∈I ′ Ui , and i∈I ′ Xi , U = W = j∈NI (I ′ ) Xj . Furthermore, U and W are defined as the sets of functions µ : R≥0 → U and ν : Ω × R≥0 → W such that the projection µi of µ on to Ui (written µi = µ|Ui ) belongs to Ui , and the projection νie e drift is to W of ν on to Wie belongs Q Qi . The composed Q e {w {u }, {x }, then defined as f ( i Q i∈I ′ i i }) = i∈I ′ i∈I ′ Q c e c {f (x , u , w × w )}, where w = i i i i i i j∈NI ′ (i) {xj }, i∈I ′ Q and the composed diffusion is defined as σ( i∈I ′ {xi }) = Diag σ1 (x1 ), . . . , σ|I| (x|I| ) . The Brownian motion of the  T overall system is defined as: dBt = dB1,t . . . dB|I|,t . If I ′ = I, then Σ is undisturbed, modeled by W := {0}. It is easy to see that JΣi Ki∈I ′ is again a stochastic control system in the sense of Def. 2.1. Networks of discrete time stochastic metric systems (Pτ (Σi )) and of abstract metric systems (Pτ ηi ωi (Σi )) are defined analogously. Remark 5.1: Note that we assume a nice structure of the network: the diffusion functions and the Brownian motions of the systems in a network are decoupled from the states of the other systems. This is explicitly induced via the SDE (II.1) as the diffusion terms σi (·) are only functions of system’s state and not the disturbance. However since the states of the systems are coupled through the drift functions, the respective random variables are implicitly dependent. B. Simultaneous Approximation Given I and I ′ ⊆ I, consider a set of compatible stochastic control systems {Σi }i∈I , the subset composition JΣi Ki∈I ′ = (X, U, U, W, W, f, σ) and a global time-sampling parameter τ . Then we can apply Def. 3.2 and Def. 3.4 to each Σi to construct the corresponding metric systems Pτ (Σi ) and Pτ ηi ωi (Σi ). To be able to do that, we need to equip Wi |N (i)| with a vector-valued metric ei : Wi × Wi → R≥0I fi for all i ∈ I s.t. Ass. 3 holds. Intuitively, and define W ei (wi , wi′ ) is a vector with dimension |NI (i)|, where the j th entry measures the mismatch of the respective state vector fi as the product of state of the j th neighbor of i. We define W spaces of Pτ ηj ωj (Σj ), i.e., the abstraction of its neighbors, Q fi := W (V.1) j∈NI (i) [Xj ]ηj . Lemma 5.2: Let Σi = (Xi , Ui , Ui , Wi , Wi , fi , σi ),i ∈ I, be a set of compatible stochastic control systems and the set of abstract metric systems Pτ ηi ωi (Σi ) = fi , Wi,τ ηi ωi , δi,τ ηi ωi ) are ([Xi ]ηi , [U ]ωi , Ui,τ ηi ωi , W constructed according to Def. 3.4, where Wi is equipped fi as defined in (V.1). Select local with metric (III.3) and W quantization parameters {ηi }i∈I s.t. ηi ≤ εi . Then Ass. 3 holds for every i ∈ I with ε̃i defined as Q ε̃i := j∈NI (i) {εj }. (V.2) Given Lemma 5.2, it immediately follows that the sets {Pτ (Σi )}i∈I ′ and {Pτ ηi ωi (Σi )}i∈I ′ of metric systems are again compatible. In order to guarantee the result of Thm. 4.2 for the network, we have additionally used Assump. 5 which essentially bounds the effect of the disturbances on the state evolution. Given the particular choice of disturbances in the network as state trajectories of neighboring systems, we can explicitly compute function ψ(t) in Assump. 5 using the following proposition from [6, Thm. 4.3]. Proposition 5.3: Under Assump. 2 the solution process ξaµν (·) satisfies the inequality   E kξaµν (t) − ξaµν (s)k22 ≤ C|t − s|, ∀s, t ∈ [0, τ ], for any τ > 0, where k · k2 indicates of a vector.  the 2-norm ατ 2 (τ + 1)e with α := The constant C := 2 1 + Ekak 2 √ K + 2 K and K from Assump. 2. The next lemma follows from Prop. 5.3. Lemma 5.4: Given a set of stochastic control systems {Σi }i∈I which is compatible for composition, let each system Σi satisfy Assump. 2 with constant Ki in (II.2). Then Assump. 5 holds for each Σi with K∞ function i 12 h P ψi (t) := t(t + 1) j∈NI (i) βj eαj t , p where αj := = Kj + 2 Kj and βj  2 1 + supxj ∈Xj kxj k22 . Lemmas 5.2-5.4 show that the assumptions of Sec. IV on disturbance sets of Σi hold after composition. Then the next theorem follows from Thm. 4.2 which establishes simultaneous disturbance bisimilarity between abstractions of components in a network. In this theorem, using the results in Thm. 4.2, we give conditions on all local state, input, and disturbance quantization parameters in a composed stochastic control system JΣi Ki∈I which allow for a simultaneous construction of local abstractions Pτ ηi ωi (Σi ) using Def. 3.4 such that they are disturbance bisimilar with parameters (εi , ε̃i ) to their respective discrete-time stochastic metric systems Pτ (Σi ). Theorem 5.5: Let {Σi }i∈I be a set of compatible stochastic control systems, each admitting a δ-ISS-M2 Lyapunov function Vi witnessed by κi , αi , αi , σu,i , and σd,i , and let γ bi be a K∞ function s.t. (IV.1) holds. Let {Pτ (Σi )}i∈I be the set of discrete-time stochastic metric systems induced by {Σi }i∈I and let {Pτ ηi ωi (Σi )}i∈I be the set of countable fi as deterministic metric systems induced by {Σi }i∈I and W in (V.1). If all local quantization parameters {ηi , εi , ωi }i∈I simultaneously fulfill ηi ≤ εi and n  bi−1 (1 − e−κi τ )αi (ε2i ) 0 ≤ ηi ≤ min (αi )−1 ◦ αi (ε2i ), γ o  1 1 1 σu,i (ωi ) − σd,i (ψi (τ ) + k ε̃i k) − (hi (σi , τ )) 2 , − eκi eκi (V.3) in the continuous and abstract disturbances, admits a disturbance bisimilar abstract system. Then we used the property of disturbance bisimulation to show that given a network of stochastic control systems, the abstract systems can be computed compositionally. One can then use this paper’s claim for compositional synthesis of controllers for networks of stochastic control systems, as is done in [5, Sec. VII] for network of deterministic systems. with {ε̃i }i∈I defined as (V.2), then the relation  Rεi ε̃i = (x̂i , xi ) ∈ [Xi ]ηi × Xi,r | E[Vi (x̂i , xi )] ≤ αi (ε2i ) [1] D. Angeli. A Lyapunov approach to incremental stability properties. IEEE Transactions on Automatic Control, 47(3):410–21, 2002. [2] P. Jagtap and M. Zamani. Automated synthesis of infinite dimensional stochastic hybrid systems. arXiv preprint arXiv:1704.03690, 2017. [3] A. A. Julius and G. J. Pappas. Approximations of stochastic hybrid systems. IEEE Transaction on Automatic Control, 54(6):1193–1203, 2009. [4] I. Karatzas and S.E. Shreve. Brownian Motion and Stochastic Calculus, volume 113 of Graduate Texts in Mathematics. SpringerVerlag, New York, 2 edition, 1991. [5] K. Mallik, A.-K. Schmuck, S. Esmaeil Zadeh Soudjani, and R. Majumdar. Compositional abstraction-based controller synthesis for continuous-time systems. arXiv preprint arXiv:1612.08515v3, 2017. [6] X. Mao. Stochastic Differential Equations and Applications. Horwood series in mathematics & applications. Horwood Pub., 2008. [7] B. K. Oksendal. Stochastic differential equations: an introduction with applications. Springer, 5th edition, November 2002. [8] G. Reissig, A. Weber, and M. Rungger. Feedback refinement relations for the synthesis of symbolic controllers. IEEE Transactions on Automatic Control, PP(99):1–1, 2016. [9] S. Esmaeil Zadeh Soudjani and A. Abate. Adaptive and sequential gridding procedures for the abstraction and verification of stochastic processes. SIAM J. Applied Dynamical Systems, 12(2):921–956, 2013. [10] S. Esmaeil Zadeh Soudjani, A. Abate, and R. Majumdar. Dynamic Bayesian networks as formal abstractions of structured stochastic processes. In Luca Aceto and David de Frutos-Escrig, editors, 26th International Conference on Concurrency Theory, CONCUR 2015, Madrid, Spain, September 1.4, 2015, volume 42 of LIPIcs, pages 169– 183. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2015. [11] P. Tabuada. Verification and Control of Hybrid Systems, A symbolic approach. Springer, 1st edition, June 2009. [12] M. Zamani, P. M. Esfahani, R. Majumdar, A. Abate, and J. Lygeros. Symbolic control of stochastic systems via approximately bisimilar finite abstractions. IEEE Transactions on Automatic Control, 59(12):3135–3150, 2014. [13] M. Zamani, M. Rungger, and P.M. Esfahani. Construction of approximations of stochastic control systems: A compositional approach. In Decision and Control (CDC), 2015 IEEE 54th Annual Conference on, pages 525–530. IEEE, 2015. is a disturbance bisimulation relation in the second moment with parameters (εi , ε̃i ) between Pτ ηi ωi (Σi ) and Pτ (Σi ) for all i ∈ I. C. Composition of Approximations We have discussed in Sec. V-B that the sets {Pτ (Σi )}i∈I and {Pτ ηi ωi (Σi )}i∈I of metric systems is compatible. We also established conditions on local quantization parameters under which the metric systems Pτ (Σi ) and Pτ ηi ωi (Σi ) are disturbance bisimilar for any i ∈ I. We now use the fundamental property of disturbance bisimulation relation proved in [5] that disturbance bisimilarity is preserved under composition of components in a network. This property together with Thm. 5.5 result in the following theorem that explicitly gives the disturbance bisimulation relation on the composed abstractions of components in a network. Theorem 5.6: Given the preliminaries of Thm. 5.5 and I ′ ⊆ I, let JPτ (Σi )Ki∈I ′ and JPτ ηi ωi (Σi )Ki∈I ′ be systems with state spaces Xr and Xτ ηω , composed from the sets {Pτ (Σi )}i∈I and {Pτ ηi ωi (Σi )}i∈I , respectively. Then the relation T T T T T Rε ε̃ ={([q̂1T . . . q̂|I . . . q|I ′ | ] , [q1 ′ | ] ) ∈ Xτ ηω × Xr | (q̂i , qi ) ∈ Rεi ε̃i , ∀i ∈ I ′ )} (V.4) is a disturbance bisimulation relation between JPτ (Σi )Ki∈I ′ and JPτ ηi ωi (Σi )Ki∈I ′ with parameters Q Q ε = k i∈I ′ {εi } k and ε̃ = j∈NI (I ′ ) {εj }. Note that in the special case I ′ = I the composed system replaces the overall network without extra external disturbances. In this case it is easy to see that the relation in Thm. 5.6 simplifies to a usual bisimulation relation. Corollary 5.7: Given the premises of Thm. 5.6 and that I ′ = I, the relation Rε ε̃ in (V.4) is an ε-approximate bisimulation relation between JPτ (Σi )Ki∈I and JPτ ηi ωi (Σi )Ki∈I . VI. C ONCLUSION In this paper, we extended our previous result on compositional abstraction based control for non-probabilistic control systems to stochastic control systems. We gave sufficient conditions s.t. a stochastic control system, admitting a δISS-Mq Lyapunov function and subjected to small mismatch R EFERENCES A PPENDIX A. Proof of Thm. 4.2 First observe that Xτ ηω ⊂ Xτ , hence the metric d on Xτ is also a metric on Xτ ηω . Now we prove the three parts of Def. 4.1 separately. (a) By definition of Rε ε̃ in (IV.4), (x̂, x) ∈ Rε ε̃ implies 1/2  1/2 ≤ α−1 (E [V (x̂, x)]) d(x̂, x) = E k x̂ − x k2 ≤ ε. (A.1) We used the convexity assumption of α and the Jensen inequality [7] to show the inequalities in (A.1). (b) Given a pair (x̂, x) ∈ Rε ε̃ , for any µ ∈ Uτ , observe that there exists a µ̂ ∈ Uτ ηω s.t. k uµ̂ − uµ k ≤ ω holds. Given any ν̂ ∈ Wτ ηω and ν ∈ Wτ s.t. e(wν̂ , wν ) ≤ ε̃ holds, observe that k wν̂ −wν k ≤ k e(wν̂ , wν ) k ≤ k ε̃ k from (III.4). Now we can apply transitions δτ (x, µ, ν) = ξxµν (τ ) = x′ , ξx̂µ̂ν̂ (τ ) = z, ξ x̂µ̂ν̂ (τ ) = z, and observe that there exists a x̂′ ∈ Xτ ηω s.t. k x̂′ − z k ≤ η, and hence we have δτ ηω (x̂, µ̂, ν̂) = x̂′ . Now consider the following derivation:   E V (x̂′ , x′ )   = E V (z, x′ ) + V (x̂′ , x′ ) − V (z, x′ )     = E V (z, x′ ) + E V (x̂′ , x′ ) − V (z, x′ ) 1 1 σu (ω) + σd (ψi (τ ) + k ε̃ k) ≤ α(ε2 )e−κτ + eκ eκ   ′ +E γ b k x̂ − z k 1 1 2 −κτ ≤ α(ε )e + σu (ω) + σd (ψi (τ ) + k ε̃ k) eκ eκ   ′ +b γ E k x̂ − z + z − z k 1 1 2 −κτ ≤ α(ε )e + σu (ω) + σd (ψi (τ ) + k ε̃ k) eκ eκ  ′ +b γ E [k z − z k] + k x̂ − z k 1 1 2 −κτ σu (ω) + σd (ψi (τ ) + k ε̃ k) ≤ α(ε )e + eκ eκ   1 +b γ (h(σ, τ )) 2 + η (A.2) ≤ α(ε2 ). Hence by Eqn. (IV.4), (x̂′ , x′ ) ∈ Rε ε̃ . (c) Given a pair (x̂, x) ∈ Rε ε̃ , for any µ̂ ∈ Uτ ηω , observe that we can choose µ ∈ Uτ s.t. µ = µ̂, i.e., k uµ̂ − uµ k = 0. Given any ν ∈ Wτ and ν̂ ∈ Wτ ηω s.t. e(wν̂ , wν ) ≤ ε̃, we have as before δτ (x, µ, ν) = ξxµν (τ ) = x′ , ξx̂µ̂ν̂ (τ ) = z, ξ x̂µ̂ν̂ (τ ) = z, and observe that there exists a x̂′ ∈ Xτ ηω s.t. k x̂′ − z k ≤ η, and hence we have δτ ηω (x̂, µ̂, ν̂) = x̂′ . With a very similar derivation as in (A.2) it follows from Eqn. (IV.4) that (x̂′ , x′ ) ∈ Rε ε̃ . B. Proof of other statements Proof: [Lemma 2.5] The proof of Lemma 2.5 can be obtained from the proof of Lemma 3.4 in [12] by replacing all instances of f (x, u), f (z, u), f (x′ , u) and f (x′ , u′ ) with f (x, u, w), f (z, u, w) , f (x′ , u, w) and f (x′ .u′ , w′ ) respectively, and defining the positive κ = κ e, the  √ constant 2 2 2 K∞ functions σ (r) = nL /e κ k P k r and σ (r) = u d u  √ nL2w /e κ k P k2 r. Proof: [Lemma 2.6] The proof of Lemma 2.6 follows closely the proof of Lemma 3.8 in [12] and hence is omitted. Proof: [Lemma 5.2]Q Pick any i ∈ I, wi ∈ Wi and observe that wi = j∈NI (i) {xj }. By the choice of Xj,τ ηj ωj as [Xj ]ηj we furthermore know that for any xj there exists x̂j s.t. k xj − x̂j k ≤ ηj ≤ εj . Now recall Q Q fi = that W j∈NI (i) [Xj ]ηj . Using j∈NI (i) Xj,τ ηj ωj = the definition of ε̃i in (V.2) and e in (III.3) we therefore f know that forQany wi ∈ Wi there exists Q w̃i ∈ Wi s.t. k} ≤ j∈NI (i) {εj } = e(wi , w̃i ) = j∈NI (i) {k xj − x̂j Q ε̃i .QFurthermore, k wi − w̃i k = k j∈NI (i) {xj − x̂j } k = k j∈NI (i) {k xj − x̂j k} k = k e(wi , w̃i ) k. Proof: [Lemma 5.4] The proof follows from the follow- ing derivation: d(νi (t), ν̂i (t))   1 = E k νi (t) − ν̂i (t) k2 2   1 = E k νi (t) − ν̂i (0) k2 2  1  = E k νi (t) − νi (0) + νi (0) − ν̂i (0) k2 2  1   1  ≤ E k νi (t) − νi (0) k2 2 + E k νi (0) − ν̂i (0) k2 2    21 Y = E k {ξj (t) − ξj (0)} k2  + k ε̃i k j∈NI (i)   !2  12 sup k ξj (t) − ξj (0) k  + k ε̃i k = E    ≤ E   ≤ j∈NI (i) X j∈NI (i) X j∈NI (i)  ≤ X j∈NI (i)  ≤ X j∈NI (i)  21 k ξj (t) − ξj (0) k2  + k ε̃i k  21   E k ξj (t) − ξj (0) k22  + k ε̃i k  2  12 2t 1 + Ekξj (0)k2 (t + 1)eαj t  + k ε̃i k !  21 2t 1 + sup kxj k22 (t + 1)eαj t  + k ε̃i k xj ∈Xj p where αj = Kj + 2 Kj and Kj is the constant K as given in Prop. 5.3 for the j-th system, and the last step follows from Prop. 5.3. We define for system Σi the K∞ function i 21 h P ψi (t) := t(t + 1) j∈NI (i) βj eαj t , which concludes the proof.
3cs.SY
Recovery analysis for weighted mixed ℓ2/ℓp minimization arXiv:1709.00257v2 [cs.IT] 18 Oct 2017 with 0 < p ≤ 1 Zhiyong Zhou∗, Jun Yu Department of Mathematics and Mathematical Statistics, Umeå University, Umeå, 901 87, Sweden October 19, 2017 Abstract: We study the recovery conditions of weighted mixed ℓ2 /ℓp (0 < p ≤ 1) minimization for block sparse signal reconstruction from compressed measurements when partial block support information is available. We show that the block p-restricted isometry property (RIP) can ensure the robust recovery. Moreover, we present the sufficient and necessary condition for the recovery by using weighted block p-null space property. The relationship between the block p-RIP and the weighted block p-null space property has been established. Finally, we illustrate our results with a series of numerical experiments. Keywords: Compressive sensing; Prior support information; Block sparse; Non-convex minimization. 1 Introduction Since its advent [3–5, 10], Compressive Sensing (CS) has attracted considerable attentions (see the monographs [13, 18] for a comprehensive view). CS aims to recover an unknown signal with underdetermined linear measurements. Specifically, the standard CS problem consists in the reconstruction of a N -dimensional sparse or compressible signal x from a significantly fewer number of linear measurements y = Ax + e ∈ Rm with m ≪ N and the noise e satisfying kek2 ≤ ε for some known constant ε > 0. In fact, if the measurement matrix A satisfies the restricted isometry property (RIP) condition, the robust recovery can be guaranteed by using the ℓ1 minimization (Chapter 6, [18]) min kzk1 , subject to ky − Azk2 ≤ ε. z (1) To obtain better recovery performance, the structures and prior information of signals are incorporated in the recovery algorithms. In this paper, we consider both cases. As for the structure, we assume that the unknown signal x is block sparse or nearly block sparse [11, 12, 14–16], which means that the nonzero entries of x occur in clusters. Block sparse model appears in many practical scenarios, such as when dealing with multi-band signals [27], in measurements of gene expression levels [30], and in colour imaging [24]. Moreover, block sparse model can be used to treat the problems of multiple measurement vector (MMV) [8, 14, 26] and sampling signals that lie in a union ∗ Corresponding author, [email protected]. 1 Pn of subspaces [2, 14, 27]. With N = i=1 di , we define the i-th block x[i] of a length-N vector x over I = {d1 , · · · , dn }. The i-th block is of length di , and the blocks are formed sequentially so that x = (x1 · · · xd1 xd1 +1 · · · xd1 +d2 · · · xN −dn +1 · · · xN )T . {z } | {z } | {z } | (2) min kzk2,1 , subject to ky − Azk2 ≤ ε. (3) xT [1] xT [n] xT [2] Without loss of generality, we assume that d1 = d2 = · · · = dn = d, implying that N = nd. A vector x ∈ RN is called block k-sparse over I = {d, · · · , d} if x[i] is nonzero (i.e., kx[i]k2 > 0) for at most k indices P i. In other words, by denoting kxk2,0 = ni=1 I(kx[i]k2 > 0), a block k-sparse vector x can be defined by P kxk2,0 ≤ k. For any p > 0, we define the mixed ℓ2 /ℓp norm kxk2,p = ( ni=1 kx[i]kp2 )1/p . To make explicit use of the block structure to achieve better sparse recovery performance, the corresponding extended version of sparse representation algorithm has been developed, namely the mixed ℓ2 /ℓ1 minimization, z It was shown in [14] that if the measurement matrix A satisfies the block RIP condition which generalizes the conventional RIP notion, then the mixed ℓ2 /ℓ1 -norm recovery algorithm is guaranteed to recover any block sparse signal, irrespectively of the locations of the nonzero blocks. Furthermore, recovery will be robust in the presence of noise and modeling errors (i.e., when the vector is not exactly block sparse). Other existing recovery algorithms include group lasso [39], adaptive lasso [23], iterative reweighted ℓ2 /ℓ1 recovery algorithms [40], block version of the CoSaMP algorithm [12], and the extensions of the CoSaMP algorithm and of the Iterative Hard Thresholding algorithm [1]. On the other hand, we also consider the case that an estimate of the block support of the signal is available. The related literatures on signal recovery using partial support or block support information include [19–22, 28, 29, 31–33, 38]. For an arbitrary signal x ∈ RN defined as (2), let xk be its best approximation with k nonzero blocks, so that xk minimizes kx − gk2,1 over all block k-sparse vectors g. Let T0 be the block support of xk , where T0 ⊂ {1, · · · , n} and |T0 | ≤ k. Let T̃ , the block support estimate, be a subset of {1, 2 · · · , n} with cardinality |T̃ | = ρk, where 0 ≤ ρ ≤ a for some a > 1 and |T̃ ∩ T0 | = αρk (for interpretation of ρ and α see Remark 1 in Section 2). To incorporate prior block support information T̃ , the weighted mixed ℓ2 /ℓ1 minimization  n ω ∈ [0, 1], i ∈ T̃ X wi kz[i]k2 , subject to ky − Azk2 ≤ ε, where wi = min (4) z 1, i ∈ T̃ c i=1 is adopted. The main idea is to choose ω such that the ℓ2 norm of the blocks of x that are ”expected” to be large are penalized less in the weighted objective function. Moreover, as is shown in many literatures [6, 17, 37], ℓp -minimization with 0 < p < 1 allows exact recovery with fewer measurements than that by ℓ1 -minimization. Thus, it is natural to adopt the nonconvex minimization to the setting of block sparse signal reconstruction with prior block support information. Specifically, we consider the weighted mixed ℓ2 /ℓp (0 < p ≤ 1) minimization problem:  n ω ∈ [0, 1], i ∈ T̃ X p wi kz[i]k2 , subject to ky − Azk2 ≤ ε, where wi = . (5) min z 1, i ∈ T̃ c i=1 2 When there is no prior block support information (ω = 1), the mixed ℓ2 /ℓp (0 < p ≤ 1) minimization problem has been studied in [34, 35]. And the case that there is partially known signal block support but with ω = 0 was considered in [20]. We generalize the existing results to incorporating the prior known block support information with a weight ω ∈ [0, 1]. In summary, the main contributions of our work include the following aspects. First, we provide the recovery analysis for the weighted mixed ℓ2 /ℓp (0 < p ≤ 1) minimization by using block p-RIP condition. This result extends the existing literatures [19, 20, 33–35]. Second, we propose the weighted block p-null space property and present the sufficient and necessary condition for the weighted mixed ℓ2 /ℓp (0 < p ≤ 1) minimization by this new tool. Third, we establish the relationship between block p-RIP condition and weighted block p-null space property. Finally, we illustrate our results via a series of simulations. The paper is organized as follows. In Section 2, we present the sufficient recovery condition by using block p-RIP. In Section 3, we introduce the notion of weighted block p-null space property (NSP) and establish the sufficient and necessary condition with this new tool. In Section 4, we establish the relationship between these two conditions. In Section 5, we conduct some simulations to illustrate the theoretical results. Section 6 is devoted to the conclusion. 2 Block p-RIP As for the weighted mixed ℓ2 /ℓp (0 < p ≤ 1) minimization, we can obtain the reconstruction guarantees by using block p-RIP. We begin with introducing the definition of block restricted p-isometry constant, which is a natural extension of the conventional restricted p-isometry constant. Definition 1 ( [7, 20, 34, 35]) Given a measurement matrix A ∈ Rm×N and 0 < p ≤ 1. Then the block p-restricted isometry constant (RIC) δk|I over I = {d1 , · · · , dn } of order k is defined to be the smallest positive number such that (1 − δk|I )kxkp2 ≤ kAxkpp ≤ (1 + δk|I )kxkp2 (6) for all x ∈ RN that are block k-sparse over I. For convenience, we write δk for the block p-RIC δk|I whenever there is no confusion. Then, we have the sufficient condition for the robust recovery result by using (5) with the block p-RIC δk . Theorem 1 Let x ∈ RN , and xk be its best approximation with k nonzero blocks, supported on block index set T0 . Let T̃ ⊂ {1, 2, · · · , n} be an arbitrary set. Define ρ and α as before such that |T̃ | = ρk and |T̃ ∩ T0 | = αρk. Suppose that there exists an a ∈ Z, with a ≥ (1 − α)ρ, a > 1, and the measurement matrix A satisfies δak + a1−p/2 a1−p/2 δ(a+1)k < − 1, γ γ 3 (7) where γ = ω + (1 − ω)(1 + ρ − 2αρ)1−p/2 for some given 0 ≤ ω ≤ 1. Then the solutions x♯ of problem (5) obeys kx♯ − xk2 ≤ C1  ωkx − xk kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 k1/p−1/2 1/p + C2 ε, (8) for some positive constants C1 and C2 . Remark 1. Note that this theorem involves two important ratios: ρ determines the ratio of the estimated block support size to the actual block support of xk (or the block support of x if x is block k-sparse), while α determines the ratio of the number of block indices in block support of xk that were accurately 0| . estimated in T̃ to the size of T̃ . Specifically, α = |T̃|∩T T̃ | Remark 2. The constants C1 and C2 are explicitly given by the following expressions:   22/p−1 a1/2−1/p (1 + δak )1/p + (1 − δ(a+1)k )1/p C1 = , [(1 − δ(a+1)k ) − ap/2−1 (1 + δak )γ]1/p C2 = 21/p m1/p−1/2 (1 + a1/2−1/p γ 1/p ) . [(1 − δ(a+1)k ) − ap/2−1 (1 + δak )γ]1/p Remark 3. For Theorem 1 to be held, it is sufficient that A satisfies δ(a+1)k < δ := a1−p/2 − [ω + (1 − ω)(1 + ρ − 2αρ)1−p/2 ] . a1−p/2 + [ω + (1 − ω)(1 + ρ − 2αρ)1−p/2 ] (9) Next, we illustrate how the slighted stronger sufficient conditions (9) vary with α and ω for p = 0.01, 0.5, 1, respectively. In Figure 1, for each p, we plot δ versus ω for different values of α, where we set the parameters a = 3 and ρ = 1. We observe that as α increases the sufficient condition on the block p-RIC becomes weaker (δ getting larger), allowing for a wider class of measurement matrices A. For each p with α > 0.5, the sufficient condition becomes stronger as ω increases. For instance, when α = 0.7, p = 0.5, with ω = 0.2 it suffices to have δ = 0.5072, compared with δ = 0.3902 for ω = 1. The opposite conclusion holds for the case α < 0.5. When α = 0.5, the sufficient condition remains the same for different ω. From another point of view, as p decreases, the sufficient condition becomes weaker, which reflects the benefits of using nonconvex minimization. Remark 4. By setting ω = 1 and a = b2/(2−p) with b > 1, this theorem reduces to Theorem 2.1 in [35]. In addition, by setting ω = 0, α = 0.5 and a = ρ = b2/(2−p) with b > 1, then this theorem goes to Theorem 2 in [20] with s = ak. Proof. Let x♯ = x + h be a solution of problem (5), where x is the unknown true signal and h is the approximation error. Throughout the paper, xT will denote the vector equal to x on the block index set 4 p=0.01 0.9 p=0.5 0.8 α=0.1 α=0.3 α=0.5 α=0.7 α=0.9 0.8 p=1 0.6 α=0.1 α=0.3 α=0.5 α=0.7 α=0.9 α=0.1 α=0.3 α=0.5 α=0.7 α=0.9 0.55 0.7 0.5 0.7 0.6 0.6 0.5 Block restricted p-isometry constant Block restricted p-isometry constant Block restricted p-isometry constant 0.45 0.5 0.4 0.4 0.35 0.3 0.25 0.4 0.3 0.3 0.2 0.2 0.15 0.2 0.1 0 0.2 0.4 0.6 0.8 1 0.1 0 0.2 Weights (ω) 0.4 0.6 0.8 1 0 0.2 0.4 Weights (ω) 0.6 0.8 1 Weights (ω) Figure 1: Comparison of the sufficient conditions (9) for the block restricted p-isometry constants with various of α for p = 0.01, 0.5, 1. We set a = 3 and ρ = 1 for all the figures. T and zero elsewhere. Then, we have ωkx♯T̃ kp2,p + kx♯T̃ c kp2,p ≤ ωkxT̃ kp2,p + kxT̃ c kp2,p . That is, ωkxT̃ + hT̃ kp2,p + kxT̃ c + hT̃ c kp2,p ≤ ωkxT̃ kp2,p + kxT̃ c kp2,p . Consequently, ωkxT̃ ∩T0 + hT̃ ∩T0 kp2,p + ωkxT̃ ∩T c + hT̃ ∩T c kp2,p + kxT̃ c ∩T0 + hT̃ c ∩T0 kp2,p + kxT̃ c ∩T c + hT̃ c ∩T c kp2,p 0 ≤ ωkxT̃ ∩T0 kp2,p + ωkxT̃ ∩T c kp2,p 0 + 0 kxT̃ c ∩T0 kp2,p 0 + 0 kxT̃ c ∩T c kp2,p . 0 The forward and reverse triangle inequalities implies   ωkhT̃ ∩T c kp2,p + khT̃ c ∩T c kp2,p ≤ khT̃ c ∩T0 kp2,p + ωkhT̃ ∩T0 kp2,p + 2 kxT̃ c ∩T c kp2,p + ωkxT̃ ∩T c kp2,p . 0 0 0 0 Adding and subtracting ωkhT̃ c ∩T c kp2,p on the left hand side, and ωkhT̃ c ∩T0 kp2,p on the right, we obtain 0   ωkhT0c kp2,p + (1 − ω)khT̃ c ∩T c kp2,p ≤ ωkhT0 kp2,p + (1 − ω)khT̃ c ∩T0 kp2,p + 2 ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p . 0 0 But we can also write khT0c kp2,p = ωkhT0c kp2,p + (1 − ω)khT̃ c ∩T c kp2,p + (1 − ω)khT̃ ∩T c kp2,p . 0 5 0 Therefore, we have   khT0c kp2,p ≤ ωkhT0 kp2,p + (1 − ω)khT̃ ∩T c kp2,p + (1 − ω)khT̃ c ∩T0 kp2,p + 2 ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p . 0 0 Let the set T̃α = T0 ∩ T̃ , then we can write khT̃ ∩T c kp2,p + khT̃ c ∩T0 kp2,p = kh(T0 ∪T̃ )\T̃α kp2,p and simplify the 0 bound on   khT0c kp2,p ≤ ωkhT0 kp2,p + (1 − ω)kh(T0 ∪T̃ )\T̃α kp2,p + 2 ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p . (10) 0 Next, we decompose hT0c into disjoint block index set Tj , each of Tj (j ≥ 1) consists of ak blocks, where a > 1. That is, T1 indexes the ak blocks with largest ℓ2 norm of hT0c , T2 indexes the second ak blocks with P largest ℓ2 norm of h(T0 ∪T1 )c , and so on. This gives hT0c = hTj . For each i ∈ Tj (j ≥ 2), it is easy to see j≥1 that khTj [i]kp2 khTj−1 kp2,p khTj−1 [i]kp2 + · · · + khTj−1 [ak]kp2 ≤ = . ak ak Then khTj [i]k22 ≤ khTj−1 k22,p (ak)2/p khTj−1 kp2,p p . khTj k2 ≤ (ak)1−p/2 , khTj k22 ≤ akkhTj−1 k22,p (ak)2/p , Thus, X X X X khTj k2,p . khTj−1 k2,p = (ak)1/2−1/p kh(T0 ∪T1 )c k2 ≤ k hTj k2 ≤ khTj k2 ≤ (ak)1/2−1/p j≥2 j≥1 j≥2 j≥2 Hence,  p X X kh(T0 ∪T1 )c kp2 ≤ (ak)p/2−1  khTj k2,p  ≤ (ak)p/2−1 khTj kp2,p = (ak)p/2−1 khT0c kp2,p . j≥1 j≥1 Combining the above expression with (10), we get " kh(T0 ∪T1 )c kp2 ≤ (ak)p/2−1 #   ωkhT0 kp2,p + (1 − ω)kh(T0 ∪T̃ )\T̃α kp2,p + 2 ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p . 0 (11) By Hölder’s inequality it follows that kAhkpp ≤ m X i=1 (|(Ah)i |p )2/p !p/2 · m X i=1 !1−p/2 1 = m1−p/2 kAhkp2 . Since x♯ is a solution of problem (5) and ky − Axk2 = kek2 ≤ ε, so we have kAhk2 = kA(x♯ − x)k2 ≤ kAx − yk2 + kAx♯ − yk2 ≤ 2ε. 6 Thus, kAhkpp ≤ m1−p/2 kAhkp2 ≤ m1−p/2 (2ε)p . Therefore, we obtain kAhT0 ∪T1 kpp ≤ kAhkpp + kAh(T0 ∪T1 )c kpp ≤ m1−p/2 (2ε)p + X kAhTj kpp j≥2 ≤m 1−p/2 X (2ε) + (1 + δak ) khTj kp2 . p j≥2 Moreover, we have X X khTj−1 kp2,p ≤ (ak)p/2−1 khT0c kp2,p . khTj kp2 ≤ (ak)p/2−1 j≥2 j≥2 Hence kAhT0 ∪T1 kpp ≤ m1−p/2 (2ε)p + (ak)p/2−1 (1 + δak )khT0c kp2,p   ≤ m1−p/2 (2ε)p + 2(ak)p/2−1 (1 + δak ) ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 p/2−1 + ω(ak) (1 + δak )khT0 kp2,p p/2−1 + (1 − ω)(ak) (1 + δak )kh(T0 ∪T̃ )\T̃α kp2,p . Noting that |(T0 ∪ T̃ )\ T̃α | = (1+ρ−2αρ)k, we obtain kh(T0 ∪T̃ )\T̃α kp2,p ≤ [(1 + ρ − 2αρ)k]1−p/2 kh(T0 ∪T̃ )\T̃α kp2 . Since the set T1 contains the ak blocks with largest ℓ2 norm of hT0c with a > 1, and |T̃ \ T̃α | = (1−α)ρk ≤ ak, it follows that kh(T0 ∪T̃ )\T̃α kp2 ≤ khT0 ∪T1 kp2 , which implies that kh(T0 ∪T̃ )\T̃α kp2,p ≤ [(1 + ρ − 2αρ)k]1−p/2 khT0 ∪T1 kp2 . In addition, khT0 kp2,p ≤ k1−p/2 khT0 kp2 ≤ k1−p/2 khT0 ∪T1 kp2 . Thus, (1 − δ(a+1)k )khT0 ∪T1 kp2 ≤ kAhT0 ∪T1 kpp   ≤ m1−p/2 (2ε)p + 2(ak)p/2−1 (1 + δak ) ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 + ωa p/2−1 (1 + δak )khT0 ∪T1 kp2 + (1 − ω)a Therefore, if (1 − δ(a+1)k ) − ap/2−1 (1 + δak )γ > 0, that is δak + khT0 ∪T1 kp2 ≤ p/2−1 1−p/2 (1 + ρ − 2αρ) a1−p/2 δ(a+1)k γ < a1−p/2 γ (1 + δak )khT0 ∪T1 kp2 . − 1, then we have   m1−p/2 (2ε)p + 2(ak)p/2−1 (1 + δak ) ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 (1 − δ(a+1)k ) − ap/2−1 (1 + δak )γ , where γ = ω + (1 − ω)(1 + ρ − 2αρ)1−p/2 . According to (11), we also have   kh(T0 ∪T1 )c kp2 ≤ ap/2−1 γkhT0 ∪T1 kp2 + 2(ak)p/2−1 ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0   p ap/2−1 γm1−p/2 (2ε)p + 2(ak)p/2−1 (1 − δ(a+1)k ) ωkxT0c k2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 ≤ . (1 − δ(a+1)k ) − ap/2−1 (1 + δak )γ From kvkp ≤ 21/p−1 kvk1 for all v ∈ R2 , it follows that khk2 ≤ khT0 ∪T1 k2 + kh(T0 ∪T1 )c k2   1/p  p p 1/p−1/2 1/p 1/2−1/p 1/p ωkxT0c k2,p + (1 − ω)kxT̃ c ∩T c k2,p ε + 2 (ak) (1 + δak )   2m 0 ≤ 21/p−1   p/2−1 1/p [(1 − δ(a+1)k ) − a (1 + δak )γ] 7 (12)   1/p  p 1/2−1/p γ 1/p m1/p−1/2 ε + 21/p (ak)1/2−1/p (1 − δ 1/p ωkx c kp + (1 − ω)kx k 2a ) c c T (a+1)k T̃ ∩T0 2,p 0 2,p   + 21/p−1   p/2−1 1/p [(1 − δ(a+1)k ) − a (1 + δak )γ] ≤ 1/p   22/p−1 (ak)1/2−1/p (1 + δak )1/p + (1 − δ(a+1)k )1/p ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 [(1 − δ(a+1)k ) − + 21/p m1/p−1/2 (1 + a1/2−1/p γ 1/p )ε [(1 − δ(a+1)k ) − ap/2−1 (1 + δak )γ]1/p ap/2−1 (1 = C1  + δak )γ]1/p ωkxT0c kp2,p + (1 − ω)kxT̃ c ∩T c kp2,p 0 k1/p−1/2 1/p + C2 ε, which completes the proof. Corollary 1 Let A ∈ Rm×N be a measurement matrix, x ∈ RN be a block k-sparse signal supported on block index set T0 with y = Ax, and 0 < p ≤ 1. Let T̃ ⊂ {1, 2, · · · , n} be an arbitrary set. Define ρ and α as before such that |T̃ | = ρk and |T̃ ∩ T0 | = αρk. Suppose that there exists an a ∈ Z, with a ≥ (1 − α)ρ, a > 1, and the measurement matrix A satisfies δak + a1−p/2 a1−p/2 δ(a+1)k < − 1, γ γ (13) where γ = ω + (1 − ω)(1 + ρ − 2αρ)1−p/2 for some given 0 ≤ ω ≤ 1. Then the unique solution of problem (5) with ε = 0 is exactly x. Remark 5. According to the arguments in [20, 35], if we let A be an m × N matrix whose entries are i.i.d Gaussian random variables with mean zero, then there exist C3 (p) and C4 (p) such that whenever 0 < p ≤ 1 and m ≥ C3 (p)kd + pC4 (p)k ln(n/k), (14) the block p-RIP (7) will hold and the block sparse signal x can be exactly recovered with high probability. For a given p ∈ (0, 1], C3 (p) and C4 (p) are finite constants, and the second term of (14) has the dominant impact on the number of measurements in an asymptotic sense. When p → 0, the condition reduces to m ≥ C3 (0)kd. While, when p = 1, the required number of measurements m ≥ C3 (1)kd + C4 (1)k ln(n/k), which implies fewer measurements are required with smaller p for exact recovery via weighted mixed ℓ2 /ℓp minimization than the case that p = 1. This is largely consistent with what we have mentioned in Remark 3, namely, as p decreases, the sufficient condition for the exact recovery becomes weaker. Though we have only considered the case that d1 = d2 = · · · = dn = d, the results here can be adapted to the case in which di are not equal via replacing d by the maximal block length max di . 1≤i≤n 3 Weighted Block p-NSP In this section, we focus on the noise free case, that is e = 0, and the signal x is exactly block k-sparse, supported on block index set T0 . We obtain the exact recovery condition for the problem (5) with ε = 0 by using weighted block p-null space property. For an index set V ⊂ {1, · · · , n}, we define Γs (V ) := {U ⊂ {1, · · · , n} : |(V ∩ U c ) ∪ (V c ∩ U )| ≤ s}. 8 Basically, for any index set V , the set (V ∩ U c ) ∪ (V c ∩ U ) indicates the estimate error of U with respective to V . So Γs (V ) includes all the index set estimates of V that own an error of size s or less. Definition 2 Let T ⊂ {1, · · · , n} with |T | ≤ k and T̃ ∈ Γs (T ). Assume the block size equals d. A matrix A ∈ Rm×N is said to have the weighted nonuniform block p-null space property with parameters T and T̃ , and constant C if for any vector h : Ah = 0, we have ωkhT kp2,p + (1 − ω)khS kp2,p ≤ CkhT c kp2,p , (15) where S = (T̃ ∩ T c ) ∪ (T̃ c ∩ T ). In this case, we say A satisfies ω-d-p-NSP(T, T̃ , C). Next, we define a weighted uniform block p-null space property that leads to a sufficient and necessary condition for the exact recovery of all block k-sparse signals from compressive measurements using weighted mixed ℓ2 /ℓp minimization problem. Definition 3 Assume the block size equals d. A matrix A ∈ Rm×N is said to have the weighted block p-null space property with parameters k and s, and constant C if for any vector h : Ah = 0, and for every block index set T ⊂ {1, · · · , n} with |T | ≤ k and S ⊂ {1, · · · , n} with |S| ≤ s, we have ωkhT kp2,p + (1 − ω)khS kp2,p ≤ CkhT c kp2,p . (16) In this case, we say A satisfies ω-d-p-NSP(k, s, C). Remark 6. Our notations ω-d-p-NSP(T, T̃ , C) and ω-d-p-NSP(k, s, C) are direct extensions of the recent notations ω-NSP(T, T̃ , C) and ω-NSP(k, s, C) proposed by [25], which corresponds to the special case that p = 1 and the block size d = 1. That’s to say ω-1-1-NSP(k, s, C) is equivalent to ω-NSP(k, s, C). Consequently, 1-1-1-NSP(k, k, C) is the standard null space property of order k, i.e, NSP(k, C). The following theorem presents the sufficient and necessary condition for weighted mixed ℓ2 /ℓp minimization problem to recover all block k-sparse signals when the error in the block support estimate is of size s or less. Theorem 2 Assume the block size equals d. Given a matrix A ∈ Rm×N , every block k-sparse signal x ∈ RN , supported on block index set T0 , is the unique solution of the weighted mixed ℓ2 /ℓp , 0 < p ≤ 1 norm minimization problem (5) with ε = 0 and T̃ = Γs (T0 ), if and only if A satisfies ω-d-p-NSP(k, s, C) for some positive constant C < 1. Proof. a) ” ⇒ ”. Assume if A does not satisfy ω-d-p-NSP(k, s, C) for any constant C > 1, then there exists a vector h : Ah = 0 and block index set T with |T | ≤ k and block index set S with |S| ≤ s, such that AhT = −AhT c and ωkhT kp2,p + (1 − ω)khS kp2,p ≥ khT c kp2,p . Define T̃ = (T c ∩ S) ∪ (T ∩ S c ) so that S = (T ∩ T̃ c ) ∪ (T c ∩ T̃ ). Substituting for S and splitting the set T , we obtain     ω khT ∩T̃ c kp2,p + khT ∩T̃ kp2,p + (1 − ω) khT ∩T̃ c kp2,p + khT c ∩T̃ kp2,p 9 = khT ∩T̃ c kp2,p + ωkhT ∩T̃ kp2,p + (1 − ω)khT c ∩T̃ kp2,p ≥ khT c kp2,p . Then, we have ωkhT ∩T̃ kp2,p + khT ∩T̃ c kp2,p ≥ ωkhT c ∩T̃ kp2,p + khT c ∩T̃ c kp2,p . In other words, the weighted mixed ℓ2 /ℓp norm of the vector hT equals or exceeds that of −hT c . So hT is not the unique minimizer, which is contradictory to our condition. Thus, the necessity is verified. b) ” ⇐ ”. Let x♯ be a minimizer of weighted mixed ℓ2 /ℓp , 0 < p ≤ 1 norm minimization problem (5) with ε = 0 and T̃ = Γs (T0 ) and define h = x♯ − x. Then, by the optimality of x♯ , we have ωkxT̃ + hT̃ kp2,p + kxT̃ c + hT̃ c kp2,p ≤ ωkxT̃ kp2,p + kxT̃ c kp2,p , which is equivalent to ωkxT̃ ∩T0 + hT̃ ∩T0 kp2,p + ωkxT̃ ∩T c + hT̃ ∩T c kp2,p + kxT̃ c ∩T0 + hT̃ c ∩T0 kp2,p + kxT̃ c ∩T c + hT̃ c ∩T c kp2,p 0 ≤ ωkxT̃ ∩T0 kp2,p ωkxT̃ ∩T c kp2,p 0 + + 0 0 kxT̃ c ∩T0 kp2,p + 0 kxT̃ c ∩T c kp2,p . 0 Since x is strictly block k-sparse and supported on the block index set T0 , thus xT0c = 0. Then we have ωkhT̃ ∩T c kp2,p + khT̃ c ∩T c kp2,p ≤ khT̃ c ∩T0 kp2,p + ωkhT̃ ∩T0 kp2,p . 0 0 Adding and subtracting ωkhT̃ c ∩T c kp2,p on the left hand side, and ωkhT̃ c ∩T0 kp2,p on the right, we obtain 0 ωkhT̃ ∩T c kp2,p + ωkhT̃ c ∩T c kp2,p + khT̃ c ∩T c kp2,p − ωkhT̃ c ∩T c kp2,p ≤ ωkhT̃ ∩T0 kp2,p + 0 0 0 0 ωkhT̃ c ∩T0 kp2,p + khT̃ c ∩T0 kp2,p − ωkhT̃ c ∩T0 kp2,p . Therefore, ωkhT0c kp2,p + (1 − ω)khT̃ c ∩T c kp2,p ≤ ωkhT0 kp2,p + (1 − ω)khT̃ c ∩T0 kp2,p . 0 Finally, by adding (1 − ω)khT̃ ∩T c kp2,p 0 to both sides, we have khT0c kp2,p ≤ ωkhT0 kp2,p + (1 − ω)khT̃ ∩T c kp2,p + (1 − ω)khT̃ c ∩T c kp2,p 0 = ωkhT0 kp2,p + (1 − ω)khS kp2,p , 0 (17) by setting S = (T̃ ∩ T0c ) ∪ (T̃ c ∩ T0 ). Note that when |S| ≤ s, the above inequality is in contradiction with that A satisfies ω-d-p-NSP(k, s, C) for some constant C < 1, unless h = 0. Hence, we have x♯ = x, and the sufficiency holds. 4 From Block p-RIP to Weighted Block p-NSP In this part, we establish the relationship between the block p-RIP and weighted block p-NSP, which tells us that block p-RIP can directly imply the weighted block p-NSP. As a consequence, we can obtain the exact recovery for every block k-sparse signal via the weighted mixed ℓ2 /ℓp , 0 < p ≤ 1 norm minimization problem (5) with ε = 0. The relationship is obtained as follows. 10 Theorem 3 Assume the block size equals d and let x ∈ RN be block k-sparse, supported on block index set T0 . Let T̃ ⊂ {1, 2, · · · , n} be an arbitrary set and define ρ and α as before such that |T̃ | = ρk and |T̃ ∩ T0 | = αρk. Let s = (1 + ρ − 2αρ)k, then we have T̃ = Γs (T0 ). Suppose that there exists an a ∈ Z, with a ≥ (1 − α)ρ, a > 1, and the measurement matrix A satisfies δak + a1−p/2 a1−p/2 δ(a+1)k < − 1, γ γ (18) where γ = ω + (1 − ω)(s/k)1−p/2 for some given 0 ≤ ω ≤ 1. Then A satisfies ω-d-p-NSP(k, s, C) for some constant C < 1. Consequently, according to Theorem 2, we have x is the unique solution of problem (5) with ε = 0. Proof. To show for any vector h : Ah = 0, and for every block index set T ⊂ {1, · · · , n} with |T | ≤ k, and S ⊂ {1, · · · , n} with |S| ≤ s, we have ωkhT kp2,p + (1 − ω)khS kp2,p ≤ CkhT c kp2,p , (19) for some constant C < 1, we only need to show (19) holds for T = G0 and S = H0 , where G0 is the block index set over the k blocks with largest ℓ2 norm of h, H0 is the block index set over the s blocks with largest ℓ2 norm of h. Next, we decompose hGc0 into disjoint block index set Gj , each of Gj (j ≥ 1) consists of ak blocks. That is, G1 indexes the ak blocks with largest ℓ2 norm of hGc0 . G2 indexes the second ak blocks with largest ℓ2 norm of h(G0 ∪G1 )c , and so on. Since Ah = 0, then we have kAhG0 ∪G1 kpp ≤ kAh(G0 ∪G1 )c kpp ≤ X kAhGj kpp ≤ (1 + δak ) khGj kp2 . j≥2 j≥2 Moreover, we have X X X khGj−1 kp2,p ≤ (ak)p/2−1 khGc0 kp2,p . khGj kp2 ≤ (ak)p/2−1 j≥2 j≥2 Thus, (1 − δ(a+1)k )khG0 ∪G1 kp2 ≤ kAhG0 ∪G1 kpp ≤ (1 + δak )(ak)p/2−1 khGc0 kp2,p . It implies that khG0 ∪G1 kp2 ≤ (ak)p/2−1 (1 + δak ) khGc0 kp2,p . 1 − δ(a+1)k (20) In addition, khG0 kp2,p ≤ k1−p/2 khG0 kp2 ≤ k1−p/2 khG0 ∪G1 kp2 . Hence, khG0 kp2,p ≤ k1−p/2 khG0 ∪G1 kp2 ≤ ap/2−1 (1 + δak ) khGc0 kp2,p . 1 − δ(a+1)k (21) For the term khH0 kp2,p , we have khH0 kp2,p ≤ s1−p/2 khH0 kp2 . Moreover, if s ≤ k, we have H0 ⊂ G0 and khH0 kp2 ≤ khG0 kp2 ≤ khG0 ∪G1 kp2 . If s > k, then G0 ⊂ H0 . However, since |H0 \ G0 | = s − k = 11 (1 + ρ − 2αρ)k − k = (1 − 2α)ρk ≤ ak, then we also have khH0 kp2 ≤ khG0 ∪G1 kp2 as the block index set G1 contains the ak blocks with largest ℓ2 norm of hGc0 . As a consequence, khH0 kp2,p ≤ s1−p/2 khH0 kp2 ≤ s1−p/2 khG0 ∪G1 kp2 ≤ (ak/s)p/2−1 (1 + δak ) khGc0 kp2,p . 1 − δ(a+1)k (22) Therefore, we obtain ωkhG0 kp2,p + (1 − ω)khH0 kp2,p ≤ ω = Let C = 5 ap/2−1 γ(1+δak ) , 1−δ(a+1)k ap/2−1 (1 + δak ) (ak/s)p/2−1 (1 + δak ) khGc0 kp2,p + (1 − ω) khGc0 kp2,p 1 − δ(a+1)k 1 − δ(a+1)k ap/2−1 γ(1 + δak ) khGc0 kp2,p . 1 − δ(a+1)k we have C < 1 under the condition of block p-RIP. The proof is completed. Simulation In this section, we conduct several simulations to illustrate our presented theoretical results. We adopt the iteratively reweighted least squares (IRLS) approach to solve the nonconvex optimization problem. We begin with x(0) = arg min ky − Axk22 , and set γ0 = 1. Then, let x(t+1) be the solution of min x 1 1 ky − Axk22 + kW (t) xk22 , 2λ 2 (23) (t) where λ > 0 is a regularization parameter, and the weight matrix W (t) is defined as Wi 4 p(p−2) ωi 1/p kωi x(t) [i]k22 )p/4−1/2 ) = diag((γt + for the i-th block. Then, x(t+1) can be given explicitly as  −1 [A(W (t) )−1 ]T y. x(t+1) = (W (t) )−1 [A(W (t) )−1 ]T [A(W (t) )−1 ] + λI The value of γ is decreased according to the rule γt+1 = 0.1γt , and the iteration is continued until kx(t+1) − x(t) k2 ≤ 10−5 or the iteration times is larger than 2500. In our experiments, the measurement matrix A is generated as an m × N matrix with entries drawing from i.i.d standard normal distribution. For a generated block sparse or nearly block sparse signal x, the measurements y = Ax + σz with z being the standard Gaussian white noise. We consider several different parameter values to demonstrate the theoretical results. In each experiment, we report the average results over 20 replications. For IRLS, we set λ = 10−6 in the noise free case (σ = 0), and λ = 10−2 in the noisy case (σ = 0.01). The recovery performance is assessed by the signal to noise ratio (SNR), which is given by   kxk2 SNR = 20 log 10 . kx − x♯ k2 5.1 Exactly block sparse case We first consider the case that x is exactly block k-sparse with k = 20. In this set of experiments, the signal is of length N = 400, which is generated by choosing k blocks uniformly at random, and then choosing the nonzero values from the standard normal distribution for these k blocks. 12 Figure 2 illustrates the recovery performance of the weighted ℓ2 /ℓp minimization problem with p = 0.5 and d = 2 in both with and without noise cases. It can be observed that when α = 0.7, the best recovery is achieved for very small ω whereas a ω = 1 results in the lowest SNR. On the other hand, when α ≤ 0.5, the performance of the recovery algorithms is better for large ω than that for small ω. The case ω = 0 results in the lowest SNR. And as is expected that in all settings, comparing to the noise free case, we have a lower SNR in the noisy case. Figure 3 shows the averaged SNR using weighted mixed ℓ2 /ℓp minimization for different values of the ratio parameter ρ with fixed p = 0.5 and d = 2. It shows that when α = 0.7, using a larger support estimate results in better reconstruction. However, in both the noise free and noisy measurements cases, the recovery performance is more sensitive to the accuracy α of the block support estimate than the ratio parameter ρ. In addition, we illustrate the impacts of p and d in Figure 4 for both the noise free and noisy measurements cases. We fix k = 20, α = 0.7 and ω = 0.5. It is evident that as p decreases, the recovery performance becomes better. And as d increases, more number of measurements are required to obtain good reconstructions. These are largely consistent with the theoretical results in Section 2. α =0.3,σ =0 α =0.5,σ =0 60 50 40 40 40 20 30 20 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 10 0 60 SNR 50 30 80 100 120 140 160 0 60 80 number of measurements m 120 140 160 0 60 180 α =0.5,σ =0.01 55 45 45 45 40 40 40 35 35 35 30 30 30 20 SNR 50 25 25 20 15 10 5 80 100 120 140 160 5 number of measurements m 0 60 140 160 180 α =0.7,σ =0.01 25 15 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 10 180 120 20 15 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 100 55 50 0 60 80 number of measurements m 50 SNR SNR 100 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 10 number of measurements m α =0.3,σ =0.01 55 30 20 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 10 180 α =0.7,σ =0 60 50 SNR SNR 60 80 100 120 140 number of measurements m 160 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 10 5 180 0 60 80 100 120 140 160 180 number of measurements m Figure 2: Performance of weighted mixed ℓ2 /ℓp recovery with p = 0.5 in terms of SNR for exactly block sparse signal x depending on ω with k = 20, d = 2, while varying the number of measurements m. 5.2 Nearly block sparse case Next, we generate x with the ℓ2 norm of its blocks decay like i−θ where i ∈ {1, · · · , n} and θ > 1. In Figure 5, we illustrate the averaged SNR versus the size of the block support estimate ρ as a proportion of k for θ = 1.5. To calculate α, we set k = 20, i.e., we are interested in the best 20-term block sparse 13 α =0.3,σ =0 45 α =0.5,σ =0 45 40 40 35 35 α =0.7,σ =0 160 140 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 120 30 20 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 25 20 15 15 10 10 5 5 0 0.4 0 0.4 100 SNR ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 25 SNR SNR 30 80 60 0.8 1 1.2 1.4 0.6 0.8 1 ρ α =0.3,σ =0.01 40 35 35 30 30 20 10 10 5 5 1 1 1.2 1.4 1.2 1.4 α =0.7,σ =0.01 55 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 20 15 0.8 0.8 ρ 50 25 15 0.6 0.6 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 45 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 25 0 0.4 20 0.4 1.4 α =0.5,σ =0.01 45 40 SNR SNR 45 1.2 ρ 1.2 0 0.4 1.4 SNR 0.6 40 40 35 0.6 0.8 1 ρ 1.2 30 0.4 1.4 0.6 0.8 ρ 1 ρ Figure 3: Performance of weighted mixed ℓ2 /ℓp recovery with p = 0.5 in terms of SNR for exactly block sparse signal x depending on ω with k = 20, d = 2, while varying the size of the block support estimate ρ as a proportion of k. d=2,σ =0 70 70 70 60 60 60 50 50 50 40 40 30 20 80 100 120 140 160 0 60 20 p=1 p=0.8 p=0.5 p=0.2 p=0.01 10 180 40 30 20 p=1 p=0.8 p=0.5 p=0.2 p=0.01 10 0 60 SNR 80 30 80 number of measurements m 100 120 140 160 0 60 180 50 40 40 40 20 SNR 50 SNR 50 30 30 20 p=1 p=0.8 p=0.5 p=0.2 p=0.01 10 120 140 number of measurements m 160 0 60 140 160 180 30 20 p=1 p=0.8 p=0.5 p=0.2 p=0.01 10 180 120 d=4,σ =0.01 60 100 100 d=2,σ =0.01 60 80 80 number of measurements m 60 0 60 p=1 p=0.8 p=0.5 p=0.2 p=0.01 10 number of measurements m d=1,σ =0.01 SNR d=4,σ =0 80 SNR SNR d=1,σ =0 80 80 100 120 140 number of measurements m 160 p=1 p=0.8 p=0.5 p=0.2 p=0.01 10 180 0 60 80 100 120 140 160 180 number of measurements m Figure 4: Performance of weighted mixed ℓ2 /ℓp recovery in terms of SNR for exactly block sparse signal x depending on p with k = 20, α = 0.7, ω = 0.5, while varying the number of measurements m. 14 approximation. It shows that mediate values of ω (e.g., ω = 0.2 or 0.5) results in the best recovery. Generally, larger block support estimate favours better reconstruction result. Finally, we illustrate the impacts of θ and d for different p in Figure 6. For θ = 1.5, we set k = 20, while for θ = 2, we consider k = 10. It is evident that the recovery performance improves as θ increases, i.e., the block sparsity of signal increases. Moreover, decreasing p and d improves the recovery performance when other parameters are fixed. α =0.3,σ =0 22 α =0.5,σ =0 23 21 22.5 20 α =0.7,σ =0 28 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 27 26 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 22 25 19 18 SNR SNR SNR 21.5 24 23 21 17 16 15 14 0.4 22 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 0.6 20.5 21 20 0.8 1 1.2 19.5 0.4 1.4 20 0.6 0.8 ρ 1.2 19 0.4 1.4 0.6 0.8 ρ α =0.3,σ =0.01 22 1 α =0.5,σ =0.01 23 21 22.5 20 1 1.2 1.4 1.2 1.4 ρ α =0.7,σ =0.01 27 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 26 25 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 22 19 17 SNR SNR SNR 24 21.5 18 23 21 22 16 20.5 15 14 13 0.4 21 ω=0 ω=0.2 ω=0.5 ω=0.8 ω=1 0.6 20 0.8 1 1.2 1.4 19.5 0.4 20 0.6 0.8 ρ 1 ρ 1.2 1.4 19 0.4 0.6 0.8 1 ρ Figure 5: Performance of weighted mixed ℓ2 /ℓp recovery in terms of SNR for nearly block sparse signal x with p = 0.5, m = 80, θ = 1.5, k = 20, d = 2, while varying the size of the block support estimate ρ as a proportion of k. 6 Conclusion In this paper, we presented the recovery analysis of weighted mixed ℓ2 /ℓp (0 < p ≤ 1) minimization by using both block p-RIP and weighted block p-null space property. In addition, we established the relationship between these two conditions. A series of simulations were conducted to illustrate our theoretical results. We largely generalized the existing results [19, 20, 33–35] to incorporating the prior known block support information with a weight ω ∈ [0, 1]. And from the simulation results, it shows that mediate values of the weight ω result in the best recovery in most of the cases. There are some interesting issues left for future work. One is that it might be possible to generalize ℓ2 -constrained minimization problem considered in this paper to the ℓq -constrained minimization problem with 2 ≤ q ≤ ∞ (see [9, 32]) and with 0 ≤ q < 2 (see [36]). Another issue that is not addressed here is to obtain the minimum required number of measurements for perfect recovery directly via weighted block p-null space property. And the extension to the framework with completely arbitrary weights (see [28]) needs also to be considered. 15 d=1,θ=1.5 with k=20 d=2,θ=1.5 with k=20 d=4,θ=1.5 with k=20 28 30 28 28 26 26 26 24 24 SNR SNR 22 SNR 24 22 22 20 20 20 18 p=1 p=0.8 p=0.5 p=0.2 p=0.01 18 16 60 80 100 120 140 160 p=1 p=0.8 p=0.5 p=0.2 p=0.01 18 16 60 180 80 number of measurements m 100 120 140 160 p=1 p=0.8 p=0.5 p=0.2 p=0.01 16 14 60 180 80 number of measurements m d=1,θ=2 with k=10 d=2,θ=2 with k=10 34 34 32 32 30 30 28 28 100 120 140 160 180 number of measurements m d=4,θ=2 with k=10 34 32 30 26 SNR SNR SNR 28 26 26 24 24 24 p=1 p=0.8 p=0.5 p=0.2 p=0.01 22 20 60 80 100 120 140 number of measurements m 160 22 180 20 60 22 p=1 p=0.8 p=0.5 p=0.2 p=0.01 80 100 120 140 number of measurements m 160 p=1 p=0.8 p=0.5 p=0.2 p=0.01 20 180 18 60 80 100 120 140 160 180 number of measurements m Figure 6: Performance of weighted mixed ℓ2 /ℓp recovery in terms of SNR for nearly block sparse signal x for different θ and d depending on p with fixed α = 0.7, ω = 0.5, σ = 0.01 for all the cases, while varying the number of measurements m. Acknowledgements This work is supported by the Swedish Research Council grant (Reg.No. 340-2013-5342). References [1] Baraniuk, R.G., Cevher, V., Duarte, M.F. and Hegde, C. (2010). Model-based compressive sensing. IEEE Transactions on Information Theory 56(4) 1982–2001. [2] Blumensath, T. and Davies, M.E. (2009). Sampling theorems for signals from the union of finitedimensional linear subspaces. IEEE Transactions on Information Theory 55(4) 1872–1882. [3] Candes, E.J., Romberg, J.K. and Tao, T. (2006). Stable signal recovery from incomplete and inaccurate measurements. Communications on Pure and Applied Mathematics 59(8) 1207–1223. [4] Candes, E.J. and Tao, T. (2005). Decoding by linear programming. IEEE Transactions on Information Theory 51(12) 4203–4215. [5] Candes, E.J. and Tao, T. (2006). Near-optimal signal recovery from random projections: Universal encoding strategies?. IEEE Transactions on Information Theory 52(12) 5406–5425. [6] Chartrand, R. (2007). Exact reconstruction of sparse signals via nonconvex minimization. IEEE Signal Processing Letters 14(10) 707–710. 16 [7] Chartrand, R. and Staneva, V. (2008). Restricted isometry properties and nonconvex compressive sensing. Inverse Problems 24 1–14. [8] Chen, J. and Huo, X. (2006). Theoretical results on sparse representations of multiple-measurement vectors. IEEE Transactions on Signal Processing 54(12) 4634–4643. [9] Dirksen, S., Lecué, G. and Rauhut, H. (2016). On the gap between restricted isometry properties and sparse recovery conditions. IEEE Transactions on Information Theory, (DOI: 10.1109/TIT.2016.2570244). [10] Donoho, D.L. (2006). Compressed sensing. IEEE Transactions on Information Theory 52(4) 1289– 1306. [11] Duarte, M.F. and Eldar, Y.C. (2011). Structured compressed sensing: From theory to applications. IEEE Transactions on Signal Processing 59(9) 4053–4085. [12] Eldar, Y.C., Kuppinger, P. and Bolcskei, H. (2010). Block-sparse signals: Uncertainty relations and efficient recovery. IEEE Transactions on Signal Processing 58(6) 3042–3054. [13] Eldar, Y.C. and Kutyniok, G. (2012). Compressed Sensing: Theory and Applications. Cambridge University Press. [14] Eldar, Y.C. and Mishali, M. (2009). Robust recovery of signals from a structured union of subspaces. IEEE Transactions on Information Theory 55(11) 5302–5316. [15] Eldar, Y.C. and Rauhut, H. (2010). Average case analysis of multichannel sparse recovery using convex relaxation. IEEE Transactions on Information Theory 56(1) 505–519. [16] Elhamifar, E. and Vidal, R. (2012). Block-sparse recovery via convex optimization. IEEE Transactions on Signal Processing 60(8) 4094–4107. [17] Foucart, S. and Lai, M.J. (2009). Sparsest solutions of underdetermined linear systems via ℓq minimization for 0 < q ≤ 1. Applied and Computational Harmonic Analysis 26(3) 395-407. [18] Foucart, S. and Rauhut, H. (2013). A Mathematical Introduction to Compressive Sensing. New York: Springer-Verlag. [19] Friedlander, M.P., Mansour, H., Saab, R. and Yilmaz, O. (2012). Recovering compressively sampled signals using partial support information. IEEE Transactions on Information Theory 58(2) 1122–1134. [20] He, S., Wang, Y., Wang, J. and Xu, Z. (2016). Block-sparse compressed sensing with partially known signal support via non-convex minimisation. IET Signal Processing 10(7) 717–723. [21] Jacques, L. (2010). A short note on compressed sensing with partially known signal support. Signal Processing 90(12) 3308–3312. [22] Khajehnejad, M.A., Xu, W., Avestimehr, A.S. and Hassibi, B. (2009). Weighted ℓ1 minimization for sparse recovery with prior information. In Information Theory, 2009. ISIT 2009. IEEE International Symposium on (pp. 483-487). [23] Lv, X., Bi, G. and Wan, C. (2011). The group lasso for stable recovery of block-sparse signal representations. IEEE Transactions on Signal Processing 59(4) 1371–1382. [24] Majumdar, A. and Ward, R.K. (2010). Compressed sensing of color images. Signal Processing 90(12) 3122–3127. 17 [25] Mansour, H. and Saab, R. (2017). Recovery analysis for weighted ℓ1 -minimization using the null space property. Applied and Computational Harmonic Analysis 43(1) 23–38. [26] Mishali, M. and Eldar, Y.C. (2008). Reduce and boost: Recovering arbitrary sets of jointly sparse vectors. IEEE Transactions on Signal Processing 56(10) 4692–4702. [27] Mishali, M. and Eldar, Y.C. (2009). Blind multiband signal reconstruction: Compressed sensing for analog signals. IEEE Transactions on Signal Processing 57(3) 993–1009. [28] Needell, D., Saab, R. and Woolf, T. (2017). Weighted ℓ1 -minimization for sparse recovery under arbitrary prior information. Information and Inference, iaw023. [29] Ince, T., Nacaroglu, A. and Watsuji, N. (2013). Nonconvex compressed sensing with partially known signal support. Signal Processing 93(1) 338–344. [30] Parvaresh, F., Vikalo, H., Misra, S. and Hassibi, B. (2008). Recovering sparse signals using sparse measurement matrices in compressed DNA microarrays. IEEE Journal of Selected Topics in Signal Processing 2(3) 275–285. [31] Rauhut, H. and Ward, R. (2016). Interpolation via weighted ℓ1 minimization. Applied and Computational Harmonic Analysis 40(2) 321–351. [32] Saleh, A.A., Alajaji, F. and Chan, W.Y. (2015). Compressed sensing with non-Gaussian noise and partial support information. IEEE Signal Processing Letters 22(10) 1703–1707. [33] Vaswani, N. and Lu, W. (2010). Modified-CS: Modifying compressive sensing for problems with partially known support. IEEE Transactions on Signal Processing 58(9) 4595-4607. [34] Wang, Y., Wang, J. and Xu, Z. (2013). On recovery of block-sparse signals via mixed ℓ2 /ℓq (0 < q ≤ 1) norm minimization. EURASIP Journal on Advances in Signal Processing 2013(1):76. [35] Wang, Y., Wang, J. and Xu, Z. (2014). Restricted p-isometry properties of nonconvex block-sparse compressed sensing. Signal Processing 104 188–196. [36] Wen, F., Liu, P., Liu, Y., Qiu, R.C. and Yu, W. (2017). Robust Sparse Recovery in Impulsive Noise via ℓp -ℓ1 Optimization. IEEE Transactions on Signal Processing 65(1) 105–118. [37] Xu, Z., Chang, X., Xu, F. and Zhang, H. (2012). ℓ1/2 regularization: A thresholding representation theory and a fast solver. IEEE Transactions on Neural Networks and Learning Systems 23(7) 1013–1027. [38] Yu, X. and Baek, S.J. (2013). Sufficient conditions on stable recovery of sparse signals with partial support information. IEEE Signal Processing Letters 20(5) 539–542. [39] 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(1) 49–67. [40] Zeinalkhani, Z. and Banihashemi, A.H. (2015). Iterative reweighted ℓ2 /ℓ1 recovery algorithms for compressed sensing of block sparse signals. IEEE Transactions on Signal Processing 63(17) 4516–4531. 18
7cs.IT
arXiv:1612.08261v1 [math.ST] 25 Dec 2016 Change point estimation based on Wilcoxon tests in the presence of long-range dependence Annika Betken Faculty of Mathematics Ruhr-Universität Bochum 44780 Bochum, Germany e-mail: [email protected] Abstract: We consider an estimator for the location of a shift in the mean of long-range dependent sequences. The estimation is based on the two-sample Wilcoxon statistic. Consistency and the rate of convergence for the estimated change point are established. In the case of a constant shift height, the 1/n convergence rate (with n denoting the number of observations), which is typical under the assumption of independent observations, is also achieved for long memory sequences. It is proved that if the change point height decreases to 0 with a certain rate, the suitably standardized estimator converges in distribution to a functional of a fractional Brownian motion. The estimator is tested on two well-known data sets. Finite sample behaviors are investigated in a Monte Carlo simulation study. Primary 62G05, 62M10; secondary 60G15, 60G22. Keywords and phrases: change point estimation, long-range dependence, Wilcoxon test, self-normalization. Contents 1 Introduction . . . 2 Main Results . . 3 Applications . . . 4 Simulations . . . 5 Proofs . . . . . . References . . . . . . A Auxiliary Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 7 9 16 30 32 1. Introduction Suppose that the observations X1 , . . . , Xn are generated by a stochastic process (Xi )i≥1 Xi = µi + Yi , ∗ Research supported by the German National Academic Foundation and Collaborative Research Center SFB 823 Statistical modelling of nonlinear dynamic processes. 1 A. Betken/Wilcoxon-based change point estimation 2 where (µi )i≥1 are unknown constants and where (Yi )i≥1 is a stationary, longrange dependent (LRD, in short) process with mean zero. A stationary process (Yi )i≥1 is called “long-range dependent” if its autocovariance function ρ, ρ(k) := Cov(Y1 , Yk+1 ), satisfies ρ(k) ∼ k −D L(k), as k → ∞, (1) where 0 < D < 1 (referred to as long-range dependence (LRD) parameter) and where L is a slowly varying function. Furthermore, we assume that there is a change point in the mean of the observations, that is ( µ, for i = 1, . . . , k0 , µi = µ + hn , for i = k0 + 1, . . . , n, where k0 = bnτ c denotes the change point location and hn is the height of the level-shift. In the following we differentiate between fixed and local changes. Under fixed changes we assume that hn = h for some h 6= 0. Local changes are characterized by a sequence hn , n ∈ N, with hn −→ 0 as n −→ ∞; in other words, in a model where the height of the jump decreases with increasing sample size n. In order to test the hypothesis H : µ1 = . . . = µn against the alternative A : µ1 = . . . = µk 6= µk+1 = . . . = µn for some k ∈ {1, . . . , n − 1} the Wilcoxon change point test can be applied. It rejects the hypothesis for large values of the Wilcoxon test statistic defined by   n k X X 1 1{Xi ≤Xj } − Wn := max |Wk,n | , where Wk,n := 1≤k≤n−1 2 i=1 j=k+1 (see Dehling, Rooch and Taqqu (2013a)). Under the assumption that there is a change point in the mean in k0 we expect the absolute value of Wk0 ,n to exceed the absolute value of Wl,n for any l 6= k0 . Therefore, it seems natural to define an estimator of k0 by   k̂W = k̂W (n) := min k : |Wk,n | = max |Wi,n | . 1≤i≤n−1 Preceding papers that address the problem of estimating change point locations in dependent observations X1 , . . . , Xn with a shift in mean often refer to a family of estimators based on the CUSUM change point test statistics Cn (γ) := max1≤k≤n−1 |Ck,n (γ)|, where ! 1−γ  k n X k(n − k) 1X 1 Ck,n (γ) := Xi − Xi n k i=1 n−k i=k+1 A. Betken/Wilcoxon-based change point estimation 3 with parameter 0 ≤ γ < 1. The corresponding change point estimator is defined by   k̂C,γ = k̂C,γ (n) := min k : |Ck,n (γ)| = max |Ci,n (γ)| . (2) 1≤i≤n−1 For long-range dependent Gaussian processes Horváth and Kokoszka (1997) derive the asymptotic distribution of the estimator k̂C,γ under the assumption of a decreasing jump height hn , i.e. under the assumption that hn approaches 0 as the sample size n increases. Under non-restrictive constraints on the dependence structure of the data-generating process (including long-range dependent time series) Kokoszka and Leipus (1998) prove consistency of k̂C,γ under the assumption of fixed as well as decreasing jump heights. Furthermore, they establish the convergence rate of the change point estimator as a function of the intensity of dependence in the data if the jump height is constant. Ben Hariz and Wylie (2005) show that under a similar assumption on the decay of the autocovariances the convergence rate that is achieved in the case of independent observations can be obtained for short- and long-range dependent data, as well. Furthermore, it is shown in their paper that for a decreasing jump height the convergence rate derived by Horváth and Kokoszka (1997) under the assumption of gaussianity can also be established under more general assumptions on the data-generating sequences. Bai (1994) establishes an estimator for the location of a shift in the mean by the method of least squares. He proves consistency, determines the rate of convergence of the change point estimator and derives its asymptotic distribution. These results are shown to hold for weakly dependent observations that satisfy a linear model and cover, for example, ARMA(p, q)-processes. Bai extended these results to the estimation of the location of a parameter change in multiple regression models that also allow for lagged dependent variables and trending regressors (see Bai (1997)). A generalization of these results to possibly long-range dependent data-generating processes (including fractionally integrated processes) is given in Kuan and Hsu (1998) and Lavielle and Moulines (2000). Under the assumption of independent data Darkhovskh (1976) establishes an estimator for the location of a change in distribution based on the two-sample Mann-Whitney test statistic. He obtains a convergence rate that has order n1 , where n is the number of observations. Allowing for strong dependence in the data Giraitis, Leipus and Surgailis (1996) consider Kolmogorov-Smirnov and Cramér-von-Mises-type test statistics for the detection of a change in the marginal distribution of the random variables that underlie the observed data. Consistency of the corresponding change point estimators is proved under the assumption that the jump height approaches 0. A change point estimator based on a self-normalized CUSUM test statistic has been applied in Shao (2011) to real data sets. Although Shao assumes validity of using the estimator, the article does not cover a formal proof of consistency. Furthermore, it has been noted by Shao and Zhang (2010) that even under the assumption of short-range dependence it seems difficult to obtain the asymptotic distribution of the estimate. A. Betken/Wilcoxon-based change point estimation 4 In this paper we shortly address the issue of estimating the change point location on the basis of the self-normalized Wilcoxon test statistic proposed in Betken (2016). In order to construct the self-normalized Wilcoxon test statistic, we have to consider the ranks Ri , i = 1, . . .P , n, of the observations X1 , . . . , Xn . These n are defined by Ri := rank(Xi ) = j=1 1{Xj ≤Xi } for i = 1, . . . , n. The selfnormalized two-sample test statistic is defined by Pk SWk,n =  i=1 1 n Pk 2 t=1 St (1, k) Ri − + 1 n k n Pn i=1 Pn Ri 2 t=k+1 St (k 1/2 , + 1, n) where St (j, k) := t X k Rh − R̄j,k  with R̄j,k := h=j X 1 Rt . k − j + 1 t=j The self-normalized Wilcoxon change point test for the test problem (H, A) rejects the hypothesis for large values of Tn (τ1 , τ2 ) = maxk∈{bnτ1 c,...,bnτ2 c} |SWk,n |, where 0 < τ1 < τ2 < 1. Note that the proportion of the data that is included in the calculation of the supremum is restricted by τ1 and τ2 . A common choice for these parameters is τ1 = 1 − τ2 = 0.15; see Andrews (1993). A natural change point estimator that results from the self-normalized Wilcoxon test statistic is   k̂SW = k̂SW (n) := min k : |SWk,n | = max |SWi,n | . bnτ1 c≤i≤bnτ2 c We will prove consistency of the estimator k̂SW under fixed changes and under local changes whose height converges to 0 with a rate depending on the intensity of dependence in the data. Nonetheless, the main aim of this paper is to characterize the asymptotic behavior of the change point estimator k̂W . In Section 2 we establish consistency of k̂W and k̂SW , derive the optimal convergence rate of k̂W and finally consider its asymptotic distribution. Applications to two wellknown data sets can be found in Section 3. The finite sample properties of the estimators are investigated by simulations in Section 4. Proofs of the theoretical results are given in Section 5. 2. Main Results Recall that for fixed x, x ∈ R, the Hermite expansion of 1{G(ξi )≤x} − F (x) is given by 1{G(ξi )≤x} − F (x) = ∞ X Jq (x) q=1 q! Hq (ξi ), A. Betken/Wilcoxon-based change point estimation 5 where Hq denotes the q-th order Hermite polynomial and where  Jq (x) = E 1{G(ξi )≤x} Hq (ξi ) . Assumption 1. Let Yi = G(ξi ), where (ξi )i≥1 is a stationary, long-range dependent Gaussian process with mean 0, variance 1 and LRD parameter D. We assume that 0 < D < 1r , where r denotes the Hermite rank of the class of functions 1{G(ξi )≤x} − F (x), x ∈ R, defined by r := min {q ≥ 1 : Jq (x) 6= 0 for some x ∈ R} . Moreover, we assume that G : R −→ R is a measurable function and that (Yi )i≥1 has a continuous distribution function F . Let gD,r (t) := t rD 2 r L− 2 (t) and define dn,r n cr , where cr := := gD,r (n) s 2r! . (1 − Dr)(2 − Dr) − Since gD,r is a regularly varying function, there exists a function gD,r such that − − gD,r (gD,r (t)) ∼ gD,r (gD,r (t)) ∼ t, as t → ∞, − (see Theorem 1.5.12 in Bingham, Goldie and Teugels (1987)). We refer to gD,r as the asymptotic inverse of gD,r . The following result states that k̂nW and k̂SW are consistent estimators for n the change point location under fixed as well as certain local changes. Proposition 1. Suppose that Assumption 1 holds. Under fixed changes, k̂W n and k̂SW n are consistent estimators for the change point The estimators are  location.  n −1 also consistent under local changes if hn = o dn,r and if F has a bounded density f . In other words, we have k̂W P −→ τ, n k̂SW P −→ τ n in both situations. Furthermore, it follows that the Wilcoxon test is consistent P under these assumptions (in the sense that nd1n,r max1≤k≤n−1 |Wk,n | −→ ∞). The following theorem establishes a convergence rate for the change point estimator k̂W . Note that only under local changes the convergence rate depends on the intensity of dependence in the data. A. Betken/Wilcoxon-based change point estimation 6 − Theorem 1. Suppose that Assumption 1 holds and let mn := gD,r (h−1 n ). Then, we have k̂W − k0 = OP (mn ) if either • hn = h with h 6= 0 or • limn→∞ hn = 0 with h−1 n =o  n dn,r  and F has a bounded density f . Remark 1. 1. Under fixed changes mn is constant. As a consequence, |k̂W −k0 | = OP (1). This result corresponds to the convergence rates obtained by Ben Hariz and Wylie (2005) for the CUSUM-test based change point estimator and by Lavielle and Moulines (2000) for the least-squares estimate of the change point location. Surprisingly, in this case the rate of convergence is independent of the intensity of dependence in the data characterized by the value of the LRD parameter D. An explanation for this phenomenon might be the occurrence of two opposing effects: increasing values of the LRD parameter D go along with a slower convergence of the test statistic Wk,n (making estimation more difficult), but a more regular behavior of the random component (making estimation easier) (see Ben Hariz and Wylie (2005)).   2. Note that if h−1 n =o n dn,r − and mn = gD,r (h−1 n ), it holds that • mn −→ ∞, • • mn n −→ 0, dmn ,r mn ∼ hn , as n −→ ∞. Based on the previous results it is possible to derive the asymptotic distribution of the change point estimator k̂W : Theorem 2. Suppose that Assumption 1 holds with r = 1 and assume that − F has a bounded density f . Let mn := gD,1 (h−1 n ), let BH denote a fractional Brownian motion process and define h(s; τ ) by ( R s(1 − τ ) f 2 (x)dx if s ≤ 0 R . h(s; τ ) = −sτ f 2 (x)dx if s > 0 . If h−1 n =o  n dn,1  , then, for all M > 0,  1  2 Wk0 +bmn sc,n − Wk20 ,n , −M ≤ s ≤ M, en A. Betken/Wilcoxon-based change point estimation 7 with en = n3 hn dmn ,1 , converges in distribution to   Z Z 2τ (1 − τ ) f 2 (x)dx sign(s)BH (s) J1 (x)dF (x) + h(s; τ ) , −M ≤ s ≤ M, in the Skorohod space D [−M, M ]. Furthermore, it follows that m−1 n (k̂W − k0 ) converges in distribution to   Z argmax−∞<s<∞ sign(s)BH (s) J1 (x)dF (x) + h(s; τ ) . (3) Remark 2. 1. Under local changes the assumption on hn is equivalent to Assumption C.5 (i) in Horváth and Kokoszka (1997). Moreover, the limit distribution (3) closely resembles the limit distribution of the CUSUM-based change point estimator considered in that paper. 2. The proof of Theorem 2 is mainly based on the empirical process noncentral limit theorem for subordinated Gaussian sequences in Dehling and Taqqu (1989). The sequential empirical process has also been studied by many other authors in the context of different models. See, among many others, the following: Müller (1970) and Kiefer (1972) for independent and identically distributed data, Berkes and Philipp (1977) and Philipp and Pinzur (1980) for strongly mixing processes, Berkes, Hörmann and Schauer (2009) for S-mixing processes, Giraitis and Surgailis (1999) for long memory linear (or moving average) processes, Dehling, Durieu and Tusche (2014) for multiple mixing processes. Presumably, in these situations the asymptotic distribution of k̂W can be derived by the same argument as in the proof of Theorem 2 for subordinated Gaussian processes. In particular, Theorem 1 in Giraitis and Surgailis (1999) can be considered as a generalization of Theorem 1.1 in Dehling and Taqqu (1989), i.e. with an appropriate normalization the change point estimator k̂W , computed with respect to long-range dependent linear processes as defined in Giraitis and Surgailis (1999), should converge in distribution to a limit that corresponds to (3) (up to multiplicative constants). 3. Applications We consider two well-known data sets which have been analyzed before. We compute the estimator k̂W based on the given observations and put our results into context with the findings and conclusions of other authors. The plot in Figure 1 depicts the annual volume of discharge from the Nile river at Aswan in 108 m3 for the years 1871 to 1970. The data set is included in any standard distribution of R. Amongst others, Cobb (1978), Macneill, Tang and Jandhyala (1991), Wu and Zhao (2007), Shao (2011) and Betken and Wendler (2015) provide statistically significant evidence for a decrease of the Nile’s annual discharge towards the end of the 19th century. 8 1000 800 600 annual discharge 1200 1400 A. Betken/Wilcoxon-based change point estimation 1880 1900 1920 1940 1960 time Fig 1. Measurements of the annual discharge of the river Nile at Aswan in 108 m3 for the years 1871-1970. The dotted line indicates the potential change point estimated by k̂W ; the dashed lines designate the sample means for the pre-break and post-break samples. The construction of the Aswan Low Dam between 1898 and 1902 serves as a popular explanation for an abrupt change in the data around the turn of the century. Yet, Cobb gave another explanation for the decrease in water volume by citing rainfall records which suggest a decline of tropical rainfall at that time. In fact, an application of the change point estimator k̂W identifies a change in 1898. This result seems to be in good accordance with the estimated change point locations suggested by other authors: Cobb’s analysis of the Nile data leads to the conjecture of a significant decrease in discharge volume in 1898. Moreover, computation of the CUSUM-based change point estimator k̂C,0 considered in Horváth and Kokoszka (1997) indicates a change in 1898. Balke (1993) and Wu and Zhao (2007) suggest that the change occurred in 1899. The second data set consists of the seasonally adjusted monthly deviations of the temperature (degrees C) for the Northern hemisphere during the years 1854 to 1989 from the monthly averages over the period 1950 to 1979. The data has been taken from the longmemo package in R. It results from spatial averaging of temperatures measured over land and sea. In view of the plot in Figure 2 it seems natural to assume that the data generating process is non-stationary. Previous analysis of this data offers different explanations for the irregular behavior of the time series. Deo and Hurvich (1998) fitted a linear trend to the data, thereby providing statistical evidence for global warming during the last decades. However, the consideration of a more general stochastic model by the assumption of so-called semiparametric fractional autoregressive (SEMIFAR) processes in Beran and Feng (2002) does not confirm the conjecture of a trend-like behavior. Neither does the investigation of the global temperature data in Wang (2007) support the hypothesis of an increasing trend. It is pointed out by Wang that the trend-like behavior of the Northern hemisphere temperature data may have −1.0 −0.5 0.0 0.5 9 −1.5 Northern hemisphere temperature A. Betken/Wilcoxon-based change point estimation 1860 1880 1900 1920 1940 1960 1980 time Fig 2. Monthly temperature of the Northern hemisphere for the years 1854-1989 from the data base held at the Climate Research Unit of the University of East Anglia, Norwich, England. The temperature anomalies (in degrees C) are calculated with respect to the reference period 1950-1979. The dotted line indicates the location of the potential change point; the dashed lines designate the sample means for the pre-break and post-break samples. been generated by stationary long-range dependent processes. Yet, it is shown in Shao (2011) and also in Betken and Wendler (2015) that under model assumptions that include long-range dependence an application of change point tests leads to a rejection of the hypothesis that the time series is stationary. According to Shao (2011) an estimation based on a self-normalized CUSUM test statistic suggests a change around October 1924. Computation of the change point estimator k̂W corresponds to a change point located around June 1924. The same change point location results from an application of the previously mentioned estimator k̂C,0 considered in Horváth and Kokoszka (1997). In this regard estimation by k̂W seems to be in good accordance with the results of alternative change point estimators. 4. Simulations We will now investigate the finite sample performance of the change point estimator k̂W and compare it to corresponding simulation results for the estimators k̂SW (based on the self-normalized Wilcoxon test statistic) and k̂C,0 (based on the CUSUM test statistic with parameter γ = 0) . For this purpose, we consider two different scenarios: 1. Normal margins: We generate fractional Gaussian noise time series (ξi )i≥1 and choose G(t) = t in Assumption 1. As a result, the simulated observa- A. Betken/Wilcoxon-based change point estimation 10 tions (Yi )i≥1 are Gaussian with autocovariance function ρ satisfying   D ρ(k) ∼ 1 − (1 − D) k −D . 2 Note that in this case the Hermite coefficient J1 (x) is not equal to 0 for all x ∈ R (see Dehling, Rooch and Taqqu (2013a)) so that m = 1, where m denotes the Hermite rank of 1{G(ξi )≤x} − F (x), x ∈ R. Therefore, Assumption 1 holds for all values of D ∈ (0, 1). 2. Pareto margins: In order to get standardized Pareto-distributed data which has a representation as a functional of a Gaussian process, we consider the transformation − 21    1 βk βk 2 −β − k(Φ(t)) G(t) = (β − 1)2 (β − 2) β−1 with parameters k, β > 0 and with Φ denoting the standard normal distribution function. Since G is a strictly decreasing function, it follows by Theorem 2 in Dehling, Rooch and Taqqu (2013a) that the Hermite rank of 1{G(ξi )≤x} − F (x), x ∈ R, is m = 1 so that Assumption 1 holds for all values of D ∈ (0, 1). To analyze the behavior of the estimators we simulated 500 time series of length 600 and added a level shift of height h after a proportion τ of the data. We have done so for several choices of h and τ . The descriptive statistics, i.e. mean, sample standard deviation (S.D.) and quartiles, are reported in Tables 1, 2, and 3 for the three change point estimators k̂W , k̂SW and k̂C,0 . The following observations, made on the basis of Tables 1, 2, and 3, correspond to the expected behavior of consistent change point estimators: • Bias and variance of the estimated change point location decrease when the height of the level shift increases. • Estimation of the time of change is more accurate for breakpoints located in the middle of the sample than estimation of change point locations that lie close to the boundary of the testing region. • High values of H go along with an increase of bias and variance. This seems natural since when there is very strong dependence, i.e. H is large, the variance of the series increases, so that it becomes harder to accurately estimate the location of a level shift. A comparison of the descriptive statistics of the estimator k̂W (based on the Wilcoxon statistic) and k̂SW (based on the self-normalized Wilcoxon statistic) shows that: • In most cases the estimator k̂SW has a smaller bias, especially for an early change point location. Nevertheless, the difference between the biases of k̂SW and k̂W is not big. • In general the sample standard deviation of k̂W is smaller than that of k̂SW . Indeed, it is only slightly better for τ = 0.25, but there is a clear difference for τ = 0.5. A. Betken/Wilcoxon-based change point estimation 11 All in all, our simulations do not give rise to choosing k̂SW over k̂W . In particular, better standard deviations of k̂W compensate for smaller biases of k̂SW . Comparing the finite sample performance of k̂W and the CUSUM-based change point estimator k̂C,0 we make the following observations: • For fractional Gaussian noise time series bias and variance of k̂C,0 tend to be slightly better, at least when τ = 0.25 and especially for relatively high level shifts. Nonetheless, the deviations are in most cases negligible. • If the change happens in the middle of a sample with normal margins, bias and variance of k̂W tend to be smaller, especially for relatively high level shifts. Again, in most cases the deviations are negligible. • For Pareto(3, 1) time series k̂W clearly outperforms k̂C,0 by yielding smaller biases and decisively smaller variances for almost every combination of parameters that has been considered. The performance of the estimator k̂C,0 surpasses the performance of k̂W only for high values of the jump height h. 400 100 200 300 H = 0.9 H = 0.8 H = 0.7 H = 0.6 0 mean absolute error 500 It is well-known that the Wilcoxon change point test is more robust against outliers in data sets than the CUSUM-like change point tests, i.e. the Wilcoxon test outperforms CUSUM-like tests if heavy-tailed time series are considered. Our simulations confirm that this observation is also reflected by the finite sample behavior of the corresponding change point estimators. 0 5000 10000 15000 20000 sample size Fig 3. The MAE of k̂W for different values of H. As noted in Remark 1, k̂W − k0 = OP (1) under the assumption of a constant change point height h. This observation is illustrated by simulations of the mean absolute error m 1 X k̂W,i − k0 , MAE = m i=1 where k̂W,i , i = 1, . . . , m, denote the estimates for k0 , computed on the basis of m = 5000 different sequences of fractional Gaussian noise time series. A. Betken/Wilcoxon-based change point estimation 12 Figure 3 depicts a plot of MAE against the sample size n with n varying between 1000 and 20000. Since k̂W − k0 = OP (1) due to Theorem 1, we expect MAE to approach a constant as n tends to infinity. This can be clearly seen in Figure 3 for H ∈ {0.6, 0.7, 0.8}. For a high intensity of dependence in the data (characterized by H = 0.9) convergence becomes slower. This is due to a slower convergence of the test statistic Wn (k) which, in finite samples, is not canceled out by the effect of a more regular behavior of the sample paths of the limit process. Table 1 Descriptive statistics of the sampling distribution of k̂W for a change in the mean based on 500 fractional Gaussian noise and Pareto time series of length 600 with Hurst parameter H and a change in mean in τ of height h. margins normal τ 0.25 h 0.5 2 0.5 0.5 1 2 Pareto(3, 1) 0.25 0.5 1 2 0.5 0.5 1 2 H = 0.6 193.840 (64.020) (150, 168, 217.25) 164.244 (27.156) (150, 153.5, 167) 153.604 (8.255) (150, 151, 154) H = 0.7 227.590 (99.788) (150, 191, 284.25) 176.362 (42.059) (150, 158, 190) 156.656 (12.393) (150, 151, 158) H = 0.8 252.408 (110.084) (157, 226.5, 335.25) 188.328 (63.751) (150, 159.5, 206.25) 164.338 (29.570) (150, 151, 164) H = 0.9 270.646 (113.720) (172.75, 250, 353) 215.108 (88.621) (150 176 256) 173.610 (41.514) (150, 152, 180.25) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 299.506 (30.586) (291, 300, 309) 300.014 (9.141) (298, 300, 302) 300.064 (1.294) (300, 300, 300) 301.870 (61.392) (274.75, 300.5, 320.25) 300.438 (18.695) (297, 300, 304) 299.922 (3.215) (300, 300, 300) 300.774 (82.610) (264, 299, 339.25) 302.592 (42.213) (293, 300 307) 299.504 (5.520) (300, 300, 300) 298.930 (98.368) (233, 299, 353) 300.902 (50.487) (290, 300, 311) 300.282 (7.494) (300, 300, 300) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 158.166 (17.762) (150, 151, 159.25) 154.160 (8.765) (150, 151, 155) 152.256 (4.852) (150, 150, 152) 164.080 (31.219) (150, 152, 168) 156.090 (13.516) (150, 151, 157) 155.592 (11.092) (150, 151, 155.25) 179.512 (58.871) (150, 154, 191.25) 164.712 (28.774) (150, 152, 168) 160.686 (24.599) (150, 151, 159) 194.126 (74.767) (150, 159, 218.25) 178.174 (54.429) (150, 152, 186) 169.374 (38.197) (150, 150, 172) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 298.072 (6.008) (297, 300, 300) 299.178 (2.712) (299, 300, 300) 299.798 (1.008) (300, 300, 300) 296.432 (13.441) (296, 300, 300) 298.744 (4.587) (299, 300, 300) 299.716 (1.543) (300, 300, 300) 293.060 (26.221) (294, 300, 301) 296.674 (11.585) (298, 300, 300) 299.384 (3.070) (300, 300, 300) 289.946 (45.739) (291, 300, 301) 296.168 (20.424) (300, 300, 300) 298.896 (6.560) (300, 300, 300) A. Betken/Wilcoxon-based change point estimation 1 mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 13 Table 2 Descriptive statistics of the sampling distribution of k̂SW for a change in the mean based on 500 replications of fractional Gaussian noise and Pareto time series of length 600 with Hurst parameter H and a change in mean in τ of height h. margins normal τ 0.25 h 0.5 2 0.5 0.5 1 2 Pareto(3, 1) 0.25 0.5 1 2 0.5 0.5 1 2 H = 0.6 172.288 (63.639) (135, 153, 183.25) 152.406 (24.840) (140, 149, 158) 148.836 (9.007) (144, 150, 152) H = 0.7 216.934 (110.934) (138, 171, 272.5) 160.618 (39.834) (139, 150.5, 172.25) 150.208 (13.575) (142.75, 150, 154) H = 0.8 242.202 (119.655) (143, 207.5, 333.5) 174.424 (70.673) (136, 150, 188.25) 153.194 (28.251) (138, 150, 158) H = 0.9 268.878 (122.615) (157, 243.5, 370.25) 204.906 (99.648) (139.75, 161.5, 243.75) 160.026 (40.979) (137.75, 150, 165) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 297.712 (43.291) (277, 297, 320) 299.052 (16.132) (290, 299, 308) 300.010 (6.054) (297, 300, 303.25) 302.204 (77.719) (262, 300, 337) 299.910 (28.907) (288, 300, 313) 299.612 (10.079) (294, 300, 305) 302.866 (96.511) (248, 298.5, 369.5) 302.386 (55.267) (277, 300, 324.25) 298.844 (14.059) (291, 300, 307) 297.662 (110.175) (215, 301, 369.5) 300.956 (62.821) (270, 300, 329) 301.424 (21.022) (289, 300, 312) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 151.562 (18.392) (142, 150, 157) 150.206 (9.116) (145, 150, 154) 149.210 (6.201) (146, 150, 152) 155.034 (32.505) (140, 150, 163) 150.272 (15.405) (143, 150, 156) 149.934 (11.821) (143, 150, 153) 165.260 (58.363) (136, 150, 173) 152.824 (25.074) (140, 150, 159.25) 151.946 (21.426) (140, 150, 156) 182.706 (83.268) (136.75, 150, 196.25) 166.602 (58.982) (136, 150, 174.25) 156.836 (39.311) (136, 150, 160.25) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 300.524 (11.841) (294, 300, 307) 300.498 (6.600) (297, 300, 304) 300.444 (4.411) (298, 300, 303) 299.488 (21.317) (290, 300, 310) 300.560 (10.383) (296, 300, 306) 300.234 (7.517) (296, 300, 304) 299.664 (37.136) (287, 300, 317) 299.520 (18.862) (292, 300, 309.25) 300.524 (11.122) (295.75, 300, 307) 295.048 (55.000) (280.75, 300, 318) 297.766 (28.308) (289, 300, 312.25) 298.840 (16.004) (292, 300, 308) A. Betken/Wilcoxon-based change point estimation 1 mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 14 Table 3 Descriptive statistics of the sampling distribution of k̂C,0 for a change in the mean based on 500 replications of fractional Gaussian noise and Pareto time series of length 600 with Hurst parameter H and a change in mean in τ of height h. margins normal τ 0.25 h 0.5 2 0.5 0.5 1 2 Pareto(3, 1) 0.25 0.5 1 2 0.5 0.5 1 2 H = 0.6 193.060 (64.917) (150, 166.5, 222) 162.028 (22.948) (150, 153, 164) 152.374 (6.249) (150, 150, 152) H = 0.7 228.948 (101.442) (151, 191.5, 286.75) 173.838 (39.845) (150, 156.5, 187.25) 154.878 (10.395) (150, 150, 156) H = 0.8 253.114 (111.182) (156.75, 226, 341.5) 187.386 (63.865) (150, 158, 206) 159.700 (22.064) (150, 151, 158) H = 0.9 271.380 (114.590) (172.75, 249.5, 354.25) 213.114 (87.356) (150, 173, 254.25) 165.940 (33.124) (150, 150, 165) mean (S.D.) quartiles mean(S.D.) quartiles mean (S.D.) quartiles 297.840 (30.249) (290, 299, 308) 299.870 (9.356) (298, 300, 302) 300.060 (1.473) (300, 300, 300) 302.060 (63.878) (276, 301, 322) 299.662 (21.281) (297, 300, 304) 299.916 (3.199) (300, 300, 300) 300.246 (84.346) (261.75, 300, 340) 303.646 (42.245) (293, 300, 307) 299.442 (5.234) (300, 300, 300) 298.910 (97.904) (236.25, 299, 353.25) 299.762 (52.492) (290, 300, 311) 300.460 (8.179) (300, 300, 300) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 175.632 (48.517) (150, 159, 185) 156.586 (14.133) (150, 152, 159) 150.314 (1.349) (150, 150, 150) 198.452 (79.303) (150, 168, 223.75) 160.350 (27.204) (150, 152, 161) 150.566 (3.984) (150, 150, 150) 205.506 (88.482) (150, 173, 251.25) 170.278 (45.402) (150, 153, 171) 152.474 (18.578) (150, 150, 150) 210.444(93.831) (150, 167, 259.5) 177.278 (66.661) (150, 150, 174) 155.496 (29.408) (150, 150, 150) mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 296.260 (22.306) (292, 300, 303.25) 298.240 (6.104) (299, 300, 300) 299.604 (1.843) (300, 300, 300) 292.904 (43.471) (288.75, 300, 305) 297.306 (9.361) (299, 300, 300) 299.228 (3.385) (300, 300, 300) 289.192 (64.033) (273.75, 300, 308.25) 293.116 (26.614) (298, 300, 300) 298.350 (8.354) (300, 300, 300) 287.966 (64.827) (285, 300, 303) 292.864 (37.601) (300, 300, 300) 297.632 (14.525) (300, 300, 300) A. Betken/Wilcoxon-based change point estimation 1 mean (S.D.) quartiles mean (S.D.) quartiles mean (S.D.) quartiles 15 A. Betken/Wilcoxon-based change point estimation 16 5. Proofs In the following let Fk and Fk+1,n denote the empirical distribution functions of the first k and last n − k realizations of Y1 , . . . , Yn , i.e. Fk (x) := k 1X 1{Yi ≤x} , k i=1 Fk+1,n (x) := n X 1 1{Yi ≤x} . n−k i=k+1 For notational convenience we write Wn (k) instead of Wk,n and SWn (k) instead of SWk,n . The proofs in this section as well as the proofs in the appendix are partially influenced by arguments that have been established in Horváth and Kokoszka (1997), Bai (1994) and Dehling, Rooch and Taqqu (2013a). In particular, some arguments are based on the empirical process non-central limit theorem of Dehling and Taqqu (1989) which states that D d−1 n,r bnλc(Fbnλc (x) − F (x)) −→ 1 (r) Jr (x)ZH (λ), r! (r) where r is the Hermite rank defined in Assumption 1, ZH is an r-th or D der Hermite process1 , H = 1 − rD ∈ 12 , 1 , and “−→” denotes conver2 gence in distribution with respect to the σ-field generated by the open balls in D ([−∞, ∞] × [0, 1]), equipped with the supremum norm. The Dudley-Wichura version of Skorohod’s representation theorem (see Shorack and Wellner (1986), Theorem 2.3.4) implies that, for our purposes, we may assume without loss of generality that sup λ∈[0,1],x∈R  1 (r) d−1 Jr (x)ZH (λ) −→ 0 n,r bnλc Fbnλc (x) − F (x) − r! almost surely. Proof of Proposition 1. The proof of Proposition 1 is based on an application of Lemma 1 in the appendix. According to Lemma 1 it holds that, under the assumptions of Proposition 1, bnλc 1 X n2 hn i=1 n X j=bnλc+1  1 1{Xi ≤Xj } − 2  P −→ Cδτ (λ), 0 ≤ λ ≤ 1, where δτ : [0, 1] −→ R is defined by ( λ(1 − τ ) for λ ≤ τ δτ (λ) = (1 − λ)τ for λ ≥ τ 1 If r = 1, the Hermite process equals a standard fractional Brownian motion process with Hurst parameter H = 1 − D . We refer to Taqqu (1979) for a general definition of Hermite 2 processes. A. Betken/Wilcoxon-based change point estimation 17 and C denotes some non-zero constant. P It directly follows that nd1n,r max1≤k≤n−1 |Wn (k)| −→ ∞. Furthermore, 1 2 n hn max 1≤k≤bn(τ −ε)c   k n X X 1 1{Xi ≤Xj } − 2 i=1 j=k+1 converges in probability to C sup δτ (λ) = C(τ − ε)(1 − τ ) 0≤λ≤τ −ε for any 0 ≤ ε < τ . For ε > 0 define 1 n2 hn Zn,ε := max 1≤k≤bnτ c |Wn (k)| − 1 n2 hn max 1≤k≤bn(τ −ε)c |Wn (k)| . P As Zn,ε −→ C(1 − τ )ε, it follows that P (k̂W < bn(τ − ε)c) = P (Zn,ε = 0) −→ 0. An analogous line of argument yields P (k̂W > bn(τ + ε)c) −→ 0. All in all, it follows that for any ε > 0 ! k̂W − τ > ε = 0. n lim P n−→∞ This proves consistency of the change point estimator which is based on the Wilcoxon test statistic. In the following it is shown that n1 k̂SW is a consistent estimator, too. For this purpose, we consider the process SWn (bnλc), 0 ≤ λ ≤ 1. According to Betken (2016) the limit of the self-normalized Wilcoxon test statistic can be obtained by an application of the continuous mapping theorem to the process bnλc 1 X an i=1 n X j=bnλc+1  1 1{Xi ≤Xj } − 2  , 0 ≤ λ ≤ 1, where an denotes an appropriate normalization. Therefore, it follows by the corresponding argument in Betken (2016) that P SWn (bnλc) −→  Rλ 0 |δτ (λ)| 2 R1 δτ (t) − λt δτ (λ) dt + λ δτ (t) − 2 1−t 1−λ δτ (λ)  12 dt A. Betken/Wilcoxon-based change point estimation 18 uniformly in λ ∈ [0, 1]. Elementary calculations yield √ √ 3λ 1 − λ sup SWn (k) −→ sup , (τ − λ) τ1 ≤λ≤τ −ε bnτ1 c≤k≤k0 −nε √ √ 3 λ(1 − λ) P . sup SWn (k) −→ sup (τ − λ) τ +ε≤λ≤τ2 k0 +nε≤k≤bnτ2 c P P As SWn (k0 ) −→ ∞ due to Theorem 2 in Betken (2016), we conclude that P (k̂SW > k0 + nε) and P (k̂SW < k0 − nε) converge to 0 in probability. This P proves n1 k̂SW −→ τ . Proof of Theorem 1. In the following we write k̂ instead of k̂W . For convenience, we assume that h > 0 under fixed changes, and that for some n0 ∈ N hn > 0 for all n ≥ n0 under local changes, respectively. Furthermore, we subsume both changes under the general assumption that limn→∞ hn = h (under fixed changes hn = h for all n ∈ N, under local changes h = 0). In order to prove Theorem 1, we need to show that for all ε > 0 there exists an n(ε) ∈ N and an M > 0 such that   P k̂ − k0 > M mn < ε for all n ≥ n(ε). For M ∈ R+ define Dn,M := {k ∈ {1, . . . , n − 1} | |k − k0 | > M mn }. We have !   P k̂ − k0 > M mn ≤ P sup |Wn (k)| ≥ |Wn (k0 )| ≤ P1 + P2 k∈Dn,M with ! P1 := P sup (Wn (k) − Wn (k0 )) ≥ 0 , k∈Dn,M ! P2 := P sup (−Wn (k) − Wn (k0 )) ≥ 0 . k∈Dn,M Note that Dn,M = Dn,M (1) ∪ Dn,M (2), where Dn,M (1) := {k ∈ {1, . . . , n − 1} | k0 − k > M mn } , Dn,M (2) := {k ∈ {1, . . . , n − 1} | k − k0 > M mn } . Therefore, P2 ≤ P2,1 + P2,2 , where ! P2,1 := P sup (−Wn (k) − Wn (k0 )) ≥ 0 , k∈Dn,M (1) ! P2,2 := P sup k∈Dn,M (2) (−Wn (k) − Wn (k0 )) ≥ 0 . A. Betken/Wilcoxon-based change point estimation 19 In the following we will consider the first summand only. (For the second summand analogous implications result from the same argument.) For this, we define cn (k) := δn (k)∆(hn ), W where ( δn (k) := k(n − k0 ), k0 (n − k), k ≤ k0 k > k0 and Z (F (x + hn ) − F (x)) dF (x). ∆(hn ) := Note that P2,1 ≤ P  sup !  cn (k) − Wn (k) + W cn (k0 ) − Wn (k0 ) ≥ W cn (k0 ) W k∈Dn,M (1) ≤P ! c Wn (bnλc) − Wn (bnλc) ≥ k0 (n − k0 )∆(hn ) . 2 sup λ∈[0,τ ] We have cn (bnλc) Wn (bnλc) − W sup λ∈[0,τ ] bnλc n X X = sup   Z 1{Yi ≤Yj +hn } − F (x + hn )dF (x) λ∈[0,τ ] i=1 j=bnτ c+1 bnλc bnτ c X X +  1{Yi ≤Yj } − i=1 j=bnλc+1 1 2  . Due to Lemma 2 in the appendix and Theorem 1.1 in Dehling, Rooch and Taqqu (2013a) 2 sup cn (bnλc) = OP (ndn,r ) , Wn (bnλc) − W λ∈[0,τ ] i.e. for all ε > 0 there exists a K > 0 such that ! P 2 sup cn (bnλc) ≥ Kndn,r Wn (bnλc) − W <ε λ∈[0,τ ] for all n. Furthermore, k0 (n − k0 )∆(hn ) ∼ Cn2 hn for some constant C. Note that Kndn,r ≤ k0 (n − k0 )∆(hn ) if and only if K≤ k0 n − k0 ∆(hn ) nhn . n n hn dn,r A. Betken/Wilcoxon-based change point estimation 20 The right  hand  side of the above inequality diverges if hn = h is fixed or if n −1 hn = o dn,r . Therefore, it is possible to find an n(ε) ∈ N such that ! P2,1 ≤ P 2 sup cn (bnλc) ≥ k0 (n − k0 )∆(hn ) Wn (bnλc) − W λ∈[0,τ ] ! ≤P 2 sup cn (bnλc) ≥ Kndn,r Wn (bnλc) − W λ∈[0,τ ] <ε for all n ≥ n(ε). We will now turn to the summand P1 . We have P1 ≤ P1,1 + P1,2 , where ! P1,1 := P sup Wn (k) − Wn (k0 ) ≥ 0 , k∈Dn,M (1) ! P1,2 := P sup Wn (k) − Wn (k0 ) ≥ 0 . k∈Dn,M (2) In the following we will consider the first summand only. (For the second summand analogous implications result from the same argument.) We define a random sequence kn , n ∈ N, by choosing kn ∈ Dn,M (1) such that   cn (k) + W cn (k0 ) − Wn (k0 ) Wn (k) − W sup k∈Dn,M (1) cn (kn ) + W cn (k0 ) − Wn (k0 ). = Wn (kn ) − W Note that for any sequence kn , n ∈ N, with kn ∈ Dn,M (1) cn (k0 ) − W cn (kn ) = (n − k0 )ln ∆(hn ) W where ln := k0 − kn . Since kn ∈ Dn,M (1) and mn −→ ∞ we have ln dln ,r r r = ln1−H L− 2 (ln ) ≥ (M mn )1−H L− 2 (M mn ) for n sufficiently large. Thus, we have r  n−k m 2 1 c 0 n 1−H L (mn ) c Wn (k0 ) − Wn (kn ) ≥ M ∆(hn ). r ndln ,r n dmn ,r L 2 (M mn ) If hn is fixed, the right hand side of the inequality diverges. Under local changes the right hand side asymptotically behaves like Z 1−H (1 − τ )M f 2 (x)dx, A. Betken/Wilcoxon-based change point estimation 21 d n ,r since, in this case, hn ∼ m mn due to the assumptions of Theorem 1. In any case, for δ > 0 it is possible to find an n0 ∈ N such that Z  1 c cn (kn ) ≥ M 1−H (1 − τ ) f 2 (x)dx − δ Wn (k0 ) − W ndln ,r for all n ≥ n0 . All in all, the previous considerations show that there exists an n0 ∈ N and a constant K such that for all n ≥ n0 !   1 cn (k) + W cn (k0 ) − Wn (k0 ) ≥ b(M ) P1,1 ≤ P sup Wn (k) − W k∈Dn,M (1) ndk0 −k,r where b(M ) := KM 1−H − δ with δ > 0 fixed. Some elementary calculations show that for k ≤ k0 cn (k) + W cn (k0 ) − Wn (k0 ) = An,1 (k) + An,2 (k) + An,3 (k) + An,4 (k), Wn (k) − W where Z An,1 (k) := −(n − k0 )(k0 − k) (Fk,k0 (x + hn ) − F (x + hn )) dFk0 ,n (x), Z An,2 (k) := −(n − k0 )(k0 − k) (Fk0 ,n (x) − F (x)) dF (x + hn ), Z An,3 (k) := (k0 − k)k (Fk (x) − F (x)) dFk,k0 (x), Z An,4 (k) := −k(k0 − k) (Fk,k0 (x) − F (x)) dF (x). Thus, for n ≥ n0 P1,1 ≤ P sup k∈Dn,M (1) ≤ 4 X P 1 4 X ndk0 −k,r i=1 1 sup k∈Dn,M (1) i=1 ndk0 −k,r ! |An,i (k)| ≥ b(M ) ! 1 |An,i (k)| ≥ b(M ) . 4 For each i ∈ {1, . . . , 4} it will be shown that P 1 sup k∈Dn,M (1) ndk0 −k,r ! 1 ε |An,i (k)| ≥ b(M ) < 4 4 for n and M sufficiently large. 1. Note that sup k∈Dn,M (1) ≤ sup 1 |An,1 (k)| ndk0 −k,r sup d−1 k0 −k,r (k0 − k) (Fk,k0 (x) − F (x)) . k∈Dn,M (1) x∈R A. Betken/Wilcoxon-based change point estimation 22 Due to stationarity sup d−1 k0 −k,r (k0 − k) (Fk,k0 (x) − F (x)) sup k∈Dn,M (1) x∈R D = sup d−1 k0 −k,r (k0 − k) (Fk0 −k (x) − F (x)) . sup k∈Dn,M (1) x∈R Note that sup d−1 k0 −k,r (k0 − k) (Fk0 −k (x) − F (x)) sup k∈Dn,M (1) x∈R ≤ sup d−1 k0 −k,r (k0 − k) (Fk0 −k (x) − F (x)) − sup k∈Dn,M (1) x∈R + 1 (r) Z (1)Jr (x) r! H 1 (r) Z (1) sup |Jr (x)| . r! H x∈R Since sup d−1 n,r n (Fn (x) − F (x)) − x∈R 1 (r) Z (1)Jr (x) −→ 0 a.s. r! H if n −→ ∞, and as k0 − k ≥ M mn with mn −→ ∞, it follows that sup sup d−1 k0 −k,r (k0 − k) (Fk0 −k (x) − F (x)) − k∈Dn,M (1) x∈R 1 (r) Z (1)Jr (x) r! H converges to 0 almost surely. Therefore, P 1 sup k∈Dn,M (1) ndk0 −k,r 1 |An,1 (k)| ≥ b(M ) 4 ! 1 ≤P sup sup − k) (Fk,k0 (x) − F (x)) ≥ b(M ) 4 x∈R k∈Dn,M (1)   1 1 ε (r) ≤P ZH (1) sup |Jr (x)| ≥ b(M ) + . r! 4 8 x∈R ! d−1 k0 −k,r (k0 for n sufficiently large. Note that supx∈R |Jr (x)| < ∞. Furthermore, it is well-known that all moments of Hermite processes are finite. As a result, it follows by Markov’s inequality that for some M0 ∈ R   1 1 4r! ε (r) (r) P ZH (1) sup |Jr (x)| ≥ b(M ) ≤ E ZH (1) < r! 4 sup |Jr (x)| b(M ) 8 x∈R x∈R for all M ≥ M0 . 2. We have 1 |An,2 (k)| ndk0 −k,r Z −1 ≤ dn,r (n − k0 ) (Fk0 ,n (x) − F (x)) dF (x + hn ) sup k∈Dn,M (1) A. Betken/Wilcoxon-based change point estimation 23 for n sufficiently large. As a result, 1 sup k∈Dn,M (1) ndk0 −k,r |An,2 (k)| ≤ sup d−1 n,r (n − k0 ) (Fk0 ,n (x) − F (x)) . x∈R Due to the empirical process non-central limit theorem of Dehling and Taqqu (1989) we have D sup d−1 n,r (n − k0 ) (Fk0 ,n (x) − F (x)) −→ x∈R 1 (r) (r) Z (1) − ZH (τ )) sup |Jr (x)| . r! H x∈R Moreover, 1 D 1 (r) (r) (r) Z (1) − ZH (τ ) sup |Jr (x)| = (1 − τ )H ZH (1) sup |Jr (x)| r! H r! x∈R x∈R (r) since ZH is a H-self-similar process with stationary increments. Thus, we have ! 1 1 P sup |An,2 (k)| ≥ b(M ) 4 k∈Dn,M (1) ndk0 −k,r   1 ε 1 (r) H (1 − τ ) ZH (1) sup |Jr (x)| ≥ b(M ) + ≤P r! 4 8 x∈R for n sufficiently large. Again, it follows by Markov’s inequality that   1 1 ε (r) P (1 − τ )H ZH (1) sup |Jr (x)| ≥ b(M ) < r! 4 8 x∈R for M sufficiently large. 3. Note that 1 ndk0 −k,r |An,3 (k)| ≤ d−1 n,r k Z (Fk (x) − F (x)) dFk,k0 (x) for n sufficiently large. Therefore, sup k∈Dn,M (1) 1 ndk0 −k,r |An,3 (k)| ≤ sup x∈R,0≤λ≤1  d−1 n,r bnλc Fbnλc (x) − F (x) . The expression on the right hand side of the inequality converges in distribution to 1 (r) sup Z (λ) sup |Jr (x)| r! 0≤λ≤1 H x∈R due to the empirical process non-central limit theorem. Since n o n o D (r) (r) ZH (λ), 0 ≤ λ ≤ 1 = λH ZH (1), 0 ≤ λ ≤ 1 , A. Betken/Wilcoxon-based change point estimation 24 we have sup 0≤λ≤1 (r) D (r) ZH (λ) = |ZH (1)|. As a result, the aforementioned argument yields ! 1 P sup |An,3 (k)| ≥ b(M ) 4 k∈Dn,M (1) ndk0 −k,r   1 1 ε (r) ZH (1) sup |Jr (x)| ≥ b(M ) + ≤P r! 4 8 x∈R ε < 4 1 for n and M sufficiently large. 4. We have sup k∈Dn,M (1) ≤ sup 1 ndk0 −k,r |An,4 (k)| sup d−1 k0 −k,r (k0 − k) (Fk,k0 (x) − F (x)) . k∈Dn,M (1) x∈R Hence, the same argument that has been used to obtain an analogous result for An,1 can be applied to conclude that ! ε 1 1 P sup |An,4 (k)| ≥ b(M ) < 4 4 k∈Dn,M (1) ndk0 −k,r for n and M sufficiently large. All in all, it follows that for all ε > 0 there exists an n(ε) ∈ N and an M > 0 such that   P k̂ − k0 > M mn < ε for all n ≥ n(ε). This proves Theorem 1. Proof of Theorem 2. Note that Wn2 (k0 + bmn sc) − Wn2 (k0 ) = (Wn (k0 + bmn sc) − Wn (k0 )) (Wn (k0 + bmn sc) + Wn (k0 )) . We will show that (with an appropriate normalization) Wn (k0 +bmn sc)−Wn (k0 ) converges in distribution to a non-deterministic limit process whereas Wn (k0 + bmn sc) + Wn (k0 ) (with stronger normalization) converges in probability to a deterministic expression. For notational convenience we write dmn instead of A. Betken/Wilcoxon-based change point estimation 25 dmn ,1 , J instead of J1 , k̂ instead of k̂W and we define ln (s) := k0 + bmn sc. We have Wn (k0 + bmn sc) − Wn (k0 ) = Ṽn (ln (s)) + Vn (ln (s)), where Ṽn (l) =  k0 P    −    − n P 1{Yi ≤Yj +hn } − 1{Yi ≤Yj } i=l+1 j=k0 +1 k0 l P P 1{Yi ≤Yj +hn } − 1{Yi ≤Yj }   if s < 0 if s > 0 i=1 j=k0 +1 and Vn (l) =  k0 l P P     1{Yi ≤Yj } − i=1 j=l+1 l n P  P    1 2  1{Yi ≤Yj } − i=k0 +1 j=l+1 − 1 2 k0 P n P i=l+1 j=k0 +1 k0 l  P P − i=1 j=k0 +1 1 2  1{Yi ≤Yj } − 1 2 1{Yi ≤Yj } − if s < 0 .  if s > 0 We will show that nd1m Ṽn (ln (s)) converges to h(s; τ ) in probability and n R that nd1m Vn (ln (s)) converges in distribution to sign(s)BH (s) J(x)dF (x) in n D [−M, M ]. We rewrite Ṽn (ln (s)) in the following way: Z  Ṽn (ln (s)) = −(k0 − ln (s))(n − k0 ) Fln (s),k0 (x + hn ) − Fln (s),k0 (x) dFk0 ,n (x) if s < 0, Z Ṽn (ln (s)) = −k0 (ln (s) − k0 ) (Fk0 (x + hn ) − Fk0 (x)) dFk0 ,ln (s) (x) if s > 0. For s < 0 the limit of Ṽn (ln (s)) corresponds to the limit of 1 ndmn −(1 − τ )d−1 mn (k0 − ln (s)) Z (F (x + hn ) − F (x)) dF (x) due to Lemma 3 and stationarity of the random sequence Yi , i ≥ 1. Note that Z d−1 (k − l (s)) (F (x + hn ) − F (x)) dF (x) n mn 0 Z 1 = −d−1 (F (x + hn ) − F (x)) dF (x). mn bmn schn hn R d The above expression converges to −s f 2 (x)dx, since hn ∼ mmnn . A. Betken/Wilcoxon-based change point estimation For s > 0 the limit of 1 ndmn 26 Ṽn (ln (s)) corresponds to the limit of −τ d−1 mn (ln (s) − k0 ) Z (F (x + hn ) − F (x)) dF (x) due to Lemma 3 and stationarity of the random sequence Yi , i ≥ 1. Note that Z d−1 (l (s) − k ) (F (x + hn ) − F (x)) dF (x) 0 mn n Z 1 = d−1 (F (x + hn ) − F (x)) dF (x) mn bmn schn hn R d The above expression converges to s f 2 (x)dx, since hn ∼ mmnn . All in all, it follows that nd1m Ṽn (ln (s)) converges to h(s; τ ) defined by n ( h(s; τ ) = R s(1 − τ ) f 2 (x)dx R −sτ f 2 (x)dx In the following it is shown that 1 ndmn if s ≤ 0 . if s > 0 Vn (ln (s)) converges in distribution to Z sign(s)BH (s) J(x)dF (x), −M ≤ s ≤ M. Note that if s < 0, Z  Fln (s),k0 (x) − F (x) dFln (s) (x) Z  − (k0 − ln (s))(n − k0 ) Fln (s),k0 (x) − F (x) dFk0 ,n (x) Z + ln (s)(k0 − ln (s)) (Fln (s) (x) − F (x))dF (x) Z + (k0 − ln (s))(n − k0 ) (Fk0 ,n (x) − F (x)) dF (x). Vn (ln (s)) = − ln (s)(k0 − ln (s)) If s > 0, we have Z  Vn (ln (s)) =(ln (s) − k0 )(n − ln (s)) Fk0 ,ln (s) (x) − F (x) dFln (s),n (x) Z  + k0 (ln (s) − k0 ) Fk0 ,ln (s) (x) − F (x) (x)dFk0 (x) Z  − (ln (s) − k0 )(n − ln (s)) Fln (s),n (x) − F (x) dF (x) Z − k0 (ln (s) − k0 ) (Fk0 (x) − F (x)) dF (x). A. Betken/Wilcoxon-based change point estimation 27 The arguments that appear in the proof of Lemma 3 can also be applied to show that the limit of nd1m Vn (ln (s)) corresponds to the limit of n 1 (A1,n (s) + A2,n (s) + A3,n (s)) , ndmn where Z  Fln (s),k0 (x) − F (x) dF (x) A1,n (s) := (−ln (s) − n + k0 )(k0 − ln (s)) if s < 0, Z A1,n (s) := (n − ln (s) + k0 )(ln (s) − k0 )  Fk0 ,ln (s) (x) − F (x) dF (x) if s > 0, ( R (k0 − ln (s))ln (s) (Fln (s) (x) − F (x))dF (x) if s < 0  R A2,n (s) := , −(ln (s) − k0 )(n − ln (s)) Fln (s),n (x) − F (x) dF (x) if s > 0 ( R (k0 − ln (s))(n − k0 ) (Fk0 ,n (x) − F (x)) dF (x) if s < 0 R A3,n (s) := . −(ln (s) − k0 )k0 (Fk0 (x) − F (x)) dF (x) if s > 0 Note that for s < 0 1 1 A2,n (s) = − bmn scln (s) ndmn ndmn Z (Fln (s) (x) − F (x))dF (x). The above expression converges to 0 uniformly in s, since since Z l (s) (Fln (s) (x) − F (x))dF (x) sup d−1 n n mn dmn = o( dnn ) and −M ≤s≤0 ≤ sup d−1 n bnλc(Fbnλc (x) − F (x)) − BH (λ)J(x) x,λ Z + sup |BH (λ)| J(x)dF (x) , 0≤λ≤1 R i.e. sup−M ≤s≤0 d−1 n ln (s) (Fln (s) (x) − F (x))dF (x) is bounded in probability. An analogous argument shows that nd1m A3,n (s) vanishes if n tends to ∞. n Therefore, it remains to show that nd1m A1,n (s) converges in distribution to n a non-deterministic expression. Due to stationarity Z  1 D n + bmn sc −1 A1,n (s) = dmn bmn sc F−bmn sc (x) − F (x) dF (x) ndmn n A. Betken/Wilcoxon-based change point estimation 28 for s < 0. As a result, nd1m A1,n (s) converges in distribution to n R −BH (s) J(x)dF (x). If s > 0, an application of the previous arguments shows that nd1m A2,n (s) n and nd1m A3,n (s) converge to 0 whereas nd1m A1,n (s) converges in distribution nR n to BH (s) J(x)dF (x). All in all, it follows that Z 1 D (Wn (k0 + bmn sc) − Wn (k0 )) −→ sign(s)BH (s) J(x)dF (x) + h(s; τ ) ndmn in D[−M, M ]. Furthermore, it follows that with the stronger normalization hn n2 the limit of hn1n2 Wn (k0 + bmn sc) corresponds to the limit of hn1n2 Wn (k0 ). We have Z 1 1 Wn (k0 ) = k0 (n − k0 ) (Fk0 (x + hn ) − Fk0 (x)) dFk0 ,n (x) hn n2 hn n2   k0 n X 1 X 1 + 1 − . {Yi ≤Yj } hn n2 i=1 2 j=k0 +1 The second summand on the right hand side vanishes as n = o (n/dn ). Due to Lemma 3 the limit of tends Rto ∞, since h−1 n k (F (x + h ) − F (x)) dFk0 ,n (x) corresponds to the limit of d−1 0 k n k n 0 0 R d−1 k (F (x + h ) − F (x)) dF (x). Therefore, 0 n n Z Z h−1 (F (x + h ) − F (x)) dF (x) −→ f 2 (x)dx a.s. k0 n k0 k0 ,n n 0) In addition, kn0 (n−k −→ τ (1 − τ ). n From this we can conclude that 1 P (Wn (k0 + mn s) + Wn (k0 )) −→ 2τ (1 − τ ) hn n2 Z f 2 (x)dx in D[−M, M ]. This completes the proof of the first assertion in Theorem 2. In order to show that   Z D m−1 ( k̂ − k ) −→ argmax sign(s)B (s) J(x)dF (x) + h(s; τ ) , 0 H −∞<s<∞ n we make use of Lemma 4. For this purpose, we note that according to Lifshits’ criterion for unimodality of Gaussian processes (see RTheorem 1.1 in Ferger (1999)) the random function GH,τ (s) = sign(s)BH (s) J(x)dF (x) + h(s; τ ) attains its maximal value in [−M, M ] at a unique point with probability 1 for every M > 0. Hence, an application of Lemma 4 in the appendix yields sargmaxs∈[−M,M ]  D 1 Wn2 (k0 + bmn sc) − Wn2 (k0 ) −→ argmaxs∈[−M,M ] GH,τ (s). en A. Betken/Wilcoxon-based change point estimation 29 It remains to be shown that instead of considering the sargmax in [−M, M ] we may as well consider the smallest argmax in R. By the law of the iterated logarithm for fractional Brownian motions we have lim|s|→∞ BHs(s) = 0 a.s. so R that sign(s)BH (s) J(x)dF (x) + h(s; τ ) −→ −∞ a.s. if |s| → ∞. Therefore, the limit corresponds to argmaxs∈(−∞,∞) GH,τ (s) if M is sufficiently large. For M > 0 define   ˆ |Wn (i)| . k̂(M ) := min k : |k0 − k| ≤ M mn , |Wn (k)| = max |k0 −i|≤M mn Note that  sargmaxs∈[−M,M ] Wn2 (k0 + bmn sc) − Wn2 (k0 )  − sargmaxs∈(−∞,∞) Wn2 (k0 + bmn sc) − Wn2 (k0 ) ˆ = m−1 k̂(M ) − k̂ + OP (1). n Therefore, we have to show that for some M ∈ R P ˆ m−1 k̂(M ) − k̂ −→ 0 n as n tends to infinity. Note that     ˆ P k̂ = k̂(M ) = P k̂ − k0 ≤ M mn   = 1 − P k̂ − k0 > M mn . Furthermore, we have    lim lim inf 1 − P |k̂ − k0 | > M mn M →∞ n→∞   = 1 − lim lim sup P |k̂ − k0 | > M mn M →∞ n→∞ =1 because |k̂ − k0 | = OP (mn ) by Theorem 1. As a result, we have   ˆ lim lim inf P k̂ = k̂(M ) = 1. M →∞ n→∞ Hence, for all ε > 0 there is an M0 ∈ R and an n0 ∈ N such that   ˆ P k̂ 6= k̂(M ) < ε for all n ≥ n0 and all M ≥ M0 . This concludes the proof of Theorem 2. A. Betken/Wilcoxon-based change point estimation 30 References Andrews, D. W. K. (1993). Tests for parameter instability and structural change with unknown change point. Econometrica 61 821 – 856. Bai, J. (1994). Least squares estimation of a shift in linear processes. Journal of Time Series Analysis 15 453 – 472. Bai, J. (1997). Estimation of a change point in multiple regression models. Review of Economics and Statistics 79 551 – 563. Balke, N. S. (1993). Detecting level shifts in time series. Journal of Business & Economic Statistics 11 81 – 92. Ben Hariz, S. and Wylie, J. J. (2005). Convergence rates for estimating a change-point with long-range dependent sequences. Comptes Rendus Mathematique 341 765 – 768. Beran, J. and Feng, Y. (2002). SEMIFAR models - a semiparametric framework for modelling trends, long-range dependence and nonstationarity. Computational Statistics & Data Analysis 40 393 – 419. Berkes, I., Hörmann, S. and Schauer, J. (2009). Asymptotic results for the empirical process of stationary sequences. Stochastic Processes and their Applications 119 1298 – 1324. Berkes, I. and Philipp, W. (1977). An almost sure invariance principle for the empirical distribution function of mixing random variables. Probability Theory and Related Fields 41 115 – 137. Betken, A. (2016). Testing for change-points in long-range dependent time series by means of a self-normalized Wilcoxon test. Journal of Time Series Analysis 20 785 – 809. Betken, A. and Wendler, M. (2015). Subsampling for General Statistics under Long Range Dependence. arXiv:1509.05720. Bingham, N. H., Goldie, C. M. and Teugels, J. L. (1987). Regular variation. Cambridge University Press. Cobb, G. W. (1978). The problem of the Nile: Conditional solution to a changepoint problem. Biometrika 65 243 – 251. Darkhovskh, B. S. (1976). A nonparametric method for the a posteriori detection of the “disorder”time of a sequence of independent random variables. Theory of Probability & Its Applications 21 178 – 183. Dehling, H., Durieu, O. and Tusche, M. (2014). Approximating class approach for empirical processes of dependent sequences indexed by functions. Bernoulli 20 1372 – 1403. Dehling, H., Rooch, A. and Taqqu, M. S. (2013a). Non-parametric changepoint tests for long-range dependent data. Scandinavian Journal of Statistics 40 153 – 173. Dehling, H., Rooch, A. and Taqqu, M. S. (2013b). Power of change-point tests for long-range dependent data. arXiv:1303.4917. Dehling, H. and Taqqu, M. S. (1989). The empirical process of some longrange dependent sequences with an application to U-statistics. The Annals of Statistics 17 1767 – 1783. A. Betken/Wilcoxon-based change point estimation 31 Deo, R. S. and Hurvich, C. M. (1998). Linear trend with fractionally integrated errors. Journal of Time Series Analysis 19 379 – 397. Ferger, D. (1999). On the uniqueness of maximizers of Markov–Gaussian processes. Statistics & Probability Letters 45 71 – 77. Giraitis, L., Leipus, R. and Surgailis, D. (1996). The change-point problem for dependent observations. Journal of Statistical Planning and Inference 53 297 – 310. Giraitis, L. and Surgailis, D. (1999). Central limit theorem for the empirical process of a linear sequence with long memory. Journal of Statistical Planning and Inference 80 81 – 93. Horváth, L. and Kokoszka, P. (1997). The effect of long-range dependence on change-point estimators. Journal of Statistical Planning and Inference 64 57 – 81. Kiefer, J. (1972). Skorohod embedding of multivariate RV’s, and the sample DF. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete 24 1 – 35. Kokoszka, P. and Leipus, R. (1998). Change-point in the mean of dependent observations. Statistics & Probability Letters 40 385 – 393. Kuan, C. M. and Hsu, C. C. (1998). Change-point estimation of fractionally integrated processes. Journal of Time Series Analysis 19 693 – 708. Lavielle, M. and Moulines, E. (2000). Least-squares estimation of an unknown number of shifts in a time series. Journal of Time Series Analysis 21 33 – 59. Macneill, I. B., Tang, S. M. and Jandhyala, V. K. (1991). A Search for the Source of the Nile’s Change-Points. Environmetrics 2 341 – 375. Müller, D. W. (1970). On Glivenko-Cantelli convergence. Probability Theory and Related Fields 16 195 – 210. Philipp, W. and Pinzur, L. (1980). Almost sure approximation theorems for the multivariate empirical process. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete 54 1 – 13. Seijo, E., Sen, B. et al. (2011). A continuous mapping theorem for the smallest argmax functional. Electronic Journal of Statistics 5 421 – 439. Shao, X. (2011). A simple test of changes in mean in the possible presence of long-range dependence. Journal of Time Series Analysis 32 598 – 606. Shao, X. and Zhang, X. (2010). Testing for change points in time series. Journal of the American Statistical Association 105 1228 – 1240. Shorack, G. R. and Wellner, J. A. (1986). Empirical processes with applications to statistics. John Wiley & Sons, New York. Taqqu, M. S. (1979). Convergence of integrated processes of arbitrary Hermite rank. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete 50 53 – 83. Wang, L. (2007). Gradual changes in long memory processes with applications. Statistics 41 221 – 240. Wu, W. B. and Zhao, Z. (2007). Inference of trends in time series. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 69 391 – 410. A. Betken/Wilcoxon-based change point estimation 32 Appendix A: Auxiliary Results In the following we prove some Lemmas that are needed for the proofs of our main results. Lemma 1 characterizes the asymptotic behavior of the Wilcoxon process under the assumption of a change-point in the mean. It is used to prove consistency of the change-point estimators k̂W and k̂SW . Lemma 1. Define δτ : [0, 1] −→ R by ( λ(1 − τ ) δτ (λ) = (1 − λ)τ for λ ≤ τ . for λ ≥ τ Assume that Assumption 1 holds and that either a) hn = h with h 6= 0, or b) limn→∞ hn = 0 with h−1 n =o  n  dn,r and F has a bounded density f . Then, we have bnλc 1 X n2 hn i=1 n X j=bnλc+1  1 1{Xi ≤Xj } − 2  P −→ Cδτ (λ), 0 ≤ λ ≤ 1, where (1 R Rh C := (F (x + h) − F (x)) dF (x) if hn = h, h 6= 0, if limn→∞ hn = 0 and h−1 n =o 2 f (x)dx  n dn,r . Proof. First, consider the case hn = h with h 6= 0. For bnλc ≤ bnτ c we have bnλc 1 X n2 i=1 n X j=bnλc+1 bnλc =  1 X n2 i=1 1 1{Xi ≤Xj } − 2 n X   1{Yi ≤Yj +h} − j=bnτ c+1 1 2  + bnλc 1 X n2 i=1 bnτ c X  1{Yi ≤Yj } − j=bnλc+1 1 2  . By Lemma 1 in Betken (2016) the first summand Ron the right hand side of the equation converges in probability to λ(1 − τ ) (F (x + h) − F (x)) dF (x) uniformly in λ ≤ τ . The second summand vanishes as n tends to ∞. If bnλc > bnτ c, bnλc 1 X n2 i=1 n X j=bnλc+1 bnτ c =  1 X n2 i=1 1 1{Xi ≤Xj } − 2 n X j=bnλc+1   1{Yi ≤Yj +h} − 1 2  + 1 n2 bnλc X n X i=bnτ c+1 j=bnλc+1   1 1{Yi ≤Yj } − . 2 A. Betken/Wilcoxon-based change point estimation 33 In this case, the first summand on the right hand side of the equation converges R in probability to (1 − λ)τ (F (x + h) − F (x)) dF (x) uniformly in λ ≥ τ due to Lemma 1 in Betken (2016) while the second summand converges in probability to zero. All in all, it follows that bnλc 1 X n2 i=1 n X  j=bnλc+1 1 1{Xi ≤Xj } − 2  Z P −→ δτ (λ) (F (x + h) − F (x)) dF (x) uniformly in λ ∈ [0, 1]. If limn→∞ hn = 0, the process bnλc 1 X ndn,r i=1 − n X  1{Xi ≤Xj } − j=bnλc+1 1 2  Z n dn,r (F (x + hn ) − F (x)) dF (x), 0 ≤ λ ≤ 1, δτ (λ) converges in distribution to Z   1 (r) (r) Jr (x)dF (x) ZH (λ) − λZH (1) , 0 ≤ λ ≤ 1, r! due to Theorem   3.1 in Dehling, Rooch and Taqqu (2013b). By assumption n −1 hn = o dn,r , so that bnλc 1 X n2 hn i=1 n X  1{Xi ≤Xj } − j=bnλc+1 1 2  P Z −→ δτ (λ) f 2 (x)dx, 0 ≤ λ ≤ 1. The proof of Theorem 1, which establishes a convergence rate for the estimator k̂W , requires the following result: Lemma 2. Suppose that Assumption 1 holds and let hn , n ∈ N, be a sequence of real numbers with limn→∞ hn = h. 1. The process bnλc 1 X ndn,r i=1 n X  Z 1{Yi ≤Yj +hn } −  F (x + hn )dF (x) , 0 ≤ λ ≤ τ, j=bnτ c+1 converges in distribution to Z 1 (r) (1 − τ ) ZH (λ) Jr (x + h)dF (x) r! Z 1  (r) (r) −λ ZH (1) − ZH (τ ) Jr (x)dF (x + h) r! uniformly in λ ≤ τ . A. Betken/Wilcoxon-based change point estimation 34 2. The process bnτ c 1 X ndn,r i=1 n X  Z 1{Yi ≤Yj +hn } −  F (x + hn )dF (x) , τ ≤ λ ≤ 1, j=bnλc+1 converges in distribution to Z 1 (r) (1 − λ) ZH (τ ) Jr (x + h)dF (x) r! Z 1  (r) (r) ZH (1) − ZH (λ) Jr (x)dF (x + h) −τ r! uniformly in λ ≥ τ . Proof. We give a proof for the first assertion only as the convergence of the second term follows by an analogous argument. The steps in this proof correspond to the argument that proves Theorem 1.1 in Dehling, Rooch and Taqqu (2013a). For λ ≤ τ it follows that bnλc X n X Z 1{Yi ≤Yj +hn } = (n − bnτ c) bnλc Fbnλc (x + hn )dFbnτ c+1,n (x). i=1 j=bnτ c+1 This yields the following decomposition: bnλc 1 X ndn,r i=1 n X   Z 1{Yi ≤Yj +hn } − F (x + hn )dF (x) j=bnτ c+1 Z  n − bnτ c −1 = dn,r bnλc Fbnλc (x + hn ) − F (x + hn ) dFbnτ c+1,n (x) n Z  n − bnτ c −1 + dn,r bnλc F (x + hn )d Fbnτ c+1,n − F (x). n For the first summand we have Z  sup d−1 bnλc Fbnλc (x + hn ) − F (x + hn ) dFbnτ c+1,n (x) n,r 0≤λ≤τ Z 1 (r) − ZH (λ) Jr (x + h)dF (x) r! Z  ≤ sup d−1 n,r bnλc Fbnλc (x + hn ) − F (x + hn ) 0≤λ≤τ − 1 (r) Z (λ)Jr (x + hn )dFbnτ c+1,n (x) r! H Z + 1 (r) sup Z (λ) r! 0≤λ≤τ H + 1 (r) sup Z (λ) r! 0≤λ≤τ H (Jr (x + hn ) − Jr (x + h)) dFbnτ c+1,n (x) Z  Jr (x + h)d Fbnτ c+1,n − F (x) . (4) A. Betken/Wilcoxon-based change point estimation 35 We will show that each of the summands on the right hand side converges to 0. The first summand converges to 0 because of the empirical non-central limit theorem of Dehling and Taqqu (1989). In order to show convergence of (r) the second and third summand, note that sup0≤λ≤τ |ZH (λ)| < ∞ a.s. since the sample paths of the Hermite processes are almost surely continuous. Furthermore, we have Z Z Z Jr (x + h)dFbnτ c+1,n (x) = − 1{x+h≤G(y)} Hr (y)ϕ(y)dydFbnτ c+1,n (x) Z Z =− 1{x≤G(y)−h} dFbnτ c+1,n (x)Hr (y)ϕ(y)dy Z = − Fbnτ c+1,n (G(y) − h)Hr (y)ϕ(y)dy. Analogously, it follows that Z Z Jr (x + hn )dFbnτ c+1,n (x) = − Fbnτ c+1,n (G(y) − hn )Hr (y)ϕ(y)dy. Therefore, we may conclude that Z (Jr (x + hn ) − Jr (x + h)) dFbnτ c+1,n (x) Z ≤ 2 sup Fbnτ c+1,n (x) − F (x) |Hr (y)| ϕ(y)dy x∈R Z + |F (G(y) − hn ) − F (G(y) − h)| |Hr (y)| ϕ(y)dy. The first expression on the right Rhand side converges to 0 by the GlivenkoCantelli theorem and the fact that |Hr (y)| ϕ(y)dy < ∞; the second expression converges to 0 due to continuity of F and the dominated convergence theorem. To show convergence of the third summand note that Z  Jr (x + h)d Fbnτ c+1,n (x) − F (x) = 1 n − bnτ c n X (Jr (Yi + h) − E Jr (Yi + h)) i=bnτ c+1 n n 1 X ≤ (Jr (Yi + h) − E Jr (Yi + h)) n − bnτ c n i=1 + bnτ c X bnτ c 1 (Jr (Yi + h) − E Jr (Yi + h)) . n − bnτ c bnτ c i=1 For both summands on the right hand side of the above inequality the ergodic theorem implies almost sure convergence to 0. A. Betken/Wilcoxon-based change point estimation 36 For the second summand in (4) we have Z  n − bnτ c −1 dn,r bnλc F (x + hn )d Fbnτ c+1,n − F (x) n Z  bnλc −1 =− dn,r (n − bnτ c) Fbnτ c+1,n (x) − F (x) dF (x + hn ). n Since bnλc n −→ λ uniformly in λ, consider d−1 n,r (n − bnτ c) Z  Fbnτ c+1,n (x) − F (x) dF (x + hn ) Z 1 (r) (r) − (ZH (1) − ZH (τ )) Jr (x)dF (x + hn ) r! Z 1 (r) d−1 ≤ Z (1)Jr (x)dF (x + h) n,r n (Fn (x) − F (x)) − r! H Z  1 (r) d−1 Z (τ )Jr (x)dF (x + hn ) + n,r bnτ c Fbnτ c (x) − F (x) − r! H Z 1 (r) (r) + Z (1) − ZH (τ ) Jr (x)d (F (x + hn ) − F (x + h)) . r! H The first and second summand on the right hand side converge to 0 because of the empirical process non-central limit theorem. For the third summand we have Z Z (Jr (x − hn ) − Jr (x − h)) dF (x) . Jr (x)d (F (x + hn ) − F (x + h)) = As shown before in this proof, convergence to 0 follows by the Glivenko-Cantelli theorem and the dominated convergence theorem. Lemma 3 and Lemma 4 are needed for the proof of Theorem 2. Lemma 3. Suppose that Assumption 1 holds and let ln , n ∈ N, and hn , n ∈ N, be two sequences with ln → ∞, limn→∞ hn = h and ln = O(n). Then, it holds that Z  −1 sup dln ,r bln sc Fbln sc (x + hn ) − Fbln sc (x + h) dFn (x) 0≤s≤1 − d−1 ln ,r bln sc Z (F (x + hn ) − F (x + h)) dF (x) (5) A. Betken/Wilcoxon-based change point estimation 37 and sup 0≤s≤1 d−1 ln ,r bln sc Z (Fn (x + hn ) − Fn (x + h)) dFbln sc (x) − d−1 ln ,r bln sc Z (F (x + hn ) − F (x + h)) dF (x) (6) converge to 0 almost surely. Proof. For the expression (5) the triangle inequality yields Z  sup d−1 bl sc Fbln sc (x + hn ) − Fbln sc (x + h) dFn (x) n ln ,r 0≤s≤1 − d−1 ln ,r bln sc Z (F (x + hn ) − F (x + h)) dF (x)  1 (r) d−1 Z (s)Jr (x) ln ,r bln sc Fbln sc (x) − F (x) − r! H s∈[0,1],x∈R Z 1 (r) + (Jr (x + hn ) − Jr (x + h))dFn (x) sup Z (s) r! 0≤s≤1 H Z l (F (x + hn ) − F (x + h)) d (Fn − F ) (x) . + d−1 n ln ,r ≤2 sup The first summand converges to 0 because of the empirical non-central limit (r) (r) theorem. Moreover, sup0≤s≤1 ZH (s) < ∞ a.s. due to the fact that ZH isR continuous with probability 1. It is shown in the proof of Lemma 2 that (Jr (x + hn ) − Jr (x + h))dFn (x) −→ 0. As a result, the second summand vanishes as n tends to ∞. Furthermore, note that Z d−1 l (F (x + hn ) − F (x + h)) d (Fn − F ) (x) ln ,r n  Z  1 (r) d−1 n (F (x) − F (x)) − ≤K (1)J (x) dF (x + hn ) Z n r n,r r! H  Z  1 (r) +K d−1 n (F (x) − F (x)) − Z (1)J (x) dF (x + h) n r n,r r! H Z 1 (r) +K ZH (1) Jr (x)d (F (x + hn ) − F (x + h)) r! for some constant K and n sufficiently large, since ln = O(n). The first and second summand on the right hand side of the above inequality converge to 0 due to the empirical process non-central limit theorem. In addition, we have Z Z Jr (x)d (F (x + hn ) − F (x + h)) = (Jr (x − hn ) − Jr (x − h)) dF (x) A. Betken/Wilcoxon-based change point estimation 38 Therefore, it follows by the same argument as in the proof of Lemma 2 that the third summand converges to 0. Considering the term in (6), note that sup 0≤s≤1 d−1 ln ,r bln sc Z − d−1 ln ,r bln sc (Fn (x + hn ) − Fn (x + h)) dFbln sc (x) Z (F (x + hn ) − F (x + h)) dF (x)  1 (r) Z (s)Jr (x) d−1 ln ,r bln sc Fbln sc (x) − F (x) − r! H 0≤s≤1,x∈R Z 1 (r) Jr (x)d (Fn (x + hn ) − Fn (x + h)) + sup ZH (s) r! 0≤s≤1 ≤2 sup 1 (r) + 2K sup d−1 Z (1)Jr (x) n,r n (Fn (x) − F (x)) − r! H x∈R Z 1 (r) + ZH (1) |Jr (x + hn ) − Jr (x + h)| dF (x) r! for some constant K and n sufficiently large. The first and third summand on the right hand side of the above inequality converge to 0 due to the empirical process non-central limit theorem. The last summand converges to 0 due to the corresponding argument in the proof of Lemma 2. It holds that Z Jr (x)d (Fn (x + hn ) − Fn (x + h)) Z (Fn (G(y) − hn ) − Fn (G(y) − h)) Hr (y)ϕ(y)dy =  Z ≤ 2 sup |Fn (x) − F (x)| + sup |F (x − hn ) − F (x − h)| |Hr (y)| ϕ(y)dy. x∈R x∈R The right hand side of the above inequality converges to 0 almost surely due to the Glivenko-Cantelli theorem and because F is uniformly continuous. As a result, the second summand converges to 0, as well. Lemma 4 establishes a condition under which convergence in distribution of a sequence of random variables entails convergence of the smallest argmax of the sequence. Lemma 4. Let K be a compact interval and denote by D(K) the corresponding Skorohod space, i.e. the collection of all functions f : K −→ R which are rightcontinuous with left limits. Assume that Zn , n ∈ N, are random variables taking D values in D(K) and that Zn −→ Z, where (with probability 1) Z is continuous D and Z has a unique maximizer. Then sargmax(Zn ) −→ sargmax(Z). Proof. Due to Skorohod’s representation theorem there exist random variables D Z̃n and Z̃ defined on a common probability space (Ω̃, F̃ , P̃ ), such that Z̃n = Zn , A. Betken/Wilcoxon-based change point estimation D a.s. 39 Z̃ = Z and Z̃n −→ Z̃. Due to Lemma 2.9 in Seijo et al. (2011) the smallest argmax functional is continuous at W (with respect to the Skorohod-metric and the sup-norm metric) if W ∈ D(K) is a continuous function which has a unique maximizer. Since (with probability 1) Z is continuous with unique a.s. maximizer, sargmax(Z̃n ) −→ sargmax(Z̃). As almost sure convergence implies D convergence in distribution, we have sargmax(Z̃n ) −→ sargmax(Z̃) and thereD fore sargmax(Zn ) −→ sargmax(Z).
10math.ST
A Compare-Propagate Architecture with Alignment Factorization for Natural Language Inference Yi Tay Nanyang Technological University, Singapore Luu Anh Tuan Institute for Infocomm Research Siu Cheung Hui Nanyang Technological, University, Singapore [email protected] [email protected] [email protected] arXiv:1801.00102v1 [cs.CL] 30 Dec 2017 Abstract This paper presents a new deep learning architecture for Natural Language Inference (NLI). Firstly, we introduce a new compare-propagate architecture where alignments pairs are compared and then propagated to upper layers for enhanced representation learning. Secondly, we adopt novel factorization layers for efficient compression of alignment vectors into scalar valued features, which are then be used to augment the base word representations. The design of our approach is aimed to be conceptually simple, compact and yet powerful. We conduct experiments on three popular benchmarks, SNLI, MultiNLI and SciTail, achieving state-of-the-art performance on all. A lightweight parameterization of our model also enjoys a ≈ 300% reduction in parameter size compared to the ESIM and DIIN, while maintaining competitive performance. Visual analysis shows that our propagated features are highly interpretable, opening new avenues to explainability in neural NLI models. 1 Introduction Natural Language Inference (NLI) is a pivotal and fundamental task in language understanding and artificial intelligence. More specifically, given a premise and hypothesis, NLI aims to detect whether the latter entails or contradicts the former. As such, NLI is also commonly known as Recognizing Textual Entailment (RTE). NLI is known to be a significantly challenging task for machines with success often dependent on a wide repertoire of reasoning techniques. In recent years we observe a steep improvement in NLI systems, largely contributed by the release of the largest publicly available corpus for NLI the Stanford Natural Language Inference (SNLI) corpus (Bowman et al., 2015) which comprises 570K hand labeled sentence pairs. This improved the feasibility of training complex neural models, given the fact that neural models often require a relatively large amount of training data. Highly competitive neural models for NLI are mostly based on soft-attention alignments, popularized by (Parikh et al., 2016). The key idea is to learn an alignment of sub-phrases in both sentences and learn to compare the relationship between them. Standard feed-forward neural networks are commonly used to model similarity between aligned (decomposed) sub-phrases and then aggregated into the final prediction layers. Alignment between sentences have become a staple technique in NLI research and many recent state-of-the-art models such as the Enhanced Sequential Inference Model (ESIM) (Chen et al., 2017a) also incorporate his alignment strategy. The difference here is that ESIM considers a nonparameterized comparison scheme, i.e., concatenating the subtraction and element-wise product of aligned sub-phrases, along with two original sub-phrases, into the final comparison vector. A bidirectional LSTM is then used to aggregate the compared alignment vectors. This paper presents a new neural model for NLI. There are several new novel components in our work. Firstly, we propose a compare-propagate architecture where alignment features are propagated to upper layers (such as an RNN-based encoder) for enhancing representation learning. Notably, this is different from the compare-aggregate paradigm that aggregates the compared alignment vectors for prediction (Wang and Jiang, 2016a; Parikh et al., 2016; Chen et al., 2017a). To the best of our knowledge, we are the first to adopt AvgMax Pooling + MLP + Softmax RNN Encoder Premise Hypothesis Augmentation Premise Hypothesis Propagate Compression Of Match Vectors Hypothesis Premise Soft-Attention Alignment Input Encoding ⨀ Network Flow Premise Hypothesis Figure 1: High level overview of our proposed architecture (best viewed in color). Alignment vectors are compressed and then propagated to upper representation learning layers (RNN encoders). Intra-attention is omitted in this diagram due to the lack of space. such a paradigm. Secondly, in order to achieve an efficient propagation of alignment features, we propose alignment factorization layers to reduce each alignment vectors to a single scalar valued feature. Each scalar valued feature is used to augment the base word representation, allowing the subsequent RNN encoder layers to benefit from not only global but cross sentence information. Figure 1 depicts a high-level overview of our proposed model architecture. There are several major advantages to our proposed architecture. Firstly, our model is relatively compact, i.e., to avoid large alignment (or match) vectors being propagated across the network, we compress alignment feature vectors and augment them to word representations instead. As a result, our model is more parameter efficient compared to the ESIM since the width of the middle layers of the network is now much smaller. Secondly, the compare-propagate paradigm enables highly interpretable features since each alignment pair is compressed to a scalar. Previous models such as the ESIM use subtractive operations on alignment vectors, edging on the intuition that these vectors represent contradiction. Our model is capable of visually demonstrating this phenomena. As such, our design choice enables a new way of deriving insight from neural NLI models. Thirdly, our alignment factorization layers are expressive and powerful, combining ideas from standard machine learning literature (Rendle, 2010) with modern neural NLI models. The factorization layer tries to decompose the alignment vector (constructed from the variations a − b, a b and [a; b]), learning higher-order feature interactions between each compared alignment. In other words, it models the second-order (pairwise) interactions between each feature in every alignment vector using factorized parameters, allowing more expressive comparison to be made over traditional feed-forward neural networks (FFN). The effectiveness of the factorization alignment over alternative baselines such as feed-forward neural networks is confirmed by early experiments. 1.1 Our Contributions The major contributions of this work are summarized as follows: • We introduce a Compare-Propagate architecture for NLI. The key idea is to use the myriad of generated comparison vectors for augmentation of the base word representation instead of simply aggregating them for prediction. Subsequently, a standard compositional encoder can then be used to learn representations from the augmented word representations. We show that we are able to derive meaningful insight from visualizing these augmented features. • For the first time, we adopt expressive factorization layers to model the relationships between soft-aligned sub-phrases of sentence pairs. Empirical experiments confirm the effectiveness of this new layer over standard fully connected layers. • Overall, we propose a new neural model - CAFE (Compare-propagate Alignment- Factorized Encoders) for NLI. Our model achieves state-of-the-art performance on SNLI, MultiNLI and the new SciTail dataset, outperforming existing state-of-the-art models such as the ESIM. Ablation studies confirm the effectiveness of each proposed component in our model. 2 Related Work Natural language inference (or textual entailment recognition) is a long standing problem in NLP research, typically carried out on smaller datasets using traditional methods (Maccartney, 2009; Dagan et al., 2006; MacCartney and Manning, 2008; Iftene and Balahur-Dobrescu, 2007). The relatively recent creation of 570K human annotated sentence pairs (Bowman et al., 2015) have spurred on many recent works that use neural networks for NLI. Many advanced neural architectures have been proposed for the NLI task, with most exploiting some variant of neural attention which learns to pay attention to important segments in a sentence (Parikh et al., 2016; Chen et al., 2017a; Wang and Jiang, 2016b; Rocktäschel et al., 2015; Yu and Munkhdalai, 2017). Amongst the myriad of neural architectures proposed for NLI, the ESIM (Chen et al., 2017a) model is one of the best performing models. The ESIM, primarily motivated by soft subphrase alignment in (Parikh et al., 2016), learns alignments between BiLSTM encoded representations and aggregates them with another BiLSTM layer. The authors also propose the usage of subtractive composition, claiming that this helps model contradictions amongst alignments. Compare-Aggregate models are also highly popular in NLI tasks. While this term was coined by (Wang and Jiang, 2016a), many prior NLI models follow this design (Wang et al., 2017; Parikh et al., 2016; Gong et al., 2017; Chen et al., 2017a). The key idea is to aggregate matching features and pass them through a dense layer for prediction. (Wang et al., 2017) proposed BiMPM, which adopts multi-perspective cosine matching across sequence pairs. (Wang and Jiang, 2016a) proposed a one-way attention and convolutional aggregation layer. (Gong et al., 2017) learns representations with highway layers and adopts ResNet for learning features over an interaction matrix. There a several other notable models for NLI. For instance, models that leverage directional self- attention (Shen et al., 2017) or Gumbel-Softmax (Choi et al., 2017). DGEM is a graph based attention model which was proposed together with a new entailment challenge dataset, SciTail (Khot et al., 2018). Our work compares and compresses alignment pairs using factorization layers which leverages the rich history of standard machine learning literature. Our factorization layers incorporates highly expressive factorization machines (FMs) (Rendle, 2010) into neural NLI models. In standard machine learning tasks, FMs remain a very competitive choice for learning feature interactions (Xiao et al., 2017) for both standard classification and regression problems. Intuitively, FMs are adept at handling data sparsity (typically interactions) by using factorized parameters to approximate a feature matching matrix. This makes it suitable in our model architecture since interaction between subphrase alignment pairs is typically very sparse1 as well. 3 Our Proposed Model In this section, we provide a layer-by-layer description of our model architecture. Our model accepts two sentences as an input, i.e., P (premise) and H (hypothesis). 3.1 Input Encoding Layer This layer aims to learn a k-dimensional representation for each word. Following (Gong et al., 2017), we learn feature-rich word representations by concatenating word embeddings, character features and syntactic (part-of-speech tag) features. Character representations are learned using a convolutional encoder with max pooling function and is commonly used in many relevant literature (Wang et al., 2017; Chen et al., 2017b). 3.1.1 Highway Encoding Layers Subsequently, we pass each concatenated word vector into a two layer highway network (Srivastava et al., 2015) in order to learn a k-dimensional representation. Highway networks are gated projection layers which learn adaptively control how much information is being carried to the next layer. Our strategy is similar to (Parikh et al., 2016) which trains the projection layer in place of tuning the embedding matrix. The usage of high1 Word-word interactions are already extremely sparse, let alone phrasal interactions. way layers over standard projection layers is empirically motivated. However, an intuition would be that the gates in this layer adapt to learn the relative importance of each word to the NLI task. Let H(.) and T (.) be single layered affine transforms with ReLU and sigmoid activation functions respectively. A single highway network layer is defined as: y = H(x, WH ) · T (x, WT ) + C · x (1) where C = (1−T (x, WT )) and WH , WT ∈ Rr×d Notably, the dimensions of the affine transform might be different from the size of the input vector. In this case, an additional nonlinear transform is used to project x to the same dimensionality. The output of this layer is P̄ ∈ Rk×`P (premise) and H̄ ∈ Rk×`H (hypothesis), with each word converted to a r-dimensional vector. , 3.2 3.4 eij = F (p̄i )> · F (h̄j ) 3.4.1 βi := j=1 αj := `h X i=1 (2) Given an input vector x, the factorization operation (Rendle, 2010) is defined as: L(x) = w0 + (3) exp(eij ) h̄i P`h k=1 exp(ekj ) (4) Intra-Attention Alignment Layer This layer learns a self-alignment of sentences and is applied to both P̄ and H̄ independently. For the sake of brevity, let S̄ represent either P̄ or H̄, the intra-attention alignment is computed as: `p X j=1 exp(fij ) s̄j P`p exp(f ) ik k=1 (5) n X wi x i (6) hvi , vj i xi xj (7) i=1 n X n X i=1 j=i+1 Ff m (x) = L(x) + P (x) (8) where Ff m (x) is a scalar valued output. h.; .i is the dot product between two vectors and w0 is the global bias. The parameters of this layer are w0 ∈ R, w ∈ Rr and v ∈ Rr×k . Intuitively, L(x) represents a linear regression layer while P (x) learns pairwise feature interactions by trying to factorize the feature interaction matrix. 3.4.2 exp(eij ) p̄j P`p exp(e ) ik k=1 where βi is the sub-phrase in P̄ that is softly aligned to hi . Intuitively, βi is a weighted sum `p across {pj }j=1 , selecting the most relevant parts of P̄ to represent hi . s0i := Factorization Operation P (x) = where E ∈ R`p ×`h and p̄i , h̄j are the i-th and j-th word in the premise and hypothesis respectively. `p X Alignment Factorization Layers This layer aims to learn a scalar valued feature for each comparison between aligned sub-phrases. Firstly, we introduce our factorization operation, which lives at the core of our neural model. Inter-Attention Alignment Layer This layer learns an alignment of sub-phrases between P̄ and H̄. Let F (.) be a standard projection layer with ReLU activation function. The alignment matrix of two sequences is defined as follows: 3.3 where fij = G(s̄i )> · G(s̄j ) and G(.) is a nonlinear projection layer with ReLU activation function. The intra-attention layer models similarity of each word with respect to the entire sentence, capturing long distance dependencies and ‘global’ context of the entire sentence. Alignment Factorization This layer compares the alignment between interattention aligned representations, i.e., (βi , hi ) and (αj , pj ). Let (a, b) represent an alignment pair, we apply the following operations: yc = Ff m ([a; b]) (9) ys = Ff m (a − b) (10) ym = Ff m (a b) (11) where yc , ys , ym ∈ R and Z(.) is the factorization operation, [.; .] is the concatenation operator and is the element-wise multiplication. The intuition of modeling subtraction is targeted at capturing contradiction. However, instead of simply concatenating the extra comparison vectors, we compress them using factorization layers. Finally, for each alignment pair, we obtain three scalar-valued features which map precisely to a word in the sequence. Next, for each sequence, we also apply alignment factorization on the intra-aligned sentences. Let (s, s0 ) represent an intra-aligned pair from either the premise or hypothesis, we compute the following operations: A logical explanation would be because our word representations are already augmented with global (intra-attention) information. As such, modeling in the reverse direction is unnecessary, resulting in some computational savings. vc = Ff m ([s; s0 ]) (12) vs = Ff m (s − s0 ) (13) 3.6.1 Pooling Layer Next, to learn an overall representation of each sentence, we apply a pooling function across all hidden outputs of the sequential encoder. The pooling function is a concatenation of temporal max and average (avg) pooling. vm = Ff m (s 0 s) (14) where vc , vs , vm ∈ R and Z(.) is the factorization operation. Applying alignment factorization to intra-aligned representations produces another three scalar-valued features which are mapped to each word in the sequence. Note that each of the six factorization operations has its own parameters but shares them amongst all words in the sentences. 3.5 Propagation and Augmentation (15) i i where si is i-th word in P̄ or H̄., fintra and finter are the intra-aligned [vc ; vs ; vm ] and inter-aligned [yc ; ys ; ym ] features for the i-th word in the sei quence respectively. Intuitively, fintra augments each word with global knowledge of the seni tence and finter augments each word with crosssentence knowledge via inter-attention. 3.6 Sequential Encoder Layer For each sentence, the augmented word representations u1 , u2 , . . . u` is then passed into a sequential encoder layer. We adopt a standard vanilla LSTM encoder. hi = LST M (u, i), ∀i ∈ [1, . . . `] (16) where ` represents the maximum length of the sequence. Notably, the parameters of the LSTM are siamese in nature, sharing weights between both premise and hypothesis. We do not use a bidirectional LSTM encoder, as we found that it did not lead to any improvements on the held-out set. 2 where x is a final 2k-dimensional representation of the sentence (premise or hypothesis). We also experimented with sum and avg standalone poolings and found sum pooling to be relatively competitive. 3.7 Finally, the six factorized features are then aggregated2 via concatenation to form a final feature vector that is propagated to upper representation learning layers via augmentation of the word representation P̄ or H̄. i i ui = [si ; fintra ; finter ] x = [max([h1 , · · · h` ]); avg([h1 , · · · h` ])] (17) Following (Parikh et al., 2016), we may also concatenate the intra-aligned vector to ui which we found to have speed up convergence. Prediction Layers Finally, given a fixed dimensional representation of the premise xp and hypothesis xh , we pass their concatenation into a two-layer h-dimensional highway network. Since the highway network has been already defined earlier, we omit the technical details. The final prediction layers of our model is computed as follows: yout = H2 (H1 ([xp ; xh ; xp xh ; xp − xh ])) (18) where H1 (.), H2 (.) are highway network layers with ReLU activation. The output is then passed into a final linear softmax layer. ypred = sof tmax(WF · yout + bF ) (19) where WF ∈ Rh×3 and bF ∈ R3 . The network is then trained using standard multi-class cross entropy loss with L2 regularization. 4 4.1 Experiments Experimental Setup To ascertain the effectiveness of our models, we use the SNLI (Bowman et al., 2015) and MultiNLI (Williams et al., 2017) benchmarks which are standard and highly competitive benchmarks for the NLI task. We also include the newly released SciTail dataset (Khot et al., 2018) which is a binary entailment classification task constructed from science questions. Notably, SciTail is known to be a difficult dataset for NLI, made evident by the low accuracy scores even though it is binary in nature. • SNLI - We compare against competitors across three settings. The first setting disallows cross sentence attention. In the second setting, cross sentence is allowed. The first two setting only comprises single models. The last setting is a comparison between model ensembles. Though we compare with many other models (Wang and Jiang, 2016b; Rocktäschel et al., 2015; Parikh et al., 2016; Yu and Munkhdalai, 2017; Sha et al., 2016), the key SoTA competitors on this dataset are the BiMPM (Wang et al., 2017), ESIM (Chen et al., 2017a) and DIIN (Gong et al., 2017). • MultiNLI - We compare on two test sets (matched and mismatched) which represent in-domain and out-domain performance. The main competitor on this dataset is the ESIM model, a powerful state-of-the-art SNLI baseline. We also compare with ESIM + read (Weissenborn, 2017). • SciTail - This dataset only has one official setting. We compare against the reported results of ESIM (Chen et al., 2017a) and DecompAtt (Parikh et al., 2016) in the original paper. We also compare with DGEM, the new model proposed in (Khot et al., 2018). Across all experiments and in the spirit of fair comparison, we only compare with works that (1) do not use extra training data and (2) do not use external resources (such as external knowledge bases etc.). 4.2 Implementation Details We implement our model in Tensorflow (Abadi et al., 2015) and train them on Nvidia P100 GPUs. For the first setting (without cross sentence attention), we remove both the cross (inter) attention layers to abide to the rules of this setting. We use the Adam optimizer (Kingma and Ba, 2014) with an initial learning rate of 0.0003. Default L2 regularization is set to 10−6 . Dropout with a keep probability of 0.8 is applied after each fullyconnected, recurrent or highway layer. The batch size is tuned amongst {128, 256, 512}. The number of latent factors k for the factorization layers is tuned amongst {5, 10, 50, 100, 150}. The size of the hidden layers of the highway layers are set to 300. All parameters are initialized with xavier initialization. Word embeddings are pre-loaded with 300d GloVE embeddings (Pennington et al., 2014) and fixed during training. Sequence length are padded to batch-wise maximums. The batch order are (randomly) sorted within buckets following (Parikh et al., 2016). , |θ| Train Encoders (w/o Cross Sentence Attention) 300D LSTM Encoder 3.0M 83.9 600D Gated BiLSTM + intra-att 12M 90.5 300D Gumbel LSTM TreeLSTM 2.9M 91.2 300D DISAN 2.4M 91.1 300D Residual Stacked Encoders 9.7M 89.8 600D Gumbel TreeLSTM 10M 93.1 300D CAFE (w/o Inter-Attention) 3.7M 87.3 Cross Sentence Attention (Single Models) 100D LSTM with attention 250K 85.3 300D mLSTM 1.9M 92.0 200D DecompAtt 380K 89.5 200D DecompAtt + Intra-Att 580K 90.5 300D NTI-SLSTM-LSTM 3.2M 88.5 300D re-read LSTM 2.0M 90.7 BiMPM 1.6M 90.9 448D DIIN 4.4M 91.2 600D ESIM 4.3M 92.6 150D CAFE (Sum+2x200D MLP) 750K 88.2 200D CAFE (Sum+2x400D MLP) 1.4M 89.4 300D CAFE (Sum+2x600D MLP) 3.5M 89.2 300D CAFE (AvgMax+300D HN) 4.7M 89.8 Cross Sentence Attention (Ensemble Models) 600D ESIM + 300D TreeLSTM 7.7M 93.5 BiMPM 6.4M 93.2 448D DIIN 17.0M 92.3 300D CAFE (Ensemble) 17.5M 92.5 Method Test 80.6 85.5 85.6 85.6 85.7 86.0 85.9 83.5 86.1 86.3 86.8 87.3 87.5 87.5 88.0 88.0 87.7 88.1 88.3 88.5 88.6 88.8 88.9 89.3 Table 1: Performance comparison of all models on SNLI benchmark. 4.3 Results on SNLI Table 1 reports our results on the SNLI benchmark. On the cross sentence (single model setting), the performance of our proposed CAFE model is extremely competitive. We report the test accuracies of CAFE at different extent of parameterization, varying the size of the LSTM encoder, width of the pre-softmax hidden layers and final pooling layer. CAFE obtains 88.5% accuracy on the SNLI test set, an extremely competitive score on the extremely popular benchmark. Notably, competitive results can be also achieved with a much smaller parameterization. For example, CAFE also achieves 88.3% and 88.1% test accuracy with only 3.5M and 1.5M respectively. This outperforms state-of-the-art ESIM and DIIN models with only a fraction of the parameter cost. Moreover, our lightweight adaption achieves 87.7% with only 750K parameters, which makes it extremely performant amongst models having the same amount of parameters such as the decomposable attention model (86.8%). After removing the inter-attention layers from CAFE, the performance remains competitive to top performing encoder models. CAFE (w/o cross attention) achieves a respectible 85.9% accuracy in this setting. Notably, the best performing model, the Gumbel TreeLSTM (86.0%) has over 10M parameters. On the other hand, our CAFE model has a 300% less parameters, yet performs competitively to the Gumbel TreeLSTM. Finally, an ensemble of 5 CAFE models achieves 89.3% test accuracy, the best test scores on the SNLI benchmark to date. Overall, we believe that the good performance of our CAFE can be attributed to (1) the effectiveness of the compare-propagate (i.e., providing word representations with global and local knowledge for better representation learning) and (2) the expressiveness of factorization layers that are used to decompose and compare word alignments. More details are given at the ablation study. Finally, we emphasize that CAFE is also relatively lightweight, efficient and fast to train given its performance. A single run on SNLI takes approximately 5 minutes per epoch with a batch size of 256. Overall, a single run takes ≈ 3 hours to get to convergence. 4.4 Results on MultiNLI and Scitail Table 2 reports our results on the MultiNLI and SciTail datasets. On MultiNLI, CAFE significantly outperforms ESIM, a strong SoTA models on both settings. We also outperform the ESIM + Read model (Weissenborn, 2017). An ensemble of CAFE models achieve the best reported results on this MultiNLI to date (as of time of writing). On SciTail, Our proposed CAFE model achieves state-of-the-art performance. The performance gain over strong baselines such as DecompAtt and ESIM are ≈ 10% − 13% in terms of accuracy. CAFE also outperforms DGEM , which use a graph-based attention for improved performance, by a significant margin of 5%. As such, empirical results demonstrate the effectiveness of our proposed CAFE model on the challenging SciTail dataset. 4.5 Model Majority NGRAM# CBOW[ BiLSTM[ ESIM#,[ DecompAtt# DGEM# DGEM + Edge# ESIM† ESIM + Read† CAFE CAFE Ensemble MultiNLI Match Mismatch 36.5 35.6 65.2 64.8 69.8 69.4 72.4 72.1 76.3 75.8 77.8 77.0 78.7 77.9 80.2 79.0 SciTail 60.3 70.6 70.6 72.3 70.8 77.3 83.3 - Table 2: Performance comparison (accuracy) on MultiNLI and SciTail. Models with †, # and [ are reported from (Weissenborn, 2017), (Khot et al., 2018) and (Williams et al., 2017) respectively. which we find to have helped CAFE marginally. (4) Removes the Inter attention features, which naturally impacts the model performance significantly. (5-6) explores the effectiveness of the highway layers (in prediction layers and encoding layers) by replacing them to FC layers. Both highway layers have marginally helped overall performance. Finally, (7-9) removes the alignment features based on their composition type. We observe that the Sub feat and Concat compositions were more important than the Mul composition. However, removing any of the three will result in some performance degrade. Finally, we replace the LSTM encoder with a BiLSTM, observing that adding bidirectionality did not improve performance for our model. Original Model (1) Replace FM with FC (2) Remove Char Embed (3) Remove Syn Embed (4) Remove Inter Att (5) Replace Highway Pred. with FC (6) Remove Highway Enc. with FC (7) Remove Sub Feat (8) Remove Mul Feat (9) Remove Concat Feat (10) Replace LSTM with BiLSTM Match 79.0 77.7 78.1 78.3 75.2 77.7 78.7 77.9 78.7 77.9 78.3 Mismatch 78.9 77.9 78.3 78.4 75.6 77.9 78.7 78.3 78.6 77.6 78.4 Table 3: Ablation study on MultiNLI development sets. Ablation Study Table 3 reports ablation studies on the MultiNLI development sets. Firstly, we replaced all FM functions with regular full-connected (FC) layers (1). We notice an decline in performance in both development sets. Ablation (2-3) explores the utility of using character and syntactic embeddings, 4.6 Linguistic Error Analysis We perform a linguistic error analysis using the supplementary annotations provided by the MultiNLI dataset. We compare against the model outputs of the ESIM model across 13 categories 20 10 0 4.7 Interpreting and Visualizing with CAFE Finally, we also observed that the propagated features are highly interpretable, giving insights to the inner workings of the CAFE model. Figure 2 shows a visualization of the feature values from an example in the SNLI test set. The ground truth is contradiction. Based on the above example we make several observations. Firstly, inter mul features mostly capture identical words (or semantically similar words), i.e., inter mul features for river spikes in both sentences. Secondly, inter sub spikes on conflicting words that might cause contradiction, e.g sedan and land rover are not the same vehicle. Another interesting observation is that we notice the inter sub features for driven . . <e > r riv e riv er a ros s n ac dri ve be ing is er rov a lan d −10 inter_cat inter_mul inter_sub intra_cat intra_mul intra_sub 30 Table 4: Linguistic Error Analysis on MultiNLI dataset. 20 10 > <e a of le dd mi the in ck stu n is da a > 0 <s of linguistic3 phenenoma. Table 4 reports the result of our error analysis. Firstly, we observe that our CAFE model generally outperforms ESIM on most categories. On the mismatched setting, CAFE outperforms ESIM in 12 out of 13 categories, losing only in one percentage point in Active/Passive category. On the matched setting, CAFE is outperformed by ESIM very marginally on coreference and paraphrase categories. Despite generally achieving much superior results, we noticed that CAFE performs poorly on conditionals4 on the matched setting. Measuring the absolute ability of CAFE, we find that CAFE performs extremely well in handling linguistic patterns of paraphrase detection and active/passive. This is likely to be attributed by the alignment strategy that CAFE and ESIM both exploits. inter_cat inter_mul inter_sub intra_cat intra_mul intra_sub 30 se Mismatched ESIM CAFE 60 85 62 87 71 80 58 80 69 77 79 89 91 90 84 95 54 62 75 83 72 80 76 81 67 83 <s > Conditional Word overlap Negation Antonym Long Sentence Tense Difference Active/Passive Paraphrase Quantity/Time Coreference Quantifier Modal Belief Matched ESIM CAFE 100 70 50 82 76 76 67 82 75 79 73 82 88 100 89 88 33 53 83 80 69 75 78 81 65 77 Figure 2: Visualization of six Propgated Features (Best viewed in color). Legend is denoted by {inter,intra} followed by the operations mul, sub or concat (cat). and stuck spiking. This also validates the observation of (Chen et al., 2017a), which shows what the sub vector in the ESIM model is looking out for contradictory information. However, our architecture allows the inspection of these vectors since they are compressed via factorization, leading to larger extents of explainability - a quality that neural models inherently lack. We also observed5 that intra attention (e.g., intra cat) features seem to capture the more important words in the sentence (river, sedan, landrover). 5 Conclusion We proposed a new neural architecture, CAFE for NLI. CAFE achieves state-of-the-art performance on three benchmark datasets. Moreover, a lightweight parameterization of CAFE outperforms other SoTA models such as ESIM and DINN while enjoying a 300% savings in parameter cost. The design of CAFE opens up new avenues for interpretability in neural models for NLI. Qualitatively, we show how different compositional operators (e.g., sub and mul) behave in NLI task and shed light on why subtractive composition helps in other models such as the ESIM. 3 Due to the lack of space, we refer readers to http://www.nyu.edu/projects/bowman/ multinli/multinli_1.0_annotations.zip for an explanation on each category. 4 This only accounts for 5% of samples. 5 Specific spikes in intra mul and intra sub was also observed in other samples but we leave them out due to the lack of space. References Martı́n Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. 2015. TensorFlow: Large-scale machine learning on heterogeneous systems. Software available from tensorflow.org. Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, EMNLP 2015, Lisbon, Portugal, September 17-21, 2015. pages 632–642. http://aclweb.org/anthology/D/D15/D15-1075.pdf. Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. 2017a. Enhanced LSTM for natural language inference. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers. pages 1657–1668. https://doi.org/10.18653/v1/P171152. Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. 2017b. Recurrent neural network-based sentence encoder with gated attention for natural language inference. In Proceedings of the 2nd Workshop on Evaluating Vector Space Representations for NLP, RepEval@EMNLP 2017, Copenhagen, Denmark, September 8, 2017. pages 36–40. http://aclanthology.info/papers/W175307/w17-5307. Jihun Choi, Kang Min Yoo, and Sang-goo Lee. 2017. Unsupervised learning of task-specific tree structures with tree-lstms. arXiv preprint arXiv:1707.02786 . Ido Dagan, Oren Glickman, and Bernardo Magnini. 2006. The pascal recognising textual entailment challenge. In Proceedings of the First International Conference on Machine Learning Challenges: Evaluating Predictive Uncertainty Visual Object Classification, and Recognizing Textual Entailment. Springer-Verlag, Berlin, Heidelberg, MLCW’05, pages 177–190. Yichen Gong, Heng Luo, and Jian Zhang. 2017. Natural language inference over interaction space. CoRR abs/1709.04348. http://arxiv.org/abs/1709.04348. Adrian Iftene and Alexandra Balahur-Dobrescu. 2007. Hypothesis transformation and semantic variability rules used in recognizing textual entailment. In Proceedings of the ACL-PASCAL Workshop on Textual Entailment and Paraphrasing. Association for Computational Linguistics, Stroudsburg, PA, USA, RTE ’07, pages 125–130. Tushar Khot, Ashish Sabharwal, and Peter Clark. 2018. Scitail: A textual entailment dataset from science question answering. In AAAI. Diederik P. Kingma and Jimmy Ba. 2014. A method for stochastic optimization. abs/1412.6980. Adam: CoRR Bill Maccartney. 2009. Natural Language Inference. Ph.D. thesis, Stanford, CA, USA. AAI3364139. Bill MacCartney and Christopher D. Manning. 2008. Modeling semantic containment and exclusion in natural language inference. In Proceedings of the 22Nd International Conference on Computational Linguistics - Volume 1. Association for Computational Linguistics, Stroudsburg, PA, USA, COLING ’08, pages 521–528. Ankur P. Parikh, Oscar Täckström, Dipanjan Das, and Jakob Uszkoreit. 2016. A decomposable attention model for natural language inference. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016. pages 2249–2255. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL. pages 1532–1543. Steffen Rendle. 2010. Factorization machines. In Data Mining (ICDM), 2010 IEEE 10th International Conference on. IEEE, pages 995–1000. Tim Rocktäschel, Edward Grefenstette, Karl Moritz Hermann, Tomáš Kočiskỳ, and Phil Blunsom. 2015. Reasoning about entailment with neural attention. arXiv preprint arXiv:1509.06664 . Lei Sha, Baobao Chang, Zhifang Sui, and Sujian Li. 2016. Reading and thinking: Reread LSTM unit for textual entailment recognition. In COLING 2016, 26th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, December 11-16, 2016, Osaka, Japan. pages 2870–2879. http://aclweb.org/anthology/C/C16/C16-1270.pdf. Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, Shirui Pan, and Chengqi Zhang. 2017. Disan: Directional self-attention network for rnn/cnn-free language understanding. CoRR abs/1709.04696. http://arxiv.org/abs/1709.04696. Rupesh Kumar Srivastava, Klaus Greff, and Jürgen Schmidhuber. 2015. Highway networks. CoRR abs/1505.00387. http://arxiv.org/abs/1505.00387. Shuohang Wang and Jing Jiang. 2016a. A compareaggregate model for matching text sequences. CoRR abs/1611.01747. http://arxiv.org/abs/1611.01747. Shuohang Wang and Jing Jiang. 2016b. Learning natural language inference with LSTM. In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego California, USA, June 12-17, 2016. pages 1442– 1451. http://aclweb.org/anthology/N/N16/N161170.pdf. Zhiguo Wang, Wael Hamza, and Radu Florian. 2017. Bilateral multi-perspective matching for natural language sentences. In Proceedings of the TwentySixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19-25, 2017. pages 4144–4150. https://doi.org/10.24963/ijcai.2017/579. Dirk Weissenborn. 2017. Reading twice for natural language understanding. CoRR abs/1706.02596. http://arxiv.org/abs/1706.02596. Adina Williams, Nikita Nangia, and Samuel R. Bowman. 2017. A broad-coverage challenge corpus for sentence understanding through inference. CoRR abs/1704.05426. http://arxiv.org/abs/1704.05426. Jun Xiao, Hao Ye, Xiangnan He, Hanwang Zhang, Fei Wu, and Tat-Seng Chua. 2017. Attentional factorization machines: Learning the weight of feature interactions via attention networks. arXiv preprint arXiv:1708.04617 . Hong Yu and Tsendsuren Munkhdalai. 2017. Neural semantic encoders. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017, Valencia, Spain, April 3-7, 2017, Volume 1: Long Papers. pages 397–407. http://aclanthology.info/papers/E17-1038/neuralsemantic-encoders.
2cs.AI
This is an early draft. Please read/cite the published version instead: Caliskan, Aylin, Joanna J. Bryson, and Arvind Narayanan. “Semantics derived automatically from language corpora contain human-like biases.” Science 356.6334 (2017): 183-186. http://opus.bath.ac.uk/55288/ arXiv:1608.07187v4 [cs.AI] 25 May 2017 Semantics derived automatically from language corpora necessarily contain human biases Aylin Caliskan1 , Joanna J. Bryson1,2 , and Arvind Narayanan1 1 Princeton University of Bath ∗ Address correspondence to [email protected], [email protected], [email protected]. 2 University ABSTRACT Artificial intelligence and machine learning are in a period of astounding growth. However, there are concerns that these technologies may be used, either with or without intention, to perpetuate the prejudice and unfairness that unfortunately characterizes many human institutions. Here we show for the first time that human-like semantic biases result from the application of standard machine learning to ordinary language—the same sort of language humans are exposed to every day. We replicate a spectrum of standard human biases as exposed by the Implicit Association Test and other well-known psychological studies. We replicate these using a widely used, purely statistical machine-learning model—namely, the GloVe word embedding—trained on a corpus of text from the Web. Our results indicate that language itself contains recoverable and accurate imprints of our historic biases, whether these are morally neutral as towards insects or flowers, problematic as towards race or gender, or even simply veridical, reflecting the status quo for the distribution of gender with respect to careers or first names. These regularities are captured by machine learning along with the rest of semantics. In addition to our empirical findings concerning language, we also contribute new methods for evaluating bias in text, the Word Embedding Association Test (WEAT) and the Word Embedding Factual Association Test (WEFAT). Our results have implications not only for AI and machine learning, but also for the fields of psychology, sociology, and human ethics, since they raise the possibility that mere exposure to everyday language can account for the biases we replicate here. Introduction Those astonished by the human-like capacities visible in the recent advances in artificial intelligence (AI) may be comforted to know the source of this progress. Machine learning, exploiting the universality of computation (Turing, 1950), is able to capture the knowledge and computation discovered and transmitted by humans and human culture. However, while leading to spectacular advances, this strategy undermines the assumption of machine neutrality. The default assumption for many was that computation, deriving from mathematics, would be pure and neutral, providing for AI a fairness beyond what is present in human society. Instead, concerns about machine prejudice are now coming to the fore—concerns that our historic biases and prejudices are being reified in machines. Documented cases of automated prejudice range from online advertising (Sweeney, 2013) to criminal sentencing (Angwin et al., 2016). Most experts and commentators recommend that AI should always be applied transparently, and certainly without prejudice. Both the code of the algorithm and the process for applying it must be open to the public. Transparency should allow courts, companies, citizen watchdogs, and others to understand, monitor, and suggest improvements to algorithms (Oswald and Grace, 2016). Another recommendation has been diversity among AI developers, to address insensitive or under-informed training of machine learning algorithms (Sweeney, 2013; Noble, 2013; Barr, 2015; Crawford, 2016). A third has been collaboration between engineers and domain experts who are knowledgeable about historical inequalities (Sweeney, 2013). Here we show that while all of these strategies might be helpful and even necessary, they could not be sufficient. We document machine prejudice that derives so fundamentally from human culture that it is not possible to eliminate it through Outdated draft. See published version at http://opus.bath.ac.uk/55288/. strategies such as the above. We demonstrate here for the first time what some have long suspected (Quine, 1960)—that semantics, the meaning of words, necessarily reflects regularities latent in our culture, some of which we now know to be prejudiced. We demonstrate this by showing that standard, widely used Natural Language Processing tools share the same biases humans demonstrate in psychological studies. These tools have their language model built through neutral automated parsing of large corpora derived from the ordinary Web; that is, they are exposed to language much like any human would be. Bias should be the expected result whenever even an unbiased algorithm is used to derive regularities from any data; bias is the regularities discovered. Human learning is also a form of computation. Therefore our finding that data derived from human culture will deliver biases and prejudice have implications for the human sciences as well. They present a new “null hypothesis” for explaining the transmission of prejudice between humans. Our findings also have implications for addressing prejudice, whether in humans or machines. The fact that it is rooted in language makes prejudice difficult to address, but by no means impossible. We argue that prejudice must be addressed as a component of any intelligent system learning from our culture. It cannot be entirely eliminated from the system, but rather must be compensated for. In this article, we begin by explaining meaning and the methods by which we determine human understanding, and interpret it in machines. Then we present our results. We replicate previously-documented biases and prejudices in attitudes towards ordinary objects, animals, and humans. We show that prejudices that reduce the number of interview invitations sent to people because of the racial association of their name, and that associate women with arts rather than science or mathematics, can be retrieved from standard language tools used in ordinary AI products. We also show that veridical information about the proportions of women in particular job categories, or what proportion of men versus women have a particular name, can be recovered using the same methods. We then present a detailed account of our methods, and further discussion of the implications of our work. Meaning and Bias in Humans and Machines In AI and machine learning, bias refers to prior information, a necessary prerequisite for intelligence (Bishop, 2006). Yet bias can be problematic where prior information is derived from precedents known to be harmful. For the purpose of this paper, we will call harmful biases ‘prejudice’. We show here that prejudice is a special case of bias identifiable only by its negative consequences, and therefore impossible to eliminate purely algorithmically. Rather, prejudice requires deliberate action based on knowledge of a society and its outstanding ethical challenges. If we are to demonstrate that AI incorporates the same bias as humans, we first have to be able to document human bias. We will use several methods to do this below, but the one we use most is the Implicit Association Test (IAT). First introduced by Greenwald et al. (1998), the IAT demonstrates enormous differences in response times when subjects are asked to pair two concepts they find similar, in contrast to two concepts they find different. The IAT follows a reaction time paradigm, which means subjects are encouraged to work as quickly as possible, and their response times are the quantified measure. For example, subjects are much quicker if they are told to label insects as unpleasant and flowers as pleasant than if they are asked to label these objects in reverse. The fact that a pairing is faster is taken to indicate that the task is more easy, and therefore that the two subjects are linked in their mind. The IAT is ordinarily used to pair categories such as ‘male’ and ‘female’ with attributes such as ‘violent’ or ‘peaceful’. The IAT has been used to describe and account for a wide range of implicit prejudices and other phenomena, including stereotype threat (Kiefer and Sekaquaptewa, 2007; Stanley et al., 2011). Our method for demonstrating both bias and prejudice in text is a variant of the implicit association test applied to a widely-used semantic representation of words in AI, termed word embeddings. These are derived by representing the textual context in which a word is found as a vector in a high-dimensional space. Roughly, for each word, its relationship to all other words around it is summed across its many occurrences in a text. We can then measure the distances (more precisely, cosine similarity scores) between these vectors. The thesis behind word embeddings is that words that are closer together in the vector −−−−−−−→ is closer to − −→ than to − −−−→ it space are semantically closer in some sense. Thus, for example, if we find that − programmer man woman, suggests (but is far from conclusive of) a gender stereotype. We assume here that this measure is analogous to reaction time in the IAT, since the shorter time implies a semantic ‘nearness’ (McDonald and Lowe, 1998; Moss et al., 1995). As with the IAT, we do not just compare two words. Many if not most words have multiple meanings, which makes pairwise measurements “noisy”. To control for this, we use small baskets of terms to represent a concept. In the present paper we have never invented our own basket of words, but rather have in every case used the same words as were used in the psychological study we are replicating. We should note that distances / similarities of word embeddings notoriously lack any intuitive interpretation. But this poses no problem for us: our results and their import do not depend on attaching meaning to these distances. Our primary claim is that the associations revealed by relative nearness scores between categories match human biases and stereotypes strongly (i.e., low p-values and high effect sizes) and across many categories. Thus, the associations in the word vectors could not have arisen by chance, but instead reflect extant biases in human culture. 2/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. There are however several key differences between our method and the IAT. Most of these we will discuss in future versions of this paper’s appendices, but one in particular is critical to our presentation of results. While the IAT applies to individual human subjects, the embeddings of interest to us are derived from the aggregate writings of humans on the web. These corpora are generated in an uncontrolled fashion and are not representative of any one population (though our results indicate they may be disproportionately American; see below). The IAT has sometimes been used to draw conclusions about populations by averaging individual results over samples, and these have led to important insights on racial bias and gender stereotypes, among others. Our tests of word embeddings are loosely analogous to population-level IATs. Nevertheless, this difference precludes a direct numerical comparison between human biases measured by the IAT and algorithmic biases measured by our methods. In particular, an IAT allows rejecting the null hypothesis (of non-association between two categories) via a p-value and quantification of the strength of association via an effect size. These are obtained by administering the test to a statistically-significant sample of subjects (and multiple times to each subject). With word embeddings, there is no notion of test subjects. Roughly, it is as if we are able to measure the mean of the association strength over all the “subjects” who collectively created the corpora. But we have no way to observe variation between subjects or between trials. We do report p-values and effect sizes resulting from the use of multiple words in each category, but the meaning of these numbers is entirely different from those reported in IATs. Results Using the techniques described in the Methods section, we have found every linguistic bias documented in psychology that we have looked for. Below are a sample that we think are persuasive. We have not cherry picked these for effect size—these are uniformly high. Rather, we chose these to illustrate our assertion that we can account for a variety of implicit human biases purely from language regularities, and that these are in fact part and parcel with the meaning of language. We demonstrate this by showing that the same measures that replicate implicit bias also replicate prejudicial hiring practices, and further return veridical information about employment and naming practices in contemporary America. We ensure impartiality in our approach by using the benchmarks and keywords established in well-known and heavily cited works of the human sciences, psychology and sociology. We use a state-of-the-art and widely used word embedding, namely GloVe, made available by Pennington et al. (2014). We used one of GloVe’s standard semantic models trained on standard corpora of ordinary language use found on the World Wide Web. We have also found similar results for other standard tools and corpora, which we will also discuss in future versions of this paper’s appendices. Following the lead of the IAT, for each result we report the two sets of target concepts about which we are attempting to learn and the two sets of attribute words we are comparing each to. We then apply our method WEAT (defined in the Methods section), and report the probability (p-value) that our observed similarity scores could have arisen with no semantic association between the target concepts and the attribute. We report an effect size based on the number of standard deviations that separate the two sets of target words in terms of their association with the attribute words; precise details of this measure are described in the Methods section. Baseline: Replication of Associations That Are Universally Accepted The first results presented in the initial publication on the IAT (Greenwald et al., 1998) concerned biases that were found to be universal in humans and about which there is no social concern. This allows the introduction and clarification of the method and its validation on relatively morally neutral topics. We begin by replicating these inoffensive results for the same purposes. Flowers and Insects Original Finding: Greenwald et al. (1998, p. 1469) report that the IAT is able to demonstrate via reaction times that flowers are significantly more pleasant than insects, and insects more unpleasant than flowers. Based on the reaction latencies of 32 participants, the IAT results in an effect size1 of 1.35, which is considered a large effect, and a p-value of 10−8 for statistical significance. We replicate this finding by looking at semantic similarity in GloVe for the same stimuli by using our WEAT method. Flowers are more likely than insects to be closer to pleasant than to unpleasant. By applying our method, we observe the expected association with an effect size of 1.50 and with p-value < 10−7 for statistical significance.2 Notice that GloVe “knows” this property of flowers and insects with no direct experience of the world, and no representation of semantics other than the implicit metrics of words’ co-occurrence statistics that it is trained on. Our Finding: 1 Effect size is Cohen’s d, which is the log-transformed mean of latencies in milliseconds divided by the standard deviation. Conventional small, medium, and large values of d are 0.2, 0.5, and 0.8, respectively. 2 The maximum effect size can be is 2.0. 3/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. Stimuli: We use the same stimuli as Greenwald et al. (1998, p. 1479). • Flowers: aster, clover, hyacinth, marigold, poppy, azalea, crocus, iris, orchid, rose, bluebell, daffodil, lilac, pansy, tulip, buttercup, daisy, lily, peony, violet, carnation, gladiola, magnolia, petunia, zinnia. • Insects: ant, caterpillar, flea, locust, spider, bedbug, centipede, fly, maggot, tarantula, bee, cockroach, gnat, mosquito, termite, beetle, cricket, hornet, moth, wasp, blackfly, dragonfly, horsefly, roach, weevil. • Pleasant: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation. • Unpleasant: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, divorce, jail, poverty, ugly, cancer, kill, rotten, vomit, agony, prison. Musical Instruments and Weapons Original Finding: Similarly, Greenwald et al. (1998, p. 1469) find that musical instruments are significantly more pleasant than weapons. Based on the reaction latencies of 32 participants, the IAT results in an effect size of 1.66 and a p-value of 10−10 . We replicate this finding by looking at semantic nearness in GloVe for the same stimuli. Musical instruments are more likely than weapons to be closer to pleasant than to unpleasant. By applying our method, we observe the expected association with an effect size of 1.53 and with p-value < 10−7 . Our Finding: Stimuli: We use the same stimuli found in Greenwald et al. (1998, p. 1479). • Musical instruments: bagpipe, cello, guitar, lute, trombone, banjo, clarinet, harmonica, mandolin, trumpet, bassoon, drum, harp, oboe, tuba, bell, fiddle, harpsichord, piano, viola, bongo, flute, horn, saxophone, violin. • Weapons: arrow, club, gun, missile, spear, axe, dagger, harpoon, pistol, sword, blade, dynamite, hatchet, rifle, tank, bomb, firearm, knife, shotgun, teargas, cannon, grenade, mace, slingshot, whip. • Pleasant and Unpleasant: as per previous experiment with insects and flowers. Racial Biases We now use the same technique to demonstrate that machine learning absorbs prejudice as easily as other biases. Here we replicate not only the original IAT results on racial prejudice, but also the more recent and striking finding that names alone have enormous impact on the probability of job candidates being called for an interview. Replicating Implicit Associations for Valence Original Finding: Greenwald et al. (1998, p. 1475) find extreme impacts of race as indicated simply by name. A bundle of names associated with being European American was found to be significantly easier to associate with pleasant than unpleasant terms, compared to a bundle of African American names. With 26 subjects, Greenwald et al. show that the European American names are more likely to be implicitly associated as pleasant with an effect size of 1.17 and a p-value of 10−6 . Our Finding: We were again able to replicate attitude towards two races by looking at semantic nearness in GloVe. We were forced to slightly alter the stimuli because some of the original African American names did not occur in the corpus with sufficient frequency. These are shown in italics below. We therefore also deleted the same number of European American names, chosen at random, to balance the number of elements in the sets of two concepts. In our results, European American names are more likely than African American names to be closer to pleasant than to unpleasant, with an effect size of 1.41 and p-value < 10−8 . Stimuli: We use a subset (see above) of the same stimuli found in Greenwald et al. (1998, p. 1479). Names that are marked with italics are excluded from our replication. • European American names: Adam, Chip, Harry, Josh, Roger, Alan, Frank, Ian, Justin, Ryan, Andrew, Fred, Jack, Matthew, Stephen, Brad, Greg, Jed, Paul, Todd, Brandon, Hank, Jonathan, Peter, Wilbur, Amanda, Courtney, Heather, Melanie, Sara, Amber, Crystal, Katie, Meredith, Shannon, Betsy, Donna, Kristin, Nancy, Stephanie, Bobbie-Sue, Ellen, Lauren, Peggy, Sue-Ellen, Colleen, Emily, Megan, Rachel, Wendy (deleted names in italics). • African American names: Alonzo, Jamel, Lerone, Percell, Theo, Alphonse, Jerome, Leroy, Rasaan, Torrance, Darnell, Lamar, Lionel, Rashaun, Tvree, Deion, Lamont, Malik, Terrence, Tyrone, Everol, Lavon, Marcellus, Terryl, Wardell, Aiesha, Lashelle, Nichelle, Shereen, Temeka, Ebony, Latisha, Shaniqua, Tameisha, Teretha, Jasmine, Latonya, Shanise, Tanisha, Tia, Lakisha, Latoya, Sharise, Tashika, Yolanda, Lashandra, Malika, Shavonn, Tawanda, Yvette (deleted names in italics). 4/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. • Pleasant: caress, freedom, health, love, peace, cheer, friend, heaven, loyal, pleasure, diamond, gentle, honest, lucky, rainbow, diploma, gift, honor, miracle, sunrise, family, happy, laughter, paradise, vacation. • Unpleasant: abuse, crash, filth, murder, sickness, accident, death, grief, poison, stink, assault, disaster, hatred, pollute, tragedy, bomb, divorce, jail, poverty, ugly, cancer, evil, kill, rotten, vomit. Replicating the Bertrand and Mullainathan (2004) Résumé Study Original Finding: Bertrand and Mullainathan (2004) sent nearly 5,000 identical résumés to 1,300 job advertisements with only one change made to the résumés: the names of the candidates. They found that European American candidates were 50% more likely to be offered an opportunity to be interviewed. Our Finding: Perhaps unsurprisingly, we again found a significant result for the names used by Bertrand and Mullainathan. As before, we had to delete some low-frequency names. We also assumed semantic nearness to pleasantness as the correlate for an invitation to interview. We did this with two different sets of ‘pleasant/unpleasant’ stimuli: those from the original IAT paper, and also a revised shorter set used more recently, found in Nosek et al. (2002a). For both sets of attributes, European American names are more likely than African American names to be invited for interviews (closer to pleasant than to unpleasant). Using the Greenwald et al. (1998) attributes, the effect size is 1.50 and p-value < 10−4 ; and using the updated Nosek et al. (2002a) attributes, the effect size is 1.28 and p-value < 10−3 . For the names we use the stimuli found in Bertrand and Mullainathan (2004, p. 1012). The first set of pleasant and unpleasant words are as per above, the second are from Nosek et al. (2002a, p. 114). Stimuli: • European American names: Brad, Brendan, Geoffrey, Greg, Brett, Jay, Matthew, Neil, Todd, Allison, Anne, Carrie, Emily, Jill, Laurie, Kristen, Meredith, Sarah (deleted names in italics). • African American names: Darnell, Hakim, Jermaine, Kareem, Jamal, Leroy, Rasheed, Tremayne, Tyrone, Aisha, Ebony, Keisha, Kenya, Latonya, Lakisha, Latoya, Tamika, Tanisha (deleted names in italics). • First set of Pleasant and Unpleasant: as per previous experiment with African American and European American names. • updated Pleasantness: joy, love, peace, wonderful, pleasure, friend, laughter, happy. • updated Unpleasantness: agony, terrible, horrible, nasty, evil, war, awful, failure. Gender Biases We now turn to gender-related biases and stereotypes. We begin by returning to prejudice as demonstrated by the IAT, but then we will turn to matching the biases we data mine against veridical information taken from published U.S. government statistics. Replicating Implicit Associations for Career and Family Whether or not it is appropriate for women to have careers has been a matter of significant cultural dispute. Historically, the consensus was that they should not; today, most but by no means all Americans consider it as appropriate for a woman to have a career as a man. Similarly, there have been historical biases against men who choose to take domestic roles. The IAT study we compare to here was conducted online, and thus has a vastly larger subject pool. However, since there is more difficulty ensuring that online subjects will complete their task with attention, it also has far fewer keywords examined. We are able to replicate the results even with these reduced keyword sets. With 38,797 interpretable subjects (those who fully completed the test), female names were found to be more associated with family than career words with an effect size of 0.72 and p-value < 10−2 , Nosek et al. (2002a, p. 105). Original Finding: Our Finding: We found the same result that females are more associated with family and males with career, with an effect size of 1.81 and p-value < 10−3 . Stimuli: We use the same stimuli found in Nosek et al. (2002a, p. 114). • Male names: John, Paul, Mike, Kevin, Steve, Greg, Jeff, Bill. • Female names: Amy, Joan, Lisa, Sarah, Diana, Kate, Ann, Donna. • Career words : executive, management, professional, corporation, salary, office, business, career. • Family words : home, parents, children, family, cousins, marriage, wedding, relatives. 5/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. Replicating Implicit Associations for Arts and Mathematics In a similar result, both Nosek et al. and we find that female terms are more associated with arts than mathematics, compared to male terms. Original Finding: 28,108 subjects completed the online IAT and female terms were more associated with arts than mathematics with an effect size of 0.82 and p-value < 10−2 , Nosek et al. (2002a, p. 105). Our Finding: Stimuli: We found the expected association with an effect size of 1.06 and a p-value of 10−2 . We use the stimuli found in Nosek et al. (2002a, p. 114). • Math words : math, algebra, geometry, calculus, equations, computation, numbers, addition. • Arts Words : poetry, art, dance, literature, novel, symphony, drama, sculpture. • Male attributes: male, man, boy, brother, he, him, his, son. • Female attributes: female, woman, girl, sister, she, her, hers, daughter. Replicating Implicit Associations for Arts and Sciences In another laboratory study, Nosek et al. (2002b) found that female terms are less associated with the sciences, and male terms less associated with the arts. 83 subjects took the IAT with a combination of math/science and art/language attributes, and the expected associations were observed with an effect size of 1.47 and a p-value of 10−24 , Nosek et al. (2002b, p. 51). Original Finding: By examining only arts and sciences attributes, we found that female terms were associated more with arts and male terms with science with an effect size of 1.24 and a p-value of 10−2 . Our Finding: Stimuli: We use the stimuli found in Nosek et al. (2002b, p. 59). • Science words : science, technology, physics, chemistry, Einstein, NASA, experiment, astronomy. • Arts words : poetry, art, Shakespeare, dance, literature, novel, symphony, drama. • Male attributes: brother, father, uncle, grandfather, son, he, his, him. • Female attributes: sister, mother, aunt, grandmother, daughter, she, hers, her. Comparison to Real-World Data: Occupational Statistics It has been suggested that implicit gender-occupation biases are linked to gender gaps in occupational participation (Nosek et al., 2009); however the relationship between these is complex and may be mutually reinforcing. Here we examine the correlation between the gender association of occupation words and labor-force participation data. The x-axis of Figure 1 is derived from the 2015 U.S. Bureau of Labor Statistics3 , which provides information about occupational categories and the percentage of women that have certain occupations under these categories. We generated single word occupation names (as explained in the Methods section) based on the available data and calculated the percentage of women for the set of single word occupation names. Original Data: By applying WEFAT, we are able to use word embeddings to predict the percentage of women in the 50 most relevant occupations with a Pearson’s correlation coefficient of ρ = 0.90 with p-value < 10−18 . Our Finding: We use the gender stimuli found in Nosek et al. (2002a, p. 114) along with the occupation attributes we derived from labor statistics. Stimuli: • Careers : technician, accountant, supervisor, engineer, worker, educator, clerk, counselor, inspector, mechanic, manager, therapist, administrator, salesperson, receptionist, librarian, advisor, pharmacist, janitor, psychologist, physician, carpenter, nurse, investigator, bartender, specialist, electrician, officer, pathologist, teacher, lawyer, planner, practitioner, plumber, instructor, surgeon, veterinarian, paramedic, examiner, chemist, machinist, appraiser, nutritionist, architect, hairdresser, baker, programmer, paralegal, hygienist, scientist. • Female attributes: female, woman, girl, sister, she, her, hers, daughter. • Male attributes: male, man, boy, brother, he, him, his, son. 3 http://www.bls.gov/cps/cpsaat11.htm 6/14 Strength of association of occupation word vector with female gender Outdated draft. See published version at http://opus.bath.ac.uk/55288/. 2 1 0 −1 −2 0 20 40 80 100 60 Percentage of workers in occupation who are women Figure 1. Occupation-gender association Pearson’s correlation coefficient ρ = 0.90 with p-value < 10−18 . Comparison to Real-World Data: Androgynous Names Similarly, we looked at the veridical association of gender to androgynous names, that is, names sometimes used by either gender. In this case, the most recent information we were able to find was the 1990 census name and gender statistics. Perhaps because of the age of our name data, our correlation was weaker than for the 2015 occupation statistics, but still strikingly significant. Strength of association of name vector with female gender 2 1 0 −1 −2 0 20 40 80 100 60 Percentage of people with name who are women Figure 2. People with androgynous names Pearson’s correlation coefficient ρ = 0.84 with p-value < 10−13 . The x-axis of Figure 2 is derived from the 1990 U.S. census data4 that provides first name and gender information in population. Original Data: Our Finding: The y-axis reflects our calculation of the bias for how male or female each of the names is. By applying WEFAT, we are able to predict the percentage of people with a name who were women with Pearson’s correlation coefficient of ρ = 0.84 4 http://www.census.gov/main/www/cen1990.html 7/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. Figure 3. A 2D projection (first two principal components) of the 300-dimensional vector space of the GloVe word embedding (Pennington et al., 2014). The lines illustrate algebraic relationships between related words: pairs of words that differ only by gender map to pairs of vectors whose vector difference is roughly constant. Similar algebraic relationships have been shown for other semantic relationships, such as countries and their capital cities, companies and their CEOs, or simply different forms of the same word. with p-value < 10−13 . Stimuli: We use the gender stimuli found in Nosek et al. (2002a, p. 114) along with the most popular androgynous names from 1990’s public census data as targets. • Names : Kelly, Tracy, Jamie, Jackie, Jesse, Courtney, Lynn, Taylor, Leslie, Shannon, Stacey, Jessie, Shawn, Stacy, Casey, Bobby, Terry, Lee, Ashley, Eddie, Chris, Jody, Pat, Carey, Willie, Morgan, Robbie, Joan, Alexis, Kris, Frankie, Bobbie, Dale, Robin, Billie, Adrian, Kim, Jaime, Jean, Francis, Marion, Dana, Rene, Johnnie, Jordan, Carmen, Ollie, Dominique, Jimmie, Shelby. • Female and Male attributes: as per previous experiment on occupations. Methods Data and training A word embedding is a representation of words as points in a vector space. Loosely, embeddings satisfy the property that vectors that are close to each other represent semantically “similar” words. Word embeddings derive their power from the discovery that vector spaces with around 300 dimensions suffice to capture most aspects of similarity, enabling a computationally tractable representation of all or most words in large corpora of text (Bengio et al., 2003; Lowe, 1997). Starting in 2013, the word2vec family of word embedding techniques has gained popularity due to a new set of computational techniques for generating word embeddings from large training corpora of text, with superior speed and predictive performance in various natural-language processing tasks (Mikolov et al., 2013; Mikolov and Dean, 2013). Most famously, word embeddings excel at solving “word analogy” tasks because the algebraic relationships between vectors capture syntactic and semantic relationships between words (Figure 3). In addition, word embeddings have found use in natural-language processing tasks such as web search and document classification. They have also found use in cognitive science for understanding human memory and recall (Zaromb et al., 2006; McDonald and Lowe, 1998). For all results in this paper we use the state-of-the-art GloVe word embedding method, in which, at a high level, the similarity between a pair of vectors is related to the probability that the words co-occur close to each other in text (Pennington et al., 2014). Word embedding algorithms such as GloVe substantially amplify the signal found in simple co-occurrence probabilities using dimensionality reduction. In pilot-work experiments along the lines of those presented here (on free associations rather than implicit associations) raw co-occurrence probabilities were shown to lead to substantially weaker results (Macfarlane, 2013). Rather than train the embedding ourselves, we use pre-trained GloVe embeddings distributed by its authors. We aim to replicate the effects that may be found in real applications to the extent possible, and using pre-trained embeddings minimizes 8/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. the choices available to us and simplifies reproducing our results. We pick the largest of the four corpora for which the GloVe authors provide trained embeddings, which is a “Common Crawl” corpus obtained from a large-scale crawl of the web, containing 840 billion tokens (roughly, words). Tokens in this corpus are case-sensitive and there are 2.2 million different ones, each corresponding to a 300-dimensional vector. The large size of this corpus and the resulting model is important to us, since it enables us to find word vectors for even relatively uncommon names. An important limitation is that there are no vectors for multi-word phrases. We can expect similar results to the ones presented here if we used other corpora and/or embedding algorithms. For example, we repeated all the WEAT and WEFAT experiments presented above using a different pre-trained embedding: word2vec on a Google News corpus (Mikolov and Dean, 2013). In all experiments, we observed statistically significant effects and high effect sizes. Further, we found that the gender association strength of occupation words is highly correlated between the GloVe embedding and the word2vec embedding (Pearson ρ = 0.88; Spearman ρ = 0.86). In concurrent work, Bolukbasi et al. (2016) compared the same two embeddings, using a different measure of the gender bias of occupation words, also finding a high correlation (Spearman ρ = 0.81). Word Embedding Association Test (WEAT) To demonstrate and quantify bias, we use the permutation test. Borrowing terminology from the IAT literature, consider two sets of target words (e.g., programmer, engineer, scientist, ... and nurse, teacher, librarian, ...) and two sets of attribute words (e.g., man, male, ... and woman, female ...). The null hypothesis is that there is no difference between the two sets of target words in terms of their relative similarity to the two sets of attribute words. The permutation test measures the (un)likelihood of the null hypothesis by computing the probability that a random permutation of the attribute words would produce the observed (or greater) difference in sample means. In formal terms, let X and Y be two sets of target words of equal size, and A, B the two sets of attribute words. Let cos(~a,~b) denote the cosine of the angle between the vectors ~a and ~b. • The test statistic is s(X,Y, A, B) = ∑ s(x, A, B) − ∑ s(y, A, B) x∈X y∈Y where s(w, A, B) = meana∈A cos(~w,~a) − meanb∈B cos(~w,~b) In other words, s(w, A, B) measures the association of the word w with the attribute, and s(X,Y, A, B) measures the differential association of the two sets of target words with the attribute. • Let {(Xi ,Yi )}i denote all the partitions of X ∪Y into two sets of equal size. The one-sided p-value of the permutation test is Pri [s(Xi ,Yi , A, B) > s(X,Y, A, B)] • The effect size is meanx∈X s(x, A, B) − meany∈Y s(y, A, B) std-devw∈X∪Y s(w, A, B) It is a normalized measure of how separated the two distributions (of associations between the target and attribute) are. We re-iterate that these p-values and effect sizes don’t have the same interpretation as the IAT. The “subjects” in our experiments are words, not people. While the IAT can measure the differential association between a single pair of target concepts and an attribute, the WEAT can only measure the differential association between two sets of target concepts and an attribute. Word Embedding Factual Association Test (WEFAT) To understand and demonstrate the necessity of human bias in word embeddings, we also wish to examine how word embeddings capture empirical information about the world, which is also embedded in language. Consider a set of target concepts, such as occupations, and a real-valued, factual property of the world associated with each concept, such as the percentage of workers in the occupation who are women. We’d like to test if the vectors corresponding to the concepts embed knowledge of the property, that is, if there is an algorithm that can extract or predict the property given the vector. In principle we could use any algorithm, but in this work we test the association of the target concept with some set of attribute words, analogous to WEAT above. Formally, consider a single set of target words W and two sets of attribute words A, B. There is a property pw associated with each word w ∈ W . 9/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. • The statistic associated with each word vector is a normalized association score of the word with the attribute: s(w, A, B) = meana∈A cos(~w,~a) − meanb∈B cos(~w,~b) std-devx∈A∪B cos(~w,~x) • The null hypothesis is that there is no association between s(w, A, B) and pw . We test the null hypothesis using a linear regression analysis to predict the latter from the former. Now we discuss in more detail how we apply WEFAT in two cases. The first is to test if occupation word vectors embed knowledge of the gender composition of the occupation in the real world. We use data released by the Bureau of Labor Statistics in which occupations are categorized hierarchically, and for each occupation the number of workers and percentage of women are given (some data is missing). The chief difficulty is that many occupation names are multi-word terms whereas word vectors represent single words. Our strategy is to convert a multi-word term into a single word that represents a superset of the category (e.g., chemical engineer → engineer), and filter out occupations where this is not possible. Our second application of WEFAT is to test if androgynous names embed knowledge of how often the name is given to boys versus girls. We picked the most popular names in each 10% window of gender frequency based on 1990 U.S. Census data. Here again there is a difficulty: some names are also regular English words (e.g., Will). State-of-the-art word embeddings are not yet sophisticated enough to handle words with multiple senses or meanings; all usages are lumped into a single vector. To handle this, we algorithmically determine how “name-like” each vector is (by computing the distance of each vector to the centroid of all the name vectors), and eliminate the 20% of vectors that are least name-like. We plan to make the code used to generate our results publicly available.5 Discussion We have shown that machine learning can acquire prejudicial biases from training data that reflect historical injustice. This is not entirely a new finding. A recent line of work on fairness in machine learning tries to minimize or avoid such biases (Dwork et al., 2012; Feldman et al., 2015; Zemel et al., 2013; Barocas and Selbst, 2014). However, unlike this literature, our setting is not a particular, explicit decision-making task (known as “classification” in machine learning), but rather the often unconscious consequences of all of language. We show for the first time that if AI is to exploit via our language the vast knowledge that culture has compiled, it will inevitably inherit human-like prejudices. In other words, if AI learns enough about the properties of language to be able to understand and produce it, it also acquires cultural associations that can be offensive, objectionable, or harmful. These are much broader concerns than intentional discrimination, and possibly harder to address. This distinction informs much of the rest of this section. Implications for understanding human prejudice The simplicity and strength of our results suggests a new null hypothesis for explaining origins of prejudicial behavior in humans, namely, the implicit transmission of ingroup/outgroup identity information through language. That is, before providing an explicit or institutional explanation for why individuals make decisions that disadvantage one group with regards to another, one must show that the unjust decision was not a simple outcome of unthinking reproduction of statistical regularities absorbed with language. Similarly, before positing complex models for how prejudicial attitudes perpetuate from one generation to the next or from one group to another, we must check whether simply learning language is sufficient to explain the observed transmission of prejudice. These new null hypotheses are important not because we necessarily expect them to be true in most cases, but because Occam’s razor now requires that we eliminate them, or at least quantify findings about prejudice in comparison to what is explainable from language transmission alone. Our work lends credence to the highly parsimonious theory that all that is needed to create prejudicial discrimination is not malice towards others, but preference for one’s ingroup (Greenwald and Pettigrew, 2014). This theory is also supported by recent results showing that in times of conflict, rather than an increase in ingroup altruism, we see a decrease in baseline altruism towards the outgroup (Silva and Mace, 2015). Our results also both explain and support empirical results from education indicating that reducing prejudice requires directed interventions to facilitate “decategorizing and recategorizing outgroups” (Dessel, 2010, p. 411). Simple contact with members of other groups is not enough. There needs to be specific bridging experiences to facilitating the construction of new identities or to develop skills to work with people across group boundaries. It has been known for some time that even newborn infants attend foremost to speakers sharing their mother’s dialect (Kinzler et al., 2007); it has been conjectured that such ingroup signaling may even account for the origins of music and language (Fitch, 2004). What we have shown here is that language identifies not only one’s own group, but also which group 5 We thank Will Lowe for assistance with the methods WEAT and WEFAT that greatly improved the methodology. 10/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. is currently culturally dominant, or dominates particular regions of a culture. This may account for why in the IAT, Koreans and Japanese people living in their own countries each associate the other as ‘less pleasant,’ but African Americans show European-American-oriented biases, though not as strongly as European Americans (Greenwald et al., 1998). The dominance of European-American orientation may change as the American demography changes; indeed it would be interesting to examine corpora consisting of newspapers or other public language in towns or cities with different demographic makeup, particularly where racial diversity is also represented consistently in public offices and media. Of course, neither our work nor any other theory explaining the origins of prejudice justify prejudiced behavior. Humans are (or can be) good at using explicit knowledge to better cooperate, including choosing to behave fairly. Lee (2016) has shown very recently that the level of implicit bias displayed by subjects in the IAT does not predict cooperative performance. In other words, the learned biases that affect rate of comprehension of test stimuli or construction of artificial pairings does not affect deliberate choices about how to treat others, at least not in a laboratory setting. However, we have demonstrated here that a known case of prejudicial decision making (about inviting job candidates, cf. Bertrand and Mullainathan, 2004) can be replicated by biases latent in language. We therefore recommend continuing the program of research examining behavior that does and does not correlate to human subject performance in the IAT. We recommend using our text processing tools to check pilot predictions for likely IAT performance on comparisons where none is currently known. Consequences of bias in humans and machines We have shown that AI can and does inherit substantially the same biases that humans exhibit. However, the consequences of bias are different in humans and machine-learning systems. Bias in AI is important because AI is increasingly given agency in our society, for tasks ranging from predictive text in search to determining criminal sentences assigned by courts. Yet machines are artifacts, owned and controlled by humans operators. That means that learning can be shut off completely once a product is put into production or operation, and this is frequently done to create more efficient and uniform experiences. Such an approach opens a potential downside: we may enshrine an imperfect procedure in a context where it will not be routinely reexamined by other humans. Such artifacts could persist and perpetuate biases in society for a long time — digital analogs of Robert Moses’s racially motivated overpasses (Winner, 1980). One advantage of AI, at least where the algorithms and outcomes are open to inspection, is that it can at least make such errors explicit and therefore potentially subject to monitoring and correction. After all, the same dependencies on history we have uncovered here may very well also pollute individual expectations, public policy, and even law. Natural intelligence and learning, just as in artifacts, may pick upon correlations without considering sufficiently carefully whether there is any causal relationship, or whether the correlation is caused by some other unobserved factor, possibly a correctable injustice. Effects of bias in NLP applications To better understand the potential impact of bias in word embeddings, let us consider applications where they have found use. Sentiment analysis classifies text as being positive, negative, or neutral. Two of its uses are in marketing to quantify customer satisfaction (say, from a set of product reviews) and in finance to predict market trends (say, from tweets about companies). Consider a straw-man sentiment analysis technique based on word embeddings: calculate the valence of each word based on its association with designated positive and negative words, then sum up the sentiment scores. Now consider applying this technique to movie reviews. Our results show that European-American names have more positive valence than African-American names in a state-of-the-art word embedding. That means a sentence containing a European-American name will have a higher sentiment score than a sentence with that name replaced by an African-American name. In other words, the tool will display a racial bias in its output based on actor and character names. We picked this example because the argument follows directly from our experiments on names. But our results suggest that other imprints of human racial prejudice, not confined to names, will also be picked up by machine-learning models. Besides, bias is known to creep in indirectly, by proxy (Barocas and Selbst, 2014). Thus, it would be simplistic to conclude that we can fix the problem by withholding names from the inputs to NLP applications. Next, consider statistical machine translation (SMT). Unsurprisingly, today’s SMT systems reflect existing gender stereotypes. Translations to English from many gender-neutral languages such as Finnish, Estonian, Hungarian, Persian, and Turkish lead to gender-stereotyped sentences. For example, Google Translate converts these Turkish sentences with genderless pronouns: “O bir doktor. O bir hemşire.” to these English sentences: “He is a doctor. She is a nurse.” A test of the 50 occupation words used in the results presented in Figure 1 shows that the pronoun is translated to “he” in the majority of cases and “she” in about a quarter of cases; tellingly, we found that the gender association of the word vectors almost perfectly predicts which pronoun will appear in the translation. Challenges in addressing bias Redresses such as transparent development of AI technology and improving diversity and ethical training of developers, while useful, do little to address the kind of prejudicial bias we expose here. Unfortunately, our work points to several additional 11/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. reasons why addressing bias in machine learning will be harder than one might expect. First, our results suggest that word embeddings don’t merely pick up specific, enumerable biases such as gender stereotypes (Bolukbasi et al., 2016), but rather the entire spectrum of human biases reflected in language. In fact, we show that bias is meaning. Bias is identical to meaning, and it is impossible to employ language meaningfully without incorporating human bias. This is why we term unacceptable bias prejudice in this paper. The biases we reveal aren’t about a particular application of machine learning, but rather about the basic representation of knowledge — used possibly in human cognition, and certainly in an expanding variety of AI applications. Second, the idea of correcting even prejudiced biases is also problematic. That is because societal understanding of prejudice is constantly evolving, along with our understanding of humanity and human rights, and also varies between cultures. It is therefore hard or impossible to specify algorithmically what is prejudiced. To give one example, Monteith and Pettit (2011) using the IAT show that people with mental illnesses are stigmatized compared to people with physical illnesses — a result we have also replicated in word embeddings (but not reported above). Is this a prejudice? Who determines whether it should be corrected? Third and finally, we have shown that biases result from extant as well as historic inequalities in the world. There may be many other contexts where these inequalities are important to know about. More generally, shared awareness of the real world is important for communication (Zue, 1985; Barsalou, 2009). Consider the gender stereotypes in occupations. If we were using machine learning to evaluate the suitability of job applicants, these stereotypes would be bad. Yet if the task was to analyze historical job ads and infer if more men or women worked in those roles, the stereotypical associations would be exactly the information we would wish to utilize. The gender associations we found in the word embeddings of names might be exceedingly useful, yet those same associations might lead to prejudicial expectations concerning names and occupations. Remedies must be tailored to applications. Within a given context, such as college admissions, we can decide whether (and to what extent) considerations of fairness should override the usual focus on predictive accuracy (as is the case with affirmative action), but it is not meaningful to do this devoid of context. Put simply, eliminating bias is eliminating information; eliminating prejudice takes more thought. Awareness is better than blindness For these reasons, we view the approach of “debiasing” word embeddings (Bolukbasi et al., 2016) with skepticism. If we view AI as perception followed by action, debiasing alters the AI’s perception (and model) of the world, rather than how it acts on that perception. This gives the AI an incomplete understanding of the world. We see debiasing as “fairness through blindness”.6 It has its place, but also important limits: prejudice can creep back in through proxies (although we should note that Bolukbasi et al. (2016) do consider “indirect bias” in their paper). Efforts to fight prejudice at the level of the initial representation will necessarily hurt meaning and accuracy, and will themselves be hard to adapt as societal understanding of fairness evolves. Instead, we take inspiration from the fact that humans can express behavior different from their implicit biases (Lee, 2016). Human intelligence is typified by behavior integrating multiple forms of memory and evidence (Purcell and Kiani, 2016; Bear and Rand, 2016). It includes the capacity to recall one-shot exposure to highly context-specific information in the form of rules and instructions. We can learn that “prejudice is bad”, that “women used to be trapped in their homes and men in their careers, but now gender doesn’t necessarily determine family role” and so forth. If AI is not built in a similar way, then it would be possible for prejudice absorbed by machine learning to have a much greater negative impact than when prejudice is absorbed in the same way by children. This is because children also receive other kinds of instruction and social examples as a part of the ordinary, painstaking process of child rearing. Normally when we design AI architectures, we try to keep them as simple as possible to facilitate our capacity to debug and maintain AI systems. However, where AI is partially constructed automatically by machine learning of human culture, we may also need an analog of human explicit memory and deliberate actions, that can be trained or programmed to avoid the expression of prejudice. Of course, such an approach doesn’t lend itself to a straightforward algorithmic formulation. Instead it requires a long-term, interdisciplinary research program that includes cognitive scientists and ethicists. One concrete suggestion for the present is to choose corpora for training machine learning to have as little prejudice as possible — the tools we have presented here can be used to identify these. Another is that given the vulnerability of relying on purely statistical information for understanding and operating within a culture, it may be advisable to consider more complex AI architectures such as cognitive systems (Thórisson, 2007; Hanheide et al., 2015). Heterogeneous approaches to representing knowledge and intelligence may allow us to exploit both the great strengths of machine learning and the instructability of symbolic systems. Acknowledgements We are grateful to the following people: Will Lowe for substantial assistance in the design of our significance tests, Tim Macfarlane for his pilot research as a part of his undergraduate dissertation, Solon Barocas and Miles Brundage for excellent comments on an early version of this paper. 6 Our use of this term is inspired by Dwork et al. (2012), but we use it slightly differently, and our argument is different from theirs. 12/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. References Angwin, J., Larson, J., Mattu, S., and Kirchner, L. (2016). Machine bias: There’s software used across the country to predict future criminals. and it’s biased against blacks. ProPublica, May, 23. Barocas, S. and Selbst, A. D. (2014). Big data’s disparate impact. California Law Review, 104. Barr, A. (2015). Google mistakenly tags black people as ‘gorillas,’ showing limits of algorithms. The New York Times. Barsalou, L. W. (2009). Simulation, situated conceptualization, and prediction. Philosophical Transactions of the Royal Society B: Biological Sciences, 364(1521):1281–1289. Bear, A. and Rand, D. G. (2016). Intuition, deliberation, and the evolution of cooperation. Proceedings of the National Academy of Sciences, 113(4):936–941. Bengio, Y., Ducharme, R., Vincent, P., and Jauvin, C. (2003). A neural probabilistic language model. journal of machine learning research, 3(Feb):1137–1155. Bertrand, M. and Mullainathan, S. (2004). Are emily and greg more employable than lakisha and jamal? a field experiment on labor market discrimination. The American Economic Review, 94(4):991–1013. Bishop, C. M. (2006). Pattern Recognition and Machine Learning. Springer, London. Bolukbasi, T., Chang, K.-W., Zou, J., Saligrama, V., and Kalai, A. (2016). Man is to computer programmer as woman is to homemaker? debiasing word embeddings. arXiv preprint arXiv:1607.06520. Crawford, K. (2016). Artificial intelligence’s white guy problem. The New York Times. Dessel, A. (2010). Prejudice in schools: Promotion of an inclusive culture and climate. Education and Urban Society, 42(4):407–429. Dwork, C., Hardt, M., Pitassi, T., Reingold, O., and Zemel, R. (2012). Fairness through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, pages 214–226. ACM. Feldman, M., Friedler, S. A., Moeller, J., Scheidegger, C., and Venkatasubramanian, S. (2015). Certifying and removing disparate impact. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 259–268. ACM. Fitch, W. T. (2004). Kin selection and ‘mother tongues’: A neglected component in language evolution. In Oller, D. K. and Griebel, U., editors, Evolution of Communication Systems: A Comparative Approach, pages 275–296. MIT Press, Cambridge, MA. Greenwald, A. G., McGhee, D. E., and Schwartz, J. L. (1998). Measuring individual differences in implicit cognition: the implicit association test. Journal of personality and social psychology, 74(6):1464. Greenwald, A. G. and Pettigrew, T. F. (2014). With malice toward none and charity for some: Ingroup favoritism enables discrimination. American Psychologist, 69(7):669. Hanheide, M., Göbelbecker, M., Horn, G. S., Pronobis, A., Sjöö, K., Aydemir, A., Jensfelt, P., Gretton, C., Dearden, R., Janicek, M., Zender, H., Kruijff, G.-J., Hawes, N., and Wyatt, J. L. (2015). Robot task planning and explanation in open and uncertain worlds. Artificial Intelligence, pages –. in press. Kiefer, A. K. and Sekaquaptewa, D. (2007). Implicit stereotypes and women’s math performance: How implicit gender-math stereotypes influence women’s susceptibility to stereotype threat. Journal of Experimental Social Psychology, 43(5):825–832. Kinzler, K. D., Dupoux, E., and Spelke, E. S. (2007). The native language of social cognition. Proceedings of the National Academy of Sciences, 104(30):12577–12580. Lee, D. J. (2016). Racial bias and the validity of the implicit association test. Technical Report 35, Helsinki, Finland. Lowe, W. (1997). Meaning and the mental lexicon. In Proceedings of the 15th International Joint Conference on Artificial Intelligence, pages 1092–1097, Nagoya. Morgan Kaufmann. Macfarlane, T. (2013). Extracting semantics from the enron corpus. McDonald, S. and Lowe, W. (1998). Modelling functional priming and the associative boost. In Proceedings of the Twentieth Annual Conference of the Cognitive Science Society, pages 667–680. LEA. Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781. Mikolov, T. and Dean, J. (2013). Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems. Monteith, L. L. and Pettit, J. W. (2011). Implicit and explicit stigmatizing attitudes and stereotypes about depression. Journal of Social and Clinical Psychology, 30(5):484. Moss, H. E., Ostrin, R. K., Tyler, L. K., and Marslen-Wilson, W. D. (1995). Accessing different types of lexical semantic information: Evidence from priming. Journal of Experimental Psychology: Learning, Memory and Cognition, 21:863–883. Noble, S. U. (2013). Google search: Hyper-visibility as a means of rendering black women and girls invisible. InVisible Culture, 19. Nosek, B. A., Banaji, M., and Greenwald, A. G. (2002a). Harvesting implicit group attitudes and beliefs from a demonstration 13/14 Outdated draft. See published version at http://opus.bath.ac.uk/55288/. web site. Group Dynamics: Theory, Research, and Practice, 6(1):101. Nosek, B. A., Banaji, M. R., and Greenwald, A. G. (2002b). Math= male, me= female, therefore math6= me. Journal of personality and social psychology, 83(1):44. Nosek, B. A., Smyth, F. L., Sriram, N., Lindner, N. M., Devos, T., Ayala, A., Bar-Anan, Y., Bergh, R., Cai, H., Gonsalkorale, K., et al. (2009). National differences in gender–science stereotypes predict national sex differences in science and math achievement. Proceedings of the National Academy of Sciences, 106(26):10593–10597. Oswald, M. and Grace, J. (2016). Norman stanley fletcher and the case of the proprietary algorithmic risk assessment. Policing Insight. Pennington, J., Socher, R., and Manning, C. D. (2014). Glove: Global vectors for word representation. In EMNLP, volume 14, pages 1532–43. Purcell, B. A. and Kiani, R. (2016). Hierarchical decision processes that operate over distinct timescales underlie choice and changes in strategy. Proceedings of the National Academy of Sciences, 113(31):E4531–E4540. Quine, W. V. O. (1960). Word and Object. MIT Press, Cambridge, MA. Silva, A. S. and Mace, R. (2015). Inter-group conflict and cooperation: field experiments before, during and after sectarian riots in northern ireland. Frontiers in Psychology, 6:1790. Stanley, D. A., Sokol-Hessner, P., Banaji, M. R., and Phelps, E. A. (2011). Implicit race attitudes predict trustworthiness judgments and economic trust decisions. Proceedings of the National Academy of Sciences, 108(19):7710–7715. Sweeney, L. (2013). Discrimination in online ad delivery. Queue, 11(3):10:10–10:29. Thórisson, K. R. (2007). Integrated A.I. systems. Minds and Machines, 17(1):11–25. Turing, A. M. (1950). Computing machinery and intelligence. Mind, 59(236):433–460. Winner, L. (1980). Do artifacts have politics? Daedalus, pages 121–136. Zaromb, F. M., Howard, M. W., Dolan, E. D., Sirotin, Y. B., Tully, M., Wingfield, A., and Kahana, M. J. (2006). Temporal associations and prior-list intrusions in free recall. Journal of Experimental Psychology: Learning, Memory, and Cognition, 32(4):792. Zemel, R. S., Wu, Y., Swersky, K., Pitassi, T., and Dwork, C. (2013). Learning fair representations. ICML (3), 28:325–333. Zue, V. W. (1985). The use of speech knowledge in automatic speech recognition. Proceedings of the IEEE, 73(11):1602–1615. 14/14
2cs.AI
1 Tree-CNN: A Deep Convolutional Neural Network for Lifelong Learning arXiv:1802.05800v1 [cs.CV] 15 Feb 2018 Deboleena Roy, Priyadarshini Panda and Kaushik Roy, Fellow, IEEE Abstract—In recent years, Convolutional Neural Networks (CNNs) have shown remarkable performance in many computer vision tasks such as object recognition and detection. However, complex training issues, such as “catastrophic forgetting” and hyper-parameter tuning, make incremental learning in CNNs a difficult challenge. In this paper, we propose a hierarchical deep neural network, with CNNs at multiple levels, and a corresponding training method for lifelong learning. The network grows in a tree-like manner to accommodate the new classes of data without losing the ability to identify the previously trained classes. The proposed network was tested on CIFAR-10 and CIFAR-100 datasets, and compared against the method of fine tuning specific layers of a conventional CNN. We obtained comparable accuracies and achieved 40% and 20% reduction in training effort in CIFAR-10 and CIFAR 100 respectively. The network was able to organize the incoming classes of data into feature-driven super-classes. Our model improves upon existing hierarchical CNN models by adding the capability of self-growth and also yields important observations on feature selective classification. Index Terms—Convolutional Neural Networks, Deep Learning, Incremental Learning, Lifelong Learning, Transfer Learning F 1 I NTRODUCTION D EEP Convolutional Neural Networks (DCNNs) have emerged as the leading architecture for large scale image classification in recent years [1]. In 2012, Krizevsky, et al. [2] won the ImageNet Large Scale Visual Recognition Challenge (ISLVRC) by implementing a Deep-CNN. This catapulted DCNNs into the spotlight, and since then, they have dominated ISLVRC and have surpassed human level performance on popular image datasets such as MNIST [3], [4] and ImageNet [5]. Today, with increased access to large amount of labeled data (eg. ImageNet contains 1.2 million images with 1000 categories), supervised learning has become the leading paradigm in training DCNNs for image recognition.Traditionally, a DCNN is trained on a dataset containing large number of labeled images. The network learns to extract relevant features and classify these images. This trained model is then applied to other unlabeled images to classify them into these specific classes. In such training, all the training data is presented to the network during the same training process. However, in real world, we hardly have all the information at once. Instead, data is gathered incrementally over time. And we, humans, also learn in a similar incremental manner. We accumulate knowledge acquired in the past and use it to learn new things during our lifetime. Inspired by the way humans learn, Lifelong Machine Learning (LML) [6] is an emerging paradigm in machine learning that tries to address this limitation. Lifelong Learning [7], [8], is based on the principle that learning the nth task should be easier than learning the (n − 1)th task. While, intuitively, this makes sense; the actual implementation of such a network faces several challenges that are discussed further. • Deboleena Roy, Priyadarshini Panda and Kaushik Roy are with Department of Electrical and Computer Engineering, Purdue University, West Lafayette, IN, 30332. A DCNN embeds feature extraction and classification in one coherent architecture within the same model. Modifying one part of the parameter space immediately affects the model globally. Another problem of incrementally training a DCNN is the issue of “catastrophic forgetting” [9]. When new data is fed into a DCNN, it results in the destruction of existing features learned from earlier data. This means when training on new data, all previous data must also be shown to the network. Interestingly, it has also been observed that initial layers of DCNN learn to extract generic features, while deeper layers learn to identify higher level features. It has been demonstrated that initializing a new network with transferred features from a trained network can potentially boost the performance of the new one [10]. “Off the shelf” CNNs trained on large datasets are then fine-tuned for specific applications [11]. However, these solutions do not train the original network to learn the new classes. Rather a new network is created from the old one. In this work, we propose a network that grows hierarchically as new classes are introduced. The branching is based on the similarity of features between new and old classes. The initial nodes of the Tree-CNN divide the dataset into coarse super-classes, and as we approach the leaves of the network, finer classification is done. Such a model allows us to leverage the convolution layers learned previously to be used in the new bigger network. Our objective is to present the advantages of such a network model in terms of incremental learning over transferring trained convolution layers and fine tuning a regular network. The proposed Tree-CNN has the following salient features: i. The network is initially trained to classify images into N classes. When an image belonging to a new class is shown to the network, the network grows 2 ii. iii. iv. to accommodate the new class. The network grows by adding a new branch or a new leaf node to the current structure. The decision is based on how closely the new class resembles a particular superclass and its sub-classes. The objective is to reduce the training effort, which is made up of 2 components: number of weights updated, and the number of examples (both old and new) required for training. The updates are localized to a section of the tree, while majority of the Tree-CNN is left untouched, therefore reducing the cost of learning new classes. The rest of the paper is organized as follows. The related work on incremental learning in deep neural networks is discussed in Section 2. Next, in Section 3 we explain in detail our proposed network architecture and incremental learning method. In Section 4, we describe the two experiments we conducted using CIFAR-10 and CIFAR-100 datasets. It is followed by a detailed analysis of the performance of the network and its comparison with basic transfer learning and fine tuning in Section 5. Finally, in Section 6 we discuss the merits and limitations of our network, conclude our findings and suggest opportunities for future work. 2 R ELATED W ORK The modern world of digitized data produces new information every second, thus fueling the need for systems that can learn as new data arrives. Traditional deep neural networks are static in that respect, and several new approaches to incremental learning are currently being explored. “Oneshot learning” [12] is a Bayesian transfer learning technique, that uses very few training samples to learn new classes. Fast R-CNN [13], a popular framework for object detection, also suffers from “catastrophic forgetting”. One way to mitigate this issue is to use a frozen copy of the original network compute and balance the loss when new classes are introduced in the network [14]. "Learning without Forgetting" [15] is another method that uses only new task data to train the network while preserving the original capabilities. However, here the original network is trained on an extensive dataset, such as ImageNet [5], and the new task data is a much smaller dataset. We, on the other hand, propose a network that knows only a handful of classes, and grows and learns over time. Our work draws inspiration from transfer learning. It has been observed that initial layers of a CNN learn very generic features [10]. The same work also demonstrated that a new network, when initialized with “learned” layers from a trained network, performs better. Switching initial layers of deep neural networks with pre-defined Gabor filters have been shown to reduce training time and offer a more energyefficient training process [16]. Common features shared between images of different objects has been exploited to build hierarchical classifiers. These features can be grouped semantically, such as in [17], in which authors built an “Attention-tree”, a visual semantic hierarchy to perform energy-efficient image classification. “FALCON: Feature driven selective classification” [18] is a classification methodology inspired by biological visual attention mechanism in the brain. They use characteristic features such as color and texture to break down the behemoth task of classifying large datasets into a set of hierarchical classifiers. Similar to the progression of complexity of convolutional layers in a DCNN, the upper nodes of a hierarchical CNN classify the images into coarse super-classes using basic features, like grouping green-colored objects together, or humans faces together. Then deeper nodes perform finer discrimination, such as “boy” v/s “girl” , “apples” v/s “oranges”, etc. Such hierarchical CNN models have shown to perform at par or even better than standard DCNNs [19]. “Discriminative Transfer learning” [20] is one of the earliest works where classes are categorized hierarchically to improve network performance. “HD-CNN” [19], is a hierarchical CNN model that is built by exploiting the common feature sharing aspect of images. However, in these works, the dataset is fixed from the beginning, and prior knowledge of all the classes and their properties is used to build a hierarchical model. In this work, the Tree-CNN starts out as a single root node and generates new hierarchies to accommodate the new classes. Images belonging to the older dataset are required during retraining, but by localizing the change to a small section of the whole network, we try to achieve reduction in training effort. In [21], a similar approach is applied, where the new classes are added to the old classes, and divided into two super-classes, by using an error-based model. The initial network is cloned to form two new networks which are fine tuned over the two new super-classes. While their motivation was a "divide-andconquer" approach for large datasets, we are interested in developing a model that can incrementally grow with new data. And, we sequentially add new data over multiple learning stages. In the next Section, we lay out in detail our design principle, network topology and the algorithm used to grow the network. 3 T HE L IFELONG L EARNING M ODEL 3.1 Network Architecture The network model is inspired from hierarchical classifiers. It is built with nodes, connected as a directed acyclic graph. Each node acts a classifier, predicting a label for the input image. As per the label, the image is then passed on to the next node which further classifies the image, until we reach a leaf node, the last step of classification. We begin by defining certain terms used frequently in our model. A Node represents the building block of our tree. Each node represents a group of 1 or more classes. Each node has following parameters. • • • Node-ID: Each node is given a number that uniquely identifies it. Parent: This holds the Node-ID of the node previous to this node. Each node can have only one parent. A parent node can be inferred as coarse-classifier, whereas the child node does finer classification. Except for the root node, all other nodes have parent node. Each node can only have at max one parent node. Children: It is an array of Node-IDs belonging to the nodes linked with each output neuron of the current 3 of the network to reach a specific leaf node. At each node, beginning with the top node, the image is fed to the DCNN associated with that node. The output node with the highest classification probability is the next node the algorithm moves to. If it is a leaf node, then the class associated with that node is the predicted class. Else, the algorithm feeds the image to the DCNN of that node. The pseudo-code for class prediction is given under Algorithm 1. IMAGE Root Node classifies input image into one of the “superclasses” Branch Node Fine classifier Fig. 1. A generic model of Tree-CNN: The root node predicts superclasses whereas lower nodes predict finer classes • • node. The number of children each node has is equal to the number of output neurons. Net: This stores the convolutional neural network that processes the input image. In case of a leaf node, this is empty. LT: Acronym for "Labels Transform", LT is a lookup table that keeps track of the original label of a class, and the output neuron number it is associated with. For a leaf node, LT has just one record, the class label of that node. The root node is the highest node of the tree. The first classification happens at this node. Each output neuron of the root is associated with a node. Next in hierarchy is the branch node. It has a parent and two or more children. It performs classification for at minimum 2 classes/superclasses. The leaf node is the last level of the tree. Each leaf node is uniquely associated to a class. No two leaf nodes have the same class. Fig. 1 shows the root node and branch nodes for a 2 stage classification network. Each output of the second level branch node is a leaf node. 3.2 Algorithm To start with, one has two options when implementing the Tree-CNN. If there are only a handful of distinct classes that don’t seem like they can be grouped in a hierarchical fashion, then the network can be initialized as a single root node. The output of the root node are the distinct classes. However, if at the beginning we have data that is already grouped in hierarchical manner as coarse and fine classes, then a more detailed Tree-CNN can be initialized. The root node will be trained to classify the images into the highest level of super-classes. The branch nodes further down the tree are trained to classify the images into finer classes. Now that we have a trained Tree-CNN, we discuss how it predicts classes and how it treats new classes. First, we describe how the network predicts the class of an input image. A recursive algorithm moves along the hierarchies Algorithm 1 Class Prediction Initialize: Im = Input Image, node = root node of the TreeCNN procedure C LASS P REDICT(Im,node) if num(node.children) = 0 then . Checks if it is a leaf node return class = node.LT . for leaf node, LT = class label else NextNode = EvaluateNet(Im, node.net) . EvaluateNet returns the node.ID of the child node having the largest output return C LASS P REDICT(Im,NextNode) end if end procedure Next we describe the process of incremental/lifelong learning. The Tree-CNN is already trained to classify, say, N classes. Now, data belonging to M new classes have been acquired and the network needs to learn to classify them while trying to minimize the change in network structure, and having a low training effort. A small sample of images (∼ 10%) is selected from the training set of the new classes. At the root node these images are fed to the DCNN, one class at a time. We obtain a 3 dimensional matrix, O K×M×I , where K = number of children of the root node M = number of new classes I = number of sample images per class O(k, m, i) denotes the output of the k th output neuron for the i th image belonging to the mth class where k ∈ [1, K], K×M is the average of the outputs m ∈ [1, M], and i ∈ [1, I]. O avg over I images . Softmax is taken over O avg to obtain the likelihood matrix L K×M which indicates how strongly an image belonging to mth class on average associates to the k th node. I Õ O(k, m, i) (1) O avg (k, m) = I i=1 L(k, m) = eOav g (k,m) K Í eOav g (k,m) (2) k=1 Each column of L can be represented as a K × 1 vector, lm , where m ∈ [1, M] represents the M new classes. We arrange lm in an ordered set, S, such that S = [lm1, lm2, lm3 ...lmM ] (3) max(lm1 (k)) >= max(lm2 (k)) >= ... >= max(lmM (k)) k k k (4) 4 We analyze each vector of the set S one by one to determine how a new class will be appended to the root node. There are 3 options: ii. iii. FC CONV 3 CONV 2 CONV 1 FC FC CONV 3 CONV 2 “Animal” CONV 1 IMAGE 32x32x3 RGB k Combine one or more child nodes and the new class to form a new child node: If there are more than 1 child nodes that the new class has a strong likelihood for, we can combine them to form a new child node. Say, the top two likelihood values were 0.48,and 0.45, and at least one of them is a leaf node, we can combine the two and the new class to form a new child node which will be a branch node. We can set an upper limit to the number of child nodes that could be combined Add the new class as a new child node: If the new class doesn’t have a single likelihood value greater than a threshold (lm (i) < threshold ∀i ∈ [1, K]), or certain network restrictions are applied to prevent addition of classes to child nodes, the network expands horizontally by adding the new class as a new child node. This node will be a leaf node. Once this is complete for the M classes at the root node, we move to the next level of the tree. The same process is applied on the child nodes that now have new classes to be added to them. For example, say, two new classes were added to a child node. If child node is a leaf node, it is changed into a branch node that now has 3 leaf nodes as children. If the child node is a branch node, then we repeat the process of calculating likelihood matrix and determining how these two new classes will get added to its output. As we can see, the decision on how to grow the tree is semisupervised. The algorithm itself decides how to grow the tree, given the constraints by the user. We can limit parameters such as maximum children for a node, maximum depth for the tree, etc. as per our system requirements. Once the new classes are allotted locations in the tree, we do supervised gradient descent based training of the nodes that have been modified/added. Doing this saves us from modifying the whole network, and only affected portions of the network require retraining/fine-tuning. 4 “Root” CONV 2 Add the new class to an existing child node: If the value of max(lm ) is greater than a threshold (which can be set as per requirement) indicating a strong resemblance/association with a particular child node, the new class is added to child node k such that lm (k) = max (lm (k 0 )), k 0 ∈ [1, K] 0 CONV 1 i. “Vehicle” T HE E XPERIMENTS We conducted two experiments using the datasets, CIFAR10 and CIFAR-100. We used MatConvNet [22], an opensource toolbox for implementation of Convolutional Neural Networks in MATLAB [23]. The two experiments have very different initial conditions. In the first experiment on CIFAR-10 we show that given a trained Tree-CNN with one root node and two branch nodes how it expands as new classes arrive. We demonstrate a single incremental learning stage. In the second experiment with CIFAR-100, the network starts with one root node that can classify only 10 classes, and we progressively teach the network 90 new classes over time. Fig. 2. Detailed network of Tree-CNN A (before incremental learning) During training, we performed simple data augmentation. Training images were flipped horizontally at random with a probability of 0.5 [24]. All images were whitened and contrast normalized [24]. The activation used in all the networks is rectified linear activation ReLU, σ(x) = max(x, 0). The networks are trained using stochastic gradient descent with fixed momentum of 0.9. Dropout [25] is used between the final fully connected layers, and between pooling layers to regularize the network. We also employed batchnormalization (BNORM) [26] at the output of every convolutional layer. Additionally, a weight decay λ = 0.001 was set to regularize each model. The final layer performs softmax operation on the output of the nodes to generate class probabilities. 4.1 Adding Multiple New Classes 4.1.1 Dataset We used CIFAR-10 dataset [27] for this experiment. It has 10 mutually exclusive classes, namely, airplane, automobile, bird, cat, deer, dog, frog, horse, ship, and truck. There are 50, 000 training images and 10, 000 test images equally distributed between 10 classes. Each image is a 32 × 32 color image, thus having 3 input channels for Red, Green and Blue pixels. We first train the network on 6 classes, and in the next stage of incremental learning, we train the network for the 4 remaining classes. 4.1.2 The Network For ease of reference, we label this network as Tree-CNN A. The root node is a DCNN with two output nodes. It will classify the input image as either “Animals” or “Vehicles”. Each child node has a DCNN that does finer classification. The description of the layers in each of these sub-networks is given in Tables 1 and 2. Fig. 2 and Fig. 4 a) depict the initial model of Tree-CNN A. For comparison, we took another network (Network “B”) with a complexity level similar to two stage complexity of this Tree-CNN. It has 4 convolutional blocks, each block having 2 sets of 3 × 3 convolutional kernels. The network is inspired from the architecture of VGG-net [28]. Detailed model is given in Table 3. 4.1.3 Initial Training CIFAR-10 has classes that can easily be grouped into 2 distinct groups, “Vehicles” and “Animals”. We start with 6 classes, 3 belonging to each group. Automobile, ship, and 5 TABLE 1 Root Node for Tree-CNN A (CIFAR-10) TABLE 3 Network B Input 32x32x3 Conv1 5x5x3x64 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Conv 2 3x3x64x128 ReLU stride 1 + BNORM Dropout 0.5 3x3x128x128 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 FC Fully Connected 8x8x12x512 ReLU Dropout 0.5 Fully Connected 1x1x512x128 ReLU Dropout 0.5 Fully Connected 1x1x128x2 ReLU Softmax Layer Input 32x32x3 Conv1 3x3x3x64 ReLU stride 1 + BNORM Dropout 0.5 3x3x64x64 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Conv 2 3x3x64x128 ReLU stride 1 + BNORM Dropout 0.5 3x3x128x128 ReLU stride 1 + BNORM [2 2] Max pooling stride 2 Conv3 3x3x128x256 ReLU stride 1 + BNORM Dropout 0.5 3x3x256c256 ReLU stride 1 + BNORM [2 2] Max pooling stride 2 Conv4 3x3x256x512 ReLU stride 1 + BNORM Dropout 0.5 3x3x512x512 ReLU stride 1 + BNORM [2 2] Avg Pooling stride 2 FC Fully Connected 2x2x512x1024 ReLU Dropout 0.5 Fully Connected 1x1x1024x1024 ReLU Dropout 0.5 Fully Connected 1x1x1024xN (N=Number of Classes) Softmax Layer TABLE 2 Branch Node for Tree-CNN A (CIFAR-10) Input 32x32x3 Conv1 5x5x3x32 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Dropout 0.25 Conv2 5x5x32x64 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Dropout 0.25 Conv3 3x3x64x64 ReLU stride 1 + BNORM [2 2] Avg Pooling stride 2 Dropout 0.25 FC Fully Connected 4x4x64x128 ReLU Dropout 0.5 Fully Connected 1x1x128xN ReLU (N=number of children) Softmax Layer truck are grouped as “Vehicles”, while cat, dog, and horse are grouped as “Animals”. The network at the root node is trained to classify the images as “Animals” or “Vehicles”. For this, the 30, 000 training images belonging to the 6 classes are re-labeled as “Animals” or “Vehicles”. The root node is then trained for 300 epochs. The learning rate is kept at 0.1 for first 200 epochs, then reduced by 10 times every 50 epochs. At the second level, each of the two branch nodes are separately trained. “Animals” branch node is trained with 15, 000 training images from the 3 classes. This node further classifies the image into dog, cat, and horse. It is trained for 300 epochs and the learning rate is same as used for the top node. Similarly, the branch node labeled “Vehicles” is trained to identify the 3 distinct vehicles, ship, truck, and automobile. The root node achieves a testing accuracy of 98.73%, while the branch nodes, “Animals” and “Vehicles”, achieve 86% and 94.43% testing accuracy respectively. Overall, this network achieves a testing accuracy of 89.10%. For comparison, we train our network “B” with the 6 image classes. The network is trained for 300 epochs. The learning rate is kept at 0.1 for first 200 epochs, then reduced by 10 times every 50 epochs. We achieve a testing accuracy of 92.40%. The accuracy of tree-CNN A is within the range of network “B”. 4.1.4 Incremental Learning Next we want to train the networks to identify the remaining four classes, bird, frog, deer and airplane. There are 500 training images per class given to us. We select at random 50 images per class, and show these 200 images to the root node. We obtain the L matrix, which is a 2 × 4 matrix with each element li j ∈ (0, 1). The 1st row of the matrix indicates the softmax likelihood of each of the 4 classes as being classified as “Vehicles”, while the second row presents the same information for “Animals”. Fig. 3 shows how likely a new class is to being classified as “Animals” or “Vehicles”. Note, that this is not the number of times out of 50, the images belonging to the class are classified as one of the two super-classes by the root node. Instead, we perform the softmax operation (eq. 2 on the actual values of the output layer, to see which output neuron gives a higher value for a particular class and by how much. As per our algorithm, airplane gets grouped with “Vehicles” while bird, deer, and frog get added to the “Animals” coarse category. The decision making is done using Algorithm 2 based on the softmax likelihood output of the root node, as obtained in Fig. 3. The before and after structure of the Tree-CNN A is shown in Fig. 4 . Next the root node 6 a) b) ROOT BRANCH NODES LEAF NODES ANIMAL VEHICLE ROOT ANIMAL VEHICLE SHIP CAT SHIP CAT DOG TRUCK DOG TRUCK HORSE AUTOMOBILE HORSE AUTOMOBILE DEER AEROPLANE NEW CLASSES BIRD FROG Fig. 3. Softmax likelihood of new classes being classified as Animals or Vehicles for CIFAR 10 Fig. 4. Graphical representation of Tree-CNN A a) before incremental learning, b) after incremental learning 4.2 is retrained with 50, 000 training images from all the 10 classes(old and new) to classify them in to the two coarse categories. The root node is trained for 250 epochs, with learning rate 0.1 for first 100 epochs, then the learning rate is reduced by 10 every 50 epochs. Next we train the two branch nodes. For each of the two nodes, we train it with training images from both new and old classes. Each of the nodes are trained for 250 epochs and the learning rate variation is kept same as for the root node. Algorithm 2 Incremental Learning for Tree-CNN A Inputs: L = 2 × 4 likelihood matrix, node = root node of the Tree-CNN, NewClass = array of new class labels procedure T REE G ROW(L,node) for (col = 1, col ≤ 4, col + +) do if L(1, col) > L(2, col) then AddClass(NewClass(col), node.children(1)) else AddClass(NewClass(col), node.children(2)) end if end for end procedure For comparison, we apply fine tuning to our already trained network “B”. We add the 4 new classes as 4 new output nodes of the final layer. As described in Table 3, it is made up of 4 convolutional blocks (CONV) and one fully connected block (FC). For network B, 5 fine tuning strategies have been used. Each method retrains/fine-tunes certain layers of the network. As listed below, we set 5 different depths of back-propagation when retraining with the whole dataset, i.e. all 10 classes. 1. 2. 3. 4. 5. Case I: FC Case II: FC + CONV1 Case III: FC + CONV1 + CONV2 Case IV: FC + CONV1 + CONV2 + CONV3 Case V: FC + CONV1 + CONV2 + CONV3 + CONV4 Case V represents the extreme scenario where the previous network is completely retrained to learn the new classes. This is equivalent to training a new network with all the classes. Sequentially Adding Multiple Classes 4.2.1 Dataset For this experiment, we use a larger dataset, CIFAR-100 [27]. It has 100 classes, 500 training and 100 testing images per class. The image is a 32 × 32 color image with 3 input channels for Red, Green and Blue pixels. We divide the 100 classes into 10 groups, each group having 10 classes. This distribution is done at random. We first train the networks with 10 classes, and then incrementally add 10 new classes every stage. There are 9 learning stages to add the remaining 90 classes. 4.2.2 The Network Initially, the Tree-CNN has a root node and 10 leaf nodes. We label this network as Tree-CNN C. The root node has a DCNN network, with 10 output nodes. The layers of the CNN are described in detail in Table 4. In subsequent learning stages, the network would extend branches. The DCNN model used in branch nodes is given in Table 5. For comparison, we use the same network “B" as used in previous experiment. 4.2.3 Initial training For Tree-CNN C, the root node is trained to classify 10 classes. It is trained for 300 epochs, with learning rate of 0.1 for first 200 epochs. It is then reduced by 10 every 50 epochs. We obtain a testing accuracy of 84.90%. Network “B” is trained for 300 epochs as well, and the learning rate is same as for the root node. We achieve a testing accuracy of 85%. The starting accuracy for the two networks is almost the same. 4.2.4 Incremental Learning We divided the remaining 90 classes into 9 groups, each containing 10 classes. These classes were added to the network in 9 incremental learning stages. At each stage, first 50 images belonging to each class are shown to the root node and a likelihood matrix L is generated. The columns of the matrix are used to form an ordered set S, as described in equations 3 and 4. For this experiment, we applied the following constraints to the system. • Maximum depth of the tree is 2 7 • TABLE 4 Root Node of Tree-CNN C (CIFAR 100) Input 32x32x3 Conv 1 5x5x3x64 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Conv 2 3x3x64x128 ReLU stride 1 + BNORM Dropout 0.5 3x3x128x128 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Conv 3 3x3x128x256 ReLU stride 1 + BNORM Dropout 0.5 3x3x256x256 ReLU stride 1 + BNORM [2 2] Avg Pooling stride 2 FC Fully Connected 4x4x256x1024 ReLU Dropout 0.5 Fully Connected 1x1x1024x1024 ReLU Dropout 0.5 Fully Connected 1x1x1024xN (N = Number of Children) Softmax Layer Maximum number of output/children for a branch node is 10 The depth of the tree is constrained for ease of conducting the experiment. The algorithm then needs to be implemented only at the root node level. It was observed during developing the algorithm that new classes tend to have a higher softmax likelihood value for branch nodes with higher number of children. To prevent the network from being lop-sided, by having one very large branch, we limit the number of children to 10 per branch node. Once the placement of the new classes is determined we train the root node and the modified branch nodes. The root node is trained for 250 epochs, with learning rate 0.1 for first 100 epochs, then the learning rate is reduced by 10 every 50 epochs. To compare, we use same fine tuning test cases on network “B” as the previous experiment. We have 5 different cases, each having a different depth of back-propagation, as explained in Section 4.1.2. 5 R ESULTS Now, we discuss the results obtained from the two sets of experiments. To reiterate, the first experiment had only one incremental learning stage. While, the second experiment demonstrated how the network grew to accommodate new data over time. The network grows 10 folds in classification capacity, from 10 classes to 100 classes. We compare our proposed method against re-training final layers of a standard DCNN. The methods were compared against the following metrics Í • Training Effort = (total number of weights × total nets TABLE 5 Branch Node of Tree-CNN C (CIFAR 100) Input 32x32x3 Conv 1 5x5x3x32 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Dropout 0.25 Conv 2 5x5x32x64 ReLU stride 1 + BNORM [2 2] Max Pooling stride 2 Dropout 0.25 Conv 3 3x3x64x64 ReLU stride 1 + BNORM Dropout 0.5 3x3x256x256 ReLU stride 1 + BNORM [2 2] Avg Pooling stride 2 FC Fully Connected 4x4x64x512 ReLU Dropout 0.5 Fully Connected 1x1x512x128 ReLU Dropout 0.5 Fully Connected 1x1x128xN (N = Number of Children) Softmax Layer • number of training samples) Testing Accuracy Every training sample generates a corresponding error that is back-propagated through stochastic gradient descent to update the network weights. Training Effort is the number of weight updates that happen per training epoch. As batch size and number of training epochs is kept the same, the product of number of weights and the number of training samples used gives us a good measure of the effort used in training a network. For Tree-CNN the training effort of each of the nodes (‘nets’) is summed together. For network “B”, there is only one net in each case. 5.1 Adding multiple new classes (CIFAR-10) In Fig. 5, we compare the test accuracy and the training effort for the 5 cases of fine-tuning network “B” against our Tree-CNN C for CIFAR-100. Retraining only FC layer of network “B” requires the least training effort. However, it gives us the lowest accuracy, 78.37% amongst all. And as more classes are introduced, this method causes much loss in accuracy, as shown with CIFAR-100 in Fig. 7. Our proposed model, Tree-CNN A has the second lowest normalized training effort, ∼ 40% less than ‘B:Case V’, and ∼ 30% less than ‘B:Case II’. At the same time, Tree-CNN A (86.25%) had comparable accuracy to ‘B:Case II’ (85.02%) and ‘B:Case III’ (88.15%), while just being less than the ideal case ‘B:Case V’ by a margin of 3.76%. 8 Fig. 5. Training Effort and Test Accuracy comparison for Tree-CNN A against Network B for CIFAR-10 dataset Fig. 7. Testing Accuracy for CIFAR-100 over multiple learning stages Node #3 baby boy girl man woman poppy butterfly orchid sunflower tulip Oak Tree Pine Tree Forest StreetCar Node #8 Node #13 Fig. 8. Examples of groups of classes formed when incrementally learning CIFAR-100 Fig. 6. Training Effort over different learning stages when sequentially adding multiple classes (CIFAR-100) 5.2 Sequentially adding new classes (CIFAR-100) We compare Tree-CNN C against the 5 different fine-tuning cases of Network “B”. Fig. 6 shows the training effort for all the test cases for CIFAR-100 experiment. We normalized the training effort by dividing all the values with the highest training effort. i.e. ‘B:Case V’. ‘B:Case I’ has the lowest training effort, as we only fine tune the final fully connected layer. However, it performs the worst in accuracy as shown in Fig. 7. Tree-CNN C requires almost the same training effort as ‘B:Case II’, and achieves better accuracy than ‘B:Case II’ and ‘B:Case III’. It achieves accuracy within the same range as ‘B:Case IV’, while requiring 20% less training effort. ‘B:Case IV’ and ‘B:Case V’ require almost similar training effort, as the difference is only the extra training of the smallest CONV layer, i.e. the first layer. ‘B:Case V’ gives us the best accuracy, however, that is because we are retraining the entire network with all the images. There is no pre-trained kernel sharing and it is as good as starting anew, thereby requiring the highest training effort. The Tree-CNN achieves an accuracy of 60.46% on the full CIFAR-100 dataset. It is 2.59% less than the accuracy achieved by training the full network “B”, which gives us 63.05%. The overall accuracy of the Tree-CNN and the network we compared with is comparable to the range of reported accuracy of similar sized networks, such as 67.38% by HD-CNN [19], 67.68% by Hertel, et al [29]. Further improvements to accuracy can be done by modifying the CNN architecture of the nodes, and by adopting methods such as “all convolutional net” [30], “exponential linear units” [31]. In all 6 cases, the training effort required at a particular learning stage was greater than the effort required by the previous stage. This is because we had to show images belonging to old classes to avoid “catastrophic forgetting”. Our method had lower slope for Training Effort v/s Learning Stage, as compared to all but one (Case I) of network 9 TABLE 6 Root Node of Tree-CNN C classifying CIFAR-100 classes into 17 child nodes (after 9 Learning Stages) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 trout bridge girl caterpillar lawn mower possum otter poppy sweet pepper bicycle lobster clock oak tree skyscraper squirrel crocodile wolf dolphin mountain man bottle turtle palm tree woman can seal tank baby bear sea willow tree boy skunk mouse castle lizard plain elephant train mushroom bus maple tree leopard fox tiger telephone rocket porcupine hamster chimpanzee aquarium fish apple chair kangaroo cloud sunflower orange couch whale bowl butterfly pear table shrew lion cockroach rose house dinosaur ray fish tulip beaver worm orchid flatfish raccoon spider shark bee beetle snail rabbit crab bed tractor pickup truck road motorcyle plate streetcar wardrobe pine tree keyboard forest television cup lamp snake camel cattle “B”. For Tree-CNN C, the normalized training effort incremented by 0.081 on average for every stage, while for network “B”, the increment was 0.041, 0.086, 0.097, 0.0997, and 0.1 for the 5 cases, in increasing order of number of layers trained in each case. An interesting thing to note was similar looking classes, that were also semantically similar, were grouped under the same branches. At the end of the 9 incremental learning stages, the root node had 17 children nodes out of which 4 were leaf nodes and remaining 13 were branch nodes. The details of the classes associated with each of these 17 nodes is given in Table 6. These 13 branch nodes further had 3 to 10 leaf nodes. The final groups formed after training all the classes is given in Table 6. Certain similar objects grouped together is shown in Fig. 8. While there were some groups that had objects sharing semantic similarity as well, there were a few odd groups, such as Node 13 as shown in Fig. 8. The groups formed is dependent partly on the sequence in which the classes arrived. As we had limited the number of leaf nodes of a branch to 10, even when a new class matched strongly to an already full branch, the algorithm added it to the the second best match, or created a new node. In some cases, such as branch number 13, the street car was grouped with the trees because most images of streetcar in the dataset were green in color. Color and shape similarities led to grouping of very semantically dissimilar objects. 6 layers of a large network, while maintaining comparable accuracy. However, the Tree-CNN continues to grow in size over time, and the implications of that while implementing on hardware is an important future work. The Tree-CNN grows in a manner such that images that share common features are closer neighbors in the tree than those images that are very different. The final leaf nodes, and the distance between them can also be used as measure of how similar or different any two images are. Such a method of training and classification can be used to hierarchically classify large datasets. The correlation between image similarity and the location of the image classes in the Tree-CNN needs to be analyzed empirically. Our proposed method, Tree-CNN, thus offers a better incremental learning model that is based on hierarchical classifiers and transfer learning. It could, also, potentially be applied to large image search operations. During inferencing, we can choose to parse the network up to a certain depth to give us an idea of which “supercategory” the search image belongs to. Hence, it could offer a quick solution to analyze incoming data. ACKNOWLEDGMENT The work was supported in part by Center for Braininspired Computing Enabling Autonomous Intelligence (CBRIC), a DARPA sponsored JUMP center, by Semiconductor Research Corporation, and by Army Research Lab. D ISCUSSION In this work, we explore a method for incremental learning when dealing with very large image databases. The motivation of this work stems from the idea that subsequent addition of new image classes to a network should be easier than retraining the whole network again with all classes. We observed that expectedly, each incremental learning stage required more effort than the previous, because images belonging to old classes needed to be shown to the CNNs. This is due to the inherent problem of “catastrophic forgetting” in deep neural networks. Our proposed method has a lower rate of increase of training effort over consecutive learning stages as compared to the effort need to fine-tune limited R EFERENCES [1] [2] [3] [4] W. Rawat and Z. Wang, “Deep Convolutional Neural Networks for Image Classification: A Comprehensive Review,” Neural Computation, vol. 29, no. 9, pp. 2352–2449, 2017. A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. L. Wan, M. Zeiler, S. Zhang, Y. L. Cun, and R. Fergus, “Regularization of neural networks using dropconnect,” in Proceedings of the 30th international conference on machine learning (ICML-13), 2013, pp. 1058–1066. 10 [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] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein et al., “Imagenet large scale visual recognition challenge,” International Journal of Computer Vision, vol. 115, no. 3, pp. 211–252, 2015. Z. Chen and B. Liu, “Lifelong machine learning,” Synthesis Lectures on Artificial Intelligence and Machine Learning, vol. 10, no. 3, pp. 1– 145, 2016. S. Thrun and T. M. Mitchell, “Lifelong robot learning,” Robotics and autonomous systems, vol. 15, no. 1-2, pp. 25–46, 1995. S. Thrun, “Is learning the n-th thing any easier than learning the first?” in Advances in neural information processing systems, 1996, pp. 640–646. I. J. Goodfellow, M. Mirza, D. Xiao, A. Courville, and Y. Bengio, “An empirical investigation of catastrophic forgetting in gradientbased neural networks,” arXiv preprint arXiv:1312.6211, 2013. J. Yosinski, J. Clune, Y. Bengio, and H. Lipson, “How transferable are features in deep neural networks?” in Advances in neural information processing systems, 2014, pp. 3320–3328. M. Oquab, L. Bottou, I. Laptev, and J. Sivic, “Learning and transferring mid-level image representations using convolutional neural networks,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2014, pp. 1717–1724. L. Fei-Fei, R. Fergus, and P. Perona, “One-shot learning of object categories,” IEEE transactions on pattern analysis and machine intelligence, vol. 28, no. 4, pp. 594–611, 2006. R. Girshick, “Fast r-CNN,” in 2015 IEEE International Conference on Computer Vision (ICCV). IEEE, dec 2015. K. Shmelkov, C. Schmid, and K. Alahari, “Incremental learning of object detectors without catastrophic forgetting,” in 2017 IEEE International Conference on Computer Vision (ICCV). IEEE, oct 2017. Z. Li and D. Hoiem, “Learning without forgetting,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. S. S. Sarwar, P. Panda, and K. Roy, “Gabor filter assisted energy efficient fast learning Convolutional Neural Networks,” in 2017 IEEE/ACM International Symposium on Low Power Electronics and Design (ISLPED). IEEE, jul 2017, pp. 1–6. P. Panda and K. Roy, “Semantic driven hierarchical learning for energy-efficient image classification,” in 2017 Design, Automation & Test in Europe Conference & Exhibition (DATE). IEEE, 2017, pp. 1582–1587. P. Panda, A. Ankit, P. Wijesinghe, and K. Roy, “Falcon: Feature driven selective classification for energy-efficient image recognition,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 36, no. 12, 2017. Z. Yan, H. Zhang, R. Piramuthu, V. Jagadeesh, D. DeCoste, W. Di, and Y. Yu, “HD-CNN: Hierarchical deep convolutional neural networks for large scale visual recognition,” in 2015 IEEE International Conference on Computer Vision (ICCV). IEEE, dec 2015. N. Srivastava and R. R. Salakhutdinov, “Discriminative transfer learning with tree-based priors,” in Advances in Neural Information Processing Systems, 2013, pp. 2094–2102. T. Xiao, J. Zhang, K. Yang, Y. Peng, and Z. Zhang, “Error-Driven Incremental Learning in Deep Convolutional Neural Network for Large-Scale Image Classification,” MM ’14 Proceedings of the ACM International Conference on Multime, vol. d, pp. 177–186, 2014. A. Vedaldi and K. Lenc, “MatConvNet,” in Proceedings of the 23rd ACM international conference on Multimedia - MM 2015. ACM Press, 2015. MATLAB, version 9.2.0 (R2017a). Natick, Massachusetts: The MathWorks Inc., 2017. I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio, “Maxout networks,” in International Conference on Machine Learning, 2013. N. Srivastava, G. E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: a simple way to prevent neural networks from overfitting.” Journal of machine learning research, vol. 15, no. 1, pp. 1929–1958, 2014. S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in International Conference on Machine Learning, 2015, pp. 448–456. A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” 2009. K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014. L. Hertel, E. Barth, T. Kaster, and T. Martinetz, “Deep convolutional neural networks as generic feature extractors,” in 2015 International Joint Conference on Neural Networks (IJCNN). IEEE, jul 2015. [30] J. T. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller, “Striving for simplicity: The all convolutional net,” arXiv preprint arXiv:1412.6806, 2014. [31] D.-A. Clevert, T. Unterthiner, and S. Hochreiter, “Fast and accurate deep network learning by exponential linear units (elus),” arXiv preprint arXiv:1511.07289, 2015. Deboleena Roy received the B.Tech+M.Tech Dual Degree in Electronics and Electrical Communications Engineering from IIT Kharagpur, Kharagpur, India in 2014. She is currently working towards the Ph.D. degree in Electrical and Computer Engineering at Purdue University, West Lafayette, IN, USA. Prior to that, she was a Design Engineer at Qualcomm Bangalore Design Center, Bengaluru, India from 2014 to 2016. Her current research interests include neuro-inspired algorithms for cognitive applications such as perception, reasoning and decision making. Priyadarshini Panda received the B.E. degree in Electrical and Electronics Engineering and the M.Sc. degree in Physics from the Birla Institute of Technology and Science, Pilani, India, in 2013. She is currently pursuing the Ph.D. degree in Electrical and Computer engineering with Purdue University, West Lafayette, IN, USA. She was a Component Design Engineer with Intel Corporation, Bengaluru, India, from 2013 to 2014. Prior to that, she did a six-month internship with Nvidia Graphics, Bengaluru. Her current research interests include low-power neuromorphic computing: energy-efficient realization of neural networks (spiking/non-spiking in deep learning context) using novel architectures and algorithms. Kaushik Roy received the B.Tech. degree in Electronics and Electrical Communications Engineering from IIT Kharagpur, Kharagpur, India and the Ph.D. degree from the Department of Electrical and Computer Engineering, University of Illinois at Urbana−Champaign, Champaign, IL, USA, in 1990. He was with the Semiconductor Process and Design Center, Texas Instruments Incorporated, Dallas, TX, USA, where he was involved in FPGA architecture development and low-power circuit design. He joined the Faculty of Electrical and Computer Engineering, Purdue University, West Lafayette, IN, USA, in 1993, where he is currently Edward G. Tiedemann Jr. Distinguished Professor. He has authored more than 600 papers in refereed journals and conferences, holds 15 patents, graduated 75 Ph.D. students, and has co-authored two books on Low Power CMOS VLSI Design (Wiley and McGraw Hill). His current research interests include neuromorphic and cognitive computing, spintronics, device-circuit codesign for nanoscale Silicon and non-Silicon technologies, low-power electronics for portable computing and wireless communications, and new computing models enabled by emerging technologies.
2cs.AI
Knowledge Graph Embedding with Iterative Guidance from Soft Rules Shu Guo1,2 , Quan Wang1,2,3∗ , Lihong Wang4 , Bin Wang1,2 , Li Guo1,2 Institute of Information Engineering, Chinese Academy of Sciences School of Cyber Security, University of Chinese Academy of Sciences 3 State Key Laboratory of Information Security, Chinese Academy of Sciences 4 National Computer Network Emergency Response Technical Team & Coordination Center of China 1 arXiv:1711.11231v1 [cs.AI] 30 Nov 2017 2 Abstract Embedding knowledge graphs (KGs) into continuous vector spaces is a focus of current research. Combining such an embedding model with logic rules has recently attracted increasing attention. Most previous attempts made a one-time injection of logic rules, ignoring the interactive nature between embedding learning and logical inference. And they focused only on hard rules, which always hold with no exception and usually require extensive manual effort to create or validate. In this paper, we propose Rule-Guided Embedding (RUGE), a novel paradigm of KG embedding with iterative guidance from soft rules. RUGE enables an embedding model to learn simultaneously from 1) labeled triples that have been directly observed in a given KG, 2) unlabeled triples whose labels are going to be predicted iteratively, and 3) soft rules with various confidence levels extracted automatically from the KG. In the learning process, RUGE iteratively queries rules to obtain soft labels for unlabeled triples, and integrates such newly labeled triples to update the embedding model. Through this iterative procedure, knowledge embodied in logic rules may be better transferred into the learned embeddings. We evaluate RUGE in link prediction on Freebase and YAGO. Experimental results show that: 1) with rule knowledge injected iteratively, RUGE achieves significant and consistent improvements over state-of-the-art baselines; and 2) despite their uncertainties, automatically extracted soft rules are highly beneficial to KG embedding, even those with moderate confidence levels. The code and data used for this paper can be obtained from https://github.com/iieir-km/RUGE. Introduction Knowledge graphs (KGs) such as WordNet (Miller 1995), Freebase (Bollacker et al. 2008), YAGO (Suchanek, Kasneci, and Weikum 2007), and NELL (Carlson et al. 2010) are extremely useful resources for many AI related applications. A KG is a multi-relational graph composed of entities as nodes and relations as different types of edges. Each edge is represented as a triple (head entity, relation, tail entity), indicating that there is a specific relation between two entities, e.g., (Paris, CapitalOf, France). Although effective in representing structured data, the underlying symbolic nature of such triples often makes KGs hard to manipulate. ∗ Corresponding author: Quan Wang ([email protected]). Copyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. Recently, a new research direction termed as knowledge graph embedding has been proposed and quickly received massive attention (Nickel, Tresp, and Kriegel 2011; Bordes et al. 2013; Wang et al. 2014; Lin et al. 2015b; Yang et al. 2015; Nickel, Rosasco, and Poggio 2016; Trouillon et al. 2016). The key idea is to embed entities and relations in a KG into a low-dimensional continuous vector space, so as to simplify the manipulation while preserving the inherent structure of the KG. Such embeddings contain rich semantic information, and can benefit a broad range of downstream applications (Weston et al. 2013; Bordes et al. 2014; Zhang et al. 2016; Xiong, Power, and Callan 2017). Traditional methods performed embedding based solely on triples observed in a KG. But considering the power of logic rules in knowledge acquisition and inference, combining embedding models with logic rules has become a focus of current research (Rocktäschel et al. 2014; Vendrov et al. 2015; Wang and Cohen 2016; Hu et al. 2016). Wang et al. (2015) and Wei et al. (2015) tried to use embedding models and logic rules for KG completion. But in their work, rules are modeled separately from embedding models, and would not help to learn more predictive embeddings. Rocktäschel et al. (2015) and Guo et al. (2016) then devised joint learning paradigms which can inject first-order logic (FOL) into KG embedding. Demeester et al. (2016) further proposed lifted rule injection to avoid the costly propositionalization of FOL rules. Although these joint models are able to learn better embeddings after integrating logic rules, they still have their drawbacks and restrictions. First of all, these joint models made a one-time injection of logic rules, taking them as additional rule-based training instances (Rocktäschel, Singh, and Riedel 2015) or regularization terms (Demeester, Rocktäschel, and Riedel 2016). We argue that rules can better enhance KG embedding, however, in an iterative manner. Given the learned embeddings and their rough predictions, rules can be used to refine the predictions and infer new facts. The newly inferred facts, in turn, will help to learn better embeddings and more accurate logical inference. Previous methods fail to model such interactions between embedding models and logic rules. Furthermore, they focused only on hard rules which always hold with no exception. Such rules usually require extensive manual effort to create or validate. Actually, besides hard rules, a significant amount of background information can be en- proach is quite generic and flexible. It can integrate various types of rules with different confidence levels to enhance a good variety of KG embedding models. VRIWUXOHV 6RIW/DEHO3UHGLFWLRQ Related Work XQODEHOHGWULSOHV VRIWODEHOV HPEHGGLQJV ODEHOHGWULSOHV KDUGODEHOV (PEHGGLQJ5HFWLILFDWLRQ Figure 1: Framework overview. RUGE enables an embedding model to learn simultaneously from labeled triples, unlabeled triples, and soft rules in an iterative manner, where each iteration alternates between a soft label prediction stage and an embedding rectification stage. coded as soft rules, e.g., “a person is very likely (but not necessarily) to have a nationality of the country where he/she was born”. Soft rules can be extracted automatically and efficiently via modern rule mining systems (Galárraga et al. 2013; Galárraga et al. 2015). Yet, despite this merit, soft rules have not been well studied in previous methods. This paper proposes RUle-Guided Embedding (RUGE), a novel paradigm of KG embedding with iterative guidance from soft rules. As sketched in Fig. 1, it enables an embedding model to learn simultaneously from 1) labeled triples that have been directly observed in a given KG, 2) unlabeled triples whose labels are going to be predicted iteratively, and 3) soft rules with different confidence levels extracted automatically from the KG. During each iteration of the learning process, the model alternates between a soft label prediction stage and an embedding rectification stage. The former uses currently learned embeddings and soft rules to predict soft labels for unlabeled triples, and the latter further integrates both labeled and unlabeled triples (with hard and soft labels respectively) to update current embeddings. Through this iterative procedure, knowledge embodied in logic rules may be better transferred into the learned embeddings. We empirically evaluate RUGE on large scale public KGs, namely Freebase and YAGO. Experimental results reveal that: 1) by incorporating logic rules, RUGE significantly and consistently improves over state-of-the-art basic embedding models (without rules); 2) compared to those one-time injection schemes studied before, the iterative injection strategy maximizes the utility of logic rules for KG embedding, and indeed achieves substantially better performance; 3) despite the uncertainties, automatically extracted soft rules are highly beneficial to KG embedding, even those with moderate confidence levels. The contributions of this paper are threefold. 1) We devise a novel paradigm of KG embedding which iteratively injects logic rules into the learned embeddings. To our knowledge, this is the first work that models interactions between embedding learning and logical inference in a principled framework. 2) We demonstrate the usefulness of automatically extracted soft rules in KG embedding, thereby eliminating the requirement of laborious manual rule creation. 3) Our ap- Recent years have witnessed increasing interest in learning distributed representations for entities and relations in KGs, a.k.a. KG embedding. Various techniques have been devised for this task, e.g., translation-based models which take relations as translating operations between head and tail entities (Bordes et al. 2013; Wang et al. 2014; Lin et al. 2015b), simple compositional models which match compositions of head-tail entity pairs with their relations (Nickel, Tresp, and Kriegel 2011; Yang et al. 2015; Nickel, Rosasco, and Poggio 2016; Trouillon et al. 2016), and neural networks which further introduce non-linear layers and deep architectures (Socher et al. 2013; Bordes et al. 2014; Dong et al. 2014; Liu et al. 2016). Among these techniques, ComplEx (Trouillon et al. 2016), a compositional model which represents entities and relations as complex-valued vectors, achieves a very good trade-off between accuracy and efficiency. Most of the currently available techniques perform the embedding task based solely on triples observed in a KG. Some recent work further tried to use other information, e.g., entity types (Guo et al. 2015; Xie, Liu, and Sun 2016) and textual descriptions (Xie et al. 2016; Xiao, Huang, and Zhu 2017), to learn more predictive embeddings. See (Wang et al. 2017) for a thorough review of KG embedding techniques. Given the power of logic rules in knowledge acquisition and inference, combining KG embedding with logic rules becomes a focus of current research. Wang et al. (2015) and Wei et al. (2015) devised pipelined frameworks which use logic rules to further refine predictions made by embedding models. In their work, rules will not help to learn better embeddings. Rocktäschel et al. (2015) and Guo et al. (2016) then tried to learn KG embeddings jointly from triples and propositionalized FOL rules. Demeester et al. (2016) further proposed lifted rule injection to avoid the costly propositionalization. These joint models, however, made a one-time injection of logic rules, ignoring the interactive nature between embedding learning and logical inference. Moreover, they can only handle hard rules which are usually manually created or validated. Besides logic rules, relation paths which can be regarded as Horn clauses and get a strong connection to logical inference (Gardner, Talukdar, and Mitchell 2015), have also been studied in KG embedding (Neelakantan, Roth, and McCallum 2015; Lin et al. 2015a; Guu, Miller, and Liang 2015). But in these methods, relation paths are incorporated, again, in a one-time manner. Our approach, in contrast, iteratively injects knowledge contained in logic rules into KG embedding, and is able to handle soft rules with various confidence levels extracted automatically from KGs. Combining logic rules with distributed representations is also an active research topic in other contexts outside KGs. Faruqui et al. (2014) tried to inject ontological knowledge from WordNet into word embeddings. Vendrov et al. (2015) introduced order-embedding to model the partial order structure of hypernymy, textual entailment, and image caption- ing. Hu et al. (2016) proposed to enhance various types of neural networks with FOL rules. All these studies demonstrate the capability of logic rules to enhance distributed representation learning. Rule-Guided Knowledge Graph Embedding This section introduces RUle-Guided Embedding (RUGE), a novel paradigm of KG embedding with iterative guidance from soft rules. RUGE enables an embedding model to learn simultaneously from labeled triples, unlabeled triples, and soft rules in an iterative manner. During each iteration, the model alternates between a soft label prediction stage and an embedding rectification stage. Fig. 1 sketches this overall framework. In what follows, we first describe our learning resources, and then detail the two alternating stages. Learning Resources universally quantified rule ∀x, y : (x, BornInCountry, y) ⇒ (x, Nationality, y) could be instantiated with two entities EmmanuelMacron and France, and gives a resultant grounding (EmmanuelMacron, BornInCountry, France) ⇒ (EmmanuelMacron, Nationality, France). Obviously, there could be a huge number of groundings, especially given a large entity vocabulary E. In this paper, to maximize the utility for knowledge acquisition and inference, we take as valid groundings only those where premise triples are observed in O while conclusion triples are not. That means the aforementioned grounding will be considered as valid if the triple (EmmanuelMacron, BornInCountry, France) ∈ O but (EmmanuelMacron, Nationality, France) ∈ / O. For Qp each FOL rule fp , let Gp = {gpq }q=1 denote the set of its valid groundings. All the premise triples of gpq are contained in O, but the single conclusion triple is not. These conclusion triples are further used to construct our unlabeled triple set U. That means, our unlabeled triples are those which are not directly observed in the KG but could be inferred by the rules with high probabilities. Modeling Triples and Rules. Given the labeled triples L, unlabeled triples U, and the valid groundings of FOL rules G = {Gp }P p=1 , we discuss how to model these triples and rules in the context of KG embedding. To model triples, we follow ComplEx (Trouillon et al. 2016), a recently proposed method which is simple and efficient while achieving stateof-the-art predictive performance. Specifically, we assume entities and relations to have complex-valued vector embeddings. Given a triple (ei , rk , ej ) ∈ E ×R×E, we score it by a multi-linear dot product: X ηijk = Re(hei , rk , ēj i) = Re( [ei ]m [rk ]m [ēj ]m ), (1) Suppose we are given a KG with a set of triples observed, i.e., O = {(ei , rk , ej )}. Each triple is composed of two entities ei , ej ∈ E and their relation rk ∈ R, where E and R are the sets of entities and relations respectively. We obtain our learning resources (i.e., labeled triples, unlabeled triples, and soft rules) and model them as follows. Labeled Triples. We take the triples observed in O as positive ones. For each positive triple (ei , rk , ej ), we randomly corrupt the head ei or the tail ej , to form a negative triple (e0i , rk , ej ) or (ei , rk , e0j ), where e0i ∈ E \ {ei } and e0j ∈ E \ {ej }. We denote a labeled triple as x` , and associate with it a label y` = 1 if x` is positive, and y` = 0 otherwise. Let L = {(x` , y` )} denote the set of these labeled triples (along with their labels). Unlabeled Triples. Besides the labeled triples, we collect a m set of unlabeled triples U = {xu }, where xu = (ei , rk , ej ) where ei , ej , rk ∈ Cd are the complex-valued vector emindicates an unlabeled triple. In fact, all the triples that have beddings associated with ei , ej , and rk , respectively; ēj is not been observed in O can be taken as unlabeled ones. But the conjugate of ej ; [·]m is the m-th entry of a vector; and in this paper, we consider only those encoded in the concluRe(·) means taking the real part of a complex value. We fursion of a soft rule, as detailed below. ther introduce a mapping function φ : E×R×E → (0, 1), so Soft Rules. We also consider a set of FOL rules with differas to map the score ηijk to a continuous truth value which ent confidence levels, denoted as F = {(fp , λp )}P p=1 . Here, lies in the range of (0, 1), i.e.,  fp is the p-th logic rule defined over the given KG, repreφ(ei , rk , ej ) = σ(ηijk ) = σ Re(hei , rk , ēj i) , (2) sented, e.g., in the form of ∀x, y : (x, rs , y) ⇒ (x, rt , y), where σ(x) = 1/(1 + exp(−x)) denotes the sigmoid funcstating that two entities linked by relation rs might also tion. Triples with higher truth values are more likely to hold. be linked by relation rt . The left-hand side of the imTo model propositionalized rules (i.e. groundings), we use plication “⇒” is called the premise, and the right-hand t-norm based fuzzy logics (Hájek 1998). The key idea is to side the conclusion. In this paper, we restrict fp to be model the truth value of a propositionalized rule as a coma Horn clause rule, where the conclusion contains only position of the truth values of its constituent triples, through a single atom and the premise is a conjunction of sevspecific logical connectives (e.g. ∧ and ⇒). For instance, eral atoms. The confidence level of rule fp is denoted the truth value of a grounded rule (eu , rs , ev ) ⇒ (eu , rt , ev ) as λp ∈ [0, 1]. Rules with higher confidence levels are will be determined by the truth values of the two triples more likely to hold, and a confidence level of λp = 1 (eu , rs , ev ) and (eu , rt , ev ), via a composition defined by indicates a hard rule which always holds with no exceplogical implication. We follow (Guo et al. 2016) and define tion. Such rules as well as their confidence levels can be the compositions associated with logical conjunction (∧), extracted automatically from the KG (with the observed disjunction (¬), and negation (¬) as: triple set O as input), by using modern rule mining systems like AMIE and AMIE+ (Galárraga et al. 2013; Galárraga et al. 2015). π(a ∧ b) = π(a) · π(b), (3) We then propositionalize these rules to get their groundπ(a ∨ b) = π(a) + π(b) − π(a) · π(b), (4) ings. Here a grounding is the logical expression with all variπ(¬a) = 1 − π(a). (5) ables instantiated with concrete entities in E. For instance, a Here, a and b are two logical expressions, which can either be single triples or be constructed by combining triples with logical connectives; and π(a) is the truth value of a, indicating to what degree the logical expression is true. If a is a single triple, say (ei , rk , ej ), we have π(a) = φ(ei , rk , ej ), as defined in Eq. (2). Given these compositions, the truth value of any logical expression can be calculated recursively (Guo et al. 2016), e.g., π(a ⇒ b) = π(¬a ∨ b) = π(a) · π(b) − π(a) + 1. (6) Logical expressions with higher truth values have greater degrees to be true. Let Θ = {e}e∈E ∪ {r}r∈R denote the set of all entity and relation embeddings. The proposed approach, RUGE, then aims to learn these embeddings by using the labeled triples L, unlabeled triples U, and valid groundings {Gp }P p=1 in an iterative manner, where each iteration alternates between a soft label prediction stage and an embedding rectification stage. Soft Label Prediction This stage is to use currently learned embeddings and propositionalized rules to predict soft labels for unlabeled triples. Specifically, let n be the iteration index, and Θ(n−1) the set of current embeddings learned from the previous iteration. Recall that we are given a set of P FOL rules with their confidence levels F = {(fp , λp )}P p=1 , and each FOL rule fp has Q p Qp valid groundings Gp = {gpq }q=1 . Our aim is to predict a soft label s(xu ) ∈ [0, 1] for each unlabeled triple xu ∈ U, by using the current embeddings Θ(n−1) and all the groundings G = {Gp }P p=1 . To do so, we solve a rule-constrained optimization problem, which projects truth values of unlabeled triples computed by the current embeddings into a subspace constrained by the rules. The key idea here is to find optimal soft labels that stay close to these truth values, while at the same time fitting the rules. For the first property, given each unlabeled triple xu ∈ U, we calculate its truth value φ(xu ) using the current embeddings via Eq. (2), and require the soft label s(xu ) to stay close to this truth value. We measure the closeness between s(xu ) and φ(xu ) with a squared loss, and try to minimize it. For the second property, we further impose rule constraints onto the soft labels S = {s(xu )}. Specifically, for each FOL rule fp and each of its groundings gpq , we expect gpq to be true, i.e., π(gpq |S) = 1 with confidence λp . Here, π(gpq |S) is the conditional truth value of gpq given the soft labels, which can be calculated recursively with the logical compositions defined in Eq. (3) to Eq. (5). Take gpq := (eu , rs , ev ) ⇒ (eu , rt , ev ) as an example, where the premise (eu , rs , ev ) is directly observed in O, and the conclusion (eu , rt , ev ) is an unlabeled triple included in U. The conditional truth value of gpq can then be calculated as: π(gpq |S) = φ(eu , rs , ev )·s(eu , rt , ev )−φ(eu , rs , ev )+1, (7) where φ(eu , rs , ev ) is a truth value defined by Eq. (2) with the current embeddings; and s(eu , rt , ev ) is a soft label to be predicted. Comparing Eq. (7) with Eq. (6), we can see that during the calculation of π(gpq |S), for any unlabeled triple, we use the soft label s(·) rather than the truth value φ(·), so as to better impose rule constraints onto the soft labels S. Combining the two properties together and further allowing slackness for rule constraints, we finally get the following optimization problem: X 1 X 2 min (s(xu ) − φ(xu )) + C ξpq , S,ξ 2 p,q xu ∈U s.t. λp (1 − π(gpq |S)) ≤ ξpq , q = 1,· · ·, Qp , p = 1,· · ·, P, ξpq ≥ 0, q = 1,· · ·, Qp , p = 1,· · ·, P, 0 ≤ s(xu ) ≤ 1, ∀s(xu ) ∈ S, (8) where ξpq is a slack variable and C the penalty coefficient. Note that confidence levels of rules (i.e. λp ’s) are encoded in the constraints, making our approach capable of handling soft rules. Rules with higher confidence levels show less tolerance for violating the constraints. This optimization problem is convex, and can be solved efficiently with its closedform solution: h i1 X s(xu ) = φ(xu ) + C λp ∇s(xu ) π(gpq |S) (9) p,q 0 for each xu ∈ U. Here, ∇s(xu ) π(gpq |S) means the gradient of π(gpq |S) w.r.t s(xu ), which is a constant w.r.t. S,1 and [x]10 = min(max(x, 0), 1) is a truncation function enforcing the solutions to stay within [0, 1]. We provide the proof of convexity and detailed derivation as supplementary materials. Soft labels obtained in this way shall 1) stay close to the predictions made by the current embedding model, and 2) fit the rules as well as possible. Embedding Rectification This stage is to integrate both labeled and unlabeled triples (with hard and soft labels respectively) to update current embeddings. Specifically, we are given a set of labeled triples with their hard labels specified in {0, 1}, i.e., L = {(x` , y` )}, and also a set of unlabeled triples encoded in propositionalized rules, i.e., U = {xu }. Each unlabeled triple xu has a soft label s(xu ) ∈ [0, 1], predicted by Eq. (9). We would like to use these labeled and unlabeled triples to learn the updated embeddings Θ(n) . Here n is the iteration index. To this end, we minimize a global loss over L and U, so as to find embeddings which can predict the true hard labels for triples contained in L, while imitating the soft labels for those contained in U. The optimization problem is: 1 X 1 X min `(φ(x` ), y` ) + `(φ(xu ), s(xu )), (10) Θ |L| |U| L U where `(x, y) = −y log x − (1 − y) log(1 − x) is the cross entropy; and φ(·) is a function w.r.t. Θ defined by Eq. (2). We further impose L2 regularization on the parameters Θ to avoid overfitting. Gradient descent algorithms can be used to solve this problem. Embeddings learned in this way will 1) be compatible with all the labeled triples, and 2) absorb rule knowledge carried by the unlabeled triples. 1 Note that each gpq contains only a single unlabeled triple, i.e., the conclusion triple. Take π(gpq |S) defined in Eq. (7) for example. In this case, s(xu ) = s(eu , rt , ev ) is the soft label to be predicted and ∇s(xu ) π(gpq |S) = φ(eu , rs , ev ) is a constant w.r.t. S. Whole Procedure Algorithm 1 Iterative Learning Procedure of RUGE Algorithm 1 summarizes the iterative learning procedure of our approach. To enable efficient learning, we use an online scheme in mini-batch mode. At each iteration, we sample a mini-batch Lb , Ub , and Gb from the labeled triples L, unlabeled triples U, and propositionalized rules G, respectively (line 3).2 Soft label prediction and embedding rectification are then conducted locally on these mini-batches (line 4 and line 5 respectively). This iterative procedure captures the interactive nature between embedding learning and logical inference: given current embeddings, logic rules can be used to perform approximate inference and predict soft labels for unlabeled triples; these newly labeled triples carry rich rule knowledge and will in turn help to learn better embeddings. In this way, knowledge contained in logic rules can be fully transferred into the learned embeddings. Note also that our approach is flexible enough to handle soft rules with various confidence levels extracted automatically from the KG. Require: Labeled triples L = {(x` , y` )} Unlabeled triples U = {xu } FOL rules F={(fp , λp )} and their groundings G={gpq } Discussions Datasets. We use two datasets: FB15K and YAGO37. The former is a subgraph of Freebase containing 1,345 relations and 14,951 entities, released by Bordes et al. (2013).4 The latter is extracted from the core facts of YAGO3.5 During the extraction, entities appearing less than 10 times are discarded. The final dataset consists of 37 relations and 123,189 entities. Triples on both datasets are split into training, validation, and test sets, used for model training, hyperparameter tuning, and evaluation, respectively. We use the original split for FB15K, and draw a split of 989,132/50,000/50,000 triples for YAGO37. Note that on both datasets, the training sets contain only positive triples. Negative triples are generated using the local closed world assumption (Dong et al. 2014). This negative sampling procedure is performed at runtime for each batch of training positive triples. Such positive and negative triples (along with their hard labels) form our labeled triple set. We further employ AMIE+ (Galárraga et al. 2015)6 to automatically extract Horn clause rules from each dataset, with the training set as input. To enable efficient extraction, we consider rules with length not longer than 2 and confidence levels not less than 0.8.7 The length of a Horn clause rule is the number of atoms appearing in its premise, e.g., ∀x, y : (x, BornInCountry, y) ⇒ (x, Nationality, y) has the length of 1. And the confidence threshold of 0.8 leads to the best performance on both datasets (detailed later). Using this setting, we extract 454 (universally quantified) Horn clause rules from FB15K, and 16 such rules from YAGO37. Table 1 shows some examples with their confidence levels. Then, we instantiate these rules with concrete entities, i.e., propositionalization. Propositionalized rules whose premise triples are all contained in the training set (while conclusion We further analyze the space and time complexity, and discuss possible extensions of our approach. Complexity. RUGE follows ComplEx to represent entities and relations as complex-valued vectors, hence has a space complexity of O(ne d + nr d) which scales linearly w.r.t. ne , nr , and d. Here, ne is the number of entities, nr the number of relations, and d the dimensionality of the embedding space. During the learning procedure, each iteration requires a time complexity of O(τ (n` d + nu d)), where n` /nu is the average number of labeled/unlabeled triples in a mini-batch, and τ the number of inner epochs used for embedding rectification (cf. Eq. (10)). In practice, we usually have nu  n` (see Table 2 for the number of labeled and unlabeled triples used on our datasets), and we can also set τ to a very small value, e.g., τ = 1. That means, RUGE has almost the same time complexity as those most efficient KG embedding techniques (e.g. ComplEx) which require O(n` d) per iteration during training.3 In addition, RUGE further requires preprocessing steps before training, i.e., rule mining and propositionalization. But these steps are performed only once, and not required during the iterations. Extensions. Our approach is quite generic and flexible. 1) The idea of iteratively injecting logic rules can be applied to enhance a wide variety of embedding models, as long as an appropriate scoring function is accordingly designed, e.g., the one defined in Eq. (1) by ComplEx. 2) Various types of rules can be incorporated as long as they can be modeled by the logical compositions defined in Eq. (3) to Eq. (5), and we can even use other types of t-norm fuzzy logics to define such compositions. 3) Rules with different confidence levels can be handled in a unified manner. 2 We first sample Lb from L. Gb is then constructed by those whose premise triples are all contained in Lb but conclusion triples are not. These conclusion triples are further used to construct Ub . 3 Such techniques often use SGD in mini-batch mode for training, and sample a mini-batch of n` labeled triples at each iteration. 1: Randomly initialize entity and relation embeddings Θ(0) 2: for n = 1 : N do 3: Sample a mini-batch Lb / Ub / Gb from L / U / G 4: Sb ← SoftLabelPrediction (Ub , Gb , Θ(n−1) ) . cf. Eq. (9) 5: Θ(n) ← EmbeddingRectification (Lb , Ub , Sb ) . cf. Eq. (10) 6: end for Ensure: Θ(N ) Experiments We evaluate RUGE in the link prediction task. This task is to complete a triple (ei , rk , ej ) with ei or ej missing, i.e., to predict ei given (rk , ej ) or ej given (ei , rk ). 4 https://everest.hds.utc.fr/doku.php?id=en:smemlj12 http://www.mpi-inf.mpg.de/departments/databases-andinformation-systems/research/yago-naga/yago/downloads/ 6 https://www.mpi-inf.mpg.de/departments/databases-andinformation-systems/research/yago-naga/amie/ 7 AMIE+ provides two types of confidence, i.e. standard confidence and PCA confidence. This paper uses PCA confidence. 5 Table 1: Horn clause rules with confidence levels extracted by AMIE+ from FB15K (top) and YAGO37 (bottom). /location/people born here(x,y)⇒/people/place of birth(y,x) /director/film(x,y)⇒/film/directed by(y,x) /film/directed by(x,y)∧/person/language(y,z)⇒/film/language(x,z) 1.00 0.99 0.88 isMarriedTo(x,y)⇒isMarriedTo(y,x) hasChild(x,y)∧isCitizenOf(y,z)⇒isCitizenOf(x,z) playsFor(x,y)⇒isAffiliatedTo(x,y) 0.97 0.94 0.86 Table 2: Statistics of datasets, where ne /nr denotes the number of entities/relations, n` /nu /ng is the number of labeled triples/unlabeled triples/valid groundings used for training, and nv /nt denotes the number of validation/test triples. Train Dataset FB15K YAGO37 Valid Test ne nr n` nu ng nv nt 14,951 123,189 1,345 37 483,142 989,132 74,707 69,680 96,724 72,670 50,000 50,000 59,071 50,000 triples are not) are taken as valid groundings and used during embedding learning. We obtain 96,724 valid groundings on FB15K and 72,670 on YAGO37. Conclusion triples of these valid groundings are further collected to form our unlabeled triple set. We finally get 74,707 unlabeled triples on FB15K and 69,680 on YAGO37. Table 2 provides some statistics of the two datasets. Evaluation Protocol. To evaluate the performance in link prediction, we follow the standard protocol used in (Bordes et al. 2013). For each test triple (ei , rk , ej ), we replace the head entity ei with each entity e0i ∈ E, and calculate the score for (e0i , rk , ej ). Ranking these scores in descending order, we get the rank of the correct entity ei . Similarly, we can get another rank by replacing the tail entity. Aggregated over all test triples, we report three metrics: 1) the mean reciprocal rank (MRR), 2) the median of the ranks (MED), and 3) the proportion of ranks no larger than n (HITS@N). During this ranking process, we remove corrupted triples which already exist in either the training, validation, or test set, since they themselves are true triples. This corresponds to the “filtered” setting in (Bordes et al. 2013). Comparison Settings. We compare RUGE with four stateof-the-art basic embedding models, including TransE (Bordes et al. 2013), DistMult (Yang et al. 2015), HolE (Nickel, Rosasco, and Poggio 2016), and ComplEx (Trouillon et al. 2016). These basic models rely only on triples observed in a KG and use no rules. We further take PTransE (Lin et al. 2015a) and KALE (Guo et al. 2016) as additional baselines. Both of them are extensions of TransE, with the former integrating relation paths (Horn clauses), and the latter FOL rules (hard rules) in a one-time injection manner. In contrast, RUGE incorporates soft rules and transfers rule knowledge into KG embedding in an iterative manner. We use the code provided by Trouillon et al. (2016)8 for 8 https://github.com/ttrouill/complex TransE, DistMult, and ComplEx, and reimplement HolE so that all these four basic models share the identical mode of optimization, i.e., SGD with AdaGrad (Duchi, Hazan, and Singer 2011) and gradient normalization. As such, we reproduce the results of TransE, DistMult, and ComplEx reported on FB15K (Trouillon et al. 2016), and improve the results of HolE substantially compared to those reported in the original paper (Nickel, Rosasco, and Poggio 2016).9 The code for PTransE is provided by its authors.10 We implement KALE and RUGE in Java, both using SGD with AdaGrad and gradient normalization to facilitate a fair comparison. There are two types of loss functions that could be used for these baselines, i.e., the logistic loss or the pairwise ranking loss (Nickel, Rosasco, and Poggio 2016). Trouillon et al. (2016) have recently demonstrated that the logistic loss generally performs better than the pairwise ranking loss, except for TransE. So, for TransE and its extensions (PTransE and KALE) we use the pairwise ranking loss, and for all the other baselines we use the logistic loss. To extract relation paths for PTransE, we follow the optimal configuration reported in (Lin et al. 2015a), where paths constituted by at most 3 relations are included. For KALE and RUGE, we use the same set of propositionalized rules to make it a fair comparison.11 For all the methods, we create 100 mini-batches on each dataset, and tune the embedding dimensionality d in {50, 100, 150, 200}, the number of negatives per positive triple α in {1, 2, 5, 10}, the initial learning rate γ in {0.01, 0.05, 0.1, 0.5, 1.0}, and the L2 regularization coefficient λ in {0.001, 0.003, 0.01, 0.03, 0.1}. For TransE and its extensions which use the pairwise ranking loss, we further tune the margin δ in {0.1, 0.2, 0.5, 1, 2, 5, 10}. The slackness penalty C in RUGE (cf. Eq. (8)) is selected from {0.001, 0.01, 0.1, 1}, and the number of inner iterations (cf. Eq. (10)) is fixed to τ = 1. Best models are selected by early stopping on the validation set (monitoring MRR), with at most 1000 iterations over the training set. The optimal configurations for RUGE are: d = 200, α = 10, γ = 0.5, λ = 0.01, C = 0.01 on FB15K; and d = 150, α = 10, γ = 1.0, λ = 0.003, C = 0.01 on YAGO37. Link Prediction Results. Table 3 shows the results of these methods on the test sets of FB15K and YAGO37. The results indicate that RUGE significantly and consistently outperforms all the baselines on both datasets and in all metrics. It beats not only the four basic models which use triples alone (TransE, DistMult, HolE, and ComplEx), but also PTransE and KALE which further incorporate logic rules (or relation paths) in a one-time injection manner. This demonstrates the superiority of injecting logic rules into KG embedding, particularly in an iterative manner. Compared to the best performing baseline ComplEx (this is also the model based on which RUGE is designed), RUGE achieves an improvement of 11%/18% in MRR/HITS@1 on FB15K, and an improvement of 3%/6% on YAGO37. The improvements on FB15K 9 HolE in its original implementation uses SGD with AdaGrad, but no gradient normalization. 10 https://github.com/thunlp/KB2E 11 KALE takes all these groundings as hard rules. This approximation works quite well with an appropriate confidence threshold. Table 3: Link prediction results on the test sets of FB15K and YAGO37. As baselines, rows 1-4 are the four basic models which use triples alone, and rows 5-6 further integrate logic rules (or relation paths) in a one-time injection manner. FB15K YAGO37 HITS@N HITS@N Method MRR MED 1 3 5 10 MRR MED 1 3 5 10 TransE DistMult HolE ComplEx PTransE KALE 0.400 0.644 0.600 0.690 0.679 0.523 4.0 1.0 2.0 1.0 1.0 2.0 0.246 0.532 0.485 0.598 0.565 0.383 0.495 0.730 0.673 0.756 0.768 0.616 0.576 0.769 0.722 0.793 0.810 0.683 0.662 0.812 0.779 0.837 0.855 0.762 0.303 0.365 0.380 0.417 0.403 0.321 13.0 6.0 7.0 4.0 9.0 9.0 0.218 0.262 0.288 0.320 0.339 0.215 0.336 0.411 0.420 0.471 0.444 0.372 0.387 0.493 0.479 0.533 0.473 0.438 0.475 0.575 0.551 0.603 0.506 0.522 RUGE 0.768 1.0 0.703 0.815 0.836 0.865 0.431 4.0 0.340 0.482 0.541 0.603 Table 4: Runtime (in sec.) on FB15K and YAGO37. Extr. is the time required for rule/path extraction, Prop. for propositionalization, and Lean. for training per iteration. FB15K Method Figure 2: MRR achieved by RUGE with different confidence thresholds on the test set of FB15K. are more substantial than those on YAGO37. The reason is probably that FB15K contains more relations from which a good range of rules can be extracted (454 universally quantified rules from FB15K, and 16 from YAGO37). Influence of Confidence Levels. We further investigate the influence of the threshold of rules’ confidence levels used in RUGE. To do so, we fix all the hyperparameters to the optimal configurations determined by the previous experiment, and vary the confidence threshold in [0.1, 1] with a step 0.05. Fig. 2 shows MRR achieved by RUGE with various thresholds on the test set of FB15K. We can see that the threshold of 0.8 is a good tradeoff and indeed performs best. A threshold higher than that will reduce the number of rules that can be extracted, while a one lower than that might introduce too many less credible rules. Both hurt the performance. However, even so, RUGE outperforms ComplEx by a large margin, with the threshold set in a broad range of [0.35, 0.9]. This observation indicates that soft rules, even those with moderate confidence levels, are highly beneficial to KG embedding despite their uncertainties. Comparison of Runtime. Finally, we compare RUGE with ComplEx, PTransE, and KALE in their runtime.12 ComplEx is a basic model which only requires model training. RUGE as well as the other two baselines further require preprocessing of rule/path extraction and propositionalization. Table 4 lists the runtime of these methods required for each step on FB15K and YAGO37. Here, to facilitate a fair comparison, 12 The other three baselines are implemented in Python and much slower. So they are not considered here. ComplEx PTransE KALE RUGE YAGO37 Extr. Prop. Learn. Extr. Prop. Learn. — 868.4 43.1 43.1 — — 4.0 4.0 11.4 46.5 4.8 14.1 — 13939.5 337.5 337.5 — — 13.8 13.8 49.5 23.8 27.5 55.2 we set d = 200 (embedding dimensionality) and α = 2 (number of negatives per positive triple) for all the methods. Other hyperparameters are fixed to their optimal configurations determined in link prediction. We can see that RUGE is still quite efficient despite integrating additional rules. The average training time per iteration increases from 11.4 to 14.1 on FB15K, and from 49.5 to 55.2 on YAGO37. The preprocessing steps, although performed only once, are also highly efficient, requiring much less time compared to PTransE. Conclusion This paper proposes a novel paradigm that learns entity and relation embeddings with iterative guidance from soft rules, referred to as RUGE. It enables an embedding model to learn simultaneously from labeled triples, unlabeled triples, and soft rules in an iterative manner. Each iteration alternates between 1) a soft label prediction stage which predicts soft labels for unlabeled triples using currently learned embeddings and soft rules, and 2) an embedding rectification stage which further integrates both labeled and unlabeled triples to update current embeddings. This iterative procedure may better transfer the knowledge contained in logic rules into the learned embeddings. Link prediction results on Freebase and YAGO show that RUGE achieves significant and consistent improvements over state-of-the-art baselines. Moreover, RUGE demonstrates the usefulness of automatically extracted soft rules. Even those with moderate confidence levels can be highly beneficial to KG embedding. Acknowledgments The authors would like to thank all the reviewers for their insightful and valuable suggestions, which significantly improve the quality of this paper. This work is supported by the National Key Research and Development Program of China (grants No. 2016YFB0801003 and No. 2016QY03D0503), the Fundamental Theory and Cutting Edge Technology Research Program of the Institute of Information Engineering, Chinese Academy of Sciences (grant No. Y7Z0261101), and the National Natural Science Foundation of China (grant No. 61402465). References [Bollacker et al. 2008] Bollacker, K.; Evans, C.; Paritosh, P.; Sturge, T.; and Taylor, J. 2008. Freebase: A collaboratively created graph database for structuring human knowledge. In SIGMOD, 1247–1250. [Bordes et al. 2013] Bordes, A.; Usunier, N.; Garcı́a-Durán, A.; Weston, J.; and Yakhnenko, O. 2013. Translating embeddings for modeling multi-relational data. In NIPS, 2787–2795. [Bordes et al. 2014] Bordes, A.; Glorot, X.; Weston, J.; and Bengio, Y. 2014. A semantic matching energy function for learning with multi-relational data. MACH LEARN 94(2):233–259. [Carlson et al. 2010] Carlson, A.; Betteridge, J.; Kisiel, B.; Settles, B.; Hruschka Jr, E. R.; and Mitchell, T. M. 2010. Toward an architecture for never-ending language learning. In AAAI, 1306–1313. [Demeester, Rocktäschel, and Riedel 2016] Demeester, T.; Rocktäschel, T.; and Riedel, S. 2016. Lifted rule injection for relation embeddings. In EMNLP, 1389–1399. [Dong et al. 2014] Dong, X.; Gabrilovich, E.; Heitz, G.; Horn, W.; Lao, N.; Murphy, K.; Strohmann, T.; Sun, S.; and Zhang, W. 2014. Knowledge vault: A web-scale approach to probabilistic knowledge fusion. In SIGKDD, 601–610. [Duchi, Hazan, and Singer 2011] Duchi, J.; Hazan, E.; and Singer, Y. 2011. Adaptive subgradient methods for online learning and stochastic optimization. J MACH LEARN RES 12(Jul):2121–2159. [Faruqui et al. 2014] Faruqui, M.; Dodge, J.; Jauhar, S. K.; Dyer, C.; Hovy, E.; and Smith, N. A. 2014. Retrofitting word vectors to semantic lexicons. arXiv:1411.4166. [Galárraga et al. 2013] Galárraga, L. A.; Teflioudi, C.; Hose, K.; and Suchanek, F. M. 2013. AMIE: Association rule mining under incomplete evidence in ontological knowledge bases. In WWW, 413–422. [Galárraga et al. 2015] Galárraga, L. A.; Teflioudi, C.; Hose, K.; and Suchanek, F. M. 2015. Fast rule mining in ontological knowledge bases with AMIE+. VLDB J 24(6):707–730. [Gardner, Talukdar, and Mitchell 2015] Gardner, M.; Talukdar, P.; and Mitchell, T. 2015. Combining vector space embeddings with symbolic logical inference over open-domain text. In AAAI Spring Symposium Series, 61–65. [Guo et al. 2015] Guo, S.; Wang, Q.; Wang, L.; Wang, B.; and Guo, L. 2015. Semantically smooth knowledge graph embedding. In ACL, 84–94. [Guo et al. 2016] Guo, S.; Wang, Q.; Wang, L.; Wang, B.; and Guo, L. 2016. Jointly embedding knowledge graphs and logical rules. In EMNLP, 192–202. [Guu, Miller, and Liang 2015] Guu, K.; Miller, J.; and Liang, P. 2015. Traversing knowledge graphs in vector space. In EMNLP, 318–327. [Hájek 1998] Hájek, P. 1998. The metamathematics of fuzzy logic. Kluwer. [Hu et al. 2016] Hu, Z.; Ma, X.; Liu, Z.; Hovy, E.; and Xing, E. 2016. Harnessing deep neural networks with logic rules. In ACL, 2410–2420. [Lin et al. 2015a] Lin, Y.; Liu, Z.; Luan, H.; Sun, M.; Rao, S.; and Liu, S. 2015a. Modeling relation paths for representation learning of knowledge bases. In EMNLP, 705–714. [Lin et al. 2015b] Lin, Y.; Liu, Z.; Sun, M.; Liu, Y.; and Zhu, X. 2015b. Learning entity and relation embeddings for knowledge graph completion. In AAAI, 2181–2187. [Liu et al. 2016] Liu, Q.; Jiang, H.; Evdokimov, A.; Ling, Z.-H.; Zhu, X.; Wei, S.; and Hu, Y. 2016. Probabilistic reasoning via deep learning: Neural association models. [Miller 1995] Miller, G. A. 1995. WordNet: A lexical database for English. COMMUN ACM 38(11):39–41. [Neelakantan, Roth, and McCallum 2015] Neelakantan, A.; Roth, B.; and McCallum, A. 2015. Compositional vector space models for knowledge base completion. In ACL, 156–166. [Nickel, Rosasco, and Poggio 2016] Nickel, M.; Rosasco, L.; and Poggio, T. 2016. Holographic embeddings of knowledge graphs. In AAAI, 1955–1961. [Nickel, Tresp, and Kriegel 2011] Nickel, M.; Tresp, V.; and Kriegel, H.-P. 2011. A three-way model for collective learning on multi-relational data. In ICML, 809–816. [Rocktäschel et al. 2014] Rocktäschel, T.; Bošnjak, M.; Singh, S.; and Riedel, S. 2014. Low-dimensional embeddings of logic. In ACL Workshop on Semantic Parsing, 45–49. [Rocktäschel, Singh, and Riedel 2015] Rocktäschel, T.; Singh, S.; and Riedel, S. 2015. Injecting logical background knowledge into embeddings for relation extraction. In NAACL, 1119–1129. [Socher et al. 2013] Socher, R.; Chen, D.; Manning, C. D.; and Ng, A. Y. 2013. Reasoning with neural tensor networks for knowledge base completion. In NIPS, 926–934. [Suchanek, Kasneci, and Weikum 2007] Suchanek, F. M.; Kasneci, G.; and Weikum, G. 2007. YAGO: A core of semantic knowledge. In WWW, 697–706. [Trouillon et al. 2016] Trouillon, T.; Welbl, J.; Riedel, S.; Gaussier, E.; and Bouchard, G. 2016. Complex embeddings for simple link prediction. In ICML, 2071–2080. [Vendrov et al. 2015] Vendrov, I.; Kiros, R.; Fidler, S.; and Urtasun, R. 2015. Order-embeddings of images and language. arXiv:1511.06361. [Wang and Cohen 2016] Wang, W. Y., and Cohen, W. W. 2016. Learning first-order logic embeddings via matrix factorization. In IJCAI, 2132–2138. [Wang et al. 2014] Wang, Z.; Zhang, J.; Feng, J.; and Chen, Z. 2014. Knowledge graph embedding by translating on hyperplanes. In AAAI, 1112–1119. [Wang et al. 2017] Wang, Q.; Mao, Z.; Wang, B.; and Guo, L. 2017. Knowledge graph embedding: A survey of approaches and applications. IEEE TRANS KNOWL DATA ENG 29(12):2724–2743. [Wang, Wang, and Guo 2015] Wang, Q.; Wang, B.; and Guo, L. 2015. Knowledge base completion using embeddings and rules. In IJCAI, 1859–1865. [Wei et al. 2015] Wei, Z.; Zhao, J.; Liu, K.; Qi, Z.; Sun, Z.; and Tian, G. 2015. Large-scale knowledge base completion: Inferring via grounding network sampling over selected instances. In CIKM, 1331–1340. [Weston et al. 2013] Weston, J.; Bordes, A.; Yakhnenko, O.; and Usunier, N. 2013. Connecting language and knowledge bases with embedding models for relation extraction. In EMNLP, 1366–1371. [Xiao, Huang, and Zhu 2017] Xiao, H.; Huang, M.; and Zhu, X. 2017. SSP: Semantic space projection for knowledge graph embedding with text descriptions. In AAAI, 3104–3110. [Xie et al. 2016] Xie, R.; Liu, Z.; Jia, J.; Luan, H.; and Sun, M. 2016. Representation learning of knowledge graphs with entity descriptions. In AAAI, 2659–2665. [Xie, Liu, and Sun 2016] Xie, R.; Liu, Z.; and Sun, M. 2016. Representation learning of knowledge graphs with hierarchical types. In IJCAI, 2965–2971. [Xiong, Power, and Callan 2017] Xiong, C.; Power, R.; and Callan, J. 2017. Explicit semantic ranking for academic search via knowledge graph embedding. In WWW, 1271–1279. [Yang et al. 2015] Yang, B.; Yih, W.-t.; He, X.; Gao, J.; and Deng, L. 2015. Embedding entities and relations for learning and inference in knowledge bases. In ICLR. [Zhang et al. 2016] Zhang, F.; Yuan, N. J.; Lian, D.; Xie, X.; and Ma, W.-Y. 2016. Collaborative knowledge base embedding for recommender systems. In SIGKDD, 353–362. Knowledge Graph Embedding with Iterative Guidance from Soft Rules: Supplementary Material Shu Guo1,2 , Quan Wang1,2,3∗ , Lihong Wang4 , Bin Wang1,2 , Li Guo1,2 Institute of Information Engineering, Chinese Academy of Sciences School of Cyber Security, University of Chinese Academy of Sciences 3 State Key Laboratory of Information Security, Chinese Academy of Sciences 4 National Computer Network Emergency Response Technical Team & Coordination Center of China 1 2 A Solving the Soft Label Prediction Problem We discuss how to solve the soft label prediction problem, i.e., Eq. (8) in the submission. We first review the problem. Recall that we are given a set of P FOL rules with their confidence levels F = {(fp , λp )}P p=1 , and each FOL rule Q p fp has Qp valid groundings Gp = {gpq }q=1 . The aim is to predict a soft label s(xu ) ∈ [0, 1] for each unlabeled triple xu ∈ U, by using the current embeddings Θ(n−1) and all the groundings G = {Gp }P p=1 . The optimization problem is: min S,ξ X 1 X 2 (s(xu ) − φ(xu )) + C ξpq , 2 p,q xu ∈U s.t. λp (1 − π(gpq |S)) ≤ ξpq , q = 1,· · ·, Qp , p = 1,· · ·, P, ξpq ≥ 0, q = 1,· · ·, Qp , p = 1,· · ·, P, 0 ≤ s(xu ) ≤ 1, ∀s(xu ) ∈ S, (A-1) where S = {s(xu )} is the set of soft labels; ξ = {ξpq } the set of slack variables; φ(xu ) the truth value of xu calculated by the current embeddings; π(gpq |S) the conditional truth value of gpq given the soft labels; and C the penalty coefficient. Then, we prove this optimization problem is convex and has closed-form solutions. Proof of Convexity It is easy to see that the objective function is convex, as it is quadratic w.r.t. each s(xu ) and linear w.r.t. each ξpq . As for the constraints, note that each valid grounding gpq contains only a single unlabeled triple, i.e., the triple in the conclusion. So the conditional truth value π(gpq |S) is a linear function w.r.t. a single s(xu ). Take gpq := (eu , rs , ev ) ⇒ (eu , rt , ev ) as an example, where the premise (eu , rs , ev ) is directly observed, and the conclusion (eu , rt , ev ) is an unlabeled triple with its soft label s(eu , rt , ev ) to be predicted. The conditional truth value can be calculated as: π(gpq |S) = φ(eu , rs , ev )·s(eu , rt , ev )−φ(eu , rs , ev )+1, which is a linear function w.r.t. s(eu , rt , ev ). In this case, all the constraints are linear functions. So the whole optimization problem is convex. ∗ Corresponding author: Quan Wang ([email protected]). Closed-Form Solutions The optimization problem of Eq. (A-1) can be equivalently written as: X 1 X 2 min (s(xu ) − φ(xu )) + C [λp (1 − π(gpq |S))]+ , S 2 p,q xu ∈U s.t. 0 ≤ s(xu ) ≤ 1, ∀s(xu ) ∈ S, (A-2) where [x]+ = max(x, 0). Given the logical compositions defined in Eq. (3) to Eq. (5) in the submission, and the constraints φ(·) ∈ [0, 1], s(·) ∈ [0, 1] as well, we will have π(gpq |S) ≤ 1 for any gpq . The objective function of Eq. (A2) then becomes: X 1 X 2 P= (s(xu ) − φ(xu )) + C λp (1 − π(gpq |S)) . 2 p,q xu ∈U Recall that each π(gpq |S) is a linear function w.r.t. a single s(xu ). So P is an upward parabola w.r.t. each s(xu ), with the axis of symmetry given as: X s(xu ) = φ(xu ) + C λp ∇s(xu ) π(gpq |S). p,q Here, ∇s(xu ) π(gpq |S) means the gradient of π(gpq |S) w.r.t s(xu ), which is a constant w.r.t. S. By further considering the constraint 0 ≤ s(xu ) ≤ 1 for each s(xu ) ∈ S, we get the optimal solutions: h i1 X s(xu ) = φ(xu ) + C λp ∇s(xu ) π(gpq |S) , ∀xu ∈ U, p,q 0 where = min(max(x, 0), 1) is a truncation function enforcing the solutions to stay within [0, 1]. [x]10
2cs.AI
Hybrid Automata and ε-Analysis on a Neural Oscillator∗ Alberto Casagrande Dept. of Matematics and Geoscience University of Trieste, Italy [email protected] Tommaso Dreossi Carla Piazza Dept. of Matematics and Computer Science University of Udine, Italy [email protected] [email protected] In this paper we propose a hybrid model of a neural oscillator, obtained by partially discretizing a well-known continuous model. Our construction points out that in this case the standard techniques, based on replacing sigmoids with step functions, is not satisfactory. Then, we study the hybrid model through both symbolic methods and approximation techniques. This last analysis, in particular, allows us to show the differences between the considered approximation approaches. Finally, we focus on approximations via ε-semantics, proving how these can be computed in practice. Introduction Neural oscillations are rhythmic and repetitive electrical stimuli which play an important role in the activities of several brain regions. Some examples of brain locations in which it has been demonstrated the central role of neural oscillations are the cortex [17], the thalamus [18], and the olfactory information processing [8]. With the aim of understanding neurophysiological activities, we propose the modeling of oscillatory phenomena exploiting hybrid automata. A continuous model of a single oscillator based on an ordinary differential system has been proposed in [19]. Even if this is a simple model, its analysis and the analysis of its composition in multiple copies is limited due to the non-linearity of the ordinary differential system involved. For this reason, we are interested in the development of a piecewise affine hybrid automaton which correctly approximates the continuous model and on which automatic analysis and composition can be made. Trying to linearize the non-linear components of the original continuous model, we first replace in the standard way the sigmoidal behaviours with sign functions [9, 14], approximating continuos signals with discrete off-on signals. Unfortunately, the behaviour of this model differs from the original one. For this reason, we propose a more sophisticated approximation of sigmoidals based on a piecewise linear function exploited in the development of a hybrid automaton which simulates a single oscillator. It is well known that the reachability problem over hybrid automata is source of undecidability. Moreover, the exact computation of the reachable sets of hybrid automata, which represents the basis of the automatic analysis of the models, does not always reflect the behaviour of the real modeled systems. This is due to the fact that real systems are often subject to noise, thus their evolutions do not correspond to a single precise formalization. This has been noticed already in [19] in the specific case of the continuous model of the neural oscillator. For these reasons, we study our hybrid automaton exploiting different approximation techniques that introduce noise. In the literature, several approximation techniques have been proposed (see, e.g., [7, 16, 10, 3, 15]). Fränzle in [7] presents a model of noise over hybrid automata. The introduction of noise ensures in many cases the (semi-)decidability of the reachability problem. Another result of (semi-)decidability always based on the concept of perturbation and concerning the safety verification of hybrid systems is given by ∗ This work has been partially supported by Istituto Nazionale di Alta Matematica (INdAM). Ezio Bartocci and Luca Bortolussi (Eds.): HSB 2012 EPTCS 92, 2012, pp. 58–72, doi:10.4204/EPTCS.92.5 c A. Casagrande, T. Dreossi & C. Piazza This work is licensed under the Creative Commons Attribution License. A. Casagrande, T. Dreossi & C. Piazza 59 Ratschan in [16]. Furthermore, ε-(bi)simulation [10] relations, which are essentially relaxations on the infinite precision required by simulation and bisimulation, represent tools able to remove complexity and undecidability issues related to the analysis of the investigated model. Moreover, in [3] it is presented a different approach based on the reinterpretation of the standard semantics of the formulæ which compose hybrid automata. Exploiting this new class of semantics, called ε-semantics, the authors provide a result of decidability of the reachability problem over hybrid automata with bounded invariants. In this paper, we focus precisely on the approximation approach based on the ε-semantics. In particular, we propose a translation that allows us to reduce the ε-semantics evaluation to the standard semantics evaluation, computable by exploiting tools for cylindrical algebraic decomposition. Then, we present some properties which have been automatically tested on the neural oscillator by applying such translation. Hence, in this work, we prove both that ε-semantics better represents the real behaviour of the neural oscillator, than the standard one, and that the approach is effective. The paper is organized as follows: Section 1 gives some basic definitions concerning logics and hybrid automata; Section 2 is dedicated to the mathematical modeling of the neural oscillator; in Section 3 we present different approximation techniques based on noise, perturbation, approximate (bi)simulations, and ε-semantics. Section 4 exposes some considerations regarding the application of the previously presented approximation approaches to the investigated model. Finally, in Section 5, we first define a translation which make effectively computable the ε-semantics, then we experimentally exploit it in the analysis of the hybrid automaton which models the neural oscillator. All the proofs can be found at http://www.dimi.uniud.it/piazza/hsb2012_extended.pdf. 1 1.1 Hybrid Automata Preliminaries We formally define hybrid automata by using first-order languages and, because of that, we first need to introduce some basic notions and our notation. We use X, Xi , Y , Yi , W , and Wi to denote real variables and X, Xi , Y, Yi , W, and Wi to denote tuple of real variables. We always assume that all the variables that occur bound in a formula do not occur free and vice versa. This enables us to label variables, rather than occurrences, as free or bound. We write ϕ[X1 , . . . , Xm ] to stress the fact that X1 , . . ., Xm are free in ϕ. By extension, ϕ[X1 , . . . , Xn ] indicates that the components of vectors X1 , . . ., Xn are free in ϕ. The formula obtained from ϕ[X1 , . . . , Xm ] by replacing Xi by s0 , where s0 is either a constant or a variable, is denoted by ϕJXi /s0 K. By extension, ϕJXi . . . Xi+n /s0 . . . sn K indicates the formula obtained from ϕ[X1 , . . . , Xm ] by simultaneously replacing all the variables Xi . . . Xi+n by s0 . . . sn . If X = hXi , . . . , Xi+n i, ~s0 = hs0 , . . . , sn i, ~s1 = hsn+1 , . . . , s2∗n+1 i, and ; is a relational symbol (e.g., = or ≥), then we  may V write ϕJX/~s0 K in place of ϕJXi . . . Xi+n /s0 . . . sn K and ~s0 ; ~s1 in place of j∈[0,n] s j ; s j+k∗n (e.g., h7, Xi = h2, 3i means 7 = 2 ∧ X = 3). Finally, if ϕ[X1 , . . . , Xi , . . . , Xn ] then we may denote the formula ϕJXi /~sK by writing ϕJX1 , . . . ,~s, . . . , Xn K. The semantics of a formula is defined in the standard way (see. e.g., [6]). Given a set Γ of sentences and a sentence ϕ, we say that ϕ is a logical consequence of Γ (denoted, Γ |= ϕ) if ϕ is valid in any model M in which each formula of Γ is valid too (M |= Γ). A theory T is a set of sentences such that if T |= ϕ, then ϕ ∈ T . A theory T admits the so-called elimination of quantifiers, if, for any formula ϕ, there exists in T a quantifier free formula ρ such that ϕ is equivalent to ρ with respect to T . If there exists an algorithm for deciding whether a sentence ϕ belongs to T or not, we say that T is decidable. Hybrid Automata and ε-Analysis on a Neural Oscillator 60 def Example 1. Consider the formula ϕ = ∃X (a ∗ X 2 + b ∗ X + c = 0). It is well known that ϕ is in the theory of reals with +, ∗, and ≥ if and only if the unquantified formula b2 − 4ac ≥ 0 holds. 1.2 Syntax, Semantics, and Reachability A hybrid automaton is an infinite state automaton that consists in a set of continuos variables and a finite directed graph. Each node of a graph is labelled by both an invariant condition and a dynamic law, while all the edges are tagged with an activation region and a reset map. The continuous variables evolve according to the dynamic law of the current node of the graph and the node’s invariant condition must be satisfied along all the evolution. An edge is crossable if and only if the variable values are included the activation region and, when a hybrid automata jumps over it, the associated reset map is applied. Definition 1 (Hybrid Automata - Syntax). A hybrid automaton H of dimension d(H) ∈ N is a tuple hX, X0 , V, E, Inv, f· , Act, Resi where: • X = hX1 , . . ., Xn i and X0 = hX10 , . . ., Xn0 i are two vectors of variables ranging over the reals R; • hV, Ei is a directed finite graph, i.e., E ⊆ V × V. Each element of V will be dubbed location; • Each location v ∈ V is labelled by both a formula Inv(v)[X], called invariant, and a continuous function fv : Rn −→ (R≥0 −→ Rn ), called dynamics or flow function. The dynamics may be specified either by differential equations, i.e., fv is the solution of a given Cauchy problem, or by a logic formula. We use the formula Dyn(v)[X, X0 , T ], where T is a temporal variable ranging in def R≥0 , to denote the dynamics on v, i.e., Dyn(v)[X, X0 , T ] = X0 = fv (X)(T ); • Each e ∈ E is labelled by the formulæ Act(e)[X] and Res(e)[X, X0 ] which are called activation and reset, respectively. If all the formulæ that define a hybrid automaton H belong to the same logical theory T , then we say that H is definable in T or that H is a T hybrid automaton. The semantics of any hybrid automaton can be specified as a transition system that is composed by two different relations miming the double nature of the hybrid automaton itself: the continuous reachability transition relation and the discrete reachability transition relation. Definition 2 (Hybrid Automaton - Semantics). A state a of H is a pair hv, ri, where v ∈ V is a location and r ∈ Rd(H) is an assignment of values for the variables of X. A state hv, ri is said to be admissible if Inv(v)JrK holds. t The continuous transition relation → − C between admissible states, where t ≥ 0 denotes the transition elapsed time, is defined as follows: t hv, ri → − C hv, si ⇐⇒ r = fv (r)(0), s = fv (r)(t), and Inv(v)J fv (r)(t 0 )K hold for each t 0 ∈ [0,t]. e The discrete transition relation → − D among admissible states is: e hv, ri → − D hv, si ⇐⇒ e = hv, v0 i and both Act(e)JrK and Res(e)Jr, sK hold. t We write a →C a0 and a →D a0 to mean that there exists a t ∈ R≥0 such that a → − C a0 and that there e 0 exists an e ∈ E such that a → − D a , respectively. Definition 3 (Reachability). Let I be either N or an initial finite interval of N. A trace of H is a sequence of admissible states a0 , a1 , . . . , a j , . . . , with j ∈ I , such that ai−1 → ai holds for all i ∈ [1, n] and either ai−2 →C ai−1 →D ai , ai−2 →D ai−1 →D ai , or ai−2 →D ai−1 →C ai for each i ∈ I \ {0}1 . The automaton H reaches a state an from a state a0 if there exists a trace a0 , . . . , an . In such a case, we also say that an is reachable from a0 in H. 1 This last condition supports not transitive dynamics. See [4] for a complete discussion. 61 A. Casagrande, T. Dreossi & C. Piazza The problem of deciding whether a hybrid automaton H reaches a set of states S from a set of states R is known as the reachability problem of S from R over H. A trace produced by an infinite sequence of discrete transitions during a bounded amount of time is called Zeno trace and every hybrid automaton allowing such kind of trace is said to have a Zeno behaviour. Example 2. Let us consider a hybrid automaton Hb modeling a bouncing ball whose collisions are inelastic. The automaton is equipped with two continuous variables X1 and X2 that represent ball’s Ẋ1 = X2 Ẋ2 = −g X10 = X1 X20 = −γX2 Figure 1: Bouncing ball hybrid automaton. elevation and velocity, respectively. The dynamics, resets, and discrete structure of Hb are presented in Fig. 1. The two coefficients g and γ are the standard gravity and the coefficient of restitution, respectively. The activation formula of the automaton edge is “X1 = 0”. Imposing as starting height h0 = 10m and as coefficient of restitution γ = 0.86, the bounce peaks decrease at each iteration and the automaton Hb has a Zeno behaviour. As the halting problem for the two counter machine can be reduced to the reachability problem of a particular class of hybrid automata, the reachability problem for hybrid automata itself is not always decidable [1]. However, if H is a T -hybrid automaton and T is a first-order decidable theory, then the reachability through a bounded number of discrete transitions can be characterized with a first-order decidable formula (see e.g., [4]). In particular, in the case of automata defined through polynomials over the reals, we can use cylindrical algebraic decomposition tools to decide bounded reachability. 2 Neural Oscillator: Continuous and Hybrid Models Oscillatory electrical stimuli have been considered central for the activities of several brain regions since the begin of the ’80s. It was shown that they play an important role in the olfactory information processing [8] and they were observed in the thalamus [18], and in the cortex [17]. Many studies suggested that, in the mammalian visual system, neurons signals may be group together through in-phase oscillations [11]. Because of this, the development and analysis of models representing oscillatory phenomena assume a great importance in understanding the neurophysiological activities. A simple continuous model of a single oscillator has been proposed in [19]. The model describes the evolutions of one excitatory neuron (Ne ) and one inhibitory neuron (Ni ) by mean of the ordinary differential system.  Ẋe = − Xτe + tanh (λ ∗ Xe ) − tanh (λ ∗ Xi ) f (τ, λ ) : , (1) Ẋi = − Xτi + tanh (λ ∗ Xe ) + tanh (λ ∗ Xi ) where Xe and Xi are the output of Ne and Ni , respectively, τ is a characteristic time constant, and λ > 0 is the amplification gain. Hopf bifurcation characterizes a qualitative change in the evolution of f (τ, λ ): if τ ∗ λ ≤ 1, then the point h0, 0i is the unique global attractor of the system, if, otherwise, τ ∗ λ > 1, the origin is an unstable equilibrium and all the evolutions converge to a limit cycle attractor [2]. A simulation of f (3, 1) is represented in Fig. 4(a). Hybrid Automata and ε-Analysis on a Neural Oscillator 62 Xi v1 v0 Trajectory from (-0.5,-0.5) Trajectory from (-1.0,6.0) 6 Ẋe = − Xτe Ẋi = − Xτi Ẋe = − Xτe Ẋi = − Xτi + 2 −2 v2 4 2 Xe v3 0 2 Ẋe = − Xτe Ẋi = − Xτi − 2 Ẋe = − Xτe + 2 Ẋi = − Xτi 4 6 6 (a) The automaton has 4 locations. The dashed lines denote both the boundaries of the invariants and the activation regions. The resets are identify functions. 4 2 0 2 4 6 (b) Direction field and evolution of the automaton from the two points h− 12 , − 21 i and h−1, 6i when τ = 3. The automaton has four attractors, is not periodic, and its principal axes are stable. Figure 2: The piecewise hybrid automaton associated to the function fˆ(τ). Even if f (τ, λ ) is rather simple, the ability of analyzing a complex system obtained by composing multiple copies of this model is limited due to the non-linearity of f (τ, λ ) itself. For this reason, we are interested in the development of a piecewise affine hybrid model whose behaviour fairly approximates System (1) and that can be automatically analyzed and composed. Since the non-linear components in System (1) have the form tanh (λ ∗ X), we try to linearize such function. In the case of genetic networks it is quite standard to approximate sigmoidal behaviours (e.g., tanh) through the sign function sgn [9, 14]. Such approximation replaces a continuous signal with a discrete off-on one. In our case, by replacing tanh (λ ∗ X) with sgn (X) in System (1), we obtain the following differential system:  Ẋe = − Xτe + sgn (Xe ) − sgn (Xi ) ˆf (τ) : , (2) Ẋi = − Xτi + sgn (Xe ) + sgn (Xi ) which corresponds to the piecewise hybrid model depicted in Fig. 2(a). Unfortunately, the behaviour of this model is quite different from that of System (1), as we can see comparing the simulation in Fig. 2(b) with that of Fig. 4(a). In particular, the model based on fˆ(τ) has four attractors with coordinates h−2 ∗ τ, 0i, h0, −2 ∗ τi, h2 ∗ τ, 0i, and h0, 2 ∗ τi, it is not periodic, and its principal axes are stable. A more sophisticated approximation of tanh (λ ∗ X) is the piecewise linear function:  if z < − αλ  −1 def λ (3) hλ ,α (z) = ∗ z if − αλ ≤ z < αλ ,  α 1 if z ≥ αλ where α is the approximation coefficient which determines the slope of the central segment. The substitution of tanh (λ ∗ X) with hλ ,α (z) in System (1) leads to the system:  Ẋe = − Xτe + hλ ,α (Xe ) − hλ ,α (Xi ) ˜fα (τ, λ ) : , (4) Ẋi = − Xτi + hλ ,α (Xe ) + hλ ,α (Xi ) 63 A. Casagrande, T. Dreossi & C. Piazza whose corresponding hybrid automaton is depicted in Fig. 3. A different approximation could be obtained by using the technique proposed in [12]. Xi v8 v7 v6 −α Ẋe = τ∗λ τ∗α Xe − 1 λ Ẋi = α Xe − Xτi + 1 Ẋe = − Xτe − 2 Ẋi = − Xτi v1 Ẋe = − Xτe Ẋi = − Xτi + 2 v0 Ẋe = − Xτe − αλ Xi − 1 −α Ẋi = τ∗λ τ∗α Xi − 1 v2 λ −α Ẋe = τ∗λ τ∗α Xe − α Xi −α Ẋi = αλ Xe + τ∗λ τ∗α Xi v3 Ẋe = − Xτe − αλ Xi + 1 −α Ẋi = τ∗λ τ∗α Xi + 1 Xe = − αλ α λ Xe Xi = − αλ v4 −α Ẋe = τ∗λ τ∗α Xe + 1 Ẋi = αλ Xe − Xτi − 1 Ẋe = − Xτe Ẋi = − Xτi − 2 Xi = v5 Ẋe = − Xτe + 2 Ẋi = − Xτi Xe = α λ Figure 3: A graphical representation of the hybrid automaton H f˜ associated to the function f˜α (τ, λ ). In the rest of the paper we present some general techniques for studying hybrid automata and then we apply them to H fˆ to formally prove its properties. 3 3.1 Approximation Techniques Noise and Disturbed Automata The density of continuous variables provide an unbounded quantity of memory within a bounded region. As a matter of fact, the undecidability results proved in [13] are based on the possibility of embedding N in (0, 1] ⊆ R through the function f (n) = 2−n . However, Fränzle in [7] observed that noise disturbes the trajectiories of real hybrid systems, augmenting the set of reachable points. Hence, in [7] a model of noise has been presented over hybrid automata. Remarkably, the introduction of noise ensures in many cases the (semi-)decidability of the reachability problem. Our definitions of hybrid automata slightly differ from the ones in [7]. In particular, as far as the syntax is concerned, the formulæ Act(e)[X] and Res(e)[X, X0 ] are glued together in a formula called transe [X, X0 ]. Moreover, our formulæ Inv(v)[X] and Dyn(v)[X, X0 , T ] are replaced by a single formula Hybrid Automata and ε-Analysis on a Neural Oscillator 64 Trajectory from (-0.5,-0.5) Trajectory from (-1.0,6.0) 6 4 4 2 2 0 0 2 2 4 4 6 Trajectory from (-0.5,-0.5) Trajectory from (-1.0,6.0) 6 6 6 4 2 0 2 4 6 (a) An evolution of f (3, 1). 6 4 2 0 2 4 6 (b) An evolution of f˜2 (3, 1). Figure 4: Direction field and evolution of the models discussed in Section 2. actv [X, X0 ] whose meaning in our framework is: ∃T (T ≥ 0 ∧ X0 = fv (X)(T ) ∧ ∀T 0 (0 ≤ T 0 ≤ T → Inv(v) fv (X)(T 0 ))), i.e., the formula actv [X, X0 ] syntactically ensures the existence of a continuous transition. Exploiting these relationships between our hybrid automata and the hybrid automata defined through the formulæ actv [X, X0 ] and transe [X, X0 ], we can reformulate the results presented in [7] in our framework. Definition 4. Given a hybrid automaton H = hX, X0 , V, E, Inv, f· , Act, Resi we say that the hybrid f ef· , Act, Resi is a disturbed variant of H if for each pair of states a, a0 if e = hX, X0 , V, E, Inv, automaton H e a →C a0 in H, then a →C a0 in H. e is a disturbance of noise level ε or more if Moreover, let δ be a distance over Rd(H) and ε ∈ R>0 . H 0 0 e for each s, s such that δ (s, s ) < ε it holds that if hv, ri →C hv, si in H, then hv, ri →C hv, s0 i in H. e are Intuitively, when there are no bifurcation behaviours, a small ε ensures that the dynamics of H close to those of H. In [7] it has been proved that in the case of bounded invariants there exists a finite computable index i ∈ N such that the reachability over H can be over-approximated with reachability within i discrete jumps over a disturbance of noise level ε or more of H. e be T hybrid automata, with H e Theorem 1. [7] Let T be a decidable first-order theory. Let H, H disturbance of noise level ε or more of H for some ε ∈ R>0 . There exists i such that for all pairs of e within i discrete transitions. Moreover, i can be states a, a0 if a reaches a0 in H, then a reaches a0 in H effectively computed. Unfortunately, there are cases in which the over-approximation is always strict, no matter how small ε is. Such automata are called fragile, in contrast with robust automata, where if a does not reach a0 e disturbance of noise level ε such that a does not reach a0 in H. e As a in H, there exist ε ∈ R>0 and H consequence, reachability is decidable over robust automata, while it is only semi-decidable over fragile automata. It is not possible to decide whether a hybrid automaton is robust or fragile. Intuitively, since real world systems are always subject to noise, a hybrid automaton is a reliable model of the real system only if it is robust. So, it is fundamental to develop and exploit design techniques which ensure robustness of the resulting hybrid automata. 65 A. Casagrande, T. Dreossi & C. Piazza 3.2 Approximate Bisimulations and Simulations Since the 90’s, simulation and bisimulation have been successfully used to investigate hybrid automata. However, due to the infinite precision required to relate different evolutions, these tools are able to remove neither the complexity nor the undecidability issues that may affect the analysis of the investigated model. The ε-(bi)simulation relations [10] relaxes these infinite precision requirements by relating system evolutions whose maximal distance is less than a given ε. This enables us to simplify both the dynamics and the resets of the investigated automaton. Moreover, provided an observation map hh·ii : Rd(H) −→ Rd that associates the internal status of an automaton H to the values measurable by an external observer, ε-(bi)simulations allow to relate the “visible” behaviours of H to the behaviours of an automaton whose dimension is smaller than d(H). Any pair of hybrid automata H1 to H2 related by an ε-simulation must have the same discrete structure and share the same locations V and edges E by definition. Definition 5. Let Hi = hXi , Xi 0 , V, E, Invi , f·,i , Acti , Resi i be a hybrid automaton for each i ∈ {1, 2}. Moreover, let ε be in R≥0 . A relation Sε ⊆ (V × Rd(H1 ) ) × (V × Rd(H2 ) ) is an approximate simulation relation of H1 by H2 of precision ε if, for all hhv1 , r1 i , hv2 , r2 ii ∈ Sε : 1. v1 = v2 = v; 2. k hhr1 ii1 − hhr2 ii2 k ≤ ε; t t 3. if hv, r1 i → − C hv, r10 i in H1 , there exists r20 s.t. hv, r2 i → − C hv, r20 i in H2 and hhv, r10 i , hv, r20 ii ∈ Sε ; e e 4. if hv, r1 i → − D hv0 , r10 i in H1 , there exists r20 s.t. hv, r2 i → − D hv0 , r20 i in H2 and hhv0 , r10 i , hv0 , r20 ii ∈ Sε . The automaton H2 approximately simulates H1 with precision ε if there exists an approximate simulation relation of H1 by H2 of precision ε. An approximate simulation relation Sε of H1 by H2 of precision ε is an approximate bisimulation relation between H1 and H2 of precision ε if the relation Sε−1 = {ha2 , a1 i | ha1 , a2 i ∈ Sε } is an approximate simulation relation of H2 by H1 of precision ε. Many methods have been developed to automatically compute approximate simulation relations between systems such as constrained linear systems, autonomous nonlinear systems, and hybrid systems. 3.3 ε-Semantics The undecidability of the reachability problem over hybrid automata having bounded invariants is a direct consequence of the ability of characterizing dense regions of arbitrarily small size. As noticed in [3], especially in the study of biological systems, such ability may result misleading. As a matter of the fact, the continuous quantities used in hybrid automata are very often abstractions of large, but discrete, quantities. In such cases, the ability of handling values with infinite precision is a model artifact rather than a real property of the original system. In order to discretize the continuous space, we introduce the concept of ε-sphere. Given a set S ⊆ n R , the ε-sphere B(S, ε) is the subset of Rn of points at distance less than ε from S, i.e., B(S, ε) = {q ∈ Rn | ∃p ∈ S(δ (p, q) < ε)}, where δ is a distance function over Rn (e.g., the standard euclidean distance). Moreover, given a hybrid automaton H and an initial set of points I ⊆ Rd(H) , the set of points S reachable from the set I by H, denoted by RSetH (I), is characterized by RSetH (I) = i∈N RSetiH (I) = limi→+∞ RSetiH (I) where RSetiH (I) is the set of points reachable from I in at most i discrete transitions. Theorem 2 ([3]). Let T be a decidable first-order theory over reals and H be a T hybrid automaton with bounded invariants. If there exists ε ∈ R>0 such that, for each I ⊆ Rd(H) and for each i ∈ N, either i+1 i+1 (I) \ RSetiH (I), then RSetH (I) = RSetiH (I) or there exists an ai ∈ Rd(H) such that B({ai }, ε) ⊆ RSetH j i there exists j ∈ N such that RSetH (I) = RSetH (I) and the reachability problem over H is decidable. Hybrid Automata and ε-Analysis on a Neural Oscillator 66 This result finds applications when it makes no sense to distinguish measurements smaller than ε. Hence, since hybrid automata characterization is based on first-order fromulæ, it seems reasonable to reinterpret the semantics of semi-algebraic automata by giving to each formula a semantics of “dimension of at least ε”. In [3] the authors introduce a new class of semantics, called ε-semantics, which guarantee the decidability of reachability in the case of hybrid automata with bounded invariants. Definition 6. Let T be a first-order theory and let ε ∈ R>0 . For each formula ψ on T let {|ψ|}ε ⊆ Rd , where d is the number of free variables of ψ, be such that: (ε) either {|ψ|}ε = 0/ or there exists p ∈ Rd such that B ({p}, ε) ⊆ {|ψ|}ε ; (∩) {|φ ∧ ϕ|}ε ⊆ {|φ |}ε ∩ {|ϕ|}ε ; (∪) {|φ ∨ ϕ|}ε = {|φ |}ε ∪ {|ϕ|}ε ; (¬) {|ψ|}ε ∩ {|¬ψ|}ε = 0. / r∈R ψJr, XK|}ε ; (∀) {|∀Xψ[X, X]|}ε = {| V r∈R ψJr, XK|}ε ; (∃) {|∃Xψ[X, X]|}ε = {| W Any semantics satisfying the above conditions is said to be an ε-semantics for T . Let us notice that no ε-semantics can over-approximate the standard semantics. Infact, for any theory T , if {|φ |} ⊂ {|φ |}ε , where {|·|} is the semantics associated to T , then {|¬φ |} ⊃ {|¬φ |}ε due to the (¬)-rule. Example 3 (The sphere semantics). Let T be a first-order theory over the reals and let ε > 0. The sphere semantics of ψ, (|ψ|)ε , is defined by structural induction on ψ as follows: def def V • (|t1 ◦ t2 |)ε = B ({|t1 ◦ t2 |}, ε), for ◦ ∈ {=, <}; • (|∀XψJX, XK|)ε = (| r∈R ψJr, XK|)ε ; def • (|ψ1 ∧ ψ2 |)ε = def S B({p},ε)⊆(|ψ1 )| ε ∩(|ψ2 )| ε • (|ψ1 ∨ ψ2 |)ε = (|ψ1 |)ε ∪ (|ψ2 |)ε ; B ({p}, ε); def • (|∃XψJX, XK|)ε = (| def • (|¬ψ|)ε = r∈R ψJr, XK|)ε ; W B({p},ε)∩(|ψ|)ε =0/ B ({p}, ε). S ε-semantics are exploited in the reachability algorithm defined in [3]. Intuitively, the algorithm computes reachability incrementing the number of allowed discrete transitions at each iteration. New reachable sets of points are computed until they became too small to be captured by the ε-semantics. In the case of hybrid automata with bounded invariants, it always terminates. Finally, notice that replacing the ε-semantics with the standard one, the above algorithm could not terminate even with bounded invariants, due to Zeno behaviours. To conclude, let us notice that, by Taylor’s approximation, for any ε and any differentiable function f (t), if we fix a time horizon th , we can approximate f (t) by a polynomial p(t) such that k f (t)− p(t)k < ε for all t ∈ [0,th ]. Hence, there are ε-semantics that are not able to distinguish p(t) and f (t) and, according to such ε-semantics, we can use p(t) in place of f (t) for all t ∈ [0,th ]. It follows that, adopting an opportune ε-semantics, the Tarski’s theory (i.e., the first order theory of the inequalities over the reals) is enough to represent any differentiable function f (t). 4 Approximated Analysis over Neural Oscillator In this section we try to understand what happens when we apply the approximation techniques described in Section 3 to our neural oscillator hybrid model H f˜ presented in Section 2. 4.1 ε-disturbance The automaton H f˜ presents two main behaviours: h0, 0i is an unstable equilibrium; each starting point different from h0, 0i reaches the limit cycle. For this reason we can prove that H f˜ is fragile. As a matter A. Casagrande, T. Dreossi & C. Piazza 67 ff˜ is a disturbance of noise level ε of H f˜, then (0, 0) in H ff˜ reaches points different from of fact, if H h0, 0i, while in H f˜ it does not. In other words, if we consider backward reachability, h0, 0i is backward ff˜ from a region R 6= {(0, 0)}, while in H f˜ it is backward reachable from {h0, 0i}. This is reachable in H not due to the fact that h0, 0i is unstable, but to the presence of two limit behaviours over a connected region. We recall that in a piecewise hybrid automaton the invariants are connected disjoint regions whose union is connected and the resets are identities, i.e., the trajectories are continuos. We use the term limit behaviour of a hybrid automaton to denote both equilibria and limit cycles. Theorem 3. Let H be a piecewise hybrid automaton presenting at least two different limit behaviours. If from each point there is a unique possible evolution, then H is fragile. The above result points out that there are systems for which it is not possible to define robust models. In [16] a model is said to be safe only if it remains safe under small disturbances. In this terms our result shows that there are systems which do not admit a safe model. This does not means that they are not interesting or that we need to remove some of their behaviours. This simply means that such systems have to be studied applying some form of disturbance or approximation. As the matter of facts, if we study them by applying standard semantics, we define a precise border between the points reaching different behaviours. Such precise border is not realistic. 4.2 ε-(bi)simulations The automaton H f˜ has both an unstable equilibrium in h0, 0i and a single limit cycle encompassing the origin of the axes. Because of that we are guaranteed that, during its evolutions, H f˜ decreases the distance of its state from the limit cycle regardless of the starting state s 6= hv0 , h0, 0ii. Since all the differential equations defining the dynamics of H f˜ are continuous, we can define an ε-simulation between states whose distance from the limit cycle is smaller than ε. This enables us to both approximate the non-linear differential System (1) with a linear differential system and reduce the complexity of the analysis. However, if d is the maximum Euclidean distance between h0, 0i and the cycle limit, no ε-(bi)simulation, with ε < d, can relate hv0 , h0, 0ii with any other state of H f˜. As a matter of fact, the points belonging to any neighborhood of h0, 0i eventually converge to the limit cycle. It follows that hv0 , h0, 0ii is a singularity of the model and, despite the original system always reaches a periodic evolution, any approximation of the proposed model by mean of ε-(bi)simulation does not manifest this property. 4.3 ε-semantics In order to exploit ε-semantics for the study of H f˜ the first step we have to perform is that of approximating through polynomials the solutions of the differential equations defining the semantics. This can be done, for instance, by using Taylor polynomials or more sophisticated numerical integration techniques. We do this in the next section, where we also apply cylindrical algebraic decomposition tools to automatically prove properties of our model. Here instead we try to infer some general results about the use of ε-semantics on H f˜. H f˜ has an unstable equilibrium in h0, 0i. This means that h0, 0i reaches {h0, 0i}. However, when we compute the set of points reachable from h0, 0i through an ε-semantics we get either the empty set or a set having diameter at least ε. In particular, if our ε-semantics under-approximates the standard one (i.e., if {|φ |} ⊃ {|φ |}ε , where {|·|} is the semantics associated to chosen theory, for each formula φ ), then we get the empty set. Otherwise, both cases are possible, depending on the ε-semantics. For instance, in the case of sphere semantics, no matter how we approximate the dynamics, we get that h0, 0i reaches Hybrid Automata and ε-Analysis on a Neural Oscillator 68 a set having diameter at least ε. Similarly, unless we use an under-approximation ε-semantics or some unusual metrics, the limit cycle is transformed into a limit flow tube. This means that, if we consider a point on the limit cycle and we compute the set of points reachable from such point, then we do not only obtain the limit cycle, but at least a flow tube which includes the limit cycle. We will see some more details on this in the case of sphere semantics in Section 5. All the other points, again, will reach either the empty set or a set having diameter at least ε. The result we would expect in this second case is that each point in the space reaches the flow tube including the limit cycle. We will see that this is true in the case of sphere semantics, even when we use the simplest Taylor polynomials of degree one. These considerations already allow us to point out that sphere semantics better reflects the real system behaviour than the standard one. 5 Computing Sphere Semantics In this section we show how sphere semantics can be computed exploiting tools for cylindrical algebraic decomposition. In particular, we introduce a translation from sphere semantics to standard semantics. Then, we apply the translation to study the “sphere” behaviour of our neural oscillator example. 5.1 A translation into standard semantics If T is a first-order theory and δ is a distance definable in T , then the sphere semantics of any formula in T is T -definable in the standardnsemantics, o i.e., for any formula ϕ[X] ∈ T we can compute a formula d d (ϕ)ε [X] ∈ T such that (|ϕ[X]|)ε = (ϕ)ε [X] for all ε ∈ R>0 . In order to achieve this goal, we need to distinguish two kind of variables: the variables of the original formula (named W , Wi , W and Wi ), whose evaluations follow the rules of the sphere semantics, and the auxiliary variables (named Y , Yi , Y and Yi ) that will be introduced to encode the sphere semantics into the standard one. From the point of view of the sphere semantics the later can seen as symbolic constants, d . In particular, we will use them to characterize sets of even if they will be quantified in the formula (ϕ) ε V W the form (| r∈R ϕJr, WK|)ε and (| r∈R ϕJr, WK|)ε in the standard semantics. Definition 7 (Translation). Let T be a first-order theory over the reals, ϕ[Y, W] be any first-order d [Y, W] by structural induction on ϕ[Y, W] itself. formula T -definable, and ε ∈ R>0 . We define (ϕ) ε def 1. ((t1 ◦\ t2 )[Y, W])ε = ∃W0 ((t1 ◦ t2 )JY, W0 K ∧ δ (W0 , W) < ε), for ◦ ∈ {=, <}; def c d ; \ 2. (φ ∨ ψ)ε = (φ )ε ∨ (ψ) ε def c) ∧ (ψ) d )JY, W1 K) ∧ δ (W0 , W) < ε); \ 3. (φ [Y, W] ∧ ψ[Y, W])ε = ∃W0 (∀W1 (δ (W0 , W1 ) < ε _ ((φ ε ε def \ 4. (∀W φ\ [Y,W, W])ε = ∃W0 (∀W1 (δ (W0 , W1 ) < ε _ ∀Y (φ JY,Y, W1 K)ε ) ∧ δ (W0 , W) < ε); def \ 5. (∃W φ\ [Y,W, W])ε = ∃Y (φ JY,Y, W1 K)ε ; def \ 6. (¬φ\ [Y, W])ε = ∃W0 (∀W1 (δ (W0 , W1 ) < ε _ ¬(φ JY, W1 K)ε ) ∧ δ (W0 , W) < ε). Theorem 4 (Semantics Equivalence). Let T be any first-order theory and δ be a T -definable distance. The sphereosemantics (|.|)ε of T is T -definable in the standard semantics and, in particular, (|ϕ[X]|)ε = n d [X] for any formula ϕ[X] ∈ T and all ε ∈ R>0 . (ϕ) ε 69 A. Casagrande, T. Dreossi & C. Piazza d [Y, W] is definable in Tarski theory, and this theory is decidable, the satiability of ϕ in (||) is Since (ϕ) ε ε decidable. Let us notice that the application of the translation in Definition 7 to a formula, increases the evaluation complexity of such formula with respect to its untranslated version. This is mainly due to the possible introduction of quantifier operator alternations. 5.2 Experimental Results on the Neural Oscillator Let us consider the hybrid automaton H f˜ described in Section 2 for modeling a neural oscillator. We intend to study its behaviour through sphere semantics, exploiting cylindrical algebraic decomposition tools to automatically compute it. As we noticed in Section 3, any differentiable dynamics can be exactly represented, in terms of an opportune ε-semantics, by a semi-algebraic function. In particular, we can replace the dynamics of H f˜ by the corresponding Taylor polynomials up to a certain degree which depends on ε. In this paper, we decided to model the automaton dynamics by using their first-degree Taylor polynomials and we obtained the automaton H 0f˜ depicted in Figure 5. In order to keep the presentation simple, in this section we fix the parameters as follows τ = 3, λ = 1, α = 2. Hence, the activations correspond to the axis Xi = ±2 and Xe = ±2. Xi v8 v7 Xe0 = Xe − ( X3e + 2)t Xi0 = Xi − X3i ∗ t v1 v6 Xe0 = Xe + ( X6e − 1)t Xi0 = Xi + ( X2e − X3i + 1)t v0 Xe0 = Xe − ( X3e + X2i + 1)t Xi0 = Xi + ( X6i − 1)t v2 Xe0 = Xe + ( X6e − X2i )t Xi0 = Xi + ( X2e Xe + X6i )t Xe0 = Xe − ( X3e + X2i − 1)t Xi0 = Xi + ( X6i + 1)t Xe Xi = −2 v4 Xe0 = Xe + ( X6e + 1)t Xi0 = Xi + ( X2e − X3i − 1)t Xe = −2 Xi = 2 v5 v3 Xe0 = Xe − X3e t Xi0 = Xi − ( X3i − 2)t Xe0 = Xe − X3e t Xi0 = Xi + (2 − X3i )t Xe0 = Xe + (2 − X3e )t Xi0 = Xi − X3i t Xe = 2 Figure 5: The piecewise hybrid automaton H 0f˜ associated to the function f2 (3, 1). A simulation of H 0f˜ is presented in Figure 4: a limit cycle is still present, but it has a diamondlike shape. We are interested in studying this limit cycle. In particular, we are interested in proving, Hybrid Automata and ε-Analysis on a Neural Oscillator 70 exploiting tools for symbolic computation, that if we apply sphere semantics, each point in the space reaches a bounded region which includes the limit cycle. In this example our automata have unbounded invariants, hence the termination of sphere semantics reachability algorithm is not guaranteed. We start computing the intersections of the limit cycle with the activation regions. Consider for instance the intersection Q0 = hxQ0 , 2i of the limit cycle with Xi = 2 and Xe > 0. We have that xQ0 is the unique solution of the equation which describes the intersection of the diamond-like limit cycle with Xi = 2. Similarly, consider point Q1 = h2, yQ1 i that in turn corresponds to the intersection of the limit cycle with Xe = 2 and Xi > 0. We effectively calculated all√ these intersections by √using the computer √17+14538 and yQ = 190√ 17+786 . The points algebra system Maxima. So, for instance, we get xQ0 = 3526 1 495 17+2041 39 17+161 Q0 and Q1 satisfy the activation formulæ wich regulate the discrete transitions between locations v6 and v5 , and locations v6 and v7 , respectively. Let us now consider a point P0 located on Xi = 2, but which is such that its distance d0 from Q0 is at least 2ε, i.e., P0 = hxP0 , 2i and δ (Q0 , P0 ) = d0 > 2ε. Consider now any point P1 on Xe = 2 resulting from the sphere semantics evaluation of the continuous evolution which starts in P0 inside location v6 . Thus, let denote with d1 the distance between such P1 and Q1 . If we could prove that d1 is always smaller than d0 , then we would be able to conclude that all the points which start from a distance of at least 2ε from the limit cycle converge to a flow tube having diameter 2ε that includes the limit cycle. Of course, to obtain such conclusion, we need to prove this property on all locations. We can formalize this concept through a first-order formula. We denote with r and s the straight lines Xi = 2 and Xe = 2, respectively, and with the notation Q0 ∈ r ∩C ∩ Xe > 0 the membership of Q0 to the intersection of straight line r with limit cycle C and positive Xe semi-plane. Moreover, with the notation (|P0 →C P1 |)ε we denote the continuous transition from point P0 to point P1 performed exploiting sphere semantics. Thus, our desired property can be expressed as: ∀Q0 Q1 ∀P0 P1 (Q0 ∈ r ∩C ∩ Xe > 0 ∧ Q1 ∈ s ∩C ∩ Xi > 0 ∧ P0 ∈ r ∩ Xe > 0∧  P1 ∈ s ∩ Xe > 0 ∧ δ (Q0 , P0 ) > 2ε ∧ (|P0 →C P1 |)ε ) _ δ (Q1 , P1 ) < δ (Q0 , P0 ) (5) stating the convergence to the limit flow tube in location v6 . Such property can be easily rewritten for each location of the hybrid automaton, changing the roles of activation border lines r and s. 5 0 5 Trajectory from (0,0) Trajectory from (-1,6) 5 0 5 Figure 6: Two evolutions of the first degree approximation of the model proposed in Section 2. We automatically expanded such formula by using a Perl script that implements the Definition 7 to translate sphere semantics into the standard one. In particular, (|P0 →C P1 |)ε , in the case of location v6 71 A. Casagrande, T. Dreossi & C. Piazza becomes def ψ[X] = ∃T(∃X0 (∀X1 (δ (X0 , X1 ) < ε _ (T > 0 ∧ φ JX1 , TK))) ∧ δ (X0 , X) < ε), (6) where def φ [X, T] = ∃X0 (∀X1 (δ (X0 , X1 ) < ε _ (∃X2 (Π1 JX2 , TK ∧ δ (X2 , X1 ) < ε)∧ ∃X2 (Π2 JX2 , TK ∧ δ (X2 , X1 ) < ε))) ∧ δ (X0 , X) < ε), def (7) def Π1 [X0 ,Y0 , X1 ,Y1 , T] = 6 ∗ X1 = 6 ∗ X0 + (X0 − 3 ∗Y0 ) ∗ T, and Π2 [X0 ,Y0 , X1 ,Y1 , T] = 6 ∗Y1 = 6 ∗Y0 + (Y0 + 3 ∗ X0 ) ∗ T. However, we notice that, since Π1 and Π2 are closed and convex, φ can be simplified as: φ [X, T] ≡ ∃X0 (Π1 JX0 , TK ∧ Π2 JX0 , TK ∧ δ (X0 , X) < ε). (8) ψ[X] ≡ ∃T(T > 0 ∧ ∃X0 (Π1 JX0 , TK ∧ Π2 JX0 , TK ∧ δ (X0 , X) < ε)). (9) Similarly, ψ becomes: So we plugged this last formula in Formula 5 and used REDLOG [5] to test it. The formula turns out to be true (the result is computed within few seconds), proving our conjectures. Notice that we used Maxima to compute the exact coordinates of the points on the limit cycles since that computation does not require quantifier elimination. However, we could have used REDLOG. As far as h0, 0i is concerned it is immediate to prove through a first-order formula that it reaches points different from itself and, hence, it reaches the limit flow tube. Other interesting properties that automatically verified express, for instance, the fact that applying the sphere semantics there are points that cross the limit cycle (in both directions). This is quite natural since points closer than ε to the limit cycle get expanded and cross it. 6 Conclusions In this paper we have modeled a neural oscillator constructing a hybrid automaton whose components derive from the approximation of the continuous model presented in [19]. We have analyzed its behaviours considering the application of some approximation techniques for the introduction of noise, as already advocated in [19]. In particular, we focused on the approach based on the ε-semantics. The simulation based on the application of the ε-semantics has revealed the any point which begins its evolution from a distance of at least 2ε from the limit cycle, converges to a flow tube which possesses a diameter equal to 2ε and that includes the limit cycle. Due to size of the formulæ which compose the hybrid automaton and the growth of such formalæ introduced by the translation of the ε-semantics evaluations, a direct computation of the reachable set would have high complexity and eventually returns results of difficult interpretation. For this reason, we have reformulated the problem in form of a closed property which guarantees the convergence of any point towards the limit cycle of the modeled system. During the construction of the formula that describes the convergence to the limit cycle, some steps of simplification of the formulæ have been applied. In particular, we have reduced the complexities of translated formulæ, relying on the convexity of the sets characterized by some of their subformulæ. An interesting aspect to investigate is whether these simplification steps can be automatically performed. As future work, in order to analyze the behaviour of a group of neural oscillators, we plan to combine several hybrid automata and to study their evolutions always adopting ε-semantics. 72 Hybrid Automata and ε-Analysis on a Neural Oscillator References [1] R. Alur, C. Courcoubetis, N. Halbwachs, T. A. Henzinger, P.-H. Ho, X. Nicollin, A. Olivero, J. Sifakis & S. Yovine (1995): The Algorithmic Analysis of Hybrid Systems. Theoret. Comput. Sci. 138(1), pp. 3–34, doi:10.1016/0304-3975(94)00202-T. [2] A. F. Atiya & P. Baldi (1989): Oscillations and Synchronizations in Neural Networks: an Exploration of the Labeling Hypothesis. Int. J. Neural Syst. 1(2), pp. 103–124, doi:10.1142/S0129065789000025. [3] A. Casagrande, C. Piazza & A. Policriti (2009): Discrete Semantics for Hybrid Automata. Discrete Event Dyn. Syst. 19(4), pp. 471–493, doi:10.1007/s10626-009-0082-7. [4] A. Casagrande, C. Piazza, A. Policriti & B. Mishra (2008): Inclusion dynamics hybrid automata. Inform. and Comput. 206(12), pp. 1394–1424, doi:10.1016/j.ic.2008.09.001. [5] A. Dolzmann & T. Sturm (1997): REDLOG: computer algebra meets computer logic. SIGSAM Bull. 31(2), pp. 2–9, doi:10.1145/261320.261324. [6] H. B. Enderton (2001): A Mathematical Introduction to Logic, II edition. Harcourt/Academic Press. [7] M. Fränzle (1999): Analysis of Hybrid Systems: An Ounce of Realism Can Save an Infinity of States. In: Int. Workshop on Computer, Science, and Logic (CSL 99), LNCS 1683, Springer, pp. 126–140. [8] W. J. Freeman & C. A. Skarda (1985): Spatial EEG patterns, non-linear dynamics and perception: the neo-Sherringtonian view. Brain Res 357(3), pp. 147–175. [9] R. Ghosh & C. Tomlin (2001): Lateral Inhibition through Delta-Notch signaling: A Piecewise Affine Hybrid Model. In: Proc. of Hybrid Systems: Computation and Control (HSCC’01), LNCS 2034, Springer, pp. 232–246, doi:10.1007/3-540-45351-2 21. [10] A. Girard & G. J. Pappas (2007): Approximation metrics for discrete and continuous systems. IEEE Trans. Automat. Control 52(5), pp. 782–798, doi:10.1109/TAC.2007.895849. [11] C. M. Gray, P. Konig, A. K. Engel & W. Singer (1989): Oscillatory responses in cat visual cortex exhibit inter-columnar synchronization which reflects global stimulus properties. Nature 338(6213), pp. 334–337, doi:10.1038/338334a0. [12] R. Grosu, G. Batt, F. Fenton, J. Glimm, C. Guernic, S. Smolka & E. Bartocci (2011): From Cardiac Cells to Genetic Regulatory Networks. In: Proc. of Computer Aided Verification (CAV’11), LNCS 6806, Springer, pp. 396–411, doi:10.1007/978-3-642-22110-1 31. [13] T. A. Henzinger, P. W. Kopke, A. Puri & P. Varaiya (1995): What’s decidable about hybrid automata? In: Proc. of ACM Symposium on Theory of Computing (STOCS’95), pp. 373–382, doi:10.1145/225058.225162. [14] H. de Jong, J.-L. Gouzé, C. Hernandez, M. Page, T. Sari & J. Geiselmann (2004): Qualitative simulation of genetic regulatory networks using piecewise-linear models. Bulletin of Math. Biology 66, pp. 301–340, doi:10.1016/j.bulm.2003.08.010. [15] P. Prabhakar, V. Vladimerou, M. Viswanathan & G. E. Dullerud (2009): Verifying Tolerant Systems Using Polynomial Approximations. In: Proceedings of the 2009 30th IEEE Real-Time Systems Symposium, RTSS ’09, IEEE Computer Society, Washington, DC, USA, pp. 181–190, doi:10.1109/RTSS.2009.28. [16] S. Ratschan (2010): Safety Verification of Non-linear Hybrid Systems Is Quasi-Semidecidable. In: Theory and Applications of Models of Computation (TAMC10), lncs 6108, springer, pp. 397–408, doi:10.1007/9783-642-13562-0 36. [17] L. R. Silva, Y. Amitai & B. W. Connors (1991): Intrinsic oscillations of neocortex generated by layer 5 pyramidal neurons. Science 251(4992), pp. 432–5, doi:10.1126/science.1824881. [18] M. Steriade & R. R. Llinás (1988): The functional states of the thalamus and the associated neuronal interplay. Physiological reviews 68(3), pp. 649–742. [19] A. Tonnelier, S. Meignen, H. Bosch & J. Demongeot (1999): Synchronization and desynchronization of neural oscillators. Neural Networks 12(9), pp. 1213 – 1228, doi:10.1016/S0893-6080(99)00068-4.
5cs.CE
arXiv:1612.05994v1 [math.ST] 18 Dec 2016 ALGEBRAIC PROBLEMS IN STRUCTURAL EQUATION MODELING MATHIAS DRTON Abstract. The paper gives an overview of recent advances in structural equation modeling. A structural equation model is a multivariate statistical model that is determined by a mixed graph, also known as a path diagram. Our focus is on the covariance matrices of linear structural equation models. In the linear case, each covariance is a rational function of parameters that are associated to the edges and nodes of the graph. We statistically motivate algebraic problems concerning the rational map that parametrizes the covariance matrix. We review combinatorial tools such as the trek rule, projection to ancestral sets, and a graph decomposition due to Jin Tian. Building on these tools, we discuss advances in parameter identification, i.e., the study of (generic) injectivity of the parametrization, and explain recent results on determinantal relations among the covariances. The paper is based on lectures given at the 8th Mathematical Society of Japan Seasonal Institute. Contents Part 1. 2. 3. I. Structural Equation Models and Questions of Interest Motivation Linear Structural Equation Models Questions of Interest Part 4. 5. 6. II. Treks, Subgraphs and Decomposition Trek Rule Induced Subgraphs and Principal Submatrices Graph Decomposition 2 2 4 7 13 13 15 17 Part III. Parameter Identification 7. Global Identifiability 8. Generic Identifiability 21 21 23 Part IV. Relations Among Covariances 9. Implicitization 10. Conditional Independence 11. Trek Separation 12. Verma Constraints 29 29 31 32 34 13. Conclusion References 35 36 Date: September 21, 2016. Key words and phrases. Algebraic statistics, covariance matrix, Gaussian distribution, graphical model, Gröbner basis, structural equation model. 1 2 MATHIAS DRTON Part I. Structural Equation Models and Questions of Interest 1. Motivation The following example serves well to introduce the statistical models we will consider. It features the simplest instance of what is known as an instrumental variable model. An empirical study that shows this type of model ‘in action’ can be found in [29]. Example 1.1. Does a mother’s smoking during pregnancy harm the baby? To answer this question researchers conduct a study in which they record, for a sample of pregnancies, the baby’s birth weight and the average number of cigarettes the mom smoked per day during the first trimester. The researchers observe a significant negative correlation between the birth weight and smoking and are tempted to conclude that smoking has a negative effect on the baby’s health, with an increase in the number of cigarettes smoked leading to lower birth weight. The cigarette companies are not suprised by this finding. They argue, however, that smoking does not harm baby. Instead, heavier smoking is merely a reflection of underlying factors that are the true causes of low birth weight. Such confounding variables could, for instance, be of socio-economic nature. In the context of the smoking-lung cancer debate, prominent Statistician Ronald Fisher liked to argue that correlations can be attributed to unobserved variables of genetic nature [59]. Familiar with this type of counter-argument, the researchers cleverly recorded a third variable: The tax rate on tobacco products in the local jurisdictions of the mothers in the sample. It is not unreasonable to assume that the tax rate does not have a direct effect on the baby’s health. If there is then variation in the tax rate and higher taxes have an effect on the amount of smoking, then the effect that smoking has on birth weight can be estimated in a model that allows for the presence of unobserved confounders, as we will see shortly. The above narrative suggests a number of cause-effect relations, as well as the absence thereof. Qualitatively these are summarized in the graph in Figure 1.1. The variables in play are the nodes of the graph and cause-effect relationships are indicated as directed edges. The variable U represents a confounding variable and is unobserved, which we emphasize by coloring its edges in red. Structural equation models turn the qualitative descriptions of causes and effects into quantified functional relationships. In this article, the functional relationships will always be linear. The linear structural equation model for the present example is based on the following system of structural equations: (1.1) X1 = λ01 (1.2) X2 = λ02 + λ12 X1 + λu2 U + ε2 , (1.3) X3 = λ03 + λ23 X2 + λu3 U + ε3 , (1.4) U = λ0u + ε1 , + εu . Here, the error terms ε1 , ε2 , ε3 , εu are independent random variables with zero mean. The eight coefficients λ01 , λ02 , λ03 , λ0u , λ12 , λ23 , λu2 , and λu3 are unknown parameters. Equation (1.1) indicates that variable X1 , the tax rate, has expectation λ01 , from which it deviates according to the distribution assumed for ε1 . The analogous statement for the unobserved confounder U is made in (1.4). In (1.2), the amount of smoking, denoted X2 , is modeled to be a linear function of the tax STRUCTURAL EQUATION MODELS 3 U : Confounder X1 : Tax Rate X2 : Mom’s Smoking X3 : Baby’s Weight Figure 1.1. Directed graph representing an instrumental variable model. rate and independent noise. Similarly, (1.3) introduces birth weight, denoted X3 , as a noisy linear function of smoking. The quantity of primary interest is the coefficient λ23 that quantifies the relationship between smoking and birth weight. Using data, we can estimate the joint distribution and, in particular, the covariance matrix of the three observed variables X1 , X2 and X3 . Because the error terms are independent and have zero means, the covariance between X3 and X1 is (1.5) Cov[X1 , X3 ] = λ23 Cov[X1 , X2 ]. Hence, as long as Cov[X1 , X2 ] 6= 0, statistical inference about λ23 may be based on the ratio of the two covariances in (1.5). In some applications of structural equation models latent (that is, unobserved) variables are of direct interest. For instance, concepts such as intelligence or depression in psychology are of this nature and measured only indirectly through other variables such as exam results or answers in questionnaires. While problems with explicit latent variables are ubiquitous [5], we will focus on models in which the effects of latent variables are summarized and represented merely in terms of correlations among the error terms in structural equations. This representation of dependence induced by latent variables is discussed in detail in [33, 44, 49, 50, 71]. Example 1.2. We take up the instrumental variable model from Example 1.1. The effects of the confounding variable U can be summarized by absorbing U into the error terms for equations (1.2) and (1.3). Define (1.6) ε̃2 = λu2 U + ε2 , ε̃3 = λu3 U + ε3 . Retaining only the equations for the observed variables X1 , X2 , and X3 , we are left with the equation system: (1.7) X1 = λ01 + ε1 , (1.8) X2 = λ02 + λ12 X1 + ε̃2 , (1.9) X3 = λ03 + λ23 X2 + ε̃3 . However, and this is the significance of the unobserved variable U , we have now correlated error terms because (1.10) ω23 := Cov[ε̃2 , ε̃3 ] = Cov[λu2 U + ε2 , λu3 U + ε3 ] = λu2 λu3 Var[U ] 6= 0. In the sequel, we will focus on models that are given by equations such as (1.7)(1.9), with one equation for each observed variable but error terms that may be correlated. Graphically, such models may be represented by a mixed graph that features directed edges to encode which variables appear in each structural equation and bidirected edges that indicate possibly nonzero correlations between error terms. The mixed graph for the model given by (1.7)-(1.9) is depicted in Figure 1.2, which shows the unknown parameters as weights for the edges. At the nodes, we 4 MATHIAS DRTON ω23 ω11 X1 : Tax rate λ12 ω22 X2 : Mom’s smoking λ23 ω33 X3 : Baby’s weight Figure 1.2. Mixed graph representing an instrumental variable model. show the variances of the error terms, namely, ω11 = Var[ε1 ], ω22 = Var[ε̃2 ], and ω33 = Var[ε̃3 ]. In the statistical literature, the mixed graph for a structural equation model is also known as a path diagram. The ratio Cov[X2 , X3 ]/ Var[X2 ] is the regression coefficient when predicting X3 from X2 . We have (1.11) Cov[X2 , X3 ] ω23 = λ23 + . Var[X2 ] Var[X2 ] Hence, linear regression predicting X3 from X2 only estimates the coefficient of interest if ω23 = 0, as is the case when X2 and X3 do not depend on the latent variable U . When ω23 6= 0, the relation from (1.5), which involves all three variables, is needed to recover λ23 . The remainder of this paper is organized as follows. Section 2 introduces linear structural equation models in full generality. We then formulate questions of statistical interest and the algebraic problems they correspond to (Section 3). Next, we examine the interplay between covariance matrices and mixed graphs. We treat the so-called trek rule (Section 4) and review useful results on subgraphs and graph decomposition (Sections 5 and 6). In Sections 7 and 8, we dive deeper into parameter identifiability, which here means the question of whether a coefficient of interest can be recovered from the covariance matrix of the observed variables. Finally, we discuss relations among the entries of the covariance matrix (Sections 9-12). 2. Linear Structural Equation Models Let ε = (εi : i ∈ V ) be a random vector indexed by a finite set V . Define a new random vector X = (Xi : i ∈ V ) as the solution to the system of structural equations (2.1) X = ΛT X + ε, where Λ = (λij ) ∈ RV ×V is a matrix of unknown parameters. Suppose ε has covariance matrix Ω = (ωij ) = Var[ε], so Ω is a positive definite matrix whose entries are again unknown parameters. Write I for the identity matrix. If I − Λ is invertible, then the linear system in (2.1) is solved uniquely by X = (I − Λ)−T ε, which has covariance matrix (2.2) Var[X] = (I − Λ)−T Ω(I − Λ)−1 =: φ(Λ, Ω). Interesting settings are obtained by restricting the support of Λ and Ω, as is the case in our motivating example. STRUCTURAL EQUATION MODELS 5 Example 2.1. Consider the setup from Example 1.2. If the equation system from (1.7)-(1.9) is written in vector form as in (2.1), then the coefficient matrix is   0 λ12 0 Λ = 0 0 λ23  . (2.3) 0 0 0 The error covariance matrix is (2.4)  ω11 Ω = Var[ε] =  0 0 0 ω22 ω23  0 ω23  . ω33 From (2.2), the covariance matrix of X = (X1 , X2 , X3 ) is found to be   ω11 ω11 λ12 ω11 λ12 λ23 , ω22 + ω11 λ212 ω23 + λ23 σ22 (2.5) Var[X] =  ω11 λ12 ω11 λ12 λ23 ω23 + λ23 σ22 ω33 + 2ω23 λ23 + λ223 σ22 where σ22 denotes the (2, 2) entry of Var[X]. The relation from (1.5) can be confirmed from the (1, 2) and (2, 3) entry of Var[X]. Restrictions on the support of a matrix naturally correspond to a graph. Specifically, we adopt mixed graphs because we are dealing with two matrices, Λ and Ω, whose rows and columns are indexed by the same set V . In structural equation modeling, this point of view originated in the work of Sewall Wright [72, 73]. A mixed graph with vertex set V is a triple G = (V, D, B) where D, B ⊆ V × V are two sets of edges. The set D comprises ordered pairs (i, j) that we also denote by i → j to visualize the fact that such a pair encodes a directed edge pointing from i to j. Then i is the tail and j is the head of the egde. The pairs in B are unordered pairs {i, j} that encode bidirected edges that we also denote by i ↔ j. These edges have no orientiation, and i ↔ j ∈ B if and only if j ↔ i ∈ B. It will be convenient to call both endpoints i and j heads of i ↔ j. In our context, neither the bidirected part (V, B) nor the directed part (V, D) contain loops, that is, i → i 6∈ D and i ↔ i 6∈ B for all i ∈ V . If (V, D) does not contain any directed cycles i → . . . → i, then the mixed graph G is said to be acyclic. Let RD be the set of real V × V -matrices Λ = (λij ) with support in D, that is,  (2.6) RD = Λ ∈ RV ×V : λij = 0 if i → j ∈ /D . D Define RD reg to be the subset of matrices Λ ∈ R for which I − Λ is invertible. If G is acyclic, then there is a permutation of V that makes I − Λ unit upper triangular such that det(I − Λ) = 1 for all Λ ∈ RD and thus RD = RD reg . Similarly, let PD V be the cone of positive definite symmetric V × V -matrices Ω = (ωij ), and define PD(B) to be the subcone of matrices supported over B, that is,  (2.7) PD (B) = Ω ∈ PD V : ωij = 0 if i 6= j and i ↔ j ∈ /B . Taking the error vector ε to be Gaussian (or in other words, to follow a multivariate normal distribution), we arrive at the following definition of a statistical model for the random vector X that solves (2.1). Readers looking for background such as the fact that linear transformations of a Gaussian random vector are Gaussian may consult a textbook on multivariate statistics, e.g., [2]. 6 MATHIAS DRTON λ13 1 λ12 3 λ23 2 λ34 ω24 4 Figure 2.1. An acyclic mixed graph known as the Verma graph. Definition 2.1. The linear structural equation model given by a mixed graph G = (V, D, B) is the family of all multivariate normal distributions on RV with covariance matrix in the set  MG = (I − Λ)−T Ω(I − Λ)−1 : Λ ∈ RD reg , Ω ∈ PD (B) . The covariance parametrization of the model is the map φG : RD × PD(B) → PD V , (Λ, Ω) 7→ (I − Λ)−T Ω(I − Λ)−1 , for which we define the fiber of a pair (Λ, Ω) ∈ RD reg × PD (B) to be the preimage  ′ ′ ′ ′ (2.8) FG (Λ, Ω) = (Λ , Ω ) ∈ RD reg × PD (B) : φG (Λ , Ω ) = φG (Λ, Ω) . As defined, a linear structural equation model does not impose any restrictions on the mean vector of the normal distributions. Consequently, the mean vector plays no role in our discussion. For instance, in maximum likelihood estimation we may assume without loss of generality that the mean vector is zero. Other questions we consider will directly concern the covariance matrices of the model. Therefore, we may safely identify a linear structural equation model with its set of covariance matrices MG . On occasion, we will simply refer to MG as the model. Leaving statistics out of the picture, our interest is in the maps φG , their fibers FG and their images MG . Algebra comes into play naturally. Proposition 2.1. For any mixed graph G, the map φG is a rational map whose image MG and fibers FG (Λ, Ω) are semi-algebraic sets. The map φG is a polynomial map if and only if G is acyclic. Proof. That φG is rational follows from Cramer’s rule for matrix inversion. The domain of φG is a semi-algebraic set and, thus, the fibers FG (Λ, Ω) are semi-algebraic as well. The Tarski-Seidenberg theorem implies that MG is semi-algebraic. If G = (V, D, B) is acyclic, then det(I − Λ) = 1 for all Λ ∈ RD . Consequently, the entries of (I − Λ)−1 are polynomial in Λ. If G is not acyclic, then det(I − Λ) is a non-constant polynomial. The Leibniz formula shows that its terms correspond to collections of disjoint directed cycles in the graph; compare Theorem 1 in [41].  Example 2.2. The mixed graph G = (V, D, B) in Figure 2.1 encodes the structural equations X1 = λ01 + ε1 , X2 = λ02 + λ12 X1 + ε2 X3 = λ03 + λ13 X1 + λ23 X2 + ε3 X4 = λ04 + λ34 X3 + ε4 . STRUCTURAL EQUATION MODELS 7 Only the errors ε2 and ε4 may be dependent and the error covariance matrix is   ω11 0 0 0  0 ω22 0 ω24  . Ω =   0 0 ω33 0  0 ω24 0 ω44 Substracting the coefficient matrix from the identity gives   1 −λ12 −λ13 0 0 1 −λ23 0   I −Λ =  0 0 1 −λ34  0 0 0 1 with det(I − Λ) = 1 and inverse  1 λ12 0 1 −1 (I − Λ) =  0 0 0 0 λ13 + λ12 λ23 λ23 1 0  λ13 λ34 + λ12 λ23 λ34  λ23 λ34 .  λ34 1 To illustrate the form of the map φG , we display the coordinate function (2.9) φG (Λ, Ω)24 = λ12 λ13 λ34 ω11 + λ212 λ23 λ34 ω11 + λ23 λ34 ω22 + ω24 . 3. Questions of Interest Structural equation models are used to empirically estimate, test and possibly discover cause-effect relationships among a set of variables. In estimation and testing, the underlying graph is given. In discovery, we seek to estimate the underlying graph, or in other words, perform model selection. In this section we give a broad overview of algebraic problems that arise in the context of these statistical tasks. Only some of the problems are treated in the remainder of the paper, in which we focus on parameter identifiability and polynomial relations between covariances. 3.1. Parameter identification. When considering the model given by the mixed graph G = (V, D, B), a first question is whether the effects of interest are identifiable, that is, whether they are determined by the joint distribution of the observed variables. The importance of the question is clear: The joint distribution is what can be estimated from data. In our setting of linear and Gaussian models, the problem is equivalent to deciding whether the coefficients λij in the linear structural equations can be recovered from the covariance matrix of the variables. Different notions of parameter identifiability translate into related but slightly different algebraic problems. The most stringent identifiability property of a model is to have all of its coefficients λij , i → j ∈ D, identifiable. In this case, we seek to answer the following: Question 3.1. Is the map φG is injective? Injectivity of φG can be decided efficiently, as we will discuss in Section 7. However, injectivity can be too strong of a requirement because all fibers are required to be singletons with FG (Λ, Ω) = {(Λ, Ω)}. Indeed, some interesting examples have fibers that are not singletons. 8 MATHIAS DRTON Example 3.1. The map φG fails to be injective when G is the graph for the instrumental variable model from Example 1.2. The relation from (1.5) shows that FG (Λ, Ω) = {(Λ, Ω)} if λ12 6= 0. If λ12 = 0, however, then the fiber is infinite. Hence, all model parameters are identifiable as long as λ12 6= 0. In the context of Example 1.2, this requires making an argument that higher tax rates impact the amount of smoking. In the example just given, FG (Λ, Ω) = {(Λ, Ω)} for generic choices of (Λ, Ω) ∈ RD reg × PD(B). In this case, we call φG generically injective. We are led to: Question 3.2. Is the map φG is generically injective? It turns out that generic injectivity is more difficult to decide. The computational complexity of the problem has not yet been determined. In Section 8, we review methods to decide whether φG is generically injective as well as methods to decide when the fibers are generically infinite. When φG is not generically injective, its generic fibers may be discrete sets. This property is known as local identifiability in the statistical literature. We will instead speak of φG being generically finite-to-one to highlight that in our case a discrete fiber is in fact finite because φG is rational. By the inverse function theorem, the question of whether φG is generically finite-to-one is the same as: Question 3.3. Does the Jacobian of φG have full column rank? The fiber FG (Λ, Ω) is defined by the equation system φG (Λ′ , Ω′ ) = φG (Λ, Ω). These equation systems have a generic number of complex solutions (i.e., the free entries of Λ and Ω are allowed to be complex numbers). Definition 3.1. The map φG is algebraically k-to-one if the equation systems defining its fibers generically have k complex solutions. We call the number k the algebraic degree of identifiability of G. The degree of identifiability may be determined by Gröbner basis methods (see Section 8). It is finite if and only if φG is generically finite-to-one. The main theorem in Section 7.3 shows that if φG is injective then its inverse is rational, which is the same as G having degree of identifiability one. Currently, there are no combinatorial results about when the degree is finite but larger than one. Example 8(b) in [34] has degree 3 but fibers whose cardinality over the reals is either one or three. To the author’s knowledge, no example has been discovered in which φG is generically injective over the reals but algebraically k-to-one for k ≥ 2. An important question that we will not address in detail is the identifiability of only a single parameter λij for a designated edge of interest i → j ∈ D. This amounts to checking whether in every fiber the coefficient for the edge has only a single value. In other words, it must hold that λ′ij = λ′′ij whenever (Λ′ , Ω′ ) and (Λ′′ , Ω′′ ) are in the same fiber. In Example 1.2, the fiber of a pair (Λ, Ω) with λ12 = 0 is infinite but all pairs (Λ′ , Ω′ ) such a fiber have λ′12 = 0. Two well-known graphical methods for identifying a single edge coefficient are the back-door and the front-door criterion [49]; see also [11, 36]. 3.2. Model dimension. Statistical tests may be used to assess whether a model is compatible with empirical data. At an intuitive level, such tests are based on computing a distance between data and model and comparing this distance to typical distances that are obtained when data are generated from a distribution in STRUCTURAL EQUATION MODELS 9 the model. For linear Gaussian models, a test can be thought off as assessing the distance between the empirical (or sample) covariance matrix and the model MG . Recall that we have defined MG as the set of covariance matrices. The challenging part of designing a statistical test is to quantify, in a probabilistic manner, what typical distances between data and model are. Many procedures rely on asymptotic approximations that are obtained by letting the number of data points grow to infinity. Under regularity conditions, limiting distribution theory leads to consideration of so-called chi-square distributions, which are indexed by an integer parameter. In our context, when testing the model given by the mixed graph G = (V, D, B), the chi-square parameter is set equal to the codimension of MG , where we think of MG as embedded in the space of symmetric matrices. This gives concrete statistical motivation for: Question 3.4. What is the dimension of MG ? The model MG is parametrized by the coefficients and covariances associated with the edges in D and B as well as the variances associated with the nodes in V . Being a subset of the space of V × V symmetric matrices, MG has expected dimension   |V |(|V | + 1) . min |V | + |D| + |B|, 2 The term |D| + |V | + |B| is the count of nodes and edges in G. Since MG is the image of φG , its actual dimension is equal to the rank of the Jacobian of φG . A review of the connection between dimension and Jacobian in a statistical context is given in [38]. Question 3.4 is tied to parameter identifiability, most directly to Question 3.3. If φG is generically finite-to-one, then MG has the expected dimension |V | + |D| + |B|. 3.3. Covariance equivalence. Different graphs may induce the same statistical model. For example, take V = {1, 2}, and let G1 be the graph with the single edge 1 → 2. Let G2 and G3 be the graphs with single edge 1 ← 2 and 1 ↔ 2, respectively. Then MG1 = MG2 = MG3 as each model is easily seen to be equal to the entire cone of positive definite 2 × 2 matrices. From an applied perspective, two different graphs G and G′ encode different scientific/causal hypotheses. If MG = MG′ , then the two hypotheses cannot be distinguished based on data from a linear and Gaussian structural equation model. It is thus useful to be able to decide whether two graphs G and G′ are covariance equivalent, that is, we would like to be able to answer: Question 3.5. When do two maps φG and φG′ have the same image? Existing results addressing this questions make comparisons between relations among the entries of the matrices in each model, and we record: Question 3.6. What are the algebraic relations among the coordinates of φG ? Such relations are also of interest for statistical tests that assess whether the model given by G is compatible with available data; see, e.g., [6, 11, 17]. We review results on relations among the covariances in Sections 9-12. An important role is played by determinants that represent probabilistic conditional independence in a Gaussian random vector. We note that models can, in principle, also be distinguished using inequality constraints. However, as less is know about inequalities, 10 MATHIAS DRTON we do not treat them here. Examples of models with latent variables for which a full semi-algebraic description is available can be found in [25, 53]. Remark. As defined above, covariance equivalence is based on data that is observational, meaning that it is collected by merely observing the considered physical system. The situation is different when experimental data is available, meaning, that data is collected in different settings in which the system is subject to various experimental interventions. We will not treat such interventional data in this paper. Interested readers may find discussions of the problem in [43, 49, 57]. Similarly, even for observational data, questions of equivalence differ from Question 3.5 in non-linear models or linear models with Gaussian errors [26, 54]. 3.4. Maximum likelihood. The parameters of linear structural equation models are most commonly estimated using the technique of maximum likelihood. Suppose we observe a sample X (1) , . . . , X (n) drawn independently from the multivariate normal distribution with mean vector µ and covariance matrix Σ, which we denote by N (µ, Σ). The joint distribution of the random vectors X (1) , . . . , X (n) is the n-fold product of N (µ, Σ). The likelihood of the sample is the value of the joint density of the product distribution at (X (1) , . . . , X (n) ). The likelihood function is the function mapping the pair (µ, Σ) to the likelihood of the sample. The maximum likelihood estimator (MLE) of (µ, Σ) under the model given by a mixed graph G is the maximizer of the likelihood function when restricting Σ to be in MG . Define the sample mean vector and the sample covariance matrix as n 1 1 X (i) X and Sn = (X (i) − X̄n )(X (i) − X̄n )T , (3.1) X̄n = n i=1 n respectively. It is convenient to treat the likelihood function on the log-scale. With an additive constant omitted and n/2 divided out, the log-likelihood function is  (µ, Σ) 7→ − log det(Σ) − trace Σ−1 Sn − (X̄n − µ)T Σ−1 (X̄n − µ). Because the considered models place no constraint on the mean vector, its MLE is always X̄n . The MLE of Σ solves the problem of maximizing the function  (3.2) ℓ(Σ) = − log det(Σ) − trace Σ−1 Sn subject to Σ ∈ MG . Using the covariance parametrization, the MLE is found by maximizing ℓ ◦ φG . A key problem is then understanding the existence and uniqueness of the MLE. We record: Question 3.7. For which sample covariance matrices Sn does the likelihood function ℓ ◦ φG achieve its maximum? Graphical models theory solves Question 3.7 when G = (V, D, B) is an acyclic digraph, i.e., has B = ∅ and D without directed cycles [46]. More generally, it is well known that ℓ ◦ φG is bounded when Sn is positive definite but this is not necessary [32]. An issue that is not well explored is the fact that even if ℓ ◦ φG is bounded it may fail to achieve its maximum as the model MG need not be closed. For instance, the model in Example 3.3 is not closed. We remark that Question 3.7 is closely related to a positive definite matrix completion problem that arises in ML estimation for other types of graphical models [9, 63, 67]. In some models, the MLE is known to admit a closed-form expression as a rational function of the data. Such models have maximum likelihood (ML) degree equal to one, in the sense of the following: STRUCTURAL EQUATION MODELS 1 λ12 2 3 λ43 11 4 Figure 3.1. Mixed graph for a bivariate seemingly unrelated regressions model. Question 3.8. The MLE of Σ in model MG is an algebraic function of the data. What is the degree of this function? An introduction to the notion of ML degree is given in [21, Chapter 2]. Here, we merely not that the ML degree is one when G is an acyclic digraph. More general models may have higher ML degree and a log-likelihood function with more than one local maximum. We exemplify this for a model discussed in detail in [19]. Example 3.2. Suppose we have data with sample covariance matrix X1 X1 Sn = X2 X3 X4 X2 X3 8 −5  −5 27   10 4 3 49 10 4 21 24  X4  3 49  . 24  114 The matrix is positive definite such that the log-likelihood function ℓ from (3.2) is bounded above on the entire cone of positive definite matrices. More precisely, ℓ has compact level sets, that is, for any constant c ∈ R the set of positive definite matrices Σ with ℓ(Σ) ≥ c is compact [2]. Let G be the graph depicted in Figure 3.1. It is not difficult to show that the parametrization φG admits a rational inverse. Let Σ = (σij ) satisfy Σ = φG (Λ, Ω) with Λ = (λij ) ∈ RD and Ω = (ωij ) ∈ PD (B). Then σ12 σ34 λ12 = (3.3) , λ43 = , σ11 σ44 and the entries of Ω = (I − Λ)T Σ(I − Λ) are rational functions of Σ as well. All the rational functions are defined on the entire cone of positive definite matrices because σ11 , σ44 > 0. It is also clear that the considered map φG is proper, that is, compact subsets of the positive definite cone have compact preimages under φG . It follows that ℓ ◦ φG has compact level sets and, thus, achieves its maximum on the open set RD × PD(B). The critical points of ℓ ◦ φG satisfy a rational equation system, in which the determinant of φG (Λ, Ω) appears in the denominator. Since the directed part of G is acyclic the determinant is equal to the determinant of Ω. Clearing the denominator yields a polynomial equation system. Saturating the system with respect to the determinant removes infeasible solutions with det(Ω) = 0. Computing a lexicographic Gröbner basis after the saturation shows that the critical points (Λ, Ω) solve the equation 10583160 λ512 + 43115307 λ412 + 72738452 λ312 + 55482894 λ212 + 8437660 λ12 − 4703765 = 0. All other entries of Λ and also Ω solve linear equations whose coefficients depend on λ12 and the data. We conclude that the MLE of Σ is an algebraic function of 12 MATHIAS DRTON 1 3 4 2 Figure 3.2. Mixed graph of a model with two instruments. degree 5. We note that the displayed equation for λ12 has three real roots and, thus, is not solvable by radicals. 3.5. Model singularities. As noted in Section 3.2, the distributions of test statistics are frequently approximated using asymptotic theory. For so-called likelihood ratio tests, this asymptotic theory can be thought of as assessing infinitesimal distances between a positive semidefinite data matrix and the given model MG . The data matrix is generated from a distribution that corresponds to a particular point in MG . At a smooth point of MG , the distribution of the infinitesimal distance is given by a chi-square distribution which is the distribution of the distance between a Gaussian random vector and a linear space. At singular points, the distribution is determined by the tangent cone at the considered point [15]. Singularities also impact other approaches such as Wald tests [24], and it is important to clarify: Question 3.9. Is the image of φG a smooth manifold? If not, what are the tangent cones of the image? We do not address the question explicitly in this paper. However, whenever φG is injective (see Section 7) its image is smooth. Indeed, when φG is injective it has a rational inverse whose domain of definition includes the cone of all positive definite matrices [16]. The next example illustrates that not all models are smooth. Example 3.3. Consider the mixed graph G = (V, D, B) from Figure 3.2. Let Σ ∈ R4×4 be a positive definite matrix. Define the matrix −1 Σ{3,4}.{1,2} = Σ{3,4},{1,2} Σ{1,2},{1,2} , and the Schur complement Σ{3,4},{3,4}.{1,2} = Σ{3,4},{3,4} − Σ{3,4},{1,2} Σ{1,2},{1,2} Change coordinates to the triple of 2 × 2 matrices −1 Σ{1,2},{3,4} .  Σ{1,2},{1,2} , Σ{3,4}.{1,2} , Σ{3,4},{3,4}.{1,2} . If Σ = φG (Λ, Ω) for Λ = (λij ) ∈ RD and Ω = (ωij ) ∈ PD (B), then   ω11 λ12 ω11 , Σ{1,2},{1,2} = λ12 ω11 ω22   λ13 λ23 Σ{3,4}.{1,2} = , λ13 λ34 λ23 λ34   ω33 ω34 + λ34 ω33 . Σ{3,4},{3,4}.{1,2} = ω34 + λ34 ω33 ω44 + 2λ34 ω34 + λ434 ω33 We observe that Σ is in the (topological) closure of MG if and only if Σ{3,4}.{1,2} is a matrix of rank at most one. In order for Σ to be in MG it must also hold that the second row of Σ{3,4}.{1,2} is zero only if the first row is zero. STRUCTURAL EQUATION MODELS 13 Geometrically, the closure of MG is equivalent to the product of two cones of positive definite 2×2 matrices and the set of 2×2 matrices of rank at most one. The latter set is singular at the zero matrix. For more details see the related example in [21, Exercise 6.4]. 3.6. Singularities of fibers. Finally, without going into any detail, we note that it is also of statistical interest to study the geometry of the fibers FG (Λ, Ω). In particular, the resolution of singularities of FG (Λ, Ω) is connected to asymptotic approximations in Bayesian approaches to model selection. Bayesian methods assess the goodness-of-fit of a model by integrating the likelihood function with respect to a prior distribution. In models with many parameters, the integration is over a high-dimensional domain and, thus, constitutes a difficult numerical problem. While carefully tuned Monte Carlo methods can be effective, it can also be useful to invoke asymptotics. For large sample size n, the integrated likelihood function behaves like a Laplace integral. Under regularity conditions, a Laplace approximation can yield accurate approximations that have been used in many applications [42]. However, the models considered here may also lead to singular Laplace integrals for which asymptotic approximations are more involved. Asymptotic expansions for singular Laplace integrals are well-studied [3]. The work of Sumio Watanabe brings the ideas to bear in the statistical context [70]. For several practically relevant settings, it has become tractable to determine or bound the real log-canonical threshold and its multiplicity, which determine how the integrated likelihood scales with the sample size n. This information can be used in model selection [18]. Computing real log-canonical thresholds for data generated under the distribution with covariance matrix φG (Λ, Ω) requires careful study of the singularities of the fiber FG (Λ, Ω). Bounds on the thresholds can be obtained from cruder information such as the dimension of the fiber. Part II. Treks, Subgraphs and Decomposition 4. Trek Rule In solving the problems from Section 3, it is desirable to exploit the connection between the covariance parametrization φG of a structural equation model and the underlying mixed graph G = (V, D, B). The trek rule that we present in this section makes the connection precise and is behind results that allow one to answer some of the questions we posed with efficient algorithms. It is natural to expect the covariance between random variables Xi and Xj to be determined by the semi-walks between the nodes i and j in the graph G. A semi-walk is an alternating sequence of nodes from V and edges from either D or B such that the endpoints of each edge are the nodes immediately preceding and succeeding the edge in the sequence. In other words, a semi-walk is a walk that uses bidirected or directed edges but is allowed to traverse directed edges in the ‘wrong direction’. As we will see, only special semi-walks contribute to the covariance. Definition 4.1. A trek τ from source i to target j is a semi-walk from i to j whose consecutive edges do not have any colliding arrowheads. In other words, τ is a sequence of the form (a) i ← il ← · · · ← i1 ← i0 ←→ j0 → j1 → · · · → jr → j, or (b) i ← il ← · · · ← i1 ←−−−− i0 −−−−→ j1 → · · · → jr → j. 14 MATHIAS DRTON A trek has a left- and a right-hand side, denoted left (τ ) and right (τ ), respectively. We have left (τ ) = {i0 , . . . , il , i} and right (τ ) = {j0 , . . . , jr , j} in case (a), and left (τ ) = {i0 , . . . , il , i} and right (τ ) = {i0 , j1 , . . . , jr , j} in case (b). In case (b) the top node i0 belongs to both sides. A trek τ from i to i may have no edges, in which case i is the top node, left (τ ) = right (τ ) = {i}. We call such a trek trivial. In an acyclic graph, if we think of directed edges pointing ‘downward’, then a trek takes us up and/or down a ‘mountain’. Any directed path is a trek, in which case |left (τ ) | = 1 or |right (τ ) | = 1 depending on the direction in which the path is traversed. A trek may contain the same node on both its left- and right-hand sides. If the graph contains a cycle, then the left- or right-hand side of τ may contain this cycle, possibly repeated. For a trek τ that contains no bidirected edge and has top node i0 , define a trek monomial as Y λkl . τ (Λ, Ω) = ωi0 i0 k→l∈τ For a trek τ that contains a bidirected edge i0 ↔ j0 , define the trek monomial as Y λkl . τ (Λ, Ω) = ωi0 j0 k→l∈τ The following rule expresses the covariance matrix Σ as a summation over treks [57, 72, 73]. We write T (i, j) for the set of all treks from i to j. Theorem 4.1 (Trek rule). Let G = (V, D, B) be any mixed graph, and let Λ ∈ RD and Ω ∈ PD (B). Then the covariances are X τ (Λ, Ω), i, j ∈ V. (4.1) φG (Λ, Ω)ij = τ ∈T (i,j) Some clarification is in order. If G is acyclic, then the summation in (4.1) is finite and yields a polynomial. If G contains a directed cycle, then the right-hand side of (4.1) may yield a power series as shown in Example 4.2 below. Under assumptions on the spectrum of Λ, the power series converges and yields the value of φG (Λ, Ω)ij . These spectral conditions are also needed to give cyclic models an interpretation of representing observation of an equilibrium [31, 45]. This said, it is also useful to treat the series as a formal power series. If so desired, a combinatorial description can also be given for a rational expression for φG (Λ, Ω)ij ; compare [14]. Proof of the trek rule. Writing (I − Λ)−1 = I + Λ + Λ2 + . . . , we observe that X Y ((I − Λ)−1 )ij = (4.2) λkl , τ ∈P(i,j) k→l∈τ where P(i, j) is the set of directed paths from i to j in G. If G is acyclic, then Λm = 0 for all m ≥ |V |, and the geometric series of matrices has only finitely many nonzero terms. If G is cyclic the geometric series is infinite and converges if and only if all eigenvalues of Λ have magnitude less than 1. Now, observe that a product of three entries of (I − Λ)−T , Ω, and (I − Λ)−1 , respectively, corresponds to the concatenation of two directed paths at a common top node or by joining them with a bidirected edge. A top node represents a diagonal entry of Ω, and a bidirected edge an off-diagonal entry of Ω.  STRUCTURAL EQUATION MODELS λ12 2 λ12 2 ω22 2 λ12 ω11 1 ω11 1 3 λ13 λ12 λ13 λ34 3 4 λ23 2 15 3 4 2 λ34 ω24 4 4 Figure 4.1. Four treks in the graph from Figure 2.1. Example 4.1. In Example 2.2, the coordinate function (φG )24 is a polynomial with four terms; see (2.9). The terms correspond to the four treks shown in Figure 4.1. Example 4.2. Let G be the graph from Figure 4.2, which contains the directed cycle 2 → 3 → 4 → 2. Due to this cycle, det(I − Λ) = 1 − λ23 λ34 λ42 . As an example of a coordinate of φG we select  2 1 λ12 λ23 λ34 ω11 + λ12 λ13 λ34 ω11 (λ23 λ34 λ42 + 1) φG (Λ, Ω)24 = 2 (1 − λ23 λ34 λ42 )  +λ213 λ234 λ42 ω11 + λ23 λ34 ω22 + λ234 λ42 ω33 + 2λ34 λ42 ω34 + λ42 ω44 . To understand how this rational formula relates to the trek rule, let us focus on the treks from 2 to 4 that use the bidirected edge 2 ↔ 4. There are then two treks for which both left and right side are self-avoiding paths, namely, τ1 : 2 ← 4 ↔ 3 → 4, τ2 : 2 ← 4 ← 3 ↔ 4. Both of these treks yield the same monomial and together contribute the term 2λ34 λ42 ω34 to (φG )24 . All other treks from 2 to 4 that use edge 2 ↔ 4 are obtained by inserting directed cycles into τ1 or τ2 . For instance, inserting one cycle on the left- and one on the right-hand side of τ1 gives 2 ← 4 ← 3 ← 2 ← 4 ↔ 3 → 4 → 2 → 3 → 4. The monomials associated with these treks are k λ34 λ42 ω34 (λ23 λ34 λ42 ) , k = 1, 2, . . . . The monomial for exponent k arises from k + 1 different treks; l = 0, 1, . . . , k cycles are inserted on the left, the remaining k − l cycles are inserted on the right. Hence, the contribution to (φG )24 made by all treks from 2 to 4 that use edge 2 ↔ 4 is 2 ∞ X k (k + 1)λ34 λ42 ω34 (λ23 λ34 λ42 ) k=0 = 2λ34 λ42 ω34 , (1 − λ23 λ34 λ42 )2 assuming that |λ23 λ34 λ42 | < 1. This explains one of the terms in the rational expression for (φG )24 . The reasoning for the other terms is analogous. 5. Induced Subgraphs and Principal Submatrices Suppose X = (Xi : i ∈ V ) follows the linear structural equation model given by mixed graph G = (V, D, B), so Var[X] = φG (Λ, Ω) for some Λ ∈ RD reg and Ω ∈ PD (B). Let A ⊆ V be a subset of nodes. Then the covariance matrix of the 16 MATHIAS DRTON 1 3 4 2 Figure 4.2. A cyclic mixed graph. subvector XA = (Xi : i ∈ A) is obtained by projecting to the relevant principal submatrix, that is, (5.1) Var[XA ] = φG (Λ, Ω)A,A . The resulting map (Λ, Ω) 7→ φG (Λ, Ω)A,A may be complicated, even when φG is not. Example 5.1. Suppose G = (V, D, ∅) is a directed graph with i → j ∈ D if and only if i ∈ / A and j ∈ A; the graph is thus bipartite. Then the image of φG (Λ, Ω)A,A is the set of covariance matrices of a factor analysis model with |V \ A| factors. Factor analysis models have complicated geometric structure, particularly when V \ A has more than two elements [8, 20, 23, 62]. Open problems remain even for |V \ A| = 1 when allowing additional directed edges among the nodes in A [47]. For a general mixed graph G = (V, D, B), let DA = D ∩ (A × A) be the set of directed edges with both endpoints in A. Similarly, let BA ⊂ B be the set of bidirected edges that have both endpoints in A. The subgraph induced by A is the mixed graph GA = (A, DA , BA ). Example 5.1 and also already Example 1.1 show that the covariance matrices obtained from φGA generally differ from those obtained by projecting φG onto the A×A submatrix. However, as we now emphasize, induced subgraphs are relevant in a special case. Define the set of parents of a node i ∈ V as pa(i) = {j ∈ V : j → i}. A set of nodes A ⊆ V is ancestral if i ∈ A implies that pa(i) ⊆ A. The terminology indicates that such a set contains all its ancestors, where an ancestor is a node with a directed path to some node in A. Ancestral sets are obtained by recursively removing sink nodes. We define node i to be a sink node of G if it is a sink of the directed part (V, D), that is, if all directed edges incident to i have their head at i. Theorem 5.1. Let G = (V, D, B) be a mixed graph, and let GA be the subgraph induced by an ancestral set A ⊂ V . Then for all Λ ∈ RD reg and Ω ∈ PD(B), we have φGA (ΛA,A , ΩA,A ) = [φG (Λ, Ω)]A,A . Proof. Let i, j ∈ A. By the trek-rule, the (i, j) entry of φG (Λ, Ω) is given by summing the monomials associated to treks from i to j in G. Because A is ancestral, a trek from i to j in G cannot leave A. Hence, the set of treks from i to j in G coincides with the set of treks from i to j in the subgraph GA . Applying the trek-rule to GA yields the claim.  Example 5.2. Take up Example 2.1. Clearly, node 3 is a sink in the graph from Figure 1.2. Hence, the set {1, 2} is ancestral. Inspecting the matrix displayed STRUCTURAL EQUATION MODELS 17 in (2.5), we see that removing the third row and column yields the matrix for the induced subgraph 1 → 2. 6. Graph Decomposition We now present a very useful graph decomposition, which allows one to address several questions of interest by considering smaller subgraphs. The decomposition for acyclic mixed graphs was introduced in work of Jin Tian [65, 66]. Here we formulate the natural extension to possibly cyclic mixed graphs. Consider partitioning the vertex set of a mixed graph G = (V, D, B) in two ways. The first partition is given by the connected components of the bidirected part (V, B). The second partition is obtained from the strongly connected components of the digraph (V, D). For two distinct nodes to belong to the same strongly connected component, there must be directed paths in either direction between them. Let C(G) be the finest common coarsening of the two partitions. Two nodes i 6= j are in the same block of C(G) if and only if they are connected by a path that uses only edges that are bidirected or part of some directed cycle. Note that G is acyclic if and only if all strongly connected components are singleton sets, in which case the blocks of C(G) are simply the connected components of the bidirected part (V, B). For a block C ∈ C(G), define [ V [C] := C ∪ pa(i) i∈C to be the union of the block and all parents of nodes in the block. Let D[C] = D ∩ (V [C] × C) be the set of directed edges with head in C. Let B[C] be the set of bidirected with both endpoints in C. Definition 6.1. The graphs G[C] = (V [C], D[C], B[C]), C ∈ C(G), form a decomposition of G, and we refer to them as the mixed components of G. A graph decomposition partitions the edge set. As we are working with mixed graphs both edge sets are partitioned in the decomposition. We note that the set V [C]\C is the set of sources nodes of G[C]. Here, we define a source node as a node that is a tail on all edges it is incident to, with the convention that both endpoints of a bidirected edge are heads. Example 6.1. The graph in Figure 6.1 has the bidirected components {1, 4}, {3}, and {2, 5}. The strong components of the directed part are {1}, {2, 3}, {4}, and {5}. The finest common coarsening of the two partitions is {{1, 4}, {2, 3, 5}}. The graph thus has two mixed components with vertex sets V [{2, 3, 5}] = {1, 2, 3, 4, 5} and V [{1, 4}] = {1, 2, 3, 4}. The mixed component with vertex set V [{2, 3, 5}] contains all edges with a head in {2, 3, 5}, and the second mixed component contains all edges with a head in {1, 4}. The components are depicted in Figure 6.1. → For C ∈ C(G), define the projection πC : RV ×V → RV [C]×V [C] by setting ( λij if j ∈ C, → πC (Λ)ij = 0 if j ∈ V [C] \ C. 18 MATHIAS DRTON 3 2 5 3 2 = 1 3 5 2 + 4 1 4 1 4 Figure 6.1. A mixed graph is decomposed into its two mixed components. ↔ Define a second map πC : RV ×V → RV [C]×V [C] by   ωij if i, j ∈ C, ↔ πC (Ω)ij = 1 if i = j ∈ V [C] \ C,   0 otherwise. It projects onto the C × C submatrix of Ω and then adds an identity matrix as a diagonal block over V [C] \ C. Define a subset of PD (B[C]) ⊂ RV [C]×V [C] as PD I (B[C]) = {Ω = (ωij ) ∈ PD (B[C]) : ωii = 1 if i ∈ V [C] \ C} . Then we have → : RD → RD[C] πC → and πC : PD (B) → PD I (B[C]) → ↔ because G[C] is a subgraph of G. With πC = (πC , πC ), we obtain the isomorphism Y RD[C] × PD I (B[C]). π = (πC )C∈C(G) : RD × PD (B) → C∈C(G) Example 6.2. Let G be the graph from Figure 6.1, which has C(G) = {{1, 4}, {2, 3, 5}}. A matrix in RD is of the form   0 λ12 λ13 0 0 0 0 λ23 λ24 λ25    0 λ34 0  Λ= . 0 λ32 0 0 0 0 λ45  0 0 0 0 0 Its projections are  0 0  → π{2,3,5} (Λ) =  0 0 0 λ12 0 λ32 0 0 λ13 λ23 0 0 0 0 0 0 0 0  0 λ25   0  , λ45  0  0 0  → π{1,4} (Λ) =  0 0 0 An error covariance matrix in PD (B) has the form   ω11 0 0 ω14 0  0 ω22 0 0 ω25    0 0 ω 0 0  Ω= 33  , ω14 0 0 ω44 0  0 ω25 0 0 ω55 0 0 0 0 0 0 0 0 0 0 0 λ24 λ34 0 0  0 0  0 . 0 0 STRUCTURAL EQUATION MODELS 19 and we have  1 0  ↔ (Ω) =  π{2,3,5} 0 0 0 0 ω22 0 0 ω25 0 0 ω33 0 0  0 0 0 ω25   0 0  , 1 0  0 ω55  ω11  0  ↔ (Ω) =  π{1,4}  0 ω14 0 0 1 0 0 0 0 ω14 0 0 1 0 0 ω44 0 0  0 0  0 . 0 1 With these preparation in place we may state Tian’s theorem as follows. Recall that PD V is our symbol for the cone of positive definite V × V matrices. Theorem 6.1. Let G = (V, D, B) be a mixed graph with mixed components G[C] = (V [C], D[C], B[C]) for C ∈ C(G). Then there is an invertible map τ such that the following diagram commutes: Q RD reg × PD (B) x π y D[C] C∈C(G) Rreg φG −−−−−−−−−−→ (φG[C] )C∈C(G) × PD I (B[C]) −−−−−−−−−→ Q PD V x τ y C∈C(G) PD V [C] In other words, τ ◦ φG = (φG[C] ◦ πC )C∈C(G) . Both τ and its inverse are rational Qm maps, defined on all of PD V and all of k=1 PD Vk , respectively. Below we give a linear algebraic proof that makes τ and its rational nature explicit. Alternatively, a proof in probabilistic notation could be given by generalizing the proof of [66, Lemma 1]. For the generalization, the nodes in the setup of [66] may be replaced by the strong components of the directed part (V, D). Theorem 6.1 is a very useful result as questions about φG can be answered by studying, one by one, the maps φG[C] for the mixed components. The fact that τ and τ −1 are rational is important. For instance, it allows one to obtain precise algebraic information about parameter identifiability in the sense of Definition 3.1. Corollary 6.1. The degree of identifiability of a mixed graph G is the product of the degrees of identifiability of its mixed components G[C], C ∈ C(G). In particular, φG is (generically) injective if and only if each φG[C] is so, for C ∈ C(G). Our proof of Theorem 6.1 is presented in terms of Cholesky decompositions. When applied to a Gaussian covariance matrix, the Cholesky decomposition corresponds to factoring the multivariate normal density into a product of conditional densities, which is the connection to the probabilistic setting of [66]. We begin by stating a lemma on uniqueness and sparsity in block-Cholesky decomposition. If C is a partition of a finite set V , then we write Diag(C) for the space of blockdiagonal matrices. So, A = (aij ) ∈ RV ×V is in Diag(C) if and only if aij = 0 whenever i and j are in distinct blocks of C. If we order the blocks of the partition as C = {C1 , . . . , Ck }, then we may define a space of strictly block upper-triangular matrices Upper(C), which contains A = (aij ) ∈ RV ×V if and only if aij = 0 whenever i ∈ Cu and j ∈ Cv with u ≥ v. Lemma 6.1. Let Σ ∈ PD V , and let C be a partition of V , with ordered blocks. (i) There exist unique matrices A ∈ Upper(C) and ∆ ∈ Diag(C) such that Σ = (I − A)−T ∆(I − A)−1 . The matrix ∆ has positive definite diagonal blocks. 20 MATHIAS DRTON (ii) Let C ′ be a second partition of V that is coarser than C. If Σ ∈ Diag(C ′ ), then the matrix A from (i) satisfies A ∈ Diag(C ′ ). Proof. (i) A block-LDL decomposition yields Σ = (I + L)∆(I + L)T for unique LT ∈ Upper(C) and ∆ ∈ Diag(C). Unit block upper-triangular matrices form a group and, thus, (I + L)−T = I − A for A ∈ Upper(C). (ii) The claim is a consequence of the way fill-in occurs when computing the Cholesky decomposition of a sparse matrix [68, Section 4.1].  Proof of Theorem 6.1. We first show that, for every block C ∈ C(G), there exists a map τC such that τC ◦ φG = φG[C] ◦ πC . Let Λ ∈ RD reg , Ω ∈ PD (B), and Σ = φG (Λ, Ω). Then the claim is that   −T  −1   0 ΛC,C 0 ΛC,C I 0 I− (6.1) . τC (Σ) = I − 0 ΩC,C 0 ΛC,C 0 ΛC,C Let C(D) be the partition of V given by the strongly connected components of (V, D). Order the blocks of C(D) topologically as W1 , . . . , Wk such that the existence of a directed path from a node in Wu to a node in Wv implies that v ≥ u. By Lemma 6.1(i), there are A ∈ Upper(C(D)) and ∆ ∈ Diag(C(D)) such that (6.2) Σ = (I − A)−T ∆(I − A)−1 Letting C = V [C] \ C, we define   −T  0 AC,C I (6.3) τC (Σ) = I − 0 0 AC,C 0 ∆C,C  I−  −1 0 AC,C . 0 AC,C If G is acyclic then Λ is strictly upper-triangular under a topological ordering and, thus, Λ ∈ Upper(C(D)). When G has directed cycles, then Λ is block uppertriangular but not strictly so. Hence, we consider the block-diagonal matrix ∆Λ = diag(I − ΛW,W : W ∈ C(D)), which is invertible because det(I − Λ) = det(∆Λ ) and Λ ∈ RD reg . Hence,     −1 −T −1 (6.4) Σ = (I − Λ)∆−1 ∆−1 (I − Λ)∆−1 . Λ Λ Ω∆Λ Λ Because ∆Λ , Ω ∈ Diag(C(G)), we have −1 Ω̃ = ∆−T ∈ Diag(C(G)). Λ Ω∆Λ Moreover, due to the block upper-triangular shape of Λ, Λ̃ = I − (I − Λ)∆−1 ∈ Upper(C(D)). Λ By Lemma 6.1(i) and (ii), there are ∆Ω ∈ Diag(C(D)) and U ∈ Upper(C(D)) ∩ Diag(C(G)) such that (6.5) Ω̃ = (I − U )−T ∆Ω (I − U )−1 . Combining (6.4) and (6.5) gives  −T  −1 (6.6) Σ = (I − Λ̃)(I − U ) ∆Ω (I − Λ̃)(I − U ) , where (I − Λ̃)(I − U ) = I − (Λ̃ + U − Λ̃U ) with Λ̃ + U − Λ̃U ∈ Upper(C(D)). By the uniqueness in Lemma 6.1(i), equations (6.2) and (6.6) imply that (6.7) ∆ = ∆Ω , (6.8) A = Λ̃ + U − Λ̃U. STRUCTURAL EQUATION MODELS 21 Since U ∈ Diag(C(G)), we have that     0 U(V \C)×C . = (6.9) UV ×C = UC×C UC×C Therefore, by (6.8), AC,C = Λ̃C,C + UC,C − Λ̃C,C UC,C , and we deduce that (6.10) I − AC,C = (I − Λ̃C,C )(I − UC,C ) and AC,C = Λ̃C,C (I − UC,C ). Moreover, (6.11) Ω̃C,C = (I − UC,C )−T ∆C,C (I − UC,C )−1 , which follows from (6.7) and the fact that       0  0 −1  = , (I − U ) V,C = (I − U )−1 C,C (I − UC,C )−1 which in turn follows from U being in Diag(C(G)). Substituting the formulas from (6.10) into (6.3) yields that (6.12) τC (Σ) =  I 0 −T  −Λ̃C,C I 0 0 I − UC,C I − Λ̃C,C     I −Λ̃C,C I I 0 × 0 0 ∆C,C 0 I − Λ̃C,C Using (6.11), we get that −T   I I 0 (6.13) 0 0 I − UC,C  I 0 ∆C,C 0 0 I − UC,C Recalling the definition of ∆Λ and Λ̃, we have     I −Λ̃C,C I −ΛC,C I (6.14) = 0 0 I − ΛC,C 0 I − Λ̃C,C −1 0 I − UC,C  I = 0 0 (∆−1 Λ )C,C −1 0 Ω̃C,C  . .  Plugging (6.13) and (6.14) into (6.12), we obtain the claim from (6.1). The entries of the matrices A and ∆ in (6.2) are rational functions of Σ that are defined on all of PD V . Hence, the same is true for the map τC defined in (6.3). The value of τC (Σ) uniquely determines the matrices AC,C , AC,C , and ∆C,C in (6.3). They are determined through a block LDL decomposition and, thus, rational functions of τC (Σ). Knowing the three matrices for all C ∈ C(G), we can form A and ∆ and recover Σ using (6.2). Hence, τ is invertible and the inverse is rational.  Part III. Parameter Identification 7. Global Identifiability This section discusses Question 3.1, which asks for a characterization of the mixed graphs G = (V, D, B) for which the map φG is injective. In the statistical literature a model with injective parametrization is also called globally identifiable. 22 MATHIAS DRTON Example 7.1. If G is the graph from Figure 3.1, then φG is injective. Indeed, the coefficients for the two directed edges of G satisfy σ11 λ12 = σ12 and σ44 λ43 = σ34 ; recall (3.3). Since every positive definite matrix Σ = (σij ) ∈ R4×4 has σ11 , σ44 > 0, these two equations always have a unique solution. Hence, all fibers FG (Λ, Ω) are singleton sets. In contrast, if G is the graph from Figure 1.2, then only generic fibers are singleton sets and φG is not injective; recall Example 3.1. Our first observation ties in with classical linear algebra. Theorem 7.1. If G = (V, D, ∅) is an acyclic digraph, then φG is injective and has a rational inverse. We give two proofs. The first one emphasizes the connection to Cholesky decomposition. Proof A. Suppose V = {1, . . . , m} is enumerated in reversed topological order such that i → j ∈ D implies that j < i. Then Λ is a strictly lower-triangular matrix, and φG (Λ, Ω) has matrix inverse (I − Λ)Ω−1 (I − Λ)T . This is the product of a unit lower-triangular matrix, a positive diagonal matrix and a unit upper-triangular matrix. We may compute I − Λ and Ω−1 by an LDL decomposition.  The second proof emphasizes the graphical nature of the problem and possible sparsity of Λ. It shows more explicitly that the inverse of φG is rational. Proof B. Letting Σ = (σij ) = φG (Λ, Ω), we have that (7.1) Σpa(i),i = Σpa(i),pa(i) Λpa(i),i because if j ∈ pa(i), then every trek from j to i ends with an edge k → i for k ∈ pa(i). Indeed, a trek from j to i for which this fails has to be a directed path from i to j. Adding the edge j → i to this path would yield a directed cycle. Similarly, every nontrivial trek from i to i begins and ends with a directed edge whose tail is a parent of i. Hence, (7.2) σii = ωii + ΛTpa(i),i Σpa(i),pa(i) Λpa(i),i . The matrix Σpa(i),pa(i) is a principal submatrix of the positive definite matrix Σ and, thus, invertible. Therefore, −1 Λpa(i),i = Σpa(i),pa(i) (7.3) Σpa(i),i , −1 ωii = σii − Σi,pa(i) Σpa(i),pa(i) Σpa(i),i .  Proof B shows that the formula from (7.3) holds more generally. It merely needs to hold that every trek from a node j ∈ pa(i) to i ends with a directed edge with i as its head, so an edge of the form k → i. This holds for every node in the graph if and only if the graph is ancestral [50]. A mixed graph is ancestral if the presence of a directed path from node i to node j implies that i 6= j and i ↔ j ∈ / B. An ancestral graph is in particular acyclic. The next easy lemma is crucial for the understanding of injectivity of φG . Lemma 7.1. If φG is injective and H ⊆ G is a subgraph, then φH is injective. Proof. Any subgraphs can be obtained by removing edges one at a time, and then removing isolated nodes. If H is obtained from G = (V, D, B) by removing the edge i → j, then φH is the restriction of φG to the subset of matrices Λ ∈ RD reg that have λij = 0. If we instead remove the edge i ↔ j, then the restrictions is to STRUCTURAL EQUATION MODELS 1 (a) 3 2 1 4 (b) 23 3 2 4 Figure 7.1. (a) A mixed graph for which the parametrization φG is injective. (b) A graph for which φG is not injective. matrices Ω ∈ PD (B) with ωij = 0. If H is obtained by removing the isolated node i, then   φH (Λ, Ω) 0 . φG (Λ, Ω) = 0 ωii In either case non-injectivity of φH implies non-injectivity of φG .  Corollary 7.1. If φG is injective, then G is simple, that is, for any vertices i 6= j at most one of the three edges i ↔ j, i → j and i ← j may appear in G. Proof. If G is not simple then it contains a subgraph H with two nodes and two edges. The map φH is infinite-to-one as it maps a four-dimensional domain into the three-dimensional set of symmetric 2 × 2 matrices. Now apply Lemma 7.1.  Theorem 7.2. If φG is injective, then G is acyclic. Proof sketch. By Lemma 7.1, we may restrict to studying directed cycles 1 → 2 → . . . → m → 1. The case of m = 2 is covered by Corollary 7.1. If m ≥ 3, then it is possible to show that φG is generically 2-to-1, that is, the fiber FG (Λ, Ω) is generically of size two [16].  It remains to characterize injectivity for acyclic graphs G = (V, D, B). The following theorem shows that injectivity can be decided in polynomial time by alternatingly decomposing the bidirected part (V, B) into connected components and removing sink nodes of the directed part (V, D). Theorem 7.3. Suppose G is an acyclic mixed graph. Then: (a) φG is injective if and only if G does not contain a subgraph whose bidirected part is connected and whose directed part has a unique sink. (b) If φG is injective, then its inverse is rational and MG smooth. Figure 7.1 illustrates the characterization in part (a) of the theorem. The fact that φG is not injective if the combinatorial condition in (a) fails can be shown by a counterexample for the particular subgraph and then invoking Lemma 7.1. For a proof of the sufficient condition in Theorem 7.3, we refer the reader to [16]. We note that the sufficiency of the condition for injectivity can be proven by repeatedly applying the graph decomposition result in Theorem 6.1 and the result on ancestral subgraphs from Theorem 5.1. These results as well as Theorem 7.3 have generalizations to nonlinear structural equation models [56, 66]. 8. Generic Identifiability The difference between injectivity and generic injectivity of φG may appear minute. However, the two properties are quite different, and failure of generic injectivity cannot be argued by studying subgraphs (as in Lemma 7.1). According to Corollary 7.1, a mixed graph G can have the map φG injective only if it is acyclic 24 MATHIAS DRTON and simple. The deeper issue is then to find out which simple acyclic mixed graphs have φG injective. In contrast, the next result shows that all simple acyclic mixed graphs are generically injective. The deeper issue for generic injectivity is thus the treatment of graphs that contain directed cycles or are not simple. Theorem 8.1. If G = (V, D, B) is acyclic and simple, then φG is generically injective and algebraically one-to-one. The theorem is due to [7]. It shows that the graph from Figure 7.1(b) has φG generically injective, but not injective. A short proof of Theorem 8.1 is obtained through the following observation that we use repeatedly in this section. Lemma 8.1. Let G = (V, D, B) be a mixed graph, and let Σ = φG (Λ0 , Ω0 ) for Λ 0 ∈ RD reg and Ω0 ∈ PD (B). The fiber FG (Λ0 , Ω0 ) is isomorphic to the set of matrices Λ ∈ RD reg that solve the equation system   (8.1) (I − Λ)T Σ(I − Λ) ij = 0, i 6= j, i ↔ j ∈ / B. Proof. The projection (Λ, Ω) 7→ Λ maps FG (Λ0 , Ω0 ) to the set of matrices Λ ∈ RD reg that solve the equations in (8.1). Indeed, as I − Λ is invertible for Λ ∈ RD reg , Σ = φG (Λ, Ω) = (I − Λ)−T Ω(I − Λ) =⇒ Ω = (I − Λ)T Σ(I − Λ). Any entry of Ω that is indexed by a pair (i, j) with i 6= j and i ↔ j ∈ / B is zero. Conversely, if Λ ∈ FG (Λ), then (Λ, (I − Λ)T Σ(I − Λ)) ∈ FG (Λ, Ω).  We emphasize that the equations in (8.1) are bilinear as X X X   σil λlj + λki σki − (I − Λ)T Σ(I − Λ) ij = σij − k∈pa(i) l∈pa(j) X λki σkl λlj . k∈pa(i) l∈pa(j) Proof of Theorem 8.1. Because G is acyclic, we may enumerate the vertex set in a topological order as V = {1, . . . , m}. Then pa(i) ⊆ {1, . . . , i − 1} for i = 1, . . . , m. Moreover, because G is simple, j ∈ pa(i) implies that j ↔ i ∈ / B. By Lemma 8.1,   T i = 1, . . . , m. (I − Λ) Σ(I − Λ) pa(i),i = 0, These equations can be rewritten as     (8.2) (I − Λ)T Σ pa(i),pa(i) Λpa(i),i = (I − Λ)T Σ pa(i),i , i = 1, . . . , m. By the tolopogical order, if j ∈ pa(i), then the entries in the j-th row of (I − Λ)T Σ depend only on the first i − 1 columns of Λ. The system in (8.2) can thus be solved recursively, where each step requires solving a linear system. To show that φG is generically injective, it remains to argue that the equations in (8.2) generically have a unique solution. It suffices to exhibit a single pair (Λ, Ω) for which this is true. We may choose Λ = 0 and Ω = I, so Σ = I. Then the matrix for the i-th group of equations in (8.2) is Σpa(i),pa(i) , which is invertible.  Although a combinatorial characterization of the graphs with generically injective parametrization φG is not known, Gröbner basis techniques can be used to determine the degree of identifiability from Definition 3.1 and, thus, decide whether φG is algebraically one-to-one. Gröbner bases are computationally tractable for non-trivial examples and have been used for a classification of all graphs with up to 5 nodes [34]. For larger graphs, algebraic methods can be applied after decomposition according to Theorem 6.1. STRUCTURAL EQUATION MODELS 25 We describe two options for the computation. In either case, we advocate working with the equation system from (8.1) as opposed to the fiber equation Σ = φG (Λ, Ω). System (8.1) has Ω eliminated and may be far more compact as it avoids the inversion of I − Λ. This said, although system (8.1) is polynomial also for graphs that contain directed cycles, care must be taken to avoid spurios solutions with I − Λ non-invertible. The first possibility is to perform a parametric Gröbner basis computation. We introduce a matrix Λ whose nonzero entries λij , i → j ∈ D, are indeterminates and a pair of matrices (Λ0 , Ω0 ) that are parameters. We form the matrix (I − Λ)T φG (Λ0 , Ω0 )(I − Λ) and set to zero the off-diagonal entries indexed by non-edges of the bidirected part (V, B). We then compute a Gröbner basis for the resulting system in the polynomial ring with coefficients in the field of rational fractions R(Λ0 , Ω0 ). The Gröbner basis readily yields the dimension of the generic fibers. If the dimension is finite we may also find the algebraic degree of the generic fibers, which is what we referred to as degree of identifiability. When the graph G contains directed cycles, the matrix I − Λ can be non-invertible. We thus first saturate our equation system with respect to det(I − Λ). Example 8.1. The following code for the system Singular [13] implements the approach just described for a directed 3-cycle: LIB "linalg.lib"; option(redSB); ring R = (0,l012,l023,l031,w011,w022,w033),(l12,l23,l31),dp; matrix L[3][3] = 1,-l12,0, 0,1,-l23, -l31,0,1; matrix L0[3][3] = 1,-l012,0, 0,1,-l023, -l031,0,1; matrix W0[3][3] = w011,0,0, 0,w022,0, 0,0,w033; matrix W[3][3] = transpose(L)*inverse(transpose(L0))*W0*inverse(L0)*L; ideal GB = sat(ideal(W[1,2],W[1,3],W[2,3]), det(L))[1]; dim(GB); mult(GB); The output from the last line first certifies that the fibers are generically zerodimensional, that is, contain finitely many points. The multiplicity computed with the last command shows the degree of identifiability to be two. The second possibility is to consider only polynomials with real-valued coefficients but to introduce as polynomial variables the nonzero entries of Λ as well as a symmetric matrix Σ. These variables are ordered with respect to a block monomial order in which the variables in Λ are larger than the variables in Σ. Let I be the ideal generated by the off-diagonal entries of (I − Λ)T Σ(I − Λ) that are indexed by the non-edges of (V, B). Saturate I with respect to det(I − Λ). Let J be the reduced Gröbner basis of the resulting ideal. Elimination theory yields the following [34, Section 8 of the supplemental material]. Proposition 8.1. The parametrization φG of a mixed graph G = (V, D, B) is algebraically one-to-one if and only if for each i → j ∈ D, the reduced Gröbner basis J contains an element with leading monomial a(Σ)λij . 26 MATHIAS DRTON More generally, the generic dimension and degree of the fibers FG (Λ, Ω) can be determined by analyzing the monomials under the staircase of the initial ideal of J [12, Chapter 9]. This way we may determine the degree of identifiability of G. In comparison to the first approach, the second method yields relations that show how to identify coefficients λij from Σ. Example 8.2. Treating again a directed 3-cycle, we give an example of the second type of computation in Singular: LIB "linalg.lib"; option(redSB); ring R = 0,(l12,l23,l31,s11,s12,s13,s22,s23,s33),(dp(3)); matrix L[3][3] = 1,-l12,0, 0,1,-l23, -l31,0,1; matrix S[3][3] = s11,s12,s13, s12,s22,s23, s13,s23,s33; matrix W[3][3] = transpose(L)*S*L; ideal GB = sat(ideal(W[1,2],W[1,3],W[2,3]), det(L))[1]; GB; The output is a list of 9 polynomials whose leading terms are, in our usual notation, λ23 λ31 σ23 , λ12 λ31 σ13 , λ12 λ23 σ12 , λ12 λ31 σ12 σ33 , λ12 σ11 σ13 σ23 , λ12 λ23 σ11 σ23 , λ23 σ12 σ13 σ22 , λ23 λ31 σ13 σ22 , λ231 σ13 σ22 σ33 . By Proposition 8.1, φG is not algebraically one-to-one because there is no leading term of the form λ31 a(Σ). The last leading term belongs to a polynomial that shows that λ31 is algebraic function of degree 2 of the covariance matrix Σ because it solves the equation 2 2 2 λ231 σ33 (σ13 σ22 − σ12 σ23 ) − λ31 (σ13 σ22 − σ11 σ23 − σ12 σ33 + σ11 σ22 σ33 ) + σ11 (σ13 σ22 − σ12 σ23 ) = 0. The equations with leading terms λ23 σ12 σ13 σ22 and λ12 σ11 σ13 σ23 show that λ23 and λ12 are rational functions of Σ and λ31 . Altogether, we have verified that φG is algebraically 2-to-one. Checking this by counting monomials under the staircase means considering the leading monomials considering only the variables λ12 , λ23 , λ31 we seek to solve for. The monomials are (8.3) λ23 λ31 , λ12 λ31 , λ12 λ23 , λ12 , λ23 , λ231 , and generate the ideal I = hλ12 , λ23 , λ231 i. The monomials under the staircase are the monomials in R[λ12 , λ23 , λ31 ] \ I. There are two, namely, 1 and λ31 . Although Gröbner basis methods can be effective, it is desirable to obtain combinatorial methods that are efficient also for large-scale problems. The half-trek criteria of [34] are state-of-the-art criteria that can be checked in time that is polynomial in the size of the vertex set of the considered graph. They provide a sufficient as well as a necessary condition for generic injectivity of φG . More precisely, there is a condition that is sufficient for φG to be algebraically one-to-one and a related condition that is neessary for φG to be generically finite-to-one. The conditions are implemented in a package for the R project for statistical computing [4]. We begin our discussion of the half-trek criteria by introducing some needed terminology. A half-trek from source node i to target node j is a trek τ from i to j whose left-hand side is a singleton set, so left (τ ) = {i}. In other words, a half-trek is of STRUCTURAL EQUATION MODELS 27 the form i → j1 → . . . → jr → j or i ↔ j1 → . . . → jr → j. Let X, Y ⊆ V be two sets of nodes of equal cardinality |X| = |Y | = k. Let Π be a set of k treks. Then Π is a system of treks from X to Y , denoted Π : X ⇒ Y , if X is the set of source nodes of the treks in Π and Y is the set of target nodes. Note that we allow X ∩ Y 6= ∅. The system Π is a system of half-treks if every trek πi is a half-trek. Finally, a system Π has no sided intersection if left (π) ∩ left (π ′ ) = ∅ = right (π) ∩ right (π ′ ) for all pairs of treks π, π ′ ∈ Π. Definition 8.1. A set Y ⊆ V satisfies the half-trek criterion with respect to node i if (i) |Y | = | pa(i)|, (ii) j = i or j ↔ i implies that j 6∈ Y , and (iii) there exists a system of half-treks Π : Y ⇒ pa(i) that has no sided intersection. Theorem 8.2. Let G = (V, D, B) be a mixed graph. (i) If for every i ∈ V there exists a set Yi ⊆ V that satisfies the half-trek criterion with respect to i, and if there exists a total ordering ≺ such that j ≺ i whenever j ∈ Yi and there is a half-trek from i to j, then φG is generically injective and algebraically one-to-one. (ii) For φG to be generically finite-to-one it is necessary that there exists a family of subsets Yi ⊆ V , i ∈ V , such that Yi satisfies the half-trek criterion with respect to i and j ∈ Yi implies i 6∈ Yj . We merely outline the proof of the theorem; for details see [34]. Some of the arguments are further illustrated in Example 8.3. Note also that Theorem 8.1 is obtained from Theorem 8.2(i) by taking Yi = pa(i) and ≺ as a topological order. Outline of proof of Theorem 8.2. (i) Let Σ = φG (Λ0 , Ω0 ) for Λ0 ∈ RD reg and Ω0 ∈ PD(B). Suppose (Λ, Ω) ∈ FG (Λ0 , Ω0 ). To show that (Λ, Ω) = (Λ0 , Ω0 ), we visit the nodes i ∈ V from smallest to largest in the order ≺ and iteratively find a linear equation system that is uniquely solved by the i-th column of Λ. The starting point is Lemma 8.1, by which we have   (8.4) (I − Λ)T Σ(I − Λ) Yi ,i = 0, i ∈ V. This is true because Definition 8.1 yields that j 6= i and j ↔ i ∈ / B when j ∈ Yi . Similar to the proof of Theorem 8.1, we may rearrange (8.4) to Ai (Λ, Σ)Λpa(i),i = bi (Λ, Σ),     with Ai (Λ, Σ) = (I − Λ)T Σ Yi ,pa(i) and bi (Λ, Σ) = (I − Λ)T Σ Yi ,i . Both Ai (Λ, Σ) and bi (Λ, Σ) can be shown to only depend on those columns of Λ that are indexed by nodes j with a half-trek from i to j. Hence, the proof is complete if we can show that Ai (Λ0 , Σ) is invertible for generic choices of Λ0 and Ω0 . To verify this, we may use the existence of a half-trek system without sided intersection from Yi to pa(i) to argue that the determinant of Ai (Λ0 , Σ) is not the zero polynomial. This last step is in the spirit of the Lindström-Gessel-Viennot lemma. (ii) We study the Jacobian of the equations from Lemma 8.1. Its rows are indexed by the non-edges of the bidirected part (V, B) and its columns by the edges in D. For φG to be generically finite-to-one, it is necessary that the Jacobian has full column rank D. It can be shown that the Jacobian contains an invertible |D| × |D| submatrix only if the given condition holds. Let Ji be the submatrix of the Jacobian 28 MATHIAS DRTON 1 3 2 5 4 Figure 8.1. Illustration of Theorem 8.2. obtained by selecting the columns corresponding to directed edges with head at i. Then, more specifically, Ji has full column rank only if there exists a subset Yi ⊆ V that satisfies the half-trek criterion with respect to i. Moreover, if j ∈ Yi and i ∈ Yj , then the same row, namely, that corresponding to i ↔ j ∈ / B, would be used to get an invertible square submatrix of Ji and Jj .  The conditions from Theorem 8.2 seem involved but as we mentioned they can be checked in polynomial time. Indeed, the problem of finding suitable sets Yi that satisfy the half-trek criteria can be shown to correspond to solving network-flow problems. For condition (i), we repeatedly solve a network-flow problem. Condition (ii) can be implemented as a single larger network-flow problem [34, Section 6]. Example 8.3. Let G be the graph in Figure 8.1. Each one of the sets Y1 = {2, 5}, Y2 = {5}, Y3 = ∅, Y4 = ∅, Y5 = {3} satisfies the half-trek criterion with respect to the node it is indexed by. This is least evident for Y1 , and we highlight the half-treks 2 ↔ 3 and 5 ↔ 4 → 2, which have no sided intersection. Choosing the ordering as 3 ≺ 4 ≺ 5 ≺ 1 ≺ 2, Theorem 8.2(i) shows that φG is algebraically one-to-one. Other possible orderings are obtained by permuting {3, 4, 5} or {1, 2}. To illustrate ideas from the proof of Theorem 8.2(i), we focus on node 1, with pa(1) = {2, 3}. Since Y1 = {2, 5}, we work with the equations     (I − Λ)T Σ(I − Λ) 21 = 0. (I − Λ)T Σ(I − Λ) 51 = 0, Expanding out the matrix product, the equations become (8.5) σ51 − (σ52 λ21 + σ53 λ31 ) − λ35 σ31 + (λ35 σ32 λ21 + λ35 σ33 λ31 ) = 0, (8.6) σ21 − (σ22 λ21 + σ23 λ31 ) − λ42 σ41 + (λ42 σ42 λ21 + λ42 σ43 λ31 ) = 0, and we wish to solve for λ21 and λ31 . With 5 ≺ 1, we have already solved for λ35 ; since Y5 = pa(5) we have λ35 = σ35 /σ55 as is also clear from the discussion after Proof B for Theorem 7.1. Substituting the ratio for λ35 turns (8.5) into a linear equation in λ21 and λ31 . The equation in (8.6) could be linearized similarly, except that now the relevant coefficient λ42 has not yet been determined in an ordering with 1 ≺ 2. However, if Λ is part of a pair (Λ, Ω) in the fiber given by Σ, then −λ42 σ41 + (λ42 σ42 λ21 + λ42 σ43 λ31 ) = 0 because there is no half-trek from 1 to 2. To see this note that the term λ42 σ41 corresponds to treks from 2 to 1 that start with the edge 2 ← 4, whereas the sum λ42 σ42 λ21 + λ42 σ43 λ31 corresponds to treks from 2 to 1 that start with the edge 2 ← 4 and end in either 2 → 1 or 3 → 1. These two sets of treks coincide when there is no half-trek from 1 to 2. STRUCTURAL EQUATION MODELS 29 5 1 5 2 1 4 2 3 3 4 (a) (b) Figure 8.2. Graphs that satisfy the necessary but not the sufficient condition from Theorem 8.2: (a) φG is algebraically 3-to-one, (b) φG is algebraically one-to-one and, thus, generically injective. The sufficient condition from Theorem 8.2(i) can be strengthened by first applying the graph decomposition from Section 6 and then check condition (i) in each subgraph. No such strengthening is possible for the necessary condition from part (ii) of the theorem [34]. Further strengthening of the sufficient condition is possible by first removing sink nodes from the graph using the observation from Theorem 5.1. When a sink node is removed a more refined graph decomposition may become possible; we refer the reader to [10, 22]. While a specific polynomialtime algorithm using this idea is given in [22], it is still unclear how to best design algorithms based on recursive graph decomposition and removal of sink nodes. We conclude our discussion of parameter identification with two examples from the exhaustive computational study of graphs with up to 5 nodes in [34]. Both graphs in Figure 8.1 satisfy the necessary condition in Theorem 8.2(ii) and, thus, have φG generically finite-to-one. Neither graph satisfies the sufficient condition from Theorem 8.2(i). The graph in panel (a) indeed does not have φG generically injective. Instead, φG is algebraically 3-to-one. The graph in panel (b), however, is algebraically one-to-one but Theorem 8.2(i) fails to recognize it. Decomposition and removal of sink nodes do not help. Part IV. Relations Among Covariances 9. Implicitization Let MG be the set of covariance matrices of the structural equation model given by a mixed graph G = (V, D, B). Motivated, in particular, by the covariance equivalence problem from Question 3.5, we now discuss polynomial relations among the entries of the matrices in MG . Let Σ = (σij ) be a symmetric V × V matrix of variables, and let R[Σ] be the ring of polynomials in the σij with real coefficients. Then the polynomial relations we seek to understand make up the vanishing ideal I(G) = {f ∈ R[Σ] : f (Σ) = 0 for all Σ ∈ MG } . Since MG is the image of the rational map φG , we may compute a generating set for I(G) by implicitization. Assuming for simplicity that G is acyclic and, thus, φG polynomial, we have I(G) = h Σ − φG (Λ, Ω) i ∩ R[Σ]. 30 MATHIAS DRTON 1 3 2 4 Figure 9.1. An acyclic digraph. A better approach, however, is to start with the equations from Lemma 8.1, which have Ω already eliminated. We compute D E  I(G) = / B ∩ R[Σ]. (I − Λ)T Σ(I − Λ) ij : i 6= j, i ↔ j ∈ If G is not acyclic, we saturate with respect to det(I − Λ) before intersecting with R[Σ]; compare the examples in Section 8. Example 9.1. To illustrate the use of a different software, we change to Macaulay2 [40]. The following code computes a generating set for the vanishing ideal of the graph G shown in Figure 9.1: R = QQ[l12,l13,l24,l34, s11,s12,s13,s14, s22,s23,s24, s33,s34, s44, MonomialOrder => Eliminate 4]; Lambda = matrix{{1, -l12, -l13, 0}, {0, 1, 0, -l24}, {0, 0, 1, -l34}, {0, 0, 0, 1}}; S = matrix{{s11, s12, s13, s14}, {s12, s22, s23, s24}, {s13, s23, s33, s34}, {s14, s24, s34, s44}}; W = transpose(Lambda)*S*Lambda; I = ideal{W_(0,1),W_(0,2),W_(0,3),W_(1,2),W_(1,3),W_(2,3)}; eliminate({l12,l13,l24,l34},I) The ‘GraphicalModels’ package [37] automates the computation: needsPackage "GraphicalModels"; G = digraph {{1,{2,3}},{2,{4}},{3,{4}}}; R = gaussianRing G; gaussianVanishingIdeal R Reproduced in our notation, the output shows that the ideal I(G) is generated by the two polynomials (9.1) f1 = σ12 σ13 − σ11 σ23 , 2 (9.2) f2 = σ14 σ23 − σ13 σ23 σ24 − σ14 σ22 σ33 + σ12 σ24 σ33 + σ13 σ22 σ34 − σ12 σ23 σ34 . Computing I(G) using Gröbner bases is a method that applies to any mixed graph but can be computationally prohibitive for graphs with more than 5 or 6 nodes. In order to solve model equivalence problems combinatorial insight on particular types of relations is needed. Example 9.2. Continuing with Example 9.1, observe that the two polynomials f1 and f2 from (9.1) and (9.2) are determinants of submatrices of the covariance STRUCTURAL EQUATION MODELS matrix Σ. The following  σ11 σ12  σ12 σ22   σ13 σ23 σ14 σ24 two displays locate the submatrices   σ13 σ14 σ11 σ12 σ13  σ12 σ22 σ23 σ23 σ24     σ13 σ23 σ33 σ33 σ34  σ14 σ24 σ34 σ34 σ44 31  σ14 σ24   σ34  σ44 and show two boxes to visualize that each submatrix is obtained by bordering a principal submatrix by one additional row and column. The determinants f1 and f2 are seen to be almost principal minors of Σ. As we discuss in Section 10, the vanishing of almost principal minors of a Gaussian covariance matrix has a particular probabilistic meaning, namely, conditional independence [60]. 10. Conditional Independence Suppose X = (Xi : i ∈ V ) is a Gaussian random vector indexed by a finite set V and with covariance matrix Σ ∈ PD V . Let i, j ∈ V be two distinct indices, and let S ⊆ V \{i, j}. The random variables Xi and Xj are conditionally independent given XS if and only if det(ΣiS×jS ) = 0. This connection between Gaussian conditional independence and the vanishing of almost principal minors of the covariance matrix is explained in detail in [21, Chapter 3] and [48]. It is fully understood which conditional independence relations hold in the covariance matrices of a linear structural equation model. The following concepts are needed to state the result. Let π be a semi-walk from node i to node j in the considered mixed graph G = (V, D, B), and let node k be a non-endpoint of π. A collider on π is a node k that is an internal node on π, and a head on the two edges that precede and succeed k on π. We recall our convention that the two nodes incident to a bidirected edge are both heads. Pictorially, π includes the segment → k ←, → k ↔, ↔ k ← or ↔ k ↔. A non-collider on π is an internal node of π that is not a collider on π. Definition 10.1. Fix a set S ⊆ V . Two nodes i, j ∈ V are d-connected by S if G contains a semi-walk from i to j that has all colliders in S and all non-colliders outside S. If no such semi-walk exists, then i and j are d-separated by S. The following theorem was first proven for acyclic digraphs [39] and later extended to cover arbitrary mixed graphs [58]. Theorem 10.1. Let G = (V, D, B) be a mixed graph. Two nodes i, j ∈ V are dseparated by S if and only if det (φG (Λ, Ω)iS×jS ) = 0 for all Λ ∈ RD reg , Ω ∈ PD (B). For acyclic digraphs, the theorem can be derived in a probabilistic setup that extends to non-Gaussian conditional independence [46]. When lecturing about the result, the author likes to discuss the example with three binary variables shown in Figure 10.1. In our linear Gaussian setting, Theorem 10.1 is a special case of Theorem 11.1 that we treat in more detail. Define the conditional independence ideal ICI (G) = h det (ΣiS×jS ) : i, j d-separated by S i. By Theorem 10.1, ICI (G) ⊆ I(G) for any mixed graph G. In Example 9.1, ICI (G) = I(G) but this may be false even for acyclic digraphs [61]. Nevertheless, if G is an 32 MATHIAS DRTON Boring talk? Early morning talk? Audience asleep? Figure 10.1. A graph for three binary variables. acylic digraph, then the set of covariance matrices MG is cut out by conditional independence relations. In other words, for an acyclic digraph, (10.1) MG = V (ICI (G)) ∩ PD V is the positive definite part of the variety of the conditional independence ideal. The equality in (10.1) also holds when G is an ancestral graph, as defined in Section 7. However, it is false in general as can be seen in Example 3.3. We remark that for acyclic digraphs it has been proven that saturating the conditional independence with respect to all principal minors yields the vanishing ideal [52]:  Y ∞ I(G) = I CI (G) : det(ΣA×A ) . A⊂V For acyclic digraphs and more generally ancestral graphs, the equality from (10.1) allows us to answer Question 3.5 on covariance equivalence by checking whether two graphs have the same d-separation relations. The latter comparison can be accomplished in polynomial time. We state the result for acyclic digraphs [35, 69]. A generalization for ancestral graphs was given more recently [1]; see also [74]. Theorem 10.2. Let G and G′ be two acyclic digraphs. Then MG = MG′ if and only if G and G′ have the same adjacencies and the same unshielded colliders. An unshielded collider is an induced subgraph of the form i → j ← k. We remark that it can also be decided in polynomial time whether two digraphs that are not necessarily acyclic have the same d-separation relations [51]. When the graphs have directed cycles then d-separation equivalence is necessary but not sufficient for covariance equivalence; see, e.g., the example in [15]. 11. Trek Separation We now turn to the characterization of the vanishing of general minors of the covariance matrices in a linear structural equation model. Our first example clarifies the importance of minors that are not almost principal. Example 11.1. If G is the graph from Figure 3.2 and Example 3.3, then I(G) is generated by det(Σ12,34 ). Such off-diagonal 2 × 2 minors are known as tetrads in the statistical literature; see [20] and the references therein. The tetrad representation theorem gives a combinatorial characterization of the vanishing of any 2 × 2 determinant [57]. The theorem has been greatly generalized, and we now have a full combinatorial understanding of when a minor of the covariance matrix vanishes based on the notion of trek-separation [64]. Moreover, the non-vanishing determinants can be described precisely [14]. STRUCTURAL EQUATION MODELS 33 Definition 11.1. Let A, C, SA , SC ⊆ V be sets of nodes of the mixed graph G = (V, D, B). The pair (SA , SC ) trek-separates A and C if every trek from i ∈ A to j ∈ C intersects SA on its left side or SC on its right side. Theorem 11.1. Let G be a mixed graph. Then the A × C submatrix of φG (Λ, Ω) has generic rank ≤ r if and only if there exist sets SA and SC with |SA | + |SC | ≤ r such that (SA , SC ) trek-separates A and C. The theorem for acyclic mixed graphs is proven in [64]. The cases with directed cycles are covered by the results in [14]. We describe the ideas behind the proof. Proof outline. The problem can be reduced to the case where G is a digraph by subdividing bidirected edges. For each edge i ↔ j ∈ B we introduce a new node {i, j} and two edges {i, j} → i and {i, j} → j. The new digraph G′ thus has |V | + |B| nodes and |D| + 2|B| edges. If G is the mixed graph from Figure 1.2, then G′ is the digraph in Figure 1.1. Every trek in G corresponds to a trek in G′ where an edge i ↔ j in G corresponds to i ← {i, j} → j in G′ . The entries of (φG )A,C and those of (φG′ )A,C can be shown to admit the same set of relations. In the sequel, assume that G itself is a digraph. Then PD (B) contains diagonal matrices with positive entries. The rank of φG (Λ, Ω) for Λ ∈ RD reg and Ω ∈ PD (B) is then the same as that of Σ = φG (Λ, I). To establish the claim, we may study the vanishing of the determinants of square submatrices. So assume that |A| = |C| = r + 1. The Cauchy-Binet formula gives that     X   (11.1) det (ΣA×C ) = det (I − Λ)−1 E×A det (I − Λ)−1 E×C , E where the sum is over subsets E ⊆ V of cardinality r + 1. By the Lindström-GesselViennot lemma for general digraphs, it holds that    (11.2) det (I − Λ)−1 E×A = 0 for all Λ ∈ RD reg , if and only if no system of r + 1 directed paths from E to A is vertex-disjoint. Applying this to all terms in (11.1) shows that det (ΣA×C ) vanishes if and only if every system of treks from A to C has a sided intersection. Here, an intersection on the left side of a trek corresponds to the vanishing of determinants of the matrices (I − Λ)−1 E×A and, similarly, interesections on the right side are related to   the determinants of the matrices (I − Λ)−1 E×C . The characterization by sided intersections in trek systems can be turned into the claimed statement about trekseparation via Menger’s theorem. To account for the distinct role played by the left and the right sides of the treks, Menger’s theorem is applied in a digraph G̃ that results from duplicating the nodes and edges of G. Each node and each edge of G has a left and a right side version in G̃. Menger’s theorem yields a cut set S of cardinality |S| ≤ r in G̃. Partitioning S according to the left and right side yields the pair (SA , SC ) for the claimed trek-separation.  Example 11.2. When G is the the graph from Figure 3.2, then the submatrix [φG (Λ, Ω)]12,34 has generic rank 1; recall Example 11.1. Theorem 11.1 shows that the rank is at least 1 because (∅, ∅) does not trek-separate {1, 2} and {3, 4}. For instance, there is the trek 1 → 3. That the rank is no larger than 1 follows from (∅, {3}) trek-separating {1, 2} and {3, 4}. For instance, the node 3 is on the right side of the two treks 1 → 3 and 2 → 3 → 4. 34 MATHIAS DRTON c 1 2 3 4 5 6 7 Figure 11.1. A ‘spider graph’ with {1, 2, 3, 4} × {5, 6, 7} submatrix of rank two. Example 11.3. What is the generic rank of the A × C of φG (Λ, Ω) when G is the ‘spider graph’ from Figure 11.1, A = {1, 2, 3, 4} and C = {5, 6, 7}? The node c is on every trek between A and C. It follows that ({c}, {c}) trek-separates A and C and thus the rank is no larger than two. In fact, the rank is equal to two. Consider the two treks π1 : 1 ↔ ◦ → c → 5, π2 : 3 ← c ← ◦ ↔ 6. They have only node c in common but c ∈ right (π1 ) and c ∈ left (π2 ). Hence, a pair of trek-separating sets must use at least two nodes. Trek separation solves the problem of characterizing the vanishing of determinants. However, there is currently no efficient method for deciding when two mixed graphs are trek separation equivalent. 12. Verma Constraints Much interesting ground lies beyond determinants of the covariance matrix. We content ourselves with two examples concerning a relation first presented in [69]. Example 12.1. Let G be the graph from Figure 2.1. The graph has no trekseparation relations as can be checked with the package ‘GraphicalModels’ for Macaulay2 [37]. The commands needsPackage "GraphicalModels"; G = mixedGraph(digraph {{1,{2,3}},{2,{3}},{3,{4}}}, bigraph {{2,4}}); R = gaussianRing G; trekIdeal(R,G) return the zero ideal. Issuing the command gaussianVanishingIdeal R shows that I(G) is generated by 2 (12.1) fVerma = σ11 σ13 σ22 σ34 − σ11 σ13 σ23 σ24 − σ11 σ14 σ22 σ33 + σ11 σ14 σ23 2 2 2 − σ12 σ13 σ34 + σ12 σ14 σ33 + σ12 σ13 σ24 − σ12 σ13 σ14 σ23 . Clearly, fVerma is not a determinant. Its vanishing can be explained as follows. Decompose G into its mixed components. The largest component G[{2, 4}] is depicted in Figure 12.1. Appealing to Theorem 6.1, there is a rational function τ{2,4} : MG → MG′ , so τ{2,4} is the covariance matrix for G[{2, 4}]. In G[{2, 4}], STRUCTURAL EQUATION MODELS 1 35 3 2 4 Figure 12.1. The largest mixed component of the Verma graph. 1 3 2 5 4 Figure 12.2. A graph that can be decomposed only after removing the sink node 5. there is no trek from node 1 to node 4. Hence, the (1, 4) entry of τ{2,4} (Σ) is zero. Clearing the denominator yields fVerma(Σ) = 0 for Σ ∈ MG . The example suggests that new relations can be discovered by decomposing the graph and studying d-separation or trek-separation relations in the mixed components. The matter is more delicate, however. Example 12.2. In order to prevent decomposition of the Verma graph, add a fifth node and bidirected edges such that (V, B) becomes connected. Specifically, consider the graph G from Figure 12.2. The new graph G is simple and acyclic and, thus, has expected dimension 13. Because the nodes 2 and 5 are d-separated by 1, we have σ12 σ15 − σ11 σ25 ∈ I(G). Other relations must exist, and indeed a Gröbner basis computation shows that ∞ I(G) = hσ12 σ15 − σ11 σ25 , fVermai : σ11 with fVerma being the polynomial from (12.1). The fact that fVerma ∈ I(G) is explained by Theorem 5.1. Since no directed edge of G has a tail at node 5, the theorem allows us to consider the subgraph induced by the set of nodes {1, 2, 3, 4}. We are back in Example 12.1 and decomposition yields fVerma as a relation. It is clear that more contrived examples can be constructed in which d-/trekseparation applies only after several rounds of alternating between graph decomposition and forming a subgraph induced by an ancestral set. An overview of what is known about such a recursive approach can be found in [55], where the focus is on non-linear models and manipulation of probability density functions. 13. Conclusion Linear structural equation models have covariance matrices with rich algebraic structure. As we showed in Section 3, statistical considerations motivate a host of different algebraic problems. In this review, we focused on methods for parameter identification as well as relations among covariances. While much progress has been made, and continues to be made [30], we have encountered a plethora of open problems of algebraic and combinatorial nature. 36 MATHIAS DRTON In our review, we focused exclusively on linear and Gaussian models. As noted repeatedly, many of the questions have interesting generalizations to non-linear or non-Gaussian models. In particular, in settings with discrete random variables, as considered in [27, 28], algebra and Gröbner basis techniques continue to be useful [21]. Similarly, many additional challenges arise in models with explicit latent variables, which motivate studying the map φG when projected onto a principal submatrix (recall Section 5). References 1. R. Ayesha Ali, Thomas S. Richardson, and Peter Spirtes, Markov equivalence for ancestral graphs, Ann. Statist. 37 (2009), no. 5B, 2808–2837. 2. Theodore W. Anderson, An introduction to multivariate statistical analysis, third ed., Wiley Series in Probability and Statistics, Wiley-Interscience [John Wiley & Sons], Hoboken, NJ, 2003. MR 1990662 3. Vladimir I. Arnol′ d, Sabir M. Guseı̆n-Zade, and Aleksandr N. Varchenko, Singularities of differentiable maps. Vol. II, Monographs in Mathematics, vol. 83, Birkhäuser Boston, Inc., Boston, MA, 1988, Monodromy and asymptotics of integrals, Translated from the Russian by Hugh Porteous, Translation revised by the authors and James Montaldi. MR 966191 4. Rina Foygel Barber, Mathias Drton, and Luca Weihs, Semid: Identifiability of linear structural equation models, 2015, R package version 0.2. 5. Kenneth A. Bollen, Structural equations with latent variables, Wiley Series in Probability and Mathematical Statistics: Applied Probability and Statistics, John Wiley & Sons Inc., New York, 1989, A Wiley-Interscience Publication. MR 996025 (90k:62001) 6. Kenneth A. Bollen and Kwok-fai Ting, A tetrad test for causal indicators, Psychological methods 5 (2000), no. 1, 3. 7. Carlos Brito and Judea Pearl, A new identification condition for recursive models with correlated errors, Struct. Equ. Model. 9 (2002), no. 4, 459–474. MR 1930449 8. Andries E. Brouwer and Jan Draisma, Equivariant Gröbner bases and the Gaussian two-factor model, Math. Comp. 80 (2011), no. 274, 1123–1133. MR 2772115 9. Søren L. Buhl, On the existence of maximum likelihood estimators for graphical Gaussian models, Scand. J. Statist. 20 (1993), no. 3, 263–270. 10. Bryant Chen, Decomposition and identification of linear structural equation models, ArXiv e-prints (2015), 1508.01834. 11. Bryant Chen, Jin Tian, and Judea Pearl, Testable implications of linear structural equations models, Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence (Palo Alto, CA) (Carla E. Brodley and Peter Stone, eds.), AAAI Press, 2014, pp. 2424–2430. 12. David Cox, John Little, and Donal O’Shea, Ideals, varieties, and algorithms, third ed., Undergraduate Texts in Mathematics, Springer, New York, 2007, An introduction to computational algebraic geometry and commutative algebra. MR 2290010 (2007h:13036) 13. Wolfram Decker, Gert-Martin Greuel, Gerhard Pfister, and Hans Schönemann, Singular 4-0-2 — A computer algebra system for polynomial computations, http://www.singular.uni-kl.de, 2015. 14. Jan Draisma, Seth Sullivant, and Kelli Talaska, Positivity for Gaussian graphical models, Adv. in Appl. Math. 50 (2013), no. 5, 661–674. MR 3044565 15. Mathias Drton, Likelihood ratio tests and singularities, Ann. Statist. 37 (2009), no. 2, 979– 1012. MR 2502658 16. Mathias Drton, Rina Foygel, and Seth Sullivant, Global identifiability of linear structural equation models, Ann. Statist. 39 (2011), no. 2, 865–886. 17. Mathias Drton, Hélène Massam, and Ingram Olkin, Moments of minors of Wishart matrices, Ann. Statist. 36 (2008), no. 5, 2261–2283. MR 2458187 18. Mathias Drton and Martyn Plummer, A Bayesian information criterion for singular models, J. R. Stat. Soc. Ser. B. Stat. Methodol. (2016), to appear. 19. Mathias Drton and Thomas S Richardson, Multimodality of the likelihood in the bivariate seemingly unrelated regressions model, Biometrika 91 (2004), no. 2, 383–392. 20. Mathias Drton, Bernd Sturmfels, and Seth Sullivant, Algebraic factor analysis: tetrads, pentads and beyond, Probab. Theory Related Fields 138 (2007), no. 3-4, 463–493. MR 2299716 STRUCTURAL EQUATION MODELS 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. 37 , Lectures on algebraic statistics, Oberwolfach Seminars, vol. 39, Birkhäuser Verlag, Basel, 2009. MR 2723140 (2012d:62004) Mathias Drton and Luca Weihs, Generic identifiability of linear structural equation models by ancestor decomposition, ArXiv e-prints (2015), 1504.02992. Mathias Drton and Han Xiao, Finiteness of small factor analysis models, Ann. Inst. Statist. Math. 62 (2010), no. 4, 775–783. MR 2652316 , Wald tests of singular hypotheses, Bernoulli 22 (2016), no. 1, 38–59. MR 3449776 Mathias Drton and Josephine Yu, On a parametrization of positive semidefinite matrices with zeros, SIAM J. Matrix Anal. Appl. 31 (2010), no. 5, 2665–2680. MR 2740626 (2011j:15057) Jan Ernest, Dominik Rothenhäusler, and Peter Bühlmann, Causal inference in partially linear structural equation models: identifiability and estimation, ArXiv e-prints (2016), 1607.05980. Robin J. Evans, Margins of discrete Bayesian networks, ArXiv e-prints (2015), 1501.02103. Robin J. Evans and Thomas S. Richardson, Smooth, identifiable supermodels of discrete DAG models with latent variables, ArXiv e-prints (2015), 1511.06813. William N. Evans and Jeanne S. Ringel, Can higher cigarette taxes improve birth outcomes?, Journal of Public Economics 72 (1999), no. 1, 135–154. Alex Fink, Jenna Rajchgot, and Seth Sullivant, Matrix Schubert varieties and Gaussian conditional independence models, ArXiv e-prints (2015), 1510.04124. Franklin M. Fisher, A correspondence principle for simultaneous equation models, Econometrica 38 (1970), 73–92. Christopher Fox, Interpretation and inference of linear structural equation models, Ph.D. thesis, University of Chicago, 2014. Christopher J. Fox, Andreas Käufl, and Mathias Drton, On the causal interpretation of acyclic mixed graphs under multivariate normality, Linear Algebra Appl. 473 (2015), 93– 113. MR 3338327 Rina Foygel, Jan Draisma, and Mathias Drton, Half-trek criterion for generic identifiability of linear structural equation models, Ann. Statist. 40 (2012), no. 3, 1682–1713. Morten Frydenberg, The chain graph Markov property, Scand. J. Statist. 17 (1990), no. 4, 333–353. MR 1096723 Luis D. Garcia-Puente, Sarah Spielvogel, and Seth Sullivant, Identifying causal effects with computer algebra, Proceedings of the 26th Conference on Uncertainty in Artificial Intelligence (UAI) (Peter Grünwald and Peter Spirtes, eds.), AUAI Press, 2010. Luis David Garcı́a-Puente, Sonja Petrović, and Seth Sullivant, Graphical models, J. Softw. Algebra Geom. 5 (2013), 1–7. MR 3073716 Dan Geiger, David Heckerman, Henry King, and Christopher Meek, Stratified exponential families: graphical models and model selection, Ann. Statist. 29 (2001), no. 2, 505–529. MR 1863967 Dan Geiger, Thomas Verma, and Judea Pearl, Identifying independence in Bayesian networks, Networks 20 (1990), no. 5, 507–534, Special issue on influence diagrams. MR 1064736 Daniel R. Grayson and Michael E. Stillman, Macaulay2, a software system for research in algebraic geometry, Available at http://www.math.uiuc.edu/Macaulay2/. Frank Harary, The determinant of the adjacency matrix of a graph, SIAM Rev. 4 (1962), 202–210. MR 0144330 Dominique M. A. Haughton, On the choice of a model to fit data from an exponential family, Ann. Statist. 16 (1988), no. 1, 342–355. MR 924875 Alain Hauser and Peter Bühlmann, Jointly interventional and observational data: estimation of interventional Markov equivalence classes of directed acyclic graphs, J. R. Stat. Soc. Ser. B. Stat. Methodol. 77 (2015), no. 1, 291–318. MR 3299409 Jan T. A. Koster, Marginalizing and conditioning in graphical models, Bernoulli 8 (2002), no. 6, 817–840. Gustavo Lacerda, Peter Spirtes, Joseph Ramsey, and Patrik Hoyer, Discovering cyclic causal models by independent components analysis, Proceedings of the Twenty-Fourth Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-08) (Corvallis, Oregon), AUAI Press, 2008, pp. 366–374. Steffen L. Lauritzen, Graphical models, Oxford University Press, 1996. Dennis Leung, Mathias Drton, and Hisayuki Hara, Identifiability of directed Gaussian graphical models with one latent source, Electron. J. Stat. 10 (2016), no. 1, 394–422. MR 3466188 38 MATHIAS DRTON 48. Radim Lněnička and František Matúš, On Gaussian conditional independent structures, Kybernetika (Prague) 43 (2007), no. 3, 327–342. MR 2362722 49. Judea Pearl, Causality, second ed., Cambridge University Press, Cambridge, 2009, Models, reasoning, and inference. MR 2548166 (2010i:68148) 50. Thomas Richardson and Peter Spirtes, Ancestral graph Markov models, Ann. Statist. 30 (2002), no. 4, 962–1030. MR 1926166 (2003h:60017) 51. Thomas S. Richardson, A characterization of Markov equivalence for directed cyclic graphs, International Journal of Approximate Reasoning 17 (1997), no. 2/3, 107–162. 52. Hajir Roozbehani and Yury Polyanskiy, Algebraic methods of classifying directed graphical models, 2014 IEEE International Symposium on Information Theory, June 2014, pp. 2027– 2031. 53. Nathaniel Shiers, Piotr Zwiernik, John A. D. Aston, and Jim Q. Smith, The correlation space of Gaussian latent tree models and model selection without fitting, Biometrika (2016), forthcoming. 54. Shohei Shimizu, LiNGAM: Non-Gaussian methods for estimating causal structures, Behaviormetrika 41 (2014), no. 1, 65–98. 55. Ilya Shpitser, Robin Evans, Thomas Richardson, and James Robins, Introduction to nested Markov models, Behaviormetrika 41 (2014), no. 1, 3–39. 56. Ilya Shpitser and Judea Pearl, Identification of joint interventional distributions in recursive semi-Markovian causal models, Proceedings of the Twenty-First National Conference on Artificial Intelligence (Menlo Park, CA), AAAI Press, 2006, pp. 1219–1226. 57. Peter Spirtes, Clark Glymour, and Richard Scheines, Causation, prediction, and search, second ed., Adaptive Computation and Machine Learning, MIT Press, Cambridge, MA, 2000, With additional material by David Heckerman, Christopher Meek, Gregory F. Cooper and Thomas Richardson, A Bradford Book. MR 1815675 (2001j:62009) 58. Peter Spirtes, Thomas Richardson, Chris Meek, Richard Scheines, and Clark Glymour, Using path diagrams as a structural equation modelling tool, Sociological Methods and Research 27 (1998), 182–225. 59. Paul D. Stolley, When genius errs: R. A. Fisher and the lung cancer controversy, Am. J. Epidemiol. 133 (1991), no. 5, 416–425. 60. Milan Studený, Probabilistic conditional independence structures, Information Science and Statistics, Springer, London, 2005. MR 3183760 61. Seth Sullivant, Algebraic geometry of Gaussian Bayesian networks, Adv. in Appl. Math. 40 (2008), no. 4, 482–513. MR 2412156 , A Gröbner basis for the secant ideal of the second hypersimplex, J. Commut. Algebra 62. 1 (2009), no. 2, 327–338. MR 2504939 63. Seth Sullivant and Elizabeth Gross, The maximum likelihood threshold of a graph, arXiv:1404.6989, 2014. 64. Seth Sullivant, Kelli Talaska, and Jan Draisma, Trek separation for Gaussian graphical models, Ann. Statist. 38 (2010), no. 3, 1665–1685. MR 2662356 (2011f:62076) 65. Jin Tian, Identifying direct causal effects in linear models, Proceedings of the Twentieth National Conference on Artificial Intelligence (AAAI), 2005, pp. 346–353. 66. Jin Tian and Judea Pearl, A general identification condition for causal effects, AAAI/IAAI, 2002, pp. 567–573. 67. Caroline Uhler, Geometry of maximum likelihood estimation in Gaussian graphical models, Ann. Statist. 40 (2012), no. 1, 238–261. MR 3014306 68. Lieven Vandenberghe and Martin S. Andersen, Chordal graphs and semidefinite optimization, Foundations and Trends in Optimization 1 (2014), no. 4, 241–433. 69. Thomas S. Verma and Judea Pearl, Equivalence and synthesis of causal models, Uncertainty in Artificial Intelligence 6, Elsevier, 1991, UCLA Cognitive Systems Laboratory, Technical Report (R-150), pp. 255–268. 70. Sumio Watanabe, Algebraic geometry and statistical learning theory, Cambridge Monographs on Applied and Computational Mathematics, vol. 25, Cambridge University Press, Cambridge, 2009. MR 2554932 71. Nanny Wermuth, Probability distributions with summary graph structure, Bernoulli 17 (2011), no. 3, 845–879. MR 2817608 72. Sewall Wright, Correlation and causation, J. Agricultural Research 20 (1921), 557–585. 73. , The method of path coefficients, Ann. Math. Statist. 5 (1934), no. 3, 161–215. STRUCTURAL EQUATION MODELS 39 74. Hui Zhao, Zhongguo Zheng, and Baijun Liu, On the Markov equivalence of maximal ancestral graphs, Sci. China Ser. A 48 (2005), no. 4, 548–562. MR 2157690 (2006e:62069) Department of Statistics, University of Washington
10math.ST
arXiv:1610.06864v3 [math.GR] 30 Jan 2018 A NOTE ON THE ACYLINDRICAL HYPERBOLICITY OF GROUPS ACTING ON CAT(0) CUBE COMPLEXES INDIRA CHATTERJI AND ALEXANDRE MARTIN Abstract. We study the acylindrical hyperbolicity of groups acting by isometries on CAT(0) cube complexes, and obtain simple criteria formulated in terms of stabilisers for the action. Namely, we show that a group acting essentially and non-elementarily on a finite dimensional irreducible CAT(0) cube complex is acylindrically hyperbolic if there exist two hyperplanes whose stabilisers intersect along a finite subgroup. We also give further conditions on the geometry of the complex so that the result holds if we only require the existence of a single pair of points whose stabilisers intersect along a finite subgroup. 1. Introduction A group is called acylindrically hyperbolic if it is not virtually cyclic and admits an acylindrical action with unbounded orbits on a hyperbolic geodesic metric space. Acylindrically hyperbolic groups form a large class of groups, introduced by Osin [Osi16], displaying strong hyperbolic-like features: They encompass mapping class groups of hyperbolic surfaces [Bow08], relatively hyperbolic groups [Osi06], the plane Cremona group [CL13, Lon16], and many more. The notion of acylindrical hyperbolicity has gathered a lot of interest in recent years due to the strong algebraic and analytical consequences it implies for the group (we refer to [Osi16] and details therein). In this article, we study the acylindrical hyperbolicity of groups acting by isometries on CAT(0) cube complexes. Our goal is to obtain simple acylindrical hyperbolicity criteria for such groups. Recall that an action on a CAT(0) cube X complex is called essential if no orbit remains at bounded distance from a half-space of X, and that it is called non-elementary if it does not admit a finite orbit in X ∪ ∂∞ X. Our first criterion is formulated in terms of hyperplanes stabilisers, and generalises to finite dimensional CAT(0) cube complexes a criterion due to Minasyan–Osin for actions on simplicial trees [MO15]: Theorem 1.1. Let G be a group acting essentially and non-elementarily on an irreducible finite-dimensional CAT(0) cube complex. If there exist two hyperplanes whose stabilisers intersect along a finite subgroup, then G is acylindrically hyperbolic. 1 2 INDIRA CHATTERJI AND ALEXANDRE MARTIN In the previous theorem, we do not require the two hyperplanes to be disjoint, or even distinct. In particular, the conclusion holds if there exists a hyperplane of X whose stabiliser is weakly malnormal, i.e. it intersects some conjugate along a finite subgroup. It should be noted that the above theorem does not reduce to the aforementioned criterion of Minasyan–Osin, as groups acting on CAT(0) cube complexes do not virtually act on a simplicial tree a priori. Anthony Genevois has also obtained criteria for acylindrical hyperbolicity of a similar flavour, using different tools. In particular, his approach can be used to recover Theorem 1.1, see [Gen16b, Remark 21]. We give an application of Theorem 1.1 to Artin groups of FC type, suggested to us by Ruth Charney. Artin groups span a large range of groups, and include for instance free groups, braid groups, free abelian groups, as well as many more exotic groups. Artin groups and their subgroups are a rich source of examples and counterexamples of interesting phenomena in geometry and group theory. Theorem 1.2. Non-virtually cyclic Artin groups of FC type whose underlying Coxeter graphs have diameter at least 3 are acylindrically hyperbolic. Artin groups of FC type and the proof of the above theorem will be discussed in Section 5. In the case of Artin groups of FC type whose Coxeter graphs have diameter 1, i.e. Artin groups of finite type, Calvez and Wiest [CW16] showed, using different techniques, that the quotient of such groups by their centre is acylindrically hyperbolic. As a corollary of Theorem 1.1, we obtain the following results for actions satisfying a weak notion of acylindricity or properness: Corollary 1.3. Let G be a group acting essentially and non-elementarily on an irreducible finite-dimensional CAT(0) cube complex X. Assume that the action is non-uniformly weakly acylindrical, that is, there exists a constant L ≥ 0 such that only finitely many elements of G fix two points of X at distance at least L. Then G is acylindrically hyperbolic. Corollary 1.4. A group acting essentially, non-elementarily, and with finite vertex stabilisers on a finite dimensional irreducible CAT(0) cube complex is acylindrically hyperbolic. Corollary 1.3 was already known if the complex is in addition assumed to be hyperbolic (see [Mar15] for the proof in dimension 2 and [Gen16a] for the general case). Corollary 1.4 was already known if in addition the action is assumed to be metrically proper, by work of Caprace–Sageev on the existence of rank one isometries of CAT(0) cube complexes [CS11]. Anthony Genevois informed us that he found independently similar results, using different techniques [Gen16b]. In Theorem 1.1 and its corollaries, the essentiality assumption could be weakened to the assumption that the essential core is irreducible, a condition that is a priori non-trivial to check. Notice however that the ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 3 other assumptions cannot be removed. The non-acylindrically hyperbolic group Z acts properly and essentially, but elementarily, on the real line with its standard simplicial structure. The groups of Burger–Mozes provide examples of cocompact lattices in the product of two trees whose associated actions are essential, non-elementary, and without fixed point at infinity, yet these groups are not acylindrically hyperbolic as they are simple [BM00]. Thompson’s groups V and T act properly, non-elementarily, and without fixed point at infinity on an infinite dimensional irreducible CAT(0) cube complex [Far08], but are not acylindrically hyperbolic as they are simple. We also obtain stronger criteria, that allow us to deduce the acylindrical hyperbolicity of a group from information on the stabilisers of a single pair of points (see Theorem 4.2 for the general statement). For this, we impose further conditions on the complex: We say that a CAT(0) cube complex is cocompact if its automorphism group acts cocompactly on it, and we say that it has no free face if every non-maximal cube is contained in at least two maximal cubes. We prove the following: Theorem 1.5. Let G be a group acting essentially and non-elementarily on an irreducible finite-dimensional cocompact CAT(0) cube complex with no free face. If there exist two points whose stabilisers intersect along a finite subgroup, then G is acylindrically hyperbolic. To show the acylindrical hyperbolicity of a group G through its action on a geodesic metric space X, a useful criterion introduced by BestvinaBromberg-Fujiwara [BBF14, Theorem H] is to find an infinite order element of the group whose orbits are strongly contracting and which satisfies the so-called WPD condition. However, this condition, formulated in terms of coarse stabilisers of pairs of points, is generally cumbersome to check for actions on non-locally finite spaces. In [Mar16a], the second author introduced a different criterion involving a weakening of this condition formulated purely in terms of stabilisers of pairs of points, making it much more tractable (see Theorem 2.3 for the exact formulation). The price to pay is to find group elements satisfying a strengthened notion of contraction of their orbits, called über-contractions. The second author showed that such contractions abound for actions on non-locally compact spaces under mild assumptions on the stabilisers of vertices, and used it to show the acylindrical hyperbolicity of the tame automorphism group of an affine quadric threefold, a subgroup of the Cremona group Bir(P3 (C)). In this article, we provide a different way to construct über-contractions for groups acting on CAT(0) cube complexes, this time using the very rich combinatorial geometry of their hyperplanes. This construction relies heavily on the existence of hyperplanes with strong separation properties, called über-separated hyperplanes, and introduced by Chatterji–Fernós–Iozzi [CFI16]. Such hyperplanes were used to prove a superrigidity phenomenon for groups acting non-elementarily on CAT(0) cube complexes. 4 INDIRA CHATTERJI AND ALEXANDRE MARTIN Acknowledgement. The authors warmly thank Talia Fernós for producing the example in Remark 4.4, Michah Sageev for discussions related to Proposition 4.3, Carolyn Abbott for noticing Theorem 1.2 and Ruth Charney for pointing it out to us, along with the explanations of Section 5. We also thank Anthony Genevois for remarks on an early version of this article, Ruth Charney and Rose Morris-Wright for spotting a gap in the proof of Theorem 1.2, and the anonymous referee for their interesting comments. The first author is partially supported by the Institut Universitaire de France (IUF) and the ANR GAMME. The second author is partially supported by the Austrian Science Fund (FWF) grant M1810-N25. This work was completed while the two authors were in residence at MSRI during the Fall 2016 “Geometric Group Theory” research program, NSF Grant DMS1440140. They thank the organisers for the opportunity to work in such a stimulating environment. 2. Über-contractions and acylindrical hyperbolicity Recall that, given a group G acting on a geodesic metric space X, the action is called acylindrical if for every r ≥ 0 there exist constants L(r), N (r) ≥ 0 such that for every points x, y of X at distance at least L(r), |{g ∈ G|d(x, gx) ≤ r, d(y, gy) ≤ r}| ≤ N (r). A group is acylindrically hyperbolic if it is not virtually cyclic and admits an acylindrical action with unbounded orbits on a hyperbolic geodesic metric space. Given a group action on an arbitrary geodesic space, the following criterion was introduced by Bestvina–Bromberg–Fujiwara to prove the acylindrical hyperbolicity of the group: Theorem 2.1 ([BBF14, Theorem H]). Let G be a group acting by isometries on a geodesic metric space X. Let g be a group element of infinite order with quasi-isometrically embedded orbits, and assume that the following holds: • the group element g is strongly contracting, that is, there exists a point x of X such that the closest-point projections on the hgi-orbit of x of the balls of X that are disjoint from hgix have uniformly bounded diameter, • the group element g satisfies the WPD condition, that is, for every r ≥ 0 and every point x of X, there exists an integer m such that only finitely many elements h of G satisfy d(x, hx), d(g m x, hg m x) ≤ r. Then G is either virtually cyclic or acylindrically hyperbolic.  The following notion, introduced in [Mar16a], provides an easier way to prove the acylindrical hyperbolicity of a group. Definition 2.2. Let X be a geodesic metric space and let h be an isometry of X with quasi-isometrically embedded orbits. A system of checkpoints for h is the data of a finite subset S of X, the checkpoint, as well as an error ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 5 S constant L ≥ 0 and a quasi-isometry f : Λ := i∈Z hi S → R such that we have the following: Let x, y be points of X and let x′ , y ′ be closest-point projections on Λ of x, y respectively. For every checkpoint Si := hi S, i ∈ Z, such that: • Si coarsely separates x′ and y ′ , i.e. f (x′ ) and f (y ′ ) lie in different unbounded connected components of R \ f (Si ), • Si is at distance at least L from both x′ and y ′ , then every geodesic between x and y meets Si . A hyperbolic isometry h of X is über-contracting, or is an über-contraction, if it admits such a system of checkpoints. We will be using the following criterion for acylindrical hyperbolicity: Theorem 2.3 (Theorem 1.2 of [Mar16a]). Let G be a group acting by isometries on a geodesic metric space X. Let g ∈ G be an infinite order element such that the following holds: (i) the group element g is über-contracting with respect to a system of checkpoints (gi S)i∈Z, (ii) There exists a constant m0 such that for every point s ∈ S and every m ≥ m0 , only finitely many elements of G fix pointwise s and g m s. Then G is either virtually cyclic or acylindrically hyperbolic.  Note that condition (ii) of the previous theorem is a considerable weakening of the WPD condition for g. This weaker condition has the advantage of involving only stabilisers of pairs of points, which makes it much easier to use. 3. Über-separated hyperplanes and the proof of Theorem 1.1 We now recall a few basic facts concerning CAT(0) cube complexes, and more precisely the notions of bridges and über-separated pairs, which are crucial to prove Theorems 1.1 and 1.5. The missing details and proofs can be found in [CFI16]. By a slight abuse of notation, we will identify a CAT(0) cube complex with its vertex set endowed with the graph metric coming from its 1-skeleton. Each hyperplane separates the vertex set into two disjoint components, which we refer to as halfspaces. The following notion was introduced by Behrstock–Charney in [BC12]: Definition 3.1. Two parallel hyperplanes of a CAT(0) cube complex are said to be strongly separated if no hyperplane is transverse to both. By the usual abuse of terminology, we say that two halfspaces are strongly separated if the corresponding hyperplanes are. We will need tools introduced by Caprace–Sageev [CS11]. Recall that a family of n pairwise crossing hyperplanes divides a CAT(0) cube complex into 2n regions called sectors. 6 INDIRA CHATTERJI AND ALEXANDRE MARTIN Lemma 3.2 (Caprace–Sageev [CS11, Proposition 5.1, Double-Skewering Lemma, Lemma 5.2]). Let X be a finite dimensional irreducible CAT(0) cube complex and let G → Aut(X) be a group acting essentially and without fixed points in X ∪ ∂∞ X. • (Strong Separation Lemma) Let h1 be a halfspace of X. Then there exists a halfspace h2 such that h1 ⊂ h2 and such that h1 and h2 are strongly separated. • (Double-Skewering Lemma) Let h1 ⊂ h2 be two nested halfspaces. Then there exists an element g ∈ G that double-skewers h1 and h2 , that is, such that h1 ⊂ h2 ⊂ gh1 . • (Sector Lemma) Let ĥ1 , ĥ2 be two transverse hyperplanes. Then we can choose two disjoint hyperplanes ĥ3 and ĥ4 that are contained in opposite sectors determined by ĥ1 and ĥ2 .  We will need a finer notion of strong separation of halfspaces, which is less standard but will be key to our work. Definition 3.3. Two strongly separated halfspaces h1 and h2 are said to be an über-separated pair if for any two halfspaces k1 , k2 with the property that hi and ki are transverse for i = 1, 2, then k1 and k2 are parallel. We say that two strongly separated hyperplanes are über-separated if their halfspaces are. Note that pairs of über-separated hyperplanes correspond exactly to pairs of hyperplanes at distance at least 4 in the intersection graph. Remark 3.4. If h ⊂ k ⊂ ℓ are pairwise strongly separated halfspaces, then h and ℓ are über-separated. Notice that über-separated pairs are in particular strongly separated and hence they do not exist in the reducible case by [CS11, Proposition 5.1]. The existence of über-separated hyperplanes is a consequence of the DoubleSkewering Lemma 3.2. We will need the following lemma, which is a direct consequence of the Double-Skewering Lemma 3.2 and [CFI16, Lemma 2.14]: Lemma 3.5. Let X be a finite dimensional irreducible CAT(0) cube complex and G → Aut(X) a group acting essentially and non-elementarily. Given any two parallel hyperplanes ĥ1 and ĥ2 , there exists g ∈ G that doubleskewers ĥ1 and ĥ2 and such that ĥ1 and g ĥ1 are über-separated.  For two points x, y of X, we denote by I(x, y) the interval between x and y, that is, the union of all the geodesics between x and y. Recall that intervals are finite, as they only depend on the (finite) set of hyperplanes separating the given pair of points. Definition 3.6. Let h1 ⊂ h2 be a nested pair of halfspaces. The (combinatorial) bridge between ĥ1 and ĥ2 , denoted b(ĥ1 , ĥ2 ), is the union of all the geodesics between points x1 ∈ h1 and x2 ∈ h∗2 minimizing the distance between h1 and h∗2 . ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 7 Lemma 3.7 (Lemma 2.18 and 2.24 [CFI16]). If h1 ⊂ h2 be a pair of nested halfspaces, strongly separated, there exists a unique pair of points of h1 × h∗2 , called the gates of the bridge, that minimizes the distance between h1 and h∗2 , i.e. there exist points x1 ∈ h1 and x2 ∈ h∗2 such that b(ĥ1 , ĥ2 ) = I(x1 , x2 ). In particular, the bridge between two strongly separated hyperplanes is finite. Moreover, the following holds true for any y1 ∈ h1 and y2 ∈ h∗2 . d(y1 , y2 ) = d(y1 , x1 ) + d(x1 , x2 ) + d(x2 , y2 ).  The following is a very important feature of über-separated pairs. Lemma 3.8 (Proof of Lemma 3.5 of [CFI16]). Let h1 ⊂ h2 be an überseparated pair of halfspaces, x ∈ h1 and y ∈ h∗2 . Then every geodesic between x and y meets the bridge b(ĥ1 , ĥ2 ).  The following lemma explains the relationship between über-separated pairs and über-contractions. Lemma 3.9. Let h1 ⊂ h2 be an über-separated pair of halfspaces, and g ∈ G an element that double-skewers h1 and h2 . Then g is an über-contraction. Proof. Let B denote the bridge between h1 and gh1 . We will show that the collection of the g-translates of B forms a system of checkpoints. Notice that since the bridge is an interval, it is finite even though the complex is not assumed to S be locally finite, hence all the checkpoints Sn := gn B are finite. Set Λ := n∈Z Sn . Let Y := h∗1 ∩ gh1 and Yn := g n Y for every n ∈ Z. For every point x ∈ Yn , we have that its closest-point projections on Λ are in Sn−1 ∪ Sn ∪ Sn+1 : Indeed, since h1 and gh1 are über-separated, it follows from Lemma 3.8 that a geodesic between x and a point x′ ∈ Yn′ with n′ ≥ n+2 (n′ ≤ n−2 respectively) meets the bridge Sn+1 (Sn−1 respectively). Moreover, for every x ∈ X which projects on Λ to a point of Sn , we have that x ∈ Yn−1 ∪ Yn ∪ Yn+1 for the same reasons. Thus, for x, y ∈ X which project on Λ to points x′ ∈ Sn and y ′ ∈ Sm respectively with m ≥ n + 4, it follows that x and y are separated by the hyperplanes gn+2 ĥ1 , . . . , g m−1 ĥ1 , hence every geodesic between x and y meets each checkpoint Sn+2 , . . . , Sm−2 by Lemma 3.8. By a result of Haglund [Hag07, Theorem 1.4], g admits a combinatorial axis Λg . As Λ and Λg stay at bounded distance from one another, it follows easily from the discussion of the previous paragraph that Λg is contained in Λ. Since B is finite, the closest-point projection Λ → Λg yields a quasiisometry Λ → R, and it is now straightforward to check that g is an übercontraction.  Proof of Theorem 1.1. Let G be a group acting essentially and nonelementarily on an irreducible finite-dimensional CAT(0) cube complex X 8 INDIRA CHATTERJI AND ALEXANDRE MARTIN and assume that there exist two hyperplanes whose stabilisers intersect along a finite subgroup. By Proposition 2.3, it is enough to construct an element of G satisfying conditions (i) and (ii) of Proposition 2.3. Let ĥ1 and ĥ2 be two hyperplanes whose stabilisers intersect along a finite subgroup. We start by showing that we can assume that ĥ1 and ĥ2 are disjoint. By the Sector Lemma 3.2, we choose two disjoint hyperplanes ĥ3 and ĥ4 that are contained in opposite sectors determined by ĥ1 and ĥ2 . Up to applying the Strong Separation Lemma 3.2, we can further assume that ĥ3 and ĥ4 are strongly separated. Let H := Stab(ĥ3 ) ∩ Stab(ĥ4 ). Then H stabilises the bridge between ĥ3 and ĥ4 , which is a single interval by Lemma 3.7 since ĥ3 and ĥ4 are strongly separated. As intervals are finite, H virtually fixes a geodesic between ĥ3 and ĥ4 . As ĥ3 and ĥ4 are in opposite sectors determined by ĥ1 and ĥ2 , such a geodesic crosses both ĥ1 and ĥ2 . Thus, H is virtually contained in Stab(ĥ1 ) ∩ Stab(ĥ2 ), hence H is finite, which is what we wanted. Thus, let ĥ1 and ĥ2 be two disjoint hyperplanes whose stabilisers intersect along a finite subgroup. By Lemma 3.5, we choose an element g of G that double-skewers ĥ1 and ĥ2 , and such that ĥ1 and gĥ1 are über-separated. Then according to Lemma 3.9 the element g is an über-contraction, proving (i). Let x be a point of the bridge between ĥ1 and ĥ2 , and choose a geodesic γ between x and g 2 x. We have that γ crosses g ĥ1 and gĥ2 . Since intervals in a finite dimensional CAT(0) cube complex are finite, a subgroup fixing both x and g 2 x virtually fixes γ pointwise. It follows that Stab(x) ∩ Stab(g2 x) is virtually contained in a conjugate of Stab(ĥ1 )∩Stab(ĥ2 ), which is finite. This proves (ii) , and Proposition 2.3 implies that G is either virtually cyclic or acylindrically hyperbolic. The action being non-elementarily, the virtually cyclic case is automatically ruled out, which concludes the proof.  Proof of Corollaries 1.3 and 1.4. Since Corollary 1.4 is a direct consequence of Corollary 1.3, let us assume that the group G acts essentially, nonelementarily, and non-uniformly weakly acylindrically (with a constant L as in the statement) on the irreducible finite-dimensional CAT(0) cube complex X. By the Strong Separation Lemma 3.2, choose two disjoint hyperplanes ĥ1 and ĥ2 . This implies that the combinatorial bridge between ĥ1 and ĥ2 is not reduced to a point. Moreover, the subgroup Stab(ĥ1 ) ∩ Stab(ĥ2 ) is virtually contained in the pointwise stabiliser of the finite bridge between ĥ1 and ĥ2 by Lemma 3.7. By the Double-Skewering Lemma 3.2, choose a group element g that skewers both ĥ1 and ĥ2 . For n large enough, ĥ1 and gn ĥ1 are über-separated, and the distance between ĥ1 and gn ĥ1 becomes greater than L by Lemma 3.7. In particular, Stab(ĥ1 ) ∩ Stab(g n ĥ1 ) virtually fixes a path of length L, hence Stab(ĥ1 ) ∩ Stab(gn ĥ1 ) is finite by weak acylindricity. Corollary 1.3 now follows from Theorem 1.1.  ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 9 Theorem 1.1 allows for a very simple geometric proof of the acylindrical hyperbolicity of certain groups: Example 3.10. The Higman group on n ≥ 4 generators, defined by the following presentation: 2 Hn := hai , i ∈ Z/nZ | ai ai+1 a−1 i = ai+1 , i ∈ Z/nZi, was proved to be acylindrically hyperbolic by Minasyan–Osin [MO15], by means of its action on the Bass–Serre tree associated to some splitting. The Higman also acts cocompactly, essentially, and non-elementarily on a CAT(0) square complex associated to its standard presentation. That CAT(0) square complex is irreducible, as links of vertices are easily shown not to be complete bipartite graphs (see [Mar16b, Corollary 4.6]). Since square stabilisers are trivial by construction, the stabilisers of two crossing hyperplanes intersect along a finite (actually, trivial) subgroup. Thus, Theorem 1.1 applies. 4. Proof of Theorem 1.5 Definition 4.1. Let X be CAT(0) cube complex and C, C ′ two cubes of X. We say that C and C ′ separate a pair of hyperplanes if there exist two hyperplanes ĥ, ĥ′ of X such that each hyperplane defined by an edge of C ∪ C ′ separates ĥ and ĥ′ . Theorem 1.5 will be a consequence of the following more general result: Theorem 4.2. Let G be a group acting essentially and non-elementarily on a finite dimensional irreducible CAT(0) cube complex. Assume that there exist two maximal cubes C, C ′ of X whose stabilisers intersect along a finite subgroup, and such that C and C ′ separate a pair of hyperplanes. Then G is acylindrically hyperbolic. Proof. Let HC,C ′ be the set of hyperplanes defined by the edges of C ∪ T C ′ . Since C and C ′ are maximal cubes, we have that k̂∈H ′ Stab(k̂) is C,C T contained in Stab(C) ∩ Stab(C ′ ), and it follows that k̂∈H ′ Stab(k̂) is C,C finite. By assumption, choose two disjoint halfspaces h, h′ separated by each hyperplane of HC,C ′ . Up to applying the Strong Separation Lemma 3.2, we can further assume that h and h′ are strongly separated. In particular, since the bridge between h and h′ is finite by Lemma 3.7, it follows that Stab(ĥ) ∩ Stab(ĥ′ ) is virtually contained in the pointwise stabiliser of a geodesic between the two gates of the bridge b(ĥ, ĥ′ ). As such a geodesic crosses each hyperplane of HC,C ′ by construction of h, h′ , it follows that T Stab(ĥ) ∩ Stab(ĥ′ ) is virtually contained in k̂∈H ′ Stab(k̂), which is finite C,C by the above argument. Thus, Stab(h) ∩ Stab(h′ ) is finite, and we conclude with Theorem 1.1.  10 INDIRA CHATTERJI AND ALEXANDRE MARTIN The following proposition gives a class of examples of CAT(0) cube complexes where each pair of cubes separates a pair of hyperplanes: Proposition 4.3. Let X be an irreducible CAT(0) cube complex without free face, and such that Aut(X) acts cocompactly on X. Then each pair of cubes separates a pair of hyperplanes. Remark 4.4. The following example, due to Talia Fernós, shows that the no-free-face assumption is necessary in Proposition 4.3. Take a 3-dimensional cube [0, 1]3 and glue an edge to each of the vertices (1, 0, 0), (0, 1, 0), (0, 0, 1) and (1, 1, 1) to get a spiked cube. Then glue infinitely many of these spiked cubes in a tree-like way, to obtain a cocompact CAT(0) cube complex X which is quasi-isometric to a tree. Then none of the 3-cubes of that complex is separating a pair of hyperplanes. Indeed, each 3-cube has three hyperplanes defining it, hence it defines eight sectors, out of which four contain hyperplanes and four are reduced to a single point, but among the sectors containing hyperplanes, no two are opposite. Before proving Proposition 4.3, we start by a simple observation: Lemma 4.5. A CAT(0) cube complex with no free face is geodesically complete, that is, every finite geodesic can be extended to a bi-infinite geodesic. Proof. Let γ be a finite geodesic defined by a sequence e1 , . . . , en of edges of X and let v be the terminal vertex of that finite geodesic. We will show that we can extend it by one edge. Let E denote the set of edges of X, containing v and such that γ followed by e ∈ E is not a geodesic. Then, every e ∈ E has to be parallel to one of the edges ei defining γ, that is, every e ∈ E defines a hyperplane ĥe crossed by γ. Moreover, the map e 7→ ĥe is injective as two adjacent edges cannot belong to the same hyperplane, and any two ĥe , ĥe′ intersect. Indeed, for an edge e to belong to E it means that γ has been traveling on the carrier of the hyperplane defined by some ei after having crossed ei , and that can be done simultaneously for several hyperplanes only when they cross each other. Hence E defines a cube in X, and since there are no free faces there is an edge e containing v and that does not belong to E, allowing us to extend by one edge the geodesic γ.  We will also need the following strengthening of the Sector Lemma: Lemma 4.6 (Strong Sector Lemma). Let X be a CAT(0) cube complex with no free face, and assume that the automorphism group of X acts cocompactly on X. Then each sector determined by a finite family of pairwise crossing hyperplanes contains a hyperplane. Proof. We prove the result by induction on the number n ≥ 2 of pairwise crossing hyperplanes. For n = 2, the result follows from [Sag14, Proposition 3.3], since a CAT(0) cube complex with no free face is geodesically complete by Lemma 4.5. Let ĥ1 , . . . , ĥn be a family of pairwise crossing hyperplanes, ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 11 and let hi be a halfspace associated to ĥi for every i. We want to construct T a hyperplane contained in i hi . By Helly’s theorem, the family (ĥi ∩ ĥ1 )i6=1 defines a family of pairwise crossing hyperplanes of ĥ1 . Note that ĥ1 also satisfies the property of having no free face, and the action of Stab(ĥ1 ) on ĥ1 is cocompact, as the same holds for the action of Aut(X) on X. Thus, one can apply the induction hypothesis T to find a hyperplane ĥ′ of ĥ1 contained in the sector i6=1 (ĥ1 ∩ hi ). This defines a hyperplane of X, which we denote ĥ. Since ĥ′ is disjoint from the ĥ1 ∩ ĥi for i 6= 1, it follows from Helly’s theorem that ĥ is disjoint from the T ĥi for i 6= 1. Thus, let h be the halfspace of ĥ contained in i6=1 hi . Since ĥ and ĥ1 cross, we can choose by the induction hypothesis a hyperplane T contained in the sector h ∩ h1 , hence in i hi .  Proof of Proposition 4.3. It is enough to prove the proposition when C and C ′ are maximal. Choose x and x′ vertices of C, C ′ respectively that maximize the distance between vertices of C and C ′ . Let HC , HC ′ be the family of hyperplanes defined by an edge of C, C ′ respectively. By the Strong Sector Lemma 4.6, each sector determined by HC or HC ′ contains a hyperplane. Thus, choose a hyperplane ĥ (ĥ′ respectively) in the unique sector determined by HC (HC ′ respectively) that contains x (x′ respectively). By construction of x and x′ , we have that x and x′ are in opposite sectors defined by HC , and in opposite sectors determined by HC ′ . In particular, every hyperplane of HC,C ′ separates x and x′ , hence separates ĥ and ĥ′ .  Proof of Theorem 1.5. Theorem 1.5 is a direct consequence of Theorem 4.2 and Proposition 4.3.  Theorem 1.5 allows for a very simple geometric proof of the acylindrical hyperbolicity of certain groups: Example 4.7. The group of tame automorphisms of an affine quadric threefold, a subgroup of the 3-dimensional Cremona group Bir(P3 (C)), acts cocompactly, essentially and non-elementarily on a hyperbolic CAT(0) cube complex without free face [BFL14]. The second author showed that there exist two cubes whose stabilisers intersect along a finite subgroup [Mar16a, Proof of Theorem 3.1], hence Theorem 1.5 applies. 5. Artin groups of type FC We now give an application of our results to the class of Artin groups of FC type, studied by Charney and Davis in [CD95] and that we now describe. Recall that a Coxeter graph is a finite, simplicial graph Γ with vertex set S and edges labeled by integers greater or equal to 2. The label of the edge connecting two vertices s and t is denoted m(s, t), and we set m(s, t) = ∞ if s and t are not connected by an edge. The Artin group associated to a 12 INDIRA CHATTERJI AND ALEXANDRE MARTIN Coxeter graph Γ is the group given by the presentation: * A= + S| sts | {z. .}. |s, t connected by an edge with label m(s, t) . | {z. .}. = tst m(s,t) m(s,t) Adding the extra relations s2 = 1 for all s ∈ S, we obtain a Coxeter group W as a quotient of A. We say that A is finite type if the associated Coxeter group W is finite. It was shown in [vdL83] that, if T ⊆ S, the subgroup AT generated by T is isomorphic to the Artin group associated to the full subgraph of Γ spanned by T . Such subgroups are called special subgroups of A. Following Charney–Davis, we say that an Artin group is of FC type if every complete subgraph of the Coxeter graph Γ generates a special subgroup of finite type. Given an Artin group A, the Deligne complex DA is the cubical complex defined as follows: Vertices of DA correspond to cosets aAT , where a ∈ A and T ⊆ S. Note that we allow T = ∅, in which case aAT = {a}. The 1 of D is obtained by putting an edge between cosets of the 1-skeleton DA A form aAT and aAT ′ , when T ′ = T ∪ {t′ } for some t′ ∈ S \ T . In particular, each edge of DA is labeled by an element of S. Finally, DA is obtained by 1 contains a “filling the cubes”, that is, by glueing a k-cube whenever DA subgraph isomorphic to the 1-skeleton of a k-cube. In [CD95] Theorem 4.3.5 Charney and Davis show that the Deligne complex DA of an Artin group A is a CAT(0) cube complex if and only if A is of FC type. Edges and hyperplanes in this CAT(0) cube complex are labeled by elements of S. Moreover, each hyperplane is a translate of a hyperplane ĥs for some s ∈ S, where ĥs denotes the hyperplane defined by the edge between {1} and A{s} . It is straightforward to check that the stabiliser of ĥs is the special subgroup Alk(s) of A determined by the link of the vertex s in Γ. The dimension of an Artin group is the maximum cardinality of a subset T ⊆ S such that AT is finite type, and it is equal to the dimension of DA . In particular, DA is finite dimensional since the graph Γ is finite. The Artin group A acts by left multiplication on the aforementioned cosets, and hence acts by isometries on DA . Since Γ is finite, the action is cocompact. The stabilizer of a vertex aAT of DA is the subgroup aAT a−1 . In particular, the action is not proper if Γ is non-empty. The action satisfies the following: Proposition 5.1. Let A be an Artin group of type FC associated to a Coxeter graph Γ of diameter at least 3. Then the Deligne complex DA is irreducible and the action of A on DA is essential and non-elementary. The proof will take most of this section. We can assume that Γ is connected for otherwise A is a free product, DA has a structure of a tree of spaces, and the result follows. We check separately the irreducibility of the ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 13 Deligne complex, the essentiality of the action, and the non-elementarity of the action. Lemma 5.2. The CAT(0) cube complex DA is irreducible. Proof. Consider the vertex {1} of DA , where 1 denotes the identity element. The labeling of the edges of DA yields a surjective map lk({1}) → Γ. As Γ has diameter at least 3, so does lk({1}), and it follows that lk({1}) is not a join, hence DA is an irreducible CAT(0) cube complex.  Lemma 5.3. The action of A on DA is essential. Proof. Since the action is cocompact, it is enough to show that each hyperplane is essential, that is, no half-space is contained in a neighbourhood of the other halfspace. As each hyperplane is a translate of some ĥs , it is enough to show that this is the case for hyperplanes of the form ĥs , where s ∈ S. Let s0 be a vertex of Γ. Since Γ is connected and has diameter at least 3, we can find two distinct vertices s1 , s2 of Γ such that s0 , s1 , s2 defines a geodesic of Γ. Then the hyperplane ĥs1 is in particular stabilized by A{s0 ,s2 } . Thus, to show that ĥs0 is essential, it is enough to show that ĥs1 is unbounded and crosses ĥs0 . Let Cs0 ,s1 , Cs1 ,s2 be the squares of DA containing the vertices {1}, A{s0 } , A{s1 } and {1}, A{s1 } , A{s2 } respectively. Notice that the edge between A{s0 } and A{s0 ,s1 } has stabiliser A{s0 } , and the edge between A{s2 } and A{s1 ,s2 } has stabiliser A{s2 } . Thus, the A{s0 ,s2 } orbit Y of Cs0 ,s1 ∪ Cs1 ,s2 defines a subcomplex of DA that is convex for the CAT(0) metric and quasi-isometric to a tree. Moreover, every point of Y contained in a half-space of ĥs0 projects on the other half-space to a point of Cs0 ,s1 ∪ Cs1 ,s2 . In particular, each half-space of ĥs0 contains points of Y arbitrarily far away from the other half-space, hence ĥs0 is essential.  Lemma 5.4. The action of A on DA is non-elementary. The proof of this lemma requires some preliminary work. Since Γ has diameter at least 3, let s0 , s1 , s2 , s3 be a geodesic of Γ. Lemma 5.5. Let g := s0 s3 . Then g is a hyperbolic element and admits an axis Λg (for the CAT(0) metric) that is a reunion of geodesic segments such that two consecutive segments make an angle strictly greater than π (for the angular distance on the link). Proof. For i = 0 or 3, we denote by ei the edge between the vertices {1} and S −1 A{si } of DA . Let Y := s0 e0 ∪ e0 ∪ e3 ∪ s3 e3 . Then Λg := n∈Z gn Y is a CAT(0) geodesic, and an axis for g. Indeed, we have the following properties of angles between consecutive edges: • The angle (for the angular distance on the link) between e0 and e3 is 3π/2 > π by construction of s0 , s1 , s2 , s3 . • The angle between e0 and s−1 0 e0 (between e3 and s3 e3 respectively) is π: Indeed, the angle is at most π by construction, and if the angle 14 INDIRA CHATTERJI AND ALEXANDRE MARTIN were π/2, then since DA is a CAT(0) cube complex ei and si ei would be two adjacent edges of a 3-cube with label ei , which is impossible by construction of DA . Thus, Λg is a local geodesic, hence a global geodesic. Moreover, Λg is clearly invariant under the action of hgi, and the angle made by Λg at every hgitranslate of the vertex {1} ∈ DA is 3π/2.  To show that g is a rank-one element, we need the following modified version of the Flat Strip Theorem: Lemma 5.6 (Flat “Half-strip” Theorem). Let Y be a CAT(0) space, let Λ be a geodesic line, and let h be an isometry of Y preserving Λ. Let y ∈ ∂Y \ ∂Λ and let γ be a geodesic ray from a point x of Λ to y, which meets Λ in exactly one point. If γ and hγ are asymptotic, then the convex hull of γ ∪ hγ isometrically embeds in R2 with its standard CAT(0) metric. Proof. Let us construct a ‘double’ of Y as follows. Let o ∈ Λ be the midpoint between x and hx. Such a choice allows to define (uniquely) a reflection ψ of Λ across o which is an isometry of Λ. We then define Y ′ = (Y ⊔ Y )/ψ, i.e. the space obtained from two copies of Y by identifying the two copies of Λ using the reflection ψ. As a convention, we denote by Y1 and Y2 these copies, we use the subscript · · ·i to indicate to which copy of Y the object belongs, and we identify Y with the subspace Y1 of Y ′ . The space Y ′ is again a CAT(0) space (as obtained from two CAT(0) spaces by identifying two convex subspaces along an isometry). Note that γ ⊂ Y is a subray of γ1 ∪ (hγ)2 and hγ ⊂ Y is a subray of (hγ)1 ∪ γ2 . Moreover, we have constructed Y ′ so that γ1 ∪ (hγ)2 and (hγ)1 ∪ γ2 are local geodesics of Y ′ , hence global geodesics of Y ′ . As these geodesic lines are asymptotic by construction, it follows that their geodesic hull is a flat strip, by the Flat Strip Theorem [BH99, Theorem II.2.13]. In particular, the geodesic hull of γ ∪ hγ in Y isometrically embeds in R2 .  We can now prove: Lemma 5.7. The only points of ∂DA fixed by g are its two limit points g+∞ , g −∞ ∈ ∂Λg . Proof. Let z ∈ ∂DA \ {g+∞ , g−∞ } and let γ ′ be a geodesic ray from Λg to z that meets Λg in exactly one point. If gz = z, then γ ′ and g2 γ ′ are asymptotic geodesic rays, hence the convex hull H of γ ′ ∪ g2 γ ′ isometrically embeds in R2 by the Flat Half-strip Theorem 5.6. But γ and g2 γ ′ both meet Λg in exactly one point, and by construction H contains two geodesic subsegments of Λg which make an angle 3π/2 for the angular distance on the link. This yields the desired contradiction.  Proof of Lemma 5.4. First notice that one could have proved the above lemma for the element h := s20 s3 by applying exactly the same reasoning. If ACYLINDRICAL HYPERBOLICITY AND CAT(0) CUBE COMPLEXES 15 A were to admit a finite orbit at infinity, then some power of g and some power of h would fix a common point at infinity. But the axes of g and h cannot be asymptotic for otherwise, being already distinct, Λg and Λh would bound a flat strip of positive width by the Flat Strip Theorem 5.6, and the same reasoning as above would yield a contradiction.  Proof of Proposition 5.1. This is a direct consequences of Lemmas 5.2, 5.3, and 5.4.  We are now ready to apply Theorem 1.1 to the action of A on DA in order to complete the proof of Theorem 1.2. Proof of Theorem 1.2. It is enough to consider the case where Γ is connected, for otherwise the group is a free product. According to the previous lemma, the action of A on its Deligne complex DA is essential and nonelementary. In order to apply Theorem 1.1 to the action of A on DA , we choose two vertices s, t of S with disjoint links, which is possible since Γ has diameter at least 3. It follows from the aforementioned result of [vdL83] that Alk(s) ∩ Alk(t) = A∅ = {1}. Thus, the hyperplanes ĥs and ĥt have stabilisers which intersect trivially, hence Theorem 1.1 applies and A is acylindrically hyperbolic.  References [BBF14] M. Bestvina, K. Bromberg, and K. Fujiwara. Constructing group actions on quasi-trees and applications to mapping class groups. Publ. Math. Inst. Hautes Études Sci., in press, 2014. [BC12] J. Behrstock and R. Charney. Divergence and quasimorphisms of right-angled Artin groups. Math. Ann., 352(2):339–356, 2012. [BFL14] C. Bisi, J.-P. Furter, and S. Lamy. The tame automorphism group of an affine quadric threefold acting on a square complex. Journal de l’Ecole Polytechnique, 1:161–223, 2014. [BH99] M. R. Bridson and A. Haefliger. Metric spaces of non-positive curvature, volume 319 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, 1999. [BM00] M. Burger and S. Mozes. Lattices in product of trees. Inst. Hautes Études Sci. Publ. Math., (92):151–194 (2001), 2000. [Bow08] B. H. Bowditch. Tight geodesics in the curve complex. Invent. Math., 171(2):281–300, 2008. [CD95] R. Charney and M. W. Davis. The K(π, 1)-problem for hyperplane complements associated to infinite reflection groups. J. Amer. Math. Soc., 8(3):597–627, 1995. [CFI16] I. Chatterji, T. Fernós, and A. Iozzi. The median class and superrigidity of actions on CAT(0) cube complexes. J. Topol., 9(2):349–400, 2016. [CL13] S. Cantat and S. Lamy. Normal subgroups in the Cremona group. Acta Math., 210(1):31–94, 2013. With an appendix by Yves de Cornulier. [CS11] P.-E. Caprace and M. Sageev. Rank rigidity for CAT(0) cube complexes. Geom. Funct. Anal., 21(4):851–891, 2011. [CW16] M. Calvez and B. Wiest. Acylindrical hyperbolicity and Artin-Tits groups of spherical type. arXiv:1606.07778, 2016. [Far08] D. Farley. The action of Thompson’s group on a CAT(0) boundary. Groups Geom. Dyn., 2(2):185–222, 2008. 16 INDIRA CHATTERJI AND ALEXANDRE MARTIN [Gen16a] A. Genevois. Coning-off CAT(0) cube complexes. arXiv:1603.06513, 2016. [Gen16b] A. Genevois. Acylindrical action on the hyperplanes of a CAT(0) cube complex. arXiv:1610.08759, 2016. [Hag07] F. Haglund. Isometries of CAT(0) cube complexes are semi-simple. available at https://hal.archives-ouvertes.fr/hal-00148515v1, 2007. [Lon16] A. Lonjou. Non simplicité du groupe de Cremona sur tout corps. Ann. Inst. Fourier (Grenoble), 66(5):2021–2046, 2016. [Mar15] A. Martin. Acylindrical actions on CAT(0) square complexes. arXiv: 1509.03131, 2015. [Mar16a] A. Martin. On the acylindrical hyperbolicity of the tame automorphism group of SL2 (C). arXiv:1512.07526 , 2016. [Mar16b] A. Martin. On the cubical geometry of Higman’s group. Duke. Math. J., in press, 2016. [MO15] A. Minasyan and D. Osin. Acylindrical hyperbolicity of groups acting on trees. Math. Ann., 362(3-4):1055–1105, 2015. [Osi06] D. V. Osin. Relatively hyperbolic groups: intrinsic geometry, algebraic properties, and algorithmic problems. Mem. Amer. Math. Soc., 179(843):vi+100, 2006. [Osi16] D. Osin. Acylindrically hyperbolic groups. Trans. Amer. Math. Soc., 368(2):851– 888, 2016. [Sag14] M. Sageev. CAT(0) cube complexes and groups. In Geometric group theory, volume 21 of IAS/Park City Math. Ser., pages 7–54. Amer. Math. Soc., Providence, RI, 2014. [vdL83] H. van der Lek. The homotopy type of complex hyperplane complements. Ph.D. Thesis, University of Nijmegen, 1983. Laboratoire de Mathématiques J.A. Dieudonné, Université de Nice Sophia Antipolis, Parc Valrose, 06108 Nice Cedex 02, France [email protected] Department of Mathematics and the Maxwell Institute for Mathematical Sciences, Heriot-Watt University, Riccarton, EH14 4AS Edinburgh, United Kingdom [email protected]
4math.GR
Lowering the learning curve for declarative programming: a Python API for the IDP system arXiv:1511.00916v1 [cs.PL] 3 Nov 2015 Joost Vennekens Dept. Computer Science, KU Leuven Technology Campus De Nayer, Sint-Katelijne-Waver, Belgium Abstract. Programmers may be hesitant to use declarative systems, because of the associated learning curve. In this paper, we present an API that integrates the IDP Knowledge Base system into the Python programming language. IDP is a state-of-the-art logical system, which uses SAT, SMT, Logic Programming and Answer Set Programming technology. Python is currently one of the most widely used (teaching) languages for programming. The first goal of our API is to allow a Python programmer to use the declarative power of IDP, without needing to learn any new syntax or semantics. The second goal is allow IDP to be added to/removed from an existing code base with minimal changes. 1 Introduction While declarative systems may not be inherently more difficult to learn than, e.g., an object-oriented programming language, they are still often perceived as such, because many programmers are unfamiliar with their syntax, semantics or paradigm. This leads in turn to a chicken-and-egg problem, where programmers do not learn this technology, because companies are reluctant to adopt it, because there are not enough programmers who know the technology readily available. In this paper, we propose to tackle both problems by means of an API that allows a declarative knowledge base (KB) to be used from within a well-known imperative host language. Our first goal is to integrate KB functionality into the host language as seamlessly as possible. In this way, it should be possible to use the knowledge base to prototype a single component of a large system, without affecting the rest of the code base. The second goal is to have a very low learning curve for the API. We achieve this by using as much as possible the syntax of the host language, and by requiring no more background in declarative languages than an introductory course on classical logic. We therefore expect our API to be immediately usable by, e.g., bachelor students in a typical CS curriculum. In more detail, we postulate these guidelines for our development of the API: – The interaction between the KB and host language should be done through standard objects of the host language. – The need to learn KB-specific terminology should be kept to a minimum. – It should be as easy as possible to replace the KB by a piece of host language code (or, vice versa, to replace a piece of host language code by a KB). A typical use for our API will be to off-load specific computational problems (e.g., detect connected components in a graph, find a permissible allocation of resources to jobs) to the KB, thereby avoiding the need to implement a specific algorithm and thus arriving at a working prototype more quickly. In such an early prototype, the modular, declarative nature of the KB will be particularly useful, because of its ability to easily cope with additional changes to the specification. Once the program has reached a certain level of maturity, it can of course be profiled to see whether all of the KB components meet the performance requirements. Whenever this is not the case, the KB can be replaced by a dedicated algorithm with minimal impact on the rest of the code. As a host language, we use Python (in particular, version 2.7). Given our stated goals, this is the most obvious choice: “[a]t the time of writing (July 2014), Python is currently the most popular language for teaching introductory computer science courses at top-ranked U.S. departments.”1 We assume familiarity with the basics of Python throughout this paper. The KB system that we use will be discussed in Section 2. Section 3 then discusses our interface between host language and KB, which we validate by means of some examples in Section 4. In Section 5, we give some brief notes on the implementation of our API. Finally, Section 6 discusses some related work, in particular, other approaches that integrate a declarative knowledge base into an imperative language. 2 KB system As an underlying KB system, we will use IDP (Imperative Declarative Programming)2 [2], which combines techniques from SAT solving, Logic Programming and Answer Set Programming (ASP). It has performed well in previous ASP competitions, e.g., narrowly finishing second after Clasp in the System Track of 20113. IDP has a number of properties that fit well with our goals of achieving both a tight integration with the host language and a low learning curve. Input language. IDP uses a language that is a conservative extension of classical first-order logic (FO). Because most students of computer science are familiar with FO, this means that the learning curve for a large part of IDP’s input language consists only of learning a particular ASCII syntax for FO. One of the ways in which IDP extends FO is by adding inductive definitions [3]. Because such definitions cannot, in general, be expressed in FO, this is a real extension of the language. Moreover, since inductive datatypes (lists, trees, . . . ) are very common in computer programs, this feature will prove useful in our API. Inference. In addition to its input language, a second useful property of IDP is that it aims to support a variety of different inference tasks. Particularly useful in the context of this article is the task of finite model expansion. As pointed out in [6], modal expansion for FO captures the complexity class NP, thereby 1 2 3 http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-mostpopular-introductory-teaching-language-at-top-us-universities/fulltext https://dtai.cs.kuleuven.be/software/idp https://www.mat.unical.it/aspcomp2011/ 84 covering the kind of tasks that we would like to off-load to a declarative KB. Moreover, [7] have further demonstrated that model expansion is a key task when using declarative methods to build modular software systems. 2.1 FO: syntax and semantics We briefly recall the standard syntax and semantics of FO. A vocabulary Σ consists of a set of function symbols, each with an associated arity n, and a set of predicate symbols, also each with an arity n. A function with arity 0 is called a constant. A term is either a constant, a variable or an expression f (t1 , . . . , tn ) where f is an n-ary function symbol and the ti are terms. An atom is an expression P (t1 , . . . , tn ), with P an n-ary predicate and the ti again terms. A formula is either an atom or an expression ψ ∨ φ, ψ ∧ φ, ¬φ, ∀x : φ, or ∃x : φ, where ψ, φ are formulas and x is a variable. As usual, φ ⇒ ψ abbreviates ¬φ ∨ ψ and φ ⇔ ψ stands for (φ ⇒ ψ) ∧ (ψ ⇒ φ). A sentence is a formula without free variables and a theory is a finite set of sentences. The standard semantics of FO is defined in terms of structures for a vocabulary Σ. Each structure S consists of a domain D and a mapping of: – Each n-ary predicate symbol P in Σ to an n-ary relation R ⊆ Dn – Each n-ary function symbol f in Σ to an n-ary function f : Dn → D The satisfaction relation |= is defined between structures for a vocabulary and theories of this vocabulary (or a subvocabulary thereof) by the usual induction. When S |= T , we also say that the structure S is a model of T . 2.2 FO in the IDP system IDP uses the standard concepts of vocabularies, theories and structures. Each of these has a specific syntactic representation. For example, a map coloring problem can be described in the following vocabulary V . vocabulary V { type Color type Area Border(Area,Area) Coloring(Area): Color } FO IDP Python ∧ & and ∨ | or not ¬ ~ ⇒ => not present = = == 6= ~= != ∀ ! all ∃ ? any Fig. 1. ASCII syntax of IDP. As can be seen here, IDP in fact uses a typed variant of first-order logic. The first two statements define two types (which can be seen as unary predicates), whereas the last two statements define, respectively, a predicate and a function. The following theory T in vocabulary V consists of a single sentence, expressing that neighboring areas must have a different color. Fig. 1 shows the ASCII symbols that are used in IDP to represent the logical connectives. 85 theory T : V { !a b: Border(a,b) => Coloring(a) ~= Coloring(b). } IDP is usually able to automatically derive the types of variables, based on the type declarations in the definition of the vocabulary. This information is important because most of its inference tasks require IDP to first ground (part of) the theory. Instead of depending on IDP’s automatic type derivation, it is also possible to explicitly declare the type of a variable, e.g.: !a [Area] b [Area]: Border(a,b) => Coloring(a) ~= Coloring(b). A structure S for a vocabulary V is represented by an enumeration (1) of the values that belong to each type, (2) of the tuples that belong to each predicate, and (3) of the mapping of tuples to values that is made by each function. structure S : V { Area = { Belgium; Holland; Germany; } Color = { Blue; Red; Green; } Border = {(Belgium,Holland); (Belgium,Germany); (Holland,Germany)} } This structure S for the vocabulary V interprets only part of the vocabulary V . In particular, the function Coloring is not interpreted. One of the inference tasks supported by the IDP system is that of model expansion: given a structure S ′ for a subvocabulary Σ ′ of the vocabulary Σ of a theory T , compute a structure S for the remaining symbols Σ \ Σ ′ such that (S ′ ∪ S) |= T . IDP exposes its functionality by means of an API in the Lua scripting language. The command printmodels(modelexpand(T,S)) performs the model expansion task for the above structure S and theory T , resulting in the output: Coloring = {"Belgium"->"Red";"Germany"->"Blue";"Holland"->"Green"} By default, a single model expansion is computed, but it is also possible to compute several or all of them. A special case of model expansion occurs when the initial structure S already interprets the entire vocabulary V of the theory T . In this case, it reduces to checking whether S |= T . 3 Interfacing with the KB System This section presents our API for using the IDP KB system from within Python. 3.1 Vocabularies and structures All interaction with the IDP system is done through objects of the IDP class. Each such object represents a knowledge base consisting of a triple (V, S, T ) of a vocabulary V , a structure S and a theory T . It can be created as follows: 86 kb = IDP ( ) The following methods add symbols to the vocabulary of the KB: kb . Type ( name [ , i n t e r p r e t a t i o n ] ) kb . Constant ( typed name [ , i n t e r p r e t a t i o n ] kb . Functio n ( typed name [ , i n t e r p r e t a t i o n ] ) kb . P r e d i c a t e ( typed name [ , i n t e r p r e t a t i o n ] ) As in IDP itself, the typed_name of a predicate is a string of the form Foo(Type1, ..., Type2) and that of a function is Foo(Type1, ..., Type2): Return_type. Because constants are identical to 0-ary functions, their typed_name has the form Foo : Type. Once a symbol Foo has been added to the vocabulary of a knowledge base kb, it can thereafter be referred to as kb.Foo. In addition to declaring a function/predicate symbol σ (i.e., adding it to the vocabulary of the KB), it is also possible to immediately extend the structure S with a particular interpretation σ S for σ. This is done by adding this interpretation as a second argument. The interpretation of a type must be a set (or list) of values; that of a constant must be a single value; that of a function with arity ≥ 1 must be mapping (e.g., a dictionary); and that of a predicate must be a set/list of tuples of the correct arity (for predicates with arity 1, a set of simple values is also allowed). Obviously, the typing of the symbols must be respected. Instead of initialising the interpretation of a symbol upon construction, it is also possible to first declare a symbol and then later use the assignment operator to provide an interpretation for it. We illustrate using (part of) the graph coloring example of Sec. 2.2. color color color color color = IDP ( ) . Type ( " Color" , [ " Blue" , "Red" , " Green" ] ) . Type ( " Area" , [ " Belgium " , " Holland " , " Germany " ] ) . P r e d i c a t e ( " Border (Area , Area)" ) . Border =[( " Belgium " , " Holland " ) , ( " Belgium " , " Germany " ) , ( " Holland " , " Germany " ) ] c o l o r . Functio n ( " Coloring(Area): Color" ) The “logical” objects that are thus created implement a number of common Python interfaces, allowing them to act as Python programmers would expect. A relation is, in mathematical terms, a set of tuples. Its natural counterpart is a Python MutableSet object4 (i.e., a set which allows adding/removing of elements). The following interactive session demonstrates some standard usages. >>> " Belgium " in c o l o r . Area True >>> c o l o r . Area . add ( " Austria " ) >>> for x in c o l o r . Area : 4 https://docs.python.org/2/library/collections.html#collections.Set 87 ... print x , ... Ho lla nd A u s t r i a Germany Belgium In addition to the standard MutableSet functionality, relations are also callable5 , so that we may also use the standard FO notation for checking membership. >>> c o l o r . Area ( " Belgium " ) True A function is a Mapping6 , that is, an object that maps each tuple of values in its domain to a value in its range. Some standard usages are: >>> c o l o r . C o l o r i n g . keys ( ) [ ’Austria ’ , ’Germany ’ , ’Holland ’ , ’Belgium ’ ] >>> c o l o r . C o l o r i n g [ " Belgium " ] ’Blue’ As with predicates, function objects are callable to allow for the more FO-like: >>> c o l o r . C o l o r i n g ( " Belgium " ) ’Blue’ 3.2 Formulas and definitions In keeping with our goal of achieving a low learning curve, formulas are written in Python syntax. An overview is shown in Fig. 1. The Python language has the standard boolean operators and, or and not. In addition, it also has the functions all and any, which may be applied to lists of boolean values to return the conjunction/disjunction of these values. The latter two functions, together with Python’s list comprehension syntax, can be used as universal/existential quantification. The list comprehension syntax also has an optional if part, which may be used to represent the common pattern of a universally quantified implication: ∀x[T ype] : φ ∃x[T ype] : φ ∀x[T ype] : φ ⇒ ψ all(φ for x in Type) any(φ for x in Type) all(ψ for x in Type if φ) In the graph coloring problem, we need to express the following property: ∀a b : Border(a, b) ⇒ Coloring(a) 6= Coloring(b) (1) Section 2.2 already presented the IDP syntax for this. In Python, we can write the same property as: 5 6 https://docs.python.org/2/library/functions.html#callable https://docs.python.org/2/library/collections.html#collections.Mapping 88 a l l ( c o l o r . C o l o r i n g ( a ) != c o l o r . C o l o r i n g ( b ) for ( a , b ) in c o l o r . Border ) Note that this is just a normal Python expression, which we can, e.g., just type into the interactive terminal. This expression evaluates to True precisely when property (1) is satisfied. We can make the KB aware of such a constraint by means of its Constraint method, which takes a string as its argument. So, the following code adds the above constraint to our graph coloring KB: c o l o r . C o n s t r a i n t ( " all( Coloring(a) != Coloring(b) for (a,b) in Border " ) The string argument is completely identical to the Python expression we saw above, with one exception: the predicates/functions are simply called Coloring, Area and Border, instead of color.Coloring, color.Area and color.Border. This is because, just as a theory can only contain symbols that appear in its vocabulary, the constraints that are added to a KB always refer to the symbols of that KB. An alternative formula, which is equivalent to the one above, quantifies over Area × Area and uses an if-expression to check for membership in Border: c o l o r . C o n s t r a i n t ( " all( Coloring(a) != Coloring(b) for a in Area for b in Area if (a,b) in Border )" ) 3.3 Functional interfacing In keeping with our goal of making the API easy to use, the programmer does not need to explicitly invoke the IDP system. This avoids the need to learn new functions or new terminology, and reduces the possibility of bugs. Instead, invokation of the IDP system happens “automagically” in the following circumstances: – Symbols that have been declared, but for which no interpretation has been provided, are automatically assigned a valid interpretation (in accordance with FO semantics) when their content is inspected. In other words, IDP is used as an oracle to lazily fill in the interpretation of any declared symbols for which the user does not provide one herself. This is done in a way that the interpretations of all symbols together constitutes an FO model of the constraints, i.e., a model expansion task is performed. If the constraints admit multiple models, one is chosen arbitrarily. – The KB object has an attribute satisfiable, which is automatically set to True/False (depending on whether the KB is satisfiable) when the user converts it to a boolean (either explicitly with bool(.) or by use in an if-statement). In the previous section, we declared a function color.Coloring without adding an interpretation for this function. Therefore, the IDP system will be invoked to compute a coloring of our graph if we execute the following code: 89 for x in c o l o r . Area : print " Area %s has color %s" % ( x , c o l o r . C o l o r i n g [ x ] ) Note that if we had added an interpretation for the function Coloring before executing this code, then this for-loop would still continue work as expected. This is an important property, because it allows us to change whether a relation/function is computed by the KB base or by native Python code, without having to adjust the code that makes use of it. In the latter case, the call color.Coloring[x] will just retrieve the pre-computed coloring stored within the color object, without invoking IDP. Similarly, if a coloring is not provided, then the following code will test whether a given graph can be colored, whereas if it is provided, the same code checks whether it is indeed valid. if color . s at i s f i ab l e : print " The graph can be colored " 3.4 Inductive definitions An important feature of the IDP system is its ability to handle inductive definitions. It uses a rule-based syntax for representing such definitions, in which, e.g., the transitive closure T C of a graph G can be defined as follows ( ) ∀x, y : T C(x, y) ← G(x, y). ∀x, y : T C(x, y) ← ∃z : G(x, z) ∧ T C(z, y). Note that the arrow symbol here is not material implication, but a special symbol that denotes a “case” in an inductive definition. Such an inductive definition is interpreted under the well-founded semantics [9], which in the case of a positive definition (such as the one above) boils down to a least-fixpoint construction. Each rule of such a definition represents a single case in which the defined predicate holds. In our Python API, we use a lambda-expression to represent such a case. kb . D e f i n e ( [ ( "TC(Node , Node)" , "lambda x,y: G(x,y)" ) , ( "TC(Node , Node)" , "lambda x,y: any(G(x,z) and TC(z,y) for z in Node)" ) This both declares the predicate TC and defines it in terms of the “parameter” G. For definitions consisting of a single rule, a simpler syntax is also allowed: kb . D e f i n e ( "TC(Node ,Node)" , " lambda x,y: G(x,y) or any(G(x,z) and TC(z,y) for z in Node)" ) 90 Similar to how an argument of kb.Constraint(.) can also be used as a simple boolean Python expression, the above lambda-expression can be used to compute the transitive closure of G by an explicit least-fixpoint computation: def l f p ( f , x = [ ] ) : y = f (x) return y i f y == s e l s e f ( x ) n o d e p a i r s = [ ( x , y ) for x in kb . Node for y in kb . Node ] TC = l f p (lambda T: f i l t e r (lambda x , y : kb .G( x , y ) or any ( kb .G( x , z ) and T( z , y ) for z in Node ) , n o d e p a i r s ) ) An advantage of using IDP is that the definition of T C can then not only be used to compute the transitive closure of a given graph, but also to, e.g., compute a graph that would have a given relation as its transitive closure. In addition, IDP not only supports positive inductive definitions, but also nonmonotone inductive definitions (such as the standard definition of the relation “|=” in FO), for which a simple least-fixpoint construction does not work. Nonrecursive definitions (which are equivalent to a standard FO equivalence) are also allowed in IDP. In the latter case, we can of course choose whether to use the Define or Predicate method of our API. IDP can be configured to use XSB Prolog7 to speed up certain computation with definitions. We always use this option in the experiments below. 4 Experiments This section presents two examples of our API, with a particular focus on demonstrating that the integration into the surrounding Python code can be done in a natural way. 4.1 Sudoku The first example is a Sudoku solver. A Sudoku grid consists of 9 × 9 = 81 cells. sud = KB( ) sud . Type ( " Cell" , r a ng e ( 8 1 ) ) The grid is divided into in rows, columns and nine small 3 × 3 squares. sud . P r e d i c a t e ( " SameRow (Cell , Cell)" , [ ( i , j ) for i in sud . C e l l for j in sud . C e l l i f i / 9 == j / 9 ] ) sud . P r e d i c a t e ( " SameCol (Cell , Cell)" , [ ( i , j ) for i in sud . C e l l for j in sud . C e l l i f i % 9 == j % 9 ] ) 7 http://xsb.sourceforge.net/ 91 sud . P r e d i c a t e ( " SameSmallSq(Cell , Cell)" , [ ( i , j ) for i in sud . C e l l for j in sud . C e l l i f ( i %9)/3 == ( j %9)/3 and ( i / 9 ) /3 == ( j / 9 ) /3 ] ) Here, the Python list comprehensions compute an enumeration of these relations, by iterating over all tuples in the Cartesian product of the argument types and checking a certain condition for each tuple. Alternatively, we can make IDP do this work, by Defining the predicates with the appropriate lamba-expressions. sud . D e f i n e ( " SameRow (Cell , Cell)" , " lambda i, j: i / 9 == j / 9" ) The cells must be filled with integers from 1 to 9. It will be convenient to represent an empty cell by the number 0, leading to the following type Number. sud . Type ( " Number " , r a ng e ( 1 0 ) ) We make use of two functions that map cells to numbers: one records the problem statement and the other its solution. The problem statement comes from a list of numbers, that we convert to a dictionary by means of zip operation. s =[ 8 , 5 , 0 , 0 , 0 , 2 , 4 , 0 , 0 , 7 ,2 ,0 , 0 ,0 ,0 , 0 ,0 ,9 , 0 ,0 ,4 , 0 ,0 ,0 , 0 ,0 ,0 , ... ... ... ] sud . Functio n ( "Given( Cell): Number " , d i c t ( z i p ( r a ng e ( l e n ( s ) ) , s ) ) ) sud . Functio n ( "Sol( Cell): Number " ) The function Sol will be computed by IDP, in accordance with the rules of sudoku. First, we state the difference constraint on the appropriate cells. sud . D e f i n e ( " Diff(Cell , Cell)" , " lambda x,y: x != y and ( SameRow (x,y) or SameCol (x,y) or SameSmallSq(x,y))" ) sud . C o n s t r a i n t ( " all( Sol(x) != Sol(y) for (x,y) in Diff)" ) Next, we state that the solution must match the problem statement on all non-empty cells (i.e., those 6= 0), and that it should fill in all cells. sud . C o n s t r a i n t ( " all( Sol(x) == Given (x) for x in Cell if Given(x) != 0)" ) sud . C o n s t r a i n t ( " all( Sol(x) != 0 for x in Cell)" ) With this, the sudoku problem is completely specified. The following code passes the sud.Sol object to a function that pretty-prints the sudoku. Only at the start of the for-loop in this function is the solution actually computed. def show ( g r i d ) : row = −1 for x in g r i d . keys ( ) : 92 s y s . s t d o u t . w r i t e ( ’ ’ i f x % 3 == 0 e l s e ’’ ) i f x % 9 == 0 : row += 1 print ( ’\n’ i f row % 3 e l s e ’’ ) print ( s t r ( g r i d [ x ] ) + " " ) , show ( sud . S o l ) We remark that, because we use valid Python expressions to assert constraints, we can use the same expressions to check that the output indeed satisfies the constraints. For instance, at the interactive Python terminal: >>> a l l ( sud . S o l ( x ) != sud . S o l ( y ) for ( x , y ) in sud . D i f f ) True Peter Norvig has published a sudoku solver written entirely in Python using constraint solving techniques8 . Not counting whitespace and comments, his code to compute solutions is about 40 lines, whereas the code we have presented in this section is 12 lines. Moreover, it is easy to replace the existing solve function in his code by a call to our knowledge base. This requires two small transformations: first, in Norvig’s code, input grids are given in the format of a single string, where an empty cell is represented by a dot; second, he produces output in the form of a dictionary in which the keys are strings of the form Xn with X ∈ A..I representing the row and n ∈ 1..9 the column. def s o l v e ( sud , g r i d ) : """ Solve sudoku " grid" using the KB "sud". """ def t r a n s l a t e ( n ) : rows = ’ ABCDEFGHI’ digits = ’ 123456789’ return rows [ n / 9 ] + d i g i t s [ n%9] sud . Given = d i c t ( z i p ( r a ng e ( 8 1 ) , [ i n t ( x ) for x in g r i d . r e p l a c e ( ’.’ , ’0’ ) ] ) ) return d i c t ( z i p (map( t r a n s l a t e , sud . S o l . keys ( ) ) , map( s t r , sud . S o l . v a l u e s ( ) ) ) ) When it comes to runtime, our version is significantly slower than the original on Norvig’s test set, averaging 0.27s per sudoku versus 0.008s. At the other end of the spectrum, we can also compare to a naive generateand-test approach. Using Python’s powerful itertools library, this can also be implemented in about 10 lines of code. (The code used to test whether a solution is correct can of course use the same syntactical expressions as those which we passed to our API.) However, the runtime of such a program is very poor: for a sudoku with just 5 empty cells (for comparison, a typical sudoku has around 50 to 60), it already takes over a minute to find a solution. Our main conclusions from this experiment are that, at least in this case: 8 http://norvig.com/sudoku.html 93 – Our API can handle, with a limited amount of overhead, the input/output format that a typical Python programmer would use; – Our API can be used to develop useful functionality in significantly fewer lines of code (12 versus 40) than a clever Python implementation. In fact, it takes only as many lines of code as a naive generate-and-test algorithm. – Even though our API is significantly slower than a clever Python algorithm, it still vastly outperforms the naive generate-and-test approach. 4.2 Working with graphs The following class GraphKB extends the generic IDP Knowledge Base class with some specific functionality for working with undirected graphs. When constructing such a GraphKB, the nodes of the graph can be initialised by means of a given set and the edges by means of an adjacency list. The predicate Edge is Defined as the symmetric closure of the adjacency list. This class also offers a convenience method to define the transitive closure of relations over this graph. c l a s s GraphKB (IDP ) : def i n i t ( s e l f , no des = [ 0 ] , a d j l i s t = [ ] ) : s u p e r (GraphKB , s e l f ) . i n i t () s e l f . Type ( "Node" , no des ) s e l f . P r e d i c a t e ( " Adjacent(Node , Node)" , a d j l i s t ) s e l f . D e f i n e ( " Edge(Node , Node)" , " lambda x,y: Adjacent(x,y) or Adjacent(y,x)" ) def add TC ( s e l f , o r i g i n a l , tc name ) : f o r m u l a = "lambda x,y: {0}(x,y) or any({0}(x,z) and {0}(z,y) for z in Node)" . fo r ma t ( o r i g i n a l ) s e l f . D e f i n e ( tc name + "(Node , Node)" , f o r m u l a ) We can now check if a given adjacency list describes a fully connected graph: c o n n e c t e d = GraphKB( nodes , a d j ) c o n n e c t e d . define TC ( " Path" , " Edge" ) c o n n e c t e d . C o n s t r a i n t ( " all( Path(x,y) for x in Node for y in Node)" ) i f connected . s a t i s f i a b l e : print " Graph is fully connected" We can use a similar KB to count the number of connected components in the graph. We do this by selecting a single representative from each component (its “Root”) and then counting the number of these representatives. comp = GraphKB( nodes , a d j ) comp . define TC ( " Path" , " Edge" ) comp . P r e d i c a t e ( " Root( Node)" ) 94 comp . C o n s t r a i n t ( " all( any(Path(r,x) for r in Root) for x in Node if not Root(x))" ) comp . C o n s t r a i n t ( " not any(Path(x,y) for x in Root for y in Root if x != y)" ) print " Number of components: {0}" . fo r ma t ( l e n ( comp . Root ) ) For a graph with 1000 nodes in 86 connected components, this program takes 23s to count the components. By comparison, the popular NetworkX Python library9 is two orders of magnitude faster, taking only 0.2s. In graph theory, an undirected graph is called a tree if it is connected and does not contain cycles. When checking for a cycle in an undirected graph, we of course have to exclude the trivial two-node cycles that would result from traversing the same undirected edge in both directions. This in fact makes it easier to use IDP to check that there is a cycle, than to check that there is not one. The following knowledge base tries to guess the direction in which to traverse each edge in order to produce a cycle. If it is unsatisfiable, there are no cycles. cyclic cyclic cyclic cyclic = GraphKB ( ) . P r e d i c a t e ( " Traverse(Node , Node)" ) . C o n s t r a i n t ( "all( Edge(x,y) for (x,y) in Traverse)" ) . C o n s t r a i n t ( "not any( Traverse(y,x) for (x,y) in Traverse)" ) c y c l i c . define TC ( " TravTC " , " Traverse" ) c y c l i c . C o n s t r a i n t ( "any( TravTC (x,x) for x in Node)" ) We can now combine the two knowledge bases to check whether a given adjacency list indeed describes a tree. def i s t r e e ( a d j l i s t ) : c y c l i c . Adja cent = a d j l i s t c o n n e c t e d . Adja cent = a d j l i s t return ( b o o l ( c o n n e c t e d . s a t i s f i a b l e ) and not b o o l ( c y c l i c . s a t i s f i a b l e ) ) This example illustrates how additional functionality can be built on top of the KB objects of our API. In addition, the ability to combine the results of calls to different KBs also allows us to implement functionality that would be harder to implement in a single IDP KB. 5 Implementation The implementation of our API and the examples are available for download.10 Interfacing with the IDP system is currently done in a decoupled way: when the 9 10 https://networkx.github.io/ https://bitbucket.org/joostv/pyidp/admin 95 API detects that the IDP system needs to be called, it prepares a text file with the appropriate vocabulary, structure and theory, then calles the IDP system as an external process and parses its output. The results of this call are cached, so that the IDP system will not be invoked again until the KB changes. 6 Related work There is already a long history of work attempting to close the gap between imperative and declarative programming [1]. We briefly compare our approach to some recent work in this area. In [8], an approach is presented in which a constraint solver is not added to a single host language, but can be used in the development of a domain-specific language in Racket. Like ours, the motivation behind this work is to allow the power of declarative systems to be more widely used. However, their approach differs, because they count on an intermediary—the designer of the domainspecific language—to hide the complexity of the declarative system, whereas our approach focuses on creating an interface that is natural enough to offer KB functionality directly. In [4], a constraint solver is integrated into the Scala language. As ours does, their approach reuses the syntax of the host language to interface with the declarative system. A key difference is that, in their approach, the programmer is explicitly manipulating, combining and solving constraints, which makes the constraint solver more present in the eventual source code. A second difference is of course that Scala currently appears to be less widely known than Python. In [5], a reasoner for FO extended with transitive closure is integrated into Java. Their KB language is therefore very similar to (but more restricted than) that of IDP. When it comes to the integration in Java, there are two main differences to our approach. First, the declarative knowledge is not written in expressions in the host language, but in a separate language (the Alloy-like JFSL [10]). Second, the integration into Java is done in an object-oriented way: the programmer defines classes in which formulas are added as, among others, class invariants, method pre-/postconditions and frame conditions. In comparison, our Python API seems more lightweight, since it does not require an object-oriented approach. When it comes to computational performance, [5] reports good results, which our implementation is not able to match. In summary, our approach fills the niche of an easy-to-learn quick prototyping API, that, due to Python’s current popularity, may speak to a large audience. 7 Conclusions and future work When prototyping an application, a programmer may encounter a computational subproblem for which it would be cumbersome to develop a specific algorithm. The aim of our API is to allow such gaps to be declaratively stopped with as little effort as possible. As we have seen, our API might allow a feasible solution to be produced in only as many lines of code as an (infeasible) naive 96 generate-and-test algorithm. Our use of standard Python objects such as sets and mappings means that no elaborate setup code is required to plug the KB into an existing code base, while our use of standard Python expressions for constraints and definitions leads to a low learning curve. In addition, both these properties also make it easier to eventually remove the KB if a more efficient solution is required: the same KB that first generated the solution, can later be used to check its correctness, or its constraints may simply be recuperated in the form of Python assert-statements. To prevent changing/removing the KB from leading to code changes elsewhere, our API makes all calls to the IDP system automatically, whenever they are needed. This has the additional benefit of simplifying the API and not forcing the programmer to learn new terminology. A downside is that it is harder for the programmer to keep track of what is happening when in the program. Our current implementation of the API is naive in its interfacing with the IDP system, which happens by passing text files (built each time from skratch) to an external process. A better integration, which exploits the Lua interface of IDP, might offer a significant reduction in runtimes. However, since we mainly intend our API to be used in prototyping, this issue might not be pressing. Another consequence, which may be more severe, is that programs written in our API are currently hard to debug: it may be necessary to manually inspect the text file that was passed to the IDP system (in debug-mode, the API always sends this to standard output). However, this requires the user to be at least somewhat familiar with IDP input syntax, which is something we aimed to avoid. Our validation of the API currently consists only of examples that we have implemented ourselves. A better test would involve Python programmers who have no knowledge of IDP or indeed any declarative system. However, better debugging facilities seem necessary for such a trial to be successful. 97 References 1. Krzysztof R. Apt and Andrea Schaerf. Programming in alma-0, or imperative and declarative programming reconciled. In FroCos, 1998. 2. M. Bruynooghe, H. Blockeel, B. Bogaerts, B. De Cat, S. De Pooter, J. Jansen, A. Labarre, J. Ramon, M. Denecker, and S. Verwer. Predicate logic as a modeling language: Modeling and solving some machine learning and data mining problems with IDP3. Theory and Practice of Logic Programming, 2014. Accepted. 3. Marc Denecker and Eugenia Ternovska. A logic of nonmonotone inductive definitions. ACM Transactions on Computational Logic, 9(2), March 2008. 4. A. Köksal, V. Kuncak, and P. Suter. Constraints as control. In POPL’12, 2012. 5. A. Milicevic, D. Rayside, K. Yessenov, and D. Jackson. Unifying execution of imperative and declarative code. In Proc. 33rd Int’l Conference on Software Engineering (ICSE), 2011. 6. David G. Mitchell and Eugenia Ternovska. A framework for representing and solving NP search problems. In AAAI, pages 430–435, 2005. 7. Shahab Tasharrofi and Eugenia Ternovska. A semantic account for modularity in multi-language modelling of search problems. In Proc. FroCos, 2011. 8. E. Torlak and R. Bodik. Growing solver aided languages with rosetta. In Proc. ACM international symposium on New ideas, new paradigms, and reflections on programming & software, 2013. 9. A. Van Gelder, K.A. Ross, and J.S. Schlipf. The well-founded semantics for general logic programs. Journal of the ACM, 38(3):620–650, 1991. 10. K. Yessenov. A lightweight specification language for bounded program verification. Master’s thesis, MIT, 2009. 98
6cs.PL
HOMOTOPY INVARIANT COMMUTATIVE ALGEBRA OVER FIELDS arXiv:1601.02473v1 [math.AC] 11 Jan 2016 J.P.C. GREENLEES Abstract. This article grew out of lectures given in the programme ‘Interactions between Representation Theory, Algebraic Topology and Commutative Algebra’ (IRTATCA) at the CRM (Barcelona) in Spring 2015. They give some basic homotopy invariant definitions in commutative algebra and illustrate their interest by giving a number of examples. Contents Part 1. 2. 3. 4. 5. 1. Context Introduction Ring and module spectra I (motivation) Ring and module spectra II (construction) The three examples Finiteness conditions 2 2 5 7 10 12 Part 6. 7. 8. 2. Morita equivalences Morita equivalences Proxy-smallness in the examples Exterior algebras 13 13 18 19 Part 3. Regular rings 9. Regular ring spectra 10. Finite generation 21 21 25 Part 11. 12. 13. 14. 15. 16. 27 27 29 31 32 35 37 4. Hypersurface rings Complete intersections Hypersurfaces in algebra Bimodules and natural endomorphisms of R-modules Hypersurface ring spectra s-hypersurface spaces and z-hypersurface spaces Growth of z-hypersurface resolutions Part 5. Gorenstein rings 17. The Gorenstein condition 18. Gorenstein duality 37 37 38 I am grateful to the CRM and the Simons Foundation for the opportunity to spend time in the stimulating environment at the CRM during the IRTATCA programme, and to give these lectures. 1 19. Ascent, descent and arithmetic of shifts 20. Morita invariance of the Gorenstein condition 21. Gorenstein duality for group cohomology 22. Gorenstein duality for rational spaces 23. The ubiquity of Gorenstein ring spectra Appendix A. Algebraic definitions: Local and Čech cohomology and homology Appendix B. Spectral analogues of the algebraic definitions Appendix C. Completion at ideals and Bousfield localization Appendix D. Localization away from ideals and Bousfield localization References 41 45 46 49 51 52 56 57 59 60 Part 1. Context 1. Introduction 1.A. The lectures. The purpose of these lectures is to illustrate how powerful it can be to formulate ideas of commutative algebra in a homotopy invariant form. The point is that it shows the concepts are robust, in the sense that they are invariant under deformations. They can then be applied to derived categories of rings, but of course derived categories of rings are just one example of a homotopy category of a stable model category. In short, these ideas are powerful in classical algebra, in representation theory of groups, in classical algebraic topology and elsewhere. We will focus on the fact that this includes many striking new examples from topology. Indeed, our principal example will be that arising from a topological space X, which is to say we will work over the ring R = C ∗ (X; k) of cochains on a space X with coefficients in a field k. Of course this is a rather old idea, applied in rational homotopy theory to give a very rich theory and many interesting examples. The key is that R needs to be commutative: classically, one needs to work over the rationals so that there is a commutative model for cochains (coming from piecewise polynomial differential forms). It is well known that there is no natural model for C ∗ (X; k) which is a commutative differential graded algebra (commutative DGA) if k is not of characteristic 0, since the Steenrod operations (which do not usually vanish) are built out of the non-commutativity. However, there is a way round this, since we can relax our requirements for what we consider a model. Instead of requiring DGAs, we permit R to be a commutative ring spectrum in the sense of homotopy theory (see Section 3 for a brief introduction). There is then a commutative model for cochains; we will continue to use the notation C ∗ (X; k) even though it is now a ring spectrum rather than a DGA. This may be our principal example, but actually it is a very restricted one. It is like restricting graded commutative rings to be negatively graded k-algebras. We will hint at a number of examples coming from derived algebraic geometry. The main point of the lectures is to give some interesting examples, and the main source of examples will be modular representation theory and group cohomology. In fact, the focus 2 will be on examples picked out by requiring the ring spectrum to be well behaved in terms of commutative algebra: we look for regular, complete intersection or Gorenstein ring spectra. As one expects from commutative algebra, regular ring spectra are very restricted and can sometimes even be classified. One also expects to be able to parametrise complete intersections in some sense, although our present account just mentions a few isolated examples. Finally, just as is the case for conventional commutative rings, the class of Gorenstein ring spectra has proved ubiquitous. We shall see examples from representation theory, from chromatic stable homotopy theory and from rational homotopy theory, and one of the distinctive contributions is to emphasize duality. 1.B. 54321. It may be worth bearing in mind the following correspondences, which suggest useful ways to think about the material here. The pentagon: We may summarize sources examples and the relationship between them in a diagram. The emphasis here will be on commutative algebra and spaces. Commutative Algebra k❱ ❱❱❱❱ ❱❱❱❱ ❱❱❱❱❱ ❱❱❱❱ X ❱8 DAG Chromatic homotopy theory Representation theory of G  Spaces and DGAs over Q _  /  Topological spaces The square: It is worth bearing in mind the dual points of view of geometric objects and rings of functions on them, and the way the global picture is built up out of points. Our present account focuses on the local rings at the bottom right, but it can be illuminating to consider the wider context. Geometry Global XO o Local Xx o Algebra / ? / OO X ? OX,x C ∗ (X; k) X The three classes: our focus is on the following hierarchy of local rings. Regular   / Complete Intersection   / Gorenstein The dual pair: even though our focus is on commutative rings, we make constant use of the freedom to use Morita theory to transpose properties into the non-commutative context. Commutative o / 3 Non-commutative It is the purpose of the present article to give an account of these objects and points of view as a unified whole. 1.C. Organization. The article is organized into five parts. In Part 1 we introduce the context of ring spectra and modules over them, together with our three main classes of examples (commutative rings, spaces and representation theory) and the basic finiteness conditions. In Part 2 (Sections 6 to 8) we describe the basic Morita equivalences between commutative and non-commutative contexts, discuss our fundamental finiteness condition and illustrate its power by considering the richness of exterior algebras. We then turn to our hierarchy of local rings. In Part 3 (Sections 9 and 10) we consider regular ring spectra; the principle of considering definitions in three styles (structural, growth or module theoretic) recurs later, and the good behaviour of modules over regular rings is used later to give a definition of ‘finitely generated’ modules for many ring spectra. In Part 4 (Sections 11 to 16) we consider hypersurface ring spectra. We spend a little time recalling the classical algebraic theory before introducing the definitions for ring spectra, illustrating it with examples and explaining how the different versions are related. Finally in Part 5 (Sections 17 to 23) we consider Gorenstein ring spectra, and the duality properties they often enjoy. We describe the basic tools for Gorenstein ring spectra and illustrate them by explaining many known examples (especially those from representation theory and rational homotopy theory). The rich and attractive dualities that appear make this a highlight. A series of appendices recalls notation and basic properties of local cohomology and derived completion. Each part starts with a more detailed description of its contents. 1.D. Sources. Much of this account comes from joint work [33, 32, 21, 22, 55, 54] and other conversations with D.J.Benson, W.G.Dwyer, K.Hess, S.B. Iyengar and S. Shamir, and I would like to thank them for their collaboration and inspiration. We summarize some relevant background, but commutative algebraists may find the articles [52] and [53] from the 2004 Chicago Workshop useful. General background in topology may come from [84] and in conventional commutative algebra from [83, 28]. It is worth emphasizing that this is a vast area, and these lectures will just focus on a tiny part corresponding to local k-algebras. In particular we will not touch on arithmetic or geometric aspects of the theory, such as the Galois theory of J. Rognes, Brauer groups, or derived algebraic geometry. 1.E. Conventions. We’ll generally denote rings and ring spectra by letters like, Q, R and S. Ring homomorphisms will generally go in reverse alphabetical order, as in S −→ R −→ Q. Modules will be denoted by letters like L, M, N, . . .. The ring of integers (initial amongst conventional rings) is denoted Z. The sphere spectrum (initial amongst ring spectra) is denoted S. 4 After the inital sections we will use the same notation for a conventional ring and the associated Eilenberg-MacLane spectrum. Similarly for modules. Generally, M ⊗R N will denote the left derived tensor product, and HomR (M, N) the module of derived homomorphisms. Similarly, fibre sequences, cofibre sequences, pullbacks and pushouts will be derived. 1.F. Grading conventions. We will have cause to discuss homological and cohomological gradings. Our experience is that this is a frequent source of confusion, so we adopt the following conventions. First, we refer to lower gradings as degrees and upper gradings as codegrees. As usual, one may convert gradings to cogradings via the rule Mn = M −n . Thus both chain complexes and cochain complexes have differentials of degree −1 (which is to say, of codegree +1). This much is standard. However, since we need to deal with both homology and cohomology it is essential to have separate notation for homological suspensions (Σi ) and cohomological suspensions (Σi ): these are defined by (Σi M)n = Mn−i and (Σi M)n = M n−i . Thus, for example, with reduced chains and cochains of a based space X, we have C∗ (Σi X) = Σi C∗ (X) and C ∗ (Σi X) = Σi C ∗ (X). 2. Ring and module spectra I (motivation) Most of the generalities can take place in any category with suitable formal structure: we need a symmetric monoidal product so that we can discuss rings and modules over them, and we need to be able to form tensor products over a commutative ring, and we will want a homotopy theory which is stable so that we can form a triangulated homotopy category. In fact we will work with a category of spectra in the sense of homotopy theory; the construction is sketched in Appendix 3, and the present section gives a brief orientation. A more extensive introduction designed for commutative algebraists is given in [52]. 2.A. Additive structure. We may start from the observation that the homotopy theory of highly connected spaces is simpler than that of general spaces. By suspending a space we may steadily simplify the homotopy theory, but because cohomology theories have suspension isomorphisms, we do not lose any additive cohomological information: spectra capture the limit of this process. Thus spectra are a sort of abelianization of spaces where behaviour has a more algebraic formal flavour. Associated to any based space X there is a suspension spectrum, and arbitrary spectra can be built from those of this form. The other important source of spectra is as the representing objects for cohomology theories. If E ∗ (X) is a contravariant functor of a based space X which satisfies the Eilenberg-Steenrod axioms, then there is a spectrum E so that the equation E ∗ (X) = [X, E]∗ holds. This has the usual benefits that one can then apply geometric constructions to cohomology theories and one can argue more easily by universal examples. 5 2.B. Multiplicative structure. Having taken the step of representing cohomology theories by spectra, one may ask if good formal behaviour of the functor E ∗ (·) is reflected in the representing spectrum E. For our purposes the most important piece of structure is that of being a commutative ring, and we would like to say that a cohomology theory whose values on spaces are commutative rings is represented by a spectrum which is a commutative ring in the category of spectra. This is true remarkably often. In order to do homotopy theory we need a Quillen model structure on the category of spectra, and to have commutative rings in this setting we need a symmetric monoidal smash product, with unit the sphere spectrum S (the suspension spectrum of the two point space S 0 ), so that the two structures are compatible in a way elucidated by Schwede and Shipley [91]. In retrospect it seems strange that such models were not constructed until the 1990s, but several such models are now known, and they give equivalent theories. We sketch the construction of symmetric spectra in Section 3. In this context, it makes sense to ask for a cohomology theory to be represented by a commutative ring spectrum R (i.e., R comes with a multiplication map µ : R ∧ R −→ R and a unit map S −→ R making R into a commutative monoid). Many of the important examples do have this structure. The most obvious example from this point of view is the sphere spectrum S itself. This is the initial ring in the category of spectra, and the smash product plays the role of tensor product over S. We will describe a number of examples below, but for the present we continue with the general formalism just assuming that R is a commutative ring spectrum. 2.C. Modules. We may consider module spectra over R, and there is a model category structure on R-modules; furthermore, since R is commutative, there is a tensor product of R-modules formed in the usual way from the tensor product over the initial ring S (i.e., as the coequalizer of the two maps M ⊗S R ⊗S N −→ M ⊗S N). From the good formal properties of the original category, this category of R-modules is again a model category with a compatible symmetric monoidal product. This has an associated homotopy category Ho(R − mod) and will be the context in which we work. 2.D. Reverse approach. Commutative algebraists may approach spectra from the algebraic direction. Traditional commutative algebra considers commutative rings A and modules over them, but some constructions make it natural to extend further to considering chain complexes of A-modules; the need to consider robust, homotopy invariant properties leads to the derived category D(A). Once we admit chain complexes, it is natural to consider the corresponding multiplicative objects, differential graded algebras (DGAs). Although it may appear inevitable, the real justification for this process of generalization is the array of naturally occurring examples. The use of spectra is a natural extension of this process. Shipley has shown [92] that associated to any DGA A there is a ring spectrum HA, so that the derived category D(A) is equivalent to the homotopy category of HA-module spectra. Accordingly we can view ring spectra as generalizations of DGAs and categories of module spectra as flexible generalizations of the derived category. Ring spectra extend the notion of rings, module spectra 6 extend the notion of (chain complexes of) modules over a ring, and the homotopy category of module spectra extends the derived category. Many ring theoretic constructions extend to ring spectra, and thus extend the power of commutative algebra to a vast new supply of naturally occurring examples. Even for traditional rings, the new perspective is often enlightening, and thinking in terms of spectra makes a number of new tools available. Once again the only compelling justification for this inexorable process of generalization is the array of interesting, naturally occurring examples, some of which will be described later in these lectures. 3. Ring and module spectra II (construction) The purpose of this section is to outline the construction of symmetric spectra. The details will not be needed for the lectures, and readers familiar with spectra can comfortably omit it. The point is to reassure readers that spectra are rather concrete objects. 3.A. Naive spectra. This subsection is designed to explain the idea behind spectra: where they came from and why they were invented. Those already familiar spectra should skip directly to Subsection 3.B, which describes symmetric spectra. The underlying idea is that spectra are just stabilised spaces and the bonus is that they represent cohomology theories. This definition is perfectly good for additive issues, but it does not have a symmetric monoidal smash product, so is not adequate for commutative algebra. Definition 3.1. A spectrum E is a sequence of based spaces Ek for k ≥ 0 together with structure maps σ : ΣEk → Ek+1 , where ΣEk = S 1 ∧ Ek is the topological suspension. A map of spectra f : E → F is a sequence of maps so that the squares Σf k ΣEk −→ ΣFk ↓ ↓ fk+1 Ek+1 −→ Fk+1 commute for all k. Example 3.2. If X is a based space we may define the suspension spectrum Σ∞ X to have kth term Σk X with the structure maps being the identity. Remark: It is possible to make a definition of homotopy immediately, but this does not work very well for arbitrary spectra. Nonetheless it will turn out that for finite CW-complexes K, maps out of a suspension spectrum can be easily described. We reserve [·, ·] for homotopy classes of maps between spectra (sometimes called ‘stable maps’), so we write [A, B]un for homotopy classes of (unstable) maps from a based space A to a based space B. With this notation, we have [Σ∞ K, E] = lim [Σk K, Ek ]un . → k 7 In particular πn (E) := [Σ∞ S n , E] = lim [S n+k , Ek ]un . → k ∞ For example if E = Σ L for a based space L, we obtain a formula for the stable homotopy groups of L πn (Σ∞ L) = lim [Σk S n , Σk L]un , → k By the Freudenthal suspension theorem, this is the common stable value of the groups [Σk S n , Σk L]un for large k. Thus spectra have captured stable homotopy groups. Construction 3.3. We can suspend spectra by any integer r, defining Σr E by ( Ek−r k−r ≥0 r (Σ E)k = pt k − r < 0. Notice that if we ignore the first few terms, Σr is inverse to Σ−r . Homotopy groups involve a direct limit and therefore do not see these first few terms. Accordingly, once we invert homotopy isomorphisms, the suspension functor becomes an equivalence of categories. Because suspension is an equivalence, we say that we have a stable category. Example 3.4. (Sphere spectra) We write S = Σ∞ S 0 for the 0-sphere because of its special role, and then for an arbitrary integer r we define S r = Σr S. Note that S r now has meaning for a space and a spectrum for r ≥ 0, but since we have an isomorphism S r ∼ = Σ∞ S r of spectra for r ≥ 0 the ambiguity is not important. We extend this ambiguity, by often suppressing Σ∞ . Example 3.5. Eilenberg-MacLane spectra. An Eilenberg-MacLane space of type (M, k) for an abelian group M and k ≥ 0 is a CW-complex K(M, k) with πk (K(M, k)) = M and πn (K(M, k)) = 0 for n 6= k; any two such spaces are homotopy equivalent. It is well known that in each degree ordinary cohomology is represented by an Eilenberg-MacLane space. Indeed, for any CW-complex X, we have H k (X; )M = [X, K(M, k)]un . In fact, this sequence of spaces, as k varies, assembles to make a spectrum. To describe this, first note that the suspension functor Σ is defined by smashing with the circle S 1 , so it is left adjoint to the loop functor Ω defined by ΩX := map(S 1 , X) (based loops with the compact-open topology). In fact there is a homeomorphism map(ΣW, X) = map(W ∧ S 1 , X) ∼ = map(W, map(S 1 , X)) = map(W, ΩX) This passes to homotopy, so looping shifts homotopy in the sense that πn (ΩX) = πn+1 (X). We conclude that there is a homotopy equivalence ≃ σ̃ : K(M, k) → ΩK(M, k + 1), and hence we may obtain a spectrum HM = {K(M, k)}k≥0 8 where the bonding map σ : ΣK(M, k) → K(M, k + 1) is adjoint to σ̃. Thus we find [Σr Σ∞ X, HM] = lim [Σr Σk X, K(M, k)]un = lim H k (Σr Σk X; M) = H −r (X; M). → k → k In particular the Eilenberg-MacLane spectrum has homotopy in a single degree like the spaces from which it was built: ( M k=0 πk (HM) = 0 k 6= 0. 3.B. Symmetric spectra [74, 89]. Symmetric spectra give an elementary and combinatorial construction of a symmetric monoidal category of spectra. This is excellent for an immediate access to the formal properties, but to be able to calculate with symmetric spectra and to relate them to the rest of homotopy theory one needs to understand the construction of the homotopy category. This is somewhat indirect, and Subsection 3.A was intended as a motivational substitute. It is usual to give a fully combinatorial construction of symmetric spectra, by basing them on simplicial sets rather than on topological spaces. Definition 3.6. (a) A symmetric sequence is a sequence E0 , E1 , E2 , . . . , of pointed simplicial sets with basepoint preserving action of the symmetric group Σn on En . (b) We may define a tensor product E ⊗ F of symmetric sequences E and F by _ (E ⊗ F )n := (Σn )+ ∧Σp ×Σq (Xp ∧ Yq ), p+q=n where the subscript + indicates the addition of a disjoint basepoint. It is elementary to check that this has the required formal behaviour. Lemma 3.7. The product ⊗ is symmetric monoidal with unit (S 0 , ∗, ∗, ∗, . . . ). Example 3.8. The sphere is the symmetric sequence S := (S 0 , S 1, S 2 , . . . ). Here S 1 = ∆1 /∆1 is the simplicial circle and the higher simplicial spheres are defined by taking smash powers, so that S n = (S 1 )∧n ; this also explains the actions of the symmetric groups. It is elementary to check that the sphere is a commutative monoid in the category of symmetric sequences. Definition 3.9. A symmetric spectrum E is a left S-module in symmetric sequences. Unwrapping the definition, we see that this means E is given by (1) a sequence E0 , E1 , E2 , . . . of simplicial sets, (2) maps σ : S 1 ∧ En → En+1 , and (3) basepoint preserving left actions of Σn on En which are compatible with the actions in the sense that the composite maps S p ∧ En → En+p are Σp × Σn equivariant. 9 Definition 3.10. The smash product of symmetric spectra is E ∧S F := coeq(E ⊗ S ⊗ F // E ⊗ F ). Proposition 3.11. The tensor product over S is a symmetric monoidal product on the category of symmetric spectra. It is now easy to give the one example most important to commutative algebraists. Example 3.12. For any abelian group M, we define the Eilenberg-MacLane symmetric spectra. For a set T we write M ⊗ T for the T -indexed sum of copies of M; this is natural for maps of sets and therefore extends to an operation on simplicial sets. We may then define ˜ 0 , M ⊗S ˜ 1 , M ⊗S ˜ 2 , . . . ), where the Eilenberg-MacLane symmetric spectrum HM := (M ⊗S ˜ means the tensor product of an abelian group and a simplicial set with the basepoint ⊗ generator set to zero. It is elementary to check that if R is a commutative ring, then HR is a monoid in the category of S-modules, and if M is an R-module, HM is a module over HR. Next one may define the stable model structure on symmetric spectra; this is done in several steps (Section 3 of [74]), but we may summarise it by saying that the weak equivalences (“stable equivalences”) are maps f : X −→ Y which induce isomorphisms in all cohomology theories. The homotopy category of symmetric spectra is obtained by inverting stable equivalences. 4. The three examples The point of the present section is to introduce our three basic classes of examples. Classical commutative local Noetherian rings, rational cochains on simply connected spaces and mod p cochains on classifying spaces of finite groups. The importance of the category of symmetric spectra [74] is that it admits a symmetric monoidal smash product compatible with the model structrures. Given this, we can start to do algebra with spectra: choose a ring spectrum R (i.e., a monoid in the category of spectra), form the category of R-modules or R-algebras and then pass to homotopy. We may then attempt to use algebraic methods and intuitions to study R and its modules. 4.A. Classical commutative algebra. We explain why the classical derived category is covered by the context of spectra. In Section 3 we described a functorial construction for symmetric spectra taking an abelian group M and giving the Eilenberg-MacLane spectrum HM, which is characterised up to homotopy by the property that π∗ (HM) = π0 (HM) = M. For symmetric spectra the construction is lax symmetric monoidal, so that if A is a commutative ring, HA is a commutative ring spectrum. Furthermore the construction gives a functor A-modules −→ HA-modules. Passage to homotopy groups gives a functor Ho(HA−mod) → Ho(A-modules) = D(A) and in fact the model categories are equivalent. Theorem 4.1. (Shipley [92, 1.1, 2.15]) There is a Quillen equivalence between the category of differential graded Z-algebras and the category of HZ-algebras in spectra. 10 If we choose a DGA A and the corresponding HZ-algebra HA, there is a Quillen equivalence between the category of A-modules and the category of HA-modules, and hence in particular a triangulated equivalence D(A) = Ho(A-modules) ≃ Ho(HA-modules) = D(HA) of derived categories. The commutative case is complicated by the fact that there are no model structures on commutative algebras in general. However, if A is commutative, HA may be taken to be commutative and the Quillen equivalence between A-modules and HA-modules, tensor products over A and over HA correspond. We sometimes use Shipley’s result to excuse the omission of the letter H indicating spectra. In this translation homology in the classical context of chain complexes corresponds to homotopy in the context of spectra: H∗ (M) = π∗ (HM). Now that we can view classical commutative rings as commutative ring spectra, we can attempt to extend classical notions to the context of spectra. From one point of view, we should first attempt to understand the analogues of local rings before attempting to look at more geometrically complicated ones. Accordingly, in most of the lectures we will assume the commutative ring A is local, with residue field k. 4.B. Cochains on a space. In the category of spectra, we may solve the commutative cochain problem. More precisely, for any space X and a commutative ring k, we may form the function spectrum C ∗ (X; k) = map(Σ∞ X+ , Hk). It is obviously an Hk-module, and we may combine the commutative multiplication on Hk with the cocommutative diagonal on X+ to see that C ∗ (X; k) is a commutative Hk-algebra. The notation is chosen because it is a model for the cochains in the sense π∗ (map(Σ∞ X, Hk)) = H ∗ (X; k). The commutative algebra of C ∗ (X; k) is one of the main topics for these lectures, and we will omit the coefficient ring k when it is clear from the context. We then use algebraic behaviour of this commutative ring to pick out interesting classes of spaces. In accordance with the principle that C ∗ (X; k) is a sort of ring of functions on X, we simplify terminology and say that X has a property P over k if the commutative ring spectrum C ∗ (X; k) has the property P. We will focus particularly on two special cases. Example 4.2. (Rational case.) We will refer to the special case k = Q with X simply connected as the rational case. Indeed this may be treated by classical means with the ThomSullivan construction of piecewise polynomial forms giving a commutative DGA model for C ∗ (X; Q). There is an enormous literature studying rational homotopy theory by homotopy invariant commutative algebra methods. The book [42] of Félix, Halperin and Thomas is an excellent starting point. The ‘Looking glass’ paper [12] expounds the philosophy that algebra and topology are imperfect reflections of each other and gives numerous profound examples of it. Because we permit more general ring spectra, we are more restricted in theorems but have a larger range of examples. 11 Example 4.3. (Modular representation theory.) We will also focus particularly on the case k = Fp , when X = BG for a finite group G. We recall that the classifying space BG of principal G-bundles is characterised (when G is finite) by the fact that it has fundamental group G and all other homotopy groups trivial. The interest in this special case comes from the fact that its coefficient ring π∗ (C ∗ (BG; Fp )) = H ∗ (BG; Fp ) = Ext∗Fp G (Fp , Fp ) is the group cohomology ring. There is an operation of p-completion due to Bousfield-Kan [26] which behaves well for a large class of spaces (the p-good spaces). In particular, all connected spaces with finite fundamental group are p-good, which will cover our examples. For p-good spaces C ∗ (X; Fp ) = C ∗ (Xp∧ ; Fp ), and accordingly we will generally assume that X is p-complete when k = Fp . The space X = BG is already p-complete if G is a p-group, but in general BG∧p has infinitely many homotopy groups and its funademental group is the largest p-quotient of G. 5. Finiteness conditions The point of this section is to introduce a variety of finiteness conditions we may impose. The essential limitation of all we do is that it is based on local rings in commutative algebra. We will not discuss the new and interesting features that can arise when there are many maximal ideals. Context 5.1. The main input is a map R −→ k of ring spectra with notation suggested by the case when R is commutative local ring with residue field k. For the most part, we work in the homotopy category Ho(R-mod) of left R-modules. 5.A. New modules from old. Two construction principles will be important to us. The terminology comes from Dror-Farjoun [30], but in our stable context the behaviour is rather simpler. If M is an R-module we say that X is built from M (and write M ⊢ X) if X can be formed from M by completing triangles, taking coproducts and retracts (i.e., X is in the localizing subcategory generated by M). We refer to objects built from M as M-cellular, and write Cell(R, M) for the resulting full subcategory of Ho(R-mod). An M-cellular approximation of X is a map CellM (X) −→ X where CellM (X) is M-cellular and the map is an HomR (M, ·)equivalence. We say that X is finitely built from M (and write M |= X) if only finitely many steps and finite coproducts are necessary (i.e., X is in the thick subcategory generated by M). Finally, we say that X is cobuilt from M if X can be formed from M by completing triangles, taking products and retracts (i.e., X is in the colocalizing subcategory generated by M). 5.B. Finiteness conditions. We say M is small if the natural map M M [M, Nα ] −→ [M, Nα ] α α 12 is an isomorphism for any set of R-modules Nα . Smallness is equivalent to being finitely built from R. It is easy to see that any module finitely built from R is small. For the reverse implication we use the fact that we can build an R-cellular approximation Cell(R, M) −→ M; this is an equivalence, and by smallness, M is a retract of a finitely built subobject of Cell(R, M). We sometimes require that k itself is small, but this is an extremely strong condition on R and it is important to develop the theory under a much weaker condition. Definition 5.2. [33] We say that k is proxy-small if there is an object K with the following properties • K is small (R |= K) • K is finitely built from k (k |= K) and • k is built from K (K ⊢ k). Remark 5.3. Note that the second and third condition imply that the R-module K generates the same category as k using triangles and coproducts: Cell(R, K) = Cell(R, k). One of the main messages of [33] is that we may use the condition that k is proxy-small as a substitute for the Noetherian condition in the conventional setting. This rather weak condition allows one to develop a very useful theory applicable in a large range of examples. We can illustrate this by looking at the proxy-small condition in the classical case. Example 5.4. (Conventional commutative algebra) Take R to be a commutative Noetherian local ring in degree 0, with maximal ideal m and residue field k. By the Auslander-Buchsbaum-Serre theorem, k is small if and only if R is a regular local ring, confirming that the smallness of k is a very strong condition. On the other hand, k is always proxy-small: we may take K = K(α) to be the Koszul complex for a generating sequence α for m (see Appendix B). It is shown in [32] that Cell(R, k) consists of objects whose homology is m-power torsion. Part 2. Morita equivalences Section 6 introduces the basic apparatus of the Morita equivalences that concern us, along with their relation with torsion functors and completion. Section 7 discusses the rather weak condition that k is proxy-small in our examples, and shows it provides an inclusive framework. Section 8 illustrates the power of the Morita framework by discussing the classification of ring spectra and DGAs with coefficient rings exterior on one generator. 6. Morita equivalences Morita theory studies objects X of a category C by considering maps from a test object k. More precisely, X is studied by considering Hom(k, X) as a module over the endomorphism ring End(k). In favourable circumstances this may give rather complete information. This is an instance of the philosophy that one gains insights by looking at rings of operations. In the classical situation, C is an abelian category with infinite sums and k is a small projective generator, and we find C is equivalent to the category of End(k)-modules [14, II 13 Thm 1.3]. We will work with a stable model category rather than in an abelian category, and k will not necessarily be either small or a generator. The fact that the objects of the categories are spectra is unimportant except for the formal context it provides. See [88] for a more extended account from the present point of view. In fact, two separate Morita equivalences play a role: two separate categories of modules over a commutative ring are both shown to be equivalent to a category of modules over the same non-commutative ring. This section is based on [32], with augmentations from [33]. 6.A. First variant. To start with we introduce the ring spectrum E = HomR (k, k) of (derived) endomorphisms of k. This is usually not a commutative ring. Morita theory considers the relationship between the categories of left R-modules and of right E-modules. We have the adjoint pair E : R−mod o / mod−E : T defined by T (X) := X ⊗E k and E(M) := HomR (k, M). It is clear from the definition that E(M) is an E-module, since E = HomR (k, k) acts on the right through the factor k in EM = HomR (k, M). By the same token, it is clear that the ring R̂ = HomE (k, k) acts on the left of T X = X ⊗E k through its action on k. To see that this gives an R-module we note that there is a ring map R −→ HomE (k, k) = R̂ by ‘right multiplication’ of R on k; thuse T X is an R-module by restriction. Theorem 6.1. If k is small, this adjunction gives equivalence Cell(R, k) ≃ mod−E between the derived category of R-modules built from k and the derived category of E-modules. Proof: To see the unit X −→ ET X = HomR (k, X ⊗E k) is an equivalence, we note it is obviously an equivalence for X = E and hence for any X built from E, by smallness of k. The argument for the counit is similar.  Remark 6.2. If k is not small, the unit of the adjunction may not be an equivalence. For example if R = Λ(τ ) is exterior on a generator τ of degree 1 then E ≃ k[x] is polynomial on a generator of degree −2. As an R-module, k is of infinite projective dimension and hence it is not small. In this case all R-modules are k-cellular, so that Cell(R, k) = R-mod. Furthermore, the only subcategories of R-modules closed under coproducts and triangles are the trivial category and the whole category. On the other hand the category of torsion E-modules is a proper non-trivial subcategory closed under coproducts and triangles. 14 Exchanging roles of the rings, so that R = k[x] and E ≃ Λ(τ ), we see k is small as a k[x]-module and Cell(k[x], k) consists of torsion modules. Thus we deduce tors-k[x]-mod ≃ mod-Λ(τ ).  In fact the counit T EM = HomR (k, M) ⊗E k −→ M of the adjunction is of interest much more generally. Notice that any E-module (such as HomR (k, M)) is built from E, so the domain is k-cellular. We say M is effectively constructible from k if the counit is an equivalence, because T EM gives a concrete and functorial model for the cellular approximation to M. Under the much weaker assumption of proxy smallness we obtain a very useful conclusion linking Morita theory to commutative algebra. Lemma 6.3. Provided k is proxy-small, the counit T EM = HomR (k, M) ⊗E k −→ M is k-cellular approximation, and hence in particular any k-cellular object is effectively constructible from k. Proof: We observed above that the domain is k-cellular. To see the counit is a HomR (k, ·)equivalence, consider the evaluation map γ : HomR (k, X) ⊗E HomR (Y, k) −→ HomR (Y, X). This is an equivalence if Y = k, and hence by proxy-smallness it is an equivalence if Y = K. This shows that the top horizontal in the diagram ≃ HomR (k, X) ⊗E HomR (K, k) −→ HomR (K, X) ≃↓ ↓= HomR (K, HomR (k, X) ⊗E k) −→ HomR (K, X) is an equivalence. The left hand-vertical is an equivalence since K is small. Thus the lower horizontal is an equivalence, which is to say that the counit T EX = HomR (k, X) ⊗E k −→ X is a K-equivalence. By proxy-smallness, this counit map is a k-equivalence.  Examples 6.4. (i) If R is a commutative Noetherian local ring, we recall in Appendix B that the k-cellular approximation of a module M is Γm M = K∞ (m) ⊗R M, where K∞ (m) is the stable Koszul complex, so we have T EM ≃ K∞ (m) ⊗R M. (ii) If R = C ∗ (X; k) it is not easy to say what the k-cellular approximation is in general, but any bounded below module M is cellular. 15 6.B. Second variant. There is a second adjunction between the derived categories of left R-modules and of right E-modules. In the first variant, k played a central role as a left R-module and a left E-module. In this second variant k # := HomR (k, R) plays a corresponding role: it is a right R-module and a right E-module. We have the adjoint pair / E ′ : R−mod o mod−E : C defined by E ′ (M) := k # ⊗R M and C(X) := HomE (k # , X). Remark 6.5. If k is small then E ′ (M) = HomR (k, R) ⊗R M ≃ HomR (k, M) = EM, so the two Morita equivalences consider the left and right adjoints of the same functor. The unit of the adjunction M −→ CE ′ (M) is not very well behaved, and the functor CE ′ is not even idempotent in general. 6.C. Complete modules and torsion modules. Even when we are not interested in the intermediate category of E-modules, several of the composite functors give interesting endofunctors of the category of R-modules. Lemma 6.6. If k is proxy-small then k-cellular approximation is smashing: Cellk M ≃ (Cellk R) ⊗R M, so that T EM = T E ′ M. Proof: We consider the map λ : (Cellk R) ⊗R M −→ R ⊗R M = M and show it has the properties of cellularization. To start with, since R builds M, it follows that (Cellk R) ⊗R R builds (Cellk R) ⊗R M, and hence (Cellk R) ⊗R M is k-cellular. Since k is proxy small, the map λ is k-equivalence if and only if it is a K-equivalence. We may consider the class of objects M for which λ is a K-equivalence. Since K is small, it is closed under arbitrary coproducts as well as triangles. Since the class obviously contains R itself, it contains all modules M.  We therefore see by 6.3 and 6.6 that if k is proxy-small Cellk (M) = T EM = T E ′ M. This is the composite of two left adjoints, focusing attention on its right adjoint CEM, and we note that CE(M) = HomR (k # , HomR (k, M)) = HomR (T ER, M). By analogy with Subsection II of Appendix B, we may make the following definition. 16 Definition 6.7. The completion of an R-module M is the map M −→ HomR (T ER, M) = CEM. We say that M is complete if the completion map is an equivalence. Remark 6.8. By 6.6 we see that completion is idempotent. We adopt the notation Γk M := T E ′ M and Λk M := CEM. This is by analogy with the case of commutative algebra through the approach of Appendix C, where Γk = ΓI is the total right derived functor of the I-power torsion functor and Λk = ΛI is the total left derived functor of the completion functor (see [2, 3] for the context of commutative rings). It follows from the adjunctions described earlier in this section that Γk is left adjoint to k Λ as endofunctors of the category of R-modules: HomR (Γk M, N) = HomR (M, Λk N) for R-modules M and N. Slightly more general is the following observation. Lemma 6.9. If k is proxy-small, Γk and Λk give an adjoint equivalence Cell(R, k) ≃ comp−R-mod, where comp−R-mod is the triangulated subcategory of R−mod consisting of complete modules. Proof: We have T E ′ M ≃ T EM ≃ Γk M ≃ ΓK M, and CEM ≃ HomR (Γk R, M) ≃ HomR (ΓK R, M), so it suffices to prove the result when k is small. When k is small the present adjunction is the composite of two adjoint pairs of equivalences. We have seen this for the first variant, and the second variant is proved similarly by arguing that the unit and counit are equivalences.  6.D. dc-completeness. We have explained the importance of passing from R to E = HomR (k, k), and we have also given an example where we then took E as our input ring, meaning that we need to consider the ring R̂ = HomE (k, k). Furthermore, the double centralizer ring homomorphism κ : R −→ HomE (k, k) = R̂ played a role at the very start, in defining the R-module structure on T X. We say that R is dc-complete if κ is an equivalence. 17 7. Proxy-smallness in the examples We establish the appropriate finiteness and completeness properties in our principal examples. 7.A. Commutative local rings. When R is a conventional commutative local Noetherian ring, we have seen that k is always proxy-small, and that the Koszul complex for a set of generators of m provides the small proxy for k. Next, we note that π∗ (E) = π∗ (HomR (k, k)) = Ext∗R (k, k), which is a ring whose importance is very familiar. We will see in Section 8 that as a DGA, the endormorphisms E = HomR (k, k) contain considerably more information. We also note that in this case, R is dc-complete if and only if it is m-complete in the usual sense. Indeed, we calculate ∧ = holim R/ms Rm ← s ← s = holim HomE (HomR (R/ms , k), k) = HomE (holim HomR (R/ms , k), k) → = HomE (k, k) s Here the first equivalence uses the Mittag-Leffler condition on {R/ms }s , and the last condition uses the fact that holim HomR (R/ms , k) ≃ Γm k ≃ k. → s More generally, if R is a commutative Noetherian ring and I is an ideal, we may consider R −→ R/I (i.e., replacing the field k by a more complicated ring). It turns out that the double centralizer map is I-adic completion whenever R/I is proxy-small. 7.B. Cochains on a space. In the setting R = C ∗ (X; k) of cochains on a space, the Eilenberg-Moore spectral theorem shows that E = HomC ∗ (X;k) (k, k) ≃ C∗ (ΩX; k), H∗ (E) = H∗ (ΩX; k) provided that either (Case 0) X is simply connected or (Case p) X is connected, π1 (X) is a finite p-group k = Fp and X is p-complete [31]. This immediately gives a very rich source of examples that we will revisit frequently. Provided we have either Case 0 or Case p, then C ∗ (X) is dc-complete. Indeed, the Rothenberg-Steenrod equivalence HomC∗ (ΩX) (k, k) ≃ C ∗ (X) holds for any connected space X. Accordingly, provided the Eilenberg-Moore equivalence holds, the double centralizer map κ is an equivalence. Finally we may consider proxy-smallness. Lemma 7.1. (i) If dimk H∗ (ΩY ) is finite then k is small over C ∗ (Y ). (ii) If Y falls under Case 0 or Case p, there is a map X −→ Y with homotopy fibre F , and dimk H∗ (ΩY ) and dimk H ∗ (F ) are finite, then k is proxy-small over C ∗ (X). 18 Proof: Since dimk H∗ (ΩY ) is finite, k |= C∗ (ΩY ). Applying HomC∗ (ΩY ) (·, k) we see C ∗ (Y ) ≃ HomC∗ (ΩY ) (k, k) |= HomC∗ (ΩY ) (C∗ (ΩY ), k) ≃ k. This proves Part (i). For Part (ii), let R = C ∗ (X), S = C ∗ (Y ) and note C ∗ (X) ⊗C ∗ (Y ) k ≃ C ∗ (F ) by the Eilenberg-Moore theorem. Now take K = C ∗ (F ). We note that k |= K by hypothesis. Since S |= k by Part (i), we may apply R ⊗S (·) and deduce R = R ⊗S S |= R ⊗S k = C ∗ (F ). Finally, C ∗ (F ) builds k by killing homotopy groups, since F is connected.  Corollary 7.2. (Case 0) If X is simply connected and k = Q and if H ∗ (X) is Noetherian then Q is proxy small over C ∗ (X; Q). (Case p) If k = Fp and X is the p-completion of BG then Fp is proxy small over C ∗ (X; Fp ). Proof: For Case 0, since H ∗ (X) is Noetherian, we may choose a polynomial subring P = Q[V ] on finitely many even degree generators. We have Q[V ] = H ∗ (Y ) where Y = K(V ) is the corresponding product of even Eilenberg-MacLane spaces. The inclusion P = K[V ] −→ H ∗ (X) is realized by a map X −→ Y . The space ΩY is a product of finitely many odd Eilenberg-MacLane spaces, and rationally this is a product of spheres, so Part (i) of Lemma 7.1 applies. Furthermore since H ∗ (X) is a finitely generated P module, it has a finite resolution by finitely generated projectives and the spectral sequence for calculating π∗ (C ∗ (X) ⊗C ∗ (Y ) Q) = H ∗ (F ) has finite dimensional E2 term and so the hypotheses of Part (ii) of Lemma 7.1 hold. For Case p we note that the p-completion of Y = BU(n) satisfies the conditions of Part (i) of Lemma 7.1. Now, given G, choose n so that G admits a faithful representation in U(n) and apply Part (ii) of Lemma 7.1 to the p-completion of the fibration U(n)/G −→ BG −→ BU(n).  8. Exterior algebras There are many ways to use Morita theory, but there is a very elementary and striking one which illustrates that it is significant in even in the very simple case when π∗ (E) is an exterior algebra on one generator. 8.A. Exterior algebras over Fp on a generator of degree −1. To start with, we note that is easy to see that if E is an Fp -algebra with π∗ (E) = ΛFp (τ ) exterior on one generator, then E is formal. However if π∗ (E) = ΛFp (τ ) but E itself is only known to be a Z-algebra, the situation is considerably more complicated. 19 We may use Morita theory to give a classification [36] in the special case that the exterior generator is in degree −1. We will return to discuss the more general case in Subsection 8.B. Theorem 8.1. Differential graded algebras E with H∗ (E) exterior over Fp on a single generator of degree −1 (up to quasi-isomoprhism) are in bijective correspondence with complete discrete valuation rings with residue field Fp (up to isomorphism of rings). Proof: The idea is to associate to any such E the endomorphism DGA R = HomE (Fp , Fp ). Evidently the spectral sequence for calculating H∗ (R) collapses at E2 with value Fp [x] for an element x of total degree 0. This shows R is a filtered ungraded ring with this as associated graded ring. One argues that it is commutative and complete with residue field Fp . If one starts with R, its maximal ideal is principal, generated by an element x and we may form x a complex Fp = (R −→ R). The DGA E = HomR (Fp , Fp ) has homology exterior on a generator of degree −1, and the double centralizer completion map R −→ HomE (Fp , Fp ) is an equivalence.  8.B. General algebras with exterior homotopy. Let us consider ring spectra E with π∗ (E) = ΛFp (τ ) where τ is of degree d. We have ring maps S −→ Z −→ Z/p, and we have already observed that if we restrict attention to Z/p-algebras, there is a unique such E. If d = −1 we classified Z-algebras in Subsection 8.A, and found there were a lot of them. If d = 0 the answers for S-algebras and Z-algebras are the same by Shipley’s Theorem, and there is a unique such algebra. For d ≥ 1 there is an obstruction theory, and the answer is given by Dugger and Shipley [38]. Indeed, we are considering square zero extensions of Z/p by the bimodule Z/p in degree d, and hence (with A = S or Z), the A-algebras E are classified by the Hochschild cohomology group HH d+2(Z/p|A; Z/p), with orbits under Aut(Z/p) giving isomorphic algebras E. In fact the Hochschild cohomology rings are polynomial and divided power algebras on a single degree 2 generator: HH ∗(Z/p|Z; Z/p) = Z/p[xZ2 ] and HH ∗(Z/p|S; Z/p) = ΓZ/p [xS2 ]. We conclude that for any odd d ≥ 1 there is single formal algebra and for any even d ≥ 2 there are precisely two isomomorphism classes of Z-algebras and precisely two isomomorphism classes of S-algebras. In each case one of them is formal and one is not. The really striking phenomenon is that restriction along S −→ Z, does not induce a bijection of isomorphism types. Indeed, one may check that the generator xZ2 restricts nontrivially (so we may take xS2 to be that restriction). It follows that there is a bijection until we reach (xZ2 )p , which restricts to zero in Γ(xS2 ). In other words, the two Z-algebras E, E ′ with d = 2p − 2 become equivalent as S-algebras: these two inequivalent DGAs are topologicially equivalent. It is hard to be explicit when d is not small, but if p = 2 and d = 2, the DGA Z[e | de = 2]/(e3 , 2e2 ) is not formal as a Z-algebra but it is formal as an S-algebra. Finally, the S-algebra E with d = 2p − 2 which is not realizable as a Z-algebra, is the truncation of the dth Morava K-theory. 20 8.C. Classification of free rational G-spectra. In another direction, working over the rationals we note that for any compact Lie group G the DGA C∗ (G) has homology H∗ (G) exterior on odd degree generators. It might not be apparent that it is formal. However, we may consider R = HomC∗ (G) (k, k) ≃ C ∗ (BG); since this is commutative and has cohomology which is polynomial on even degree generators, it is formal and hence equivalent to H ∗ (BG). It follows that C∗ (G) ≃ H∗ (G). This is the starting point for classifying free rational Gspectra [61, 62]. Part 3. Regular rings We have now set up the basic machinery and the rest of the lectures will investigate homotopy invariant counterparts of classical definitons in commutative algebra of local rings. The justification consists of the dual facts that the new definition reduces to the old in the classical setting and that the new definition covers and illuminates examples in new contexts. Regular local rings are the most basic and best behaved objects, so it makes sense to start with these. Section 9 recalls the three styles of definition from commutative algebra and explains how to give homotopy invariant versions, and then illustrates them in our main examples. Section 10 explains how we can use this class of ring spectra to give a homotopy invariant counterpart of the notion of a finitely generated module, at least for ‘normalizable’ ring spectra. 9. Regular ring spectra In commutative algebra there are three styles for a definition of a regular local ring: ideal theoretic, in terms of the growth of the Ext algebra and a version for modules. We begin in Subsection 9.A by recalling the commutative algebra, where the conditions are equivalent. We then turn to other contexts, where the conditions may differ, and consider which one is most appropriate. 9.A. Commutative algebra. The following definitions are very familiar; we have introduced a slightly more elaborate terminology to smooth the transition to other contexts. The prefix s- signifies that the definition is structural, the prefix g- signifies that the definition is in terms of the growth rate, and the prefix m- signifies that the definition is in terms of the module category. Definition 9.1. (i) A local Noetherian ring R is s-regular if the maximal ideal is generated by a regular sequence. (ii) A local Noetherian ring R is g-regular if Ext∗R (k, k) is finite dimensional. (iii) A local Noetherian ring R is m-regular if every finitely generated module is small in the derived category D(R). These are equivalent by the Auslander-Buchsbaum-Serre theorem; one might think of this as the first theorem of homotopy invariant commutative algebra. 21 9.B. Regularity for ring spectra. The one definition that is easy to adapt is g-regularity, at least when k is a field. This is a basic input to the entire theory. It is also convenient to have a name for when the coefficient ring is regular. Definition 9.2. (i) We say that R is c-regular when the coefficient ring π∗ (R) is regular. (ii) We say that R is g-regular if π∗ (HomR (k, k)) is finite dimensional over k. It is obvious from the spectral sequence Ext∗,∗ R∗ (k, k) ⇒ π∗ (HomR (k, k)) that c-regular implies g-regular. The converse is very far from being true, as we shall see shortly. It is more subtle to consider s-regular ring spectra. The s-regularity condition on rings states that m is generated by a regular sequence x1 , . . . , xr , so that there are short exact sequences x 1 R −→ R −→ R/(x1 ) x 2 R/(x1 ) −→ R/(x1 ) −→ R/(x1 , x2 ) and x r R/(x1 , . . . , xr−1 ) −→ R/(x1 , . . . , xr−1 ) −→ R/m = k. In other words, we may start with R, and successively factor out a regular element until we get to k. If we now remember the degrees, a single instance is the (additive) exact sequence of modules x Σn R −→ R −→ R/(x). x In other words, the ring R/(x) is equivalent to the Koszul complex K(x) = (R −→ R). If we think multiplicatively this gives a cofibre sequence 1 R −→ K(x) −→ K(x) ⊗R k = Λ(τ ) of rings, where τ is a generator of degree n + 1. The definition is now obtained by iterating this construction. Definition 9.3. We say that R is s-regular if there are cofibre sequences of rings R = R0 −→ R1 −→ Λ1 , R1 −→ R2 −→ Λ2 , · · · , Rr−1 −→ Rr −→ Λr , with Rr ≃ k and π∗ (Λi ) exterior over k on one generator. Lemma 9.4. If R is s-regular then it is also g-regular. 1If S −→ R is a map of rings and we have a map R −→ k, the cofibre ring is Q = R⊗Q k. This corresponds to the fact that in algebraic geometry and topology this cofibre ring is often the ring of functions on the geometric fibre. 22 Proof : We need to work our way along the sequence of cofibrations. Since Rr ≃ k is obviously g-regular, it suffices to oberve that given a cofibre sequence C −→ B −→ Λ with B g-regular, then C is also g-regular. Suppose then that HomB (k, k) is finitely built from k. Since k |= Λ it follows that k |= HomB (k, k) |= HomB (Λ, k) ≃ Homk (k ⊗B Λ, k). However k ⊗B Λ ≃ k ⊗B B ⊗C k ≃ k ⊗C k. so that Homk (k ⊗B Λ, k) ≃ Homk (k ⊗C k, k) ≃ HomC (k, k), showing HomC (k, k) is finitely built by k as required.  However, there is no good notion of m-regularity for ring spectra. The problem is that we do not have a homotopy invariant definition of finite generation in general. However, we will turn this around, and in Section 10 we will show that one can use the supposed equivalence of g-regularity and the putative m-regularity conditions to define finite generation. 9.C. Regularity for rational spaces. We have seen in Subsection 7.B, that for simply connected rational spaces X, if R = C ∗ (X; Q) we have π∗ (E) = H∗ (ΩX). Accordingly a g-regular rational space is one with H∗ (ΩX) finite dimensional. Proposition 9.5. A simply connected rational space X is g-regular if and only if it is a finite product of even Eilenberg-MacLane spaces. Its cohomology is therefore polynomial on even degree generators and it is also s-regular. Proof : To start with, we note that an even Eilenberg-MacLane space X = K(Q, 2n) is g-regular since its loop space is K(Q, 2n − 1) ≃ S 2n−1 . On the other hand an odd EilenbergMacLane space X = K(Q, 2n + 1) is not g-regular since its loop space is K(Q, 2n) which has homology polynomial on one generator of degree 2n. Finally, since ΩX splits as a product of Eilenberg-MacLane space for any rational space, we see H∗ (ΩX) is finite dimensional if and only if the homotopy groups of X are finite dimensional and in even degree. Building X from its Postnikov tower we see inductively that the cohomology of its Postnikov sections are entirely in even degrees (and polynomial). Since the homotopy of X is in even degrees the k-invariants are in odd degrees and hence zero. This shows that X is a finite product of even Eilenberg-MacLane spaces.  9.D. g-regularity for p-complete spaces. Of the commutative algebra definitions, the only one with a straightforward counterpart for C ∗ (X) is g-regularity. We have seen in Subsection 7.B, that for connected p-complete spaces X with finite fundamental group, if R = C ∗ (X; Q) we have π∗ (E) = H∗ (ΩX). Accordingly a g-regular rational space is one with H∗ (ΩX) finite dimensional. 23 Example 9.6. For any finite p-group G, the classifying space X = BG is p-complete, and hence satisfies our hypotheses without further completion. Thus ΩX is equivalent to the finite discrete space G, so E ≃ kG and X is g-regular. On the other hand the coefficient ring H ∗ (BG) is very rarely regular, so this gives many examples of g-regular ring spectra which are not c-regular. Example 9.7. Extending this idea, if G is any compact Lie group with component group a finite p-group we have Ω(BG∧p ) ≃ (ΩBG)∧p ≃ G∧p , so that X = (BG)∧p is again g-regular over Fp . In fact X = (BG)∧p is g-regular if and only if π0 (G) is p-nilpotent, and we will see explicit examples later where completed classifying spaces are not g-regular. In fact this is the starting point of Dwyer and Wilkerson’s project [37] to capture properties of groups at a single prime homotopically. They define a connected p-complete space X to be the classifying spaces of a connected p-compact group if H∗ (ΩX; Fp ) is finite dimensional (i.e., if C ∗ (X; Fp ) is g-regular). In other words, a p-compact group is an Fp -finite loop space whose classifying space is p-complete and g-regular. A major programme involving many people has given a classification of connected pcompact groups following the lines of that for compact Lie groups. This starts with the theorem of Dwyer and Wilkerson that connected p-compact groups have a maximal torus, and has finally culminated in the classification of connected p-compact groups in terms of the associated p-adic root data (Anderson, Grodal, Møller and Viruel ([5] for odd primes, and [4] for p = 2). At the prime 2 there is only one simple 2-compact group which is not obtained by completing a compact connected Lie group. At odd primes there are many exotic examples, because of the many p-adic reflection groups. It is remarkable that objects defined purely in terms of a finiteness condition can be completely classified. 9.E. s-regularity for p-complete spaces. Looking back at the definition of s-regularity for ring spectra, the basic ingredient is to consider the multiplicative sequence R −→ K(x) −→ K(x) ⊗R k = Λ(τ ) where τ is a generator of degree n+1. Since we are working with k-algebras, exterior algebras are formal, so if n ≥ 0, we have Λ(τ ) ≃ C ∗ (S n+1 ). Thus if R = C ∗ (X), the Eilenberg-Moore theorem shows that the most obvious source of such cofibre sequence is a spherical fibration X ←− X1 ←− S n+1 . It is natural when talking about spaces to restrict the cofibrations to be of this type Definition 9.8. A space X is s-regular if there are k-complete fibrations X = X0 ←− X1 ←− S n1 , X1 ←− X2 ←− S n2 , . . . , Xr−1 ←− Xr ←− S nr with Xr ≃ ∗ and ni ≥ 1. Examples of this type seem very rare, but do arise from the classical infinite families of compact Lie groups. 24 Example 9.9. X = BU(n) is s-regular, in view of the fibrations BU(n) ←− BU(n − 1) ←− U(n)/U(n − 1) ∼ = S 2n−1 . Similarly for BSO(n), BSpin(n), BSp(n). 10. Finite generation In conventional algebra, finite generation is one of the most important finiteness conditions. However it is not all obvious how best to translate this into a homotopy invariant context. In this section we describe an approach we have found useful, which is based on the idea that finite generation and smallness coincide over regular rings. 10.A. Finiteness conditions. If R is a conventional Noetherian commutative ring and M is a module over it, there are a number of natural finiteness conditions. If M has a finite resolution by finitely generated projectives then it is finitely built from R and hence small in the derived category; the converse is also true, since one may factor the identity map through a finite truncation of the projective resolution. These two equivalent homotopy invariant finiteness conditions on M are extremely useful. On the other hand, it is not so clear how to give a homotopy invariant version of the notion of being finitely generated. In this section we discuss one useful method. It is based on the fact that for a regular conventional ring Q finitely generated modules coincide with small modules. 10.B. Normalizable ring spectra. In commutative algebra, it is natural to assume rings are Noetherian, and one of the most useful consequences for k-algebras is Noether normalization, stating that a Noetherian k-algebra is a finitely generated module over a polynomial subring. Definition 10.1. We will say that a ring spectrum R is g-normalizable, if there is a gregular ring spectrum S with S∗ Noetherian, and a ring map S −→ R making R into small S-module. In this case S −→ R is called a g-normalization and R ⊗S k is its Noether fibre. If S can be chosen so that its coefficient ring S∗ is regular, we say R is c-normalizable. As usual, with coefficient-level conditions, c-normalizations are a bit rigid, but they do give a template for comparison. Lemma 10.2. (i) If S∗ is regular then an S-module N is small if and only if N∗ is a finitely generated S∗ -module. (ii) If R is c-normalizable then R∗ is Noetherian. Proof: Part (ii) follows from Part (i), so we prove Part (i). It is easy to see that we have a cofibre sequence X −→ Y −→ Z of S-modules, if two terms have finitely generated homotopy, so does the third. Thus any small module has finitely generated homotopy. For the converse, we start by noting that projectives are realizable. Next, if P∗ is projective, HomS (P, M) = HomS∗ (P∗ , M∗ ). Now for any M we may choose a projective S∗ -module mapping onto M∗ and realize it by a map P −→ M with fibre F . If M∗ was not projective 25 to start with, F∗ will be of lower projective dimension. Since S∗ is regular, this process terminates.  Example 10.3. (Venkov) If G is a compact Lie group (for example a finite group), then C ∗ (BG) is c-normalizable. Indeed, we may choose a faithful representation G −→ U(n), giving a fibration U(n)/G −→ BG −→ BU(n). It is an unpublished consequence of work of Castellana and Ziemianski that every pcompact group has a faithful linear representation, which is to say that if BΓ is regular there is a map BΓ −→ BSU(n), for some n, whose homotopy fibre is Fp -finite. This means that every p-compact group is c-normalizable. 10.C. Finitely generated modules. We are now equipped to give our definition. Definition 10.4. Suppose that R is a commutative ring spectrum and M is an R-module. If we are given a normalization ν : S −→ R, we say that M is ν-finitely generated if M is small over S. If R is g-normalizable, we say that M is finitely generated if M is ν-finitely generated for every g-normalization ν. Some elementary consequences follow as in Lemma 10.2. Lemma 10.5. (i) If R is g-normalizable and M is finitely generated then M∗ is a finitely generated R∗ -module. (ii) If ν : S −→ R is a c-normalization, then M is ν-finitely generated if and only if M∗ is finitely generated over R∗ . Remark 10.6. (a) If R is c-normalizable, it is natural to refer to the class of modules M for which M∗ if finitely generated over R∗ as c-finitely generated. (b) This raises the question of whether there are c-finitely generated modules which are not finitely generated. In other words, if R is a c-normalizable g-regular ring and M is an R-module with M∗ finitely generated over R∗ does it follow that M is small? It would suffice to show that R has a c-normalization S which is an S-module retract of R, as happens when S∗ −→ R∗ is a monomorphism and R∗ is Gorenstein. Proof: (i) If M is small over S for some normalization, then M∗ is finitely generated over S∗ and hence over R∗ . (ii) If M∗ is finitely generated over R∗ it is finitely generated over S∗ . Since S∗ is regular, this means M is small over S and hence finitely generated.  10.D. Singularity categories. In conventional commutative algebra the Buchweitz singularity category Dsing (R) is defined to be the quotient of the bounded derived category by the subcategory of perfect complexes. If we are given a normalization ν of a commutative ring spectrum R, it is evident that the category of ν-finitely generated modules is a triangulated subcategory of the category 26 of R-modules, and similarly for the finitely generated modules. Evidently for any particular g-normalization ν we have full and faithful embeddings Dsmall (R) ⊆ Df g (R) ⊆ Dν−f g (R) ⊆ Dc−f g (R) of triangulated categories each closed under retracts. We could consider any one of the quotients, but the most natural is the initial quotient Dsing (R) = Df g (R)/Dsmall (R). This has the merit that if R is itself g-regular, the quotient is trivial, and in many cases one can show that Df g (R) = Dc−f g (R). The singularity quotients are understood in many algebraic cases, but for the present we will restrict ourselves to an example where we can see from first principles that the quotient is non-trivial. See [63] for further discussion. Example 10.7. If R = C ∗ (BA4 ) with k = F2 then M = C ∗ (BV4 ) is c-finitely generated since H ∗ (BV4 ) is finitely generated over H ∗ (BA4 ) by Venkov’s Theorem. However if we let F = fib(BV4 −→ BA4 ) there is a fibre sequence ΩS 3 −→ F −→ SO(3)/V4 which may be used to check H ∗ (F ) is non-zero in infinitely many degrees. Thus C ∗ (BV4 ) is not small over C ∗ (BA4 ). Part 4. Hypersurface rings This is the second of a series of parts that take particular classes of commutative local rings, and identifies ways of giving homotopy invariant counterparts of the definitions, which apply to ring spectra. The justification consists of the dual facts that the new definition reduces to the old in the classical setting and that the new definition covers and illuminates examples in new contexts. Although we restrict attention to hypersurface rings here, we begin in Section 11 with a brief sketch of relevant facts about complete intersections in general to set the context. In Section 12 we describe the algebraic theory of hypersurface rings in a bit more detail. In Section 13 we explain the relevance of bimodules and Hochschild cohomology. In view of the discussion in Part 3, it is then quite routine in Section 14 to provide the definitions of ci ring spectra, and we illustrate some of the results with examples. In Sections 15 and 16 we explain how the three homotopy invariant versions of the ci condition are related to each other. 11. Complete intersections To understand the significance of hypersurfaces, we should first say a word about complete intersections. There is a general framework for discussing these in the homotopy invariant context [55, 22], but there are few examples beyond the hypersurface case. The general theory is in some sense obtained by iterating the case of hypersurfaces, but there are a number of different ways of iterating it, and some work better than others. 27 11.A. Classical complete intersections. These lectures will focus on hypersurfaces, but it is helpful to set the more general context with a brief discussion of complete intersections in general. Just as for regular rings there are three styles of definition: (s) a structural one (g) one involving growth and (m) one involving the homological algebra of modules. These all have counterparts in the homotopy invariant setting which we will introduce in due course. We start with the structural definition. The best behaved subvarieties of affine space are those which are specified by the right number of equations: if they are of codimension c then only c equations are required. On the same basis, a commutative local ring R is a structurally complete intersection (sci) if its completion is the quotient of a regular local ring S by a regular sequence, f1 , f2 , . . . , fc (this would normally just be called ‘ci’, but the longer name eases comparison with the case of ring spectra). We will suppose that R is complete, so that R = S/(f1 , . . . , fc ). The smallest possible value of c (as S and the regular sequence vary) is called the codimension of R. A hypersurface is the special case when c = 1 so that a single equation is used. When it comes to growth, if R is ci of codimension c, one may construct a resolution of any finitely generated module growing like a polynomial of degree c − 1. In particular the ring Ext∗R (k, k) has polynomial growth (we say that R is gci). Perhaps the most striking result about ci rings is the theorem of Gulliksen [67] which states that this characterises ci rings so that the sci and gci conditions are equivalent for local rings. With a little care, one may construct the resolutions in an eventually multi-periodic fashion: the projective resolution eventually has the pattern of the tensor product of c periodic exact sequences. In fact the construction is essentially independent of the module and the calculation can be phrased in terms of the Hochschild cohomology of R. This opens the way to the theory of support varieties for modules over a ci ring [9]. 11.B. Homotopy invariant versions, and Levi’s groups. One may give homotopy invariant versions of all three characterizations of the ci condition: (sci): the ‘regular ring modulo regular sequence’ condition, (mci): the ‘modules have eventually multiperiodic resolutions’ and (gci): polynomial growth of the Ext algebra We note that the Avramov-Quillen characterization of ci rings in terms of André-Quillen homology does not work for cochains on a space in the mod p context since Mandell has shown [80] that the topological André-Quillen cohomology vanishes very generally in this case. It involves some work to describe the sci and mci definitions, but if we take R = C ∗ (X) for a p-complete space Subsection 7.B shows H∗ (HomC ∗ (X) (k, k)) = H∗ (ΩX), so it is easy to understand the gci condition. Taking X = (BG)∧p we may consider what this means. Of course if G is a p-group, X = BG so ΩX ≃ G and H∗ (ΩX) is simply the group ring kG in degree 0 and therefore finite dimensional. More generally, it is known to be of polynomial growth in certain cases (for instance A4 or M11 in characteristic 2) and R. Levi [75, 76, 77, 78] has proved there is a dichotomy between small growth and large growth, and given examples 28 where the growth is exponential. Evidently groups whose p-completed classifying spaces have loop space homology that has exponential growth cannot be spherically resolvable, so Levi’s groups disproved a conjecture of F.Cohen. Example 11.1. (a) It is amusing to consider the p-completed classifying space BG∧p for G = (Cp × Cp ) ⋊ C3 where C3 acts via (1, 0) 7→ (0, 1) 7→ (−1, −1). When p = 3, G is a p-group so the space is g-regular. When p = 2 the group is the alternating group A4 , which we will see below is a hypersurface. If p ≥ 5 then Levi shows H∗ (Ω(BG∧p )) has exponential growth by showing that Ω(S 5 ∪p e6 ) is a retract. (b) If the reader prefers an example with a purely algebraic treatment, Benson shows in [15, Example 2.2] that the group (C3 )2 ⋊ C2 has a 3-completed classifying space whose loop space has exponential growth using the methods sketched in Subsection 14.E below. 12. Hypersurfaces in algebra In this section we recall some standard constructions for hypersurface algebas. We suppose R = S/(f ) is a hypersurface ring, where S is a regular ring and f is a nonzero element of degree d. Thus we have a short exact sequence f 0 −→ Σd S −→ S −→ R −→ 0 of S-modules for a regular local ring S. There are two basic constructions that we need to generalize. 12.A. The degree 2 operator. We describe a construction of a cohomological operator due to Gulliksen [68, 7]. We will do this for a single module, but it is apparent that the construction is essentially independent of the module, and in fact it lifts to Hochschild cohomology. Given an R-module M we may apply (·) ⊗S M to the defining sequence to obtain the short exact sequence f 0 −→ TorS1 (R, M) −→ Σd M −→ M −→ R ⊗S M −→ 0. Since f = 0 in any R-module, we conclude TorS1 (R, M) ∼ = Σd M, R ⊗S M ∼ = M, and TorSi (R, M) = 0 for i ≥ 2. Next, choose a free S-module F with an epimorphism to M, giving a short exact sequence 0 −→ K −→ F −→ M −→ 0 of S-modules. Applying (·) ⊗S R, we obtain 0 −→ TorS1 (R, M) −→ K −→ F −→ M −→ 0. Since TorS1 (R, M) ∼ = Σd M, this gives an element χf ∈ Ext2R (M, Σd M), 29 or a map χf : M −→ Σd+2 M in the derived category of R-modules. We sketch below how this construction lifts to give an element χf ∈ HH d+2(R|S), and hence in particular that it gives a natural transformation of the identity functor (i.e., an element of the centre ZD(R) of D(R)). 12.B. The eventually periodic resolution. Continuing with the above discussion, we may show that all modules M have free resolutions over R which are eventually periodic of period 2. Indeed, M has a finite free S-resolution 0 −→ Fn −→ Fn−1 −→ · · · −→ F1 −→ F0 −→ M −→ 0. Adding an extra zero term if necessary, we suppose for convenience that n is even. Now apply (·) ⊗S R to obtain a complex 0 −→ F n −→ F n−1 −→ · · · −→ F 1 −→ F 0 −→ M −→ 0. Since TorSi (R, M) = 0 for i ≥ 2, this is exact except in homological degree 1, where it is TorS1 (R, M) ∼ = Σd M. Splicing in a second copy of the resolution, we obtain a complex Fn −→ F n−1 −→ · · · −→ F 2 −→ F 1 −→ F 0 −→ M −→ 0 0 −→ ⊕ ⊕ ⊕ ⊕ ր Σd F n−1 −→ Σd F n−2 −→ Σd F n−3 −→ · · · −→ Σd F 0 which is exact except in the second row, in homological degree 4, where the homology is again M. We may repeatedly splice in additional rows to obtain a free resolution . . . −→ G3 −→ G2 −→ G1 −→ G0 −→ M −→ 0 over R. Remembering the convention that n is even, provided the degree is at least n, the modules in the resolution are (up to suspension by a multiple of d) G2i = F n ⊕ Σd F n−2 ⊕ · · · ⊕ Σd(n−2)/2 F 2 ⊕ Σdn/2 F 0 in even degrees and G2i+1 = F n−1 ⊕ Σd F n−3 ⊕ · · · ⊕ F 3 ⊕ Σd(n−2)/2 F 1 in odd degrees. 12.C. Smallness. We may reformulate the eventual periodicity of the previous subsection in homotopy invariant terms. Lemma 12.1. If R is a hypersurface R = S/(f ) and M is a finitely generated R-module then the mapping cone of χf : M −→ Σd+2 M is small. 30 Proof: From the Yoneda interpretation, we notice that χf : M −→ Σd+2 M is realized by the quotient map factoring out the first row subcomplex 0 −→ F n −→ F n−1 −→ · · · −→ F 1 −→ F 0 −→ 0. Thus the short exact sequence 0 −→ F • −→ G• −→ Σd+2 G• −→ 0 of R-free chain complexes realizes the triangle Σ1 M/χ −→ M −→ Σd+2 M.  12.D. Matrix factorizations. Because of the importance of matrix factorizations and their prominence in the IRTATCA programme, it is worth a brief subsection to make the connection. We have considered resolutions of R-modules M, and we note that if M is of projective dimension 1 over S then the S-resolution A 0 ←− M ←− F0 ←− F1 ←− 0 gives a periodic resolution 0 ←− M ←− F 0 ←− F 1 ←− F 0 ←− F 1 ←− F 0 ←− F 1 ←− · · · over R. Since f = 0 on M, multiplication by f on the S-resolution is null-homotopic and so there is a diagram 0o Mo 0 0o  Mo F0 o A F1 o 0 ⑥⑥ f ⑥⑥⑥ f  ~⑥⑥ B  F0 o F1 o 0 A In short we have two maps A : F1 −→ F0 and B : F0 −→ F1 with AB = f · id, BA = f · id. Since F0 and F1 are free modules, we can choose bases and represent A and B by matrices, so this structure is known as a matrix factorization. If we suppose S is of dimension d, R is of dimension d − 1. We note that the homological dimension of M over S can be expressed as an invariant of M as an R-module. In our case M is of projective dimension 1 over S and by the Auslander-Buchsbaum formula, it is of depth d − 1 as an R-module, which is to say it is a maximal Cohen-Macaulay module. For a module M of depth d − 1 − i (i.e., of projective dimension i + 1 over S) the above discussion applies to its pth syzygy. 13. Bimodules and natural endomorphisms of R-modules To describe the m-version of the definition of hypersurface rings, we need to briefly discuss bimodules. 31 13.A. The centre of the derived category of R-modules. If R is a commutative Noetherian ring and M is a finitely generated R-module with an eventually n-periodic resolution, there is a map M −→ Σn M in the derived category whose mapping cone is a small R-module. If R is an ungraded hypersurface ring, all finitely generated modules have such resolutions with n = 2. The lesson learnt from commutative algebra is that to use this to characterize hypersurfaces we need to look at all such modules M together, and ask for a natural transformation 1 −→ Σn 1 of the identity functor. By definition the centre ZD(R) is the graded ring of all such natural transformations. There are various ways of constructing elements of the centre, and various natural ways to restrict the elements we consider. Some of these work better than others, and it is the purpose of this section is to introduce these ideas. 13.B. Bimodules. We consider a map S −→ R, where S is regular and R is small over S. We may then consider Re = R ⊗S R, and Re -modules are (R|S)-bimodules. The Hochschild cohomology ring is defined by HH ∗ (R|S) = Ext∗Re (R, R). If f : X −→ Y is a map of (R|S)-bimodules, for any R-module M we obtain a map f ⊗ 1 : X ⊗R M −→ Y ⊗R M of (left) R-modules. The simplest way for us to use this is that if we have isomorphisms X ∼ = Σn R = R and Y ∼ as R-bimodules, the map f ⊗ 1 : M −→ Σn M is natural in M and therefore gives an element of codegree n in ZD(R): we obtain a map of rings HH n (R) = HomRe (R, Σn R) −→ ZD(R)n . Continuing, if X |=Re Y then X ⊗R M |=R Y ⊗R M. In particular, if X = R builds a small Re -module Y then M = R ⊗R M |=R Y ⊗R M =|Re ⊗R M = R ⊗S M. Thus if M is finitely generated (i.e., small over S), this shows M finitely builds a small R-module. It is sometimes useful to restrict the maps permitted in showing that X |=Re Y . If we restrict to using maps of positive codegree coming from Hochschild cohomology, we write X |=hh Y . If we permit any maps of positive codegree from the centre ZD(Re ) we write X |=z Y . Finally, we could relax further and require only that all the maps involved in building are endomorphisms of non-zero degree for some object and write X |=e Y . It is this last condition that turns out to be most convenient for complete intersections of larger codimension. 14. Hypersurface ring spectra We are now ready to describe the s-, g- and m- versions of the hypersurface condition for ring spectra. As usual we begin with the template in commutative algebra, go on to describe it in general and then make it concrete for spaces. 32 14.A. The definition in commutative algebra. In commutative algebra there are three styles for a definition of a hypersurace ring: ideal theoretic, in terms of the growth of the Ext algebra and a derived version. See [21] for a more complete discussion. Definition 14.1. (i) A local Noetherian ring R is an s-hypersurface ring if R = S/(f ) some regular ring S and some f 6= 0. (ii) A local Noetherian ring R is a g-hypersurface if the dimensions dimk (ExtnR (k, k)) are bounded independently of n. (iii) A local Noetherian ring R is a z-hypersurace if there is an elements z ∈ ZD(R) of non-zero degree so that M/z is small for all finitely generated modules M. Similarly R is an hh-hypersurface if the element z can be chosen to come from Hochschild cohomology. Theorem 14.2. ([7], transcribed into the present language in [21]) For a local Noetherian ring the s-, z- and g-hypersurface conditions are all equivalent. 14.B. Definitions for ring spectra. The appropriate definition of an s-hypersurface can be seen from the discussion of s-regular spectra: the point is that regular elements correspond to maps with exterior cofibres. Definition 14.3. (i) A ring spectrum R is a c-hypersurface if R∗ is a hypersurface ring. (ii) The ring spectrum R is an s-hypersurface if there is a normalization S −→ R with π∗ (R ⊗S k) = Λk (τ ). (iii) The ring spectrum R is a g-hypersurface if dimk (πn (HomR (k, k))) is bounded independently of n. (iv) The c-normalizable ring spectrum R is a z-hypersurace if there is an element z ∈ ZD(R) of non-zero degree so that M/z is small for all finitely generated modules M. Similarly R is an hh-hypersurface if the element z can be chosen to come from Hochschild cohomology. One immediate source of examples comes from c-hypersurfaces. Example 14.4. If R is a c-hypersurface then the spectral sequence Ext∗,∗ R∗ (k, k) ⇒ π∗ (HomR (k, k)) shows that it is a g-hypersurface. 14.C. Definitions for spaces. In view of the fact that regular elements correspond to spherical fibrations, adapting the above definitions for spaces is straightforward. Definition 14.5. (i) A space X is a c-hypersurface if H ∗ (X) is a hypersurface ring. (ii) A space X is an s-hypersurface (or spherical hypersurface) if it is the total space of a spherical fibration over a connected g-regular space BΓ: there is a g-regular space BΓ and a fibration S n −→ X −→ BΓ for some n. (iii) A space X is a g-hypersurface space if H ∗(X) is Noetherian and dimk Hn (ΩX) is bounded independently of n. 33 (iv) A space X is a z-hypersurface space if X is g-normalizable and there is an element z ∈ ZD(C ∗ (X)) of non-zero degree so that C ∗ (Y )/z is small for all finitely generated C ∗ (Y ). It is an hh-hypersurface if z comes from Hochschild cohomology. (The direct transcription for ring spectra would require that this holds for all finitely generated modules and not just those of the particular form C ∗ (Y )). Remark 14.6. Other variants have arisen, such as ωsci where we are permitted to use loop spaces on spheres rather than spheres. These conditions arose in Levi’s work. This is evidently a weakening of sci which still implies gci. For g-normalizable spaces X, we have [55, 22] the implications s − hypersurf ace ⇒ z − hypersurf ace ⇒ g − hypersurf ace. Over Fp the final implication may be reversed; the proof is given in [22] and relies on [43]. 14.D. An example. To start with we may consider the space BA4 at the prime 2. We will observe directly that it is a hypersurface according to any one of the definitions. To start with, we note that H ∗ (BA4 ) = H ∗ (BV4 )A4 /V4 = k[x2 , y3, z3 ]/(r6 ) where r6 = x32 + y32 + y3 z3 + z32 . This shows that BA4 is actually a c-hypersurface and hence also a g-hypersurface. Indeed, the Eilenberg-Moore spectral sequence shows that the loop space homology will eventually have period dividing 4. In fact we see that BA4 is an s-hypersurface space at 2. The direct symmetries of a tetrahedron give a homomorphism A4 −→ SO(3) and hence a map BA4 −→ BSO(3). The fibre is SO(3)/A4, and at the prime 2 this is S 3 , so there is a 2-adic fibration S 3 −→ BA4 −→ BSO(3). In Subsection 14.G, we will also describe a representation theoretic approach to showing that BA4 is a g-hypersurface, which will show that its ultimate period is exactly 4. 14.E. Squeezed homology. Since we are working with groups, it is illuminating to recall Benson’s purely representation theoretic calculation of the loop space homology H∗ (Ω(BG∧p )) [15]. In fact he defines the squeezed homology groups HΩ∗ (G; k) algebraically and proves H∗ (Ω(BG∧p )) ∼ = HΩ∗ (G; k), In more detail, HΩ∗ (G; k) is the homology of · · · −→ P3 −→ P2 −→ P1 −→ P0 , a so-called squeezed resolution of k. The sequence of projective kG-modules Pi is defined recursively as follows. To start with P0 = P (k) is the projective cover of k. Now if Pi has been constructed, take Ni = ker(Pi −→ Pi−1 ) (where we take P−1 = k), and Mi to be the smallest submodule of Ni so that Ni /Mi is an iterated extension of copies of k. Now take Pi+1 to be the projective cover of Mi . 34 14.F. Trivial cases. Note that if G is a p-group, we have Ω(BG∧p ) ≃ G so that H∗ (ΩBG) ∼ = kG and since k is the only simple module, M0 = 0 and we again find HΩ∗ (G) = kG. We would expect the next best behaviour to be when H ∗ (BG) is a hypersurface. Indeed, if H ∗ (BG) is a polynomial ring modulo a relation of codegree d, the Eilenberg-Moore spectral sequence ∧ Ext∗,∗ H ∗ (BG) (k, k) ⇒ H∗ (Ω(BGp )) shows that there is an ultimate periodicity of period d − 2. The actual period therefore divides d − 2. We now return to the example of A4 . 14.G. A4 revisited. We described the homotopy theoretic proof that BA4 is an s-hypersurface space above. Here we sketch a purely algebraic proof from [15]. To start with, we would like to see algebraically that H∗ (Ω(BA4 )∧2 ) is eventually periodic. This case is small enough to be able to compute products in H∗ (ΩBG∧p , k) using squeezed resolutions, and we get H∗ (ΩBG∧p , k) = Λ(α) ⊗ khβ, γi/(β 2, γ 2 ) with |α| = 1 and |β| = |γ| = 2. Beware that β and γ do not commute, so that a k-basis for H∗ (ΩBG∧p , k) is given by alternating words in β and γ (such as βγβ or the empty word), and α times these alternating words. There are three simple modules. Indeed, the quotient of A4 by its normal Sylow 2-subgroup is of order 3; supposing for simplicity that k contains three cube roots of unity 1, ω, ω, the simples correspond to how a chosen generator acts. The projective covers of the three simple modules are k❃ ❃ P (k) = ω ❃ ❃ ω̄ , P (ω) = ω̄ k ⑥⑥ ❆❆❆ ω❅ ω̄ ❄❄ ❅ ω ⑦⑦⑦ k, ❄ P (ω̄) = k ❃ ❃ ω̄ ω. ⑧⑧ With this information to hand, the reader may verify the assertion about the loop space homology ring by using squeezed resolutions. 15. s-hypersurface spaces and z-hypersurface spaces In the algebraic setting the remarkable fact is that modules over hypersurfaces have eventually periodic resolutions, and hence that they are hhci of codimension 1. The purpose of this section is to sketch a similar result for spaces. The argument is given in detail in [22]. Theorem 15.1. If X is an s-hypersurface space with fibre sphere of dimension ≥ 2 then X is a z-hypersurface space. 15.A. Split spherical fibrations. The key in algebra was to consider bimodules, for which we consider the (multiplicative) exact sequence R −→ Re −→ Re ⊗R k, 35 where the first map is a monomorphism split by the map µ along which R acquires its structure as an Re -module structure. This corresponds to the pullback fibration X ←− X ×BΓ X ←− S n , split by the diagonal ∆ : X −→ X ×BΓ X along which the cochains on X becomes a bimodule. To simplify notation, we consider a more general situation: a fibration B ←− E ←− S n with section s : B −→ E. The case of immediate interest is B = X, E = X ×BΓ X, where a C ∗ (E)-module is a C ∗ (X)-bimodule. Note that by the third isomorphism theorem for fibrations, there is a fibration s ΩS n −→ B −→ E. This gives the required input for the following theorem. The strength of the result is that the cofibre sequences are of C ∗ (E)-modules. s Theorem 15.2. Suppose given a fibration ΩS n −→ B −→ E with n ≥ 2. (i) If n is odd, then there is a cofibre sequence of C ∗ (E)-modules Σn−1 C ∗ (B) ←− C ∗ (B) ←− C ∗ (E). (ii) If n is even, then there are cofibre sequences of C ∗ (E)-modules C ←− C ∗ (B) ←− C ∗ (E) and Σ2n−2 C ∗ (B) ←− C ←− Σn−1 C ∗ (E). In particular the fibre of the composite C ∗ (B) −→ C −→ Σ2n−2 C ∗ (B) is a small C ∗ (E)-module constructed with one cell in codegree 0 and one in codegree n − 1. Remark 15.3. Note that in either case we obtain a cofibre sequence K ←− C ∗ (B) ←− Σa C ∗ (B) of C ∗ (E)-modules with K small. The strategy is to first prove the counterparts in cohomology by looking at the Serre spectral sequence of the fibration from Part (i) and then lift the conclusion to the level of cochains. 36 16. Growth of z-hypersurface resolutions In this brief section we prove perhaps the simplest implication between the hypersurface conditions: a z-hypersurface is a g-hypersurface. Lemma 16.1. If R is a z-hypersurface and k is a field then the vector spaces πn (E) are of bounded dimension and R is a g-hypersurface. Proof: Since R is a z-hypersurface, then in particular there is a projective resolution of k which is eventually periodic. In other words there is a triangle Σn k −→ k −→ L with n 6= 0 and L small over R. Applying HomR (·, k) we find a triangle Σ−n E ←− E ←− HomR (L, k). Since L is finitely built from R, HomR (L, k) is finite dimensional over k, and hence only nonzero in a finite range of degrees (say [−N, N]). Outside that range we have πs+n (E) ∼ = πs (E), so every homotopy group is isomorphic as a k-vector space to one in the range [−N − n, N + n] and the bound is the largest of these dimensions.  Remark 16.2. Essentially the same argument shows that a cofibre sequence Σn A −→ A −→ B with two terms the same means that the growth rate of A is at most one more than that of B. Part 5. Gorenstein rings This is the final part taking a particular classes of commutative local rings, and giving homotopy invariant counterparts of the definitions. The justification consists of the dual facts that the new definition reduces to the old in the classical setting and that the new definition covers and illuminates new examples.The generalization of the Gorenstein condition is perhaps the most successful of the three, since there are so many Gorenstein ring spectra, and this approach provides consequences that are both unexpected and very concrete. In Section 17 we introduce the homotopy invariant version of the Gorenstein condition an in Section 18 the associated Gorenstein duality property and its implications for coefficients. We then provide some basic tools for dealing with the Gorenstein condition: ascent and descent in Section 19 and Morita invariance in Section 20. We then turn to examples in earnest, with a discussion of Gorenstein duality for group cohomology in Section 21, for rational homotopy theory in Section 22 and a brief pointer to other examples in Section 23. 17. The Gorenstein condition In this section we quickly recall the definition of a Gorenstein local ring in a form which also makes sense for ring spectra with a map to k. 37 17.A. Gorenstein local rings. The usual definition of a Gorenstein local ring is that R is of finite injective dimension over itself. But it is then proved that in fact it is then of injective dimension equal to r = Krull dimension(R) and that Ext∗R (k, R) = ExtrR (k, R) = k. Conversely, if this holds, the ring is Gorenstein. There are various other characterizations of Gorenstein rings, including a duality statement that we will discuss shortly, but this is enough to suggest the definition for ring spectra. 17.B. Gorenstein ring spectra. Ultimately, we want to consider duality phenomena modelled on those in commutative algebra of Gorenstein local rings, so we will develop the theory for spectra in parallel. Corresponding to the Noetherian condition we restrict the class of ring spectra to those which are proxy-small in the sense of Definition 5.2. We begin with the core Gorenstein condition and move onto duality in due course. These definitions come from [33]. 17.C. The Gorenstein condition. We say that R −→ k is Gorenstein of shift a (and write shift(R) = a) if we have an equivalence HomR (k, R) ≃ Σa k of R-modules. Remark 17.1. We will say that it is c-Gorenstein if R∗ −→ k is a Gorenstein local ring. As usual the spectral sequence Ext∗,∗ R∗ (k, R∗ ) ⇒ π∗ (HomR (k, R)) shows that a c-Gorenstein ring spectrum is Gorenstein, but we will give many examples of Gorenstein ring spectra which are not c-Gorenstein. 18. Gorenstein duality Although the Gorenstein condition itself is convenient to work with, the real reason for considering it is the duality property that it implies. To formulate this, we use local cohomology in the sense of Grothendieck, and the reader may wish to refer to Appendix A for the basic definitions. 18.A. Classical Gorenstein duality. In classical local commutative algebra, the Gorenstein duality property is that all local cohomology is in a single cohomological degree, where it is the injective hull I(k) of the residue field. To give a formula, we write Γm M for the m-power torsion in an R-module M, and Hm∗ (M) for the local cohomology of M, recalling Grothendieck’s theorem that if R is Noetherian, Hm∗ (M) = R∗ Γm (M). The Gorenstein duality statement for a local ring of Krull dimension r therefore states Hm∗ (R) = Hmr (R) = I(k). If R is a k-algebra, I(k) = R∨ = Γm Homk (R, k). 38 18.B. Gorenstein duality for k-algebra spectra. Turning to ring spectra, we will treat the case that R is a k-algebra. This simplifies things considerably, and covers many interesting examples. The more general case requires a discussion of Matlis lifts, for which we refer the reader to [33]. In the case of k-algebras, we may again define R∨ = Cellk (Homk (R, k)) and observe this has the Matlis lifting property HomR (T, R∨ ) ≃ Homk (T, k) for any T built from k. In particular, if R is Gorenstein of shift a we have equivalences of R-modules (G) (M ) HomR (k, Cellk R) ≃ HomR (k, R) ≃ Σa k ≃ HomR (k, Σa R∨ ), where the equivalence (G) is the Gorenstein property and the equivalence (M) is the Matlis lifting property. We would like to remove the HomR (k, ·) to deduce Cellk R ≃ Σa R∨ . Morita theory (specifically Lemma 6.3) says that if R is proxy-regular we may make this deduction provided R is orientably Gorenstein in the sense that the right actions of E = HomR (k, k) on Σa k implied by the two equivalences (G) and (M) agree. We note that Cellk (R) is a covariant functor of R whilst R∨ is a contravariant functor of R, so an equivalence between them is a form of duality: when it holds we say R satisfies Gorenstein duality. 18.C. Automatic orientability. There are a number of important cases where orientability is automatic because E has a unique action on k, and in this case the Gorenstein condition automatically implies Gorenstein duality. The first case of this is when R is a classical commutative local ring, although of course we knew already that in this case the Gorenstein condition is equivalent to Gorenstein duality. From our present point of view, we see this as a consequence of connectivity: E (whose homology is Ext∗R (k, k)) has a unique action on k. The same argument applies when the ring spectrum is both a k-algebra and connected. Proposition 18.1. Suppose R is a proxy-regular, connected k-algebra and π∗ (R) is Noetherian with π0 (R) = k and maximal ideal m of positive degree elements. If R is Gorenstein of shift a, then it is automatically orientable and so has Gorenstein duality. Proof : First we argue that if R is Gorenstein, it is automatically orientable. Indeed, we show that E has a unique action on k. Since R is a k-algebra, the action of E on k factors through E = HomR (k, k) −→ Homk (k, k) = k, so since k is an Eilenberg-MacLane spectrum, the action is through π0 (E). Now we observe that since R is connected, ExtsR∗ (k, k) is in degrees ≤ −s, so that the spectral sequence for calculating π∗ (HomR (k, k)) shows E is coconnective with π0 (E) = k which must act trivially on k.  39 We may go a little further to the nilpotent case. Lemma 18.2. If X is connected with π1 (X) a finite p-group and k is of characteristic p then if C ∗ (X) is Gorenstein it automatically has Gorenstein duality. Proof: Again we find E has a unique action on k. Since E is a k-algebra, it acts through π0 (E) = H0 (ΩX) = k[π1 (X)]. By the characteristic assumption, this has a unique action on k.  18.D. The local cohomology theorem. In many cases (see Remark D.2 of Appendix Dy) one can give an algebraic description of the k-cellularization and infer algebraic consequences of Gorenstein duality. For simplicity we restrict to local k-algebras, although the methods apply more generally. Lemma 18.3. If R∗ is a Noetherian k-algebra, with maximal ideal m and residue field k, then k-cellularization coincides with the derived m-power torsion functor. Accordingly, if R has Gorenstein duality, there is a local cohomology spectral sequence Hm∗ (R∗ ) ⇒ Σa R∗∨ . If R has Gorenstein duality, Lemma 18.3 shows that the ring π∗ (R) has very special properties (even if it falls short of being Gorenstein), studied in [70]. Some of these properties were first observed by Benson and Carlson [16, 17] for group cohomology (corresponding to the special case of the ring spectrum R = C ∗ (BG), which we will see below has Gorenstein duality). To start with, we note that the spectral sequence collapses if R∗ is Cohen-Macaulay to show Hmr (R∗ ) ∼ = Σa+r R∗∨ (where r is the Krull dimension of R∗ ). Thus the coefficient ring R∗ is also Gorenstein. The spectral sequence also collapses if R∗ is of Cohen-Macaulay defect 1, to give an exact sequence 0 −→ Hmr (R∗ ) −→ Σa+r R∗∨ −→ ΣHmr−1 (R∗ ) −→ 0. In general, local duality lets one deduce that the cohomology ring R∗ is always generically Gorenstein. The collapse of the local cohomology theorem in the case of Cohen-Macaulay defect ≤ 1 has very concrete consequences in that the Hilbert series of R∗ satisfies a suitable pair of functional equations. Corollary 18.4. [56] Suppose R has Gorenstein duality of shift a, that π∗ (R) is Noetherian P of Krull dimension r and Hilbert series p(s) = i dimk (Ri )si . If π∗ (R) is Cohen-Macaulay it is also Gorenstein, and the Hilbert series satisfies p(1/s) = (−1)r sr−a p(s). If π∗ (R) is almost Cohen-Macaulay it is also almost Gorenstein, and the Hilbert series satisfies p(1/s) − (−1)r sr−a p(s) = (−1)r−1 (1 + s)q(s) and q(1/s) = (−1)r−1 sa−r+1 q(s). 40 In any case π∗ (R) is Gorenstein in codimension 0 and almost Gorenstein in codimension 1. 19. Ascent, descent and arithmetic of shifts Very commonly we have a a map θ : S −→ R of ring spectra, and we wish to relate properties of the two rings. With language from the geometric counterpart, a theorem stating that if R is Gorenstein then S is Gorenstein is called a descent theorem and a theorem stating that if S is Gorenstein then R is Gorenstein is called an ascent theorem. Typically the hypotheses are either about relative properties of θ or in terms of the cofibre of θ. 19.A. Relatively Gorenstein maps. We say that θ is relatively Gorenstein of shift a if HomS (R, S) ≃ Σa R, and then write a = shift(R|S). This is quite a strong version of the condition, since we have asked for a single untwisted ineger suspension. We make the elementary observation that for any ring map θ : S −→ R HomR (k, HomS (R, S)) ≃ HomR (R ⊗S k, S) ≃ HomS (k, S). Thus we conclude that if S −→ R is relatively Gorenstein then R is Gorenstein if and only if S is Gorenstein, and in that case shift(S) = shift(R) + shift(R|S). 19.B. Two chromatic examples. There are a number of examples where known facts amount to proving that a map of ring spectra is relatively Gorenstein, and the resulting descent theorems prove things of great interest. In these examples one shows that θ is relatively Gorenstein and R is c-Gorenstein; we then reach the interesting conclusion that S is Gorenstein. Example 19.1. (Complexification in K-theory) (i) Periodic complex K-theory is represented by the ring spectrum KU and periodic real K-theory by KO. The coefficient ring of complex K-theory is KU∗ = Z[v, v −1 ] where v is of degree 2. Complexification gives a ring map S = KO −→ KU = R and we observe that it is relatively Gorenstein. Indeed, Wood’s theorem states KO ∧ CP 2 ≃ Σ2 KU. Since CP 2 = S 2 ∪η e4 we see that there is a cofibre sequence η ΣKO −→ KO −→ KU of KO-modules. It follows by applying HomKO (·, KO) that HomKO (KU, KO) ≃ Σ−2 KU so that KO −→ KU is relatively Gorenstein of shift −2. (ii) We may take connective covers to obtain a ring map S = ko −→ ku = R. 41 Now ku∗ = Z[v] and killing homotopy groups gives a ring map ku −→ Z which is evidently c-Gorenstein (and hence Gorenstein) of shift −3. The connective version of Wood’s theorem gives a cofibre sequence η Σko −→ ko −→ ku of ko-modules. It follows by applying Homko (·, ko) that Homko(ku, ko) ≃ Σ−2 ku so that ko −→ ku is also relatively Gorenstein of shift −2. Hence we deduce that ko −→ Z is Gorenstein of shift −5. We note that the ring ko∗ = Z[η1 , α4 , β8 ]/(η 3 , ηα, α2 = 4β, 2η) is fairly complicated, and it is easy to check that ko −→ Z is not c-Gorenstein. In this discussion we have taken k = Z, which is not a field. If the reader prefers, we can instead work over the field Fp and use the fact that for any prime p the map ku −→ Fp is c-Gorenstein of shift −4. Since ko −→ ku is relatively Gorenstein of shift −2 we conclude ko −→ Fp is Gorenstein of shift −6.  Example 19.2. (Topological modular forms) Precisely similar statements hold for the ring spectrum tmf of topological modular forms at various primes. This uses results of HopkinsMahowald as proved by Matthew [82] (see [54] for a slightly expanded discussion). (3) Localized at the prime 3, there is a map tmf −→ tmf0 (2) to the ring spectrum of topological modular forms with the indicated level structure. The counterpart of Wood’s theorem is the fact that tmf0 (2) ≃ tmf ∧ (S 0 ∪α1 e4 ∪α1 e8 ), so that Homtmf (tmf0 (2), tmf ) ≃ Σ−8 tmf0 (2), and the map is relatively Gorenstein of shift −8. Since tmf0 (2)∗ = Z(3) [c2 , c4 ] (where |ci | = 2i) we see that tmf0 (2) −→ Z(3) is c-Gorenstein (and hence Gorenstein) of shift −14. Hence we deduce by Gorenstein descent that tmf −→ Z(3) is Gorenstein of shift −22. (2) Localized at the prime 2, there is a map tmf −→ tmf1 (3) to the ring spectrum of topological modular forms with the indicated level structure. The Here tmf1 (3) is a form of BP h2i and tmf1 (3) ≃ tmf ∧ DA(1) so that Homtmf (tmf1 (3), tmf ) ≃ Σ−12 tmf1 (3), and the map is relatively Gorenstein of shift −12. Since tmf1 (3)∗ = Z(2) [α1 , α3 ] (where |αi | = 2i) we see that tmf1 (3) −→ Z(2) is c-Gorenstein (and hence Gorenstein) of shift −10. Hence we deduce by Gorenstein descent that tmf −→ Z(2) is Gorenstein of shift −22.  Abstracting this slightly, we have θ S −→ S −→ R −→ k and these examples were all very special in that there was an equivalence R ≃ S ⊗S L 42 for a self-dual finite complex L. This means in turn that the cofibre of θ : S −→ R R ⊗S k ≃ k ⊗S L, with homotopy H∗ (L; k) a Poincaré duality algebra. In the next subsection we show that this weaker condition is often sufficient to give an ascent theorem. 19.C. Gorenstein Ascent. We suppose that S −→ R −→ Q is a cofibre sequence of commutative algebras with a map to k, and we now consider the Gorenstein ascent question. When does the fact that S is Gorenstein imply that R is Gorenstein? It is natural to assume that Q is Gorenstein, but it is known this is not generally sufficient. In effect the Gorenstein Ascent theorem will state that under suitable hypotheses (see Section 19.E) there is an equivalence HomR (k, R) ≃ HomQ (k, HomS (k, S) ⊗k Q). When this holds, it follows that if S and Q are Gorenstein, so is R and shift(R) = shift(S) + shift(Q). 19.D. Arithmetic of shifts. We summarize the behaviour of Gorenstein shifts in the ideal situation when ascent and descent both hold. If all rings and maps are Gorenstein of the indicated shifts s µ r λ q S −→R−→Q then r = s + q, µ = −q and λ = s 19.E. When does Gorenstein ascent hold? The core of our results about ascent come from [33]. Indeed, the proof of [33, 8.6] gives a sufficient condition for Gorenstein ascent in the commutative context. Lemma 19.3. If S and R are commutative and the natural map ν : HomS (k, S) ⊗S R −→ HomS (k, R) is an equivalence then HomR (k, R) ≃ HomQ (k, HomS (k, S) ⊗k Q). In this case, if S and Q are Gorenstein, so is R, and the shifts add up: shift(R) = shift(S) + shift(Q).  Now that we have a sufficient condition for Gorenstein ascent, we want to identify cases in which it is satisfied. The map ν : HomS (k, S) ⊗S M −→ HomS (k, M), is clearly an equivalence when M = R and hence for any module finitely built from R. This shows that the hypotheses are satisfied when R is small over S (or equivalently, when Q is finitely built from k) so that ascent holds in this case. This is already a very useful result. Example 19.4. If we have a fibration F −→ E −→ B of spaces to which the EilenbergMoore theorem applies in the sense that C ∗ (F ) = C ∗ (E) ⊗C ∗ (B) k, then if B is Gorenstein and F is an orientable manifold, it follows from Gorenstein Ascent that E is Gorenstein. 43 There are other important cases where ν is han equivalence. Indeed, we can exploit the fact that the hypothesis on ν in Lemma 19.3 only depends on R as a module over S to show that ν is an equivalence when R is suitably approximated as an inverse limit. This is a central ingredient in proving Gorenstein duality for many topological Hochschild homology spectra [54]. 19.F. Local duality. To start with, we clarify terminology. The Gorenstein duality property we have been discussing is a rare and special thing. On the other hand, local duality (as in the title of this subsection) is a tool available very generally. Local duality is based on Noether normalization, which means that every well behaved local ring R is finite as a module over a Gorenstein ring S. Local duality is the property inherited by R as a consequence of the existence of S. Accordingly, we assume for the rest of this section that we are given a map S −→ R so that R is a small S-module. Notice that this means that for an R-module M, its k-cellularization as an R-module is its k-cellularization as an S-module and similarly for k-completions. This is reflected in our notation. We also note that R∨ = HomS (R, S ∨ ) so that the Matlis lifts are related by coextension of scalars. Traditionally, local duality is thought of as saying that Matlis dual of local cohomology (embodied in HomR (Cellk R, R∨ ) ≃ (R∨ )∧k ) is isomorphic to a completed Ext group (embodied by HomS (R, S)∧k ). Directly translating this into our context we reach a more inscrutable definition. Definition 19.5. We say that S −→ R has local duality of shift b if there is an equivalence of R-modules HomS (R, S)∧k = Σb (R∨ )∧k . We now have two properties the map S −→ R may or may not have: the relative Gorenstein property and local duality. We also have Gorenstein duality for S −→ k and for R −→ k. It is valuable to disentangle the relationships between them. In fact we have three complete R-modules. • Rk∧ • (R∨ )∧k • HomS (R, S)∧k The equivalence of each of the possible pairs has a name. In the following diagram, the label “relGor” means “k-completion of relatively Gorenstein”, “locD” means “local duality”, and “GorD” means “Gorenstein duality”; the superscripts indicate the suspension necessary to get from the tail of the arrow to the head of the arrow. HomS (R, S)∧k Rk∧ c rrr relGorr r r rr r r y r ◆◆◆ b ◆◆locD ◆◆◆ ◆◆◆ & / (R∨ )∧ k RGorDa Sk∧ ❊ ❊ ❊❊SGorDb ❊❊ ❊❊ " (S ∨ )∧k This makes it clear that any two of relGor, locD and RGorD implies the third, and that a + c = b. 44 It remains to observe that locD follows from SGorD by coextension of scalars from Smodules to R-modules. Lemma 19.6. If S has Gorenstein duality of shift b then S −→ R has local duality of shift b. Proof: We apply HomS (R, ·) to the equivalence Sk∧ ≃ Σb (S ∨ )∧k and then use the following lemma to move the completions to the outside.  Lemma 19.7. For any S-module N, we have an equivalence HomS (R, Nk∧ ) ≃ HomS (R, N)∧k Proof: This is a formality: HomS (R, HomS (Cellk S, N)) ≃ HomS (R ⊗S Cellk S, N)) ≃ HomR (Cellk R, HomS (R, N))  This approach can be used to show that Gorenstein duality localizes [20]. 20. Morita invariance of the Gorenstein condition We show that the Gorenstein condition is Morita invariant in many useful cases, provided R is a k-algebra. This allows us to deduce striking consequences from well-known examples of Gorenstein rings. For instance we can deduce the local cohomology theorem for finite p-groups from the fact that kG is a Frobenius algebra. Theorem 20.1. Suppose R is a k-algebra, and that E and R are Matlis reflexive. Then HomE (k, E) ≃ HomR (k, R), and hence E is Gorenstein ⇐⇒ R is Gorenstein. Proof: We use the fact that (in the notation of Section 6) E(R∨ ) = k ∨ , so that by Lemma 6.3 we have R∨ = T E(R∨ ) = T k ∨ = k ∨ ⊗E k. We also note that HomR (k ⊗R k ∨ , k) ≃ Homk (k, HomR (k, k)) ≃ E so that E ∨ = k ⊗R k ∨ . Next, note that the expression k ⊗R k ∨ ⊗E k makes sense, where the right E-module structure on the first two factors comes from k ∨ . The key equality in the proof is simply the associativity isomorphism E ∨ ⊗E k = k ⊗R k ∨ ⊗E k = k ⊗R R∨ . Now we make the following calculation, 45 HomE (k, E) ≃ ≃ ≃ ≃ ≃ ≃ HomE (k, (E ∨ )∨ ) Homk (E ∨ ⊗E k, k) Homk (k ⊗R k ∨ ⊗E k, k) Homk (k ⊗R R∨ , k) HomR (k, (R∨ )∨ ) HomR (k, R)  21. Gorenstein duality for group cohomology This section describes the key example. The first sign of this duality was in Benson-Carlson duality [16, 17], which in particular shows that the Hilbert series of the group cohomology ring H ∗ (BG) satisfies a functional equation if it is Cohen-Macaulay or a pair of functional equations if it is almost Cohen-Macaulay. An algebraic construction of the local cohomology spectral sequence was given in [49]; this was inspired by the topological construction using equivariant topology in [47], and a proof using structured equivariant spectra first appears in [18]. The method described here comes from [33]. 21.A. p-groups. If G is a p-group and k is of characteristic p we note that BG is p-complete and therefore Ω(BG∧p ) ≃ G and the Morita pair is R = C ∗ (BG; k) and E = C∗ (ΩBG) = kG. Since kG is a Frobenius algebra, it is Gorenstein of shift 0, and so by Morita invariance of the Gorenstein condition (Theorem 20.1), C ∗ (BG) is also Gorenstein of shift 0. 21.B. General finite groups. Now if G is an arbitrary finite group, we may choose a faithful representation ρ : G −→ SU(n) for some n and consider the fibration BSU(n) ←− BG ←− SU(n)/G. Since BSU(n) is simply connected, the Eilenberg-Moore theorem gives a cofibre sequence C ∗ (BSU(n)) −→ C ∗ (BG) −→ C ∗ (SU(n)/G). Now note that H ∗ (BSU(n)) is polynomial on c2 , . . . , cn and therefore C ∗ (BSU(n)) is cGorenstein and therefore Gorenstein (with shift 2(2 + 3 + · · · + n) − (n − 1) = dim(SU(n))). On the other hand SU(n)/G is an orientable manifold of the same dimension as SU(n) and therefore C ∗ (SU(n)/G) is Gorenstein. By Gorenstein Ascent (Example 19.4), C ∗ (BG) is Gorenstein of shift 0 as required. 21.C. The local cohomology theorem. As described in Lemma 18.3 we thus obtain the local cohomology theorem Hm∗ (H ∗ BG) ⇒ H∗ (BG) for group cohomology. 46 As described in Corollary 18.4, we then obtain functional equations in many cases. We warn that t is of codegree 1 (unlike s in the corollary, which was of degree 1). If H ∗ (BG) is Cohen-Macaulay, it is Gorenstein and its Hilbert series satisfies p(1/t) = (−1)r tr p(t). If H ∗ (BG) is almost Cohen-Macaulay it is also almost Gorenstein, and the Hilbert series satisfies p(1/t) − (−1)r tr p(t) = (−1)r−1 (1 + t)q(t) and q(1/t) = (−1)r−1 t−r+1 q(t). In any case H ∗ (BG) is Gorenstein in codimension 0 and almost Gorenstein in codimension 1. We will describe a number of 2-group examples with k of characteristic 2. 21.D. The elementary abelian group of rank r. The group of order 2 may be viewed as a subgroup of the non-zero real numbers. It therefore acts diagonally on nR = R ⊕ · · · ⊕ R and freely on the unit sphere S(nR). Hence BC2 = S(∞R)/C2 = RP ∞ . Similarly, if G ∼ = C2 × · · · × C2 is of rank r we see that BG = RP ∞ × · · · × RP ∞ , and H ∗ (BG) = k[x1 , . . . , xr ]. This is visibly of dimension r and depth r and p(t) = 1 . (1 − t)r The functional equation is easily checked, and the reader may wish to check directly that the local cohomology of H ∗ (BG) is H∗ (BG) (up to a shift). 21.E. The quaternion group of order 8. If G = Q8 is quaternion of order 8 we note that it acts freely on the unit 3-sphere in the quaternion algebra S(H), and in fact H ∗ (S(H)/G) = k[x, y]/(x3 , x2 + xy + y 2, y 3). It is then clear that G acts freely on the contractible space S(∞H) and that H ∗ (BG) = H ∗ (S(H)/G)[z] where z is of codegree 4. This is visibly of dimension 1 and depth 1 and 1 + 2t + 2t2 + t3 . 1 − t4 The functional equation is easily checked. It is also easy to check directly that the local cohomology of H ∗ (BG) is H∗ (BG) (up to a shift). Although there are many other groups for which we could calculate the cohomology it is convenient to simply refer to the invaluable Jena database [45] for the cohomology of small p-groups. p(t) = 47 21.F. The dihedral group of order 8. If G = D8 is dihedral of order 8 H ∗ (BG) = k[x1 , y1 , z2 ]/(xy). It is quick to check that this is of dimension 2 and depth 2 and 1 p(t) = . (1 − t)2 The functional equation is easily checked. It is an easy exercise to check directly that the local cohomology of H ∗ (BG) is H∗ (BG) (up to a shift). 21.G. The semi-dihedral group of order 16. If G = SD16 is the semi-dihedral group of order 16 H ∗ (BG) = k[x1 , y1 , z3 , t4 ]/(xy, x3 , xz, z 2 + ty 2 ). One may check that this is of dimension 2 and depth 1 and is included as the first example which is not Cohen-Macaulay. Its Hilbert series is 1 p(t) = , 2 (1 − t) (1 + t2 ) and one may check that the almost Cohen-Macaulay functional equations are satisfied with shift 0. It is presumably a coincidence that it also satisfies the functional equation of a Cohen-Macaulay graded ring of dimension 2 with (homological) shift 2. 21.H. Group Number 7 of order 32. The 7th group in the Small Groups library list of the 51 groups of order 32 is the only one whose cohomology is neither Cohen-Macaulay nor almost Cohen-Macaulay. The ring has a minimal presentation with 8 generators and 18 relations, so it won’t be recorded here. The important facts for us are that it is of dimension 3 and depth 1 and has Hilbert series 1 − t + t2 . (1 − t)3 (1 + t2 ) By coincidence this satisfies the functional equation for a Gorenstein graded ring with shift 0. Taking the description of its cohomology given in [86] one may easily calculate its local cohomology. In fact it has a polynomial subgring P = k[z1 , x2 , s4 ] over which it is a direct sum of 5 submodules, namely P ⊕ Σ3 P ⊕ Σ4 P ⊕ M ⊕ N where p(t) = {x,z} M = cok(Σ4 P −→ Σ2 P ⊕ Σ3 P ) and N = Σ1 P/(x, z). The free submodule is of depth 3, M is of depth 2. Finally Hm1 (H ∗ (BG)) = Hm1 (N) is of dimension 1 over k in degrees 3, 7, 11, 15, · · · . Knowing the dimensions of Hn (BG) from p(t) we see that the differential d2 : Hm1 (H ∗ (BG)) −→ Σ−1 Hm3 (H ∗ BG)) 48 is a monomorphism (and so non-zero in infinitely many degrees). 21.I. Other classes of groups. We have described the fact that C ∗ (BG) is Gorenstein for finite groups G. It is shown in [33] that C ∗ (BG) is Gorenstein of shift equal to dim(G) whenever G is a compact Lie group, provided that either k is of characteristic 2 or the group of components is of odd order. In general there is a twisting by the representation H g (G), which is trivial in the aforementioned cases. If G is a virtual duality group of dimension n there is a form of Gorenstein duality with shift −n for C ∗ (BG). Now there is a twisting by H n (G; kG), which is usually of infinite dimension. The algebraic proof is given in [19], along with a topological proof for arithmetic groups using equivariant topology. A proof along the present lines can be given for these groups as follows. We choose a normal subgroup N of finite index in G which is a duality group, and a contractible space X on which G acts with finite isotropy. Now N acts freely on X so X/N is a manifold with boundary. Now let Q = G/N, and consider the fibration BQ ←− BG ←− X/N, which we may obtain from the equivalence BG ≃ EQ ×Q (X/N). We attempt to apply Gorenstein Ascent. In the situation that X/N has empty boundary (i.e., G is a virtual Poincaré duality group) we infer C ∗ (BG) is Gorenstein as required. 22. Gorenstein duality for rational spaces This section discusses Gorenstein duality for rational spaces. Félix-Halperin-Thomas [42] have considered the Gorenstein condition in depth, so the distinctive feature here is the concentration on Gorenstein duality as in [33]. For spaces with finite dimensional cohomology X is Gorenstein if and only if H ∗ (X) is Gorenstein, but in general there are Gorenstein spaces for which H ∗ (X) is not Gorenstein and we make explicit the local cohomology theorem and its consequences for H ∗ (X). 22.A. Fundamentals. We specialize some of the above results to C ∗ (X; Q), beginning with the zero dimensional case. Lemma 22.1. [42, 3.6] If H ∗ (A) is finite dimensional then A is Gorenstein if and only if H ∗ (A) is a Poincaré duality algebra. Proof: If H ∗ (A) is a Poincaré duality algebra of formal dimension n then it is a zero dimensional Gorenstein ring with a-invariant −n, so A is Gorenstein with shift −n by the previous corollary. Conversely, if A is Gorenstein of shift a, we have a Gorenstein duality spectral sequence. Since H ∗ (A) is finite dimensional, it is all torsion. Accordingly, Hm∗ (H ∗ (A)) = H ∗ (A), and the spectral sequence reads H ∗ (A) = Σa H ∗ (A)∨ and H ∗ (A) is a Poincaré duality algebra of formal dimension −a.  49 By applying Gorenstein Ascent (Example 19.4) one may use these to construct other examples which are Gorenstein but not c-Gorenstein. Proposition 22.2. [42, 4.3] Suppose we have a fibration F −→ E −→ B with F finite. If F and B are Gorenstein with shifts f and b then E is Gorenstein with shift e = f + b.  Lemma 22.3. If X is a simply connected rational space with H ∗ (X) Noetherian then if C ∗ (X; Q) is Gorenstein of shift a, then it is automatically orientable and so has Gorenstein duality of shift a Proof: We see that Q is proxy-small by Corollary 7.2. We may now apply the same argument as for Proposition 18.1 to see there is a unique action of C∗ (ΩX; Q) on Q and deduce automatic Gorenstein duality.  22.B. Examples. The basic results of the previous subsection allow us to construct innumerable examples. For example any finite Postnikov system is Gorenstein [42, 3.4], so that in particular any sci space is Gorenstein. A simple example will illustrate the duality. Example 22.4. We construct a rational space X in a fibration S 3 × S 3 −→ X −→ CP ∞ × CP ∞ , so that X is Gorenstein. We will calculate H ∗(X) and observe that it is not Gorenstein. Let V be a graded vector space with two generators u, v in degree 2, and let W be a graded vector space with two generators in degree 4. The two 4-dimensional cohomology classes u2 , uv in H ∗(KV ) = Q[u, v] define a map KV −→ KW , and we let X be the fibre, so we have a fibration S 3 × S 3 −→ X −→ KV as required. By [33], this is Gorenstein with shift −4 (being the sum of the shift (viz −6) of S 3 × S 3 and the shift (viz 2) of KV ). It is amusing to calculate the cohomology ring of X. It is Q[u, v, p]/(u2, uv, up, p2) where u, v and p have degrees 2, 2 and 5. The dimensions of its graded components are 1, 0, 2, 0, 1, 1, 1, 1, 1, . . . (i.e., its Hilbert series is pX (t) = (1 + t5 )/(1 − t2 ) + t2 , where t p is of codegree 1). In calculating local cohomology it is useful to note that m = (v). The local cohomology is Hm0 (H ∗ (X)) = Σ2 Q in degree 0 (so that H ∗ (X) is not Cohen-Macaulay) and as a Q[v]module Hm1 (H ∗ (X)) is Q[v]∨ ⊗ (Σ−3 Q ⊕ Σ2 Q). Since there is no higher local cohomology the local cohomology spectral sequence necessarily collapses, and the resulting exact sequence 0 −→ Hm1 (H ∗ (X)) −→ Σ−4 H ∗ (A)∨ −→ Σ−2 Q −→ 0 is consistent. Since the Cohen-Macaulay defect here is 1, we have a pair of functional equations pX (1/t) − (−t)t−4 pX (t) = (1 + t)δ(t) and δ(1/t) = t4 δ(t). 50 Indeed, the first equation gives δ(t) = t−2 , which is indeed the Hilbert series of Hm0 (H ∗ (X))∨ , and it obviously satisfies the second equation. 23. The ubiquity of Gorenstein ring spectra We have considered a number of examples, in some cases giving rather complete proofs. This short section points out that the ideas can be extended rather easily. In fact there is a sense in which all the examples come from the first three by using Gorenstein Ascent and Morita invariance of the Gorenstein condition. • Gorenstein commutative local rings R (shift −Krulldim(R)). • C ∗ (M) for closed manifolds M (orientable if M is orientable; shift − dim(M)). • C∗ (G) for compact Lie groups G (orientable if G acts trivially on Hg (G); shift dim(G)). • C ∗ (BG) for compact Lie groups G (orientable if G acts trivially on Hg (G); shift dim(G)). • C ∗ (BG) for virtual duality groups G (dualizing module H∗ (G; kG); shift −formal-dim(G)). • C ∗ (EG×G M) Borel construction on a G-manifold M m for Gg compact Lie (orientable if G, M and the action are; shift g − m). An amusing instance of this arises from toric geometry; if K is a simplicial complex one may construct the so-called moment angle complex ZK which has an action of a torus G whose Borel cohomology is the Stanley-Reisner ring k[K]. If K is a simplicial sphere ZK is a manifold and k[K] is Gorenstein. See [29] for definitions and proofs. • Chromatic examples. The coefficient ring R (or ring spectrum) is contravariant in the geometric object making it like cochains, but the ring spectrum R is often connective (unlike cochains). With this caveat, the examples are parallel to the C ∗ (BG) example with the compact Lie group G replaced by an algebraic group G, so that R plays the role of the ring spectrum of functions on G. The Morita counterpart of R = OG would be the ring of operations C∗ (G; k) = HomR (k, k). • Hochschild homology. In [54] several classes of examples are identified where the Hochschild homology with field coefficients inherits Gorenstein properties. The context is that we are given maps S −→ R −→ k of commutative rings, so that we can define the Hochschild homology HH•(R|S; k) = R ⊗R⊗S R k, and it is a ring spectrum with a map to k. The results then say that (under substantial additional hypotheses) if R is Gorenstein of shift a and HH• (k|S; k) is Gorenstein of shift b then HH• (R|S; k) is Gorenstein of shift b − a. The proof comes out of Gorenstein Ascent, with the hypotheses designed to allow the application of Lemma 19.3. 51 Appendix A. Algebraic definitions: Local and Čech cohomology and homology Related surveys are given in [59, 60]. The material in this section is based on [66, 58, 48]. Background in commutative algebra can be found in [83, 28]. I. The functors. Suppose to begin with that R is a commutative Noetherian ring and that I = (α1 , . . . , αn ) is an ideal in R. We shall be concerned especially with two naturally occurring functors on R-modules: the I-power torsion functor and the I-adic completion functor. The I-power torsion functor ΓI is defined by M 7−→ ΓI (M) = {x ∈ M | I k x = 0 for k >> 0}. We say that M is an I-power torsion module if M = ΓI M. It is easy to check that the functor ΓI is left exact. The I-adic completion functor is defined by M 7−→ MI∧ = lim M/I k M. ← k The Artin-Rees lemma implies that I-adic completion is exact on finitely generated modules, but it is neither right nor left exact in general. II. The stable Koszul complex. We begin with a sequence α1 , . . . , αn of elements of R and define various chain complexes. In Subsection III we explain why the chain complexes only depend on the radical of the ideal I = (α1 , . . . , αn ) generated by the sequence, in Subsection IV we define associated homology groups, and in Subsection V we give conceptual interpretations of this homology under Noetherian hypotheses. We begin with a single element α ∈ R, and an integer s ≥ 0, and define the sth unstable Koszul complex by Ks• (α) = (αs : R −→ R) where the non-zero modules are in cohomological degrees 0 and 1. These complexes form a direct system as s varies, α K1• (α) = ( R −→ R ) ↓ =↓ ↓α α2 K2• (α) = ( R −→ R ) ↓ =↓ ↓α α3 K3• (α) = ( R −→ R ) ↓ =↓ ↓α and the direct limit is the flat stable Koszul complex • K∞ (α) = (R −→ R[1/α]) . • When defining local cohomology, it is usual to use the complex K∞ (α) of flat modules. However, we shall need a complex of projective R-modules to define the dual local homology • modules. Accordingly, we take a particularly convenient projective approximation P K∞ (α) • • to K∞ (α). Instead of taking the direct limit of the Ks (α), we take their homotopy direct 52 limit. This makes the translation to the topological context straightforward. More concretely, • our model for P K∞ (α) is displayed as the upper row in the homology isomorphism P K • (α) = ( R ⊕ R[x] h1,αx−1i / R[x] ) g h1,0i  • K∞ (α) = (  R /  R[1/α] ) , • • where g(xi ) = 1/αi . Like K∞ (α), this choice of P K∞ (α) is non-zero only in cohomological degrees 0 and 1. The stable Koszul cochain complex for a sequence α = (α1 , . . . , αn ) is obtained by tensoring together the complexes for the elements, so that • • • K∞ (α) = K∞ (α1 ) ⊗R · · · ⊗R K∞ (αn ), • and similarly for the projective complex P K∞ (α). III. Invariance statements. We list some basic properties of the stable Koszul complex, leaving proofs to the reader. • Lemma A.1. If β is in the ideal I = (α1 , α2 , . . . , αn ), then K∞ (α)[1/β] is exact. Note that, by construction, we have an augmentation map • ε : K∞ (α) −→ R. Using this to compare different stable Koszul complexes and Lemma A.1 to see when they are equivalences we deduce an important invariance statement. • Corollary A.2. Up to quasi-isomorphism, the complex K∞ (α) depends only on the radical of the ideal I. • • • In view of Corollary A.2 it is reasonable to write K∞ (I) for K∞ (α). Since P K∞ (α) is a • projective approximation to K∞ (α), it too depends only on the radical of I. We also write Ks• (I) = Ks• (α1 ) ⊗ · · · ⊗ Ks• (αn ), but this is an abuse of notation since even its homology groups do depend on the choice of generators. IV. Local homology and cohomology. The local cohomology and homology of an Rmodule M are then defined by • HI∗ (R; M) = H ∗ (P K∞ (I) ⊗ M) and • H∗I (R; M) = H∗ (Hom(P K∞ (I), M). Note that we could equally well use the flat stable Koszul complex in the definition of local cohomology, as is more usual. Lemma A.1 shows that HI∗ (M)[1/β] = 0 if β ∈ I, so HI∗ (M) is an I-power torsion module and supported over I. It is immediate from the definitions that local cohomology and local homology are related by a third quadrant universal coefficient spectral sequence (1) I E2s,t = ExtsR (HI−t (R), M) =⇒ H−t−s (R; M), 53 with differentials dr : Ers,t −→ Ers+r,t−r+1 . V. Derived functors. We gave our definitions in terms of specific chain complexes. The meaning of the definitions appears in the following two theorems. Theorem A.3 (Grothendieck [66]). If R is Noetherian, then the local cohomology groups calculate the right derived functors of the left exact functor M 7−→ ΓI (M). In symbols, HIn (R; M) = (Rn ΓI )(M).  This result may be used to give an explicit expression for local cohomology in familiar terms. Indeed, since ΓI (M) = lim Hom(R/I r , M), and the right derived functors of the → r right-hand side are obvious, we have (Rn ΓI )(M) ∼ = lim ExtnR (R/I r , M). → r The description in terms of the stable Koszul complex is usually more practical. Theorem A.4 (Greenlees-May [58]). If R is Noetherian, then the local homology groups calculate the left derived functors of the (not usually right exact) I-adic completion functor M 7−→ MI∧ . Writing LIn for the left derived functors of I-adic completion, this gives HnI (R; M) = LIn (M).  The conclusions of Theorem A.3 and A.4 are true under much weaker hypotheses [58, 87]. VI. The shape of local cohomology. One is used to the idea that I-adic completion is often exact, so that LI0 is the most significant of the left derived functors. However, it is the top non-vanishing right derived functor of ΓI that is the most significant. Some idea of the shape of these derived functors can be obtained from the following result. Observe that the • complex P K∞ (α) is non-zero only in cohomological degrees between 0 and n, so that local homology and cohomology are zero above dimension n. A result of Grothendieck’s usually gives a much better bound. We write dim(R) for the Krull dimension of R and depthI (M) for the I-depth of a module M (the length of the longest M-regular sequence from I). Theorem A.5 (Grothendieck [65]). If R is Noetherian of Krull dimension d, then HIi (M) = 0 and HiI (M) = 0 if i > d. If e = depthI (M) then HIi (M) = 0 if i < e. If R is Noetherian, M is finitely generated, and IM 6= M, then HIe (M) 6= 0.  Grothendieck’s proof of vanishing begins by noting that local cohomology is sheaf cohomology with support. It then proceeds by induction on the Krull dimension and reduction to the irreducible case. The statement about depth is elementary, and proved by induction on the length of the I-sequence (see [83, 16.8]). The Universal Coefficient Theorem gives a useful consequence for local homology. 54 Corollary A.6. If R is Noetherian and depthI (R) = dim(R) = d, then d LIs M = Extd−s R (HI (R), M).  ∗ 1 For example if R = Z and I = (p), then H(p) (Z) = H(p) (Z) = Z/p∞ . Therefore the corollary states that (p) L0 M = ExtZ (Z/p∞ , M) and (p) L1 M = HomZ (Z/p∞ , M), as was observed in Bousfield-Kan [26, VI.2.1]. VII. Čech homology and cohomology. We have motivated local cohomology in terms of I-power torsion, and it is natural to consider the difference between the torsion and the original module. In geometry this difference would be more fundamental than the torsion itself, and local cohomology would then arise by considering functions with support. • To construct a good model for this difference, observe that ε : K∞ (α) −→ R is an • isomorphism in degree zero and define the flat Čech complex Č (I) to be the complex Σ(ker ε). Thus, if i ≥ 0, then Č i (I) = K i+1 (I). For example, if I = (α, β), then Č • (I) = ( R[1/α] ⊕ R[1/β] −→ R[1/(αβ)] ) . The differential K 0 (I) −→ K 1 (I) specifies a chain map R −→ Č • (I) whose fibre is exactly • K∞ (I). Thus we have a fibre sequence • K∞ (I) −→ R −→ Č • (I). We define the projective version P Č • (I) similarly, using the kernel of the composite of ε and • • the quasi-isomorphism P K∞ (I) −→ K∞ (I); note that P Č • (I) is non-zero in cohomological degree −1. The Čech cohomology of an R-module M is then defined by ČHI∗ (R; M) = H ∗ (Č • (I) ⊗ M). VIII. Čech cohomology and Čech covers. To explain why Č • (I) is called the Čech complex, we describe how it arises by using the Čech construction to calculate cohomology from a suitable open cover. More precisely, let Y be the closed subscheme of X = Spec(R) determined by I. The space V (I) = {℘|℘ ⊃ I} decomposes as V (I) = V (α1 ) ∩ . . . ∩ V (αn ), and there results an open cover of the open subscheme X −Y as the union of the complements X − Yi of the closed subschemes Yi determined by the principal ideals (αi ). However, X − Yi is isomorphic to the affine scheme Spec(R[1/αi ]). Since affine schemes have no higher cohomology, H ∗ (Spec(R[1/αi ]); M̃ ) = H 0 (Spec(R[1/αi ]); M̃) = M[1/αi ], where M̃ is the sheaf associated to the R-module M. Thus the E1 term of the Mayer-Vietoris spectral sequence for this cover collapses to the chain complex Č • (I), and H ∗ (X − Y ; M̃ ) ∼ = ČHI∗ (M). 55 Appendix B. Spectral analogues of the algebraic definitions We now transpose the algebra from Appendix A into the context of spectra. It is convenient to note that it is routine to extend the algebra to graded rings, and we will use this without further comment below. We assume the reader is already comfortable working with ring spectra, but there is an introduction in Sections 2 and 3, and one at greater length in [52]. We replace the standing assumption that R is a commutative Z-algebra by the assumption that it is a commutative S-algebra, where S is the sphere spectrum. The category of Rmodules is now the category of R-module spectra. Since the derived category of a ring R is equivalent to the derived category of the associated Eilenberg-MacLane spectrum [92], the work of Appendix A can be reinterpreted in the new context. To emphasize the algebraic analogy, we write ⊗R and HomR for the smash product over R and function spectrum of Rmaps and 0 for the trivial module. In particular X⊗S Y = X∧Y and HomS (X, Y ) = F (X, Y ). This section is based on [47, 48]. I. Koszul spectra. For α ∈ π∗ R, we define the stable Koszul spectrum K∞ (α) by the fibre sequence K∞ (α) −→ R −→ R[1/α], α α where R[1/α] = holim(R −→ R −→ . . .). Analogous to the filtration by degree in chain → complexes, we obtain a filtration of the R-module K∞ (α) by viewing it as Σ−1 (R[1/α] ∪ CR). Next we define the stable Koszul spectrum for the sequence α1 , . . . , αn by K∞ (α1 , . . . , αn ) = K∞ (α1 ) ⊗R · · · ⊗R K∞ (αn ), and give it the tensor product filtration. The topological analogue of Lemma A.1 states that if β ∈ I then K∞ (α1 , . . . , αn )[1/β] ≃ 0; this follows from Lemma A.1 and the spectral sequence (3) below. We may now use precisely the same proof as in the algebraic case to conclude that the homotopy type of K∞ (α1 , . . . , αn ) depends only on the radical of the ideal I = (α1 , · · · , αn ). We therefore write K∞ (I) for K∞ (α1 , . . . , αn ). II. Localization and completion. With motivation from Theorems A.3 and A.4, we define the homotopical I-power torsion (or local cohomology) and homotopical completion (or local homology) modules associated to an R-module M by (2) ΓI (M) = K∞ (I) ⊗R M and ΛI (M) = MI∧ = HomR (K∞ (I), M). In particular, ΓI (R) = K∞ (I). Because the construction follows the algebra so precisely, it is easy give methods of calculation for the homotopy groups of these R-modules. We use the product of the filtrations of the K∞ (αi ) given above and obtain spectral sequences (3) 2 Es,t = HI−s,−t(R∗ ; M∗ ) ⇒ πs+t (ΓI M) 56 r r with differentials dr : Es,t → Es−r,t+r−1 and (4) I E2s,t = H−s,−t (R∗ ; M ∗ ) ⇒ π−(s+t) (MI∧ ) with differentials dr : Ers,t → Ers+r,t−r+1 . III. The Čech spectra. Similarly, we define the Čech spectrum by the cofibre sequence (5) K∞ (I) −→ R −→ Č(I). We define the homotopical localization (or Čech cohomology) and Čech homology modules associated to an R-module M by (6) M[I −1 ] = Č(I) ⊗R M and ∆I (M) = HomR (Č(I), M). In particular, R[I −1 ] = Č(I). Once again, we have spectral sequences for calculating their homotopy groups from the analogous algebraic constructions. IV. Basic properties. We can now give topological analogues of some basic pieces of alge• bra that we used in Section A. Recall that the algebraic Koszul complex K∞ (I) is a direct • limit of unstable complexes Ks (I) that are finite complexes of free modules with homology annihilated by a power of I. We say that an R-module M is a I-power torsion module if its R∗ -module M∗ of homotopy groups is a I-power torsion module; equivalently, M∗ must have support over I. Lemma B.1. The R-module K∞ (I) is a homotopy direct limit of finite R-modules Ks (I), each of which has homotopy groups annihilated by some power of I. Therefore K∞ (I) is a I-power torsion module. The following lemma is an analogue of the fact that Č • (I) is a chain complex which is a finite sum of modules R[1/α] for α ∈ I. Lemma B.2. The R-module Č(I) has a finite filtration by R-submodules with subquotients that are suspensions of modules of the form R[1/α] with α ∈ I. These lemmas are useful in combination. Corollary B.3. If M is a I-power torsion module then M ⊗R Č(I) ≃ 0; in particular K∞ (I) ⊗R Č(I) ≃ 0. Proof: Since M[1/α] ≃ 0 for α ∈ I, Lemma B.2 gives the conclusion for M.  Appendix C. Completion at ideals and Bousfield localization Bousfield localizations include both completions at ideals and localizations at multiplicatively closed sets, but one may view these Bousfield localizations as falling into the types typified by completion at p and localization away from p. Thinking in terms of Spec(R∗ ), this is best viewed as the distinction between localization at a closed set and localization at the complementary open subset. In this section we deal with the closed sets and with the open sets in Section D. This appendix is based on [57, 58, 48]. 57 I. Homotopical completion. As observed in the proof of Lemma B.1, we have K∞ (α) = holim Σ−1 R/αs and therefore → s ∧ M(α) = HomR (holim Σ−1 R/αs , M) ≃ holim M/αs . → ← s s If I = (α, β), then MI∧ = HomR (K∞ (α) ⊗R K∞ (β), M) = HomR (K∞ (α), HomR (K∞ (β), M)) ∧ ∧ = (M(β) )(α) , and so on inductively. This should help justify the notation MI∧ = HomR (K∞ (I), M). When R = S is the sphere spectrum and p ∈ Z ∼ = π0 (S), K∞ (p) is a Moore spectrum for Z/p∞ in degree −1 and we recover the usual definition Xp∧ = F (Σ−1 S/p∞ , X) of p-completions of spectra as a special case, where F (A, B) = HomS (A, B) is the function spectrum. The standard short exact sequence for the calculation of the homotopy groups of Xp∧ in terms of ‘Ext completion’ and ‘Hom completion’ follows directly from Corollary A.6. Since p-completion has long been understood to be an example of a Bousfield localization, our next task is to show that completion at I is a Bousfield localization in general. II. Bousfield’s terminology. Fix an R-module E. A spectrum A is E-acyclic if A ⊗R E ≃ 0; a map f : X −→ Y is an E-equivalence if its cofibre is E-acyclic. An R-module M is E-local if E ⊗R T ≃ 0 implies HomR (T, M) ≃ 0. A map Y −→ LE Y is a Bousfield Elocalization of Y if it is an E-equivalence and LE Y is E-local. This means that Y −→ LE Y is terminal among E-equivalences with domain Y , and the Bousfield localization is therefore unique if it exists. Similarly, we may replace the single spectrum E by a class E of objects E, and require the conditions hold for all such E The following is a specialization of a change of rings result to the ring map S −→ R. Lemma C.1. Let E be a class of R-modules. If an R-module N is E-local as an R-module, then it is E-local as an S-module. Proof: If E ∧ T = E ⊗S T ≃ ∗ for all E, then E ⊗R (R ⊗S T ) ≃ 0 for all E and therefore F (T, N) = HomS (T, N) ≃ HomR (R ⊗S T, N) ≃ 0.  III. Homotopical completion is a Bousfield localization. The class that will concern us most is the class I-Tors of finite I-power torsion R-modules M. Thus M must be a finite cell R-module, and its R∗ -module M∗ of homotopy groups must be a I-power torsion module. Theorem C.2. For any finitely generated ideal I of R∗ the map M −→ MI∧ is Bousfield localization in the category of R-modules in each of the following equivalent senses: (i) with respect to the R-module ΓI (R) = K∞ (I). (ii) with respect to the class I-Tors of finite I-power torsion R-modules. (iii) with respect to the R-module Ks (I) for any s ≥ 1. 58 Furthermore, the homotopy groups of the completion are related to local homology groups by a spectral sequence I 2 Es,t = Hs,t (M∗ ) =⇒ πs+t (MI∧ ). If R∗ is Noetherian, the E 2 term consists of the left derived functors of I-adic completion: HsI (M∗ ) = LIs (M∗ ). Proof: We begin with (i). Since HomR (T, MI∧ ) ≃ HomR (T ⊗R K∞ (I), M), it is immediate that MI∧ is K∞ (I)-local. We must prove that the map M −→ MI∧ is a K∞ (I)-equivalence. The fibre of this map is HomR (Č(I), M), so we must show that HomR (Č(I), M) ⊗R K∞ (I) ≃ 0. By Lemma B.1, K∞ (I) is a homotopy direct limit of terms Ks (I). Each Ks (I) is in I-Tors, and we see by their definition in terms of cofibre sequences and smash products that their duals DKs (I) are also in I-Tors, where DM = HomR (M, R). Since Ks (I) is a finite cell R-module, HomR (Č(I), M) ⊗R Ks (I) = HomR (Č(I) ⊗R DKs (I), M), and Č(I) ⊗R DKs (I) ≃ 0 by Corollary B.3. Parts (ii) and (iii) are similar but simpler. For (iii), observe that we have a cofibre sequence R/αs −→ R/α2s −→ R/αs , so that all of the Kjs (I) may be constructed from Ks (I) using a finite number of cofibre sequences.  Appendix D. Localization away from ideals and Bousfield localization In this section we turn to localization away from the closed set defined by an ideal I. First, observe that, when I = (α), M[I −1 ] is just R[α−1 ] ⊗R M = M[α−1 ]. However, the higher Čech cohomology groups give the construction for general finitely generated ideals a quite different algebraic flavour, and M[I −1 ] is rarely a localization of M at a multiplicatively closed subset of R∗ . This appendix is based on [48]. I. The Čech complex as a Bousfield localization. To characterize this construction as a Bousfield localization, we consider the class I-Inv of R-modules M for which there is an element α ∈ I such that α : M −→ M is an equivalence. Theorem D.1. For any finitely generated ideal I = (α1 , . . . , αn ) of R∗ , the map M −→ M[I −1 ] is Bousfield localization in the category of R-modules in each of the following equivalent senses: (i) with respect to the R-module R[I −1 ] = Č(I). (ii) with respect to the class I-Inv. (iii) with respect to the set {R[1/α1 ], . . . , R[1/αn ]}. Furthermore, the homotopy groups of the localization are related to Čech cohomology groups by a spectral sequence 2 Es,t = ČHI−s,−t(M∗ ) =⇒ πs+t (M[I −1 ]). 59 If R∗ is Noetherian, the E 2 term can be viewed as the cohomology of Spec(R∗ ) \ V (I) with coefficients in the sheaf associated to M∗ . Remark D.2. One may also characterize the map ΓI (M) −→ M by a universal property analogous to that of the cellular approximation in spaces: it is the K1 (I)-cellularization of M. Indeed, on the one hand, ΓI (M) is constructed from K1 (I) by B.1, and on the other hand, the map induces an equivalence of HomR (K1 (I), ·) since, by Lemma B.2, HomR (K1 (I), Č(I)) ≃ 0. References [1] J.F. Adams “Stable homotopy and generalized homology.” Chicago University Press 1974. [2] L.Alonso Tarrio, A.Jeremias Lopez and J. Lipman “Local homology and cohomology on schemes.” Ann.Scient. Ec.Norm.Sup. 30 (1997) 1-39 [3] L.Alonso Tarrio, A.Jeremias Lopez and J. Lipman “Studies in duality on Noetherian formal schemes and non-Noetherian ordinary schemes” Cont. Math. 244 AMS (1999) x+126 [4] K.K.S.Andersen and J.Grodal “The classification of 2-compact groups” J American Math Soc 22 (2009), 387-436 [5] K.K.S.Andersen, J.Grodal, J.M.Møller and M.Viruel “The classification of p-compact groups for p odd” Annals of Maths, 167 (2008), 95-210 [6] L.L.Avramov “Modules of finite virtual projective dimension.” Invent. Math. 96 (1989), no. 1, 71–101. [7] L.L.Avramov “Infinite free resolutions.” Six lectures on commutative algebra (Bellaterra, 1996), 1–118, Progr. Math., 166, Birkhuser, Basel, 1998. [8] L.L. Avramov “Locally complete intersection homomorphisms and a conjecture of Quillen on the vanishing of cotangent homology.” Ann. of Math. (2) 150 (1999), no. 2, 455–487. [9] L.L.Avramov and R.-O. Buchweitz “Support varieties and cohomology over complete intersections.” Invent. Math. 142 (2000), no. 2, 285–318. [10] L.L. Avramov and H.-B. Foxby “Locally Gorenstein homomorphisms.” American J. Math. 114 (1992) 1007-1047 [11] L.L. Avramov and H.-B. Foxby “Ring homomorphism and finite Gorenstein dimension” PLMS 75 (1997) 241-270 [12] L.L.Avramov and S. Halperin “Through the looking glass: a dictionary between rational homotopy theory and local algebra.” Algebra, algebraic topology and their interactions (Stockholm, 1983), 1-27, Lecture Notes in Math., 1183, Springer, Berlin, 1986. [13] H.Bass “On the ubiquity of Gorenstein rings” Math. Z. 82 1963 8–28. [14] H.Bass “Algebraic K-theory.” Benjamin (1968) xx+762pp [15] D.J.Benson “An algebraic model for chains on ΩBG∧ p ” Trans. Amer. Math. Soc. 361 (2009), no. 4, 2225-2242. [16] D.J.Benson and J.F.Carlson “Projective resolutions and Poincaré duality complexes. ” Trans. American Math. Soc. 342 (1994) 447-488 [17] D.J.Benson and J.F.Carlson “Functional equations for Poincaré series in group cohomology.” Bull. London Math. Soc. 26 (1994) 438-448. [18] D.J.Benson and J.P.C.Greenlees “Commutative algebra for the cohomology of classifying spaces of compact Lie groups.” J.Pure and Applied Algebra 122 (1997) 41-53 [19] D.J.Benson and J.P.C.Greenlees “Commutative algebra in the cohomology of virtual duality groups.” J. Algebra 192 (1997) 678-700. [20] D.J.Benson and J.P.C.Greenlees “Localization and duality in topology and modular representation theory.” J. Pure Appl. Algebra 212 (2008), no. 7, 17161743. [21] D.J.Benson and J.P.C.Greenlees “Complete intersections and derived categories.” Preprint (2009) 17pp. 60 [22] D.J.Benson, J.P.C.Greenlees and S.Shamir “Complete intersections and mod p cochains.” AGT 13 (2013) 61-114, DOI 10.2140/agt.2013.13.61, arXiv:1104.4244 [23] J.M. Boardman “Stable homotopy theory” Mimeographed notes 1966–1970. [24] A.K. Bousfield. “The localization of spaces with respect to homology.” Topology 14 (1975), 133-150. [25] A.K. Bousfield. “The localization of spectra with respect to homology.” Topology 18 (1979), 257-281. [26] A.K. Bousfield and D.M. Kan. “Homotopy limits, completions and localizations.” Springer Lecture notes in mathematics Vol. 304. 1972. [27] E.H. Brown “Abstract homotopy theory.” Trans. Amer. Math. Soc. 119 (1965) 79–85. [28] W.Bruns and Herzog “Cohen-Macaulay rings.” Cambridge Studies in Advanced Mathematics, 39. Cambridge University Press, Cambridge, 1993. xii+403 pp. [29] V.Buchstaber and T.Panov “Torus actions and their applications in topology and combinatorics” AMS (2002) [30] E. Dror-Farjoun “Cellular spaces, null spaces and homotopy localization.” Lecture Notes in Mathematics, 1622. Springer-Verlag, Berlin, 1996. xiv+199 pp. [31] W.G.Dwyer “Strong convergence of the Eilenberg-Moore spectral sequence” Topology 13 (1974) 255265 [32] W.G.Dwyer and J.P.C.Greenlees “Complete modules and torsion modules” American J. Math. 124 (2002) 199-220 [33] W.G.Dwyer, J.P.C.Greenlees and S.B.Iyengar “Duality in algebra and topology.” Advances in Maths 200 (2006) 357-402 [34] W.G.Dwyer and J.P.C.Greenlees and S.B.Iyengar “Finiteness conditions in derived categories of local rings.” Comm. Math. Helv. 81 (2006) 383-432 [35] W.G.Dwyer and J.P.C.Greenlees and S.B.Iyengar “Gross-Hopkins duality and the Gorenstein condition”. J. K-Theory 8 (2011), no. 1, 107133. [36] W.G.Dwyer and J.P.C.Greenlees and S.B.Iyengar “DG algebras with exterior homology.” Bull. Lond. Math. Soc. 45 (2013), no. 6, 12351245. [37] W.G.Dwyer and C.Wilkerson “Homotopy fixed-point methods for Lie groups and finite loop spaces” Ann. Math. 139 (1994) 395-442 [38] D.Dugger and B.E.Shipley “K-theory and derived equivalences.” Duke Math. J. 124 (2004), no. 3, 587–617 [39] A.D. Elmendorf, J.P.C. Greenlees, I. Kriz and J.P. May. “Commutative algebra in stable homotopy theory and a completion theorem.” Math. Res. Letters 1 (1994) 225-239. [40] A. D. Elmendorf, I. Kriz, M. A. Mandell, and J. P. May. “Rings, Modules and Algebras in Stable Homotopy Theory”, Volume 47 of Amer. Math. Soc. Surveys and Monographs. American Mathematical Society, 1996. [41] A. D. Elmendorf, and J. P. May “Algebras over equivariant sphere spectra” J. Pure and Applied Algebra 116 (1997) 139-149 [42] Y. Félix, S. Halperin and J.-C. Thomas “Gorenstein spaces” Advances in Mathematics, 71, (1988) 92-112 [43] Yves Félix, Stephen Halperin, and Jean-Claude Thomas, “Elliptic Hopf algebras”, J. London Math. Soc. (2) 43 (1991), no. 3, 545–555. [44] P.G.Goerss and J.F.Jardine “Simplicial homotopy theory.” Progress in Mathematics, 174. Birkhauser Verlag, Basel, 1999. xvi+510 pp. ISBN: 3-7643-6064-X [45] D.J.Green and S.King “The cohomology of finite p-groups” http://users.minet.uni-jena.de/cohomology [46] J.P.C.Greenlees “Commutative algebra in group cohomology.” J.Pure and Applied Algebra 98 (1995) 151-162 [47] J.P.C.Greenlees “K-homology of universal spaces and local cohomology of the representation ring” Topology 32 (1993) 295-308. [48] J.P.C.Greenlees “Tate cohomology in commutative algebra.” J. Pure Appl. Algebra 94 (1994), no. 1, 59–83. [49] J.P.C.Greenlees “Commutative algebra for group cohomology.” JPAA 98 (1995) 151-162 [50] J.P.C.Greenlees “Tate cohomology in axiomatic stable homotopy theory.” Cohomological methods in homotopy theory (Bellaterra, 1998), 149–176, Progr. Math., 196, Birkhuser, Basel, 2001. 61 [51] J.P.C.Greenlees “Local cohomology in equivariant topology.” Local cohomology and its applications (Guanajuato, 1999), 1–38, Lecture Notes in Pure and Appl. Math., 226, Dekker, New York, 2002. [52] J.P.C.Greenlees “Spectra for commutative algebraists.” Proceedings of the 2004 Chicago Summer School Contemporary Mathematics 436 (2007) 149-173, arXiv:math/0609452 [53] J.P.C.Greenlees “First steps in brave new commutative algebra” Proceedings of the 2004 Chicago Summer School Contemporary Mathematics, 436 (2007) 239-275, arXiv:math/0609453 [54] J.P.C.Greenlees “Ausoni-Bökstedt duality for topological Hochschild homology” Journal of Pure and Applied Algebra 220 (2016), pp. 1382-1402 [55] J.P.C.Greenlees, K.Hess and S.Shamir “Complete intersections in rational homotopy theory.” JPAA 217 (2013) 636-663, arXiv:0906.3247 [56] J.P.C.Greenlees and G.Lyubeznik “Rings with a local cohomology theorem with applications to cohomology rings of groups.” JPAA 149 (2000) 267-285 [57] J.P.C. Greenlees and J.P. May. “Completions of G-spectra at ideals of the Burnside ring.” Proc. Adams Memorial Symposium, Volume II, CUP (1992), 145-178. [58] J.P.C. Greenlees and J.P. May. “Derived functors of I-adic completion and local homology.” J. Algebra 149 (1992), 438-453. [59] J.P.C.Greenlees and J.P. May “Equivariant stable homotopy theory”. Handbook of algebraic topology, 277–323, North-Holland, Amsterdam, 1995. [60] J.P.C.Greenlees and J.P. May “Completions in algebra and topology.” Handbook of algebraic topology, 255–276, North-Holland, Amsterdam, 1995. [61] J.P.C.Greenlees and B.E.Shipley “An algebraic model for free rational G-spectra for compact connected Lie groups G.” Math Z 269 (2011) 373-400, DOI 10.1007/s00209-010-0741-2 [62] J.P.C.Greenlees and B.E.Shipley “An algebraic model for free rational G-spectra.” Bull. LMS 46 (2014) 133-142, DOI 10.1112/blms/bdt066, arXiv:1101.4818 [63] J.P.C.Greenlees and G.Stevenson “Morita theory and singularity categories” In preparation (2015) 17pp [64] J.P.C.Greenlees and V.Stojanoska “Local and global duality in chromatic homotopy theory.” In preparation (2015) 37pp [65] A. Grothendieck. “Sur quelques points d’algèbre homologique”. Tohoku Mathematical Journal 9 (1957), 119-221. [66] A. Grothendieck (notes by R. Hartshorne). “Local cohomology.” Springer Lecture notes in mathematics Vol. 41. 1967. [67] T.H. Gulliksen “A homological characterization of local complete intersections.” Compositio Math. 23 (1971), 251–255. [68] T.H.Gulliksen “A change of ring theorem with applications to Poincaré series and intersection multiplicity.” Math. Scand. 34 (1974), 167–183. [69] T.H. Gulliksen “On the deviations of a local ring.” Math Scand 47 (1980) 5-20 [70] T.H.Gulliksen and G.Levin “Homology of local rings.” Queen’s Paper in Pure and Applied Mathematics, No. 20 Queen’s University, Kingston, Ont. 1969 x+192 pp. [71] R. Hartshorne. “Algebraic Geometry”. Springer-Verlag. 1977. [72] M.J. Hopkins. “Global methods in homotopy theory.” Proc. of the 1985 LMS Symposium on Homotopy Theory. London Math. Soc. 1987, 73-96. [73] M.Hovey “Model categories.” Mathematical Surveys and Monographs, 63. American Mathematical Society, Providence, RI, 1999. xii+209 pp. ISBN: 0-8218-1359-5 [74] M. Hovey, B.E.Shipley and Jeff Smith “Symmetric spectra.” J. Amer. Math. Soc. 13 (2000), no. 1, 149–208. [75] R.Levi “On finite groups and homotopy theory.” Mem. Amer. Math. Soc. 118 (1995), no. 567, xiv+100 pp. [76] R.Levi “A counter-example to a conjecture of Cohen.” Algebraic topology: new trends in localization and periodicity (Sant Feliu de Guxols, 1994), 261–269, Progr. Math., 136, Birkhuser, Basel, 1996. [77] R.Levi “On homological rate of growth and the homotopy type of ΩBG∧ p .” Math. Z. 226 (1997), no. 3, 429–444. 62 [78] R.Levi “On p-completed classifying spaces of discrete groups and finite complexes.” J. London Math. Soc. (2) 59 (1999), no. 3, 1064–1080. [79] L.G.Lewis, J.P.May and M.Steinberger (with contributions by J.E.McClure) “Equivariant stable homotopy theory” Lecture notes in mathematics 1213, Springer-Verlag (1986) [80] M.A.Mandell “E∞ algebras and p-adic homotopy theory.” Topology 40 (2001), no. 1, 43–94. [81] M.A.Mandell, J.P.May, S.Schwede, and B.E.Shipley “Model categories of diagram spectra.” Proc. London Math. Soc. (3) 82 (2001), no. 2, 441–512. [82] A. Mathew “The homology of tmf” Homology, Homotopy and Applications 18 (2016) (to appear) arXiv:1305.6100 [83] H. Matsumura. “Commutative ring theory.” Cambridge Univ. Press. 1986. [84] J.P.May “A concise course in algebraic topology.” University of Chicago Press, Chicago, IL, 1999. x+243 pp. ISBN: 0-226-51182-0; 0-226-51183-9 [85] J.Rognes “Galois extensions of structured ring spectra. Stably dualizable groups.” Mem. Amer. Math. Soc. 192 (2008), no. 898, viii+137 pp. [86] D.J. Rusin “The cohomology of the groups of order 32.” Math. Comp. 53 (1989), no. 187, 359385. [87] P. Schenzel “Proregular sequences, local cohomology, and completion.” Math. Scand. 92 (2003), no. 2, 161–180. [88] S. Schwede, “Morita theory in abelian, derived and stable model categories.” Structured ring spectra, 33–86, London Math. Soc. Lecture Note Ser., 315, Cambridge Univ. Press, Cambridge, 2004. [89] S. Schwede “Symmetric spectra” Book in preparation, available from author’s webpage. [90] S. Schwede and B.E.Shipley “Stable model categories are categories of modules.” Topology 42 (2003), no. 1, 103–153. [91] S. Schwede and B.E.Shipley “Algebras and modules in monoidal model categories.” Proc. London Math. Soc. (3) 80 (2000), no. 2, 491-511. [92] B.E.Shipley “HZ-algebra spectra are differential graded algebras.” American J. Math 129 (2007) 351379 [93] E.H.Spanier and J.H.C.Whitehead “A first approximation to homotopy theory.” Proc. Nat.Acad. Sci. U. S. A. 39, (1953). 655–660 The University of Sheffield, Sheffield, S3 7RH UK E-mail address: [email protected] 63
0math.AC
The N-Tuple Bandit Evolutionary Algorithm for Game Agent Optimisation Simon M Lucas, Jialin Liu and Diego Perez-Liebana arXiv:1802.05991v1 [cs.NE] 16 Feb 2018 School of Electrical Engineering and Computer Science Queen Mary University of London London, UK Email: {simon.lucas, jialin.liu, diego.perez}@qmul.ac.uk Abstract—This paper describes the N-Tuple Bandit Evolutionary Algorithm (NTBEA), an optimisation algorithm developed for noisy and expensive discrete (combinatorial) optimisation problems. The algorithm is applied to two game-based hyperparameter optimisation problems. The N-Tuple system directly models the statistics, approximating the fitness and number of evaluations of each modelled combination of parameters. The model is simple, efficient and informative. Results show that the NTBEA significantly outperforms grid search and an estimation of distribution algorithm. Index Terms—Keywords: Estimation of Distribution Algorithm, Evolutionary Algorithm, Hyper-Parameter Optimisation, Rolling Horizon Evolution, Game Playing Agent, Noisy Optimisation. I. I NTRODUCTION This paper describes the N-Tuple Bandit Evolutionary Algorithm (NTBEA) and its application to optimising the parameters of a rolling horizon evolution game-playing agent. The NTBEA combines evolutionary search with Multi-Armed Bandit algorithms (MABs) in order to provide an algorithm which is robust to noise, has an explicit way to balance the trade-off between exploration and exploitation, and provides a statistical model of the fitness landscape as an additional output. The applications of this type of algorithm are numerous. In our research we have already applied it successfully to hyperparameter optimisation [1] and automated game tuning [2]. Furthermore, if the inherent fitness landscape is flat, then the exploration term provides a means for performing novelty search [3]. A. Estimation of Distribution Algorithms Estimation of Distribution Algorithms (EDAs) [4], [5], [6], [7], [8] are a powerful class of Evolutionary Algorithms (EAs). Instead of using the mutation and crossover operators to generate offspring from the fittest parents, the population is sampled from an estimated probability distribution of selected individuals, which is updated iteratively using the fitness evaluations of individuals. In addition to potentially making the search more efficient and robust to noise, EDAs also have the benefit of learning a model which offers greater insight into the nature of the problem. The model may provide information regarding key parameter combinations that tend to lead to good or bad solutions. The NTBEA models not only the fitness of points in the search space, but also estimates how much each point has been visited. This enables explicit modelling of exploration, which has two distinct benefits. First, it enables a principled way to avoid becoming trapped in local optima, since the search can be diverted to less well explored areas. Second, it provides a natural way to perform a type of novelty search. This is especially important when dealing with problems that involve a flat reward landscape [9]. B. Combinatorial Multi-Armed Bandits Rolet and Teytaud [10] modeled the sub-domains of the search space as arms of a bandit and allocated the computational resource dynamically during the evaluation step of an evolution strategy for continuous noisy optimization. When searching in a discrete space, the NTBEA has significant similarity to the Combinatorial Multi-Armed Bandits (CMABs), formalised by Gai et al. [11] and Chen et al. [12]. Gai et al. applied CMABs to a channel allocation problem in mobile communications, and showed how considering pair-wise interactions led to better performance than a naive univariate model, but their model was particular to resource allocation problems. The recent work of Ontañón [13] on CMABs is the closest to this paper. Ontañón used CMABs for multiagent control in the microRTS game, a relatively simple but highly challenging real-time strategy (RTS) game. Ontañón’s CMABs model each dimension of the search space as an individual local MAB, in which each arm is a legal value of the corresponding dimension, together with a global MAB with all the legal value combinations as arms. These value combinations are sometimes called macro-arms. C. N-Tuple Systems In this paper we use an N-Tuple system to model the fitness landscape, and combine it with an evolutionary search algorithm. N-Tuple systems were first developed and applied to pattern recognition in the late 1950s [14], and among many other applications have also been applied to model value functions in games [15], [16]. The standard way of using an N-Tuple system is to model a high-dimensional feature space by considering a set of lower-dimensional projections of that space, defined by the set of N-Tuples. Each N-Tuple forms a weak model of the space, but combining them provides a good model. There are some novel aspects of the N-Tuple systems used in this paper that will be described later in Section II. The notion of successively improving an individual or a population via variation operators and fitness evaluations makes the NTBEA distinct from the standard CMAB methods. A CMAB operates via a pure bandit-based sampling procedure, whereas the approach described in this paper uses an evolutionary algorithm (EA) to perform the population generation and variation, and a bandit landscape fitness model (for brevity called just the model or the model space) to perform the selection. In this paper an N-Tuple system is used as the model, but other choices of model would also be possible. NTuple systems are a good choice due to their speed, simplicity, interpretability and reasonable accuracy. Essentially, the EA searches the model space to improve the sample efficiency in the problem domain. In this paper, a variation of the (1, λ)-EA is used, in which the current best individual is selected as the parent only to generate the next population of size λ and is not included in the new population. The instance of the algorithm described in this paper is similar to the N-Tuple Bandit Evolutionary Algorithm introduced by Kunanusont et al. [2], extended from the Bandit-based Random Mutation Hill Climber [17]. Kunanusont et al. [2] applied the NTBEA to automatic game parameter tuning of a two-player adversarial video game, a very noisy problem, as some stochastic AI agents were used to evaluate the evolved stochastic games. The NTBEA significantly outperformed two evolutionary algorithms, a simple Random Mutation Hill Climber and a univariate Bandit EA [2]. The NTBEA was also applied within the General Video Game AI (GVGAI [18]) framework for evolving game rules and parameters, and has successfully evolved variations of the game Aliens to favour either a short-term or a long-term planning agent [19]. In this paper, we formalise the NTBEA, and present its applications for hyper-parameter optimisation. The NTBEA makes use of the statistics of the previously evaluated solutions and balances the trade-off between exploring a new (or less evaluated) solution and exploiting the best one found so far. The NTBEA is particularly useful when the evaluation function is expensive or noisy. For example, in the context of automatic game design, a game needs to be played several times to approximate an accurate win rate if the game or the agents are stochastic, while the execution time of a single game may take a significant amount of time or it is difficult to perform an evaluation. The notion of expensive in this context is clearly subjective, but really means any problem where the evaluation time is a significant issue in the opinion of the algorithm user. Using N-Tuples to approximate fitness statistics and visit counts can be related to locally sensitive hashing (LSH), and it is worth noting how the N-Tuple system described in this paper could also be used for enhancing exploration in video games, similar to the way LSH in the form of Context Tree Switching (CTS) was applied to boost performance on the challenging game of Montezuma’s Revenge [20]. D. Hyper-Parameter Optimisation The task of tuning the parameters of a game-playing agent can be viewed as a Hyper-Parameter Optimisation problem. Bergstra and Bengio [21] state how the most popular methods are Grid Search and manual search, but show how competitive the performance of random search is for these problems. More recently the Hyperband paper [22] shows how recent approaches such as Sequential Model-based Algorithm Configuration (SMAC) [23] and Tree-structured Parzen Estimator (TPE; [24]) in some cases only perform similarly to random search. They outperformed random search in a direct rankbased comparison, but only by a small margin. When the random search was repeated twice and the best solution was picked, random search performed best [22] (albeit not quite a fair comparison, but one that illustrates the small margin of improvement). The NTBEA approach has a similar overall algorithmic framework to SMAC [23], in the way a model is iteratively updated and used to decide which point in the search space to sample next. Where SMAC uses random forests for the model, the NTBEA uses N-Tuple systems. There are also significant differences in the approaches; SMAC only estimates the value of the objective function for each parameter configuration, whereas NTBEA also estimates the visit count, which is essential for the bandit-based exploration pressure. There are also some conceptual differences, with SMAC running T trials of each sample configuration (via its INTENSIFY procedure) while by default NTBEA runs a single evaluation each time, in order to make maximum use of the bandit model. Other aspects of hyper-parameter optimisation in general involve early stopping of unpromising solutions, and also sharing of the system parameters between competing solutions: both of these are used to great effect by Jadeberg et al [25]. Here we only consider when each solution is fully evaluated at least once, as in a complete game is played, though actually games could be abandoned very early when one player is obviously weak. For now we note that there are many approaches to hyper-parameter optimisation, but that manual and grid search are in strong use, and that random search performs surprisingly well. The rest of this paper is structured as follows. Section II introduces the overall structure of the NTBEA. The test problem is described in Section III, then results are illustrated and discussed in Section IV. Section V concludes and lists some future work. II. T HE N-T UPLE BANDIT E VOLUTIONARY A LGORITHM In this section, we describe the system architecture of the algorithm and then explain each part in more detail. Figure 1 illustrates the three key components of the NTBEA, a bandit landscape model, an evolutionary algorithm and a noisy evaluator, i.e., a fitness function corrupted by noise. We assume that the execution time of querying the bandit landscape model is negligible compared to evaluating a candidate solution on the target problem. Fig. 1: Key components of the N-Tuple Bandit Evolutionary Algorithm (NTBEA). A model of the fitness landscape is built and updates iteratively using the evaluations of solutions. The search for candidate solutions is performed in the model space, i.e., the N-Tuple Bandit Fitness Landscape model, where candidate solutions can be evaluated quickly (N-Tuple systems are well known for their speed [26], and our experimental tests support this). This is then sampled in the real (relatively expensive) problem search space, where the fitness value is expected to be noisy. The model is then updated with the fitness value of this solution point. The process repeats until some termination condition is met. The algorithm works as follows. The search begins by sampling a single solution point uniformly at random in the search space. This search point is referred to as the current point. The fitness of the current point is evaluated once, in the problem domain, using the noisy evaluator. In theory, no resampling is needed, even for noisy problems, since the UCB module in the algorithm aims to take care of re-evaluating an identical point if needed. Note that the algorithm also works for noise-free problems, though we focus on noisy problems in this paper. The current point is then stored in the bandit fitness landscape model (referred to as the model from now on), together with its fitness value. The model is then searched within the neighborhood of the current point. The neighborhood is defined using the number of neighbors and the proximity distribution to the current point, which is controlled by a mutation operator. The solution point in the neighborhood with the highest estimated Upper Confidence Bounds value (UCB; defined later in Section II-A) is then selected as the new current point. The process iterates until the evaluation budget is used up, or some other termination condition is met. The algorithm is described in Algorithm 1. Note that this description outlines the simplest approach where only a single solution is held as the current focus of the search, similar to using only one parent. Population-based versions are also possible, and would be more appropriate for parallel hardware. A. Estimating UCB Values: an N -Tuple Approach A key part of the algorithm is the value function used to sample in a large search space. In this context, large means that the size of the search space is larger than the number of fitness evaluations allowed, thus it is impossible to properly evaluate (proper evaluation may involve resampling due to noise) each of the possible solutions points. Instead, we need to model the relationship between points in the search space and sample accordingly. The algorithm UCB1, a simple multi-armed bandit algorithm, is introduced by Auer et al. [27]. The UCB value of any arm i is defined as: r ln n . (1) UCBi = X̂i + k ni +  The empirical mean reward for playing arm i is X̂i : this is the exploitation term. The right hand term controls the exploration, where n is the total number of times this bandit has been played, and ni is the number of times the arm i has been played. The term k is called the exploration factor: higher values of k lead to explorative search, low values lead to more greedy or exploitative search. Each dimension of the search space is modelled as an independent MAB, with an arm for each possible value. The  value is used to control whether each arm should be pulled at least once. In the standard UCB formula,  is set to zero ensuring that each arm is pulled once in turn, but for our purposes this would be impractical, as the macro-arm consisting of the entire N -Tuple would force an exhaustive exploration of the search space. Additionally, we also model combinations of arms as superbandits. For example, in a d-dimensional search space where each dimension has n possible values, the 10-wide superbandit would have nd arms. We modify this to be an aggregate over all the N -Tuples in the N -Tuple System model. Let N be the N -Tuple indexing function such that Nj (x) indexes the j th bandit for search space point x. Initially we compute the aggregate UCB value for solution point x as an unweighted arithmetic average, as defined in (2): m vU CB (x) = 1 X UCBNj (x) , m j=1 (2) where m denotes the total number of bandits in the system. More sophisticated algorithms are possible, for example by combining the individual outputs using a Bayesian method, but for simplicity and proof of concept we begin by using the arithmetic average. The N-Tuple systems have ideal properties for use as fitness landscape models, in that they offer an extremely fast one-shot training and good accuracy. They are ideally suited to modelling discrete spaces, but can also be applied to continuous spaces with some degree of compromise. In this paper we are dealing with discrete search spaces, so they are already a good fit. The concept is as follows. Given a d-dimensional search space, we sub-sample its dimensions with a number of N tuples. The value of N ranges from 1 up to d, though may miss out values in between. If all the tuples were considered, then the total number of bandits is 2d . In the standard N-Tuple systems each entry in the look-uptable stores a single value for each class, normally related to the probability of that index occurring given that class, or for game position value function approximation, the value of that index occurring. Algorithm 1 The N-Tuple Bandit Evolutionary Algorithm. Require: S: search space Require: f itness: noisy solution evaluator Require: n ∈ N + : number of neighbors Require: p ∈ (0, 1): mutation probability Require: f lipOnce ∈ {true, f alse}: flip at least once or not Require: nbEvals: total number of evaluations allowed 1: t = 0 . Counter for fitness evaluations 2: M odel ← ∅ . Initialise the fitness landscape model 3: current ← a random point ∈ S 4: while t < nbEvals do 5: value ← f itness(current) 6: add < current, value > to LM odel 7: 8: 9: P opulation ← N EIGHBORS(M odel, current, n, p, f lipOnce) 11: 12: function N EIGHBORS(model, x, n, p, f lipOnce) P opulation ← ∅ . Initialise empty set d ← |x| . Get the dimension for k ∈ {1, . . . , n} do neighbor ← x i←0 if f lipOnce then i ← randomly selected from {1, 2, . . . , d} for j ∈ {1, . . . , d} do if i == j then Randomly mutate value of neighborj else if RAN D < p then Randomly mutate value of neighborj Add neighbor to P opulation return P opulation current ← arg maxx∈P opulation vU CB (x) t←t+1 10: return LM odel 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: In our model, however, each N-Tuple has a look-up table (LUT) that stores statistical summaries of the values it encounters; the basic numbers stored are the number of samples, the sum of the fitness of samples, and the sum of the square of the fitness of the samples. This enables the mean, the standard deviation and the standard error to be calculated for each entry in the table. This provides all we need for (1) and (2), and beyond: calculating the mean, standard deviation or standard error for each parameter combination being modelled provides useful insight into the nature of the system under optimisation. B. Algorithm The NTBEA algorithm is outlined in Algorithm 1 and operates as follows. It begins by choosing a random solution point in the search space, which is called the current point. Since we are dealing with discrete search spaces, each point is represented as a vector of integers, where each element of the vector is an index to the currently selected value in that dimension. The actual value chosen may be of any type, common types are integer, double and boolean. The following steps are then repeated until the fitness evaluation budget has been exhausted: • It makes a (noisy) fitness evaluation of the current point and stores it in the N-Tuple Fitness Landscape Model as the value for that solution point (lines 5 and 6 in Algorithm 1). • Using a mutation operator to generate a set of unique neighbors of the current solution, as the population of current iteration (line 7). • Using the fitness landscape model, the algorithm calculates the estimated UCB value of each solution by (1) and (2). Then, it sets the current solution as the one in the population (neighbors from the previous step) with the highest estimated UCB value (line 8). When the fitness evaluation budget has been exhausted, the method searches and recommends a neighbor of all of the evaluated solutions, in which each dimension is set to the value with maximal approximate value defined in (2). C. Illustrative Example Consider a 5-dimensional space, modeled using five 1-tuples and one 5-tuple. Suppose we now enter the four vectors (three unique) in the search space together with their associated fitness values as given in Table Ia. The first 1-tuple will have a LUT that has 2 entries, with LU T [0 ∗ ∗ ∗ ∗] having a mean of 1, and LU T [1 ∗ ∗ ∗ ∗] having a mean of 32 . The single 5-tuple will have three nonempty entries, with LU T [12340] having a mean of 0.5, and LU T [11111] and LU T [00110] both having means of 1. Note that the object at each index is a statistical summary object as described above that does not directly store the mean but can calculate it; we describe the mean value to best illustrate the operation, and because it feeds directly into (1) and (2). An example of some of the statistics that are stored in the system or can be calculated directly is shown in Table Ib. In this example only the empirical average and the number of evaluations is output for each index of each N -tuple, though as mentioned previously the standard deviation and standard error are also available. For each N -tuple, only the non-null table entries are shown, i.e., ones in which the index (can also be thought of as a pattern) occurs at least once. III. N OISY O PTIMISATION OF G AME AGENT PARAMETERS This section describes an application to optimising the parameters of a rolling horizon evolutionary game-playing agent. The agent is optimised to get as high average score on the game as possible. This is a noisy optimisation problem with two distinct sources of noise: (i) the game itself is stochastic; (ii) the optimised agent follows a stochastic policy, such that given the same game state, it may play differently if simulating more than once. The behavior of the agent is controlled by a number of parameters, some of which may have a critical effect on TABLE I: Illustrative example, in which only 1-tuples and d-tuple are considered (d = 5). • (a) Evaluated solutions (entries) and corresponding fitness values. Solution [1, 2, 3, 4, 0] [1, 1, 1, 1, 1] [0, 0, 1, 1, 0] [1, 2, 3, 4, 0] fitness 1 1 1 0 • (b) Some of the statistics that are stored in the system or can be calculated directly. N -tuple 1-tuple 5-tuple Pattern [0, ∗, ∗, ∗, ∗] [1, ∗, ∗, ∗, ∗] [∗, 0, ∗, ∗, ∗] [∗, 1, ∗, ∗, ∗] [∗, 2, ∗, ∗, ∗] [∗, ∗, 1, ∗, ∗] [∗, ∗, 3, ∗, ∗] [∗, ∗, ∗, 1, ∗] [∗, ∗, ∗, 4, ∗] [∗, ∗, ∗, ∗, 0] [∗, ∗, ∗, ∗, 1] [0, 0, 1, 1, 0] [1, 1, 1, 1, 1] [1, 2, 3, 4, 0] Mean 1 2 3 1 1 1 2 1 1 2 1 1 2 2 3 1 1 1 1 2 Nb. of eval. 1 3 1 1 2 2 2 2 2 3 1 1 1 2 the performance of the agent, and where the combination of parameter values is important. The problem addressed is similar to the hyper-parameter optimisation problem that is topical in machine learning; it has been shown many times that optimising a known architecture can produce state of the art results (e.g., [24], [21]). A. Rolling Horizon Evolutionary Agent We aim to optimise the parameters of a rolling horizon evolutionary agent. Rolling Horizon Evolutionary Algorithms (RHEAs) are called rolling horizon as each of the individuals in the population is an action sequence of a fixed planning (time) horizon, hp , thus RHEAs plan ahead hp actions. On each subsequent game step, the horizon rolls one step further within the hp window. Every individual is evaluated by evaluating the state after simulating hp actions in its corresponding sequence or earlier, if a termination state is reached before performing all the hp actions. Then, only the first action of the best individual is applied. This procedure repeats with the updated state. The rolling horizon technique can be integrated to different evolutionary algorithms such as Genetic Algorithms and Coevolutionary Algorithms [28]. In this work, we combined a simple (1 + 1)-EA with rolling horizon. This agent will be referred to as RHEA in the rest of the paper. The performance of RHEAs can be boosted in many ways. For instance, recently, RHEAs have been applied to General Video Game Playing, and proved that the population size and sequence length (i.e., planning horizon) had significant effect on the performance of the algorithms [29], [30], [31]. Some of the key parameters are • sequence length: planning horizon; • • shift buffer enabled or not: if disabled, at any timestep t + 1, the initial population is reset to random, otherwise, each of the individuals from the population at timestep t (previous optimisation procedure) shifts its action sequence forward and fills the last position by a random action; resampling number: in the stochastic case, how many time an individual is re-evaluated (equals to 1 if no reevaluation is allowed). mutation probability: how likely a mutation occurs at every dimension; flip at least one bit: indicates if at least one mutation should occur at each time. B. Test Problems We optimise the rolling horizon evolutionary agent to play two games: simplified Java implementations of Asteroids and Planet Wars. In these test cases, the RHEA agent model sequences of actions in next game ticks as its individuals, and evolve the individuals over time aiming at maximising some fitness value. 1) Asteroids: Asteroids, released to great acclaim in 1979 is one of the classic video games of all time, and Atari’s most profitable1 . The original game was implemented in special vector graphics hardware, featured memorable sound effects and smooth physics-based movements. The challenge for players is to avoid being hit by asteroids, while aiming at them accurately and to also hit the flying saucers before they hit the player’s spaceship. There are three sizes of asteroids: large, medium and small. Each screen starts with a number of large rocks: as each one is hit either by the player, or by a missile fired by an enemy flying saucer, it splits in to a smaller one: large rocks split into two medium ones, medium into two small ones, small ones disappear. There is also a score progression, with the score per rock increasing as the size decreases. Strong play requires good perceptual and motor skills for avoiding collisions and shooting accurately at the targets. There are also some interesting strategies which may easily elude novice players. One of them is to control the number of asteroids on the screen by shooting one large one at a time, then picking off a single medium rock and each small one it gives rise to, before breaking another large rock. The largest score for any item is the 1, 000 points awarded for shooting the small flying saucer. These fire at the player with deadly accuracy, so it is important to shoot them quickly as the missiles they fire are fast moving and tricky to avoid. Many strong players will shoot all but one remaining asteroid (a small one) and then lie in wait for flying saucers at the edge of the screen, firing at them immediately as soon as they appear. There is some devil in the detail here, regarding the best place to wait and the best angle to fire at (the screen wraps around both vertically and horizontally, so from a single position it is possible to shoot at both sides). 1 https://en.wikipedia.org/wiki/Asteroids_(video_game) For our experiments we used a Java implementation of the game where we can simulate the game 10, 000 times faster than the real game. Although using the ALE or MAME version of the game would have been possible, there are some distinct advantages to having our own implementation: • • It runs much faster than the ALE or MAME versions. Having access to the source code makes it straightforward to vary details of the game in order to test various hypotheses. For example, we can test the effects of penalising each missile fired, or giving the large and medium rocks zero value to test the long-term planning ability of the agents under test. An example is the use of the twoplayer version of this implementation in automatic game parameter tuning [32]. In this simplified version, there are at each time twelve legal actions at each game tick, being a combination of the three steer actions (LEFT, CENTER, RIGHT), and whether the ship is thrusting ( THRUST) and / or firing (FIRE). Unlike the original game there is no HYPERSPACE action. The player starts with 0 as game score and 3 lives, and an additional life every 10, 000 points. The player gets 200, 100 or 50 points every time it hit an large, medium or small asteroid, respectively, and loses 10 points for every missile fired. Losing a life has a penalty of −200 points. The game stops when all lives are lost, or 1, 000 game ticks have elapsed. Currently there are no flying saucers, but we plan to add this feature for the next set of experiments. Figure 2a gives a screenshot of the game screen. Pink lines illustrate the simulations of the RHEA agent which controls the spaceship; these are shown for illustrative purposes only, and ignore the fact that each rollout involves other changes to the game state such as firing missiles and the rocks moving and splitting. 2) Planet Wars: Planet Wars is a simple but challenging Real Time Strategy game that was run as a highly successful Google Game AI Challenge in 2011 by the University of Waterloo in Canada. For the work in this paper we implemented a simpler version of the game to make it faster to allow rapid running of experiments while retaining some challenging aspects of the original game. The game runs at more than 10 million game ticks per second. The aim game of Planet Wars is to occupy all the planets, where each planet is occupied either by player 1, player 2, or by a neutral. Each planet has a number of ships belonging to the owner of the planet. To invade a planet a player sends a number of ships to the planet to be invaded from the planet it owns. For our experiments we used an implementation with the following rules: • • • No neutral planets: the ships on each planet are either owned by player 1 or player 2. At each game tick, a player moves by shifting ships to or from a player’s ship buffer, or by moving it’s current planet of focus. When a player transfers ships it is always between it’s buffer and the current planet of focus. At each game tick the score for each player is the sum of all the ships on each planet it owns, plus the ships stored in it’s buffer. We have two versions of the game: the easiest for the planning agents, and the one used in this paper also adds in the ships in a player’s buffer to it’s score, a more deceptive version of the game does not include this. For research purposes, the advantage of the modified action space is that it makes it compatible with the General Video Game AI framework, giving direct access to a large number of game-playing agents for comparison purposes. • IV. A PPLICATIONS AND R ESULTS We aim to optimise the parameters of the RHEA agent (described in Section III-A) with NTBEA and two baseline algorithms, Grid Search and a multi-valued version of the Sliding Window compact Genetic Algorithm (SWcGA), an EDA proposed by Lucas et al. [33] recently.2 The NTBEA used in the experiments takes into account all the d 1-tuples, d(d−1) 2-tuples and the only d-tuple. 2 A. Experimental Setting 1) Fitness Function: In each case the fitness function is based on the outcome of a single game, which leads to noisy fitness functions. a) Asteroids: The evaluation function is the game score when the game terminates, the higher the better. The calculation of the game score is explained in Section III-B1. The value of k should be set relative to the score distribution; for Asteroids k was set to 5, 000. b) Planet Wars: The evaluation function is based on playing a single game, with a value of +1 if the agent wins or −1 for a loss, and 0 for a draw (which is very unlikely to occur). This gives an extremely noisy fitness function. Note that an optimiser can choose to resample a particular point in the search space, i.e., playing multiple games using the agent with an identical parameter setting, in order to get an estimate of win rate. However, with a fixed small evaluation budget, the optimiser will run fewer iterations compared to sampling exactly one. The NTBEA optimises the parameters of a RHEA agent controlled as player 1, versus a fixed-parameter version of the RHEA with well-chosen parameters based on the authors’ experience playing as player 2. The game is symmetric and the planning budget for both players was set to 2, 000 game ticks. For Planet Wars, the value of k in the NTBEA was set to 1.0. 2) Search Space: The RHEA agent is characterised by the parameters shown in Table II, where each one is given a type and legal values. The parameters have been detailed previously in Section III-A. The mutation probability for a d-dimensional problem is calculated by nbM utatedP oints/d. 2 The original Compact Genetic Algorithm (cGA) and the sliding window version described by Lucas et al. [33] only handled binary strings. The version used in this paper handles integer strings and can use absolute or relative fitness measures; the version used here used absolute fitness measures. TABLE II: Search space of the parameter settings. Variable Asteroids sequenceLength Planet Wars nbM utatedP oints f lipAtLeastOneBit useShif tBuf f er nbResamples Type Integer Integer Integer boolean boolean Integer Legal values 5, 10, 15, 20, 50, 100, 150 5, 10, 15, 20, 50 0.0, 1.0, 2.0, 3.0 f alse, true f alse, true 1, 2, 3 The RHEA agent is very flexible and allows any compatible evolutionary algorithm to be plugged in to control the evolutionary process. For these experiments we used a Random Mutation Hill Climber / (1 + 1)-Evolutionary Algorithm (the distinction between the two depends on the parameters chosen by the hyper-parameter optimiser). The search space of the parameter settings is actually the search space of RHEA instances, while every RHEA given a parameter setting is considered as a distinct instance. As shown in Table II, the size of the search space, in other words, total number of possible RHEA instances, when playing Asteroids and Planet Wars, is 336 and 240, respectively. 3) Budget: We allowed an optimisation budget of the same value as the size of search space, thus 336 game evaluations in the case of Asteroids and 240 in the case of Planet Wars. Note that a “game evaluation” refers to a whole game playing, which lasts at most 1, 000 game ticks. At each game tick, the playing agent RHEA has a budget of 2, 000 forward model calls (simulations) to find an optimal action to play. Given that there are 336 and 240 points in the search space of the two games, this means an attempted uniform Grid Search cannot even sample each point twice. The NTBEA works by building up statistics for each value in each individual dimension, as well as tuples of values, and the full-width n-tuple. Hence the optimiser is able to make good use of the gathered information. B. Results Each of the three optimisation algorithms, Grid Search, SWcGA and NTBEA, are given the same budget to optimise a RHEA agent on each of the games. The recommended agent instance at the end of an optimisation is validated by playing 100 games. NTBEA was run with a neighborhood-size of 50, and SWcGA with a sliding window of size 50. Table III analyses the average fitness value obtained by the RHEA instances recommended by three tested algorithms over 10 optimisation trials on Asteroids and Planet War. RHEAGridSearch , RHEASW cGA and RHEAN T BEA denote the RHEA agent instance recommended at the end of optimisation by Grid Search, SWcGA and NTBEA, respectively. A random agent, which uniformly randomly selects an action at every game tick, is also tested for comparison. Unsurprisingly, the random agent performs poorly both in games. Given the same budget, the NTBEA significantly outperforms the baseline algorithms, Grid Search and SWcGA. Of the three, Grid Search is by far the worst. The Wilcoxon Signed-Rank Test was run for significance between TABLE III: Average fitness value over 10 optimisation trials. Standard error is given after ±. Note that in the case of Planet War, an average of 0 refers to a win rate of 50%. Agent Random RHEAGridSearch RHEASW cGA RHEAN T BEA Planet Wars -0.9400 ± 0.3400 -0.53 ± 0.12 0.39 ± 0.07 0.54 ± 0.02 Asteroids 1,091 ± 88 7,716 ± 330 8,439 ± 110 8,756 ± 41 RHEASW cGA and RHEAN T BEA , establishing a significance difference between the measures with p = 0.01928 for Planet Wars. The results for Asteroids follow a normal distribution under the Shapiro-Wilk Normality Test, and the difference between RHEASW cGA and RHEAN T BEA is significant with a student t-test p-value of 0.040131. In addition to the results presented in Table III the authors have also made many other test runs with various evaluation budgets, both higher and lower than the budgets used for the table, and in all the tests made so far the NTBEA has outperformed the SWcGA, and also outperformed grid search where applicable (grid search was not applied to cases where the budget was smaller than the number of points in the search space). A more thorough set of experiments, including ones with much larger search spaces is on-going work. Figure 2 is an illustration of the plot of game score in real-time by the program to show how score varies over the planning horizon of the algorithm. C. Solutions Found The best solutions found showed common traits for both games, but with some significant differences. The best solutions always used the shift buffer, and set nResamples to 1. Flipping a bit was normally preferred, and a large value of nbM utatedP oints of 2.0 or 3.0 gave best performance. The best sequence length for Planet Wars was either 10 or 20, and for Asteroids a sequence length of 100 worked best; the big difference in performance for various parameter settings demonstrates the importance and impact of undertaking effective parameter tuning. The output of the NTBEA provides clear statistics on the parameter combinations that were tested, but these run in to pages of output. We are currently developing graphical tools to convey this information in a more convenient form. V. C ONCLUSION AND F UTURE W ORK In this paper, we propose an N-Tuple Bandit Evolutionary Algorithm (NTBEA), combining the strength of N-Tuple systems, multi-armed bandit algorithms and evolutionary algorithms. The proposed approach is compared to two baseline algorithm, Grid Search and Sliding Window compact Genetic Algorithm, on a hyper-parameter optimisation problem: evolving a rolling horizon evolutionary game-playing agent. NTBEA significantly outperformed the baseline algorithms, and provides an explicit control over exploitation versus exploration. (a) Screenshot of the game screen of Asteroids. Polygons represent asteroids. Solid rectangle represents the spaceship, and pink lines illustrate the simulations of the rolling horizon evolutionary agent which controls the spaceship. Red solid circulars represent bullets fired by the spaceship. (b) Real-time plots showing how the score varies over the planning horizon of the algorithm. The figure shows 10 plots, each of length 100 with a different color. Each of the plots refers to a simulation in Figure 2a. Fig. 2: Screenshot of the game screen of Asteroids and real-time plot of game scores in the simulations. The next step is the application of the NTBEA to more expensive problems, such as optimising some game-playing agents for playing the 2-player games in the General Video Game AI framework [34]. To ensure the stable performance, the 2-player agent should be evaluated by simulating multiples games against multiple opponent models, which will be computationally expensive. Additional, it will be challenging to test the NTBEA on larger search space, not only in terms of the dimension number but also the number of legal actions on each of the dimensions. One thing worth taking into account but not considered in this paper explicitly is the prior knowledge on the dependencies between dimensions. As mentioned previously in Section II, if all the tuples were considered, the number of bandits increases exponentially. Though the use of tuples takes care of the potential dependencies and it is not necessary to consider all the tuples, we still need to decide in advance which are the ones to be included in the model (e.g., all the possible 1-tuples, 2-tuples and the single d-tuple were included in our test case). Some prior knowledge on the problem can facilitate this selection step and reduces the amount of memory required by NTBEA. The comparison between the NTBEA and other EDAs will be interesting, and more generally a comparison between NTBEA and a wide range of existing hyper-parameter optimisation algorithms such as SMAC. It should be noted though that many of the latter algorithms are not set up to handle extremely noisy fitness functions such as the games used in this paper. In summary, the NTBEA is a significant new algorithm that has been shown to work well both for automated game tuning, and now for optimising a game playing agent on two very different games. The algorithm is well suited to problems where the fitness function is noisy and expensive, gives good performance, and provides useful statistics on the contribution of each combination of parameters as a consequence of the underlying N-Tuple model. R EFERENCES [1] C. F. Sironi, J. Liu, D. Perez-Liebana, R. D. Gaina, I. Bravi, S. M. Lucas, and M. H. Winands, “Self-adaptive mcts for general video game playing,” in European Conference on the Applications of Evolutionary Computation. Springer, 2018. [2] K. Kunanusont, R. D. Gaina, J. Liu, D. Perez-Liebana, and S. M. Lucas, “The n-tuple bandit evolutionary algorithm for automatic game improvement,” in Evolutionary Computation (CEC), 2017 IEEE Congress on. IEEE, 2017. [3] J. Lehman and K. O. Stanley, “Abandoning objectives: Evolution through the search for novelty alone,” Evolutionary Computation, no. 2, pp. 198 – 223, 2011. [4] H. Mühlenbein and G. Paass, “From recombination of genes to the estimation of distributions i. binary parameters,” in International conference on parallel problem solving from nature. Springer, 1996, pp. 178–187. [5] P. Larrañaga and J. A. Lozano, Estimation of distribution algorithms: A new tool for evolutionary computation. Springer Science & Business Media, 2001, vol. 2. [6] C. González, J. A. Lozano, and P. Larranaga, “Mathematical modeling of discrete estimation of distribution algorithms,” in Estimation of Distribution Algorithms. Springer, 2002, pp. 147–163. [7] J. A. Lozano, Towards a new evolutionary computation: advances on estimation of distribution algorithms. Springer Science & Business Media, 2006, vol. 192. [8] M. Hauschild and M. Pelikan, “An introduction and survey of estimation of distribution algorithms,” Swarm and Evolutionary Computation, vol. 1, no. 3, pp. 111–128, 2011. [9] J. Decock and O. Teytaud, “Noisy optimization complexity under locality assumption,” in Proceedings of the twelfth workshop on Foundations of genetic algorithms XII. ACM, 2013, pp. 183–190. [10] P. Rolet and O. Teytaud, “Bandit-based estimation of distribution algorithms for noisy optimization: Rigorous runtime analysis.” in LION. Springer, 2010, pp. 97–110. [11] Y. Gai, B. Krishnamachari, and R. Jain, “Learning multiuser channel allocations in cognitive radio networks: A combinatorial multi-armed bandit formulation,” in New Frontiers in Dynamic Spectrum, 2010 IEEE Symposium on. IEEE, 2010, pp. 1–9. [12] W. Chen, Y. Wang, and Y. Yuan, “Combinatorial multi-armed bandit: General framework and applications,” in International Conference on Machine Learning, 2013, pp. 151–159. [13] S. Ontanón, “Combinatorial multi-armed bandits for real-time strategy games,” Journal of Artificial Intelligence Research, vol. 58, pp. 665–702, 2017. [14] W. W. Bledsoe and I. Browning, “Pattern recognition and reading by machine,” in Proceedings of the Eastern Joint Computer Conference, 1959, pp. 232 – 255. [15] S. M. Lucas, “Learning to Play Othello with N-Tuple Systems,” Australian Journal of Intelligent Information Processing, vol. 4, pp. 1–20, 2008. [16] T. P. Runarsson and S. M. Lucas, “Preference learning for move prediction and evaluation function approximation in othello,” IEEE Transactions on Computational Intelligence and AI in Games, vol. 6, no. 3, pp. 300–313, 2014. [17] J. Liu, D. Pérez-Liébana, and S. M. Lucas, “Bandit-based random mutation hill-climbing,” in Evolutionary Computation (CEC), 2017 IEEE Congress on. IEEE, 2017, pp. 2145–2151. [18] D. Perez-Liebana, S. Samothrakis, J. Togelius, S. M. Lucas, and T. Schaul, “General Video Game AI: Competition, Challenges and Opportunities,” in Thirtieth AAAI Conference on Artificial Intelligence, 2016, pp. 4335–4337. [19] D. Perez-Liebana, J. Liu, and S. M. Lucas, “General video game AI as a tool for game design,” Tutorial at IEEE Conference on Computational Intelligence and Games (CIG), 2017. [20] M. Bellemare, S. Srinivasan, G. Ostrovski, T. Schaul, D. Saxton, and R. Munos, “Unifying count-based exploration and intrinsic motivation,” in Advances in Neural Information Processing Systems 29, D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, Eds. Curran Associates, Inc., 2016, pp. 1471–1479. [Online]. Available: http://papers.nips.cc/paper/ 6383-unifying-count-based-exploration-and-intrinsic-motivation.pdf [21] J. Bergstra and Y. Bengio, “Random search for hyper-parameter optimization,” Journal of Machine Learning Research, vol. 13, no. Feb, pp. 281–305, 2012. [22] L. Li, K. Jamieson, G. DeSalvo, A. Rostamizadeh, and A. Talwalkar, “Hyperband: A novel bandit-based approach to hyperparameter optimization,” arXiv preprint arXiv:1603.06560, 2016. [23] F. Hutter, H. H. Hoos, and K. Leyton-Brown, “Sequential model-based optimization for general algorithm configuration,” in Proceedings of LION 5, 2011, pp. 507 – 523. [24] J. S. Bergstra, R. Bardenet, Y. Bengio, and B. Kégl, “Algorithms for hyper-parameter optimization,” in Advances in Neural Information Processing Systems, 2011, pp. 2546–2554. [25] M. Jaderberg, V. Dalibard, S. Osindero, W. M. Czarnecki, J. Donahue, A. Razavi, O. Vinyals, T. Green, I. Dunning, K. Simonyan, C. Fernando, and K. Kavukcuoglu, “Population based training of neural networks,” CoRR, vol. abs/1711.09846, 2017. [Online]. Available: http://arxiv.org/abs/1711.09846 [26] R. Rohwer and M. Morciniec, “A theoretical and experimental account of n-tuple classifier performance,” Neural Computation, vol. 8, no. 3, pp. 629–642, 1996. [27] P. Auer, N. Cesa-Bianchi, and P. Fischer, “Finite-time analysis of the multiarmed bandit problem,” Machine learning, vol. 47, no. 2-3, pp. 235–256, 2002. [28] J. Liu, D. Pérez-Liébana, and S. M. Lucas, “Rolling horizon coevolutionary planning for two-player video games,” in Computer Science and Electronic Engineering (CEEC), 2016 8th. IEEE, 2016, pp. 174–179. [29] R. D. Gaina, J. Liu, S. M. Lucas, and D. Pérez-Liébana, “Analysis of vanilla rolling horizon evolution parameters in general video game playing,” in European Conference on the Applications of Evolutionary Computation. Springer, 2017, pp. 418–434. [30] R. D. Gaina, S. M. Lucas, and D. Pérez-Liébana, “Population seeding techniques for rolling horizon evolution in general video game playing,” in Evolutionary Computation (CEC), 2017 IEEE Congress on. IEEE, 2017, pp. 1956–1963. [31] R. D. Gaina, S. M. Lucas, and D. Perez-Liebana, “Rolling horizon evolution enhancements in general video game playing,” in Computational Intelligence and Games (CIG), 2017 IEEE Conference on. IEEE, 2017, pp. 88–95. [32] J. Liu, J. Togelius, D. Pérez-Liébana, and S. M. Lucas, “Evolving game skill-depth using general video game ai agents,” in Evolutionary Computation (CEC), 2017 IEEE Congress on. IEEE, 2017, pp. 2299– 2307. [33] S. M. Lucas, J. Liu, and D. Pérez-Liébana, “Efficient noisy optimisation with the multi-sample and sliding window compact genetic algorithms,” in Computational Intelligence (SSCI), 2017 IEEE Symposium Series on. IEEE, 2017. [34] R. D. Gaina, A. Couetoux, D. J. N. J. Soemers, M. H. M. Winands, T. Vodopivec, F. Kirchgeβner, J. Liu, S. M. Lucas, and D. Perez-Liebana, “The 2016 two-player GVGAI competition,” IEEE Transactions on Computational Intelligence and AI in Games, 2017.
2cs.AI
Quantum Information Processing manuscript No. (will be inserted by the editor) A quantum genetic algorithm with quantum crossover and mutation operations arXiv:1202.2026v5 [cs.NE] 22 Nov 2013 Akira SaiToh · Robabeh Rahimi · Mikio Nakahara Received: date / Accepted: date Abstract In the context of evolutionary quantum computing in the literal meaning, a quantum crossover operation has not been introduced so far. Here, we introduce a novel quantum genetic algorithm which has a quantum crossover procedure performing crossovers among all chromosomes in parallel for each generation. A complexity analysis shows that a quadratic speedup is achieved over its classical counterpart in the dominant factor of the run time to handle each generation. Keywords Genetic algorithm · Quantum computing · Computational complexity PACS 03.67.Ac · 87.23.-n · 89.70.Eg A. SaiToh Quantum Information Science Theory Group, National Institute of Informatics, 2-1-2 Hitotsubashi, Chiyoda, Tokyo 101-8430, Japan R. Rahimi Institute for Quantum Computing, University of Waterloo, 200 University Avenue West, Waterloo, Ontario N2L 3G1, Canada M. Nakahara Department of Physics, Kinki University, 3-4-1 Kowakae, Higashi-Osaka, Osaka 577-8502, Japan A. SaiToh · M. Nakahara Research Center for Quantum Computing, Interdisciplinary Graduate School of Science and Engineering, Kinki University, 3-4-1 Kowakae, Higashi-Osaka, Osaka 577-8502, Japan Present Address: A. SaiToh Department of Computer Science and Engineering, Toyohashi University of Technology, 1-1 Hibarigaoka, Tenpaku-cho, Toyohashi, Aichi 441-8580, Japan E-mail: [email protected] 2 Akira SaiToh et al. 1 Introduction Continuous development has been performed on genetic algorithms [19,11,32]. Along with the development of quantum computing [15,37], quantum-inspired classical algorithms for evolutionary computing have been developed [36,16, 17,18,35,34,6,24,33] (see also a review [54] and references therein). In addition, classical genetic algorithms to evolve quantum circuits have also been studied by several authors [52,44,2,45,53,38,25,22,43,23,29,26,30,7,46] (see also review articles [10,9]). These algorithms are, however, designed to work on classical computers. Quantum genetic algorithms (QGAs), in its literal meaning, nonetheless, have gathered comparably little attention and a few works [40,49,27,50,28] have been performed so far. Evolutionary computing on quantum architectures will achieve more attention if there is a scenario to establish significant improvement over classical counterparts. Indeed, Malossini et al. [27,28] claimed that the computational complexity of an evolutionary step between generations is exponentially fast in their quantum algorithm in comparison to a classical one. It seems, however, that they overlooked the complexity of index-to-string conversion circuits or, otherwise, overlooked the circuit complexity of a variant of the inversion-about-average operation. Their claim is thus misleading as we will discuss in Sect. 2. Recently, Johannsen et al. [20] applied quantum search algorithms to several optimization problems in a certain context of evolutionary computing. Nevertheless, it is obscure how much cost is spent for the internal quantum circuit of a variant of the inversion-about-average operation used for amplitude amplification (namely, the operation denoted as ASφ0 A−1 in the convention of Ref. [4]) in their approach. Let us briefly summarize the conventional approach of QGAs and its problem. Here, we omit discussions on incomplete or physically unfeasible works on QGAs, which were summarized by Sofge in Ref. [41]. The aim of a genetic algorithm is, in most cases, to find an individual (typically, an input string) with a very high fitness value for a given problem. It starts with O(|A|w ) initial individuals where |A| is the size of the alphabet A and w is the length of a schema expected to be a building block for a given problem. Let us restrict the problem by representing each individual as a chromosome encoded as a binary string with the length n. We need ∼ N = 2n initial chromosomes for the worst case. With a quantum register, one may use n qubits to make a superposition of N chromosomes. We regard the probability to find a chromosome on the computational basis as its (normalized) population. First we briefly overview the selection strategies in conventional QGAs. In short, a selection is an operation to enhance populations of individuals with high fitness values and to decrease those with low fitness values. In quantum computing, it is natural to utilize variants of Grover’s algorithm [12] for this purpose. In fact, a variant of the Grover search for a priori unknown number r of solutions (the Grover-BBHT search) [3] and that for finding the maximum [8,1] are the essential parts p of the QGAs developed in Refs. [49,27,50,28]. The query complexity O( N/r) for a variant of the Grover search dominates A quantum genetic algorithm with quantum crossover and mutation operations 3 the total complexity in the QGA of Udrescu et al. [49,50]. For the QGA of Malossini et al. [27,28], there is a different factor to consume time. As mentioned, this will be discussed in detail in Sect. 2. Second we overview the strategies for crossovers and mutations in conventional QGAs. In a short explanation of these terms, a crossover is an operation to exchange substrings of two chromosomes and a mutation is an operation to flip certain bits of a chromosome. These are effective operations to enlarge the search space. So far, quantum crossover operations have not been developed. Malossini et al. [27,28] used classical crossover and mutation operations; Udrescu et al. [49,50] did not use crossover and mutation operations. Johannsen et al. [20] introduced quantum mutation operations in an application of quantum amplitude amplification [4] to some optimization problems; nevertheless, crossovers were not used. It is, in fact, in general difficult to manipulate populations of quantum states for handling crossovers if we imitate the classical way in a straightforward manner (See also Ref. [10] which explained the difficulty in a slightly different manner). Picking-up two particular individuals and making a crossover costs O(n) quantum gates if we use O(n) ancillary qubits. Since there are many possible pairs for a crossover at each generation, there is no speedup over a classical crossover. More specifically speaking, this approach needs to look up classical data of chromosomes to specify a pair of chromosomes. Thus there cannot be any speedup. In addition, this requires an exponentially large classical memory in comparison to the size of a quantum register. We will show a different approach to handle crossovers in our algorithm in Sect. 3. As another direction for developing quantum evolutionary computing, which we do not pursue in this contribution, one may use so-called quantum fixedpoint search algorithms [14,48]. They increase the population of a superposition of target chromosomes by iterative applications of unitary amplitudeamplification operations. Unlike the original Grover search, there is no drawback in an excessive iteration; the probability of finding a target grows monotonically as 1 − ǫ2t+1 where ǫ is the probability of finding a non-target chromosome and t is the number of queries. The query complexity of this approach is, however, as large as that of the exhaustive search: When the number r of targets is very small in comparison to N , we have ǫ2t+1 = (1 − r/N )2t+1 ≃ 1 − (2t + 1)r/N , which implies that O(N/r) queries are required to achieve a sufficiently small error probability, say 1/2. Thus for r ≪ N , Grover’s algorithm should be chosen instead of fixed-point quantum search algorithms. In addition, the asymptotic optimality of ǫ2t+1 as an error reduction speed was proved [5] for fixed-point quantum search methods. It is also known that the query complexity of the Grover search is optimal [3] in general as a unitary process for unsorted search. Therefore, it is unlikely1 that a fixed-point 1 There is another drawback in the use of a quantum fixed-point search. It requires es = 1 − (1 − eiπ/3 ) P |ςl ihςl | and U et = 1 − (1 − eiπ/3 )|τm ihτm | phase shift operations U l with source states |ςl i and target states |τm i (l and m are labels) in addition to another appropriate unitary operation [14]. One may alternatively use Ûs = 1−(1−eiπ/3 )|SihS| and Ût = 1 − (1 − eiπ/3 )|T ihT | where |Si is an equally-weighted superposition of |ςl i and |T i is 4 Akira SaiToh et al. quantum search is effectively used in an evolutionary computing instead of the standard Grover search and its variants. In this contribution, we propose a quantum genetic algorithm that involves a quantum crossover and a quantum mutation. It uses the quantum search for finding the maximum [8,1] for the selection procedure. Although this selection strategy looks similar to those of conventional QGAs [49,27,50,28], it is different in the point that we use tailored inversion operations for the quantum search. Our algorithm achieves a quadratic speedup over its classical counterpart in the dominant factor of the run time to update each generation as an algorithm involving all possible crossovers for a chosen crossing site. This paper is organized in the following way. Section 2 discusses on the algorithm of Malossini et al. [27,28]. Section 3 describes our algorithm. The procedures of the crossover, the mutation and the selection are developed in the standard quantum circuit model. Computational complexities of the algorithm are evaluated in Sect. 4. The obtained results are discussed in Sect. 5 and summarized in Sect. 6. 2 A conventional quantum genetic algorithm Here we discuss the conventional quantum genetic algorithm proposed by Malossini et al. [27,28]. There is another conventional algorithm proposed by Udrescu et al. [49,50], which is not introduced here. The main difference is that Udrescu et al. did not employ crossovers and mutations while Malossini et al. employed them as classical operations. The problem we consider is given as follows. Problem: Suppose there are N individuals with indices 0, . . . , N − 1. There is a fitness function f : {0, . . . , N − 1} → [0, 1]. Find one of the individuals with sufficiently large fitness values. The algorithm of Malossini et al. is described in Fig. 1 (Algorithm 1). They analyzed their algorithm and claimed [27,28] that the selection procedure e log N e) internally requires a very small number of oracle calls in contrast to O(N e is the number oracle calls required by a classical selection procedure, where N of individuals in a generation. In short, their claim was that the number of the Grover iterations in step (b) (of Fig. 1) was O(1). Their complexity analysis was, however, misleading. A more accurate description of the complexity is given in the following way. There are two possible e is approximately equal to N ; (B) N e ≨ N. cases we should consider: (A) N Let us consider the case (A). We can preset the index x to represent the xth e ≃ N . Then the given fitness individual in a good approximation thanks to N function can be used as it is, without index conversion. This indicates that we an equally-weighted superposition of |τm i. (This kind of alternative operation for a quantum search was used in Ref. [47].) The problem is that ςl ’s are highly-random nonconsecutive chromosomes in the context of evolutionary computing. There is no known way to construct es or Ûs within poly(log N e ) cost in such a case, where N e is the number of ςl ’s. U A quantum genetic algorithm with quantum crossover and mutation operations 5 Algorithm 1 (Malossini et al. [27, 28]) Main Procedure: e ≤ N individuals. Start from a generation consisting of N Repeat: 1. Use the Quantum Selection Procedure to get one index. Do the same procedure to get another. 2. Classically make a crossover for the two individuals corresponding to the indices obtained in 1. Classically make a proper mutation. 3. Classically replace randomly chosen two individuals with the two offsprings obtained in 2. Quantum Selection Procedure: e possible ones in the present generation (i) Choose randomly an index y among N and compute its fitness f (y). Set the threshold Fy ←− f (y). (ii) Perform τ times: P (a) Initialize the quantum registers to √1 x |xi|yi, where x’s are the indices e N of the present generation. (b) Apply the Grover-BBHT search [3], where we internally use an oracle that inverts the signs of the marked states, namely states |xi such that f (x) ≥ Fy . This enhances the amplitudes of marked states after its Grover iteration. (c) Measure the left register in the computational basis and get the new index y ′ . If f (y ′ ) > Fy , then y ← y ′ and Fy ← f (y ′ ). (iii) Return the index y. Fig. 1 Description of Malossini et al.’s algorithm. e ≃ N, use nothing but the standard Grover-BBHT search for N indices. As N the quantum selection procedure is called only once or a very small number of times. Suppose there are r nearly-optimal individuals that are acceptable as solutions for a given problem. Inside the quantum selection procedure, as the selection goes on in (ii), the oracle used in step (b) has less marked states. The number of marked states converges to r. Therefore, the query complexity of a q p e single step in a very later selection stage is O( N /r) = O( N/r). This is the accurate description of the query complexity for the present case and it is the same as that Udrescu et al. gave for their algorithm [49,50]. On average, each time of the repetition in (ii) virtually extinguishes a half of the individuals by increasing the threshold. Thus, by considering the sum of the geometric series p i r) (i = 0, 1, 2, . . .), the average total query complexity is found to be N/(2 p O( N/r). Let us now consider the case (B). In this case, the quantum selection procedure is called several (or more) times. The important fact is that the chromosomes of individuals in a generation are not consecutive binary strings. The e binary strings out of N possible ones. There are two generation contains N options to handle them: (B-1) consecutive integers are assigned as pointers to nonconsecutive chromosomes; (B-2) nonconsecutive chromosomes are used as they are. (B-1): In this case, the index x is a pointer to the chromosome κx for which the fitness function works appropriately. (In short, this is a workaround for the fact that the original Grover-BBHT search should start from a uniform superposition of consecutive indices while the generation consists of noncon- 6 Akira SaiToh et al. secutive chromosomes.) Therefore, for the superposition |ψ0 i = √1 e N P x |xi|yi, the fitness function cannot be applied directly. We need a conversion circuit to interpret x as κx . Then the fitness function is applied and it returns f (κx ). Each conversion should involve O(log N ) CCNOT gates. Thus, the total circuit e log N ). As a result, a single oracle call depth for the index conversions is O(N e log N ). Indeed, the query accompanies the additional time complexity O(N e is much smaller than N . However, the cost of index complexity is small if N conversions hinders speedup over a classical selection procedure. P (B-2): In this case, the state |xi in the superposition |ψ0 i = √1 x |xi|yi e N keeps the actual chromosome x as an index. One should use the Grover-search routine somehow without index conversions by choosing |ψ0 i as its initial state. Indeed, this is possible [4] in the case where one can provide the operation L = I − 2|ψ0 ihψ0 | as the inversion-about-average operation instead of the standard one for the original Grover search. Nevertheless, L should be gen† erated by sandwiching I − 2|0ih0| with U(a) and U(a) in the present context, where the unitary operation U(a) corresponds to the initialization step (a). e log N ) (see, e.g., Ref. [51]). (There is Thus the circuit complexity of L is O(N a little confusing result by Soklakov and Schack [42]; they showed that a state preparation, namely an initialization, is possibly performed within polynomial cost in log N for some cases. Nevertheless, considering the internal cost of the e poly(log N )) time for general special oracle they use, their method spends O(N cases including the present case where the parent set consists of random indices.) As a consequence, an expensive circuit for L should be used subsequent to every query. Obviously, the time complexity in this case is as large as the one in case (B-1). One may also think of replacing the Grover-search routine with the generalized Grover search for nonconsecutive integer sets [13]. Nevertheless, it is required to find an appropriate unitary transformation replacing the standard Hadamard transformation H ⊗ · · · ⊗ H. There is no known way to find it efficiently when a random integer set is given and target integers are unknown in advance. There is, in fact, a way to reduce the circuit complexity of L introduced in (B-2) if the algorithm is modified so that it uses an efficient pseudo-randomizer (or, pseudo-scrambler) circuit instead of directly using a random number generator. Our algorithm introduced in the next section takes this approach. In addition to the above discussions, we should mention that Algorithm 1 e log N ) space to keep a generation in a has another problem: it takes O(N classical memory. This is usually quite larger than the O(log N ) space that is enough for quantum search (neglecting the space internally used by an oracle circuit). Our algorithm is designed not to face this problem. A quantum genetic algorithm with quantum crossover and mutation operations 7 3 Algorithm with quantum crossover and quantum mutation As we have seen in the previous sections, conventional quantum genetic algorithms were not designed to achieve quantum speedup in their selection procedures in case a generation consists of nonconsecutive chromosomes. In addition, a quantum crossover operation has not been developed so far. Here, we propose an algorithm using a quantum crossover and a quantum mutation. We use a variant of the Grover search with tailored subroutines for the selection procedure, whose query complexity is the main factor of the total time complexity. We achieve a quadratic speedup over a classical counterpart in a dominant factor of time complexity as a genetic algorithm with crossovers among all parents. It is novel in the sense that a simultaneous crossover using a superposition is achieved. The speedup partly relies on an efficient internal structure of a pseudo-randomizer circuit, which will be explained in Appendix A. 3.1 Algorithm flow We introduce our algorithm in Fig. 2 (Algorithm 2). In this algorithm, the quantum register is accessible from its subroutines as a kind of global variables. The procedures called inside the algorithm are described in corresponding subsections 3.2-3.5. 3.2 Preparing the initial state of a quantum register In this subsection, we define the procedure init_reg(R, z). This procedure is intended to prepare a superposition corresponding to the generation given as a set X = {R(q)}q ∪{z} with q = 00 · · · 0c−2 1c−1 , . . . , 10 · · · 1c−1 ⊗n e = 2c ). The procedure starts with the quantum state |0i⊗c (thus ♯X = N . a |0i P 1 √ The desired superposition is |ϕi = x∈X |ax ia |xi with ax the address e N pointing x. We opt to use consecutive addresses 0, . . . , 2c − 1. The procedure is now defined in Fig. 3. The order of time complexity of this procedure equals to the internal circuit complexity poly(cn) of the pseudo-randomizer R. An explicit example to construct R as a quantum circuit is given in Appendix A. 3.3 Crossover Here, we construct a quantum crossover procedure quantum_crossover(l). It is a 1-point crossover acting on the chromosomes simultaneously. Recall that the original generation is given as a set X of n-bit integers x e . Each x has its left side xleft and its right side xright separated with ♯X = N by the crossing site. The crossing site is placed between the (l − 1)th and the lth qubits as specified by the parameter. Hence, the bit length of xleft is l. 8 Akira SaiToh et al. Algorithm 2 Consider a threshold fth for fitness values, which is considered to be sufficiently large. t ←− 0. REPEAT 1.-9.: 1. Construct a pseudo-randomizer R that maps a c-bit string to a pseudo-random n-bit string. It should be implemented as a circuit whose input and output are integer couples (a, 0) and (a, R(a)), respectively, where a is a c-bit integer. The circuit should consist of poly(cn) elementary reversible logic gates. We require R to regard 00 · · · 0c−1 as an exception and map it to 00 · · · 0n−1 . We also require e = 2c ≨ N = 2n . Once constructed, R is fixed until next t. An explicit example N to construct R is given in Appendix A. 2. IF t = 0 THEN generate a random c-bit string γ and set z ←− R(γ) (otherwise, z is the best chromosome found in the (t − 1)th trial) ENDIF 3. Generate a random c-bit string γ ′ and set u ←− R(γ ′ ). 4. CALL init_reg(R, z) defined in Sect. 3.2 twice to make two identical quantum P states that are both |ϕi = √1 x∈X |ax ia |xi where ax is the address pointing e N 5. 6. 7. 8. 9. to x ∈ X; X = {R(q)}q ∪{z} with q = 00 · · · 0c−2 1c−1 , . . . , 10 · · · 1c−1 ; subscript “a” stands for the address portion. We write the entire unitary operation of this procedure as Uinit . That is, |ϕi⊗2 = Uinit (|0ia |0i)⊗2 . CALL quantum_crossover(l) defined in Sect. 3.3 for the current quantum register, which is a 1-point crossover with the crossing site, chosen at one’s convenience, placed between the (l − 1)th and the lth bits of a chromosome. All possible crossovers for this crossing site are performed simultaneously. This procedure is an identity map as a quantum operation acting on |ϕi⊗2 . Apply the quantum mutation (Sect. 3.4) to the current quantum register. We write the entire unitary operation of this procedure as Umut . Apply the same mutation classically to u. CALL quantum_selection(Uinit , Umut , u) defined in Sect. 3.5 for the current quantum register and obtain the output chromosome z. IF f (z) ≥ fth THEN RETURN z and EXIT ENDIF t ←− t + 1. Refresh the quantum register. Fig. 2 Description of our algorithm. PROCEDURE init_reg(R, z): P2c −1 ⊗c ⊗ I ⊗n to (i) Make a superposition √1♯X j=0 |jia |0 · · · 0i by applying H ⊗n . |0i⊗c a |0i (ii) Apply the pseudo-randomizer R implemented as a unitary operation mapping |jia |0i to |jia |xj i with xj an n-bit pseudo-random number for j = 1, . . . , 2c − 1. By assumption, |0ia |0i is mapped to |0ia |0i. (iii) Apply a 00 · · · 0c−1 -controlled X z0 ⊗· · ·⊗X zn−1 to map |0ia |0i to |0ia |zi, where zk is the kth bit of z (k = 0, . . . , n − 1). (iv) RETURN the current state, namely |ϕi. Fig. 3 Description of procedure init reg(R, z). With the procedure, we generate a superposition of all the children that are combinations of xleft ’s and xright ’s together with their parents with the same weight as children. The state of the quantum register in the beginning of this procedure is ⊗2 |ϕi = ! 1 X left right √ |ax ia |x i|x i ⊗ ♯X x∈X ! 1 X ′ left ′ right √ i . |ax′ ia |x i|x ♯X x′ ∈X A quantum genetic algorithm with quantum crossover and mutation operations 9 This state has the components |xleft i|xright i|x′ left i|x′ right i besides the addresses. left We relabel the qubits so that the middle portion |xright i|x′ i is put aside from our minds. Let us conceal them by denoting as |∗xx′ i. In addition, we denote right the main portion |xleft x′ i with the subscript “main”. The state |ϕi⊗2 with the new qubit labels is written as 1 X X right imain |∗xx′ i. |ax ax′ ia |xleft x′ ♯X ′ x∈X x ∈X We have at most (♯X)2 distinct chromosomes in this state. In this way, all possible crossovers are performed at once by the relabelling. The resultant state is a superposition of all of the children together with their parents. (The parents are involved because the values of x and x′ may coincide.) This is desirable as a crossover because sometimes some parents have higher fitness values than any child. The procedure described above is formally written as shown in Fig. 4. PROCEDURE quantum_crossover(l): (i) We have the quantum register in the state |ϕi⊗2 . The original labels of its qubits are 0, . . . , 2c + 2n − 1. We relabel them as 0, . . . , c − 1, 2c, . . . , 2c + l − 1, {z } | {z } | c 2c + n, . . . , 2c + 2n − l − 1, | {z } n−l 2c + l, . . . , 2c + n − 1. | {z } c, . . . , 2c − 1, | {z } c l 2c + 2n − l, . . . , 2c + 2n − 1, {z } | l n−l (ii) RETURN Fig. 4 Description of procedure quantum crossover(l). As is obvious, this procedure is an identity map as a quantum operation. Once the crossover process is completed, one may use a mutation as an option. This is going to be explained in the next subsection. 3.4 Mutation In classical genetic algorithms, randomly selected chromosomes are affected by a mutation, which is typically certain bit flips acting on randomly-chosen places. Here, we consider the mutation procedure described in Fig. 5. Although it is written as a classical routine, it can be trivially interpreted as a quantum circuit. As a quantum circuit, this mutation procedure tmp_mut is realized by a multiple-bit controlled multiple-bit NOT gate. (In the example mentioned in Fig. 5, the gate is “0-controlled 1-controlled 1-controlled 0-controlled 1-controlled NOT NOT” with control bits specified by the first template and the target bits specified by the second template.) The gate 10 Akira SaiToh et al. PROCEDURE tmp_mut: (i) Let us randomly generate the first template like ***0*1***1**0****1*, which specifies a schema to mutate. Using this template, we pick up chromosomes with specified bits like 0,1,1,0,1 in the specified places. (ii) We also use the second template like *X*************X*** in which X’s can be placed only on the places where *’s (namely, “don’t care” symbols) are placed in the first template. Using this template, we apply the bit flip X to the specified places of the chromosomes picked up in (i). (iii) RETURN Note: Technically, we often wish to avoid a mutation for the best chromosome z found so far by the present time step. This is realized by choosing the first template so that this does not happen. Fig. 5 Description of procedure tmp mut. right acts on the portion |xleft x′ imain ; the addresses ax and ax′ are untouched. Therefore, the resultant state can be written as |ϕi e = right 1 X X xleft xe′ imain |∗xx′ i, |ax ax′ ia |e ♯X ′ (1) x∈X x ∈X right where (e xleft xe′ )’s are the chromosomes after the mutation process. The next step is to apply a natural selection to the chromosomes living in the superposition |ϕi. e 3.5 Selection In this subsection, we introduce our selection procedure. It is intended to find right a chromosome having the maximum fitness among (e xleft xe′ )’s. It utilizes the quantum search for finding the maximum [8,1]. As we have mentioned, conventional QGAs [49,27,50,28] have similar selection strategies. The difference from them is that we use tailored inversion operations for the quantum search. Our selection procedure is called with three arguments: Uinit , Umut and u. We have the state (1) at the beginning of this procedure. The procedure is now defined in Fig. 6. Here in the text, we do not repeat its description. It should be e + (28/5)(log2 N e )2 ⌉ noted that, in the procedure, we set kterm = η × ⌈(45/2)N with integer constant η ≥ 1. Let us give an explanation about kterm , namely, the number of iterations. The defined procedure is the same as the well-known quantum search algorithm for finding the maximum [8,1] except for the definitions of the inversion operation for targets and the inversion-about-average operation. In other words, we perform the quantum search for finding the maximum in the subright xleft xe′ imain |∗xx′ i}. As proved by Dürr and Høyer [8], space span{|ax ax′ ia |e the probability for the output to be the maximum is at least 1/2 if the number √ of iterations is ⌈(45/2) M + (7/5)(log2 M )2 ⌉ with M the number of indices. e 2 since there are N e 2 distinct addresses. In the present context, we have M = N A quantum genetic algorithm with quantum crossover and mutation operations 11 PROCEDURE quantum_selection(Uinit , Umut , u): FOR k ←− 0 TO kterm − 1: (i) Set X U1 = I ⊗ I ⊗ I − 2 I ⊗ |yihy| ⊗ I f (y)≥f (u) where the left and the right I’s act on the address states |ax ax′ i and the states |∗xx′ i, respectively. This is the oracle function that can be implemented as follows. First, we attach ancillary qubits as blocks (I) and (II) in the state √ right xleft xe′ ) is set |0 · · · 0i(I) |−i(II) with |−i = (|0i − |1i)/ 2. For each xx′ , f (e as a value of the block (I) by using f implemented as a quantum circuit. Let us write this operation as Uf . Then we compare the block (I) with f (u); we right flip the qubit (II) if f (e xleft xe′ ) ≥ f (u). We apply Uf † (this disentangles the ancillary qubits from the main register) and remove the ancillary qubits. (ii) Set U2 = I ⊗ I ⊗ I − 2|ϕih e ϕ|. e This operation is composed in the following way. † † , Umut U2 = Umut Uinit [I − 2(|0i⊗c |0i⊗n h0|⊗c h0|⊗n )⊗2 ]Uinit where we also relabel qubits according to quantum_crossover(l). (iii) Apply the Grover-BBHT search [3] for which we use U1 and U2 instead of the standard operations, namely, the inversion operation for targets and the inversion-about-average operation, respectively. As for the starting state of the search, we use |ϕi. e (iv) Measure the main register and obtain the chromosome u′ . IF f (u′ ) > f (u) THEN u ←− u′ ENDIF END FOR RETURN u. Fig. 6 Description of procedure quantum selection(Uinit , Umut , u). Therefore, after kterm iterations, we find the output chromosome having the right maximum fitness among (e xleft xe′ )’s, with the probability at least 1−(1/2)η . By setting η sufficiently large, say, around 16 to 24, we have the desired output with almost certainty. 4 Computational cost We are going to evaluate the computational cost of each process of Algorithm 2 (Fig. 2) in Sect. 4.1. The total computational cost to handle a generation will be derived in Sect. 4.2 and compared with that of classical counterpart in Sect. 4.3. 4.1 Costs of each procedure For a single call of each procedure, the costs are evaluated as follows. Cost of the initialization The procedure to prepare the initial state, described e log N ) elementary quantum gates. in Sect. 3.2, uses poly(cn) = poly(log N 12 Akira SaiToh et al. Cost of the crossover The crossover described in Sect. 3.3 makes use of two identical (c + n)-qubit states. This procedure does not use any quantum operation but relabels qubits. This takes O(log N ) time. Cost of the mutation The mutation described in Sect. 3.4 involves a single gate that looks like, say, ∗ − NOT − ∗ − C0 − ∗ − C1 − ∗ − ∗ − ∗ − C1 − ∗ − ∗ −C0 − ∗ − ∗ − NOT − ∗ − C1 − ∗ with multiple control bits (0-control C0 ’s and 1-control C1 ’s) and multiple NOT gates placed according to the corresponding templates, where symbol ∗ stands for an untouched qubit. Such a gate can be realized by O(log N ) elementary quantum gates with O(log N ) ancillary qubits. e) Cost of the selection The selection described in Sect. 3.5 consumes O(N 2 e chromosomes. queries to find the best chromosome in the set of at most N Each query accompanies the operation U2 that invokes Uinit and Umut , and also their inverse operations. It is easy to find that the internal cost of U2 is poly(cn) according to the costs for Uinit and Umut . In addition, the cost to prepare the starting state is poly(cn). We may also mention that, the internal cost of the fitness function is a certain small factor, typically poly(n), as conventionally assumed [11]. Therefore, the circuit complexity of the procedure e poly(log N e log N )). (We assume that the circuit depth is on the order is O(N of the circuit size, namely, the number of elementary quantum gates.) As for space, we use poly(log N ) qubits in total, considering a typical fitness function consuming poly(n) space. When the fitness function is designed to use O(n) space, O(log N ) qubits are enough, although we do not assume this case for evaluating the space complexity. 4.2 Total cost Comparing the costs of the four procedures, the dominant cost is the circuit complexity for the selection procedure. Therefore, we find that our algorithm uses e poly(log N e log N )) O(N (2) elementary quantum gates for each t. This is the time complexity of our algorithm for handling each generation. It is quadratically faster than classically expected amount considering the fact that the number of combinations is e 2 ) in our crossover procedure (see the next subsection for the details). As O(N for the space complexity, we spend poly(log N ) qubits and O(log N ) classical bits as is easily evaluated from the description of Algorithm 2 (Fig. 2). A quantum genetic algorithm with quantum crossover and mutation operations 13 4.3 Comparison with a classical counterpart The classical counterpart of our algorithm is the one described in Fig. 7 (Algorithm 3). As is obvious from its structure, it should have the same output and the same number of iterations as our algorithm with almost certainty as long as the same random seed is used for step 1 to construct R for each value of t. The computational costs of individual procedures in Algorithm 3 are as Algorithm 3 Consider a threshold fth for fitness values, which is considered to be sufficiently large. t ←− 0. REPEAT 1.-7.: 1. Construct the pseudo-randomizer R found in Algorithm 2 (Fig. 2) as a classical function. Fix R until next t. Using R, we generate a generation X = {R(q)} e = 2c ≨ N = 2n . with q = 00 · · · 0c−2 1c−1 , . . . , 10 · · · 1c−1 . We require N e − 1 n-bit-length chromosomes in X presently.) (Thus, we have N 2. IF t 6= 0 THEN put z into X (z is the best chromosome found in the (t − 1)th trial) ELSE generate a random c-bit string γ and put R(γ) into X ENDIF e chromosomes in X.) (Now we have N 3. Split all x ∈ X between the (l − 1)th bit and the lth bit. This makes l-bit strings xleft ’s and (n − l)-bit strings xright ’s. Generate the set X̂ consisting of all x’s and all of their children that are all the combinations of xleft ’s and xright ’s. 4. Apply the template-based mutation tmp_mut, introduced in Sect. 3.4, as a classical procedure to all chromosomes in X̂. 5. Find the chromosome z having the best fitness value among those in X̂. 6. IF f (z) ≥ fth THEN RETURN z and EXIT ENDIF 7. t ←− t + 1. Fig. 7 Description of a classical counterpart of our algorithm. follows. e poly(cn)) basic operations. – Generating X in the steps 1.-2. takes O(N 2 2 e e – We need to use O(nN ) space and O(nN ) basic operations to perform all e parents. the crossovers among N e 2 ) basic operations. – Mutations acting on the individuals of X̂ take O(nN e 2 poly(n)) basic – The selection to find the best individual from X̂ takes O(N operations considering the cost poly(n) of calculating a fitness value. e , the time and space complexities are O(N e 2 poly(log N )) As n = log2 N and c = log2 N 2 e log N ), respectively, for each t, i.e., for handling each generation. and O(N In contrast, as we have seen in Sect. 4.2, the time and space complexities of e poly(log N e log N )) our quantum genetic algorithm (described in Fig. 2) are O(N and poly(log N ), respectively, for each t. Therefore, neglecting the difference e log N ) and poly(log N ), we have achieved a quadratic between poly(log N speedup over its classical counterpart together with an exponential reduction in space. The classical counterpart has been constructed by keeping the one-byone correspondence with the quantum algorithm. Thus there is a possibility 14 Akira SaiToh et al. that a better classical algorithm with the same behavior exists. This is in fact the case for Algorithm 3. For a fairer comparison, now we reform Algorithm 3 and reduce its space complexity. The algorithm described in Fig. 8 (Algorithm 4) has the same output and the same number of repetitions as Algorithm 3 while its space complexity is exponentially reduced. We use the same pseudo-randomizer construction and the same mutation procedure as e = 2c and N = 2n for integers c and n satisfying before. Of course, we set N e 2 ) times for each value of t. We 1 ≤ c < n. In this algorithm, R is called O(N Algorithm 4 Consider a threshold fth for fitness values, which is considered to be sufficiently large. t ←− 0. REPEAT 1.-8.: 1. Construct the pseudo-randomizer R : {0, 1}c → {0, 1}n as a classical operation. 2. Construct the mutation process as a map M as a classical operation. e − 1}, z ←− R(γ) (otherwise, z is 3. IF t = 0 THEN for a random γ ∈ {1, . . . , N the best chromosome found in the (t − 1)th step) ENDIF e − 1}, j ←− R(γ ′ ). 4. For a random γ ′ ∈ {1, . . . , N e 5. FOR a ←− 0 TO N − 1: IF a = 0 THEN x ←− z ELSE x ←− R(a) ENDIF e − 1: FOR b ←− 0 TO N IF b = 0 THEN y ←− z ELSE y ←− R(b) ENDIF Crossover x and y and obtain children v and w. Find the best chromosome g among the chromosomes M (x), M (y), M (v) and M (w). IF f (g) > f (j) THEN j ←− g ENDIF END FOR END FOR 6. z ←− j. 7. IF f (z) ≥ fth THEN RETURN z and EXIT ENDIF 8. t ←− t + 1. Fig. 8 Description of an improved classical counterpart of our algorithm. know that R internally takes poly(cn) time. Therefore, this algorithm spends e 2 poly(log N e log N )) time for handling each generation. As for the space O(N complexity, it spends only poly(log N ) space, which is clear from the algorithm structure. In comparison to this enhanced classical algorithm, our quantum algorithm still has a quadratically small time complexity as shown in Eq. (2). 5 Discussion How to perform crossovers in a quantum manner was a pending problem in conventional quantum genetic algorithms [49,27,50,28]. In fact, a selective crossover for specific two chromosomes is expensive when they are component states of a superposition. Even if we attach address states pointing to the component states, we need to look up the classical data of the chromosomes to construct a quantum circuit realizing the unitary operation for this purpose, A quantum genetic algorithm with quantum crossover and mutation operations 15 or more specifically, for placing address-controlled bit-flip gates appropriately. In our algorithm (Algorithm 2 shown in Fig. 2), we have avoided to mimic a classical way and chosen a different approach. We use two identical copies of a superposition corresponding to a generation and utilize relabelling of qubits so as to handle all possible combinations of substrings simultaneously. Obviously, the classical counterpart of our algorithm is the one that seeks for the best chromosome (after a mutation) among all possible crossovers for a chosen crossing site for each generation. Comparing our algorithm with the classical counterpart, we concluded that we have achieved a considerable reduction in the computational cost. One may, however, claim that usually at most several crossovers are performed for a single generation in a classical genetic algorithm. Indeed, our algorithm is not aimed to be a quantum counterpart of a common classical genetic algorithm. As we discussed in Sect. 2, a straightforward conversion of a common classical algorithm into quantum one by simply incorporating a quantum search into the selection procedure has a problem: we need to either interpret nonconsecutive integers to consecutive ones or use an expensive construction for the inversion-about-average operation in order to perform the Grover-BBHT search, which causes a significant loss of performance. This problem should be resolved so as to find a meaningful quantum counterpart for the common case. Seemingly, the following workaround looks fine: (i) Use the pseudo-randomizer R used in Algorithm 2 instead of a random number generator to generate initial chromosomes of a generation. (ii) Apply a small number of crossovers. (iii) Use a selection procedure similar to that of Algorithm 2. Nevertheless, as we have discussed, it is not known how to construct the procedure (ii) as a unitary operation without the expensive process of looking up classical data of chromosomes. Therefore, it is the fact that a meaningful quantum counterpart is not easily found for a common classical genetic algorithm. In view of the search space covered by each generation, a simultaneous crossover is, of course, desirable. Use of a superposition for this purpose was discussed [49,50] but not developed previously. In this sense, we have made a meaningful improvement by introducing Algorithm 2. Besides the crossover, let us discuss on the selection procedure. Our algorithm uses a variant of the Grover-BBHT search to achieve a quadratic speedup over its classical counterpart. The internal cost for each query is kept polynomial in the length of a chromosome because of the polynomial cost of our pseudo-randomizer, as described in Sect. 4. Apart from the complexity, there is some room to find a different design for the selection. Our algorithm is designed to carry over only the best chromosome z to the next generation, among the chromosomes existing after the quantum crossover and mutation procedures. Since projective measurements are used in the quantum selection, it is inevitable to demolish other chromosomes. This can be a drawback because some of them may possess good fitness values albeit not the best. To mitigate this severe selection, one may keep the values of z obtained in several elder generations as classical data. These values can be put into a later 16 Akira SaiToh et al. generation by modifying the register-initialization procedure slightly: one can modify the pseudo-randomizer so that it does not touch several input strings; then one can map them to the kept values of z. In this way, one may maintain a better diversity for high-fitness chromosomes. This is one possible extension of our algorithm. There have not been many studies on quantum genetic algorithms so far. It is hoped that several or more different designs of genetic procedures will be developed for quantum computers. 6 Summary We have proposed a genetic algorithm whose crossover, mutation and selection procedures have been all constructed as quantum routines so that quantum parallelism is effectively used. Its crossover procedure performs crossovers among all chromosomes of a generation. The run time of our algorithm to update each generation is quadratically faster than that of its classical counterpart, apart from negligible factors. Acknowledgements A.S. is thankful to Shigeru Yamashita for his comment. A.S. and M.N. were supported by the “Open Research Center” Project for Private Universities: matching fund subsidy from MEXT. R.R. is supported by Industry Canada and CIFAR. A An example of constructing the pseudo-randomizer R In this appendix, we show an example to construct the pseudo-randomizer R used in Algorithms 2, 3 and 4. It should map a c-bit string to a pseudo-random n-bit string except for 00 · · · 0c−1 that is mapped to 00 · · · 0n−1 . Its internal circuit complexity should be poly(cn). As we use a quantum circuit to realize it in Algorithm 2, it is desirable to employ a circuit structure that is originally unitary. Consider inputs a ∈ {0, 1}c . We design a circuit that maps a0 · · · ac−1 00 · · · 0n−1 to a0 · · · ac−1 κ0 · · · κn−1 with κ = R(a), an n-bit pseudo-random number (here, a0 · · · ac−1 and κ0 · · · κn−1 are the binary representations of a and κ). By the definition of R, the circuit preserves 00 · · · 0c−1 00 · · · 0n−1 . This circuit is generated by function gen_r_circ() described in Fig. 9. As is clear from the description, the circuit output from this function FUNCTION gen_r_circ(): Comment: We use wires v0 , . . . , vc−1 , w0 , . . . , wn−1 . FOR i ←− 0 TO c − 1: (1) Use a random number generator to generate an n-bit integer γ. Write its binary representation as γ0 · · · γn−1 . (2) Using the wire vi as the control wire (namely, the control bit), output the gate controlled-(X0 )γ0 ⊗· · ·⊗(Xn−1 )γn−1 with Xk the bit flip gate acting on the wire wk (k = 0, . . . , n − 1). In this gate, the bit flips are active under the condition that vi = 1. END FOR Fig. 9 Description of function gen r circ(). can be directly used as a quantum circuit. Using the circuit C = gen_r_circ(), we have A quantum genetic algorithm with quantum crossover and mutation operations 17 C |ai|0i 7→ |ai|R(a)i ∀a ∈ {0, 1}c . The circuit complexity of C is O(cn) because, for each i, at most n CNOT gates are used to decompose the gate output from step (2). In addition, gen_r_circ() spends O(c poly(n)) time when a common random number generator [21, 31] is used in step (1). Note that the function gen_r_circ() is called only once for each t, in the beginning of step 1 in Algorithms 2, 3 and 4. We have only to reuse the circuit C for the use of the pseudo-randomizer until t is incremented. It is expected that outputs from the circuit C possess good uniformity if we use a good random number generator in step (1) of gen_r_circ() for generating C. Let us write γ as γ(i) to emphasize its dependence on i. For a nonzero input a0 · · · ac−1 , the kth bit of the Pc−1 output R(a) is i=0 ai · γk (i) mod 2. This indicates that, for two different inputs a and a′ , the kth bits of R(a) and R(a′ ) differ with probability 1/2 in the ideal case where γ(i)’s are generated from a true random number generator. This is because a and a′ differ by at least a single bit. It also indicates that two different bits, the kth and the k ′ th bits, of R(a) for a nonzero input a differ with the probability 1/2 in the ideal case. This is because γk (i) and γk′ (i) differ with the probability 1/2. Now we show the result of our numerical test of C. We tried statistical tests of randomness [21, 39] to test pseudo-random numbers output from C, using NIST’s Statistical Test Suite (STS) (version 2.1.1) [39]. We set c = 10 and n = 32. Mersenne Twister (MT) (version mt19937ar) [31] was used to generate γ in step (1) of gen_r_circ(). We used the seed value 121212 and did not reset MT during the circuit generation. The circuit C output from gen_r_circ(), of course, consisted of 10 outputs from step (2). For this C, we used the inputs a ∈ {0, 1}c \{00 · · · 0c−1 } from smaller to larger and obtained corresponding outputs R(a) by numerical computation. We obtained 1023 × 32 bits in total in the outputs, since 210 − 1 = 1023. We regarded them as a serial bit string from left to right and used STS in its default setting to test the string. In the execution of STS, we used 25 binary sequences with length 1200 as samples from the string. The following tests were tried with the default parameter values in STS: the Frequency Test, the Block Frequency Test, the Cumulative Sums Test, the Runs Test, the Longest-Run-of-Ones Test, the Binary Matrix Rank Test, the Spectral DFT Test and the Serial Test. The string passed the tests except for the Binary Matrix Rank Test. It should be noted that the input length was too small for the binary matrix rank test [39]. In addition, randomness is not very strictly required for the use in evolutionary computing. Therefore, considering the tests that the string passed, we may claim that gen_r_circ() generates a usable pseudo-randomizer circuit for our algorithm. We conducted another test: We generated ten circuits by calling gen_r_circ() ten times without resetting MT, using the seed value 676767. For each circuit, we performed the same process as above to obtain the serial bit string. We obtained ten serial bit strings in total and tested the concatenated string using STS. As samples input to STS, we used 25 binary sequences with length 12000. The concatenated string passed the tests except for the Binary Matrix Rank Test and the Spectral DFT Test. It was unexpected that it did not pass the spectral DFT test. It requires a further investigation to reveal the reason of this phenomenon. The results of the first and the second tests are summarized in Table 1. In summary for this appendix, we found that a pseudo-randomizer circuit whose outputs possess enough randomness for the use in evolutionary computing can be generated by the function gen_r_circ(). It is hoped that the function will be improved so as to achieve better randomness for the sake of general use. References 1. Ahuja, A., Kapoor, S.: A quantum algorithm for finding the maximum (1999). arXiv:quant-ph/9911082 2. Barnum, H., Bernstein, H.J., Spector, L.: A quantum circuit for OR (1999). arXiv:quantph/9907056 3. Boyer, M., Brassard, G., Høyer, P., Tapp, A.: Tight bounds on quantum searching. Fortschr. Phys. 46, 493–505 (1998) 18 Akira SaiToh et al. Table 1 List of test results for the first and the second tests we performed (see the text for the details of the tests). Each value is a P -value (see Ref. [39] for its meaning for each test). The asterisk ∗ indicates a failure to pass the test. We should mention that the values for the Longest-Run-of-Ones Test accidentally coincided, while the internally-used results for sample sequences were different. Frequency Test Block Frequency Test Cumulative Sums Test (Forward) Cumulative Sums Test (Reverse) Runs Test Longest-Run-of-Ones Test Binary Matrix Rank Test Spectral DFT Test Serial Test 1st Test 0.021262 0.105618 0.105618 0.001691 0.141256 0.875539 0.000000 ∗ 0.000533 0.041438 2nd Test 0.186566 0.001156 0.029796 0.057146 0.010606 0.875539 0.000000 ∗ 0.000000 ∗ 0.186566 4. Brassard, G., Høyer, P., Tapp, A.: Quantum counting. In: K.G. Larsen, S. Skyum, G. Winskel (eds.) Proceedings of Automata, Languages and Programming, 25th International Colloquium (ICALP’98) (LNCS 1443), pp. 820–831. Aalborg, Denmark, 13-17 July 1998, Springer-Verlag, Berlin (1998). arXiv:quant-ph/9805082 5. Chakraborty, S., Radhakrishnan, J., Raghunathan, N.: Bounds for error reduction with few quantum queries. In: C. Chekuri, K. Jansen, J. Rolim, L. Trevisan (eds.) Proceedings of the 9th International Workshop on Randomization and Computation (RANDOM 2005) (LNCS 3624), pp. 245–256. Berkeley, CA, 22-24 August 2005, Springer-Verlag, Berlin (2005) 6. Chen, M., Quan, H.: Quantum-inspired evolutionary algorithm based on estimation of distribution. In: Proceedings of the 2nd International Conference on Bio-Inspired Computing: Theories and Applications (BIC-TA 2007), pp. 17–19. Zhengzhou, China, 14-17 September 2007, IEEE Press, Piscataway, NJ (2007) 7. Ding, S., Jin, Z., Yang, Q.: Evolving quantum oracles with hybrid quantum-inspired evolutionary algorithm (2006). arXiv:quant-ph/0610105 8. Dürr, C., Høyer, P.: A quantum algorithm for finding the minimum (1996). arXiv:quantph/9607014 9. Gepp, A., Stocks, P.: A review of procedures to evolve quantum algorithms (2007). arXiv:0708.3278 10. Giraldi, G.A., Portugal, R., Thess, R.N.: Genetic algorithms and quantum computation (2004). arXiv:cs/0403003 11. Goldberg, D.E.: Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley, Reading, MA (1989) 12. Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Proceedings of the 28th Annual ACM Symposium on Theory of Computing (STOC 1996), pp. 212– 219. Philadelphia, PA, 22-24 May 1996, ACM Press, New York, NY (1996) 13. Grover, L.K.: Quantum search on structured problems (1998). arXiv:quant-ph/9802035 14. Grover, L.K.: Fixed-point quantum search. Phys. Rev. Lett. 95, 150501–1–4 (2005) 15. Gruska, J.: Quantum Computing. McGraw-Hill, London (1999) 16. Han, K.H., Kim, J.H.: Genetic quantum algorithm and its application to combinatorial optimization problem. In: Proceedings of the 2000 Congress on Evolutionary Computation (CEC2000), pp. 1354–1360. La Jolla, CA, 16-19 July 2000, IEEE Press, Piscataway, NJ (2000) 17. Han, K.H., Kim, J.H.: Quantum-inspired evolutionary algorithm for a class of combinatorial optimization. IEEE Trans. Evol. Comput. 6(6), 580–593 (2002) 18. Han, K.H., Kim, J.H.: Quantum-inspired evolutionary algorithms with a new termination criterion, hǫ gate, and two-phase scheme. IEEE Trans. Evol. Comput. 8(2), 156–169 (2004) A quantum genetic algorithm with quantum crossover and mutation operations 19 19. Holland, J.H.: Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artificial Intelligence. The University of Michigan Press, Ann Arbor, MI (1975) 20. Johannsen, D., Kuru, P.P., Lengler, J.: Can quantum search accelerate evolutionary algorithms? In: M. Pelikan, J. Branke (eds.) Proceedings of the 12th Annual Genetic and Evolutionary Computation Conference (GECCO-2010), pp. 1433–1440. Portland, OR, 7-11 July 2010, ACM, New York, NY (2010) 21. Knuth, D.E.: The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd Ed. Addison-Wesley, Reading, MA (1997). Chap. 3 22. Leier, A., Banzhaf, W.: Evolving Hogg’s quantum algorithm using linear-tree GP. In: E. Cantú-Paz, J.A. Foster, K. Deb, L.D. Davis, R. Roy, U.M. O’Reilly, H.G. Beyer, R. Standish, G. Kendall, S. Wilson, M. Harman, J. Wegener, D. Dasgupta, M.A. Potter, A.C. Schultz, K.A. Dowsland, N. Jonoska, J. Miller (eds.) Proceedings of the Genetic and Evolutionary Computation Conference 2003 (GECCO-2003), Part I (LNCS 2723), pp. 390–400. Chicago, IL, 12-16 July 2003, Springer-Verlag, Berlin (2003) 23. Leier, A., Banzhaf, W.: Comparison of selection strategies for evolutionary quantum circuit design. In: K. Deb (ed.) Proceedings of the Genetic and Evolutionary Computation Conference 2004 (GECCO-2004), Part II (LNCS 3103), pp. 557–568. Seattle, WA, 26-30 June 2004, Springer-Verlag, Berlin (2004) 24. Liao, R., Wang, X., Qin, Z.: A novel quantum-inspired genetic algorithm with expanded solution space. In: Proceedings of the 2010 Second International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC 2010), pp. 192–195. Nanjing, China, 26-28 August 2010, IEEE Computer Society, Los Alamitos, CA (2010) 25. Lukac, M., Perkowski, M.: Evolving quantum circuits using genetic algorithm. In: A. Stoica, D. Keymeulen, J. Lohn (eds.) Proceedings of the 2002 NASA/DoD Conference on Evolvable Hardware, pp. 177–181. Alexandria, VA, 15-18 July 2002, IEEE Computer Society, Los Alamitos, CA (2002) 26. Lukac, M., Perkowski, M., Goi, H., Pivtoraiko, M., Yu, C.H., Chung, K., Jee, H., Kim, B.G., Kim, Y.D.: Evolutionary approach to quantum and reversible circuits synthesis. In: S.N. Yanushkevich (ed.) Artificial Intelligence in Logic Design, pp. 201–257. Kluwer Academic Publisher, Dordrecht (2004) 27. Malossini, A., Blanzieri, E., Calarco, T.: QGA: quantum genetic algorithm (2004). Technical Report: #DIT-04-105, Dec. 2004, Univ. Trento, http://www.dit.unitn.it 28. Malossini, A., Blanzieri, E., Calarco, T.: Quantum genetic optimization. IEEE Trans. Evol. Comput. 12(2), 231–241 (2008) 29. Massey, P., Clark, J.A., Stepney, S.: Evolving quantum circuits and programs through genetic programming. In: K. Deb (ed.) Proceedings of the Genetic and Evolutionary Computation Conference 2004 (GECCO-2004), Part II (LNCS 3103), pp. 569–580. Seattle, WA, 26-30 June 2004, Springer-Verlag, Berlin (2004) 30. Massey, P., Clark, J.A., Stepney, S.: Human-competitive evolution of quantum computing artefacts by genetic programming. Evol. Comput. 14(1), 21–40 (2006) 31. Matsumoto, M., Nishimura, T.: Mersenne Twister: a 623-dimensionally equidistributed uniform pseudorandom number generator. ACM Trans. Model. Comput. Sim. 8, 3–30 (1998). Http://www.math.sci.hiroshima-u.ac.jp/˜m-mat/MT/mt.html 32. Mitchell, M.: An Introduction to Genetic Algorithms. MIT Press, Cambridge, MA (1996) 33. Mohammed, A.M., Elhefnawy, N.A., El-Sherbiny, M.M., Hadhoud, M.M.: Quantum crossover based quantum genetic algorithm for solving non-linear programming. In: Proceedings of the 8th International Conference on INFOrmatics and Systems (INFOS2012), pp. BIO–145–153. Cairo, Egypt, 14-16 May 2012, IEEE, Piscataway, NJ (2012) 34. Nakayama, S., Imabeppu, T., Ono, S.: Pair swap strategy in quantum-inspired evolutionary algorithm (2006). In the Late-breaking papers of the 2006 Genetic and Evolutionary Computation Conference (GECCO-2006), Seattle, WA, 8-12 July 2006 35. Nakayama, S., Imabeppu, T., Ono, S., Iimura, I.: Consideration on pair swap strategy in quantum-inspired evolutionary algorithm. IEICE Trans. Inf. Sys. J89-D(9), 2134–2139 (2006). In Japanese 20 Akira SaiToh et al. 36. Narayanan, A., Moore, M.: Quantum-inspired genetic algorithms. In: Proceedings of the IEEE 3rd International Conference on Evolutionary Computation (ICEC96), pp. 61–66. Nagoya, Japan, 20-22 May 1996, IEEE Press, Piscataway, NJ (1996) 37. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000) 38. Rubinstein, B.I.P.: Evolving quantum circuits using genetic programming. In: Proceedings of the 2001 Congress on Evolutionary Computation (CEC2001), pp. 144–151. Seoul, Korea, 27-30 May 2001, IEEE Press, Piscataway, NJ (2001) 39. Rukhin, A., Soto, J., Nechvatal, J., Smid, M., Barker, E., Leigh, S., Levenson, M., Vangel, M., Banks, D., Heckert, A., Dray, J., Vo, S.: A statistical test suite for random and pseudorandom number generators for cryptographic applications (2010). NIST Special Publication 800-22, Revision 1a, http://csrc.nist.gov/groups/ST/toolkit/rng/index.html 40. Rylander, B., Soule, T., Foster, J., Alves-Foss, J.: Quantum evolutionary programming. In: L. Spector, E.D. Goodman, A. Wu, W.B. Langdon, H.M. Voigt, M. Gen, S. Sen, M. Dorigo, S. Pezeshk, M.H. Garzon, E. Burke (eds.) Proceedings of the Genetic and Evolutionary Computation Conference (GECCO-2001), pp. 1005–1011. San Francisco, CA, 7-11 July 2001, Morgan Kaufmann, San Francisco (2001) 41. Sofge, D.A.: Prospective algorithms for quantum evolutionary computation. In: P.D. Bruza, W. Lawless, K. van Rijsbergen, D.A. Sofge, B. Coecke, S. Clark (eds.) Proceedings of the 2nd Quantum Interaction Symposium (QI-2008), pp. 98–105. Oxford, UK, 26-28 March 2008, College Publications, London (2008). arXiv:0804.1133 42. Soklakov, A.N., Schack, R.: Efficient state preparation for a register of quantum bits. Phys. Rev. A 73, 012307–1–13 (2006) 43. Spector, L.: Automatic Quantum Computer Programming: A Genetic Programming Approach. Springer, New York (2004, Paperback Ed. 2007) 44. Spector, L., Barnum, H., Bernstein, H.: Genetic programming for quantum computers. In: J.R. Koza (ed.) Genetic Programming 1998: Proceedings of the Third Annual Conference (GP-98), pp. 365–374. Madison, WI, 22-25 July 1998, Morgan Kaufmann, San Francisco (1998) 45. Spector, L., Barnum, H., Bernstein, H., Swamy, N.: Finding a better-than-classical quantum AND/OR algorithm using genetic programming. In: Proceedings of the 1999 Congress on Evolutionary Computation (CEC1999), pp. 2239–2246. Washington, D.C., 6-9 July 1999, IEEE Press, Piscataway, NJ (1999) 46. Spector, L., Klein, J.: Machine invention of quantum computing circuits by means of genetic programming. AI EDAM 22, 275–283 (2008) 47. Tanaka, Y., Ichikawa, T., Tada-Umezaki, M., Ota, Y., Nakahara, M.: Quantum oracles in terms of universal gate set. Int. J. Quant. Inf. 9, 1363–1381 (2011) 48. Tulsi, T., Grover, L.K., Patel, A.: A new algorithm for fixed point quantum search. Quant. Inf. Comput. 6, 483–494 (2006) 49. Udrescu, M., Prodan, L., Vlăduţiu, M.: Grover’s algorithm and the evolutionary approach of quantum computation (2004). ACSA Report, ”Politehnica” University of Timisoara, 15 Oct. 2004, http://www.acsa.upt.ro/publications/index.htm 50. Udrescu, M., Prodan, L., Vlăduţiu, M.: Implementing quantum genetic algorithms: A solution based on Grover’s algorithm. In: Proceedings of the 3rd Conference on Computing Frontiers, pp. 71–81. Ischia, Italy, 3-5 May 2006, ACM Press, New York (2006) 51. Ventura, D., Martinez, T.: Initializing the amplitude distribution of a quantum state. Found. Phys. Lett. 12, 547–559 (1999) 52. Williams, C.P., Gray, A.G.: Automated design of quantum circuits. In: C.P. Williams (ed.) Quantum Computing and Quantum Communications: First NASA International Conference (LNCS 1509), pp. 113–125. Palm Springs, CA, 17-20 February 1998, Springer-Verlag, Berlin (1999) 53. Yabuki, T., Iba, H.: Genetic algorithms for quantum circuit design–evolving a simpler teleportation circuit. In: L.D. Whitley, D.E. Goldberg, E. Cantú-Paz, L. Spector, I.C. Parmee, H.G. Beyer (eds.) Proceedings of the 2000 Genetic and Evolutionary Computation Conference (GECCO-2000), pp. 425–430. Las Vegas, NV, 8-12 July 2000, Morgan Kaufmann, San Francisco (2000) A quantum genetic algorithm with quantum crossover and mutation operations 21 54. Zhang, G.: Quantum-inspired evolutionary algorithms: a survey and empirical study. J. Heuristics 17, 303–351 (2011)
9cs.NE
Journal of Nonlinear Systems and Applications () Copyright c 2009 Watam Press http://www.watam.org/JNSA/ STATISTICS ON GRAPHS, EXPONENTIAL FORMULA AND COMBINATORIAL PHYSICS arXiv:0910.0695v2 [cs.DM] 11 Feb 2010 Laurent Poinsot, Gérard H. E. Duchamp, Silvia Goodenough and Karol A. Penson 2 Abstract. The concern of this paper is a famous combinatorial formula known under the name “exponential formula”. It occurs quite naturally in many contexts (physics, mathematics, computer Partial semigroups Let us call partial semigroup a semigroup with a partially defined associative law (see for instance [6] for usual semigroups and [1, 14, 18] for more details on structures with a partially defined binary operation). More precisely, a partial semigroup is a pair (S, ∗) where S is a set and ∗ is a (partially defined) function S × S → S such that the two (again partially defined) functions S × S × S → S science). Roughly speaking, it expresses that the exponential generating function of a whole structure is equal to the exponential of those of connected substructures. Keeping this descriptive statement as a guideline, we develop a general framework to handle many different situations in which the exponential formula can be applied. Keywords. Combinatorial physics, Exponential generating function, Partial semigroup, Experimental mathematics. 1 †‡ ∗ (x, y, z) 7→ (x ∗ y) ∗ z and (x, y, z) 7→ x ∗ (y ∗ z) (1) coincide (same domain and values). Using this requirement one can see that the values of the (partially defined) functions S n → S Introduction (x1 , · · · , xn ) 7→ ET (x1 , · · · , xn ) Applying the exponential paradigm one can feel sometimes incomfortable wondering whether “one has the right” to do so (as for coloured structures, for example). The following paper is aimed at giving a rather large framework where this formula holds. Exponential formula can be traced back to works by Touchard and Ridell & Uhlenbeck [20, 17]. For an other exposition, see for example [4, 7, 9, 19]. We are interested to compute various examples of EGF for combinatorial objects having (a finite set of) nodes (i.e. their set-theoretical support) so we use as central concept the mapping σ which associates to every structure, its set of (labels of its) nodes. We need to draw what could be called “square-free decomposable objects” (SFD). This version is suited to our needs for the “exponential formula” and it is sufficiently general to contain, as a particular case, the case of multivariate series. (2) obtained by evaluating the expression formed by labelling by xi (from left to right) the ith leaf of a binary tree T with n nodes and by ∗ its internal nodes, is independant of T . We will denote x1 ∗ · · · ∗ xn their common value. In this paper we restrict our attention to commutative semigroups. By this we mean that the value x1 ∗ · · · ∗ xn does not depend on the relative order of the xi . A nonempty partial semigroup (S, ∗) has a (two-sided and total) unit ǫ ∈ S if, and only if, for every ω ∈ S, ω ∗ ǫ = ω = ǫ∗ω. Using associativity of ∗, it can be easily checked that if S has a unit, then it is unique. Example 2.1. Let F be a set of sets (resp. which contains ∅ as an element) and which is closed under the disjoint sum ⊔, i.e., if A, B ∈ F such that A ∩ B = ∅, then A ∪ B(= A ⊔ B) ∈ F . Then (F, ⊔) is a partial semigroup (resp. partial semigroup with unit). 3 ∗ L. Poinsot, G. H. E. Duchamp and S. Goodenough are affiliated to Laboratoire d’Informatique Paris Nord, Université ParisNord 13, CNRS UMR 7030, 99 av. J.-B. Clément, F 93430 Villetaneuse, France (emails: {ghed,laurent.poinsot}@lipn-univ.paris13.fr, [email protected]). † K. A. Penson is affiliated to Laboratoire de Physique Théorique de la Matière Condensée, Université Pierre et Marie Curie, CNRS UMR 7600, Tour 24 - 2e ét., 4 pl. Jussieu, F 75252 Paris cedex 05, France (email: [email protected]). ‡ Manuscript received October 05, 2009. This work was supported by the French Ministry of Science and Higher Education under Grant ANR PhysComb. Square-free decomposable partial semigroups + Let 2(N ) be the set of all finite subsets of the positive integers N+ and (S, ⊕) be a partial semigroup with unit + (here denoted ǫ) equipped with a mapping σ : S → 2(N ) , called the (set-theoretic) support mapping. Let D be the domain of ⊕. The triple (S, ⊕, σ) is called square-free decomposable (SFD) if, and only if, it fulfills the two following conditions. 1 2 L. Poinsot, G. H. E. Duchamp, S. Goodenough and K.A. Penson • Direct sum (DS): 1. σ(ω) = ∅ iff ω = ǫ; 2. D = {(ω1 , ω2 ) ∈ S 2 : σ(ω1 ) ∩ σ(ω2 ) = ∅}; 3. For all ω1 , ω2 ∈ S, if (ω1 , ω2 ) ∈ D then σ(ω1 ⊕ ω2 ) = σ(ω1 ) ∪ σ(ω2 ). • Levi’s property (LP): For every ω1 , ω2 , ω 1 , ω 2 ∈ S such that (ω1 , ω2 ), (ω 1 , ω 2 ) ∈ D and ω1 ⊕ ω2 = ω 1 ⊕ ω 2 , there are ωij ∈ S for i = 1, 2, j = 1, 2 such that (ωi1 , ωi2 ), (ω1j , ω2j ) ∈ D, ωi = ωi1 ⊕ωi2 and ω j = ω1j ⊕ω2j for i = 1, 2 and j = 1, 2. Remark 3.1. The second and third conditions of (DS) imply that σ(ω1 ⊕ω2 ) = σ(ω1 )⊔σ(ω2 ) whenever (ω1 , ω2 ) ∈ D (which means that σ(ω1 )∩σ(ω2 ) = ∅), where ⊔ denotes the disjoint sum. Example 3.1. As example of this setting we have: is equal to ǫ, then ωi 6= ωj for every i, j ∈ {1, . . . , n} such n G σ(ωi ). that i 6= j. Moreover σ(⊕ni=1 ωi ) = i=1 (ωi )ni=1 Lemma 3.2. Let be a finite family of elements of S with pairwise disjoint supports. Suppose that for i i i = 1, · · · , n, ωi = ⊕nk=1 ωik , where (ωik )nk=1 is a finite  n n i ωik . family of elements of S. Then ⊕i=1 ωi = ⊕i=1 ⊕nk=1 These lemmas are useful to define the sum of two or more elements of S using respective sum decompositions. Now, an atom in a partial semigroup with unit S is any object ω 6= ǫ which cannot be split, formally ω = ω1 ⊕ ω2 =⇒ ǫ ∈ {ω1 , ω2 } . (3) The set of all atoms is denoted by atoms(S). Whenever the square-free decomposable semigroup S is not trivial, i.e., reduced to {ǫ}, atoms(S) is not empty. 1. The positive square-free integers, σ(n) being the set Example 3.2. The atoms obtained from examples 3.1: of primes which divide n, the atoms being the prime 1. The atoms of 3.1.2 are the primes. numbers. 2. The atoms of 3.1.3 are connected graphs. 2. All the positive integeres (S = N+ ), under the usual integer multiplication, σ(n) being the set of primes 3. The atoms of 3.1.4 are the endofunctions for which which divide n. the domain is a singleton. 3. Graphs, hypergraphs, (finitely) coloured, weighted 4. The atoms of 3.1.5 are the monomials. graphs, with nodes in N+ , σ(G) being the set of nodes The prescriptions (DS,LP) imply that decomposition and ⊕ the juxtaposition (direct sum) when the set of objects into atoms always exists and is unique. of nodes are mutually disjoint. Proposition 3.1. Let (S, ⊕, σ) be SFD. For each ω ∈ 4. The set of endofunctions f : F → F where F is a S there is one and only one finite set of atoms A = finite subset of N+ . {ω1 , · · · , ωn } such that ω = ⊕ni=1 ωi . One has A = ∅ 5. The (multivariate) polynomials in N[X], X = {xi : iff ω = ǫ. i ∈ I}, with I ⊆ N+ , being a nonempty set of (commuting or not) variables, with σ(P ) = Alph(P ) the Exponential formula set of indices of variables that occur in a polynomial 4 P , and ⊕ = +. In this section we consider (S, ⊕, σ) as a square-free 6. For a given finite or denumerable field, the set of irre- decomposable partial semigroup with unit. ducible monic polynomials is denumerable. Arrange In the set S, objects are conceived to be “measured” by them in a sequence (Pn )n∈N+ , then the square-free monic (for a given order on the variables) polynomi- different parameters (data in statistical language). So, to als is SFD, σ(P ) := {n ∈ N+ : Pn divides P } and ⊕ get a general purpose tool, we suppose that the statistics takes its values in a (unitary) ring R of characteristic zero being the multiplication. that is to say which contains Q (as, to write exponential 7. Rational complex algebraic curves; σ(V ) being the generating series it is convenient to have at hand the fracset of monic irreducible bivariate polynomials van- tions 1 ). Let then c : S → R be the given statistics. For n! ishing on V . F a finite set and each X ⊆ S, we define In what follows we write ⊕ni=1 ωi instead of ω1 ⊕· · ·⊕ωn (if n = 0, then ⊕ni=1 ωi = ǫ) and we suppose that (S, ⊕, σ) is SFD for the two following lemmas. Lemma 3.1. Let ω1 , . . . , ωn ∈ S such that ⊕ni=1 ωi is defined. Then for every i, j ∈ {1, . . . , n} such that i 6= j, it holds that σ(ωi ) ∩ σ(ωj ) = ∅. In particular, if none ωk XF := {ω ∈ X : σ(ω) = F } . (4) In order to write generating series, we need X 1. that the sums c(XF ) := c(ω) exist for every ω∈XF finite set F of N+ and every X ⊆ S; Statistics on Graphs, Exponential Formula and Combinatorial Physics 2. that F → c(XF ) would depend only of the cardinal- where ity of the finite set F of N+ , for each fixed X ⊆ S; an = X Y fcard(p) 3 (8) π∈Πn p∈π 3. that c(ω1 ⊕ ω2 ) = c(ω1 ).c(ω2 ). We formalize it in (LF) Local finiteness. — For each finite set F of N+ , the subset SF of S is a finite set. (Eq) Equivariance. — with Πn being the set of all partitions of [1..n] (in particX zn ular for n = 0, a0 = 1) and ez = ∈ R[[z]]. n! n≥0 In what follows [1..n] denotes the interval {j ∈ N+ : 1 ≤ j ≤ n}, reduced to ∅ when n = 0. Let (S, ⊕, σ) be a locally finite SFD and c be a multiplicative equivariant statistics. For every subset X of S one sets the following card(F1 ) = card(F2 ) =⇒ c(atoms(S)F1 ) = c(atoms(S)F2 ) . exponential generating series (5) ∞ (Mu) Multiplicativity. — X zn . (9) EGF(X; z) = c(X[1..n] ) n! c(ω1 ⊕ ω2 ) = c(ω1 ).c(ω2 ) . (6) n=0 Remark 4.1. a) In fact, (LF) is a property of the set thm 4.1 (exponential formula). Let S be a locally finite S, while (Eq) is a property of the statistics. In practice, SFD and c be a multiplicative equivariant statistics. We we choose S which is locally finite and choose equivariant have statistics for instance EGF(S; z) = c(ǫ) − 1 + eEGF(atoms(S);z) .. (10) (number of cycles) (number of fixed points) c(ω) = x y In particular if c(ǫ) = 1 (for instance if c is proper and R is an integral domain), for some variables x, y. EGF(S; z) = eEGF(atoms(S);z) . (11) b) More generally, it is typical to take integer-valued partial (additive) statistics c1 , · · · ci , · · · , cr (for every Proof — Let n = 0. Then the unique element of S∅ c (ω) c (ω) c (ω) ω ∈ S, ci (ω) ∈ N) and set c(ω) = x11 x22 · · · xrr . is ǫ. Therefore c(S∅ ) = c(ǫ). Now suppose that n > 0 and let ω ∈ S[1..n] . According to proposition 3.1, there c) The set of example 3.1.2 is not locally finite, but is a unique finite set {α1 , . . . , αk } ⊆ atoms(S) such that other examples satisfy (LF): for instance 3.1.3 if one asks ω = ⊕ki=1 αi . By lemma 3.1, {σ(αi ) : 1 ≤ i ≤ k} is a parthat the number of arrows and weight is finite, 3.1.1. tition of [1..n] into k blocks. Therefore ω ∈ atoms(S)P1 ⊕ A multiplicative statistics is called proper if c(ǫ) 6= 0. · · · ⊕ atoms(S)Pk where Pi = σ(αi ) for i = 1, . . . , k. We It is called improper if c(ǫ) = 0. In this case, for every can remark that α1 ⊕ · · · ⊕ αk is well-defined for each (α1 , . . . , αk ) ∈ atoms(S)P1 × · · · × atoms(S)Pk since the ω ∈ S, c(ω) = 0 as c(ω) = c(ω ⊕ ǫ) = c(ω)c(ǫ) = 0. If R is a integral domain and if c is proper, supports are disjoint. Now, one has, thanks to the partithen c(ǫ) = 1 because c(ǫ) = c(ǫ ⊕ ǫ) = c(ǫ)2 , tions of [1..n] therefore 1 = c(ǫ). Note that for each X ⊆ S, G M X S[1..n] = atoms(S)p (12) c(ǫ) if ǫ ∈ X c(X∅ ) = c(ω) = . For every p∈π π∈Π n 0 if ǫ 6∈ X X Y ω∈X∅ X c(S[1..n] ) = c(atoms(S)p ) (13) finite subset X of S, we also define c(X) := c(ω), ω∈X then we have in particular c(∅) = 0 (which is not the same as c(S∅ ) = c({ǫ}) if c is proper). The requirement (LF) implies that for every X ⊆ S and every finite set F of N+ , c(XF ) is defined as a sum of a finite number of terms because XF ⊆ SF , and therefore XF is finite. π∈Πn p∈π as, for disjoint (finite) sets F and G of N+ , it is easy to check that c(XF ⊕ XG ) = c(XF )c(XG ) for every X ⊆ S and because the disjoint union as only a finite number of factors. Therefore due to equivariance of c on sets of the form atoms(S)F , one has X Y Now, we are in position to state the exponential formula c(S[1..n] ) = c(atoms(S)[1..card(p)] ) . (14) as it will be used throughout the paper. Let us recall the π∈Πn p∈π usual exponential formula for formal power series in R[[z]] (see [13,X 19] for more details on formal power series). Let But c(atoms(S)[1..card(p)] ) is the card(p)th coefficient of the series EGF(atoms(S); z). Therefore due to the f (z) = fn z n . Then we have usual exponential formula, EGF(S; z) = c(ǫ) − 1 + n≥1 eEGF(atoms(S);z) . Now if c(ǫ) = 1, then we obtain X zn EGF(atoms(S);z) . (7) EGF(S; z) = e ef = an n! n≥0 4 5 L. Poinsot, G. H. E. Duchamp, S. Goodenough and K.A. Penson Two examples (one-parameter) groups eλΩ where Ω = X α(ω)ω is ω∈HWC an element of HWC , with all - but a finite number of them - the complex numbers α(ω) equal to 0, and ω a word on the alphabet {a, a† } leads to the necessity of solving the Normal Ordering Problem, i.e., the reduction of the powers of Ω to the form X Ωn = βi,j (a† )i aj . (18) (15) The examples provided here pertain to the class of labelled graphs where the “classic” exponential formula applies, namely Burnside’s Classes1 Burn a,b , defined, for 0 ≤ a < b two integers, as the class of graphs of numeric endofunctions f such that fa = fb where f n denotes the nth power with respect to functional composition. Despite of its simplicity, there are still (enumerative combinatorial) open problems for this class and only B1,ℓ+1 gives rise to an elegant formula [8, 19] (see also [11], for the idempotent case: ℓ = 1 and compare to exact but non-easily tractable formulas in [4] for the general case in the symmetric semigroup, and in [12] for their generalization to the wreath product of the symmetric semigroup and a finite group). In the sequel, Normal (Ωn ) denotes such a sum. This problem can be performed with three indices in general and two in the case of homogeneous operators that is operators for which the “excess” e = i − j is constant along the monomials (a† )i aj of the support (for which βi,j 6= 0). Thus, for X βi,j (a† )i aj (19) Ω= i−j=e one has, for all n ∈ N, The second example: the class of finite parti∞ tions which can be (and should here) identified as X n † ne Normal (Ω ) = (a ) SΩ (n, k)(a† )k ak (20) graphs of equivalence relations on finite subsets F ⊆ + k=0 N . Call this class “Stirling class” as the number of such graphs with support [1..n] and k conwhen e ≥ 0, and nected components is exactly the Stirling number of ! ∞ the second kind S2 (n, k) and, using the statistics X n † k k (21) Normal (Ω ) = SΩ (n, k)(a ) a an|e| x(number of points) y (number of connected components) , one obk=0 tains X x xn (16) otherwise. It turns out that, when there is only one anS2 (n, k) y k = ey(e −1) . n! n,k≥0 nihilation, one gets a formula of the type (x, y are formal Examples of this kind bring us to the conclusion that commutative variables) bivariate statistics like Burna,b (n, k), S2 (n, k) or S1 (n, k) P X xn xn SΩ (n, k) y k = g(x)ey n≥1 SΩ (n,1) n! (22) (Stirling numbers of the second and first kind) are better n! n,k≥0 understood through the notion of one-parameter group, conversely such groups naturally arinsing in Combinatowhich is a generalization of formula (16). A complete rial Physics lead to such statistics and new ones some of study of such a procedure and the details to perform the which can be interpreted combinatorially. solution of the normal ordering problem may be found in [5]. 6 Generalized Stirling numbers in 7 Combinatorial Physics Conclusion In this paper, we have broadened 2, 3 the domain of application of the exponential formula, a tool originated from statistical physics. This broadening reveals us, together with the essence of “why this formula works”, a possibility of extension to denominators other than the factorial and, on the other hand, provides a link with one-parameter groups whose infinitesimal generators are (formal) vector The complex algebra generated by these two symbols and fields on the line. The general combinatorial theory of this unique relation, the Heisenberg-Weyl algebra, will be the correspondence (vector fields ↔ bivariate statistics) here denoted by HWC . The consideration of evolution is still to be done despite the fact that we have already a wealth of results in this direction. 1 In Quantum Mechanics, many tools boil down to the consideration of creation and annihilation operators which will be here denoted respectively a† and a. These two symbols do not commute and are subject to the unique relation [a, a† ] = 1 . (17) The name is related to the notion of free Burnside semigroups, namely the quotient of the free semigroup A+ , where A is a finite alphabet, by the the smallest congruence that contains the relators ω n+m = ω n , ω ∈ A+ . For more details see [15]. 2 A part of our setting can be reformulated in the categorical context [2, 3] 3 Another direction is the q-exponential formula [10, 16]. Statistics on Graphs, Exponential Formula and Combinatorial Physics Acknowledgements We would like to thank Christian Krattenthaler (from Wien) for fruitful discussions. The research of this work was supported, in part, by the Agence Nationale de la Recherche (Paris, France) under Program No. ANR-08-BLAN-0243-2. We would like also to acknowledge support from “Projet interne au LIPN 2009” “Polyzêta functions”. References [1] R. H. Bruck, A survey of binary systems, Ergebnisse der Mathematik und ihrer Grenzgebiete, new series, vol. 20, BerlinGttingen-Heidelberg, Springer, 1958. [2] F. Bergeron, G. Labelle, and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge University Press, 1999. [3] P. J. Cameron, C. Krattenthaler, and T. W. Müller, Decomposable functors and the exponential principle II, to appear. [4] A. Dress and T. W. Müller, Decomposable functors and the exponential principle, Advances in Mathematics, vol. 129, pp. 188221, 1997. [5] G. H. E. Duchamp, K. A. Penson, A. I. Solomon, A. Horzela and P. Blasiak, One-parameter groups and combinatorial physics, in Proc. of the Third International Workshop on Contemporary Problems in Mathematic Physics (COPROMAPH3), PortoNovo (Benin), 2003. arXiv:quant-ph/0401126 [6] S. Eilenberg, Automata, Languages and Machines - volume A, Academic Press, 1974. [7] P. Flajolet, R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2008. [8] I. P. Goulden and D. M. Jackson, Combinatorial enumeration, John Wiley & Sons, Inc., 1983. [9] A. Joyal, Une théorie combinatoire des séries formelles, Advances in Mathematics, vol. 42, pp. 1-82, 1981. [10] I. M. Gessel, A q-analog of the exponential formula, Discrete Mathematics 306 (2006). [11] B. Harris and L. Schoenfeld, The number of idempotent elements in symmetric semigroups, Journal of Combinatorial Theory, Series A, vol. 3, pp. 122-135, 1967. [12] C. Krattenthaler and T. W. Müller, Equations in finite semigroups: explicit enumeration and asymptotics of solution numbers, Journal of Combinatorial Theory, Series A, vol. 105, pp. 291-334, 2004. [13] S. Lang, Complex analysis, Springer, 1999. [14] E. S. Ljapin and A. E. Evseev, The Theory of Partial Algebraic Operations, Kluwer Academic, 1997. [15] A. Pereira do Lago and I. Simon, Free Burnside Semigroups, Theoretical Informatics and Applications, vol. 35, pp. 579-595, 2001. [16] C. Quesne, Disentangling q-Exponentials: A General Approach, International Journal of Theoretical Physics, Vol. 43, No. 2, February 2004 [17] R. J. Ridell and G. E. Uhlenbeck, On the theory of the virial development of the equation of state of monomatomic gases, J. Chem. Phys., vol. 21, pp. 2056-2064, 1953. [18] G. Segal, Configuration-spaces and iterated loop-spaces, Inventiones Mathematicae, vol. 21 (3), pp. 213-221, 1973. [19] R. Stanley, Enumerative Combinatorics - Volume I, in Studies in Advanced Mathematics, vol. 49, Cambridge University Press, 1997. [20] J. Touchard, Sur les cycles des substitutions, Acta Mathematica, vol. 70, pp. 243-297, 1939. 5
5cs.CE
arXiv:1710.09875v1 [cs.NE] 26 Oct 2017 Phase Transitions in Image Denoising via Sparsely Coding Convolutional Neural Networks Jacob Carroll Department of Physics & Center for Soft Matter and Biological Physics Virginia Tech Blacksburg, VA 24061 [email protected] Nils Carlson Department of Computer Science and Engineering New Mexico Tech Socorro NM, 87801 Garrett T. Kenyon CCS-3, Information Sciences Los Alamos National Laboratory Los Alamos, NM, 87545 Abstract Neural networks are analogous in many ways to spin glasses, systems which are known for their rich set of dynamics and equally complex phase diagrams. We apply well-known techniques in the study of spin glasses to a convolutional sparsely encoding neural network and observe power law finite-size scaling behavior in the sparsity and reconstruction error as the network denoises 32×32 RGB CIFAR10 images. This finite-size scaling indicates the presence of a continuous phase transition at a critical value of this sparsity. By using the power law scaling relations inherent to finite-size scaling, we can determine the optimal value of sparsity for any network size by tuning the system to the critical point and operate the system at the minimum denoising error. 1 Introduction Spin glasses and neural networks are very analogous and draw many parallels in their dynamics. Generally, a spin glass is a model of disordered magnetism. The simplest model of a spin glass, the Ising model, is a network of N "spins" {σi } which take on the discrete values, connected by a weight matrix Jij ∈ R that represents the strength of connection between the spins. The dynamics of these systems is determined by the values of randomly chosen Jij , which are generally time independent (3). The similarity of these spin glass systems with neural networks is of interest to us because spin glasses have been a focus of research in statistical physics for the last fifty years, and a large library of machinery and techniques has been developed to deal with them. We would like to apply this machinery to the field of neural networks. For this paper we used PetaVision, a high performance neural simulation toolbox (1), to construct sparsely coding convolutional neural networks and examine the relationship between the network’s efficiency and sparsity. Interesting behavior in the efficiency of the networks as the sparsity was varied led us to analyze the finite-size scaling of the network, a technique more commonly used in the study of spin glasses, and discovered power law relationships that indicate a continuous (second-order) phase transition is occurring in the networks as sparsity is varied. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2 Neural network We used two networks in our simulation, both built using PetaVision. The first network was a sparse auto-encoder network that trained the filter kernels of a convolutional layer using a Locally Competitive Algorithm, as defined by Rozell et al. (7), as it attempted to iteratively converge on a sparse representation of different input images. The second network (see Figure 1) used the same sparsely encoding convolutional layer that was trained by the autoencoder to denoise images that had very high Gaussian noise added to them. The input for both networks were images from the CIFAR-10 image set (6).The image set was divided into two parts. The first 50,000 images were used for training the filter kernels of the sparsely coding convolutional layer for different levels of sparsity. Then, 10,000 additional images had very high Gaussian noise added to them and were denoised by the denoising network for each level of sparsity used in training. We observed a distinct minimum in the percent reconstruction error of the noisy images as the sparsity of the network was varied that displayed behavior analogous to continuous phase transitions seen in spin glasses (see figure 2) (3; 9). With this as our motivation we investigated the presence of a phase transition in our system. Input Layer Noise Layer Input Error Layer Sparsely Coding Input Reconstruction Convolutional Layer Layer Figure 1: A schematic of the denoising network. The Input Error Layer computes the difference between the Noise Layer and the Input Reconstruction Layer, an alternative implementation of lateral inhibition in LCA (8). Feature learning utilizes a local Hebbian rule to implement stochastic gradient descent. 3 Phase transitions and finite-size scaling A phase of a system is defined as a subspace of the microscopic system parameters where the system’s dynamics obey the same macroscale laws and relations everywhere in that subspace. The space of system parameters can have many phases, and the system can transition between them as system control parameters change. The point of transition between two (or more) phases is known as the critical point. Phase transitions have been subject of significant study in Condensed Matter Physics, and it is well established that the occurrence of a continuous phase transition1 is accompanied by a singularity at the critical point in one or more system parameters when the system is of infinite size (9). It is impossible to achieve infinite system sizes computationally, but this theory can be expanded to finite systems where these singularities become truncated and rounded. These minima or maxima that the singularities turn into at finite system sizes follow very specific relations with system size: Location of Minima ∼ L−1/ν −γ/ν Height of Minima ∼ L , (1) (2) where L is the linear system size. This behavior is known as finite-size scaling (9; 2). The exponents ν and γ two examples of "critical exponents". The critical exponents describe the behavior of the system as it approaches the critical point (9; 2). Thus we can identify a phase transition in our network by the existence and behavior of minima and maxima in the space of system parameters as we vary the system size, which in our case will be the number of neurons in the convolutional layer. The exponents we record, ν̄ and γ̄, will be proportional to γ and ν through some effective dimension of our system. 1 A continuous (second-order) phase transition has a continuous change in the dynamics of the system as it transitions between phases, while first-order phase transitions are discontinuous. 2 4 Results The parameters of the system that we are interested in are the fraction of active neurons and the average percent reconstruction error of our noisy images: 10,000 X ksi − ŝi k2 1 Perr = , (3) 10, 000 i=1 ksi k2 where Perr is the average percent reconstruction error, si is the ith original image before it has Gaussian noise added to it, ŝi is the ith reconstruction of the noised image taken from the sparsely coding convolutional layer (1; 7; 8). 213 neurons 214 neurons 215 neurons 216 neurons 217 neurons 0.26 0.28 ● 0.24 Percent Reconstruction Error The fraction of active neurons is controlled by a parameter λ, as described Rozell et al. (7), that behaves monotonically with the sparsity of active neurons and inversely with the fraction of active neurons. Through λ we can control the fraction of active neurons and observe how the average percent reconstruction error behaves as the fraction of active neurons is varied. We observed a minimum in Perr occur as we varied the fraction of active neurons for many different system sizes. These results are summarized in Figure 2. ● ● ● ● ● ● ● ● ● 0.22 ●● ● 0.00 0.02 0.04 0.06 0.08 0.10 0.12 Fraction Active Neurons Figure 2: Average percent active error vs. fraction active neurons 0.03 0.04 0.05 101.91x−0.756 ● 0.01 0.02 Fraction Active Neurons 0.2225 0.2215 0.2205 ● 0.2195 Minimum Percent Error 10−0.621x−0.00745 214 215 216 217 214 System Size (Number of Neurons) 215 216 217 System Size (Number of Neurons) (a) Height of minima vs. system size (b) Location of minima vs system size Figure 3: The power law behavior of the minimum average percent reconstruction error (a), and the fraction of active neurons at that minimum (b). We report ν̄ = 1.32 ± 0.04 and γ̄ = 0.0099 ± 0.0095. We measured the shift in height and location of the minima in Perr as the system size was varied, and plot each on a log-log plot (see Figures 3 (a), and 3 (b)). We observe power law behavior in both 3 the location and height of the minima as the system size is varied. This satifies the finite-size scaling requirements as defined in equations 1 and 2. This finite-size scaling behavior indicates a continuous phase transition is occurring as the sparsity of the network is varied. 5 Discussion The existence of phase transitions in neural networks is not unique to this sparsely coding convolutional system. The auto-associative network proposed by Hopfield (5) was shown by Hertz et al. (4) to display a first-order phase transition in its memory capacity. If the number of patterns recorded by the network exceeds a "critical fraction" of the network size, the output of the network is maximally disordered (4). We propose a similar mechanism is responsible for the observed continuous phase transition of our sparsely coding convolution network, where the fraction of active neurons is analogous to the "critical fraction" of learned patterns in the auto-associative network. If our network’s fraction of active neurons is too far above the "critical fraction", the network will have the freedom to reconstruct the noise in the image, while if the fraction of active neurons is too low, the network will only reconstruct image components for which it has learned strong priors. These two different regions of dynamics form our "phases". The existence of a phase transition in the average percent reconstruction error of the network as the fraction of active neurons is varied guarantees the persistence of the power law behavior seen in Figure 3 (b). This power law behavior allows us to predict the optimal fraction of active neurons for any system size, which in turn can be tuned to through the parameter λ, as described by Rozell et al. (7), to ensure that any sparsely coding convolutional network is operating at the optimal level of sparsity. The critical behavior of the network allows us to always achieve the minimum denoising error by operating the network at this critical value of sparsity. Acknowledgments We gladly acknowledge helpful discussions with Uwe C. Täuber. This work was supported by the Los Alamos National Laboratory under contract DE-AC5206NA25396. Computations were performed using the Darwin Computational Cluster at Los Alamos National Laboratory. References [1] Petavision. URL github.com/PetaVision/OpenPV. [2] J. Cardy. Scaling and renormalization in statistical physics. Cambridge University Press, 1996. ISBN 0521499593. [3] V. Dotsenko. An introduction to the theory of spin glasses and neural networks. World Scientific Lecture Notes in Physics. World Scientific Publishing Company, 1995. ISBN 9810218737. [4] J. A. Hertz, A. S. Krogh, and R. G. Palmer. Introduction to the theory of neural computation. Addison-Wesley Publishing Company, 1991. ISBN 0201515601. [5] J. J. Hopfield. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the National Academy of Sciences, 79(8):2554–2558, 1982. URL http://www.pnas.org/ content/79/8/2554.abstract. [6] A. Krizhevsky. Learning multiple layers of features from tiny images. 2009. [7] C. J. Rozell, D. H. Johnson, R. G. Baraniuk, and B. A. Olshausen. Sparse coding via thresholding and local competition in neural circuits. Neural Computation, 20:2526–2563, 2008. [8] P. F. Schultz, D. M. Paiton, W. Lu, and G. T. Kenyon. Replicating kernels with a short stride allows sparse reconstructions with fewer independent kernels. arXiv preprint arXiv:1406.4205, 2014. [9] U. C. Täuber. Critical dynamics: a field theory approach to equilibrium and non-equilibrium scaling behavior. Cambridge University Press, 2014. ISBN 9780521842235. 4
9cs.NE
THE Q-TENSOR SQUARE OF FINITELY GENERATED NILPOTENT GROUPS, q ≥ 0 arXiv:1603.05424v1 [math.GR] 17 Mar 2016 NORAÍ R. ROCCO AND EUNICE C. P. RODRIGUES Abstract. In the present paper the authors extend to the q−tensor square G ⊗q G of a group G, q a non-negative integer, some structural results due to R. D. Blyth, F. Fumagalli and M. Morigi concerning the non-abelian tensor square G⊗G (q = 0). The results are applied to the computation of G⊗q G for finitely generated nilpotent groups G, specially for free nilpotent groups of finite rank. We also generalize to all q ≥ 0 results of M. Bacon regarding an upper bound to the minimal number of generators of the non-abelian tensor square G ⊗ G when G is a n−generator nilpotent group of class 2. We end by computing the q−tensor squares of the free n−generator nilpotent group of class 2, n ≥ 2, for all q ≥ 0. This shows that the above mentioned upper bound is also achieved for these groups when q > 1. 1. Introduction Let G and Gϕ be groups, isomorphic via ϕ : g 7→ g ϕ for all g ∈ G. Consider the group ν(G), introduced in [23] as (1) ϕ ν(G) = G ∪ Gϕ | [g, hϕ ]k = [g k , (hk )ϕ ] = [g, hϕ ]k , ∀g, h, k ∈ G . It is a well known fact (see [23]) that the subgroup Υ(G) = [G, Gϕ ] of ν(G) is isomorphic to the non-abelian tensor square G ⊗ G, as defined by Brown and Loday in their seminal paper [8]. A modular version of the operator ν was considered in [10], where for any non-negative integer q the authors introduced and studied a group ν q (G), which in turn is an extension of the so called q-tensor square of G, G⊗q G, first defined by Conduché and Rodriguez-Fernandez in [11] (see also [14], [7]). In order to describe the group ν q (G), if q ≥ 1 then let Gb = {b k | k ∈ G} be a set of symbols, b be one for each element of G (for q = 0 we set Gb = ∅, the empty set). Let F (G) b b b the free group over G and ν(G) ? F (G) be the free product of ν(G) and F (G). As G and Gϕ are embedded into ν(G) we shall identify the elements of G (respectively of b Let J denote the normal closure in Gϕ ) with their respective images in ν(G) ∗ F (G). Date: March 19, 2018. 2010 Mathematics Subject Classification. 20F45, 20E26, 20F40. Key words and phrases. Non-abelian tensor square; q-tensor square; nilpotent groups. 1 2 ROCCO AND RODRIGUES b of the following elements, for all b ν(G) ∗ F (G) k, kb1 ∈ Gb and g, h ∈ G : (2) (3) (4) (5) −1 d g) ; k g (k g −1 b −1 d g) ; k g ϕ (k (g ϕ )−1 b q q (b k)−1 [g, hϕ ] b k [g k , (hk )ϕ ]−1 ; d1 (kb1 )−1 ( (b k)−1 kk q−1 Y q−1−i −1 [k, (k1−i )ϕ ]k ) ; i=1 (6) [b k, kb1 ] [k q , (k1q )ϕ ]−1 ; (7) [ [g, h] [g, hϕ ]−q . Definition 1.1. The group ν q (G) is defined to be the factor group (8) b ν q (G) := (ν(G) ∗ F (G))/J. Note that for q = 0 the sets of relations (2) to (7) are empty; in this case we have ∼ b ν (G) = ν(G) ∗ F (G))/J = ν(G). Let R1 , . . . , R6 be the sets of S relations corresponding to (2), . . . , (7), respectively, and let R be their union, R = 6i=1 Ri . Therefore, ν q (G) has the presentation: D E q ϕ b ϕ k k k ϕ −1 ϕ kϕ k k ϕ −1 ν (G) = G, G , G | R, [g, h ] [g , (h ) ] , [g, h ] [g , (h ) ] , ∀g, h, k ∈ G . 0 There is an epimorphism ρ : η q (G)  G, g 7→ g, hϕ 7→ h, b k 7→ k q . On the other hand the inclusion of G into ν(G) induces a homomorphism ı : G → ν q (G). We have g ıρ = g and thus ı is injective. Similarly the inclusion of Gϕ into ν(G) induces a monomorphism  : Gϕ → ν q (G). Thus we shall identify the elements g ∈ G and g ϕ ∈ Gϕ with their respective images g ı and (g ϕ ) in ν q (G). b By relations Now let G denote the subgroup of ν q (G) generated by the images of G. ϕ q q (4), G normalizes the subgroup T = [G, G ] in ν (G) and hence Υ (G) = T G = [G, Gϕ ]G is a normal subgroup of ν q (G). Thus we obtain ν q (G) = Gϕ · (G · Υq (G)), where the dots mean internal semidirect products. It should be noted that the actions of G and Gϕ on Υq (G) are those induced by the defining relations of ν q (G): for any elements g, x ∈ G, hϕ , y ϕ ∈ Gϕ and b k ∈ Gb we have [g, hϕ ]x = [g x , (hx )ϕ ] and ϕ ϕ d d x ); similarly, [g, hϕ ]y = [g y , (hy )ϕ ] and (b y ). In addition, for any (b k)x = (k k)y = (k q yϕ ϕ yϕ q τ ∈ Υ (G), (gτ ) = g[g, y ]τ ∈ GΥ (G). By [10, Proposition 2.9] Υq (G) is isomorphic to the q-tensor square G ⊗q G, for all q ≥ 0. We then get a result (see [10, Corollary 2.11]) analogous to one due to Ellis in [14]: ν q (G) ∼ = G n (G n (G ⊗q G)); this generalizes a similar result found in [23] for q = 0. The commutator approach to G⊗G for the case q = 0, provided by the isomorphism between G ⊗ G and the subgroup [G, Gϕ ] of ν(G) (see [23], and also [15]), has proven suitable to treat of non-abelian tensor products of groups, Schur multipliers and many other relevant invariants involving covering questions in groups; see for instance, references [15], [24], [20], [4], [12], [21] and the GAP Package “POLYCYCLIC” in [13]. Q-TENSOR SQUARE OF NILPOTENT GROUPS 3 The extension of the existing theory from q = 0 to all non-negative integers q, as addressed for instance in [10], broadens the scope of these connections, now in a hat (“power”) and commutator approach to the q-tensor square, q ≥ 0. In section 2 we extend to G ⊗q G, q ≥ 0, some structural results found in [5] and [24] concerning G ⊗ G. In section 3 it is established an upper bound for the minimal number of generators of G ⊗q G when G is a finitely generated nilpotent group of class 2, thus generalizing a result of Bacon found in [2]. We end by computing the q-tensor square of the free nilpotent group of rank n ≥ 2 and class 2, Nn,2 , q ≥ 0; this will show, as in the case q = 0 (see [2, Theorem 3.2]), that the cited upper bound is also attained for these groups when q > 1, although in this case Nn,2 ⊗q Nn,2 is a non-abelian group. Notation is fairly standard (see for instance [22]). If x and y are elements of a group G then we write y x for the conjugate x−1 yx and [x, y] for the commutator x−1 y −1 xy. Our commutators are left normed: [x, y, z] = [[x, y], z] for all x, y, z ∈ G, and so on, recursively, for commutators of higher weights. The order of x (resp. of G) is written o(x) (resp. |G|). As usual, γi (G) denotes the ith term of the lower central series of G. For future reference we recall the well known Hall-Witt identity: (9) [x, y −1 , z]y [y, z −1 , x]z [z, x−1 , y]x = 1, ∀x, y, z ∈ G. In view of the isomorphism given by [10, Proposition 2.9], from now on we identify G ⊗q G with the subgroup Υq (G) = [G, Gϕ ]G ≤ ν q (G) and write [g, hϕ ] in place of g ⊗ h, for all g, h ∈ G. Following [10] we write ∆q (G) for the subgroup h[g, g ϕ ]|g ∈ Gi ≤ Υq (G), which by Lemma 2.1 (vii) is a central subgroup of ν q (G). We write τ q (G) for the factor group ν q (G)/∆q (G). The subgroup Υq (G)/∆q (G) of τ q (G) is isomorphic to the q-exterior square G ∧q G. In order to avoid any confusion we usually write [G, Gϕ ]τ ( G) to identify the q-exterior square G ∧q G with the image of [G, Gϕ ] in τ q (G). We shall eventually write T to denote the subgroup [G, Gϕ ] of ν q (G) in order to distinguish it from the nonabelian tensor square G ⊗ G ∼ = [G, Gϕ ] ≤ ν(G) in the case q = 0. The material presented here incorporates part of the doctoral thesis [25] of the second named author, written under the supervision of the first. 2. Some Structural Results In this section we extend results found in [5] and [24] related to the non-abelian tensor square, from G ⊗ G to G ⊗q G, q ≥ 0. We begin by including some previous, technical results for future references. The following basic properties are consequences of the defining relations of ν q (G). Lemma 2.1. [10, Lemma 2.4] Suppose that q ≥ 0. The following relations hold in ν q (G), for all g, h, x, y ∈ G. ϕ (i) [g, hϕ ][x,y ] = [g, hϕ ][x,y] ; (ii) [g, hϕ , xϕ ] = [g, h, xϕ ] = [g, hϕ , x] = [g ϕ , h, xϕ ] = [g ϕ , hϕ , x] = [g ϕ , h, x]; (iii) If h ∈ G0 (or if g ∈ G0 ) then [g, hϕ ][h, g ϕ ] = 1; (iv) [b x, [g, hϕ ]] = [b x, [g, h]]; g q (v) (b x) = x b[x , g ϕ ]; 4 ROCCO AND RODRIGUES (vi) If [g, h] = 1 then [g, hϕ ] and [h, g ϕ ] are central elements of ν q (G), of the same finite order dividing q. If in addition g, h are torsion elements of orders o(g), o(h), respectively, then the order of [g, hϕ ] divides the gcd(q, o(g), o(h)). (vii) [g, g ϕ ] is central in ν q (G), for all g ∈ G; (viii) [g, hϕ ][h, g ϕ ] is central in ν q (G); (ix) [g, g ϕ ] = 1, for all g ∈ G0 ; (x) If [x, g] = 1 = [x, h], then [g, h, xϕ ] = 1 = [[g, h]ϕ , x]. Corollary 2.2. Let G be any group and let g, h be arbitrary elements in G. Then (i) [G0 , Gϕ ] = [G, G0 ϕ ]; (ii) [G0 , Z(G)ϕ ] = 1; (iii) If gG0 = hG0 then [g, g ϕ ] = [h, hϕ ]; (iv) If o0 (x) denotes the order of a coset xG0 ∈ G/G0 , then [g, hϕ ][h, g ϕ ] has order dividing the gcd(q, o0 (g), o0 (h)); (v) The order of [h, hϕ ] divides the gcd(q, o0 (h)2 , 2o0 (h)). Proof. Part (i) follows directly from Lemma 2.1 (iii) (see also [5, Corollary 1.2 (iii)]). As for part (ii), see [23, Proposition 2.7 (i)].The remaining parts are appropriate adaptations of [24, Lemma 3.1 (v)], using (7) and Lemma 2.1 (vi).  For our purposes we establish the following proposition, which may have its own interest. Proposition 2.3. Let G be a nilpotent group of class 2. Then the following hold in ν q (G): (i) G centralizes [G, Gϕ ]; (ii) [G0 , Gϕ ] (= [G, G0 ϕ ]) is a central subgroup of ν q (G); (iii) Υq (G) (∼ = G ⊗q G ) is nilpotent of class at most 2. Proof. (i) follows straightforward from 2.1 (iv) and relation (2), once G has nilpotency class 2. (ii). For all g, h ∈ G and c ∈ G0 we have: [c, g ϕ ]h = [c, g ϕ ][c, g ϕ , h] = [c, g ϕ ][c, g, hϕ ] (by Lemma 2.1, (i)) (since [c, g] = 1, as G0 ≤ Z(G)) = [c, g ϕ ] ϕ = [c, g ϕ ]h (by definition of ν q (G)). ϕ b by Lemma 2.1 (iv) and relations (2) we have that b In addition, for all b k ∈ G, k [c,g ] = \ [c,g] ) = b b k [c,g] = (k k, since [c, g] = 1. This proves part (ii) (using the definition of q ν (G)), because [G0 , Gϕ ] is generated by all those [c, g ϕ ] above. (iii). That Υq (G) is nilpotent and has nilpotency class at most 3 follows from [10, Proposition 2.7, (i)]. Now, Υq (G) = [G, Gϕ ]G and thus, once G centralizes [G, Gϕ ], we have (Υq (G))0 = [[G, Gϕ ]G, [G, Gϕ ]G] ≤ [G, Gϕ ]0 [G, G]. Induction arguments can be used, together with Lemma 2.1 (i), (ii), (iv) and (v) and defining relations (6) – (7) to get: Q-TENSOR SQUARE OF NILPOTENT GROUPS 5 (a) [G, Gϕ ]0 = [G0 , (G0 )ϕ ] (see also [5, Proposition 1.3 (i)] or [23, Theorem 3.3]); (b) [G, G] ≤ hGb0 i[G0 , Gϕ ] ≤ [G0 , Gϕ ]. Consequently, (Υq (G))0 ≤ [G0 , Gϕ ], which by part (ii) is central in ν q (G). This completes the proof.  For a finitely generated abelian group A, its q-tensor square Υq (A) can be computed by repeated applications of the following two results from [10]. Lemma 2.4. [10, Corollary 2.16] Let G = N × H be a direct product and set N = N/N 0 N q , H = H/H 0 H q . Then (i) Υq (G) = Υq (N ) × [N, H ϕ ][H, N ϕ ] × Υq (H); (ii) [N, H ϕ ] ∼ = (N ⊗Zq H) ∼ = [H, N ϕ ]. Lemma 2.5. [10, Theorem 3.1] Let Cn (resp. C∞ ) be the cyclic group of order n (resp. ∞), q a non- negative integer and d = gcd(n, q). Then C ∞ ⊗q C ∞ ∼ = C∞ × Cq ;   if d is odd; C n × C d , q ∼ Cn ⊗ Cn = Cn × Cd , if d is even and either 4|n or 4|q;  C × C , otherwise. 2n d/2 Qr Thus, if A = i=1 Ci is a direct product of the cyclic groups Ci , i = 1, . . . , r, where Ci = hxi i, then r Y Y Υq (A) = Υq (Ci ) × [Ci , Cjϕ ][Cj , Ciϕ ]. i=1 1≤i<j≤r xbi i and [Ci , Cjϕ ][Cj , Ciϕ ] = h [xi , xϕj ][xj , xϕi ], [xi , xϕj ] i. Here we have Υ (Ci ) = Since ∆q (A) = h [a, aϕ ] | a ∈ Ai, we observe, like in [24, Proposition 3.3], that ∆q (A) = h[xi , xϕi ], [xj , xϕk ][xk , xϕj ] | 1 ≤ i ≤ r, 1 ≤ j < k ≤ ri and thus it does not depend on the particular set X = {x1 , . . . , xr } of generators of A. Consequently, we can write q h[xi , xϕi ], q Υq (A) = ∆q (A)EX (A), q where EX (A) = hxbi , [xj , xϕk ] | 1 ≤ i ≤ r, 1 ≤ j < k ≤ ri. Remark 2.6. If x and y are commuting elements in any group G then by relations (5)–(7) and Lemma 2.1 (vi) we get q q x cy = x b yb [x, y ϕ ]−(2) = x b yb [y, xϕ ]−(2) = yc x, q q and hence [x, y ϕ ]−(2) = [y, xϕ ]−(2) . In particular, if q = 2 then [x, y ϕ ] = [y, xϕ ]. This means for instance that in the decomposition of Υq (A) found above, the groups d n) = [Ci , Cjϕ ] and [Cj , Ciϕ ] are not necessarily independent. Moreover, the identity (x n q (b x)n [x, xϕ ]−( 2 )(2) shows that the subgroups hxb i and h[x , xϕ ]i of Υq (C ) may have non i i i i q (A) is not trivial intersection. Consequently, unlike the case q = 0, the subgroup EX q necessarily a complement of ∆ (A) (see also [5, Section 2]). 6 ROCCO AND RODRIGUES Now let G be any group and write Gab = G/G0 . The natural projection G  Gab induces an epimorphism π : ν q (G) → ν q (Gab ). We denote by π0 the restriction of π to Υq (G). By [10, Lemma 2.14 (iii)] we have that Ker(π0 ) = [G0 , Gϕ ][G, G0 ϕ ]hGb0 i, which reduces to [G0 , Gϕ ]hGb0 i, by force of Corollary 2.2 (i). In addition, using relations (5) and (7), an induction argument as in the proof of the Proposition2.3 (ii) shows that d 0 ) ≤ [G0 , Gϕ ] and, consequently, Ker(π ) = [G0 , Gϕ ]. (G 0 The next Lemma extends [5, Lemma 2.1] to all q ≥ 0 (see also [24, Proposition 3.3]). We shall omit the proof. Lemma 2.7. Let q be a non negative integer and G be a group such that Gab is finitely generated. Assume that Gab is a direct product of the cyclic groups Ci = hxi G0 i, for i = 1, . . . , r and set E q (G) = hxbi , [xj , xϕk ] | 1 ≤ i ≤ r, 1 ≤ j < k ≤ r rangle [G0 , Gϕ ]. Then, (i) ∆q (G) = h[xi , xϕi ], [xj , xϕk ][xk , xϕj ] | 1 ≤ i ≤ r, 1 ≤ j < k ≤ ri; (ii) Υq (G) = ∆q (G)E q (G). With the above notation, let π1 denote the restriction of π0 to ∆q (G), π1 : ∆q (G)  ∆ (Gab ), and let N = Ker(π1 ). Therefore, N = ∆q (G)∩[G0 , Gϕ ] (= ∆q (G) ∩ E q (G)) , a central subgroup of Υq (G). Our next theorem generalizes, to all q ≥ 0, Proposition 2.2 in [5], which in turn improves Proposition 3.3 in [24]. q Theorem 2.8. Let q ≥ 0 and assume that Gab is finitely generated. Then, with the notation of Lemma 2.7, the following hold: (i) Υq (G)/N ∼ = ∆q (Gab ) × (G ∧q G); (ii) If q ≥ 1 and q is odd, then N = 1 and thus ∆q (G) ∼ = ∆q (Gab ) and Υq (G) ∼ = q ab q ∆ (G ) × (G ∧ G); (iii) For q = 0 or q ≥ 2 and q even, if Gab has no element of order two or if G0 has a complement in G, then also N = 1, ∆q (G) ∼ = ∆q (Gab ) and Υq (G) ∼ = q ab q ∆ (G ) × (G ∧ G); (iv) For q ≥ 2 and q even, if Gab has no element of order 2, then ∆q (G) is a  homocyclic abelian group of exponent q, of rank t+1 ; 2 ab (v) If G is free abelian of rank t, then the conclusion of the previous item holds if q = 0. for all q ≥ 1, while ∆q (G) is free abelian of rank t+1 2 Proof. (i): By Lemma 2.7 (ii) we have Υq (G) ∆q (G)E q (G) ∼ ∆q (G) E q (G) = × . = N N N N Now, ∆q (G)/N ∼ = ∆q (Gab ) and E q (G)/N = E q (G)/(∆q (G) ∩ E q (G)) ∼ = Υq (G)/∆q (G) ∼ = G ∧q G. This proves (i). Q-TENSOR SQUARE OF NILPOTENT GROUPS 7 (ii), (iii), (iv) and (v): Suppose that the torsion subgroup of Gab is the direct product of the cyclic groups hxi G0 i of order ni , 1 ≤ i ≤ s, and let the free part of Gab be the direct product of the cyclic groups hyj G0 i, 1 ≤ j ≤ t. Thus, o0 (xi ) = ni and o0 (yj ) = ∞. Set X := {xi | 1 ≤ i ≤ s} and Y := {yj | 1 ≤ j ≤ t}. Then G is generated by X ∪ Y ∪ G0 . Using Lemma 2.1 and Corollary 2.2 (see also [24, Proposition 3.3 and Remark 5]) we find that ∆q (G) is generated by the set ∆X ∪ ∆Y ∪ ∆XY , where ∆X = {[xi , xϕi ], [xj , xϕk ][xk , xϕj ] | 1 ≤ i ≤ s, 1 ≤ j < k ≤ s}, ∆Y = {[yj , yjϕ ], [yk , ylϕ ][yl , ykϕ ] | 1 ≤ j ≤ t, 1 ≤ k < l ≤ t}, ∆XY = {[xi , yjϕ ][yj , xϕi ] | 1 ≤ i ≤ s, 1 ≤ j ≤ t}. Set nik = gcd(ni , nk ). Parts (iv) and (v) of Corollary 2.2 give ([xi , xϕk ][xk , xϕi ])nik = 1 and ([xi , yjϕ ][yj , xϕi ])ni = 1, while [xi , xϕi ]ni ∈ Ker(π0 ), ∀i, k = 1, . . . , s, i < k, ∀j = 1, . . . t. Actually, Ker(π0 ) is generated by the set {[xi , xϕi ]ni | 1 ≤ i ≤ s}, by [24, Proposition 3.5]. Again by Corollary 2.2 (v), we get that if ni (= o0 (xi )) is odd, then [xi , xϕi ]ni = 1, while [xi , xϕi ]2ni = 1 if ni is even. Consequently, N = Ker(π0 ) is an elementary abelian 2-group of rank at most r2 (Gab ), the 2 − rank of Gab (see also [24, Corollary 3.6]). On the other hand, we should take into account that q is involved in the upper bound found in Corollary 2.2 ( v). Thus, if q ≥ 1 and q is odd, then gcd(q, 2ni ) = gcd(q, ni ) | ni and hence [xi , xϕi ]ni = 1, for all i = 1, . . . , s. Therefore N = 1 in this case, proving part (ii). It should be also clear that N = 1 if r2 (Gab ) = 0. This proves (iii) in the case where Gab has no element of order 2. Now, if G0 has a complement C in G, then every g ∈ G can be written as g = xh with x ∈ C and h ∈ G0 . Corollary 2.2 (iii) says that [g, g ϕ ] = [x, xϕ ] and thus ∆q (G) = h[x, xϕ ] | x ∈ Ci = ∆q (Gab ). This completes the prof of part (iii) (see also [5, Proposition 2.2]). Finally, we observe that [xi , xϕi ] = 1 = [xi , yjϕ ][yj , xϕi ] in the case where r2 (Gab ) = 0 and q ≥ 2, q even. Here we have ∆q (G) = h∆Y i and [yj , yjϕ ]q = 1 = ([yk , ylϕ ][yl , ykϕ ])q , ∀j, k, l = 1, . . . , t, k < l. That each of these  t+1 generators has order q follows immediately from Lemma 2.5, where we found 2 q C∞ ⊗ C∞ ∼ = C∞ × Cq . Part (v) follows by an analogous argument , as in part (iv); the last assertion can be also found in [24, Corollary 3.6]. The proof is complete.  We state the next Lemma for easy of reference, which in a certain sense extends ideas found in [19] for the case q = 0. A proof is given in [8] for q = 0 (see also [5, Proposition 3.2] for an alternative proof for this case) and in [16] for q ≥ 1. Lemma 2.9. Let F/R be a free presentation of a group G. Then G ∧q G ∼ = F 0 F q /[R, F ]Rq . Notice that there is a map ρ : ν q (G) −→ G, g 7−→ g, g ϕ 7−→ g and b k 7−→ k q . Let ρ0 = ρ|Υq (G) : Υq (G) −→ G, [g1 , g2 ϕ ] 7−→ [g1 , g2 ], b k 7−→ k q . q q Following [10] we write θ (G) = Ker(ρ) and µ (G) = Ker(ρ0 ) = Υq (G) ∩ θq (G). It follows that Υq (G)/µq (G) ∼ = G0 Gq . If G = F/R is a free presentation of G, then (10) H 2 (G, Zq ) ∼ = R ∩ F 0 F q /Rq [R, F ] = (G ∧q G) ∩ M q (G), 8 ROCCO AND RODRIGUES where M q (G) = R/Rq [R, F ] is the q-multiplier of G. From this we obtain (see for instance [10, Theorem 2.12]): (11) µq (G)/∆q (G) ∼ = H 2 (G, Zq ), for all q ≥ 0. Corollary 2.10. Let Fn be the free group of rank n. Then (i) For q ≥ 1, (n+1) Fn ⊗q Fn ∼ = Cq 2 × (Fn )0 (Fn )q . (ii) ([9, Proposition 6]) For q = 0, (n+1 ) Fn ⊗ Fn ∼ C = ∞ 2 × (Fn )0 . Proof. Since Fnab is free abelian of rank n, by Theorem 2.8 (ii), (iii) and (v), we have: Υq (Fn ) ∼ = ∆q (F ab ) × (Fn ∧q Fn ). n n+1 2 ( (i): If q ≥ 1 then ∆q (Fnab ) ∼ = Cq ) and, by Lemma 2.9 (i) with G = Fn and R = 1, Fn ∧ Fn ∼ = (Fn )0 (Fn )q . q This proves (i). (n+1) (ii): If q = 0 then ∆q (Fnab ) ∼ = C∞ 2 and, again by the previous Lemma, Fn ∧ Fn ∼ = (Fn )0 .  This completes the proof. Corollary 2.11. Let Nn,c = Fn /γc+1 (Fn ) be the free nilpotent group of class c ≥ 1 and rank n > 1. Then (i) For q ≥ 1, ( Nn,c ⊗q Nn,c ∼ = Cq n+1 2 ) × (Fn )0 (Fn )q . γc+1 (Fn )q γc+2 (Fn ) (ii) ([6, Corollary 1.7]) For q = 0, (n+1) Nn,c ⊗ Nn,c ∼ = C∞ 2 × (Nn,c+1 )0 . Proof. (i) and (ii) follow by similar arguments as above, taking into account that here we have R = γc+1 (Fn ) and thus [R, F ], as in Lemma 2.9, is precisely γc+2 (Fn ).  3. q-Tensor Squares of Nilpotent Groups of Class 2 In this section we restrict our considerations to finitely generated nilpotent groups G of class two. We begin with a general result concerning polycyclic groups found in [10]; this generalizes to all q ≥ 0 a result due to Blyth and Morse in [4] for q = 0, which in turn extends to all polycyclic groups a similar result for finite solvable groups found in [24]. Lemma 3.1. ([10, Corolary 3.6]) Let G be a polycyclic group with a polycyclic generating sequence pgs(G) = (a1 , . . . , an ) . Then Q-TENSOR SQUARE OF NILPOTENT GROUPS 9 (i) [G, Gϕ ], a subgroup of ν q (G), q ≥ 0, is generated by   ϕ ϕ ϕ ϕ β ϕ α [G, G ] = [ai , ai ], [ai , aj ][aj , ai ], [ai , (aj ) ], for 1 ≤ i < j ≤ n, 1 ≤ k ≤ n , (ii) Υq (G), a subgroup of ν q (G), q ≥ 1, is generated by   ϕ ϕ ϕ ϕ β d q α Υ (G) = [ai , ai ], [ai , aj ][aj , ai ], [ai , (aj ) ], (ak ), for 1 ≤ i < j ≤ n, 1 ≤ k ≤ n , ( 1 where α = ±1 if o(ai ) < ∞ and β = if o(ai ) = ∞ ( 1 ±1 if o(aj ) < ∞ if o(aj ) = ∞. ϕ ϕ (iii) ∆q (G) is generated by the set {[ai , aϕ i ], [ai , aj ][aj , ai ], for 1 ≤ i < j ≤ n}. Now let G be a finitely generated nilpotent group of class two and assume that G is generated by g1 , g2 , · · · , gn . Thus, any element g ∈ G can be written as n Y Y (12) g= gimi [gj , gk ]ljk , i=1 1≤j<k≤n where the exponents mi and ljk are integers. Consequently, G has the following polycyclic generating set (13) {gi , 1 ≤ i ≤ n} ∪ {[gj , gk ], 1 ≤ j < k ≤ n}. The following theorem extends a result of Bacon in [2, Theorem 3.1] (see also [3]) for all q ≥ 0. We provide a proof for the case q = 0 using the commutator approach; the general case follows straightforward from this case and Lemma 3.1 (ii), but we shall prove it in this case too, for the sake of completeness. Theorem 3.2. Let G be a nilpotent group of class two with d(G) = n, then 2 (i) ([2, Theorem 3.1]) d([G, Gϕ ]) ≤ n(n +3n−1) ; 3 2 +3n+2) n(n (ii) d(G ⊗q G) ≤ , for all q ≥ 0; 3 (iii) In particular, if G has finite exponent e(G) and gcd(q, e(G)) = 1 , then d(G ⊗q G) ≤ n2 . Proof. On assuming that G is generated by g1 , . . . , gn then we obtain the polycyclic generating set given by (13). Thus, by Lemma 3.1 (i) we have that Υ(G) = [G, Gϕ ] is generated by the following set of elements: {[giα , (gjϕ )β ] : 1 ≤ i, j ≤ n}∪ {[giα , ([gj , gk ]ϕ)β ] : 1 ≤ i ≤ n, 1 ≤ j < k ≤ n}∪ {[[gj , gk ]β , (giϕ )α ] : 1 ≤ i ≤ n, 1 ≤ j < k ≤ n}∪ {[[gr , gs ]α , ([gt , gu ]ϕ )β ] : 1 ≤ r < s ≤ n, 1 ≤ t < u ≤ n}, where α, β ∈ {−1, 1}. Now by Lemma 2.1, parts (ii), (iii), (ix), (x), and the fact that G has class 2, we can further reduce the above set to obtain (14) {[gi , gjϕ ] : 1 ≤ i, j ≤ n} ∪ {[gi , [gj , gk ]ϕ ] : 1 ≤ i ≤ n, 1 ≤ j < k ≤ n}. 10 ROCCO AND RODRIGUES This new set has n2 generators of the form [gi , gjϕ ] and n(n − 1) generators of the form [gi , [gj , gi ]ϕ ]. It remains to count the generators of the form [gi , [gj , gk ]ϕ ], when i, j, k are all distincts and j < k. Now by [23, Corollary 3.2] ν(G) has nilpotency class at most 3 and thus, again [gjϕ , gkϕ , gi ][gkϕ , giϕ , gj ][gi , gj , gkϕ ] = 1. It then follows that [gi , [gj , gk ]ϕ ] = [gj , [gi , gk ]ϕ ][gk , [gj , gi ]ϕ ]. Therefore, 1 d([G, Gϕ ]) ≤ n(n2 + 3n − 1). 3 This proves part (i). (ii): Part (i) also proves (ii) in case q = 0, giving us the better bound for d(G ⊗ G). Thus, we shall assume q ≥ 1. Since Υq (G) = [G, Gϕ ]G it suffices to control the number of generators of both [G, Gϕ ] and G. We already know by part (i) that [G, Gϕ ] is generated by the set {[gi , giϕ ] : 1 ≤ i, j ≤ n} ∪ {[gi , [gj , gk ]ϕ ] : 1 ≤ i ≤ n, 1 ≤ j < k ≤ n}. Now, by definition the subgroup G is generated by Gb = {b g , g ∈ G}. By Qq−1 q ϕ −i g q−1−i b c ) h, for all the defining relations (5) of ν (G) we have gh = gb ( i=1 [g, (h ) ] ϕ c b b b g, h ∈ G, and hence gh ≡ gb h (mod [)G, G ], for all gb, h ∈ G. Since every element g ∈ G has a unique expression in the form (12) and given the fact that, for every ϕ q ϕ \ commutator [gj , gk ] ∈ G0 , [g j , gk ] = [gj , gk ] ∈ [G, G ] (by relations (7)), we see in later ϕ stage that G is generated, modulo [G, G ], by the n elements gb1 , . . . , gbn . Therefore, we conclude that d(Υq (G)) ≤ 13 (n3 + 3n2 + 2n). This proves part (ii). (iii): If in particular G has finite exponent e(G) and gcd(q, e(G)) = 1, then we see by Lemma 2.1 (vi) that all generators of the forms [gi , giϕ ] and [gi , [gj , gk ]ϕ ] are trivial. Consequently, d(G ⊗q G) ≤ n2 in this case. The proof is complete.  In [1] Aboughazi computed the nonabelian tensor square of the Heisenberg group H = F2 /γ3 (F2 ), where F2 denotes the free group of rank 2. There, it is found that H⊗H ∼ = Z6 , thus showing that the bound in Theorem 3.2 is sharp. Later, Bacon in [2, Theorem 3.2] computed Nn,2 ⊗ Nn,2 for all n ≥ 2, to show that the bound is also reached for the free n−generator nilpotent group of class 2, n > 1: Nn,2 ⊗ Nn,2 is a free abelian group of rank 31 n(n2 + 3n − 1). It is not difficult to extend these results to the q−tensor square Υq (Nn,2 ), q ≥ 1, to show that the bound in Theorem 3.2 (ii) is also attained. In fact, the next proposition is but a specialization of Corollary 2.11. We write M (G) to denote the Schur multiplier H2 (G, Z) of G. Proposition 3.3. Let Nn,2 be the free nilpotent group of rank n > 1 and class 2, Nn,2 = Fn /γ3 (Fn ). Then, (i) ([2, Theorem 3.2]) Nn,2 ⊗ Nn,2 is free abelian of rank 31 n(n2 + 3n − 1). More precisely, 0 Nn,2 ⊗ Nn,2 ∼ . = ∆(Fnab ) × M (Nn,2 ) × Nn,2 n+1 q 0 (ii) Nn,2 ⊗q Nn,2 ∼ Nn,2 , where Mn (3) = 31 (n3 − n) is = (Cq )(( 2 )+Mn (3)) × Nn,2 the q−rank of γ3 (Nn,2 )/γ3 (Nn,2 )q γ4 (Nn,2 ), according to the Witt’s formula. Q-TENSOR SQUARE OF NILPOTENT GROUPS 11 Consequently, for q > 1 1 d(Nn,2 ⊗q Nn,2 ) = (n3 + 3n2 + 2n). 3 Proof. As in the proof of Corollary 2.11, using Lemma 2.9 we can write G ∧q G ∼ = F 0 F q /[R, Fn ]Rq . n n In view of (10), H 2 (G, Zq ) ∼ = R ∩ Fn0 Fnq /Rq [R, Fn ]. Taking into account that R = γ3 (Fn ) ≤ Fn0 Fnq we have the exact sequence γ3 (Fn ) Fn0 Fnq Fn0 Fnq (15) 1→ → 1. → → γ4 (Fn )γ3 (Fn )q γ4 (Fn )γ3 (Fn )q γ3 (Fn ) M (3) Here we find that H2 (Nn,2 , Zq ) ∼ = γ3 (Fn )/γ4 (Fn )γ3 (Fn )q ∼ = Zq n , for all q ≥ 0, where, by the Witt’s formula for the rank of γr (Fn )/γr+1 (Fn ), r 1X Mn (r) = µ(d)n d , r d|r where µ denotes the Möbius function. (i): If q = 0 then the exact sequence (15) splits and thus we have, by Corollary 2.11, 1 (n3 −n) (n+1) (n+1) (n) 3 Nn,c ⊗ Nn,c ∼ . = C∞ 2 × γ3 (Fn )/γ4 (Fn ) × γ2 (Fn )/γ3 (Fn ) ∼ = C∞ 2 × C∞2 × C∞ This is the result of Bacon, that d(Nn,2 ⊗ Nn,2 ) = 31 n(n2 + n − 1). (ii): If q > 1 then we see by the generators of Nn,2 ⊗q Nn,2 found in Theorem 3.2 that the image by ρ0 of the subgroup hb gi , [gj , gkϕ ] | 1 ≤ i ≤ n, 1 ≤ k < j ≤ ni q 0 Nn,2 of Nn,2 , while the subgroup h[gj, gi , gkϕ ]i, where [gj, gi , gk ] is the subgroup Nn,2 is a basic commutator of γ3 (Fn )/γ4 (Fn ), is isomorphic to γ3 (Fn )/γ4 (Fn )γ3 (Fn )q ∼ = H2 (Nn,2 , Zq ), a homocyclic abelian group of exponent q and q−rank Mn (3) = 31 (n3 − n). Consequently, also in this case we get that the sequence (15) splits and we then find that (n+1)+Mn (3) q 0 × Nn,2 Nn,2 . Nn,2 ⊗q Nn,2 ∼ = Cq 2 Therefore, d(Nn,2 ⊗q Nn,2 ) = 31 n(n2 + 3n + 2), thus showing that the upper bound given in Theorem 3.2 (ii) is also achieved when q > 1.  References [1] Aboughazi, R., Produit Tensoriel du Groupe D’Heisenberg, Bull. Soc. math. France, 115 (1987), 95–106. [2] Bacon, M., On the non-abelian Tensor Square of a Nilpotent Group of Class Two, Glasgow Math. J., 3 (1994), 291–295. [3] Bacon, M. and L.-C. Kappe The nonabelian tensor square of a 2-generator p-group of class 2. Arch. Math. (Basel) 61 (1993), 508–516. [4] Blyth, R. D., Morse, R. F., Computing the nonabelian tensor square of polycyclic groups, J. Algebra 321 (2009), 2139–2148. [5] Blyth, R. D., Fumagalli, F., Morigi, M., Some structural results on the non- abelian tensor square of groups, J. Group Theory, 13, No.1 (2010), 83–94. 12 ROCCO AND RODRIGUES [6] Blyth, R. D., Moravec, P., Morse, R. F. On the nonabelian tensor squares of free nilpotent groups of finite rank. In Computational Group Theory and the Theory of Groups, Contemporary Mathematics 470 (American Mathematical Society, 2008), pp. 27–44. [7] Brown, R., q-perfect Groups and Universal q-central Extensions, Publ. Mat., 34 (1990), 291-297. [8] Brown, R. and Loday, J.-L., Van Kampen Theorems for Diagrams of Spaces, Topology, 26 (1987), 311–335. [9] Brown, R., Johnson, D. L., Robertson, E. F., Some computations of non-abelian tensor products of groups, J. Algebra 111 (1987), 177– 202, . [10] Bueno, T. P. and Rocco, N. R., On the q-tensor square of a group, J. Group Theory, 14 (2011), 785–805. [11] Conduché D., Rodriguez-Fernandez, C., Non-abelian Tensor and Exterior Products modulo q and Universal q-central Relative Extensions, J. Pure Appl. Algebra, 78, No.2 (1992), 139–160. [12] Eick, B., Nickel, W., Computing the Schur multiplicator and the nonabelian tensor square of a polycyclic group, J. Algebra 320 No.2 (2008), 927–944. [13] Eick, B., Nickel, W., POLYCYCLIC - Computation with polycyclic groups, A GAP 4 package. In The Gap Group, GAP—Groups, Algorithms, and Programming, Version 4.5.7, 2014 (http://www.gap–system.org). [14] Ellis, G., Tensor Product and q-crossed Modules, J. London Math. Soc., 2 (51) No.2 (1995), 243–258. [15] Ellis, G., Leonard, F., Computing Schur multipliers and tensor products of finite groups, Proc. Royal Irish Acad., 95A (1995), 137–147. [16] Ellis, G., Rodríguez-Fernández, C., An exterior product for the homology of groups with integral coefficients modulo p, Cah. Top. Géom. Diff. Cat. 30, 339–343, (1989). [17] Gilbert, N. D., Higgins, P. J., The non-abelian tensor product of groups and related constructions, Glasgow Math. J. 31 (1989), 17–29. [18] McDermott, A., The Nonabelian Tensor Product of Groups: Computations and Structural Results, PhD Thesis, Nat. Univ. Ireland, Gallway, 1998. [19] Miller, C., The Second Homology Group of a Group; Relations Among Commutators, Proc. Amer. Math. Soc. 3 (1952), 588–595. [20] Nakaoka, I. N., Non abelian tensor products of solvable groups, J. Group Theory 3 (2000), 157–167. [21] Nakaoka, I. N. and Rocco, N. R., A survey of non-abelian tensor products of groups and related constructions, Bol. Soc. Paran. Mat. 30 1 ( 2012), 77–89. [22] Robinson, Derek J. S., A Course in the Thoery of Groups, second edition, Graduate Texts in Mathematics 80, Springer-Verlag New York (1996). [23] Rocco, N. R.,On a Construction Related to the Non-Abelian Tensor Square of a Group, Bol. Soc. Bras. Mat., 22, No.1 (1991), 63–79. [24] Rocco, N. R., A Presentation for a Crossed Embedding of Finite Solvable Groups, Comm. in Algebra,22(6) (1994), 1975–1998. [25] Rodrigues, Eunice C. P., Cotas Superiores para o Expoente e o número mínimo de geradores do Quadrado q-Tensorial de Grupos Nilpotentes, Doctoral Thesis (in Portuguese), Universidade de Brasília, Brasilia, DF, Brazil, 2011. Available at http://repositorio.unb.br/handle/10482/8717. Departamento de Matematática, Universidade de Brasília, Brasilia-DF, 70910-900 Brazil E-mail address: [email protected] Departamento de Matemática, Universidade Federal de Mato Grosso, Rondonópolis-MT, 85735-001 Brazil E-mail address: [email protected]
4math.GR
1 Curvature of Hypergraphs via Multi-Marginal Optimal Transport Shahab Asoodeh1, Tingran Gao2 , and James Evans3 arXiv:1803.08584v1 [cs.IT] 22 Mar 2018 Abstract We introduce a novel definition of curvature for hypergraphs, a natural generalization of graphs, by introducing a multimarginal optimal transport problem for a naturally defined random walk on the hypergraph. This curvature, termed coarse scalar curvature, generalizes a recent definition of Ricci curvature for Markov chains on metric spaces by Ollivier [Journal of Functional Analysis 256 (2009) 810-864], and is related to the scalar curvature when the hypergraph arises naturally from a Riemannian manifold. We investigate basic properties of the coarse scalar curvature and obtain several bounds. Empirical experiments indicate that coarse scalar curvatures are capable of detecting “bridges” across connected components in hypergraphs, suggesting it is an appropriate generalization of curvature on simple graphs. I. I NTRODUCTION Complex systems or datasets are often modeled as weighted simple graphs in network science problems. While edges in these simple graphs qualitatively characterize similarity or adjacency relations among entities represented by the graph vertices, the edge weights are frequently used to quantify the nature of the interactions between pairs of nodes. Simple yet powerful as these simple graph models are, many recent work reported the importance of understanding higher-order interactions among more than a pair of nodes, rendering simple graphs insufficient as a natural model for capturing the network structure information in these practices. Applications of this type include spatial network [1], image tagging [2], image retrieval [3], cellular networks [4], and co-authorship network [5], to name just a few. Hypergraphs have been proposed as a replacement to tackle this difficulty. Roughly speaking, a hypergraph H = (V, E) consists of a finite set V of vertices and a set of hyperedges E ⊆ 2V – just as edges in a simple graph that can be identified with vertex pairs, hyperedge E ∈ E are subsets of V . The ubiquitous influence in modeling complex networks fostered numerous recent developments in the theory and algorithms of hypergraphs, including extensive studies of the spectral and algebraic properties such as hypergraph Laplacian [6], hypergraph partitioning [7], Cheeger’s inequality for hypergraph [8], and spectrum of hypergraphs [9]. Among many tools developed for better understanding the geometry of graphs, the graph Ricci curvature [10]–[14] has attracted an increasing amount of interest in the past years. In his original work [10], Ollivier defined coarse Ricci curvature for metric measure spaces, including simple graphs and Markov chains as special cases. In a nutshell, the coarse Ricci curvature summarizes the behavior of shortest paths with close-by starting points and parallel initial directions: two such paths tend to get closer to each other in a metric space of positive Ricci curvature, and further if the space is negatively curved. On simple graphs, this notion of Ricci curvature has found applications ranging from bounding the chromatic number [15] and analyzing the Internet topology [16] to measuring the stability in financial networks [17], brain structural connectivity [18], and similarity of networks [19]. This paper proposes a novel definition of curvature for hypergraphs by generalizing Ollivier’s coarse Ricci curvature through a multi-marginal optimal transport framework (see e.g. [20]–[22]). Analogous to coarse Ricci curvatures, our definition of hypergraph curvature is grounded upon differential geometric intuitions, and reduces to the graph Ricci curvature when the hypergraph is a simple graph. While the coarse Ricci curvature is defined for pairs of points, which are naturally identified with edges in simple graphs, we need to adjust the construction to account for ≥ 3 vertices joined by a hyperedge simultaneously; consequently, the geometric information captured in our definition is a summary of a small neighborhood enclosing all the end nodes of a hyperedge, as opposed to the directional information revealed by the Ricci curvature. In fact, our construction corresponds to the scalar curvature of Riemannian manifolds under appropriate manifold assumptions analogous to the manifold Ricci curvature example in [10]. The rest of the paper is structured as follows. We list a few useful notation in Section II-A. After a brief review of coarse Ricci curvature in Section II-B, we define coarse scalar curvature in Section II-C. Based on this definition, we then propose our notion of hypergraph curvature and investigate its properties in Section II-D. We derive a closed form for the curvature of complete uniform hypergraphs in Section III and a general lower bound for hyperpaths in Section IV. In Section V, we provide a detailed consistency result for the definition of coarse scalar curvature in a Riemannian manifold setting. Finally, we conclude the paper in Section VI. 1 Computation Institute and Institute of Genomics and System Biology, The University of Chicago, Chicago, IL 60637 [email protected] of Statistics, The University of Chicago, Chicago, IL 60637 [email protected] 3 Computation Institute and Department of Sociology, The University of Chicago, Chicago, IL 60637 [email protected] 2 Department 2 II. H YPERGRAPH C URVATURE VIA M ULTI -M ARGINAL O PTIMAL T RANSPORT A. Notations P PFor each vertex i of a hypergraph H = (V, E), we use di := E∈E 1{i∈E} to denote the degree of vertex i and d(E) := r∈V 1{r∈E} to denote the cardinality of hyperedge E ∈ E. Similar to graph, we use N (i) for the neighbors of vertex i, i.e., N (i) = {j ∈ V : ∃E ∈ E, (i, j) ∈ E}. For a pair of vertices i and j of a hypergraph, d(i, j) denotes the shortest distance, i.e., d(i, j) = r if there exist r interesting hyperedges E1 , . . . , Er , such that i ∈ E1 , j ∈ Er , and Ek ∩ Ek+1 6= ∅ for 1 ≤ k ≤ r − 1. We will always denote M for a d-dimensional Riemannian manifold. We use expx (·) : Tx M → M to denote the exponential map. For any x ∈ M and v ∈ Tx M with kvk = 1, we denote Ricx (v, v) for the Ricci curvature at x ∈ M in the direction of v ∈ Tx M , defined as d 1 X hR (v, ei ) v, ei i (1) Ricx (v, v) = d − 1 i=2 where v, e2 , · · · , ed constitutes an orthonormal basis for Tx M , and R is the Riemannian curvature tensor. We will often write Ric (v, v) for Ricx (v, v) when the point x is fixed throughout the discussion. Averaging out Ricx (v, v) for v ranging in an orthonormal basis of Tx M gives rise to the scalar curvature at x ∈ M : d Scal (x) = 1X Ricx (zi , zi ) d i=1 (2) where z1 , · · · , zd constitutes an orthonormal basis for Tx M . Equivalently, the scalar curvature can be obtained from averaging out the Ricci curvature over the unit sphere in the tangent plane, i.e. (c.f. [23, Exercise 4.9]) Z 1 Ricx (v, v) dSd−1 (v) (3) Scal (x) = ωd−1 Sd−1 (0) where Sd−1 (0) is the unit sphere in Tx M and ωd−1 is the volume of the standard (d − 1)-dimensional sphere in Rd . For any set A ∈ Rn , we let P (A) denote the set of all probability measures defined on A. B. Graph Ricci Curvature Given a graph G = (V, E) and a pair of vertices x, y ∈ V , Ollivier [10] defined the curvature of edge (x, y) ∈ E as κ(x, y) := 1 − W (mx , my ) , d(x, y) (4) where d(x, y) is the shortest distance from x to y, mi is the uniform random walk starting at i ∈ V , and W (mx , my ) is the Wasserstein distance between mx and my given by X W (mx , my ) := inf d(r, s)π(r, s), (5) π∈Π(mx ,my ) (r,s)∈V 2 where Π(mx , my ) is the set of all joint distributions having mx and my as marginals (i.e., the set of all couplings of mx and my ). He then showed that positive curvature is equivalent to the contraction of the random walk under Wasserstein’s distance which in turn leads to the existence of a unique stationary distribution. To justify that (4) is a valid discrete version of Ricci curvature, Ollivier argued as follows. In a d-dimensional Riemannian manifold (M, dM ), consider the random walk (c.f. Definition 1) dmεx for each x ∈ M and ε > 0 given by dmεx (s) := 1B(x,ε) (s) dvol(s), vol(B(x, ε)) (6) where B (x, ε) = {z ∈ M | dM (x, z) < ε} is the metric ball with radius ε centered at x and 1{x∈A} is the indicator function of set A. It is then shown [10, Example 7] that for sufficiently small δ = dM (x, y) > 0  W1 mεx , mεy ε2 Ric(v, v) 1− = + O(ε3 + ε2 δ), (7) dM (x, y) 2(n + 2)  where v ∈ Tx M is a unit tangent vector at x such that expx (δv) = y and where W1 mεx , mεy is the L1 -Wasserstein distance between mεx and mεy Z  ε ε inf dM (x, y) dπ (x, y) . (8) W1 mx , my := π∈Π(mεx ,mεy ) M×M In Riemannian geometry, Ricci curvature Ricx (v, v) is, up to a scaling factor, the average of the sectional curvatures of all two-dimensional subspaces of Tx M passing through v [23, §4] and hence, it measures the coupling of the random walks. In this context, if the curvature of a point in a manifold is zero, it is locally on a Euclidean space, positive if it is locally on an sphere and negative if it locally on a hyperbolic space. 3 C. Coarse Scalar Curvature for Metric Spaces We begin our construction of coarse scalar curvature by defining random walks on a metric space, which was used in [10] to define coarse Ricci curvatures. Definition 1 ( [10] Definition 1). Let (M, dM ) be a Polish metric space equipped with its Borel σ-algebra. A random walk m on M is a family of probability measures {mx | x ∈ M } satisfying • The map x 7→ mx is measurable; • Each mx has finite first moment. Definition 2 (Coarse Scalar Curvature). For a collection of n points Xn := {x1 , · · · , xn } in a metric space (M, dM ) with random walk m := {mx | x ∈ M }, define the coarse scalar curvature for Xn by κ ({Xn }) := 1 − W1 (Xn ) , c(x1 , . . . , xn ) (9) where W1 (Xn ) is the minimum of the multi-marginal optimal transport problem Z W1 (Xn ) := inf c (ξ1 , · · · , ξn ) dπ (ξ1 , · · · , ξn ) , π∈Π(Xn ) with M×···×M n o Π (Xn ) := Π (m1 , · · · , mn ) = π ∈ P (M × · · · × M ) | (Projk )# π = mxk , ∀1 ≤ k ≤ n , with (A)# π being the push-forward of measure π under mapping A and c (ξ1 , · · · , ξn ) := inf z∈M n X dM (ξi , z) . (10) i=1 It must be mentioned that the multi-marginal optimal transport problem is first studied in Gangbo and Świȩch [22] where they showed the necessary conditions for the existence and uniqueness of the optimizer when c(ξ1 , · · · , ξn ) is the sum of pairwise ℓ2 distances. The coarse scalar curvature is closely tied to the multi-marginal optimal transport problem among n ≥ 2 probability measures mx1 , · · · , mxn , which is a direct generalization of the pairwise Wasserstein distance between measures. We will make frequent use of the following well-known facts in the theory of multi-marginal optimal transport problems (see e.g. [20]–[22], [24], [25] and the references therein): Proposition 1 (Multi-marginal and barycenter [20]). The minimum of the multi-marginal optimal transport problem is equal to the minimum of the Wasserstein barycenter problem, i.e. W1 (Xn ) = inf ν∈P(M) n X W1 (mxi , ν) (11) i=1 where the L1 -Wasserstein distance W1 (m, ν) for any m, ν ∈ P (M ) is defined in (8). The minimization problem in (11) is called Wasserstein barycenter of Xn . Proposition 2 (Duality [25]). W1 (Xn ) = sup n Z X (f1 ,··· ,fn )∈F i=1 fi (ξ) dmxi (ξ) (12) M where the supremum is taken over n o n X fi (ξi ) ≤ c (ξ1 , · · · , ξn ) . F := (f1 , · · · , fn ) fi ∈ L1 (M, mxi ) ∀1 ≤ i ≤ |ex | , i=1 We postpone the justification of our nomenclature of “scalar curvature” in Section V, under an appropriate manifold setting. Briefly speaking, at least when the hypergraph arises from a Riemannian manifold in a natural geometric construction, the coarse scalar curvature (9) is asymptotically lower bounded by the scalar curvature of the Riemannian manifold. 4 D. Hypergraph Curvature Let a hypergraph H = (V, E) with V = {1, 2, . . . , N } and a hyperedge E = {1, 2, . . . , n} be given. Inspired by coarse scalar curvature, we wish to define the curvature for each hyperedge E of H. To this goal, we first need to define random walk over hypergraphs. It is natural to define the (uniform) random walk started at vertex i ∈ V on H as the following: for each j ∈ V X 1 1 , (13) mi (j) = di d(E) − 1 E∈E:(i,j)∈E and hence we associate E with n probability measures mi ∈ P(V ), 1 ≤ i ≤ n. Replacing Xn with {1, 2, . . . , n} in P Definition 2 and defining c(x1 , . . . , xn ) = minz∈V ni=1 d(xi , z), we can define a multi-marginal optimal transport problem associated with E ∈ E as X W (E) := min c(xn )π(xn ), (14) π∈Π(m1 ,m2 ,...,mn ) xn ∈V n n where x = (x1 , x2 , . . . , xn ). It is worth mentioning that c(1, 2, . . . , n) = n − 1 as {1, 2, . . . , n} is a hyperedge. In general, c(x1 , . . . , xn ) ≥ n − 1 for distinct x1 , . . . , xn . Definition 3 (Hypergraph Curvature). The curvature of a hyperedge E = {1, 2, . . . , n} ∈ E is defined as W (E) . n−1 Note that if xi ∈ / N (i), then π(x1 , . . . , xi , . . . , xn ) = 0 for all π ∈ Π(m1 , . . . , mn ). Hence, we have either c(x1 , . . . , xn ) ≤ 3(n − 1) or π(x1 , . . . , xn ) = 0 for all π ∈ Π(m1 , . . . , mn ). This then demonstrates that, similar to graph curvature, −2 ≤ κ(E) ≤ 1. Specializing Propositions 1 and 2 to the hypergraph setting, we now provide two equivalent formulations for hypergraph curvature. Barycenter: Although the minimization problem in (14) is a linear program, its complexity is exponential in N . However, it turns out [26] that Wasserstein barycenter problem (11) can be solved quite efficiently. The equivalence between barycenter problem and multi-marginal optimal transport problem justifies to define the Wasserstein barycenter of hyperedge E as κ(E) := 1 − bar(E) := inf ν∈P(V ) Following mutatis mutandis Proposition 1, we have n X W (mi , ν). (15) i=1 bar(E) . (16) n−1 The term P barycenter makes sense by recalling that for the Euclidean space the barycenter of points {xi }ni=1 is given by n arg minx i=1 kxi − xk2 . Consequently, bar(E) is the barycenter of points {mi }ni=1 in the Wasserstein space (i.e., a metric space with Wasserstein distance). Duality Following mutatis mutandis Proposition 2, we can write the following dual formula for W (E) κ(E) = 1 − κ(E) = 1 − n X 1 Emi [fi (X)], sup n − 1 (f1 ,...,fn )∈K i=1 (17) where Eν [·] is the expectation operator with respect to measure ν and K is the set of all integrable real-valued functions on V such that for any vector (x1 , . . . , xn ) ∈ V n n X fk (xk ) ≤ c(x1 , . . . , xn ). (18) k=1 After defining hypergraph curvature, a natural question is whether or not this definition reduces to graph Ricci curvature (4) if the hypergraph is indeed a simple graph, i.e., the cardinality of each hyperedge is two. We answer this question in affirmative by invoking the barycenter interpretation. If H is in fact a graph and E is a hyperedge (i.e., n = 2 and thus E = {1, 2}), then bar(E) equals either m1 or m2 , because for any ν ∈ P(V ) the triangle inequality implies W (m1 , ν) + W (m2 , ν) ≥ W (m1 , m2 ). Thus, hypergraph curvature coincides with (4). It is a well-known fact that Ollivier-Ricci curvature of edge (x, y) depends heavily on the number of common neighbors of x and y. Specifically, if N (x) ∩ N (y) = ∅, then κ(x, y) ≤ 0 (see e.g., [14]). We now prove a similar result for hypergraphs. Theorem 1. For any hyperedge E with cardinality m, we have X |N (υ) ∩ N (ϑ) ∩ F | . W (E) ≥ 1 − min υ,ϑ∈E (d(F ) − 1)dυ F ∈E 5 Proof. Let again E be denoted by {1, 2, . . . , n}. The proof relies on the dual formula of W (E). In order to make use of (17), we need to find a set of functions {fj }nj=1 that satisfy the constraint (18). Fix two vertices υ and ϑ in E. Set fi ≡ 0 for i ∈ E\{ϑ, υ} and suppose fυ (r) + fϑ (s) ≤ d(r, s), (19) for all pairs of vertices (r, s). Then we have for any vector (x1 , . . . , xn ) ∈ V n n X fi (xi ) = fυ (xυ ) + fϑ (xϑ ) i=1 ≤ d(xυ , xϑ ) = min [d(xυ , z) + d(xϑ , z)] ≤ c(x1 , . . . , xn ). z∈V Hence, the constraints fi ≡ 0 for i ∈ E\{ϑ, υ} and (19) are sufficient to satisfy (18). Letting Cυ,ϑ denote the set of real-valued functions satisfying (19), we can write X X fυ (r)mυ (r) + W (E) ≥ sup fϑ (r)mϑ (r) fυ ,fϑ ∈Cυ,ϑ r∈V = sup X f ∈A r∈V r∈V f (r) [mυ (r) − mϑ (r)] , where the last equality is due to [27, Theorem 1.14] and A is the set of all real-valued 1-Lipschitz functions f on V , that is A := {f : V → R : |f (r) − f (s)| ≤ d(r, s)}. Now consider the following function f (r) = ( 2, if r ∈ N (υ)\N (ϑ), 1, otherwise. Clearly, f ∈ A and therefore, W (E) ≥ X f (r) [mυ (r) − mϑ (r)] r∈V = X 2 mυ (r) + = mυ (r) − 1 r∈N (υ)∩N (ϑ) r∈N (υ)\N (ϑ) = X 1 − mυ (N (υ) ∩ N (ϑ)) X |N (υ) ∩ N (ϑ) ∩ F | . 1− (d(F ) − 1)dυ F ∈E In light of this theorem, we have X |N (υ) ∩ N (ϑ) ∩ F | . υ,ϑ∈E (d(F ) − 1)dυ κ(E) ≤ min (20) F ∈E If H happens to be a simple graph, then for every edge E = (υ, ϑ), we have mυ (N (υ) ∩ N (ϑ)) = of triangles supported on edge E. Hence, the bound (20) implies κ(υ, ϑ) ≤ ∆ , max{dυ , dϑ } ∆ dυ , where ∆ is the number (21) which appears in [14, Theorem 4]. Remark 1 (Curvature as a projection of Boltzmann). Cuturi [26] introduced an entropic regularized version of Wasserstein distance between two measures as X π(r, s)d(r, s) − εH(π) Wε (µ, ν) := inf π∈Π(µ,ν) = ε inf (r,s)∈V ×V π∈Π(µ,ν) D(πkKε ) − ε log Z(ε), (22) where ε > 0 is the regularization parameter, H(·) denotes the Shannon entropy function, Kε is the Boltzmann distribution P −d(x,y)/ε and Z(ε) := (x,y)∈V ×V e−d(x,y)/ε . It follows that W (µ, ν) = limε↓0 Wε (µ, ν) [?]. As defined as Kε (x, y) := e Z(ε) mentioned in [26], despite the theoretically-guaranteed convergence, the procedure cannot work beyond a graph-dependent value ε0 beyond which some entries of Kε are represented as zeroes in memory. Since H(·) is a strictly concave function, the 6 optimization problem in (22) has a unique solution π ∗ which corresponds to the projection of Kε onto Π(µ, ν). Following this spirit, we can define the entropic regularized Wasserstein barycenter problem as := Wε (E) = n inf ν∈P(V ) n X Wε (mi , ν) i=1  ε inf D PkKε⊗n − nε log Z(ε) P∈C where C := {π1 ⊗ π2 ⊗ · · · ⊗ πn ∈ P (V × V ) : πi 1 = mi , and ∃η ∈ P(V ) s.t. πiT 1 = η}. Hence, Wε (E) is the unique projection of Kε⊗n onto C. Assuming ε is sufficiently small, it follows that W (m1 , . . . , mn ) is an approximation of this projection. III. C OMPLETE UNIFORM HYPERGRAPHS Graph Ricci curvature turns out to have a simple formula for complete graphs KN . In particular, it is shown [14] that −2 κ(x, y) = N N −1 for any edges (x, y) in KN . In this section, we show that complete uniform hypergraphs with N vertices have the same curvature as KN . n Definition 4. A hypergraph HN = (V, E) is called complete n-uniform for n ≤ |V | = N if E = [V ]n , where [V ]n is the collection of all n-subsets of V .  −1 2 n Notice that HN = KN . Recall that V = {1, 2, . . . , N }. It follows that in HN , we have d(j) = N n−1 , j ∈ V and d(E) = n  −2 for each E ∈ E. Furthermore, any pair of (i, j) ∈ E is contained in N n−2 many hyperedges. Therefore, according to (13), n the random walk started at j ∈ V of HN is mj (r) = 1{r6=j} N −1 ∀r ∈ V. (23) n Lemma 1. For every hyperedge E of HN , we have W (E) = n−1 . N −1 In particular, N −2 . N −1 In light of this lemma, the curvature of complete n-uniform hypergraphs is independent of n. This is, in fact, a result of the normalization in Definition 3. κ(E) = n Proof. Again let E = {1, 2, . . . , n}. Notice that for HM , we have d(r, s) = 1 for any distinct pair of vertices r, s ∈ V . Thus, we can write for a measure ν ∈ P(V ) n X W (m1 , ν) = i=1 = min π (1) ∈Π(m1 ,ν) min π (1) ∈Π(m1 ,ν) n = N X N X d(r, s)π (1) (r, s) + · · · + r=1 s=1 N X " 1− π (1) # (r, r) + · · · + r=1 1X kmi − νk, 2 i=1 min π (n) ∈Π(mn ,ν) min π (n) ∈Π(mn ,ν) " N X N X r=1 s=1 N X 1− π d(r, s)π (n) (r, s) (n) 1 n Pn i=1 mi . Recalling that mi (r) = 1{r6=i} N −1 , we obtain W (E) = n−1 . N −1 (r, r) r=1 where the last equality follows from [27, Exercise 1.17] and for two vectors a and b, ka − bk := obtain n n 1X 1X bar(E) = inf kmi − νk = kmi − m̄k, ν∈P(V ) 2 2 i=1 i=1 where m̄ = # P i |a(i) − b(i)|. Thus, we 7 Fig. 1. A hyperpath with 42 vertices and 7 hyperedges. For the green hyperdge, we have m = 10 and β = 7. Note that, unlike path graph, hyperpath might have cycles. IV. E XAMPLES In this section, we focus on the computation of hypergraph curvature in two examples to illustrate the differences and similarities with the graph curvature. The first example is a natural generalization of infinite path Pn ; a simple graph that has n vertices with n − 2 vertices of degree 2 and the other two of degree one. Example 1. It is shown [28] that Pn is one of the few graphs (among graphs with girth at least 5) with constant zero curvature. We now demonstrate in the following theorem that a similar statement does not hold for the hyperpath; a hypergraph whose vertices have degree at most 2. For the ease of presentation, we assume that any two intersecting hyperedges have exactly one common vertex; see Fig. 2. Theorem 2. For any hyperedge E of a hyperpath described above, we have W (E) ≤ β 3n − 4 2n − 3 + (n − β − 1) , 2(n − 1) 2(n − 1) where n := d(E) ≥ 3 and β := |{v ∈ E : ∄R ∈ E, v ∈ R}| < n. In particular, the curvature of hyperedge E is bounded from below by −(n − β − 2) κ(E) ≥ . 2(n − 1) Proof Sketch. The proof relies on the simple observation that for the hyperedge E = {1, 2, . . . , n}, we have W (E) ≤ P n i=1 W (mi , ν) for any probability measure ν ∈ P(V ). In particular, W (E) ≤ n X W (mi , m1 ). (24) i=2 Assuming that {1, 2, . . . , n − β} are vertices in E that are shared with other hyperedges and {n − β + 1, . . . , n} are isolated vertices inside E, we can employ a tedious (yet standard) linear-programming argument to show that W (m1 , mj ) = and W (m1 , mk ) = 3n − 4 , 2(n − 1) 2n − 3 , 2(n − 1) ∀j ∈ {2, . . . , n − β}, (25) ∀k ∈ {n − β + 1, . . . , n}. (26) Plugging (25) and (26) into (24), we obtain the result. In light of this result, we have κ(E) > 0 if only one vertex of E is shared, i.e., β > n − 2. In other words, the leaves of a hyperpath have positive curvature which is different from graph curvature in that in simple graphs (with girth at least 5) each edge connecting to a leaf has zero curvature, see [28, Theorem 3.3]. Example 2. As a toy example, consider the hypergraph H = (V, E) with V = {1, 2, . . . , 13} and E = {E1 , E2 , E3 , E4 }, where E1 = {1, 2, 3}, E2 = {2, 4, . . . , 7}, E3 = {6, . . . , 11}, and E4 = {7, 11, 12, 13}, as illustrated in Fig. 2. Using (13), we can compute the probability measures associated to each hyperedge. For instance, the random walk started at vertex 2 is µ2 = [0.25, 0, 0.25, 0.125, 0.125, 0.125, 0.125, 0, . . ., 0]. Since there are only 13 vertices, we can solve the optimization problem (14) (as a linear program) for each hyperedge. Solving this optimization problem, we obtain W (E1 ) = 1, W (E2 ) = 2.38, W (E3 ) = 2.08, and W (E4 ) = 1.45. Consequently, it follows that κ(E1 ) = 0.5, κ(E2 ) = 0.4, κ(E3 ) = 0.58, and κ(E4 ) = 0.52. Informally speaking, the hyperedge with the lowest curvature is the bridge connecting two components of hypergraphs. This is similar to the intuition of graph Ricci curvature, as experimentally observed in [29], that edges with negative curvature are locally shortcuts of two component of graph. 8 4 E2 5 2 3 E1 8 6 7 11 13 12 1 9 E3 10 E4 Fig. 2. The hypergraph studied in Example 2. V. C OARSE S CALAR C URVATURE IN A R IEMANNIAN M ANIFOLD S ETTING In this section, we establish a consistency result for the definition of coarse scalar curvature (9) under a Riemannian manifold setting. We will assume the hypergraphs of interest stem from a natural geometric model encoding adjacency relations among discrete points randomly sampled from a Riemannian manifold. Definition 5 (ε-Neighborhood Hypergraphs). Let (M, dM ) be a complete metric space. For any ε > 0, an ε-neighborhood hypergraph H = (V, E) supported on M consists of the following data: • A finite set of vertices V = {vi ∈ M, 1 ≤ i ≤ N }; • A set of hyperedges E, where each E ∈ E is a subset of V satisfying diam (E) := sup dM (u, v) < 2ε; u,v∈E Every subset U of vertices with diam (U ) < 2ε corresponds to a hyperedge EU ∈ E. We will denote |E| for the number of vertices joined by hyperedge E; |V | and |E| will be used to denote the number of vertices and hyperedges in H, respectively. • The definition of ε-neighborhood hypergraphs assumes that the spatial proximity of the vertices is faithfully reflected in the connectivity: the diameter of every hyperedge — understood as a discrete subset E ⊂ V — is bounded from above by 2ε. In the rest of this section, we will assume M is an orientable d-dimensional complete Riemannian manifold with finite volume, and the distance function dM : M × M → [0, ∞) is induced from the Riemannian length structure. As often encountered in the manifold learning setup (see e.g. [30] and [31]), we assume the vertices of H are sampled i.i.d. uniformly on M with respect to the standard volume measure dvol/vol (M ). Our goal in this section is to establish conditions under which the coarse scalar curvature (9) converges to the scalar curvature on M in the limit |V | → ∞ and ε → 0. We begin our discussion by summarizing some geometric and statistical properties of the Riemannian medians that we will need in the following two lemmas. Lemma 2. Let M be an orientable d-dimensional complete Riemannian manifold with • Finite volume vol (M ) < ∞; • Finite, positive injectivity radius 0 < Inj (M ) < ∞; • Uniformly bounded sectional curvature Kx (u, v) < D for D ∈ R and all x ∈ M , u, v ∈ Tx M . Assume U = {x1 , · · · , xn } is a finite discrete subset of M contained in a geodesic ball B (x, ε) of sufficiently small radius ε > 0 satisfying n o ( min D−1/2 π/4, Inj (M ) /2 if D > 0 2ε < (27) Inj (M ) /2 otherwise and U is not totally contained in any geodesic on M . Then there exists a unique x̄ ∈ M minimizing the moment function M ∋ z 7→ n X dM (z, xi ) ∈ [0, ∞) , i=1 and x̄ lies in the smallest closed, geodesically convex subset of B (x, ε) containing U . Proof. The bound on ε and the assumption that U is not totally contained in any geodesic on M together ensures the uniqueness of x̄, according to [32, Theorem 3.1]; the existence can be found e.g. in [33] or [34]. The last assertion about the location of x̄ is a consequence of [32, Proposition 2.4]. The minimizer x̄ is known as the Riemannian median. Note that the diameter bound 2ε only depends on the injectivity radius when the Riemannian manifold has negative sectional curvatures; this is of particular interest to us since many real world networks demonstrate “negatively curved” behaviors, see e.g., [29], [35], [36]. 9 ∞ Lemma 3. Assume M , ε > 0 satisfy the same assumptions as in Lemma 2. Let {Xn }n=1 be a sequence of i.i.d. random points uniformly distributed in a geodesic ball B (x, ε) of radius ε > 0 centering at x ∈ M , and denote µn for the Riemannian median of X1 , · · · , Xn for all n ∈ N. Then µn → x̄ a.s. as n → ∞, where x̄ is the unique Riemannian median of the uniform distribution on B (x, ε). Proof. The existence and uniqueness of µn and x̄ follows from Lemma 2; note here that x̄ need not coincide with x in general, by the characterization of Riemannian medians established in [32, Proposition 2.1 and Theorem 2.2]. The almost sure convergence has been established in [34, Corollary 4.1]. We now turn to investigating the coarse scalar curvature of hypergraphs generated from a geometric probabilistic model: saturated ε-neighborhood hypergraphs supported on a Riemannian manifold M , with vertices uniformly distributed on M . We consider the same random walk on the Riemannian manifold M as in [10], namely, the one given in (6): for any x ∈ M and ε > 0, 1B(x,ε) dmεx := dvol, (28) vol(B(x, ε)) which is essentially the standard volume measure on M restricted and renormalized on B (x, ε). For simplicity of statement, let us denote x̂E for the Riemannian median — when it exists and is unique — of the vertices connected by a hyperedge E in a saturated hypergraph G = (V, E). ∞ Theorem 3. Let M , ε > 0 be as assumed in Lemma 2. Let {vi }i=1 be a sequence of i.i.d. random points sampled uniformly on M with respect to the standard Riemannian volume measure. For any N ∈ N, let VN := {vi }N i=1 and HN = (VN , EN ) be an ε-neighborhood hypergraph supported on M . If there exists a hyperedge EN ∈ EN for each Hn such that • EN $ EN +1 for all sufficiently large N ∈ N • there exists x̄ ∈ M such that x̂EN → x̄ as n → ∞ • EN ⊂ B (x̄, ε) for all sufficiently large N ∈ N then the coarse scalar curvature of hyperedge EN satisfies, for all sufficiently small ε > 0, lim sup κ (EN ) ≥ N →∞  ε2 Scal (x̄) + O ε3 . 2 (d + 2) (29) Proof. Since curvature is a local quantity, we may assume without loss of generality that M is connected and even compact. Let ε > 0 be sufficiently small such that the geodesic ball B (x̄, ε) is geodesically convex neighborhood of x̄ (c.f. [23, Proposition 4.2]). To ease notations, write ℓN := |EN | and denote x1 , · · · , xℓN ∈ VN for the vertices of HN connected by the hyperedge EN ∈ E. By Proposition 1 and the definition of Riemannian median, we have Z dvol (y) W1 (my , mx̄ ) P ℓN vol (B (x̄, ε)) W1 (mxi , mx̄ ) ℓN →∞ B(x̄,ε) W1 (EN ) (30) −−−−→ Z ≤ Pi=1 ℓ N dvol (y) c (x1 , · · · , xℓn ) i=1 dM (xi , x̂EN ) dM (y, x̄) vol (B (x̄, ε)) B(x̄,ε) where the limit follows from the law of large number and the Lipschitz continuity of the function (see e.g. [32, §2]) Z dM (x, y) dvol (y) . x 7→ B(x,ε) We know from [10, Example 7] that, for any y ∈ B (x̄, ε),    ε2 Ric (vx̄,y , vx̄,y ) + O ε3 dM (x̄, y) W1 (my , mx̄ ) = 1 − 2 (d + 2) where vx̄,y is a unit tangent vector in Tx̄ M such that expx̄ (dM (x̄, y) vx̄,y ) = y. It follows that Z ε2 W1 (my , mx̄ ) dvol (y) = dM (x̄, y) dvol (y) − 2 (d + 2) B(x̄,ε) B(x̄,ε) ! Z Z + O ε3 dM (x̄, y) dvol (y) B(x̄,ε) Z Ric (vx̄,y , vx̄,y ) dM (x̄, y) dvol (y) B(x̄,ε) 10 which, when plugged back into (30), gives  ε2 W1 (EN ) ≤ 1 + O ε3 − lim sup 2 (d + 2) N →∞ c (x1 , · · · , xℓN ) dvol (y) Ric (vx̄,y , vx̄,y ) dM (x̄, y) vol (B (x̄, ε)) B(x̄,ε) Z . dvol (y) dM (x̄, y) vol (B (x̄, ε)) B(x̄,ε) Z A straightforward calculation using geodesic normal coordinates reveals   Z  Scal (x) d ε2 dvolM (y) =ε − + O ε3 dM (x, y) vol (B (x, ε)) d+1 3 (d + 1) (d + 2) (d + 3) B(x,ε) (31) (32) and Z # ! " 2  dvolM (y) |Scal (x)| ε2 Scal (x) 2 3 Ric (vx,y , vx,y ) dM (x, y) (33) =ε + − kR (x)k +O ε vol (B (x, ε)) d+1 3 (d + 2) (d + 3) d+1 B(x,ε) Pd 2 where kR (x)k = i=1 |Ric (ei , ei )| for an arbitrary orthonormal basis e1 , · · · , ed of Tx̄ M . Plugging (32) and (33) back into (31) to conclude that  W1 (EN ) ε2 lim sup (34) ≤1− Scal (x̄) + O ε3 . 2 (d + 2) ℓN →∞ c (x1 , · · · , xℓN ) Theorem 3 indicates that coarse scalar curvature asymptotically upper bounds the scalar curvature of the Riemannian manifold, when the hypergraph is constructed from uniformly sampling the manifold in a natural way. This justifies the nomenclature of "scalar curvature" in our definition. We conjecture that coarse scalar curvature also asymptotically lower bounds the scalar curvature in the same setting, but will have to leave that for future work. VI. C ONCLUSION AND FUTURE WORK In this paper, we propose a novel definition of curvature for hypergraphs by generalizing coarse Ricci curvature to coarse scalar curvature through multi-marginal optimal transport. Our definition is shown to be consistent with graph curvature in that (i) it reduces to graph curvature if the hypergraph of interest is indeed a simple graph, and (ii) it shares several properties with graph curvature. In particular, it is experimentally observed that, analogous to graph curvature, hypergraph curvature can be used to determine the bridge between components in the network. We are currently computing hypergraph curvature in real-world hypergraph networks (in particular co-authorship or cellular networks) to observe this centrality property of hypergraph curvature. We are also applying hypergraph curvature to characterize dynamic effects in large dynamic network (in particular, financial network). Intuitively, hypergraph curvature provides a computational method for detecting changes in dynamic networks, characterizing fast evolving network components, as well as identifying stable network region. On the theoretical side, we are interested in gaining better understandings of our hypergraph curvature with deeper insights from differential geometry. R EFERENCES [1] E. Demir, C. Aykanat, and B. B. Cambazoglu, “Clustering spatial networks for aggregate query processing: A hypergraph approach,” Information Systems, vol. 33, no. 1, pp. 1–17, 2008. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S030643790700021X [2] A. Chasapi, C. Kotropoulos, and K. Pliakos, “Adaptive algorithms for hypergraph learning,” in IEEE Int. Conf. Acoustics, Speech and Signal Processing (ICASSP), March 2016, pp. 1179–1183. [3] Y. Fang and Y. Zheng, “Metric learning based on attribute hypergraph,” in IEEE Int. Conf. Image Processing (ICIP), Sept 2017, pp. 3440–3444. [4] S. Klamt, H. U-U, and F. Theis, “Hypergraphs and Cellular Networks,” PLoS Comput Biol, vol. 5, no. 5, p. e1000385, May 2009. [5] P. Ji and J. Jin, “Coauthorship and citation networks for statisticians,” The Annals of Applied Statistics, vol. 10, no. 4, pp. 1779–1812, 12 2016. [6] T.-H. H. Chan, Z. G. Tang, and C. Zhang, “Spectral Properties of Laplacian and Stochastic Diffusion Process for Edge Expansion in Hypergraphs,” [Preprint] arXiv:1510.01520v1, 2017. [7] R. Shaydulin, J. Chen, and I. Safro, “Relaxation-Based Coarsening for Multilevel Hypergraph Partitioning,” [Preprint] arXiv:1710.06552v2, 2017. [8] A. Louis, “Hypergraph Markov Operators, Eigenvalues and Approximation Algorithms,” [Preprint] arXiv:1408.2425v2, 2016. [9] A. Banerjee, “On the spectrum of hypergraphs,” [Preprint] arXiv:1711.09356v2, 2017. [10] Y. Ollivier, “Ricci curvature of Markov chains on metric spaces,” Journal of Functional Analysis, vol. 256, no. 3, pp. 810–864, 2009. [11] Y. Lin, L. Lu, and S.-T. Yau, “Ricci Curvature of Graphs,” Tohoku Mathematical Journal, vol. 63, no. 4, pp. 605–627, 2011. [12] E. Saucan, A. Samal, M. Weber, and J. Jost, “Discrete curvatures and network analysis,” Max Planck Institute for Mathematics in the Sciences, Preprint, 2017. [Online]. Available: http://www.mis.mpg.de/de/publications/preprints/2017/prepr2017-34.html [13] F. Bauer, J. Jost, and S. Liu, “Ollivier-Ricci curvature and the spectrum of the normalized graph Laplace operator,” Mathematical Research Letters, vol. 19, pp. 1185–1205, 11 2012. [14] J. Jost and S. Liu, “Ollivier’s Ricci curvature, local clustering and curvature-dimension inequalities on graphs,” Discrete and Computational Geometry, vol. 51, no. 2, pp. 300–322, Mar 2014. [15] H. J. Cho and S. H. Paeng, “Ollivier’s Ricci curvature and the coloring of graphs,” European Journal of Combinatorics, vol. 34, no. 5, pp. 916–922, 2013. 11 [16] C. C. Ni, Y. Y. Lin, J. Gao, X. D. Gu, and E. Saucan, “Ricci curvature of the Internet topology,” in IEEE Conference on Computer Communications (INFOCOM), April 2015, pp. 2758–2766. [17] R. Sandhu, T. Georgiou, and A. Tannenbaum, “Ricci curvature: An economic indicator for market fragility and systemic risk,” Science Advances, vol. 2, no. 5, 2016. [18] H. Farooq, Y. Chen, T. Georgiou, A. Tannenbaum, and C. Lenglet, “Network Curvature as a Hallmark of Brain Structural Connectivity,” bioRxiv, 2017. [19] R. Sandhu, T. Georgiou, E. Reznik, L. Zhu, I. Kolesov, Y. Senbabaoglu, and A. Tannenbaum, “Graph curvature for differentiating cancer networks,” Scientific Reports, vol. 5, 7 2015. [20] G. Carlier and I. Ekeland, “Matching for Teams,” Economic Theory, vol. 42, no. 2, pp. 397–418, 2010. [21] Y. H. Kim and Pass, B., “Multi-marginal Optimal Transport on Riemannian Manifolds,” American Journal of Mathematics, vol. 137, no. 4, pp. 1045–1060, 2017. [22] W. Gangbo and A. Świȩch, “Optimal maps for the multidimensional Monge-Kantorovich problem,” Communications on Pure and Applied Mathematics, vol. 51, no. 1, pp. 23–45, 1998. [23] M. P. Do Carmo, Riemannian Geometry. Springer, 1992. [24] M. Agueh and G. Carlier, “Barycenters in the Wasserstein Space,” SIAM Journal on Mathematical Analysis, vol. 43, no. 2, pp. 904–924, 2011. [25] H. G. Kellerer, “Duality Theorems for Marginal Problems,” Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, vol. 67, no. 4, pp. 399–432, 1984. [26] M. Cuturi, “Sinkhorn Distances: Lightspeed Computation of Optimal Transport,” in Advances in Neural Information Processing Systems, 2013, pp. 2292–2300. [27] C. Villani, Topics in Optimal Transportation. American Mathematical Society, 2003. [28] B. B. Bhattacharya and S. Mukherjee, “Exact and asymptotic results on coarse ricci curvature of graphs,” Discrete Mathematics, vol. 338, no. 1, pp. 23 – 42, 2015. [29] C.-C. Ni, Y.-Y. Lin, J. Gao, X. D. Gu, and E. Saucan, “Ricci Curvature of the Internet Topology,” ArXiv e-prints, Jan 2015. [Online]. Available: arXiv:1501.04138v1 [30] M. Belkin and P. Niyogi, “Laplacian Eigenmaps for Dimensionality Reduction and Data Representation,” Neural Comput., vol. 15, no. 6, pp. 1373–1396, Jun. 2003. [Online]. Available: http://dx.doi.org/10.1162/089976603321780317 [31] R. R. Coifman and S. Lafon, “Diffusion Maps,” Applied and Computational Harmonic Analysis, vol. 21, no. 1, pp. 5–30, 2006, special Issue: Diffusion Maps and Wavelets. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S1063520306000546 [32] L. Yang, “Riemannian Median and its Estimation,” LMS Journal of Computation and Mathematics, vol. 13, pp. 461–479, 2010. [33] P. T. Fletcher, S. Venkatasubramanian, and S. Joshi, “The Geometric Median on Riemannian Manifolds with Application to Robust Atlas Estimation,” NeuroImage, vol. 45, no. 1, pp. S143–S152, 2009. [34] M. Arnaudon, F. Barbaresco, and L. Yang, “Medians and Means in Riemannian Geometry: Existence, Uniqueness and Computation,” in Matrix Information Geometry. Springer, 2013, pp. 169–197. [35] O. Narayan and I. Saniee, “Large-scale curvature of networks,” Phys. Rev. E, vol. 84, p. 066108, Dec. 2011. [36] R. Albert, B. DasGupta, and N. Mobasheri, “Topological implications of negative curvature for biological and social networks,” Phys. Rev. E, vol. 89, p. 032811, Mar 2014.
7cs.IT
SINGULARITIES OF GENERIC LINKAGE OF ALGEBRAIC VARIETIES arXiv:1207.1082v2 [math.AG] 18 Jun 2013 WENBO NIU Abstract. Let Y be a generic link of a subvariety X of a nonsingular variety A. We give a description of the Grauert-Riemenschneider canonical sheaf of Y in terms of the multiplier ideal sheaves associated to X and use it to study the singularities of Y . As the first application, we give a criterion when Y has rational singularities and show that log canonical threshold increases and log canonical pairs are preserved in generic linkage. As another application we give a quick and simple liaison method to generalize the results of de Fernex-Ein and Chardin-Ulrich on the Castelnuovo-Mumford regularity bound for a projective variety. 1. Introduction Let A be either a nonsingular affine variety or a projective space Pn over the field of complex number C. Two closed subvarieties of A are said to be geometrically linked if the union of them is a complete intersection in A. Let us fix a reduced equidimensional subscheme X of A of codimension c for now. By choosing c equations carefully among the defining equations of X we define a complete intersection V and obtain a subscheme Y as the closure of the complement of X in V . Then Y is geometrically linked to X via V , i.e., Y ∪ X = V and Y has no common irreducible components with X. If such complete intersection V is chosen to be as general as possible, then Y is called a generic link of X. The study of linkage, or the theory of liaison, of algebraic varieties can be traced back to hundreds of years ago. The recent work in this area was initiated by Peskine and Szpiro [PS74]. After that, linkage has attracted considerable attention and has been developed widely and deeply from both geometric and algebraic point of views. Let us state the construction of a generic link more concretely to make our introduction clear. Assume further that X is defined by an ideal IX generated by equations f1 , · · · , ft . The essential point is to create a general complete intersection V by using the equations fi ’s. There are three situations in current research to do this, which we list as follows. Situation A. Suppose A = Spec R is affine. A complete intersection V is defined by the equations αi = Ui,1 f1 + · · · + Ui,t ft , for i = 1, · · · , c, where Ui,j ’s are variables. V is actually defined in an extended space Spec R[Ui,j ]. By abuse of notation, we still write A = Spec R[Ui,j ] and X is defined by IX [Uij ]. This only occurs in the introduction. New notation which avoids any ambiguity will be introduced in Definition 2.3 and adopted henceforth. Situation B. Suppose A = Spec R is affine. A complete intersection V is defined by the equations αi = ai,1 f1 + · · · + ai,t ft , for i = 1, · · · , c, where ai,j ’s are general scalars in C. Situation C. Suppose A = Pn and the homogeneous equations fi ’s of X have degrees d1 ≥ d2 ≥ · · · ≥ dt . A complete intersection V is defined by choosing general equations αi from H 0 (Pn , IX (di )), for i = 1, · · · , c. 2010 Mathematics Subject Classification. 13C40, 14M06. Key words and phrases. Generic linkage, singularity, log canonical pair, multiplier ideal sheaf, CastelnuovoMumford regularity. 1 In each of the three situations, once having a complete intersection V in hand, a generic link Y of X can be obtained by algebraic construction, namely, by an ideal IY := (IV : IX ). (We sometimes use sheaf notation, e.g. IX , to view an ideal as a sheaf.) The terminology of generic linkage usually refers to Situation A. The theory based on this setting has been founded and developed deeply by Huneke and Ulrich in the last three decades, mainly from algebraic side of the story (e.g. [HU88], [HU87]). Situation C was studied from the geometric side. The book of Miglior [Mig98] gives a outline of the theory along this direction. It is worth mentioning that the way to construct a generic link in Situation C is quite classical and a typical application can be found in the work of Betram, Ein and Lazarsfeld [BEL91] on the Castelnuovo-Mumford regularity bound for a smooth projective variety. Situation B can be considered as a specialization of Situation A as well as a local version of Situation C. As an important technique it has been used in recent studies of singularities, for instance, in the work of de Fernex and Docampo [dFD12] and the work of Ein and Mustata [EM09]. However, in contrast to the quick and deep development of singularity theories in the past decades, much less has been known about the singularities in generic linkage. A few special examples have drawn attention recently. One important case, which serves as a guideline of this paper, is a result of Chardin and Ulrich [CU02] that if X is a local complete intersection and has rational singularities then a generic link of X has rational singularities. But the machinery behind the result seems quite mysterious from the geometric point of view. Meanwhile, experience gained from research in the past gives the intuition that the singularities of a generic link seem to be worse than X itself. The main theorem of this paper in the context of Situations A, B and C is the following. Recall that A is either a nonsingular affine variety or a projective space and X is a reduced equidimensional subscheme of codimension c. We simply write them as a pair (A, cX). Theorem 1.1. Let Y be a generic link (if it is nonempty) to a pair (A, cX) via V . Then Y is reduced equidimensional of codimension c, its Grauert-Riemenschneider canonical sheaf is ωYGR ≃ I (A, cX) · OY ⊗ ωV , where I (A, cX) is the multiplier ideal sheaf associated to the pair (A, cX) and ωV is the dualizing sheaf of V , and it fits into the following commutative diagram (1.1.1) ωYGR  ≃ _ // I (A, cX) · OY ⊗ ωV _ tr i  ωY ≃  // IX · OY ⊗ ωV where the bottom isomorphism is canonical, tr is the trace map, and the inclusion i is induced by I (A, cX) ֒→ IX (cf. Lemma 2.5). Furthermore, we have inequalities for log canonical thresholds of pairs as lct(A, Y ) ≥ lct(A, X). It should be noticed that in the application of the theorem the dualizing sheaf ωV can be replaced by ωA |V in Situations A and B and by ωPn (d1 + · · · + dc )|V in Situation C. Also the generic link Y could be reducible in Situations B and C. There are some special case in which Y is irreducible discussed in Section 4. The aforementioned result of Chardin and Ulrich is an immediate consequence of the theorem. Also the problem that when a generic link has rational singularities now becomes clear. Furthermore the theorem also implies that log canonical pairs are preserved in generic linkage. It should be mentioned that, as pointed out by the referee, the inequality of log canonical thresholds in the theorem is rather straightforward in Situations B and C. 2 As another application of the theorem in Situation C of projective spaces, we can generalize and extend the results of de Fernex and Ein [dFE10] and Chardin and Ulrich [CU02] on the Castelnuovo-Mumford regularity bound for a projective variety. The proof is based on liaison theory and provides a natural, geometric approach to study regularity. The original proofs in [CU02] and [dFE10] were very different, and the new proof here finds its way somewhere in the middle, leading to a statement which recovers both results. This was kindly suggested by the referee. The following is a simple version and we will give its full general version in Corollary 4.3. Corollary 1.2. Let X ⊂ Pn be a reduced equidimensional subscheme of codimension c defined by the equations of degree d1 ≥ d2 ≥ · · · ≥ dt and assume that the pair (Pn , cX) is log canonical except possibly at finitely many points. Then reg X ≤ c X di − c + 1 i=1 and equality holds if and only if X is a complete intersection in Pn . We conclude this introduction by briefly stating the organization of this paper. We take Situation A as our framework, following the footprints of Huneke and Ulrich. We prove Theorem 1.1 in Situations A and B in Section 3. Section 4 is devoted to the case of projective varieties and the Castelnuovo-Mumford regularity bound. Acknowledgement. Special thanks are due to professor Bernd Ulrich who introduced the author to this subject and spent his valuable time on discussion. This paper would not be possible without his generous help and encouragement. The author also would like to thank professor Lawrence Ein for his insightful knowledge and inspiring suggestions which enrich the paper. The author’s thanks also goes to professor Joseph Lipman for his patient reading and kind suggestions, and goes to the referee for his nice comments and suggestions which improve the quality of the paper. 2. Generic linkage, singularities and multiplier ideal sheaves Throughout this paper, we work over the field k := C. By a variety we mean a reduced irreducible scheme of finite type over k. A subscheme is always assumed to be closed. We shall briefly review basic facts about linkage, singularities and multiplier ideal sheaves in this section. Definition 2.1. Let A be either a nonsingular affine variety over k or a projective space Pnk . Let X and Y be two subschemes of A. We say that X and Y are geometrically linked if X ∪ Y is a complete intersection V in A and X and Y are equidimensional, no embedded components and have no common irreducible components. We also say Y is linked to X via V , or vice versa. Suppose Y is geometrically linked to X via V in A as defined above. Let ωY be a dualizing sheaf of Y (in this paper, we use dualizing sheaf and canonical sheaf interchangeably). One important fact is an isomorphism ωY ≃ IX · OV ⊗ ωV , where IX is the defining ideal sheaf of X in A and ωV is a dualizing sheaf of V . If A is an affine nonsingular variety, then one can deduce that (2.1.1) ωY ≃ IX · OY ⊗ ωA , 3 where ωA is a dualizing sheaf of A. If A is a projective space Pnk and V is cut out by homogeneous equations of degrees d1 ≥ d2 ≥ · · · ≥ dc , where c = codim V , then one has (2.1.2) ωY ≃ IX · OY ⊗ ωA (d1 + · · · + dc ). It is also well-know that Y is Cohen-Macaulay if and only if X is Cohen-Macaulay. The modern approach to study linkage goes back to Peskine and Szpiro [PS74], and we refer to their work for more general theory of linkage. Definition 2.1 suggests that the study of linkage involves an ambient space containing the varieties concerned. Thus it is natural to consider a variety and its ambient space as a pair. Besides, the concept of pairs is a successful approach to study singularities of varieties, which is the main motivation of this paper. Definition 2.2. A pair (A, cX) contains a nonsingular variety A over k, a subscheme X and a nonnegative real number c. If A = Spec R is affine and X is defined by an ideal IX , then we c ). say the pair (A, cX) is an affine pair and also use an alternative notation (R, IX Now we give the definition of generic linkage mentioned in Situation A and take it as our framework in Section 3. c ) be an affine pair such that X is reduced equidiDefinition 2.3. Let (Ak , cXk ) = (Rk , IX k k mensional and c = codimAk Xk . We construct a generic link of Xk as follows. Fix a generating set (f1 , · · · , ft ) of IXk . Let (Uij ), 1 ≤ i ≤ c, 1 ≤ j ≤ t, be a c × t matrix of variables. Set R := Rk [Uij ] and IX := IXk · Rk [Uij ] and define A = Spec R and X = Spec R/IX . Notice that IX is still generated by (f1 , · · · , ft ) in R. We define a complete intersection V inside A by an ideal IV := (α1 , · · · , αc ) = (Ui,j ) · (f1 , · · · , ft )T , that is αi := Ui,1 f1 + Ui,2 f2 + · · · + Ui,t ft , for 1 ≤ i ≤ c. Then a generic link Y to Xk via V is defined by an ideal IY := (IV : IX ). Remark 2.4. In the definition above, the subscheme V is a complete intersection in A [Hoc73]. The subschemes Y and X of A are geometrically linked so that IY = (IV : IX ), IX = (IV : IY ) and IV = IX ∩ IY and therefore Y is equidimensional without embedded components and has no common components with X [HU85, 2.1, 2.5]. Furthermore Y is actually integral [HU85, 2.6]. In the sequel we only need the fact that Y is reduced equidimensional. It is from (2.1.1) that a dualizing sheaf ωY of Y is ωY ≃ IX · OY ⊗ ωA , where ωA is a dualizing sheaf of A. Let A be a nonsingular variety over k and {Xi }, i = 1, · · · , m, are m subschemes of A. By Hironaka’s resolution of singularities, there is a birational projective morphism f : A′ −→ A P ′ −1 such that A is a nonsingular variety, f (Xi ) = ai,j Ej for i = 1, · · · , m, where ai,j ’s are nonnegative integers and Ej ’s are prime divisors of A′ such that the union of Ej ’s with the exceptional locusP Exc(f ) is a simple normal crossing divisor. The morphism f is called a log resolution of (A, i Xi ). ′ A of (A, X) such that f −1 (X) = PsLet (A, cX) be a pair. Take a log resolution f : AP−→ s i=1 ai Ei and the relative canonical divisor KA′ /A = i=1 ki Ei . We say that the pair (A, cX) is log canonical if ki − c · ai ≥ −1 for all i. The log canonical threshold of (A, X) is defined to be ki + 1 }. lct(A, X) := min{ i ai The multiplier ideal sheaf I (A, cX) associated to the pair (A, cX) is defined to be X ai Ei ⌋), I (A, cX) := f∗ OA′ (KA′ /A − ⌊c 4 where ⌊c P ai Ei ⌋ is the round down of the Q-divisor c P ai Ei . Lemma 2.5. Let A be a nonsingular variety over k and X ⊂ A be a reduced equidimensional subscheme of codimension c defined by an ideal sheaf IX . Let I (A, cX) be the multiplier ideal sheaf associated to the pair (A, cX). Then I (A, cX) ⊆ IX . Proof. Since at each generic point p of X one has I (A, cX)p = IX,p and IX is radical the result is then clear.  The following lemma is due to Lawrence Ein, which gives a criterion to compare multiplier ideal sheaves with ideal sheaves. Ein’s Lemma. Let A be a nonsingular variety and X ⊂ A be a reduced equidimensional subscheme of codimension c defined by an ideal sheaf IX . Then I (A, cX) = IX if and only if I (A, (c−1)X) = OA . In particular if the pair (A, cX) is log canonical then I (A, cX) = IX . Proof. The inclusion I (A, cX) ⊆ IX is from Lemma 2.5. It then suffices to show that IX ⊆ I (A, cX) if and only if I (A, (c − 1)X) is trivial. If c = 1, then there is nothing to prove. So in the sequel we assume c > 1. We shall follow notation and terminologies in [EM09, Section 7]. The inclusion IX ⊆ I (A, cX) is true if and only if for any prime divisor E over X we have an inequality ordE IX + ordE K /A − c · ordE IX ≥ 0. This is equivalent to the inequality ordE K /A − (c − 1) · ordE IX ≥ 0, which is equivalent to I (A, (c − 1)X) is trivial. Now suppose (A, cX) is log canonical. This means that for any prime divisor E over X we have ordE K /A − c · ordE IX ≥ −1. If the center of E is outside X then ordE IX = 0 and ordE K /A ≥ 0 since A is nonsingular. And thus ordE K /A − c · ordE IX ≥ −ordE IX . On the other hand, if the center of E is inside X, then ordE IX ≥ 1 and again we have ordE K /A −c·ordE IX ≥ −1 ≥ −ordE IX . Hence in any case we have ordE K /A −c·ordE IX ≥ −ordE IX , which implies, as showed above, that I (A, (c − 1)X) is trivial.  Definition 2.6. Let A be a nonsingular variety over k and X a reduced subscheme of A. A morphism ϕA : A −→ A is a factorizing resolution of X inside A if the following hold: (1) ϕA is an isomorphism at the generic point of every irreducible component of X. In particular, the strict transform X of X is defined. (2) The morphism ϕA and ϕX := ϕA |X are resolution of singularities of A and X, respectively, and the union of X with the exceptional locus Exc(ϕA ) has simple normal crossings. (3) If IX and IX are the defining ideals of X and X in A and A, respectively, then there exists an effective divisor G on A such that IX · OA = IX · OA (−G). The divisor G is supported on Exc(ϕA ) and hence has normal crossing with X. Remark 2.7. The above definition is borrowed from [EIM11, Definition 2.10]. The existence of a factorizing resolution is proved in [BVU03, Theorem 1.2]. In addition, we can assume that the morphism ϕA is isomorphic over the open set A \ X. Let us conclude this section by briefly reviewing the definition of rational singularities and Grauert-Riemenschneider canonical sheaves. Let X be a reduced equidimensional scheme of finite type over k. Let f : X ′ −→ X be a resolution of singularities of X. Then the GrauertGR of X is defined to be ω GR := f ω ′ , where ω ′ is the Riemenschneider canonical sheaf ωX ∗ X X X GR is independent on the choice of the canonical sheaf of X ′ . It turns out that the sheaf ωX 5 GR is canonically a subsheaf of ω , a resolution of singularities f (cf. [Laz04a]). Furthermore ωX X GR dualizing sheaf of X, via a trace map tr : ωX ֒→ ωX . Recall that X has rational singularities if f∗ OX ′ = OX and Ri f∗ OX ′ = 0 for i > 0. It is well-know that X has rational singularities if GR = ω (cf. [Kol97]). and only if X is Cohen-Macaulay and ωX X 3. Generic linkage of affine varieties In this section, we first study the singularities of generic linkages under the framework of Huneke and Ulrich as Definition 2.3 in Situation A. In this case, Theorem 1.1 will be proved by using Proposition 3.1, Proposition 3.2 and Proposition 3.7. Some direct consequences will also be given which describe singularities of generic linkage. Then we specialize our results to a Zariski open set of a scalar matrices space, which takes care of Situation B. Proposition 3.1. With notation as in Definition 2.3 let Y be a generic link to a pair (Ak , cXk ). Then ωYGR ≃ I (A, cX) · OY ⊗ ωA , where I (A, cX) is the multiplier ideal sheaf associated to the pair (A, cX). Proof. Let ϕk : Ak −→ Ak be a factorizing resolution of singularities of Xk inside Ak , so that IXk · OAk = IX k · OAk (−Gk ) where X k is the strict transform of Xk , Gk is an effective divisor supported on the exceptional locus of ϕk , and furthermore X k and the exceptional locus of ϕk are simple normal crossings. The morphism ϕk can be assumed to be an isomorphism over the open set Ak \Xk (cf. Definition 2.6 and Remark 2.7). By tensoring k[Uij ] to the factorizing resolution ϕk , we obtain a factorizing resolution of singularities of X inside A as ϕ : A −→ A, such that IX · OA = IX · OA (−G), where X is the strict transform of X, G is an effective divisor supported on the exceptional locus of ϕ, and X and exceptional locus of ϕ are simple normal crossings. Notice that by the construction, we actually have A = Ak ⊗k Spec k[Uij ], X = X k ⊗k Spec k[Uij ] and G = Gk ⊗k Spec k[Uij ]. Claim 3.1.1. The ideal sheaf IV · OA has a decomposition as IV · OA = IV · OA (−G) where IV is an ideal sheaf on A and is a local complete intersection. Proof of Claim 3.1.1. The question is local. Recall that ϕk : Ak −→ Ak is the factorizing resolution of singularities of Xk inside Ak . Let U k = Spec Rk be an affine open set of Ak such that the effective divisor Gk is defined by an equation g ∈ Rk and we have a decomposition IXk · Rk = IX k · (g) on U k . Now since IXk · Rk = (f1 , · · · , ft ) · Rk we can write fi = f i g where f i ∈ Rk for i = 1, · · · , t so that IX k = (f 1 , · · · , f t ). Recall that the factoring resolution ϕ : A −→ A is obtained by tensoring Spec k[Uij ] to the factoring resolution ϕk . Write R = Rk ⊗ k[Uij ] which is a faithfully flat ring extension of Rk and then U = U k ⊗ Spec k[Uij ] = Spec R is an affine open set of A. Notice that on U the ideal IX = IX k · R and the effective divisor G is still generated by the equation g. Recall that the ideal IV = (α1 , · · · , αc ), where αi = Ui,1 f1 + Ui,2 f2 + · · · + Ui,t ft . Thus if write αi = Ui,1 f 1 + Ui,2 f 2 + · · · + Ui,t f t and set IV = (α1 , · · · , αc ), then IV is a complete intersection on U and we have a decomposition IV ·R = IV ·(g) on U , which finishes the proof of Claim 3.1.1. 6 e −→ A be the blowing-up of A along X such that I · O e = O e(−T ), where Now let µ : A X A A e −→ A. Notice that the supports of T is an exceptional divisor of µ. Denote by ψ = (φ ◦ µ) : A divisors T , µ∗ (G) and the exceptional locus of ψ are simple normal crossings. We write KA/A e to be the relative canonical divisor of the morphism ψ. Claim 3.1.2. We have the following statements. (1) The ideal sheaf IV · OAe can be decomposed as IV · OAe = IVe · OAe(−T ). e and defines a local complete intersection Ve of codiwhere IVe is an ideal sheaf on A mension c. (2) The scheme Ve is nonsingular and irreducible and its dualizing sheaf is − c(T + µ∗ G)) ⊗ ψ ∗ ωA , ωVe ≃ OVe (KA/A e where ωA is a dualizing sheaf of A. (3) The scheme Ve is the strict transform of Y via ψ. Proof of Claim 3.1.2. We work locally on affine open sets as in the proof of Claim 3.1.1. Assume that Ak = Spec Rk and A = Spec R, where R = Rk ⊗k k[Uij ]. Recall that, as we showed in the proof of Claim 3.1.1, the ideal IX = (f 1 , · · · , f t ) · R where for each i the generator f i is in the ring Rk , and that the complete intersection IV = (α1 , · · · , αc ), where e say αi = Ui,1 f 1 + Ui,2 f 2 + · · · + Ui,t f t for i = 1, · · · , c. Now take a canonical affine cover of A, U = Spec R[f 2 /f 1 , · · · , f t /f 1 ] such that the exceptional divisor T is given by the element f 1 α1 , · · · , α ec ). on U . For i = 1, · · · , c write α ei = Ui,1 + Ui,2 f 2 /f 1 + · · · + Ui,t f t /f 1 and set IVe = (e Then on the open set U we have IV · OU = IVe · (f1 ) and IVe defines an irreducible nonsingular variety of Ve on U , which prove the statement (1) and the first part of the statement (2) in the claim. Next we compute the dualizing sheaf of Ve . Notice that we have IV ·OAe = IVe ·OAe(−T −µ∗ G). Since IV is a complete intersection in A of codimension c we have a surjective morphism e a surjective morphism ⊕c OA −→ IV −→ 0, which induces on A c M OAe(T + µ∗ G) −→ IVe −→ 0. e is Thus it is clear that the determinant of the normal bundle of Ve inside A det NVe /Ae = OVe (−c(T + µ∗ G)). Then by the adjunction formula, we have − c(T + µ∗ G)) ⊗ ψ ∗ ωA , ωVe ≃ ωAe ⊗ det NVe /Ae = OVe (KA/A e which proves the second part of the statement (2) in the claim. For the statement (3), just notice that the morphism ψ is an isomorphism at the generic point of Y . Thus we finish the proof of Claim 3.1.2. Now twisting the short exact sequence 0 −→ IVe −→ OAe −→ OVe −→ 0 by the divisor − c(T + µ∗ G)) ⊗ ψ ∗ ωA , we obtain an exact sequence OAe(KA/A e ∗ ∗ ∗ ∗ (3.1.3) 0 → IVe ·OAe(KA/A e −c(T +µ G))⊗ψ ωA → ωVe → 0. e(KA/A e −c(T +µ G))⊗ψ ωA → OA 7 Push down this sequence via ψ. Notice that by the definition of multiplier ideal sheaves, we obtain − c(T + µ∗ G)) = I (A, cX). ψ∗ OAe(KA/A e Now we make the following claim. Claim 3.1.4. We have the following statements for the sequence 3.1.3. (1) Let I (A, cV ) be the multiplier ideal sheaf associated to the pair (A, cV ), then − c(T + µ∗ G))) = I (A, cV ). ψ∗ (IVe · OAe(KA/A e (2) We have the vanishing − c(T + µ∗ G)) = 0, Ri ψ∗ (IVe · OAe(KA/A e for i > 0. e be the blowing-up of A e along Ve such that I e · Proof of Claim 3.1.4. Let ν : A′ −→ A V OA′ = OA′ (−S), where S is an exceptional divisor of ν. Notice that KA′ /Ae = (c − 1)S and KA′ /A = KA′ /Ae + ν ∗ KA/A e . Thus we have − cν ∗ (T + µ∗ G) = KA′ /A − c(S + ν ∗ T + (µ ◦ ν)∗ G). −S + ν ∗ KA/A e Write the divisor D := (S + ν ∗ T + (µ ◦ ν)∗ G). We notice that IV · OA′ = OA′ (−D). Since ν∗ OA′ (−S) = IVe and Ri ν∗ OA′ (−S) = 0 for i > 0, we obtain that − c(T + µ ∗ G)) ν∗ OA′ (KA′ /A − cD) = IVe · OAe(KA/A e and Ri ν∗ OA′ (KA′ /A − cD) = 0, for i > 0. Write f := ψ ◦ ν : A′ −→ A. The divisor −D is f -nef and then by the Kawamata-Viehweg vanishing theorem we have Ri f∗ OA′ (KA′ /A − cD) = 0, for i > 0. Also by the definition of multiplier ideal sheaves we have f∗ OA′ (KA′ /A − cD) = I (A, cV ). Now by using the spectral sequence E2p,q = Rp ψ∗ (Rq ν∗ OA′ (KA′ /A − cD)) ⇒ Rp+q f∗ OA′ (KA′ /A − cD), we immediately have that − c(T + µ∗ G)) = 0, Ri ψ∗ (IVe · OAe(KA/A e for i > 0, and − c(T + µ∗ G))) = I (A, cV ), ψ∗ (IVe · OAe(KA/A e which finish the proof of Claim 3.1.4. Finally, we push down the sequence (3.1.3) via ψ to obtain an exact sequence 0 −→ I (A, cV ) ⊗ ωA −→ I (A, cX) ⊗ ωA −→ ωYGR −→ 0. Thus by restricting to Y we see I (A, cX) · OY ⊗ ωA ≃ ωYGR , which proves the proposition.  8 Next we show that the isomorphism proved in Proposition 3.1 is canonical in the sense that it fits into the commutative diagram 1.1.1. To this end, we need to track carefully the isomorphisms constructed in the proposition. Since canonical sheaves are only unique up to isomorphism we need to fix our canonical sheaves uniformly in arguments. There is a canonical canonical sheaf, namely sheaf of regular differential forms, developed by Kunz [KW88], offering a concrete way to do so. We follow the notation of Lipman [Lip84] to denote by ω e the sheaf of regular differential forms. Let Z be a reduced of pure dimension d scheme of finite type over k. Denote by KZ the locally constant sheaf of total quotient ring of OZ . Its ring of global sections is K(Z) := KZ (Z) which is a product of residue fields of the generic points of Z. Let ΩdZ/k := ∧d Ω1Z/k be the d-th exterior power of the sheaf of Kählar differential one-form. Let Ω̄dK(Z)/k be the locally constant sheaf of meromorphic d-forms on Z so that its module of global sections is Ω̄dK(Z)/k (Z) = ΩdK(Z)/k . The sheaf ω eZ of regular differential forms of degree d of Z is defined in [KW88, Section 3] and it is a subsheaf of Ω̄dZ/k . Now let f : Z ′ −→ Z be a resolution of singularities of Z so that f is isomorphic at the generic points of Z. Then pushdown the inclusion ω eZ ′ ֒→ Ω̄dK(Z ′ )/k via f we have f∗ ω eZ ′ ֒→ f∗ Ω̄dK(Z ′ )/k . But since f is generically isomorphism we see that K(Z ′ ) = K(Z) and f∗ Ω̄dK(Z ′ )/k = Ω̄dK(Z)/k . Thus f∗ ω eZ ′ is naturally included in Ω̄dK(Z)/k as a subsheaf. The eZ is then the natural inclusion as subsheaves of Ω̄dK(Z)/k . trace map tr : f∗ ω eZ ′ ֒→ ω Proposition 3.2. With notation as in Proposition 3.1, the isomorphism ωYGR ≃ I (A, cX) · OY ⊗ ωA is canonical in the sense that it fits into the following commutative diagram ωYGR  (3.2.1) ≃ // I (A, cX) · OY ⊗ ωA _ _ tr i  ≃ ωY  // IX · OY ⊗ ωA where the bottom isomorphism is given by 2.1.1, tr is the trace map, and the inclusion i is induced by I (A, cX) ֒→ IX (cf. Lemma 2.5). Proof. Keep notation and construction as in the proof of Proposition 3.1. Assume that d := dim X. We first make the adjunction isomorphism ωV ≃ ωA ⊗OA OV precisely by using regular differential forms mentioned above. Recall that V is a complete intersection defined by IV = (α1 , · · · , αc ). Then it is clear that IV /IV2 = ⊕OV ᾱi . Following notation of [Lip84, Section 13] we set a sheaf eA /IV ω eA ), HV,A := H omOV (∧c IV /IV2 , ω which is torsion free since ω eA is locally free. Notice that HV,A = det NV /A ⊗OA ω eA where NV /A is the normal sheaf of V in A. We have the following commutative diagram (3.2.2) ω eV _  Ω̄dK(V )/k ≃ // HV,A ≃ // ω eA ⊗OA OV iV ≃ aV  // HV,A ⊗O KV V jV ≃ bV  // ω eA ⊗OA KV where the left commutative square follows from [HS97, Theorem 2.3] (see also [Lip84, Corollary 13.7]) and the right commutative square is a consequence of that the sheaves inside H om are all locally free and det NV /A ≃ OV . The morphism iV and jV are injective because HV,A and ω eA ⊗OA OV are torsion free. Furthermore the vertical morphisms in the diagram can 9 be thought of induced by tensoring with the natural inclusion OV ֒→ KV . Thus HV,A and ω eA ⊗OA OV are naturally as subsheaves of those locally constant sheaves at the bottom of the −1 diagram. The adjunction isomorphism ω eV ≃ ω eA ⊗OA OV is then induced by a−1 V ◦ bV , i.e. −1 ωA ⊗OA OV ). The isomorphisms aV and bV can be described precisely and ω eV = (a−1 V ◦ bV )(e determined completely at each generic point of V . Assume v is one generic point of V with the residue field k(v). The local ring OA,v has a regular system of parameters α1 , · · · , αc , x1 , · · · , xd . Then locally at an open set of V containing only v the sheaf Ω̄dK(V )/k = k(v)dx̄1 ∧ · · · ∧ dx̄d , the sheaf HV,A ⊗ KV = k(v)ξ where ξ maps ᾱ1 ∧ · · · ∧ ᾱc to dα1 ∧ · · · dαc ∧ dx1 ∧ · · · ∧ dxd and the sheaf ω eA ⊗OA KV = k(v)dα1 ∧ · · · dαc ∧ dx1 ∧ · · · ∧ dxd . Then on this open neighborhood of v the bottom line of the diagram 3.2.2 can be written as k(v)dx̄1 ∧ · · · ∧ dx̄d −→ k(v)ξ −→ k(v)dα1 ∧ · · · ∧ dαc ∧ dx1 · · · ∧ dxd . The isomorphisms aV and bV are defined in the way that aV (dx̄1 ∧ · · · ∧ dx̄d ) = ξ and bV (ξ) = dα1 ∧ · · · ∧ dαc ∧ dx1 · · · ∧ dxd . Next we need to make the isomorphism ωY ≃ IX · OY ⊗ ωA clearly. Write the sheaf HY,V := H omOY (OY , ω eV /IY /V ω eV ) where IY /V = IY · OV . It is a torsion free since ω eV is locally free. There is a fundamental local homomorphism (cf. [Lip84, 13.1]) h : H omOV (OY , ω eV ) −→ HY,V which in our case is induced by the natural quotient morphism ω eV −→ ω eV /IY /V ω eV . We have the following commutative diagram (3.2.3) ω eY _ ≃ // H omO (OY , ω eV ) V // ω eV ⊗OV IX · OV   uY h ≃ HY,V // ω eV ⊗OV OY jY iY  Ω̄dK(Y )/k ≃ aY  // HY,V ⊗O KY Y ≃ bY  // ω eV ⊗OV KY . The left hand side big square is commutative checked by definition directly. The right two small squares are commutative because ω eV is locally free and H omOV (OY , OV ) = IX · OV . The morphisms iY and iY ◦ h are injective since sheaves involved are all torsion free. Now let v be a generic point of Y which is also a generic point of V . Suppose that the local ring OA,v has a regular system of parameters α1 , · · · , αc , x1 , · · · , xd . Then locally at an open set of Y containing only v we see that the sheaves Ω̄dK(Y )/k = k(v)dx̄1 ∧ · · · ∧ dx̄d , HY,V ⊗OY KY = k(v)ξY where ξY maps 1 to dx̄1 ∧ · · · ∧ dx̄d , and ω eV ⊗OV KY = k(v)dx̄1 ∧ · · · ∧ dx̄d . Thus it is easy to check that the morphism bY ◦aY is the identity. Hence in the locally constant sheaf Ω̄dK(Y )/k = ω eV ⊗OY KY the canonical sheaf ω eY is exactly the sheaf ω eV ⊗OV IX · OV . Furthermore since Y is generic linked to X via V we see that IX · OV = IX · OY . 10 Now tensoring the diagram (3.2.2) with OY over OV . Notice that KV ⊗OV OY = KY since IY /V · KV = KX . And combining the diagram (3.2.3) together we have (3.2.4) = ω eY _ // ω eV ⊗OV IX · OV // ω eA ⊗OA IX · OV   // ω eA ⊗OA OY uY ω eV ⊗OV OY jY   = Ω̄dK(Y )/k bY ◦aY ≃ // ω eV ⊗OV KY (bV ◦aV )⊗1Y  // ω eA ⊗OA KV ⊗OV OY . The two horizontal morphisms on the top and right of the diagram can be thought of as the restriction of the right bottom morphism of locally constant sheaves on their subsheaves. Thus the sheaf ω eY is the image of IX ⊗ ω eA under the following morphisms (3.2.5) (bV ◦aV )⊗1−1 Y IX ⊗ ω eA ֒→ ω eA −→ ω eA ⊗ OY −→ ω eA ⊗OA KY −−−−−−−− → Ω̄dK(Y )/k where except (bV ◦ aV ) ⊗ 1−1 Y the rest morphisms are all natural ones. Now we look at the canonical sheaf ω eVe . Denote by E := T + µ∗ G an effective divisor on e Recall that Ve is locally a complete intersection on A e and ∧c I e /I 2 = O e(cE). The normal A. A V Ve sheaf NVe /Ae = OVe (−cE). We define the sheaf eAe) eAe/IVe ω HVe ,Ae = H omOVe (∧c IVe /IV2e , ω which is torsion free since ω eAe is free. Exactly as in the situation of V on A, we have the following commutative diagram (3.2.6) ω eVe ≃ _ Ω̄d  K(Ve )/k ≃ aVe ≃ // H e e V ,A // ω eAe ⊗O e OVe (−cE) A  // H e e ⊗O K e e V ,A V V ≃ bVe  // ω eA ⊗OA KV eAe(−cE) under the morphisms Thus the sheaf ω eVe is the image of the sheaf ω (3.2.7) (a e ◦b e )−1 V V eAe ⊗OAe KVe −−− eAe ⊗ OVe −→ ω eAe −→ ω ω eAe(−cE) ֒→ ω −− −−→ Ω̄dK(Ve )/k where except of (aVe ◦ bVe )−1 all morphisms are natural ones. Push down (3.2.7) via ψ. Notice eA . Also since the birational morphism ψ eA and ψ∗ ω eAe = ω that ψ∗ (e ωAe(−cE)) = I (A, cX) ⊗ ω is an isomorphism over A\X so it is an isomorphism around generic points of Y and Ve and eA ⊗OA KY and ψ∗ Ω̄d e therefore ψ∗ (e ωAe ⊗OAe KVe ) = ω = Ω̄dK(Y )/k as locally constant sheaves. K(V )/k Furthermore at one generic point v of Y which is identical to a generic point of Ve since ψ is an isomorphism around v, we can choose the same local equation of the local ring OA,v and −1 OA,v e , for instance, α1 , · · · , αc , x1 , · · · , xd . Then we can check that the morphism (aVe ◦ bVe ) eVe is the image is the same as the morphism (bV ◦ aV ) ⊗ 1−1 Y . Thus we see that the sheaf ψ∗ ω of I (A, cX) ⊗ ωA under the morphisms (3.2.8) (bV ◦aV )⊗1−1 Y eA ⊗OA KY −−−−−−−− → Ω̄dK(Y )/k. I (A, cX) ⊗ ω eA ֒→ ω eA −→ ψ∗ (e ωAe ⊗ OVe ) −→ ω 11 The fact that I (A, cX) ⊗ ω eA is mapped surjectively to ψ∗ ω eVe is guaranteed by Claim 3.1.4 in the proof of Proposition 3.1. e Finally we compare (3.2.5) with (3.2.8). We have the following commutative diagram on A (3.2.9) ψ∗ ω eA // ψ ∗ ω eA ⊗ OVe // ψ ∗ ω eA ⊗OAe KVe   // ω eAe ⊗ OVe // ω eAe ⊗OAe KVe ω eAe where the vertical morphisms are induced by the morphism ψ ∗ Ω1A/k −→ Ω1e . Push down the A/k eA then we have the commutative diagram diagram and notice that ψ∗ ω eAe = ω (3.2.10) ω eA ω eA ⊗ ψ∗ OVe // ω eA ⊗OA KY V // ω eA ⊗OA KY 99 g ssss s sss  sss // ψ∗ (e ω e ⊗ Oe ) A eA −→ Since ω eA ⊗ ψ∗ OVe is naturally a OY -module the morphism g then factors through ω ω eA ⊗ OY −→ ω eA ⊗ ψ∗ OVe . Now it is clear that the proposition follows from (3.2.5) and (3.2.8).  Corollary 3.3. With notation as in Definition 2.3, let Y be a generic link to an affine pair (Ak , cXk ). Then ωYGR = ωY if and only if IXk = I (Ak , cXk ), where I (Ak , cXk ) is the multiplier ideal sheaf associated to the pair (Ak , cXk ). Proof. Let I (A, cX) be the multiplier ideal sheaf associated to the pair (A, cX). By the commutative diagram (3.2.1) we have ωYGR = ωY if and only if I (A, cX) · OY = IX · OY if and only if IX + IY = I (A, cX) + IY . Intersecting with IX and noticing that IX ∩ IY = IV and I (A, cX) ⊆ IX , we see that IX + IY = I (A, cX) + IY if and only if IX = I (A, cX) + IV . Now since the morphism A −→ Ak is smooth, we then have I (A, cX) = I (Ak , cXk ) · OA by [Laz04b, 9.5.45]. Also notice that IX = IXk · OA and the ring extension OAk −→ OA is faithfully flat. Thus intersecting with OAk , we conclude that IX = I (A, cX) + IV if and only if IXk = I (Ak , cXk ).  Now we can easily deduce a criterion when a generic link has rational singularities. It turns out that multiplier ideal sheaves determine rational singularities of a generic link. Corollary 3.4. With notation as in Definition 2.3, let Y be a generic link to an affine pair (Ak , cXk ). Then Y has rational singularities if and only if Xk is Cohen-Macaulay and IXk = I (Ak , cXk ), where I (Ak , cXk ) is the multiplier ideal sheaf associated to the pair (Ak , cXk ). Proof. Y has rational singularities if and only if Y is Cohen-Macaulay and ωYGR = ωY . Then the result is clear from above.  Corollary 3.5. With notation as in Definition 2.3, let Y be a generic link to an affine pair (Ak , cXk ). Suppose that the pair (Ak , cXk ) is log canonical and Xk is Cohen-Macaulay. Then Y has rational singularities. Proof. By Ein’s Lemma, that (Ak , cXk ) is log canonical implies IXk = I (Ak , cXk ). Then the result follows from above.  Remark 3.6. Let us go back to the result of Chardin and Ulrich mentioned in Introduction. Still with notation as in Definition 2.3 suppose that Xk is a local complete intersection with 12 rational singularities. Then by the inversion of adjunction [EM09] the pair (Ak , cXk ) is log canonical. Thus Corollary 3.4 says that a generic link Y of Xk has rational singularities. Proposition 3.7. With notation as in Definition 2.3 let (Ak , cXk ) be an affine pair and let Y be a generic link to X via a complete intersection V . Then lct(A, Y ) ≥ lct(A, V ) = lct(A, X) = lct(Ak , Xk ). Proof. Keep notation and construction as in the proof of Proposition 3.1. First of all it is clear that lct(A, X) = lct(Ak , Xk ) and since IV ⊆ IY we have lct(A, Y ) ≥ lct(A, V ). Thus it suffices to show lct(A, V ) = lct(A, X). Recall that ϕk : Ak −→ Ak is a factorization resolution of singularities of Xk inside Ak and X k is the strict transform of Xk . Denote by Exc(ϕk ) = ∪si=1 Eik the exceptional locus of ϕk with where Eik are prime divisors with normal crossing support. Then X k has normal Pcrossing s k k k E1 , · · · , Es (cf. Definition 2.6). We then can write the effective divisor Gk = i=1 ai Ei and P the relative canonical divisor KAk /Ak = si=1 ki Eik Recall also that the factorizing resolution of singularities ϕ : A −→ A of X inside A is then obtained by tensoring Spec k[Uij ] with the resolution ϕk . Write Ei := Eik ⊗k Spec k[Uij ] for i = 1, · · · , s. Then it is clear that the exceptional locus of ϕ is Exc(ϕ) = ∪si=1 Ei with X of X has normal crossing with simple normal crossing support, and the strict transform Ps E1 , · · · , E . Furthermore the effective divisor G = a E s i=1 i i and the relative canonical divisor P s KA/A = i=1 ki Ei . e −→ A is the composition of ϕ with the blowing-up µ : A e −→ A Now the morphism ψ : A ∗ ei = µ (Ei ) for i = 1, · · · , s. Since X has along X with the exceptional divisor T . We set E e ei has simple normal crossing with Ei we see that Ei is a prime divisor and Exc(ψ) = T ∪si=1 E e −→ A is a log resolution of X inside A. Notice that normal crossing support. Thus ψ : A = (c − 1)T . We then can write KA/A e (3.7.1) = (c − 1)T + KA/A e s X i=1 ei , ki E ψ −1 (X) = T + s X i=1 ei . ai E e (cf. Claim Claim 3.7.2. Recall that Ve is nonsingular locally complete intersection on A e1 , · · · , E es . 3.1.2). Then Ve has normal crossing with T, E Proof of Claim 3.7.2. The question is local so we just need to look at local equations. Let U k = Spec Rk be an affine open set of Ak such that IX k = (f 1 , · · · , f t ) ⊂ Rk and Eik has a local equation hi ∈ Rk for i = 1, · · · , s (cf. proof of Claim 3.1.1). Let U = U k ⊗ Spec k[Uij ] be the corresponding affine open set in A. Write R = Rk ⊗ k[Uij ]. Then IX = (f 1 , · · · , f t ) · R and each Ei is still defined by the equation hi in the ring R. Now let U1 = Spec R[f 2 /f 1 , · · · , f t /f 1 ] e over U . Then on U1 the divisor T is defined by the equation f 1 . be one canonical cover of A e Notice that each Ei is still defined by the local equation hi ∈ R[f 2 /f 1 , · · · , f t /f 1 ]. On U1 the α1 , · · · , α ec ), where variety Ve is defined by IVe = (e α ei = Ui,1 + Ui,2 f 2 /f 1 + · · · + Ui,t f 2 /f 1 , for i = 1, · · · , c. Now we just need to show on U1 , IVe , f 1 , h1 , · · · , hc are normal crossings. Notice that f 1 , h1 , · · · , hc are already normal crossings by the construction and they all sit in the ring ei ’s over Rk . Thus a local calculation shows Rk . But IVe is essentially defined by variables α that IVe meets f 1 , h1 , · · · , hc as normal crossings. This finishes the proof of Claim 3.7.2. 13 e along Ve with the exceptional divisor S and Now recall ν : A′ −→ A is the blowing-up of A ′ ′ ∗ ei for i = 1, · · · , s and T ′ = ν ∗ T . By Claim 3.7.2 above we f = ν ◦ ψ : A −→ A. Write Ei = ν E see that T ′ , E1′ , · · · , Es′ are all prime divisors and Exc(f ) = S ∪ T ′ ∪si=1 Ei′ are simple normal crossings. Thus f : A′ −→ A is a log resolution of (A, V + X), which we use to compute log canonical thresholds. Notice that KA′ /Ae = (c − 1)S. From (3.7.1) we can write KA′ /A = (c − 1)S + (c − 1)T ′ + s X ki E ′ , f −1 (X) = T ′ + s X ai Ei′ . i=1 i=1 Since IV · OAe = IVe · OAe(−ψ −1 (X)) (cf. Claim 3.1.1 and 3.1.2) we then have f −1 (V ) = S + T ′ + s X ai Ei′ . i=1 Finally by the definition of log canonical threshold we see that lct(A, X) = min{ ki + 1 (c − 1) + 1 (c − 1) + 1 , , } ai 1 0 and ki + 1 (c − 1) + 1 (c − 1) + 1 , , }. ai 1 1 Therefore lct(A, X) = lct(A, V ) as required. lct(A, V ) = min{  Corollary 3.8. With notation as in Definition 2.3, if IX = I (A, cX), where I (A, cX) is the multiplier ideal sheaf associated to the pair (A, cX), then IV = I (A, cV ) and IY = I (A, cY ), where I (A, cV ) and I (A, cY ) are multiplier ideal sheaves associated to the pairs (A, cV ) and (A, cY ), respectively. Proof. By Ein’s Lemma, IX = I (A, cX) if and only if I (A, (c−1)X) = OA . Thus lct(A, X) > (c − 1) and therefore by Theorem 3.7 lct(A, Y ) ≥ lct(A, V ) = lct(A, X) > (c − 1). Hence the multiplier ideal sheaves I (A, (c − 1)Y ) and I (A, (c − 1)V ) are all trivial. The result then follows by using Ein’s Lemma again.  Remark 3.9. In the above corollary, the equality IX = I (A, cX) is equivalent to the equality IXk = I (Ak , cXk ), where I (Ak , cXk ) is the multiplier ideal sheaf associated to the pair (Ak , cXk ). This is because the morphism A −→ Ak is smooth and the ring extension Rk −→ R is faithfully flat. Corollary 3.10. With notation as in Definition 2.3, let Y be a generic link to an affine pair (Ak , cXk ). Suppose that the pair (Ak , cXk ) is log canonical. Then the pair (A, cY ) is also log canonical. Proof. Since, by assumption, (Ak , cXk ) is log canonical and, by Lemma 2.5, I (Ak , cXk ) ⊆ IXk we see that lct(Ak , Xk ) = c. Thus by Theorem 3.7, we have lct(A, Y ) ≥ c. But by Lemma 2.5, we have lct(A, Y ) ≤ c. Therefore lct(A, Y ) = c and thus (A, cY ) is log canonical.  Proof of Theorem 1.1 in Situation A. First of all in this case, Y cannot be empty. The fact that Y is reduced is standard by [HU85, 2.6]. The rest of the theorem follows from Proposition 3.1, Proposition 3.2 and Proposition 3.7.  14 Remark 3.11. Using results established above, we then look at a sequence of generic linkages. Precisely, let (Ak , cXk ) be an affine pair as in Definition 2.3 and set Y0 := Xk and A0 := Ak . We denote a generic link of Y0 to be Y1 , which is in a nonsingular ambient space A1 . We can continue to construct a generic link of Y1 as Y2 in an nonsingular ambient space A2 . Consequently, we get a sequence Y0 , Y1 , · · · , such that each Yi is a generic link of Yi−1 and is in a nonsingular variety Ai . Now we list some interesting consequences from the above results as follows. (1) If IY0 = I (A0 , cY0 ), then IYi = I (Ai , cYi ), i.e. equality of multiplier ideal with ideal is preserved by generic linkages. (2) If (A0 , cY0 ) is log canonical then (Ai , cYi ) is log canonical, i.e. log canonical pair is preserved by generic linkage. (3) If (A0 , cY0 ) is log canonical and Y0 is rational then (Ai , cYi ) is log canonical and Yi is rational, i.e. log canonical plus rational is preserved by generic linkages. (4) lct(A0 , Y0 ) ≤ lct(A1 , Y1 ) ≤ · · · ≤ c, i.e. log canonical thresholds increase in generic linkages but bounded above by c. Notice that in (4) we get an increasing but bounded above sequence. Thus it must have a limit, which we denoted by lct∞ (A0 , Y0 ). It would be very interesting to know if lct∞ (A0 , Y0 ) is independent on the choice of generic linage sequence Y1 , Y2 , · · · . It has been conjectured by the author that after finitely many steps of generic link sequences we will have lct∞ (A0 , Y0 ) = c. However, it was pointed out by Bernd Ulrich that the conjecture is not true because otherwise if we start with a Cohen-Macaulay Y0 we will end up with a variety Y which has rational singularities, but it is not the case. Remark 3.12. There is a conjecture made by the author in [Niu11, Conjecture 1.4] which asserts that if X is a local complete intersection with log canonical singularities then a generic link Y of X is also a local complete intersection with log canonical singularities. Now it is clear that this conjecture is false. One main reason is that Y cannot be a local complete intersection. However, Corollary 3.10 says that the log canonical pair is preserved by generic linkages and in the conjecture the pair (A, cX) is actually log canonical. In the last of this section, we consider specialization problem stated in Situation B. It is a direct consequence of Situation A by restricting to the general fiber over Spec k[Ui,j ]. This quick proof of the theorem was suggested by the referee. Proof of Theorem 1.1 in Situation B. Keep the notation and construction in the proof of Proposition 3.1. Let A = Spec k[Ui,j ] be the affine space parameterizing the scalar matrices (ai,j )c×t . Recall that we have the following diagram (3.12.1)  Ve  e // A     ψ Y // A where Ve is the embedded resolution of Y (cf. Claim 3.1.2). It is a diagram over A. Thus it is enough to prove the theorem for a general fiber of this diagram over A. Since we assume a general fiber of Y over A is nonempty the morphism Y −→ A must be dominant. (In fact the only case that a general fiber of Y is empty is that Xk is a complete intersection. In this case we cannot make generic link under Situation B.) Thus the image of Y must contain a open set U of A. By replacing A by this open set we may assume that the morphism Y −→ A is 15 surjective. Now over a general point p ∈ A, the diagram is  Vep  ep // A     ψp Yp // Ap ep is the blowing-up of Ak along X k and the morphism ψp is Notice that by the construction A an isomorphism over Ak /Xk . Also by the generic smoothness Vep is the embedded resolution of Yp . Thus Yp is generically reduced. But Yp does not have embedded components and therefore is reduced. Now the rest of the argument is exact the same as the proof of the theorem in Situation A.  Remark 3.13. Corollary 3.5, 3.8 and 3.10 are still true in Situation B. However, in Corollary 3.3 and 3.4 the “if” parts are still true but “only if” parts are not in general. Remark 3.14. As in Remark 3.11 (4), we can look at an increasing sequence of log canonical thresholds lct(A, Y0 ) ≤ lct(A, Y1 ) ≤ · · · ≤ c, in which Yi is a generic link of Yi−1 in Situation B. It was pointed out by Lawrence Ein that by using ACC for log canonical thresholds [dFEM10], after finitely many steps the number lct becomes stable in the sequence, which we denoted by lct∞ (A, Y0 ). At the moment, it is not clear to us if this number depends on the specific linkage sequence or not. It would be very interesting to have a further investigation on this number. We hope that this new invariant will have some application in linkage classes of varieties. 4. Generic linkage of projective varieties and Castelnuovo-Mumford regularity In this section, we study a generic link of a subvariety of Pn in Situation C. The main idea is inspired by the work of Betram, Ein and Lazarsfeld [BEL91]. Thus we shall be brief in proofs. Throughout this section, we assume that A is a projective nonsingular variety over k and L is a line bundle on A generated by its global sections. We shall prove the following theorem which can be applied to a slightly more general case than Situation C. Theorem 4.1. Suppose that X ⊂ A is a reduced equidimensional subscheme of codimension c scheme-theoretically defined by the t sections si ∈ H 0 (A, Ldi ) with d1 ≥ d2 ≥ · · · ≥ dt . Take c general sections αi ∈ H 0 (A, IX ⊗ Ldi ) for i = 1, · · · , c and let V be a complete intersection defined by the vanishing of α1 , · · · , αc . Let Y be a subscheme of A defined by IY := (IV : IX ). Then either Y is empty or else: (1) Y is reduced equidimensional of codimension c (possibly reducible) geometrically linked to X via V . (2) ωYGR ≃ I (A, cX) · OY ⊗ ωA ⊗ Ld1 +···+dc , where I (A, cX) is the multiplier ideal sheaf associated to the pair (A, cX), and it fits into the following commutative diagram ωYGR  ≃ _ // I (A, cX) · OY ⊗ ωA ⊗ Ld1 +···+dc _ tr i  ωY ≃  // IX · OY ⊗ ωA ⊗ Ld1 +···+dc where the bottom one is given by 2.1.2, tr is the trace map, and the inclusion i is induced by I (A, cX) ֒→ IX (cf. Lemma 2.5). (3) lct(A, Y ) ≥ lct(A, V ) = lct(A, X). 16 Proof. Take a log resolution of singularities for the pair (A, X) as f : A −→ A such that IX · OA = OA (−E) where E is an effective divisor and Exc(f ) ∪ E is a divisor with simple normal crossing support. We may also assume that the morphism f is an isomorphism over the open set A\X. For i = 1, · · · , t we denote by bi the sub-linear system of |Ldi | determined by the vector space H 0 (A, IX ⊗ Ldi ). We use notation (si )0 to be the effective divisor in the linear system bi defined by the zero locus of the section si . Since X is defined by the vanishing of sections (s1 ,··· ,st ) si we have a surjective morphism ⊕t L−di −−−−−−→ IX −→ 0. Pulling back this surjective morphism via f , we then obtain a surjective morphism (4.1.1) t M (f ∗ s1 ,··· ,f ∗ st ) f ∗ L−di −−−−−−−−−→ OA (−E) −→ 0. (Since f is dominant the induced morphism on the linear system f ∗ : bi −→ |f ∗ Ldi | is actually injective. So we think of bi naturally as a sub-linear system of |f ∗ Ldi | under f ∗ .) Denote by Bi = f ∗ bi − E the sub-linear system of |f ∗ Ldi (−E)| obtained from f ∗ bi by removing the base locus divisor E. Then the section f ∗ si naturally gives rise to a section σi of f ∗ Ldi (−E) defining an effective divisor Fi in the linear system Bi . Thus from the surjectivity of (4.1.1), we deduce a surjection t M (σ1 ,··· ,σt ) f ∗ L−di (E) −−−−−−→ OA −→ 0, and therefore we have (4.1.2) F1 ∩ F2 ∩ · · · ∩ Ft = φ. We make the following observation. Claim 4.1.3. For each i = 1, · · · , t, one has (a) The system B1 is base point free. (b) For each i ≥ 1, the base locus Bs(Bi ) of the system Bi is inside the support of the divisor Fj for j ≥ i. Proof of Claim 4.1.3. For the statement (a), by the definition of X, we see that the sheaf IX ⊗ Ld1 is generated by its global sections. Let W1 = H 0 (A, IX ⊗ Ld1 ) so that b1 = |W |. So we have a surjective morphism W1 ⊗ Ld1 −→ IX −→ 0. Thus we have a surjective morphism W1 ⊗ f ∗ L−d1 −→ OA (−E) −→ 0, i.e., W1 ⊗ f ∗ L−d1 (E) −→ OA −→ 0. Thus we see that B1 is base point free. For the statement (b), notice that when i = 1 the result is trivial from (a). We prove the first nontrivial case when i = 2. It is from the definition of base loci that Bs(B2 ) ⊂ F2 . Now we show Bs(B2 ) ⊂ F3 . Denote by δ32 the linear system |Ld2 −d3 | which is base point free. Notice that we have an inclusion δ32 + (s3 )0 ⊂ b2 . Thus pulling back via f , we have the inclusion f ∗ δ32 + f ∗ (s3 )0 ⊂ f ∗ b2 and therefore by subtracting the divisor E we see f ∗ δ32 + f ∗ (s3 )0 − E ⊂ f ∗ b2 − E. Recall that F3 = f ∗ (s3 )0 − E and B2 = f ∗ b2 − E. Thus we have an inclusion f ∗ δ32 + F3 ⊂ B2 . From this, the linear system B2 − F3 contains the system f ∗ δ32 , which is base point free. Thus the base locus Bs(B2 ) is contained in F3 . Similar argument works for all j ≥ i, which proves the Claim 4.1.3. Now since B1 is base point free, by Bertini’s theorem (Cf. [Har77, Corollary III.10.9]) we can take a general element D1 ∈ B1 such that (i) D1 is nonsingular and equidimensional; (ii) 17 no components of D1 are contained in the support of E ∪ Exc(f ); (iii) D1 has normal crossing with Exc(f ); (iv) D1 ∩ F2 ∩ · · · ∩ Ft = φ. Here the reason for (iv) is that since the section σ1 is nowhere vanishing on F2 ∩ · · · ∩ Ft , the general section of B1 is then nowhere vanishing on F2 ∩ · · · ∩ Ft . Now by Claim 4.1.3 the base locus Bs(B2 ) is inside Fj for j ≥ 2. Thus we have Bs(B2 ) ⊂ F2 ∩ F3 ∩ · · · ∩ Ft . By the fact (4.1.2) and the choice of D1 , the linear system B2 is base point free on D1 . Thus by Bertini’s theorem again we can choose a general element D2 ∈ B2 such that (i) D1 ∩ D2 is nonsingular and equidimensional; (ii) no components of D1 ∩ D2 are contained in the support of E ∪ Exc(f ); (iii) D1 ∩ D2 has normal crossing with Exc(f ); (iv) D1 ∩ D2 ∩ F3 ∩ · · · ∩ Ft = φ. We then can iterate such argument by c times to end up with a subscheme Y := D1 ∩ D2 ∩ · · · ∩ Dc of A such that Y is either empty or else (i) Y is nonsingular and equidimensional; (ii) no component of Y is contained in the support of E ∪ Exc(f ); (iii) Y has normal crossing with Exc(f ); (iv) Y ∩ Fc+1 ∩ · · · ∩ Ft = φ. Notice that each effective divisor Di is a general element in the linear system Bi . Now each Di naturally corresponds to a general section αi ∈ H 0 (A, IX ⊗ Ldi ). (Recall that the divisor Di + E is in f ∗ bi .) Those α1 , · · · , αc cut out a complete intersection V on A. Let Y be the subscheme of A linked to X via V , i.e., Y is defined by an ideal sheaf IY := (IV : IX ). It is well-know that Y is equidimensional of codimension c without embedded components and with no common components with X. Notice that at least set-theoretically Y = f (Y ). Recall that the morphism f is an isomorphism over the open set A\X. Thus by the construction of Y we see that Y ∩ f −1 (U ) is isomorphic to Y ∩ U . Therefore f is an isomorphism at the generic points of Y and then Y is the strict transform of Y . Thus Y is generically smooth and therefore is reduced. The rest of the statement (1) are all standard result, so we would not repeat here. By the construction of Y , we have a surjective morphism ⊕c f ∗ L−di (E) −→ IY −→ 0. Thus the normal bundle of Y inside A can be easily calculated and the rest argument for (2) is exactly the same as the proof of Propositions 3.1 and 3.2. The reducedness of Y in (1) is also clear since Y is generic reduced and has no any embedded components. Finally, the statement (3) has the same proof as in Proposition 3.7 so we would not repeat here.  Remark 4.2. If A = Pn , we can actually reduce Situation C to Situation B, at least in the case that all equations have the same degree. This was kindly suggested by the referee. Here let us explain this reduction briefly. We choose general homogeneous coordinates for Pn so that all the equations fi ’s restricted to the same degree polynomials, say gi ’s, on the standard charts. Then we choose a general matrix B = (bij )c×t and we can find a invertible lower triangular c × c matrix A so that A · B = (B1 |B2 ), where B1 is a c × c upper triangular matrix. Now the complete intersection (β1 , · · · , βc ) = A · B · (g1 , · · · , gt )T will give back general sections αi in H 0 (Pn , IX (di )). As an application of above theorem, using an idea of [CU02] we can generalize results of de Fernex and Ein [dFE10, Corollary 1.4] and Chardin and Ulrich [CU02, Theorem 0.1] on the Castelnuovo-Mumford regularity bound. The bound was first established in [BEL91] for nonsingular case and then generalized in [CU02] for rational singular case. [BEL91] and [CU02] allow variety to have some not too bad very singular loci but [dFE10] cannot allow this situation, which we are able to handle now (cf. [dFE10, Remark 5.2]). Recall that a coherent sheaf F on the projecive space Pn is said to be m-regular if H i (Pn , F (m − i)) = 0 for all 18 i > 0. The minimal such number m is called the Castelnuovo-Mumford regularity of F and is denoted by reg F . If X is a subscheme of Pn defined by an ideal sheaf IX then the regularity of X is defined to be reg X = reg IX . Corollary 4.3. Let X ⊂ Pn be a reduced equidimensional subscheme of codimension c defined by the equations of degree d1 ≥ d2 ≥ · · · ≥ dt and let Z = Supp(IX /I (Pn , cX)) where I (Pn , cX) is the multiplier ideal sheaf. Assume that dim Z ≤ 1 and each one dimensional irreducible component of Z has at least one point at which X is a local complete intersection. Then c X di − c + 1 reg X ≤ i=1 and equality holds if and only if X is a complete intersection in Pn . Proof. If X is a complete intersection then the result is clear. So in the sequel we assume X is not a complete intersection. Then take a generic link Y of X via a complete intersection V cut out by the general equations of X of degree d1 ≥ d2 ≥ · · · ≥ dc . By the assumption on Z we can choose V general such that Y ∩ Z has dimension ≤ 0, i.e. no any dimension one irreducible component of Z can be contained in Y . This means that from Theorem 4.1 we have the following exact sequence (4.3.1) 0 −→ ωYGR −→ ωY −→ Q −→ 0 where dim Supp Q ≤P0. c Denote by d := j=1 dj and r := dim V = dim X = dim Y . It is clear that from the Kawamata-Viehweg vanishing theorem we can deduce reg ωYGR = r + 1 and therefore reg ωY = r + 1 by the sequence (4.3.1). Now recall ωY = IX · OV ⊗ ωV . Since V is a complete intersection we see reg IV = d − c + 1 and ωV = OV (d − n − 1) by Koszul resolution and thus ωY = IX · OV (d − n − 1). Now from the exact sequence 0 −→ IV −→ IX −→ IX · OV −→ 0, it is immediately that reg IX ≤ d − c.  Remark 4.4. In the corollary, by Ein’s Lemma the set Z can be equivalently defined as Z := {x ∈ Pn | I (Pn , (c − 1)X) is non trivial at x}. The condition on Z in the corollary already includes conditions discussed in de Fernex and Ein [dFE10] and Chardin and Ulrich [CU02] and is certainly more general. It is worth mentioning that the above liaison method to bound the regularity also can be used directly to study so called multiregularity once the correct corresponding form of generic linkage can be built. In Theorem 4.1, a generic link Y is usually not necessarily irreducible. One important case in applications is when X is cut out by sections of the same degree, i.e., d1 = · · · = dt . If the defining ideal sheaf IX has enough sections then it is possible that a generic link Y is irreducible. One way to see this is by using the s-invariant of IX with respect to L, which measures the positivity of IX . We recall its definition and refer to [Laz04a] for further reference. Definition 4.5. Given an ideal sheaf I on A let µ : W = BlI A −→ A be the blowing-up of A along the ideal I with an exceptional Cartier divisor E on W , such that I · OW = OW (−E). Let L be an ample line bundle on A. We define the s-invariant of I with respect to L to be the positive real number sL (I ) := min{ s | sµ∗ L − E is nef }. 19 Here sµ∗ L − E is considered as an R-divisor on W . Remark 4.6. For example, in the projective space case the line bundle is usually taken to be the hyperplane divisor and simply write the s-invariant as s(I ). In this case suppose that d is an integer such that I (d) is generated by global sections, then it is easy to see that s(I ) ≤ d, i.e., the s-invariant of I is always bounded by a generating degree of I . There is an example in [CEL01] showing that the s-invariant could be an irrational number. Corollary 4.7. With notation and assumption as in Theorem 4.1 assume further that L is ample and X is cut out by the sections of the same degree, i.e., d1 = · · · = dt = d. If the s-invariant of IX with respect to L is strictly smaller than d, then Y is nonempty and irreducible. Proof. We keep notation as in the proof of Theorem 4.1 but set d1 = · · · = dt = d. Now this time the linear systems B1 , · · · , Bt are all the same as the linear system B := f ∗ b − E, where b is the sub-linear system of |Ld | determined by the vector space H 0 (A, IX ⊗ Ld ). Notice that B is a sub-linear system of |f ∗ Ld (−E)| and is base point free. Also notice that dim B = dim b since f is dominant and E is the basic locus of f ∗ b. All we need is to show the subscheme Y , which is the intersection of c general divisors Di ∈ B, is irreducible. Recall that B is base point free, it then gives a morphism to a projective space φB : A −→ Pr , where r = dim B such that f ∗ Ld (−E) = φ∗B OPr (1). We claim that the morphism φB is generically finite. To see this, let µ : A′ = BlX A −→ A be the blowing up of A along X with an exceptional divisor F such that IX · OA′ = OA′ (−F ). By the universal property of blowing-ups we have g : A −→ A′ such that f = g ◦µ and g ∗ F = E. Notice that g is generically finite. Now the system B′ := µ∗ b − F is base point free and then gives a morphism φB′ to Pr , which commutes with φB , i.e. φB = φB′ ◦ g A❄ ❄❄ ❄❄ ❄ g ❄❄  φB A′ // Pr >> ⑥ ⑥⑥ ⑥ ⑥⑥ ⑥⑥ φB′ Since the s-invariant of IX with respect to L is strictly smaller than d the line bundle µ∗ Ld (−F ) is ample. But µ∗ Ld (−F ) = φ∗B′ OPr (1) so the morphism φB′ is finite. Thus φB is generically finite and we have dim φB (A) = dim A. Now by the theorem of [Laz04a, 3.3.1], the subscheme Y is nonempty and irreducible since dim φB (A) > c. Therefore the generic link Y to X is also nonempty and irreducible.  Remark 4.8. Having Theorem 4.1 in hand, it is then easy to get those similar corollaries mentioned in the previous sections (cf. Remark 3.11, 3.13 and 3.14). So we leave them to the reader. References [BEL91] [BVU03] [CEL01] Aaron Bertram, Lawrence Ein, and Robert Lazarsfeld. Vanishing theorems, a theorem of Severi, and the equations defining projective varieties. J. Amer. Math. Soc., 4(3):587–602, 1991. A. Bravo and O. Villamayor U. A strengthening of resolution of singularities in characteristic zero. Proc. London Math. Soc. (3), 86(2):327–357, 2003. Steven Dale Cutkosky, Lawrence Ein, and Robert Lazarsfeld. Positivity and complexity of ideal sheaves. Math. Ann., 321(2):213–234, 2001. 20 [CU02] Marc Chardin and Bernd Ulrich. Liaison and Castelnuovo-Mumford regularity. Amer. J. Math., 124(6):1103–1124, 2002. [dFD12] Tommaso de Fernex and Roi Docampo. Jacobian discrepancies and rational singularities. 2012. [dFE10] Tommaso de Fernex and Lawrence Ein. A vanishing theorem for log canonical pairs. Amer. J. Math., 132(5):1205–1221, 2010. [dFEM10] Tommaso de Fernex, Lawrence Ein, and Mircea Mustaţă. Shokurov’s ACC conjecture for log canonical thresholds on smooth varieties. Duke Math. J., 152(1):93–114, 2010. [EIM11] Lawrence Ein, Shihoko Ishii, and Mircea Mustata. Multiplier ideals via Mather discrepancy. Arxiv, 2011. [EM09] Lawrence Ein and Mircea Mustaţă. Jet schemes and singularities. In Algebraic geometry—Seattle 2005. Part 2, volume 80 of Proc. Sympos. Pure Math., pages 505–546. Amer. Math. Soc., Providence, RI, 2009. [Har77] Robin Hartshorne. Algebraic geometry. Springer-Verlag, New York, 1977. Graduate Texts in Mathematics, No. 52. [Hoc73] M. Hochster. Properties of Noetherian rings stable under general grade reduction. Arch. Math. (Basel), 24:393–396, 1973. [HS97] Reinhold Hübl and Gerhard Seibert. The adjunction morphism for regular differential forms and relative duality. Compositio Math., 106(1):87–123, 1997. [HU85] Craig Huneke and Bernd Ulrich. Divisor class groups and deformations. Amer. J. Math., 107(6):1265– 1303 (1986), 1985. [HU87] Craig Huneke and Bernd Ulrich. The structure of linkage. Ann. of Math. (2), 126(2):277–334, 1987. [HU88] Craig Huneke and Bernd Ulrich. Algebraic linkage. Duke Math. J., 56(3):415–429, 1988. [Kol97] János Kollár. Singularities of pairs. In Algebraic geometry—Santa Cruz 1995, volume 62 of Proc. Sympos. Pure Math., pages 221–287. Amer. Math. Soc., Providence, RI, 1997. [KW88] Ernst Kunz and Rolf Waldi. Regular differential forms, volume 79 of Contemporary Mathematics. American Mathematical Society, Providence, RI, 1988. [Laz04a] Robert Lazarsfeld. Positivity in algebraic geometry. I, volume 48 of Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics [Results in Mathematics and Related Areas. 3rd Series. A Series of Modern Surveys in Mathematics]. Springer-Verlag, Berlin, 2004. Classical setting: line bundles and linear series. [Laz04b] Robert Lazarsfeld. Positivity in algebraic geometry. II, volume 49 of Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics [Results in Mathematics and Related Areas. 3rd Series. A Series of Modern Surveys in Mathematics]. Springer-Verlag, Berlin, 2004. Positivity for vector bundles, and multiplier ideals. [Lip84] Joseph Lipman. Dualizing sheaves, differentials and residues on algebraic varieties. Astérisque, (117):ii+138, 1984. [Mig98] Juan C. Migliore. Introduction to liaison theory and deficiency modules, volume 165 of Progress in Mathematics. Birkhäuser Boston Inc., Boston, MA, 1998. [Niu11] Wenbo Niu. A bound for the Castelnuovo-Mumford regularity of log canonical varieties. J. Pure Appl. Algebra, 215(9):2180–2189, 2011. [PS74] C. Peskine and L. Szpiro. Liaison des variétés algébriques. I. Invent. Math., 26:271–302, 1974. Department of Mathematics, Purdue University, West Lafayette, IN 47907-2067, USA E-mail address: [email protected] 21
0math.AC
Curve Reconstruction via the Global Statistics of Natural Curves Ehud Barnea and Ohad Ben-Shahar Dept. of Computer Science, Ben-Gurion University Beer-Sheva, Israel arXiv:1711.03172v2 [cs.CV] 18 Nov 2017 {barneaeh, ben-shahar}@cs.bgu.ac.il 20 Abstract 10 0 -10 Reconstructing the missing parts of a curve has been the subject of much computational research, with applications in image inpainting, object synthesis, etc. Different approaches for solving that problem are typically based on processes that seek visually pleasing or perceptually plausible completions. In this work we focus on reconstructing the underlying physically likely shape by utilizing the global statistics of natural curves. More specifically, we develop a reconstruction model that seeks the mean physical curve for a given inducer configuration. This simple model is both straightforward to compute and it is receptive to diverse additional information, but it requires enough samples for all curve configurations, a practical requirement that limits its effective utilization. To address this practical issue we explore and exploit statistical geometrical properties of natural curves, and in particular, we show that in many cases the mean curve is scale invariant and oftentimes it is extensible. This, in turn, allows to boost the number of examples and thus the robustness of the statistics and its applicability. The reconstruction results are not only more physically plausible but they also lead to important insights on the reconstruction problem, including an elegant explanation why certain inducer configurations are more likely to yield consistent perceptual completions than others. -20 -30 -40 -50 -60 -70 -80 -20 0 20 (a) 40 60 80 100 60 80 100 (b) 20 20 10 10 0 0 -10 -10 -20 -20 -30 -30 -40 -40 -50 -50 -60 -60 -70 -70 -80 -80 -20 0 20 40 (c) 60 80 100 -20 0 20 40 (d) 1. Introduction Figure 1. Curve reconstruction via global statistics of natural curves. (a) To measure natural curve prior for a given relative inducer configuration, curve fragments having the desired relative inducers (end points + tangent orientation) are collected from ground truth curves labeled by humans [8]. (b) The curves are then normalized to the same frame of reference and sampled along their arc length with n equally spaced points. In this example n = 5 and to avoid clutter only 4 curves are shown. (c) Each point i along the arc length of the reconstructed curve is calculated as the mean of the corresponding points in the dataset, or more abstractly, as the expected value of the distribution of all ith points of curves that match the same inducers. (d) While some variance is observed among the centers of all 245 curves, the distribution appears rather tight, somewhat anisotropic, and approximately normal, suggesting that the expected value nicely represents the likely outcome. The reconstruction of visual curves is the process of filling in curve fragments that are completely unobservable due to occlusion or adversarial acquisition conditions. When attempting this task one could pursue one of two different goals, either the original physical shape or the perceived one. (Note that oftentimes these two curves are quite different.). Different models for the generation of missing parts of curves were indeed suggested [25, 13, 18, 11, 2, 10, 19, 33] and employed in various applications such as image inpainting [26, 23, 24, 29], and computer graphics [10, 9]. With much of the theoretical work done in the context of curve completion that supports perceptual plausibility, most studies have focused on defining different shape criteria for the generation of visually pleasing curves (for example those with minimal total curvature [25, 18, 11] or minimal change of curvature [13]) rather than relying on any measurable prior on natural curves. Additionally, the computation of these curves entails a minimization procedure that usually requires an iterative scheme that is susceptive to local minima and cannot be easily expanded to include 1 additional information (such as the curvature at the visible end points or the shape of the occluder, among others). Critically, no consensus exists in the literature regarding which completion criteria are preferred, and evaluation is hardly performed vis-a-vis physical objects (whose shape one tries to reconstruct) or perceptual findings. Somewhat differently, and avoiding arbitrary shape constraints as above, Ben-Yosef and Ben-Shahar suggested a biologically plausible theory based on an abstraction of the primary visual cortex and a least action criterion [2]. This was recently elaborated as a constrained Elastica model in the unit tangent bundle with emergent properties like sensitivity to curvature [1]. Other works employed probabilistic schemes such as first-order and multi-scale higher-order Markov models [31, 19]. These models too, however, suffer from some of the issues discussed above. In this work we suggest to incorporate a stronger and more realistic prior for reconstruction by following the global shape statistics of natural curves. Like others, we will assume that the reconstruction is performed between two inducers – a pair of end points, their tangent orientation, and possibly additional information about the observed part of the curve as it penetrates the occluder. Simply put, we first sample from the distribution of natural curves that corresponds to each relative inducer configuration. This operation can be done empirically from annotated datasets [8]. Representing each curve as a discrete set of n points distributed uniformly along the arc length, we then extract the point-wise mean of the collected curves, from which a “mean curve” can be compiled. In contrast to other methods employing only local statistics of adjacent point pairs, this computation examines curves in their entirety, thus employing global statistics. Even when lacking any local consideration, this process generates surprisingly smooth and visually pleasing curves, as shown in Fig. 1. And yet, for many inducer configurations, especially for longer curves, the number of observed samples may be small, prohibiting robust statistics and thus proper reconstruction. To alleviate this problem we show that the mean curve is scale invariant in many cases and further investigate its extensibility, allowing to collect and generate many more samples for each configuration, providing a significantly more robust reconstruction process. In addition to their pleasing appearance, the generated curves and our proposed completion model enjoy several favorable properties. By design, the resultant curves strongly represent the distribution of physical image curves and thus the structure of objects in natural images. By definition of the expected value, these curves are also “closest” to all dataset curves with the same inducer configuration. The proposed method can also easily extend to include the curvature at the end points, the shape of the occluder, or any other information, by simply conditioning the measured probability distribution (and thus the reconstruction computation) on the desired properties or conditions. Furthermore, the proposed reconstruction approach provides novel insights into the reconstruction problem. For example, we show that for “convenient” configurations (when the inducers are relatable [12] or even just “facing” each other) the distribution of curves in natural images is quite narrow and the mean curve is similar to most ground-truth curves, providing a reconstruction that closely matches the ground truth physical curves in most cases. However, curves with “abnormal” or “difficult” inducer configurations (e.g., when the inducers face away from each other) exhibit much greater variance, which implies that any reconstruction, regardless of the underlying principle employed, is likely to generate a curve that does not reproduce the original shape. Such an analysis suggests that in these cases additional information is strongly recommended, as well as a model that can exploit it (like the one suggested here). 2. Prior art Different methods have been suggested for the generation of curves, with either the goal of completing curves when no information is known apart for the inducer configuration (usually the result of occlusions), or when the curve part to complete is visible but difficult to discern due to noisy or faint edge appearance. To the best of our knowledge no work has focused on reconstruction of missing curve parts to match the physical reality, and so our review of the prior art focuses on methods obtaining visually pleasing or perceptually plausible completions over large gaps. Much of the previous work on curve completion is based on defining a set of axioms or properties that the completed curve should satisfy, in what has been dubbed the axiomatic approach [2, 1]. Given such axioms, a model and computational approach that generate such curves is then developed. Among the first is the Biarc model suggested by Ullman [25] that seeks curves of least curvature that are also smooth, isotropic, and extensible. Loosening some of these constraints, the Biarc model constructs the completed curve using two circular arcs (that meet at a curvature discontinuity). Taking least curvature strictly later gave rise to the Elastica model [18, 11, 3, 22, 30, 16]. A different property, suggested by Kimia et al. [13], is the minimization of change in curvature, resulting in a family of visually pleasing curves known as Euler Spirals. This completion model has been improved later in various follow up papers [32, 33, 27]. Employing a different approach, in what has been dubbed the “mechanistic approach” [2, 1], some works define probabilistic models for the generation of maximum probability curves or for the calculation of point-wise probabilities of belonging to a curve. In Williams and Jacobs 2 3. Global Curve Statistics - Analysis and Reconstruction [31], for example, the completion is described as the most probable random walk between the curve inducers. Being a first order Markov model, this work can be seen as minimizing some local probabilistic measure along the curve while ignoring long range interactions. A similar model was also employed together with local detection responses for grouping of visible edges [6]. In a later work, it was shown that this Markov assumption does not comply with curvature statistics of natural curves, and so a higher order model was suggested incorporating multiple scales for the task of edge boundary detection [19]. Given an input inducer configuration C = (I1 , I2 ) for inducers I1 = (Ix1 , Iy1 , Iθ1 ) and I2 = (Ix2 , Iy2 , Iθ2 ) at locations I1xy = (Ix1 , Iy1 ), I2xy = (Ix2 , Iy2 ) and orientations Iθ1 , Iθ2 , we seek to generate a curve represented as a set of n points α(C) = {x1 , ..., xn } that closely matches the way physical visual (i.e., image) curves behave between such two inducers. That latter behavior will be measured from a large collection of observable image curves. For this data driven reconstruction we suggest to employ the distribution of natural curves for a given configuration: Seeking to benefit the advantages of both approach types while avoiding arbitrary or unfounded assumptions about the shape of the completed curves, Ben-Yosef and BenShahar [2] moved the computation framework from the image plane to a space that abstracts the primary visual cortex where the visual system allegedly performs the curve completion task. With a proper abstraction the problem was then considered in the unit tangent bundle and the completion criteria become ones that are inspired by how biological neural circuits may behave. The simple models that emerged, first one that seeks the shortest path in the tangent bundle [2] and later the tangent bundle Elastica [1], are very simple to describe (though not necessarily to solve) and provide visually pleasing curves. Like in previous models, no perceptual validation or evaluation against ground truth were yet performed. P (x1 , ..., xn |I1 , I2 ) . (1) Previous works that employed the statistics of curves sought the most likely completion, which they were able to calculate by making assumptions that enable to express this distribution with smaller functions that capture local statistics of shape. Here, we suggest a global approach of estimating the mean curve instead, and as observed in Fig. 1d, it may also provide a good estimation of the most likely curve. In the following we describe the data collection and completion process, as well as its practical difficulties to generate proper reconstructions when the inducers are too far, among other conditions. To make the process more generally applicable, we show that the mean curve possesses certain properties that facilitate more stable and visually appealing completion even under those challenging conditions. While most of the prior art in curve completion sought the perceptual completed curve, it is also reasonable to seek the likely physical curve between inducers, a task that lends itself to properties of real word image curves and natural image statistics. Indeed, some prior art did employ various statistics for the estimation of different aspects of natural images, showing that they follow properties such as scale invariance [20], or that the lengths of curve segments between two locally maximal curvature points follow a power low [19]. Focusing on the co-occurrence of oriented edges, a strong preference of curve elements to co-linearity was shown by employing the statistics of edge pairs [7], and further high-order structure was shown by examining the statistics of edge triplets [14]. In this paper we combine both schools, i.e., we explore natural image curve statistics for the task of long range curve reconstruction that best fits the physical reality (rather than, for example, the perceptual process or its outcomes). 3.1. Collection and Representation of the Prior As exemplified in Fig. 1, the basic reconstruction of a curve between a given inducer configuration C follows several steps. Note that most of the computations can and are done just once as preprocessing and need not repeat themselves for each reconstruction query, which essentially can be answered by a lookup operation. As a first step, we collect a set of natural image curve fragments with configurations that are similar to C. To that end, we employ the existing Curve Fragment Ground-Truth Dataset (CFGD) [8] that contains ground-truth annotations of perceived image curves collected from three different annotators on highly varied scenes from the Berkeley Segmentation Dataset (BSDS) [15], leading to ~40K perceived curves represented as a set of ordered points. Via proper processing we consider any sub-curve of each CFGG curve as a fragment in its own right, an operation implemented by choosing any possible pair of points along a given CFGD curve as starting and ending points of a fragment. This process provides a total of ~19M fragments. Next, to make these fragments useful for our statistical analysis, we represent them by the relative configuration of their inducers: Our investigation of the statistics of curves follows the framework of active shape models [4], employing the mean and variance of point correspondences and allowing a simpler investigation of shape variability relative to more complex methods for averaging curves [21]. 3 Cr = p = (px , py , pθ ) = (Ix1 − Ix2 , Iy1 − Iy2 , Iθ1 − Iθ2 ) and rotated back to configuration C, providing α(C). The reconstructed curve as a whole is obtained by interpolating these points, either linearly (as in Fig. 1c) or using more elaborate methods. As exemplified in Fig. 1, this process often provides intuitive, visually pleasing, and veridical reconstructions. Such results come as no surprise once we examine the nearly normal distribution of the curve sample points, for example the one for the central curve point depicted in Fig. 1d. Note that this happens despite the observation that the center point, being “furthest” away from both inducers along the arc length, is the one where curves are most likely to show the greatest variation. That said, and as Fig. 2 shows, the quality of results highly depends on the number of ground truth curve fragments that are observed in the prior (denoted as darker blue curves), or more formally, on the power of the statistics for any given inducer configuration. Empirically, reconstructions appear noisy when sample size is small, a situation more common for example when inducers are oriented away from each other, especially for larger gaps (i.e. long curves). Clearly, one way to address this difficulty is collecting more data and annotating many more curves, two operations that require much human labor. However, one can do much better even with existing data (in our case, the CFGD collection [8]) and indeed, to alleviate the problem we now examine and exploit certain properties of the mean curve that allow “sharing” fragments between configurations, boosting the number of examples and the power of the statistics, and thus greatly improve the results in the “problematic” cases also. (2) where pxy = (px , py ) and pθ are the location and orientation of the second inducer relative to the first one. In particular, we translate and rotate the curve fragment with configuration C such that the location of its first inducer I1xy = (Ix1 , Iy1 ) overlaps the origin of the coordinate system, and its orientation Iθ1 coincides with the X axis. This operation effectively assumes invariance of shape to translations and rotations and allows a representation of the transformed fragments by the second inducer only. Assuming also invariance to reflection, we finally reflect all fragments with positive relative elevation (i.e., py > 0) so all curves end in the bottom half of the coordinate system. Finally, for a quick lookup of fragments later on, they are stored according to their relative configuration p. All this pre-processing is exemplified in Fig. 1a,b. To extract the probability distribution of natural curves that match C, we now collect all curve fragments that fit the corresponding relative inducer configuration, allowing some tolerance in position and orientation. Formally, we include all curve fragments with relative configuration Cer = kp −qxy k < t1 and dπ (pθ , qθ ) < t2 , where dπ q, such that xy kpxy k is the angular distance between two angles. That is, we include fragments if their inducer configurations deviate from pxy only marginally in normalized distance and in relative orientation, where the margin is determined by two predefined small thresholds t1 and t2 . Note that since the collected fragments have similar but not identical configurations, they are further finely transformed to allow meaningful pooling in the reconstruction step. In practice, they are just slightly scaled so their end point qxy exactly matches pxy . In the interest of space, the few trivial technical details of this step are listed in the supplementary materials. Note that small discrepancies in orientations qθ and pθ may still persist but do not affect the reconstruction process. 3.2. Basic Curve Reconstruction m(Cr ) X 1 αi (Cr ) , m(Cr ) i=1 >300 200 200 100 100 0 (a) As the reconstruction of missing curve fragments is based on the “mean curve”, the latter must be represented in a convenient way. For configuration C with relative configuration Cr , we represent transformed fragments in the collected data as a set of n points αi (Cr ) = {x1 , ..., xn } sampled from the original points such that the arc length between each two adjacent points in αi (Cr ) is equal (blue points in Fig. 1b). The mean curve α(Cr ) is estimated as: α(Cr ) = >300 0 (b) Figure 2. Basic reconstructions of different inducer configurations based on the mean curve. All configurations share one inducer (red) but have different second inducers (green), in this case at the same distance (80 pixels). Curve colors represent the number of corresponding fragments that were found in the dataset and thus used during reconstruction. Note how larger sample sets allow more intuitive and visually pleasing reconstructions. 3.3. Boosting via Invariance to Scale (3) If curve fragments (or curves in general) were scale invariant, curves (either physical or reconstructed) would scale similarly to their inducer configuration. Hence, if we where m is the number of available fragments αi for relative configuration Cr (Fig. 1c). Finally, α(Cr ) is translated 4 could obtain evidence to that effect, the distribution of curve fragments at one scale could help determine the reconstructions at other scales also and the scarcity of samples for certain configurations, especially for longer curves, would be alleviated. Clearly, with such a capacity, one would even be able to generate reconstructions of arbitrarily long curves at arbitrary scales even if such curves were never observed in the prior. In this section we show that the mean curve is indeed scale invariant in most cases, facilitating data boosting and better reconstructions in general. We note that these findings are congruent with earlier natural image statistics about edge elements and image curves [20, 7], though here we show them for the shape of whole curves. For the interest of space we focus the presentation on the curve center points. Loosely speaking, the reconstructed curve for some inducer configuration is invariant to scale if it is similar to the reconstruction at any other scale after proper scaling of the configuration. Since scaling is analogous to changing viewing distance, and since such an operation does not change the observed orientation, scaling essentially affects only the distance between inducers, and the “scale” s of a curve fragment is determined by that distance alone. With this in mind, to examine the scale invariance hypothesis we explore the effect of scale on the reconstruction at a base relative configuration Cr = p with nominal scale 1 (i.e., with kpxy k = 1). At each scale s, fragments for relative configuration Cer = (spxy , pθ ) are collected and transformed as described in Sec. 3.1, and then brought to a common scale by transforming them once more such that the distance between their inducers is 1. Focusing on the center points of the transformed fragments from the original scale s, let µs and σs be their mean and standard deviation. We summarize the information across scales as the standard deviation of the means µs (see Fig 3b ) and the expected value of the standard deviations σs (Fig 3c). Since the STD of µs is the mean difference between the reconstructed central curve points across scales, one would expect it to be smaller the more invariant the curves to scale. In Fig. 3 we examine this difference in the reference scale of 1. As shown, for “normal” inducer configurations the STD of µs is very small compared to the scale, suggesting that the mean curve is indeed invariant to scale in these cases. For other, more “abnormal” configurations we see greater STD, suggesting that the calculated mean curve is different across scales. Note that this in itself does not necessarily indicate that the mean curve is scale variant in such difficult configurations, for the average σs in these cases is large as well (Fig. 3c), requiring more samples to guarantee an accurate estimation of the mean according to Chebyshev’s inequality applied for the empirical mean [17]. Following this analysis, we now leverage the invariance of the mean curve to scaling (assuming scale invariance also when it could not be asserted) by extracting the distribution of natural curves that match Cr = p from fragments Cer = q that are close to any of its scaled versions. Formally, we include all curve fragments with relative configuration Cer = q, such that the angular distance between vectors pxy ,qxy and orientation distance dπ (pθ , qθ ) are smaller than predefined thresholds t1 ,t2 . To quickly collect such curves, fragments are stored ahead of time according to the angle to qxy from the X axis, and their orientation qθ . The process of utilizing curves at all scales greatly improves the results and now provides intuitive, visually pleasing, and more veridical reconstructions (see Fig. 4b) for many more inducer configurations (Fig. 2). Another favorable property is the ability to generate curves regardless of the distance between given inducers. That said, it can be seen that the number of examples, for some “difficult” configurations remains small and thus the reconstruction in such cases is still noisy, a problem that would possibly be alleviated with the inclusion of additional samples. To this end, we now turn to explore yet another possible property of curves known as extensibility. 3.4. Boosting via Midway Extensibility As discussed above, scale invariance alone does not suffice to increase the number of samples and qualify as a robust prior in all cases. Typically, the cases that remain problematic have their inducers face away from each other and so the mean curve bends rapidly near the inducers and keeps a straighter shape half way from them (Fig. 4b). Due to this behavior, another inducer placed in the center of such curve (and oriented along its tangent) would represent much smaller orientation relative to either of the inducers, effectively better “facing” both of them and thus forming less difficult configurations with either. As observed in Figs. 2,4b, such simpler configuration tend to have many more dataset samples and smoother reconstructions. Therefore, generating a curve by reconstructing two sub-curves from the original inducers to the curve’s center is likely to provide a more robust, visually pleasing and veridical reconstruction. Such a scheme, which we refer to as midway extensibility, is a special case of general extensibility, a property sought after in axiomatic approaches to curve completion (e.g., [25], cf. [2, 1]). A reconstruction approach is considered extensible if for any pair of oriented inducers I3 ,I4 extracted from a reconstructed curve α between inducers I1 ,I2 , it generates a curve β that is identical to α between I3 ,I4 . Here, we explore the extensibility of the mean curve by its center point, and define a reconstruction scheme as midway extensible if for any generated curve α between inducers I1 ,I2 , α is identical to the curve β = β1 ⊕ β2 , calculated as the concatenation of curves β1 and β2 that are generated between inducers I1 ,I3 and I3 ,I2 , where I3 is the inducer extracted from the center of α. 5 Horizontal inducers STD of µs Average of σs (b) (c) 𝜃$ 𝜃" 𝑦$ 𝑦" (a) Figure 3. Empirical analysis of scale invariance for a subset of inducer configurations. (a) Considered are all pairs of horizontal inducers with two arbitrary orientations. (b) A map of the STD of µs of the curve center point across different scales shows very stable behavior when the inducers are “facing” each other with gradually decaying stability as the inducers “face” away from each other. (c) The average of σs across scales similarly shows very stable behavior when the inducers roughly “face” each other, gradually turning unstable as they “face” away from each other. The two maps in conjunction imply scale invariance for facing inducers, and no conclusive insights otherwise. To investigate the property of midway extensibility in the context of our mean curve we employ the scale invariant procedure described in Sec.3.3 to generate a curve β (Fig. 4c) for each curve α in Fig. 4b by generating two scale invariant curves β1 , β2 from the original inducers to the center of α. While this was done for all inducer configurations, to determine whether the mean curve exhibits midway extensibility we compare the corresponding reconstructions α and β only in cases where α was generated with many observations, as these are the only cases where the reconstruction is likely to be precise in the first place. A careful inspection of their shapes reveals that while some differences between such corresponding curves can be observed, they are typically insignificant relative to the scale of the curve. To measure the deviation from extensibility we calculate the Fréchet distance [5] relative to the distance between inducers for corresponding curves in Fig. 4 and in the complementary figure in the supplementary material, covering the range of relative configurations. Considering only curves for which more than 400 fragments were observed, the maximal distance between such curves is 4.9% of the distance between inducers, and the mean is 2.5%. Thus, curves generated by employing midway extensibility do not vary much from their counterparts that were accurately reconstructed without extensibility. Establishing such empirical midway extensibility, we reiterate that its sought-after effect is for cases where relative configurations enjoy only few samples in the prior. Checking the reconstruction facilitated by the two sub curves now shows significant improvement in such cases (compare the relevant cases in Fig. 4b,c). ity when the number of samples is lacking), with Libcornu’s implementation of Euler Spiral [32, 28], the latter being a prominent method for the completion of curves. Reconstruction for all selected curve configurations can be seen in Fig. 4 and in the supplementary material. Results are shown at a single scale and for the lower half visual field, a consequence of the scale and mirror reflection invariance properties of both models. Comparing the results visually suggests that the Euler spiral, being an analytic regularized model, is generally smoother, but it often provides reconstructions that appear unnatural and/or far from veridical (in a sense of corresponding to the actual physical curve as represented by the prior). When it comes to reconstruction of missing physical curve fragments our data driven approach thus provides an intrinsic advantage. A demonstration to that effect can be shown with the real objects in Fig. 5. 4.1. Reconstruction Evaluation In addition to the qualitative results discussed above, we examined the accuracy of the mean curve as a reconstruction scheme for natural occluded curves. In our representation, the mean curve is, by construction, the one “closest” to all observable n-point natural planar curves (abstractly represented as vectors in 2n dimensional space). However, uniquely shaped curves do occur in nature and they may be far from the mean. The extent to which such curves can be reconstructed, and what is the information or the prior needed to facilitate such reconstructions, remain to be studied. That said, we still seek to obtain a quantitative measure of a method’s ability to properly reconstruct fragments of natural curves, and to do so we first split the original dataset into training and test images, the latter comprises 10% of the dataset. No curve fragment from the test set was used when extracting the prior and computing the mean curve for reconstruction while no curve from the train set was used for 4. Experimental Results We compare the reconstructions based on the mean curve (assuming scale invariance and employing extensibil6 Euler Spiral Scale invariant (SI) Mean 1 SI Extensible Mean >300 >300 200 200 100 100 0 >300 0 >300 200 200 100 100 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0 (a) (b) (c) Figure 4. Reconstruction results based on (a) Euler spiral, (b) scale invariant mean curve, and (c) extensible and scale invariant mean curve, where darker curve colors represent a larger number of samples from which the curve was calculated. Red circles in (c) mark the points in which two reconstructions are connected to a single curve. As exemplified, the final mean curve is not only data driven and thus more veridical, it is also more compact and it exhibits much smoothness even though no regularization or smoothing was performed. Figure 5. Example results of reconstruction over large gaps of possibly occluded curves based on our approach (green) and Euler spiral (magenta). Image parts below the curves are assumed to be completely occluded and are displayed for comparison with the ground-truth. queries or as ground truth for performance evaluation. More specifically, a set of 5000 curve fragments and their inducers were randomly selected from the test images such that fragments are uniformly distributed by their scale (as the distance between their inducers) to better represent a scenario such as the reconstruction of curves over randomly sized gaps. For each ground-truth curve α∗ from this test set, we then generated the mean curve α = {y1 , ..., yn } that matches its inducer configuration (I1 , I2 ) while using the fragments and the prior collected only from train images. We then evaluate the relative reconstruction error (RRE) of the generated curve α as the Fréchet distance d [5] between both curves relative to the distance between their inducers: RRE = d(α∗ , α) I1xy − I2xy . Reconstruction results are shown in Fig. 6, where each point in the X axis represents an RRE threshold and its corresponding value in the Y axis represents the ratio of accurately reconstructed curves (ARC) for which the error is less than that threshold. Overall results are summarized by the area under the curve (AUC), calculated as the average ARC at 101 RRE points from 0 to 1 (where the limit of 1 RRE was chosen arbitrarily). As can be seen, the mean curve provides more accurate reconstructions than those based on Euler Spiral, with AUC scores of 0.887 and 0.876, respectively. The only cases where the Euler Spiral is marginally more accurate are those with extremely low threshold RRE < 0.017 which, as we verified, comprises of straight lines only. (4) While one may argue that the differences in performance 7 Ratio of accurately reconstruced curves significantly more accurate than Euler Spiral, with an AUC of 0.492. Clearly, the mean curve reconstruction is far more veridical in such cases. Correct reconstructions per permitted error 1 Euler spiral Mean curve 0.8 5. Conclusions and Future Work 0.6 We have suggested a method for the reconstruction of missing or occluded curves by employing the global statistics of natural contours. At the foundation of our approach is the generation of the mean curve, estimated as the mean of the distribution of natural image curves along their arc length. As we have shown, the estimated mean curve provides an intuitive, visually pleasing, and most importantly, a more veridical reconstruction. A main disadvantage of this procedure, namely the required number of curve fragments sampled to represent the statistics of natural curves loyally, was overcome by exploring and employing certain properties of curves. We have shown that the mean curve is invariant to scale in many cases and that employing this property for sharing fragment samples across scales provides better reconstructions. We also explored midpoint extensibility of the mean curve and have shown that incorporating this property improves the reconstructed curves when the statistical power of the prior is particularly low. 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 Relative reconstruction error Figure 6. Reconstruction evaluation showing the ratio of accurate reconstructions for each accuracy threshold defined according to the relative reconstruction error. As shown, the graph of the mean curve dominates over the graph of Euler Spiral completions. Correct reconstructions per permitted error Ratio of accurately reconstruced curves 1 0.8 0.6 The data in Fig. 1d shows that for the inducer configuration exemplified, the observed curve centers lie in a small region relative to the distance between the two inducers, exhibiting relatively small variance. In such cases, the center of the mean curve is therefore close to most data points (i.e., real natural curves), and so it could be considered a correct reconstruction (i.e. with low enough error). Unfortunately, however, this is not always the case, as the mean variance could grow larger for certain inducer configurations, as already shown in Fig. 3b (e.g., for inducers facing away from each other). In such cases, where the variance of natural curves is considerable, no single curve can be close to most real curves, regardless of the reconstruction method that generated it, and thus cannot be considered correct in most cases. 0.4 0.2 Euler spiral Mean curve 0 0 0.2 0.4 0.6 0.8 1 Relative reconstruction error Figure 7. Evaluation of reconstruction results for curves with difficult inducer configurations, showing the ratio of accurately reconstructed curves for each accuracy threshold defined according to the relative reconstruction error. The mean curve provides many more accurate reconstructions than the Euler Spiral. in Fig. 6 are not big, it is also suspected that many of the details are washed by the frequent cases of “convenient” inducer configurations where both approaches yield similar results. Indeed, observing the different reconstructions such as in Fig. 4, it can be seen that the mean curve and Euler Spiral differ more for the “difficult” configurations that are underrepresented in our dataset and in the prior in general. Therefore, we conducted a focused evaluation with an additional random set of 1000 curves, all with “difficult” configurations such that θ1 > π2 and θ2 < π2 according to the representation in Fig. 3a. Evaluation of reconstruction results over this difficult set are presented in Fig. 7. This time, the mean curve method obtains an AUC score of 0.621 and is An immediate consequence of the above is that to obtain correct reconstruction one must reduce the variance (or variability) of observed data that fit the conditions for which reconstruction is attempted. Since the prior in the natural world is fixed, the only way of achieving reduced variance is by introducing additional constraints on the curve fragments that are relevant for a reconstruction query, i.e., by requiring more information about the inducers or the reconstruction scenario as a whole. Such typical information may include the curvature of the inducers, their polarity, or the shape of the occluder, etc, and incorporating such considerations into the computational scheme is part of our ongoing and future research. 8 References [20] D. Ruderman and W. Bialek. Statistics of natural images: Scaling in the woods. Phys. Rev. Lett., 73(6):814–818, 1994. 3, 5 [21] T. B. Sebastian, J. J. Crisco, P. N. Klein, and B. B. Kimia. Constructing 2d curve atlases. In Mathematical Methods in Biomedical Image Analysis, 2000. Proceedings. IEEE Workshop on, pages 70–77. IEEE, 2000. 3 [22] E. Sharon, A. Brandt, and R. Basri. Completion energies and scale. IEEE Trans. Pattern Anal. Mach. Intell., 22(10):1117– 1131, 2000. 2 [23] T. Shibata, A. Iketani, and S. Senda. Image inpainting based on probabilistic structure estimation. Proc. ACCV, pages 109–120, 2011. 1 [24] J. Sun, L. Yuan, J. Jia, and H.-Y. Shum. Image completion with structure propagation. ACM Transactions on Graphics (ToG), 24(3):861–868, 2005. 1 [25] S. Ullman. Filling-in the gaps: The shape of subjective contours and a model for their creation. Biol. Cybern., 25(1):1– 6, 1976. 1, 2, 5 [26] V. Voronin, V. Marchuk, A. Sherstobitov, and K. Egiazarian. Image inpainting using cubic spline-based edge reconstruction. In IS&T/SPIE Electronic Imaging, pages 82950I–82950I. International Society for Optics and Photonics, 2012. 1 [27] D. J. Walton and D. S. Meek. An improved euler spiral algorithm for shape completion. In Computer and Robot Vision, 2008. CRV’08. Canadian Conference on, pages 237– 244. IEEE, 2008. 2 [28] D. J. Walton and D. S. Meek. G1 interpolation with a single cornu spiral segment. Journal of Computational and Applied Mathematics, 223(1):86–96, 2009. 6 [29] Y. Wei and S. Liu. Domain-based structure-aware image inpainting. Signal, Image and Video Processing, 10(5):911– 919, 2016. 1 [30] I. Weiss. 3d shape representation by contours. CVGIP, 41:80–100, 1988. 2 [31] L. Williams and D. Jacobs. Stochastic completion fields: A neural model of illusory contour shape and salience. Neural Comp., 9(4):837–858, 1997. 2 [32] J. Xu, M. D. Collins, and V. Singh. Incorporating topological constraints within interactive segmentation and contour completion via discrete calculus. In CVPR, 2013. 2, 6 [33] H. Zhou, J. Zheng, and X. Yang. Euler arc splines for curve completion. Computers & Graphics, 36(6):642–650, 2012. 1, 2 [1] O. Ben-Shahar and G. Ben-Yosef. Tangent bundle elastica and computer vision. IEEE Trans. Pattern Anal. Mach. Intell., 37:161–174, 2015. 2, 3, 5 [2] G. Ben-Yosef and O. Ben-Shahar. A tangent bundle theory for visual curve completion. IEEE Trans. Pattern Anal. Mach. Intell., 34(7):1263–1280, 2012. 1, 2, 3, 5 [3] A. Bruckstein and A. Netravali. On minimal energy trajectories. CVGIP, 49(3):283–296, 1990. 2 [4] T. F. Cootes, C. J. Taylor, D. H. Cooper, and J. Graham. Active shape models-their training and application. CVIU, 61:38–59, 1995. 3 [5] T. Eiter and H. Mannila. Computing discrete fréchet distance. Technical report, Tech. Report CD-TR 94/64, Information Systems Department, Technical University of Vienna, 1994. 6, 7 [6] P. Felzenszwalb and D. McAllester. A min-cover approach for finding salient curves. In Computer Vision and Pattern Recognition Workshop, 2006. CVPRW’06. Conference on, pages 185–185. IEEE, 2006. 3 [7] W. Geisler, J. Perry, B. Super, and D. Gallogly. Edge cooccurrence in natural images predicts contour grouping performance. Vision Res., 41(6):711–724, 2001. 3, 5 [8] Y. Guo and B. Kimia. On evaluating methods for recovering image curve fragments. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2012 IEEE Computer Society Conference on, pages 9–16. IEEE, 2012. 1, 2, 3, 4 [9] G. Harary and A. Tal. The natural 3d spiral. In Computer Graphics Forum, volume 30, pages 237–246. Wiley Online Library, 2011. 1 [10] G. Harary and A. Tal. 3d euler spirals for 3d curve completion. Computational Geometry, 45(3):115–126, 2012. 1 [11] B. Horn. The curve of least energy. ACM Trans. Math. Software, 9(4):441–460, 1983. 1, 2 [12] P. Kellman and T. Shipley. A theory of visual interpolation in object perception. Cognitive Psychology, 23:141–221, 1991. 2 [13] B. Kimia, L. Frankel, and A. Popescu. Euler spiral for shape completion. In Proc. POCV, 1999. 1, 2 [14] M. Lawlor and S. W. Zucker. Third-order edge statistics: Contour continuation, curvature, and cortical connections. In NIPS, 2013. 3 [15] D. Martin, C. Fowlkes, D. Tal, and J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV, pages 416–423, 2001. 3 [16] W. Mio, A. Srivastava, and X. Liu. Contour inferences for image understanding. Int. J. Comput. Vision, 69(1):137–144, 2006. 2 [17] M. Mohri, A. Rostamizadeh, and A. Talwalkar. Foundations of machine learning. MIT press, 2012. 5 [18] D. Mumford. Elastica and computer vision. In B. Chandrajit, editor, Algebric Geometry and its applications. SpringerVerlag, 1994. 1, 2 [19] X. Ren and J. Malik. A probabilistic multi-scale model for contour completion based on image statistics. ECCV, pages 312–327, 2002. 1, 2, 3 9
1cs.CV
Graph-Guided Banding of the Covariance Matrix arXiv:1606.00451v2 [stat.ME] 15 Feb 2018 Jacob Bien∗ Data Sciences and Operations Marshall School of Business University of Southern California Abstract Regularization has become a primary tool for developing reliable estimators of the covariance matrix in high-dimensional settings. To curb the curse of dimensionality, numerous methods assume that the population covariance (or inverse covariance) matrix is sparse, while making no particular structural assumptions on the desired pattern of sparsity. A highly-related, yet complementary, literature studies the specific setting in which the measured variables have a known ordering, in which case a banded population matrix is often assumed. While the banded approach is conceptually and computationally easier than asking for “patternless sparsity,” it is only applicable in very specific situations (such as when data are measured over time or one-dimensional space). This work proposes a generalization of the notion of bandedness that greatly expands the range of problems in which banded estimators apply. We develop convex regularizers occupying the broad middle ground between the former approach of “patternless sparsity” and the latter reliance on having a known ordering. Our framework defines bandedness with respect to a known graph on the measured variables. Such a graph is available in diverse situations, and we provide a theoretical, computational, and applied treatment of two new estimators. An R package, called ggb, implements these new methods. Keywords: covariance estimation, high-dimensional, hierarchical group lasso, network 1 Introduction Understanding the relationships among large numbers of variables is a goal shared across many scientific areas. Estimating the covariance matrix is perhaps the most basic step toward understanding these relationships, and yet even this task is far from simple when sample sizes are small relative to the number of parameters to be estimated. High-dimensional covariance estimation is therefore an active area of research. Papers in this literature generally describe a set of structural assumptions that effectively reduces the dimension of the parameter space to make reliable estimation tractable given the available sample size. Some papers focus on eigenvalue-related structures and shrinkage (e.g., Johnstone 2001, Fan et al. 2008, Won et al. 2013, Donoho et al. 2013, Ledoit & Wolf 2004, among many others); others assume that correlations are constant or blockwise constant (such as in random effects models); and a very large number of papers introduce sparsity assumptions on ∗ The author thanks Christian Müller for a useful conversation and acknowledges the support of the NSF grant DMS-1405746 and NSF CAREER Award DMS-1748166. 1 the covariance matrix (or its inverse). Still other papers suggest combinations of these structures (Chandrasekaran et al. 2010, Bien & Tibshirani 2011, Luo 2011, Rothman 2012, Fan et al. 2013, Liu et al. 2013, Xue et al. 2012). Given the large number of papers focused on the sparsity assumption, it is perhaps surprising to note that nearly all such papers fall into one of just two categories: 1. Methods that place no assumption on the pattern of sparsity but merely require that the number of nonzeros be small. This assumption is placed on either the inverse covariance matrix (Dempster 1972, Meinshausen & Bühlmann 2006, Yuan & Lin 2007, Rothman et al. 2008, Banerjee et al. 2008, Friedman et al. 2008, Peng et al. 2009, Yuan 2010, Cai et al. 2011, Khare et al. 2014) or on the covariance matrix itself (Bickel & Levina 2008b, Rothman et al. 2009, Lam & Fan 2009, Bien & Tibshirani 2011, Rothman 2012, Xue et al. 2012, Liu et al. 2013). 2. Methods that assume the variables have a known ordering. These methods generally assume a banded (or tapered) structure for the covariance matrix, its inverse, or the Cholesky factor (Wu & Pourahmadi 2003, Huang et al. 2006, Levina et al. 2008, Bickel & Levina 2008a, Wu & Pourahmadi 2009, Rothman et al. 2010, Cai et al. 2010, Cai & Yuan 2012, Bien et al. 2015a, Yu & Bien 2017). We can view these two categories of sparsity as extremes on a spectrum. Methods in the first category tackle a highly challenging problem that is widely applicable. Being completely neutral topthe pattern of zeros leads to an enormous number of sparsity patterns to choose from: there are (2) for an s-sparse model. By constrast, methods in the second category address a more modest s problem that is much less widely applicable. Using a simple banding estimator, there are only p sparsity patterns to choose from (one for each bandwidth) and there are few examples other than data collected over time in which such estimators apply. This paper introduces a new category of sparsity patterns that aims to bridge the wide divide between these two categories of sparsity pattern. The goal is to produce an estimator that combines the problem-specific, targeted perspective of banded covariance estimation with the wide applicability of the patternless sparsity approaches. The key idea is to generalize the notion of banding beyond situations in which the variables have a known ordering. In particular, we replace the assumption that the variables “have a known ordering” with the assumption that they “lie on a known graph.” The latter is a generalization because variables having a known ordering can be expressed as variables lying on a path graph. To be precise, we will assume that we observe n independent copies of a random vector X ∈ Rp , where the p variables are associated with a known graph G = ([p], E). We will refer to G as the seed graph. The right panel of Figure 1 shows a traditional B-banded matrix. The term “banded” refers to the diagonal strip of nonzero elements that are within some distance B (called the “bandwidth”) of the main diagonal. The middle panel of Figure 1 shows the graph with this adjacency matrix. Observing that this graph, denoted GB , is the B-th power of the path graph shown in the left panel of Figure 1 suggests the following generalization of the term “banded.” We will use dG (j, k) to denote the length of the shortest path between nodes j and k on G. Definition 1. We say that a matrix Σ is B-banded with respect to a graph G if supp(Σ) ⊆ E(GB ), that is Σjk = 0 if dG (j, k) > B. 2 ● ● ● ● ● ● ● ● ● Seed graph ● ● ● ● ● ● ● ● ● ● ● ● 5 ● B=4 ● ● ● 10 ● 15 ● ● ● ● ● ● ● ● 20 ● ● ● ● ● ● 5 10 15 20 Figure 1: A matrix with bandwidth B = 4 (right panel) can be thought of as the adjacency matrix of the B-th power (center panel) of a path graph G (left panel). To form the B-th power of a graph G, one connects any pair of nodes that are within B hops of each other on G. ● ● ● ● ● ● ● ● ● ● ● ● 5 ● Seed graph B=4 ● 10 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 15 ● ● ● ● ● 20 ● ● ● 5 10 15 20 Figure 2: Given a seed graph G (left panel), one forms GB (B = 4 case shown in center panel) by connecting any pair of nodes within B hops of each other in G. Definition 1 refers to the resulting adjacency matrix (right panel) as B-banded with respect to the graph G. Bickel & Lindner (2012) have a similar notion, for a metric ρ, which they call ρ-generalized banded operators. Figure 2 shows the sparsity pattern of a 4-banded matrix with respect to a seed graph. The bandwidth B can vary from B = 0, which corresponds to Σ being a diagonal matrix, to B being the diameter of G, which corresponds to Σ being a dense matrix when G is a connected graph (when G is not connected, the densest Σ attainable is, up to permutation of the variables, a blockdiagonal matrix with completely dense blocks). Despite the simple interpretation of taking powers of a seed graph, the resulting sparsity patterns can be quite complex and varied depending on the seed graph. There are many applications in which measured variables lie on a known graph that would be relevant to incorporate when estimating the covariance matrix Σ: • Image data: Consider a p1 × p2 pixeled image. The p = p1 p2 pixels lie on a two-dimensional lattice graph. Nearby pixels would be expected to be correlated. • fMRI data: One observes three-dimensional images of the brain over time. The voxels (threedimensional pixels) lie on a three-dimensional lattice. 3 ● ● ● ● ● ● ● ● ● B5 = 1 B8 = 1 B6 = 4 B4 = 2 B3 = 2 ● ● ● ● Seed graph ● 5 10 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 15 ● ● ● ● ● ● 20 ● ● ● 5 10 15 20 Figure 3: Given a seed graph G (left panel) and a set of node-specific bandwidths, one forms a new graph (shown in center panel) by connecting any pair of nodes within Bj hops of node j in G (five of the 20 nodes have nonzero bandwidths with values shown in figure; the remaining 15 nodes have zero bandwidths). Definition 2 refers to the resulting adjacency matrix (right panel) as (B1 , . . . , Bp )-banded with respect to the graph G. • Social network data: A social media company wishes to estimate correlations between users’ purchasing behaviors (e.g., do they tend to buy the same items?). The social network of users is the known seed graph. • Gene expression data: Genes that encode proteins that are known to interact may potentially be more likely to be co-expressed than genes whose proteins do not interact. Biologists have constructed protein interaction networks (Das & Yu 2012), which may be taken as seed graphs, leveraging protein interaction data for better estimation of the covariance matrix of gene expression data. In each example described above, the naive approach would be to vectorize the data and ignore the graph structure when estimating the covariance matrix. However, doing so when the truth is banded with respect to the known graph would be unnecessarily working in the patternless sparsity category when in fact a much simpler approach would work. In some situations, a known seed graph is available, but the assumption of a single bandwidth B applying globally is unrealistic. We can therefore extend the definition of bandedness with respect to a graph as follows: Definition 2. We say that a matrix Σ is (B1 , . . . , Bp )-banded with respect to a graph G, if Σjk = 0 for all (j, k) satisfying dG (j, k) > max{Bj , Bk }. In words, this definition says that each variable has its own bandwidth, which defines a neighborhood size, and it cannot be correlated with any variables beyond this neighborhood. For example, on a social network, the bandwidth can be thought informally as having to do with the influence of a person. A very influential friend might be correlated with not just his friends but with his friends’ friends (this would correspond to Bj = 2). By contrast, a “lone wolf” might be uncorrelated even with his own friends (Bj = 0). Figure 3 shows an example of a sparsity pattern emerging from the same seed graph as in Figure 2 but with variable bandwidths. We propose two estimators in this paper that make use of a latent overlapping group lasso penalty (Jacob et al. 2009, Obozinski et al. 2011), which is used in situations in which one desires 4 a sparsity pattern that is a union of a set of predefined groups. Both Definitions 1 and 2 can be described as such, so the difference between the two methods lies in the choice of groups. In Section 2, we introduce and study the graph-guided banding estimator, which produces estimates of the covariance matrix that are banded in the sense of Definition 1. The limited number of sparsity patterns attainable by this estimator makes it potentially undersirable in certain situations, and we therefore introduce and study (in Section 3) the graph-guided banding with local bandwidths estimator, which attains bandedness in the more flexible sense of Definition 2. Section 4 compares these methods empirically both in simulation and in naturally occurring data. Section 2.3 concludes with a discussion of related work, insights learned, and future directions. To our knowledge, there is little work on using known graphs in high-dimensional covariance estimation. Cai & Yuan (2015) study minimax lower bounds and adaptive estimation of covariance matrices when variables lie on a d-dimensional grid. Deng & Yuan (2009) consider inverse covariance estimation in the setting where variables lie in a metric space. Their approach uses a non-negative Garrotte semidefinite program formulation to perform inverse covariance estimation in which inverse covariance decays with increasing distance between variables. The method requires an initial estimate of the inverse covariance matrix (when n > p, one takes S −1 ) and then shrinks so that variables farther apart have smaller partial covariances. Notation: Given a p × p matrix A and a set of indices g ∈ {1, . . . , p}2 , we write Ag to denote the p × p matrix that agrees with A on g and is zero on g c , and we write |g| for the cardinality of the set g. The graph GB is the Bth power of G, meaning the graph in which any nodes that are within B of each other in G are connected. The constraint Σ  δIp means that the smallest eigenvalue of Σ is at least δ. Given a square matrix Σ, the matrix Σ− = Σ − diag(Σ) agrees with Σ on off-diagonals but is zero on the diagonal. We write an . bn to mean that there exists a constant C > 0 for which an ≤ Cbn for n sufficiently large. 2 Graph-guided banding with global bandwidth Definition 1 introduces the simplest notion of bandedness with respect to a graph. In particular, a single bandwidth B is postulated to apply globally across the entire graph. This means that the support of Σ is given by one of the following groups of parameters: gb = {jk : 1 ≤ dG (j, k) ≤ b} for b = 1, . . . , diam(G), (1) where diam(G) is the diameter of the seed graph G. The group lasso (Yuan & Lin 2006) is a well-known extension of the lasso (Tibshirani 1996) that is useful for designing estimators in which groups of variables are simultaneously set to zero. Given a sample of n independent random vectors P X1 , . . . , Xn ∈ Rp , form the sample covariance matrix, S = ni=1 (Xi − X̄n )(Xi − X̄n )T . We define the graph-guided banding estimator with global bandwidth (GGB-global) as   1 2 − c Σ̂λ = arg min kS − ΣkF + λP (Σ; G) s.t. [Σ ]gM = 0 , (2) ΣδIp 2 where P (Σ; G) = min {V(b) ∈Rp×p } (M X wb kV(b) kF b=1 s.t. ΣgM = M X b=1 5 ) Vg(b) b is the latent overlapping group lasso penalty (Jacob et al. 2009) with group structure given by (1). (b) Each Vgb matrix has the “graph-guided” sparsity pattern gb , so heuristically, this penalty favors Σ̂λ that can be written as the sum of a small number of such sparse matrices. While the penalty is itself defined by an optimization problem, in practice we can solve (2) directly without needing to evaluate P (Σ; G), as described in the next section. The parameter M will typically be taken to be diam(G); however, in certain applications in which diam(G) is very large and a reasonable upper bound on B is available, it may be compuc = 0 only has an effect tationally expedient to choose a much smaller M . The constraint [Σ− ]gM when M < diam(G). Of course, one must be cautious not to inadvertently choose M < B since then the resulting estimates will always be sparser than the true covariance matrix. Thus, if one does not have a reliable upper bound for B, one should simply take M = diam(G). The tuning parameter λ ≥ 0 controls the sparsity level of Σ̂λ (with large values of λ corresponding to greater sparsity). The wg ≥ 0 are weights that control the relative strength of the individual `2 norms in the penalty. In studying the theoretical properties of the estimator (Section 2.2), it becomes clear that wb = |gb |1/2 is a good choice. The parameter δ is a user-specified lower bound on the eigenvalues of Σ̂λ . While our algorithm is valid for any value of δ, the most common choice is δ = 0, which ensures that Σ̂λ is a positive semidefinite matrix. In certain applications, a positive definite matrix may be required, in which case the user may specify a small positive value for δ. In the special case that G is a path graph (and dropping the eigenvalue contraint), the GGB-global estimator reduces to the estimator introduced in Yan & Bien (2017). In the next section, we show that (2) can be efficiently computed. 2.1 Computation The challenge of solving (2) lies in the combination of a nondifferentiable penalty and a positive semidefinite constraint. Without the penalty term, Σ̂λ could be computed with a single thresholding of the eigenvalues; without the eigenvalue constraint, Σ̂λ is nothing more than the proximal operator of λP (·; G) evaluated at S. The following lemma shows that we can solve (2) by alternate application of the proximal operator of λP (·; G) and a thresholding of the eigenvalues. We present this result for general convex penalties since the same result will be used for the estimator introduced in Section 3. Lemma 1. Consider the problem  Σ̂ = arg min ΣδIp  1 2 kS − ΣkF + λΩ(Σ) , 2 (3) where Ω is a closed, proper convex function, and let   1 2 ProxλΩ (M) = arg min kM − ΣkF + λΩ(Σ) Σ 2 denote the proximal operator of λΩ(·) evaluated at a matrix M. Algorithm 1 converges to Σ̂. Proof. See Appendix A. In Appendix A, we show that Algorithm 1 corresponds to blockwise coordinate ascent on the dual of (3). While the alternating direction method of multipliers (ADMM) would be an alternative 6 Algorithm 1 Algorithm for solving (3) • Initialize C. • Repeat until convergence: 1. B ← (S + C) − ProxλΩ (S + C) 2. C ← U · diag([Λii + δ]+ ) · UT where B − S = UΛUT is the eigendecomposition. • Return Σ̂ ← S − B + C. approach to this problem, we prefer Algorithm 1 because, unlike ADMM, its use does not require choosing a suitable algorithm-specific parameter. Invoking the lemma, all that remains for solving (2) is to specify an algorithm for evaluating ProxλP (·;G) . The group structure (1) used in this estimator is special in that g1 ⊂ g2 ⊂ · · · ⊂ gM . Yan & Bien (2017) study the use of the latent overlapping group lasso with such hierarchically nested group structures and show that, for group structures of this form, the proximal operator can be evaluated essentially in closed form (which is not true more generally). Algorithm 3 of Yan & Bien (2017) shows that evaluating the proximal operator amounts to identifying a sequence of “breakpoints” k0 < k1 < . . . < km and then applying groupwise soft-thresholding to the elements in gki+1 − gki for i = 0, . . . , m − 1. In practice, we solve (3) for a decreasing sequence of values of λ. We initialize C in Algorithm 1 as 0 for the first value of λ and then for each subsequent value of λ we use the value of C from the previous λ as a warm start. 2.2 Theory In this section, we study the statistical properties of the GGB estimator (2). For simplicity, we will focus on the special case in which δ = −∞ (or, equivalently, we drop the eigenvalue constraint); however, in Section 2.2.3 we provide conditions under which our results apply to the δ = 0 case. We introduce two conditions under which we prove these results. Assumption 1 (distribution of data). We draw n i.i.d. copies of X ∈ Rp , having mean 0 and covariance Σ∗ . The random vector has bounded variances, maxj |Σ∗jj | ≤ κ̄, and sub-Gaussian √ ∗ 2 marginals: E[etXj / Σjj ] ≤ eCt for all t ≥ 0. Both C and κ̄ are constants. Assumption 2 (relation between n and p). We require that p ≤ eγ1 n for some γ1 > 0. Assumptions 1 and 2 are sufficient for establishing that the sample covariance matrix S concentrates around Σ∗ with high probability for large n. These assumptions are made in Bien et al. (2015a), and similar assumptions appear throughout the literature. 2.2.1 Frobenius norm error We begin by producing the rate of convergence of our estimator in Frobenius norm. 7 Theorem 1. Suppose Σ∗ is B ∗ -banded with q respect to the graph G (in the sense of Definition 1) and Assumptions 1–2 hold. Then with λ = x log(max{p,n}) (for x sufficiently large), wb = |gb |1/2 , n δ = −∞, and M = diam(G), there exists a constant c > 0 such that kΣ̂λ − Σ∗ k2F . (p + |gB ∗ |) log(max{p, n}) n with probability at least 1 − c/ max{p, n}. Proof. See Appendix B. The term p + |gB ∗ | is the sparsity level of Σ∗ (with the initial p representing the diagonal elements). Theorem 1 shows that when p < n and moreover p + |gB ∗ | is o(n/ log n), the GGB estimator is consistent in Frobenius norm. By contrast, consistency of the sample covariance matrix S in this setting requires that p2 be o(n/ log n). Thus, when |gB ∗ |  p2 , GGB is expected to substantially outperform the sample covariance matrix. When p > n, the theorem does not establish consistency of GGB. This fact is not, however, a shortcoming of the GGB method; rather, it is a reflection of the difficulty of the problem and the fact that the assumed sparsity level is in this case high relative to n. Even when B ∗ = 0 (i.e., Σ∗ is a diagonal matrix), we still must estimate p free parameters on the basis of only n observations. More generally, we know that the rate of convergence in Theorem 1 cannot, up to log factors, be improved by any other method. To see this, note that in the special case that G is a path graph, Bien et al. (2015a) prove (in Theorem 7 of their paper) that the optimal rate is B ∗ p/n over the class of B ∗ -banded matrices (assuming √ B ∗ ≤ n). Since |gB ∗ | ∼ B ∗ p for a path graph, we see that the GGB estimator is within a log factor of the optimal rate in Frobenius norm. If we are interested in estimating the correlation matrix R∗ = diag(Σ∗ )−1/2 Σ∗ diag(Σ∗ )−1/2 instead of the covariance matrix, then we can apply our estimator to the sample correlation matrix R̂ = diag(S)−1/2 · S · diag(S)−1/2 . Because the diagonal entries of the correlation matrix do not need to be estimated, we can show (under one additional assumption) that the rate of convergence has |gB ∗ | in place of p + |gB ∗ |. Assumption 3 (bounded non-zero variances). Suppose that there exists a constant κ > 0 (i.e., not depending on n or p) such that minj Σ∗jj ≥ κ. Theorem 2. Suppose Σ∗ is B ∗ -banded with respect to the graph G (in the sense of Definition 1) and Assumptions 1, 2, and 3 hold. Then there exist positive constants x and c for which taking q λ=x log(max{p,n}) , n wb = |gb |1/2 , δ = −∞, and M = diam(G), kΣ̂λ (R̂) − R∗ k2F . |gB ∗ | log(max{p, n}) n with probability at least 1 − c/ max{p, n}. When G has a small number of edges (e.g., with all but a small number of nodes having 0 degree), then we can have |gB ∗ |  n < p, in which case the above result establishes the consistency of the graph-guided estimator even when p > n. 8 2.2.2 Bandwidth recovery The remaining properties of this section can be established under a condition on the minimum signal strength (analogous to the “beta-min” conditions arising in the regression context). Assumption 4 (minimum signal strength). The nonzero elements of Σ∗ must be sufficiently large: min |Σ∗jk | > 2λ. jk∈gB ∗ q log(max{p,n}) One can think of λ as on the order of and measuring the “noise level” of the n data, in particular kS − Σ∗ k∞ . Thus, this assumption ensures that the nonzeros stand out from the noise. Under this additional assumption, our estimator’s bandwidth, B(Σ̂λ ), matches the unknown bandwidth B ∗ with high probability. Theorem 3. Adding Assumption 4 to the conditions of Theorem 1, there exists a constant c > 0 such that B(Σ̂λ ) = B ∗ with probability at least 1 − c/ max{p, n}. Proof. See Appendix C. 2.2.3 Positive semidefinite constraint The results presented above are for δ = −∞. The next result provides an additional condition under which the previous results hold for the δ = 0 case (i.e., the situation in which the estimator is forced to be positive semidefinite). Suppose all nonzero elements of Σ∗ are within a factor of τ of each other: maxjk∈gB∗ |Σ∗jk | ≤ τ. minjk∈gB∗ |Σ∗jk | Assumption 5 (minimum eigenvalue). The minimum eigenvalue of Σ∗ must be sufficiently large: p λmin (Σ∗ ) > 4xτ log(p)/n max |gjB ∗ |. j The quantity maxj |gjB ∗ | is the maximal degree of the true covariance graph (defined by the sparsity pattern of Σ∗ ). Theorem 4. Adding Assumptions 4 and 5 to the conditions of Theorem 1, Theorems 1 and 3 hold for δ = 0. 2.3 Discussion & the small world phenomenon The theorems above assume that M = diam(G), but the results in fact apply more generally so long as M ≥ B ∗ . While in general we may not know B ∗ , there are some applications in which one may know enough about the mechanism of the graph-based dependence to provide an upper bound on B ∗ . In such situations, choosing an M that is much smaller than diam(G) may lead to substantial computational improvements (both in terms of timing and memory). 9 Examining the Frobenius-norm bound above, we see that the structure of the seed graph G plays an important role in the rates of convergence. While it is tempting to think of B ∗ as controlling the sparsity level (and therefore the difficulty of the problem), it is important to observe that this quantity is in fact a function of both B ∗ and the graph G. For example, in the Frobenius-norm bound, the quantity |gB ∗ | is the number of pairs of variables that are within B ∗ hops of each other in the graph G. In conventional banded estimation, where G is a path seed graph, the dependence on B ∗ is linear: |gB ∗ | ∼ B ∗ p. More generally, when G is a d-dimensional lattice graph |gB ∗ | ∼ (B ∗ )d p (when B ∗ is small enough to avoid edge effects). However, intuition provided by lattice graphs does not extend well to more  general graphs. For a particularly extreme example, when G is a complete p graph, then |g1 | = 2 . Many large graphs in nature have small diameter (Watts & Strogatz 1998), which means that |gB ∗ | may be quite large even when B ∗ is small. The idea of “six degrees of separation” (Travers & Milgram 1969) means that when using a social network as a seed graph, |g6 | ∼ p2 (in fact, recent work suggests six might even be an overestimate, Backstrom et al. 2011). When diam(G) is very small, Definition 1 is restricted to a very limited class of sparsity patterns. In the next section, we consider a much larger class of sparsity patterns, using the notion of local bandwidths introduced in Definition 2. 3 Graph-guided banding with local bandwidths Definition 2 describes a different kind of graph-guided banding, in which each variable j has an associated bandwidth Bj∗ , which can be thought of as a neighborhood size. Consider sets of the form gjb = {k : 1 ≤ dG (j, k) ≤ b}, for 1 ≤ b ≤ Mj , 1 ≤ j ≤ p, which is the set of variables within b hops of j in the seed graph G. We can describe a sparsity pattern of the type in Definition 2 as i h i [ h S∗ = {j} × gjBj∗ ∪ gjBj∗ × {j} . 1≤j≤p To see this, note that jk ∈ S ∗ is equivalent to dG (j, k) ≤ max{Bj∗ , Bk∗ }. We desire an estimator whose sparsity patterns are unions of the {gjb }, so we use the latent overlapping group lasso penalty (Jacob et al. 2009), which is designed for such situations. We define the graph-guided banding estimator with local bandwidths (GGB-local) as   1 2 Σ̃λ = arg min kS − ΣkF + λP̃ (Σ; G) , (4) ΣδIp 2 where P̃ (Σ; G) = min {V(jb) ∈Rp×p }  Mj p X X  wjb kV(jb) kF j=1 b=1 s.t. ΣgjMj = Mj X b=1 Vg(jb) jb   .  The only difference between this estimator and the GGB-global estimator of (2) is in the choice of groups. For a fixed j, the groups are nested, gj1 ⊆ · · · ⊆ gjMj . When Mj is the diameter of the connected component that contains j, then gjMj represents all variables that are connected to variable j. For j 6= k, we can have gjb ∩gkb 6= ∅ without one group contained completely in the other. The fact that this group structure is not simply hierarchically nested, as in the global bandwidth estimator, complicates both the computation and the theoretical analysis of the estimator. 10 3.1 Computation By Lemma 1, we can solve (4) by Algorithm 1. The challenge of evaluating the GGB-local estimator lies therefore in efficiently evaluating the proximal operator ProxλP̃ . Viewing this problem as an optimization problem over the latent variables {V(jb) } suggests a simple blockwise coordinate descent approach, which we adopt here. 3.2 Theory In Theorem 1, we saw that the Frobenius-norm convergence depends on the number of nonzero off-diagonal elements, |gB∗ |, a quantity that we observed in Section 2.3 could be quite large— as large as O(p2 )—even when B ∗ is very small. In other words, for such “small-world” seed graphs G, the assumption of graph-guided bandedness with a small global bandwidth does not necessarily correspond to Σ∗ being a sparse matrix. The notion of graph-guided bandedness with local bandwidths, as in Definition 2, provides finer control, allowing us to describe sparse Σ∗ even with “small-world” seed graphs G. The purpose of the next theorem is to show that, under such a notion of sparsity, the GGB-local estimator can attain Frobenius-norm consistency when Σ∗ is sparse. Theorem 5. Suppose Σ∗ is (B1∗ , . . . , Bp∗ )-banded with respect to a graph G (in the sense of Defq inition 2) and Assumptions 1-2 hold. Then with λ = x log(max{p,n}) (for x sufficiently large), n wjb = |gjb |1/2 , δ = −∞, and Mj = maxk dG (j, k), r log(max{p, n}) p log(max{p, n}) ∗ 2 ∗ kΣ̃λ − Σ kF . |S | + n n with probability at least 1 − c/ max{p, n}. Proof. See Appendix D. The two terms on the right-hand side of Theorem 5 represent estimation of the q off-diagonal and ∗ ∗ ∗ , then diagonal elements of Σ . If Σ is sparse enough—in particular that |S | ≤ p log(max{p,n}) n ∗ estimating all of Σ is as difficult as estimating its diagonal elements alone (i.e., just the p variances). A simple example of this situation is when Σ∗ is (B1∗ , . . . , Bp∗ )-banded with respect to a graph G q and Bj∗ > 0 for at most log(max{p,n}) variables j. Another example is when all Bj∗ ≤ 1 and the n q sum of degrees of all j with Bj∗ = 1 is bounded by p log(max{p,n}) . n Theorem 5 suggests that consistency in Frobenius norm might not be achieved in the p > n regime even in the sparsest situation of a diagonal matrix. As noted earlier, this is not a shortcoming of our method but rather a reflection of the difficulty of the task, which requires estimating p independent parameters even in the sparsest situation of a diagonal matrix. As noted previously, if instead we were interested in estimating the correlation matrix, we can attain a rate as in Theorem 5 but without the second term by applying our estimator to the sample correlation matrix. Theorem 6. Suppose Σ∗ is (B1∗ , . . . , Bp∗ )-banded with respect to a graph G (in the sense of Definition 2) and Assumptions 1, 2, and 3 hold. Then there exists a constant x for which taking 11 λ=x q log(max{p,n}) , n wjb = |gjb |1/2 , δ = −∞, and Mj = maxk dG (j, k), r kΣ̃λ (R̂) − R∗ k2F ∗ . |S | log(max{p, n}) n with probability at least 1 − c/ max{p, n}. Consistency follows even when p  n as long as the right-hand side approaches 0. 4 4.1 Empirical study Simulations All simulations presented in this paper were performed using the simulator package (Bien 2016b,a) in R (R Core Team 2017). We investigate the advantages of exploiting a known graph structure (both in the global and local bandwidths settings), and we also study our two methods’ robustness to graph misspecification. We compare the two GGB methods to each other and to two other methods, which represent the “patternless sparsity” and traditional banding approaches. Perhaps the simplest and most commonly used sparse covariance estimator is to simply softthreshold each off-diagonal element of the sample covariance matrix: soft Σ̂jk = sign(Sjk ) [|Sjk | − λ]+ . This method (Rothman et al. 2009), along with its close relatives (Rothman 2012, Liu et al. 2013, Xue et al. 2012), do not make use of the graph G and corresponds to (3) with Ω being the `1 norm and δ = −∞. Thus, comparisons to this method allow us to understand what is gained and what is lost by using the graph G versus seeking “patternless sparsity.” We also wish to compare our new estimators to a more traditional (i.e., non-graph-guided) banding approach. Graph-guided banding is not the only way one might incorporate the graph G. A different approach would be to find an ordering of the nodes based on G and then apply a traditional banding estimator with respect to this ordering. To this end, we seek an ordering of the variables that travels along G as much as it can, making jumps to another part of G as sparingly as possible. We express this as a traveling salesman problem (TSP), which we then solve using an off-the-shelf TSP solver (see Appendix F for details and for images of the learned paths). We then apply the convex banding method using this ordering (Bien et al. 2015a,b). While each of these methods can be solved with a positive semidefinite constraint, we compare their performances without such a constraint. Doing so allows us to observe the fraction of the time each unconstrained estimator is positive semidefinite: Table 5 in Appendix G shows that the banding estimators are observed in the study to always be positive semidefinite, whereas this is not the case for the soft-thresholding estimator. It follows that the reported results for the banding methods in fact also pertain to these estimators with δ = 0. To generate a covariance matrix that is (B1∗ , . . . , Bp∗ ) banded with respect to a graph G, we take ( Σ∗jk = 1 dG (j,k) 1 n o dG (j, k) ≤ max(Bj∗ , Bk∗ ) a if j 6= k if j = k, 12 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Figure 4: Two-dimensional lattice graph; seed graph (left panel), global bandwidth (center panel), local bandwidths (right panel) ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Figure 5: Scale-free graph; seed graph (left panel), local bandwidths (right panel) where a is chosen to ensure that the minimum eigenvalue of Σ is at least σ 2 (we take σ = 0.01 throughout). Initially, we compare the methods under four GGB structures: two-dimensional lattice with global bandwidth, two-dimensional lattice with local bandwidths, scale-free graph with global bandwidth, and scale-free graph with local bandwidths. In the first two scenarios, we take G to be a two-dimensional square lattice having 20 variables per side (so p = 400). The global bandwidth is taken to be B ∗ = 4, and the local bandwidths are generated according to   0 with probability 0.90 ∗ Bj = 1 with probability 0.06   4 with probability 0.04 (see Figure 4). The resulting Σ∗ has roughly 10% of elements nonzero in the global case and about 1% in the local case. In the third and fourth scenarios, we take G to be a scale free network (as generated by the function sample pa in the R package igraph, Csardi & Nepusz 2006) with p = 400 nodes. The same two choices of global and local bandwidths lead to Σ∗ having, respectively, about 75% and 10% nonzeros (see Figure 5). The marked difference in sparsity levels is a manifestation of the differing neighborhood structures between these two graph types. 13 Table 1: A comparison of mean Frobenius error at CV-best (averaged over 200 replicates). 2-d lattice (20 by 20), b = 4 2-d lattice (20 by 20) w/ var-bw Scale free (p = 400), b = 4 Scale free (p = 400) w/ var-bw GGB-global 7.605 (0.015) 4.244 (0.002) 6.740 (0.009) 3.273 (0.002) GGB-local 8.381 (0.031) 3.170 (0.008) 6.543 (0.015) 2.867 (0.007) Soft thresholding 11.634 (0.014) 4.347 (0.007) 7.655 (0.004) 3.552 (0.005) TSP + hierband 11.562 (0.031) 4.779 (0.003) 7.727 (0.009) 3.661 (0.002) Table 2: A comparison of mean operator error at CV-best (averaged over 200 replicates). 2-d lattice (20 by 20), b = 4 2-d lattice (20 by 20) w/ var-bw Scale free (p = 400), b = 4 Scale free (p = 400) w/ var-bw 4.1.1 GGB-global 2.185 (0.007) 0.989 (0.003) 4.350 (0.010) 1.160 (0.001) GGB-local 2.428 (0.015) 0.756 (0.005) 4.110 (0.016) 1.008 (0.005) Soft thresholding 3.224 (0.010) 0.997 (0.004) 4.695 (0.004) 1.212 (0.002) TSP + hierband 3.149 (0.016) 1.024 (0.003) 4.709 (0.009) 1.238 (0.001) Lattice versus scale-free graphs and global versus local bandwidths We generate samples of size n = 300 under the four scenarios (and repeat 200 times). Tables 1 and 2 present Frobenius-norm error and operator-norm errors, kΣ̂−Σ∗ kF and kΣ̂−Σ∗ kop , respectively; table 3 presents the entropy error, − log det(Σ̂Σ∗−1 ) + trace(Σ̂Σ∗−1 ) − p. Each method has a single tuning parameter, and we report the performance of the method with the value of the tuning parameter chosen by 5-fold cross validation. In particular, we randomly partition the training data P into 5 folds and, for an estimator Σ̂λ , choose λ̂CV-best = arg minλ 51 5k=1 kS(k) −Σ̂λ (S(−k) )kF , where S(k) is the sample covariance matrix in which only the kth fold is included and S(−k) is the sample covariance matrix in which the kth fold is omitted. In the 2-d lattice model, GGB-global does best when the true model has global bandwidth, as we would expect it to. Interestingly, GGB-local does best not just when the true model has local bandwidths but also in the scale-free model with a global bandwidth. This is a reminder of the important role that the seed graph’s structure plays in the statistical properties of the estimators. Finally, Figure 6 shows ROC curves for the four methods. The results are consistent with the results from the tables. In particular, GGB-global does best in the first scenario, and GGB-local does best in the other scenarios. Interestingly, TSP + hiernet does not appear to be an effective approach. Unlike the graph-guided approaches, TSP + hiernet does worse than soft-thresholding in nearly every scenario. For example, in Figure 6, we see that TSP + hiernet’s ability to identify nonzero elements of Σ∗ is no better than random guessing. This poor performance is to be expected in this scenario since such a network cannot be well captured by an ordering of the nodes. For the two-dimensional lattice graph scenarios, we find that such an approach is at least partially successful, which makes sense since the ordering captures some aspects of the underlying seed graph. Table 3: A comparison of mean entropy error at CV-best (averaged over 200 replicates). 2-d lattice (20 by 20), b = 4 2-d lattice (20 by 20) w/ var-bw Scale free (p = 400), b = 4 Scale free (p = 400) w/ var-bw GGB-global 7719 ( 24) 25823 ( 55) 72606 (146) 52047 ( 70) GGB-local 7819 ( 69) 18088 (119) 68087 (191) 44188 (186) 14 Soft thresholding 10234 ( 34) 25358 ( 89) 68654 ( 62) 53332 ( 86) TSP + hierband 11870 ( 73) 27188 ( 62) 68518 (119) 54304 ( 76) 2−d lattice (20 by 20), b = 4 2−d lattice (20 by 20) w/ var−bw 1.00 0.75 0.50 0.25 Specificity Method 0.00 GGB − global Scale free (p = 400), b = 4 GGB − local Scale free (p = 400) w/ var−bw Soft thresholding 1.00 TSP + hierband 0.75 0.50 0.25 0.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Sensitivity Figure 6: ROC curves (formed by varying the tuning parameter for each method), show the sensitivity and specificity of identifying the nonzero elements of Σ∗ . For visibility, only five of the 200 replicates are shown. (Plot made using R package ggplot2, Wickham 2009.) 15 4.1.2 Effect of graph misspecification The previous simulation studies establish the rather obvious fact that when one knows the true graph G with respect to which Σ∗ is banded, one can better estimate Σ∗ with an estimator that uses G. In practice, however, one might typically use a graph G0 that is (hopefully) close to G but not exactly identical. This section seeks to understand the effect of graph misspecification on the effectiveness of graph-guided banding. We simulate data as above but imagine that we only have access to a corrupted version of the underlying graph G. Let π ∈ [0, 1] control the degree of corruption to G. Of course there are many ways to corrupt a graph, but we choose a scheme that will preserve the properties of the graph and the sparsity level of the covariance matrix (so as not to confound graph distortion with other factors such as sparsity level, number of triangles, etc.). In particular, we take G to be an Erdos-Renyi graph with p = 400 vertices and 760 edges (this is chosen to match the number of edges in the previous examples). We take Σ∗ to have global graph-guided bandwidth B ∗ = 4 with respect to this graph G. For each edge in G, with probability π we remove it and then connect two currently unconnected nodes chosen at random. We choose G to be an Erdos-Renyi graph so that the distorted graph G0 is itself Erdos-Renyi with the same number of edges. By keeping all graph properties fixed, we can be confident that as we vary π, any differences in performance of the methods will be attributable to G and G0 having different edges. Figure 7 shows the performance of the three methods as the probability of reassigning an edge is varied from 0 (no distortion of G) to 1 (all edges are distorted). As expected, we see both GGB methods deteriorating as the distortion level of the seed graph G0 is increased. When π = 0 (i.e., G = G0 ) GGB-global is best (which makes sense since Σ∗ has a global bandwidth). When approximately π = 0.25 of the edges are distorted, the best obtainable operator-norm error by the GGB methods becomes worse than that of soft-thresholding. Soft-thresholding is, of course, unaffected by graph distortion since it does not use G0 at all. Surprisingly, in Frobenius-norm error the two GGB methods remain better than soft-thresholding even at very high levels of distortion. A deeper examination of this simulation reveals that the GGB methods are more biased but less variable than the soft-thresholding estimates, leading to a smaller Frobenius-norm error. We do expect this behavior to be problem-specific and in general would expect GGB methods with highly distorted graphs to perform worse than soft-thresholding. 4.2 Application to images of handwritten digits In this section, we apply our estimators to a dataset of (16 × 16)-pixel images of handwritten digits (Le Cun et al. 1990, Hastie et al. 2009)1 . There are between (roughly) 700 and 1500 images per digit type. For each digit type, we take a random n = 90 images to form the “training set” sample covariance matrix Strain and use the remaining data to form the “test set” sample covariance matrix Stest (our results are based on 20 replications of this process). A natural seed graph in this situation is the two-dimensional lattice graph formed by connecting adjacent pixels. We compare our two GGB estimators to the soft-thresholding estimator. We fit each covariance estimator to the training data and compute its best attainable (over choice of tuning parameter) distance in Frobenius norm to Stest , min kΣ̂λ (Strain ) − Stest k2F . λ≥0 1 available at http://statweb.stanford.edu/~tibs/ElemStatLearn/datasets/zip.digits/ 16 6 ● ● ● 15 ● ● ● ● ● ● ● ● ● ● ● ● ● ● 5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 3 4 ● ● ● 2 Best operator error 10 ● ● ● ● 1 5 Best Frobenius error ● ● 0 ● ● 0.0 GGB − global GGB − local Soft thresholding 0.2 0 ● 0.4 0.6 0.8 1.0 0.0 Probability of distortion 0.2 0.4 0.6 0.8 1.0 Probability of distortion Figure 7: The effect of graph misspecification on the performance of the global and local graph-guided banding methods in terms of Frobenius and operator norms. Table 4: A comparison of best attainable Frobenius-norm test error (averaged over 20 replicates). Standard errors are reported in parentheses. For all but two of the digits, a GGB method has lower test error than soft-thresholding in all 20 out of 20 replications. Digit Digit Digit Digit Digit Digit Digit Digit Digit Digit 0 1 2 3 4 5 6 7 8 9 GGB-global 10.8 (0.1) 2.6 (0.1) 10.9 (0.2) 8.9 (0.1) 9.4 (0.1) 10.7 (0.2) 9.2 (0.2) 7.3 (0.1) 9.3 (0.1) 7.8 (0.2) GGB-local 10.8 (0.1) 2.6 (0.1) 10.9 (0.2) 8.9 (0.1) 9.5 (0.1) 10.8 (0.2) 9.1 (0.2) 7.4 (0.1) 9.4 (0.1) 7.9 (0.2) Soft thresholding 11.0 (0.1) 2.6 (0.1) 11.3 (0.1) 9.3 (0.1) 9.9 (0.1) 11.2 (0.2) 9.2 (0.2) 7.5 (0.1) 9.8 (0.1) 8.0 (0.2) Table 4 reports this quantity, averaged over the 20 random train-test splits of the dataset, for each digit. GGB-local has a lower test error than soft-thresholding in all 20 replicates for the digits 2-9; GGB-global has a lower test error than soft-thresholding in all 20 replicates for all digits other than 0, 1, and 6. In fact, there is no digit for which soft-thresholding wins in a majority of replicates. This indicates that exploiting the neighborhood structure inherent to image data is useful for covariance estimates in this context. 5 Discussion This paper generalizes the notion of banded covariance estimation to situations in which there is a known underlying graph structure to the variables being measured. The traditional notion of a banded matrix corresponds to the special case where this graph is a path encoding the ordering of the variables. We propose two new “graph-guided” estimators, based on convex optimization 17 problems: GGB-global enforces a single bandwidth across all variables while GGB-local allows each variable to have its own bandwidth. There are many interesting avenues of future research. In this paper, we assume the seed graph is given, and the challenge is in determining the bandwidth(s). One could imagine situations in which the seed graph itself is unavailable (but in which we do believe that such a graph exists). In such a setting, can one identify the smallest seed graph G for which the covariance matrix’s sparsity pattern is banded with respect to G? This generalizes the problem of discovering an ordering for which one can apply a traditional known-ordering estimator considered by Wagaman & Levina (2009), Zhu & Liu (2009). A simple heuristic strategy might involve forming a minimum spanning tree based on the complete graph with edge weights given by the sample covariance matrix. The graph-guided banding estimators would then have sparsity patterns with this minimum spanning tree seed graph serving as backbone. Another future avenue of research is in applying the graph-guided structure to the inverse covariance matrix. Finally, we have seen (e.g., in Theorem 1 and in the empirical study) that the properties of the seed graph G influence the success of the GGB estimators. More generally understanding how the graph properties of G affect the difficulty of the estimation problem itself would be a particularly interesting direction of future study. A Proof of Lemma 1 of main paper Lemma 2. Consider the problem  Σ̂ = arg min ΣδIp  1 2 kS − ΣkF + λΩ(Σ) , 2 where Ω is a closed, proper convex function, and let   1 2 ProxλΩ (M) = arg min kM − ΣkF + λΩ(Σ) Σ 2 denote the proximal operator of λΩ(·) evaluated at a matrix M. Algorithm 1 converges to Σ̂. Proof. Problem (3) is equivalent to  1 min kS − Σk2F + λΩ(Σ̃) 2 Σ,Σ̃  s.t. Σ = Σ̃, Σ  δIp , which has Lagrangian 1 L(Σ, Σ̃; B, C) = kS − Σk2F + λΩ(Σ̃) + hΣ − Σ̃, Bi + hδIp − Σ, Ci. 2 The dual function is given by minimizing over Σ and Σ̃:   n o 1 inf L(Σ, Σ̃; B, C) = δhIp , Ci + inf kS − Σk2F + hΣ, B − Ci + inf λΩ(Σ̃) − hΣ̃, Bi Σ 2 Σ,Σ̃ Σ̃ 1 1 = δhIp , Ci − kB − C − Sk2F + kSk2F − [λΩ]∗ (B) 2 2 18 where [λΩ]∗ is the convex conjugate of λΩ. Also, Σ̂ = S − B̂ + Ĉ. The dual optimal (B̂, Ĉ) is given by solving 1 min kB − C − Sk2F + [λΩ]∗ (B) − δhIp , Ci s.t. B,C 2 C  0, which is a convex problem. Furthermore, by Tseng (2001), it can be solved by alternately optimizing over B (holding C fixed) and over C (holding B fixed). The solution to the optimization over B is the proximal operator of [λΩ]∗ evaluated at C + S. The Moreau decomposition (see, e.g., Parikh & Boyd 2014) for the closed, proper convex function λΩ gives us B̂(C) = Prox[λΩ]∗ (S + C) = S + C − ProxλΩ (S + C). Optimizing over C while holding B fixed requires solving 1 Ĉ(B) = min kB − C − Sk2F − δhIp , Ci C 2 s.t. C  0, which in terms of the eigenvalue decomposition of B − S = UΛUT becomes 1 Ĉ(B) = min kC − UΛUT k2F − δhIp , Ci s.t. C  0 C 2 or Ĉ(B) = UD̂(B)UT where 1 D̂(B) = min kD − Λk2F − δhIp , Di D 2 s.t. D  0, which is solved by D̂(B) = diag([Λii + δ]+ ). B Proof of Theorem 1 of main paper (Frobenius error) Proof. Since δ = −∞ and M = diam(G), the estimator is more simply   1 2 Σ̂ := Σ̂λ = arg min kS − ΣkF + λP (Σ; G) Σ 2 where P (Σ; G) = min {V(b) ∈Rp×p } (M X wb kV(b) kF b=1 s.t. Σ− = M X (5) ) Vg(b) b . b=1 In what follows, whenever we write a sum with subscript b, it is understood to run along b = 1, . . . , M ; this also holds for the {V(b) } notation, which is short for {V(b) }M b=1 . 19 We begin by observing that (5) is a strongly convex problem in Σ, and thus there is a unique minimizer Σ̂, although the minimizing set of V̂(b) ’s may not be unique. Also, since diag(Σ) does not appear in the penalty, we see that diag(Σ̂) = diag(S). Thus, we can write (5) as   1 − − 2 kS − ΣkF + λP (Σ; G) . (6) Σ̂ = arg min Σ 2 We can write (6) in terms of the V(b) ’s: ( X X 1 {V̂(b) } ∈ arg min kS − V(b) k2F + λ wb kV(b) kF 2 V(b) b ) s.t. (b) Vg c b = 0 ∀b . (7) b Note that we have replaced S− by S (for notational convenience) since gb does not include diagonal elements. The lemma below provides necessary and sufficient conditions for {V̂(b) } to be a solution to (7). P (b) Lemma 3. Writing Σ̂ = b V̂(b) , {V̂(b) } is a solution to (7) iff. for each b ∈ {1, . . . , M }, V̂gc = 0 b and (b) λwb V̂gb [S − Σ̂]gb = if V̂(b) 6= 0 kV̂(b) kF and k[S − Σ̂]gb kF ≤ λwb otherwise. Proof. Problem (7) is equivalent to a non-overlapping group lasso problem, and this lemma provides the KKT conditions of this problem, which are well-known. Corollary 1. Let {V̂(b) } be a solution to (7). Then, k[S − Σ̂]gb kF < λwb =⇒ V̂(b) = 0. Suppose supp(Σ∗ ) = gB ∗ . If we can construct a solution {V̂(b) } to (7) that has max wb−1 k[S − Σ̂]gb kF < λ, b>B ∗ then, by Corollary 1, we know that V̂(b) = 0 for all b > B ∗ or {b : V̂(b) 6= 0} ⊆ {1, . . . , B ∗ }. In fact, the corollary implies that this holds for all solutions, not just for our constructed {V̂(b) }. Consider the restricted problem ( ) B∗ B∗ X X 1 (b) (b) 2 (b) (b) B ∗ ∗ kS − V kF + λ wb kV kF s.t. Vgc = 0 for 1 ≤ b ≤ B , {V̄ }b=1 ∈ arg min b 2 V(b) b=1 b=1 PB ∗ (b) and write Σ̄ = b=1 V̄ . This restricted problem is of an identical form to (7) but with M replaced by B ∗ . Thus, Lemma 3 applies if we replace b = 1, . . . , M with b = 1, . . . , B ∗ : For each b ≤ B∗, (b) λwb V̄gb if V̄(b) 6= 0 [S − Σ̄]gb = kV̄(b) kF 20 and k[S − Σ̄]gb kF ≤ λwb otherwise. P (b) = Now, for b > B ∗ , let V̄(b) = 0. We show that {V̄(b) }M is a solution to (7). Clearly, M b=1 V̄ b=1 PB ∗ (b) = Σ̄, so by Lemma 3 it simply remains to show that b=1 V̄ k[S − Σ̄]gb kF ≤ λwb for b > B ∗ . For b > B ∗ : k(S − Σ̄)gb k2F = k(S − Σ̄)gB∗ k2F + kSs(B∗ +1):b k2F 2 2 ∗ ≤ λ2 wB ∗ + k(S − Σ )s(B ∗ +1):b kF 2 ∗ 2 ≤ λ2 wB ∗ + |s(B ∗ +1):b | · kS − Σ k∞ . Now, on the event Aλ = {kS − Σ∗ k∞ < λ}, (8) we have 2 2 2 k(S − Σ̄)gb k2F < λ2 (wB ∗ + |s(B ∗ +1):b |) = λ wb , using that wb2 = |gb | = |gB ∗ | + |s(B ∗ +1):b |. This establishes, by Lemma 3, that {V̄(b) } is a solution to (7) and, by Corollary 1 that {b : V̂(b) 6= 0} ⊆ {1, . . . , B ∗ } for all solutions {V̂(b) } to (7). Given the support constraints of each V̂(b) , it follows that the overall Σ̂ has bandwidth no larger than B∗. Proposition 1. If wb = |gb |1/2 , δ = −∞, and M = diam(G), then B(Σ̂λ ) ≤ B ∗ on Aλ . Having established the above proposition about the bandwidth, it is straightforward to prove a result about the estimation error. On Aλ , k(Σ̂ − Σ∗ )gB∗ kF ≤ k(S − Σ∗ )gB∗ kF + k(S − Σ̂)gB∗ kF ≤ kS − Σ∗ k∞ · |gB ∗ |1/2 + λwB ∗ < 2λwB ∗ and Σ̂gB∗ = 0. Thus, 2 kΣ̂ − Σ∗ k2F = kdiag(S) − diag(Σ∗ )k2F + k(Σ̂ − Σ∗ )gB∗ k2F < λ2 (p + 4wB ∗ ). (9) Proposition 2. If wb = |gb |1/2 , δ = −∞, and M = diam(G), then kΣ̂ − Σ∗ k2F ≤ λ2 (p + 4|gB(Σ∗ ) |) on Aλ . Under Assumptions 1 and 2 of the main paper, there exists a constant c > 0 for which P (Aλ ) ≥ 1 − c/ max{p, n} (10) p if we take λ = x log max{p, n}/n with x sufficiently large. This follows directly from bound (A.4.1) of Theorem A.1 of Bien et al. (2015c). Theorem 1 of the main paper follows. 21 C Proof of Theorem 3 of main paper (bandwidth recovery) We prove a result that is a bit more general than Theorem 3 of the main paper. Theorem 1. Under the minimum signal condition min kΣ∗gb kF /|gb |1/2 > 2λ, b≤B ∗ and the conditions of Theorem 1 of the main paper, B(Σ̂) = B(Σ∗ ) with probability at least 1 − c/ max{p, n}. Proof. On the event Aλ defined in (8), for b ≤ B ∗ , k(Σ̂ − Σ∗ )gb kF ≤ k(S − Σ∗ )gb kF + k(S − Σ̂)gb kF < λ|gb |1/2 + k(S − Σ̂)gb kF ≤ λ|gb |1/2 + λwb = 2λwb . Thus, max wb−1 k(Σ̂ − Σ∗ )gb kF < 2λ. b≤B ∗ We already know that B(Σ̂) ≤ B ∗ , so it suffices to show that min kΣ̂gb kF /wb > 0, b≤B ∗ which follows since kΣ̂gb kF /wb ≥ kΣ∗gb kF /wb − k(Σ̂ − Σ∗ )gb kF /wb > 2λ − 2λ = 0. The result then follows from (10). Corollary 2. Under the minimum signal condition min |Σ∗jk | > 2λ, jk∈gB ∗ and the conditions of Theorem 1 of the main paper, B(Σ̂) = B(Σ∗ ) with probability at least 1 − c/ max{p, n}. Proof. For any b ≤ B ∗ , kΣ∗gb k2F /|gb | = X [Σ∗jk ]2 /|gb | > jk∈gb X jk∈gb Thus, the conditions of Theorem 1 hold. 22 4λ2 /|gb | = 4λ2 . D Proof of Theorem 5 (Frobenius error of local bandwidths estimator) Proof. Let Σ̃ := Σ̃λ be the minimizer of Equation (4) of the main paper. By definition, 1 1 kS − Σ̃k2F + λP̃ (Σ̃; G) ≤ kS − Σ∗ k2F + λP̃ (Σ∗ ; G). 2 2 Since kS − Σ̃k2F = kS − Σ∗ k2F + kΣ̃ − Σ∗ k2F − 2hS − Σ∗ , Σ̃ − Σ∗ i, we have 1 kΣ̃ − Σ∗ k2F + λP̃ (Σ̃; G) ≤ hS − Σ∗ , Σ̃ − Σ∗ i + λP̃ (Σ∗ ; G). 2 (11) −1 By Lemma 3 of Obozinski et al. (2011), the dual norm is P̃ ∗ (B; G) = maxjb wjb kBgjb kF , and so hS − Σ∗ , Σ̃ − Σ∗ i ≤ λ2 p + P̃ ∗ (S − Σ∗ ; G)P̃ (Σ̃ − Σ∗ ; G). (12) Define the index sets I = {jb : 1 ≤ b ≤ Mj } and I ∗ = {jb : 1 ≤ b ≤ Bj∗ }. Observe that with wjb = |gjb |1/2 −1 kBgjb kF ≤ kBk∞ . max wjb jb∈I It follows that hS − Σ∗ , Σ̃ − Σ∗ i < λ2 p + λP̃ (Σ̃ − Σ∗ ; G), as long as kS − Σ∗ k∞ < λ, that is on the event Aλ , as defined in (8). Thus, combining this with (11), h i 1 kΣ̃ − Σ∗ k2F + λP̃ (Σ̃; G) ≤ λ2 p + λP̃ (Σ̃ − Σ∗ ; G) + λP̃ (Σ∗ ; G). 2 holds on Aλ . Using the triangle inequality (P̃ is a norm), h i 1 kΣ̃ − Σ∗ k2F ≤ λ2 p + λ P̃ (Σ̃ − Σ∗ ; G) − P̃ (Σ̃; G) + P̃ (Σ∗ ; G) ≤ λ2 p + 2λP̃ (Σ∗ ; G). 2 By definition of P̃ , P̃ (Σ∗ ; G) ≤ X wjb kV(jb) kF (13) jb∈I (jb) for any choice of {V(jb) } such that Vgc = 0 and Σ∗ = (j 0 b0 ) Consider taking Vjk P jb V jb (jb) . = 0, for all jk ∈ {1, . . . , p}2 and j 0 b0 ∈ I, unless (jBj∗ ) (i) dG (j, k) ≤ min{Bj∗ , Bk∗ }, in which case we take Vjk (kBk∗ ) (ii) Bj∗ < dG (j, k) ≤ Bk∗ , in which case we take Vjk 23 (jBj∗ ) = Vkj (kBk∗ ) = Vkj (kBk∗ ) = Vjk = Σ∗jk . (kBk∗ ) = Vkj = 12 Σ∗jk . (jBj∗ ) (iii) Bk∗ < dG (j, k) ≤ Bj∗ , in which case we take Vjk (jBj∗ ) = Vkj = Σ∗jk . We verify that this choice of {V(jb) } satisfies the necessary constraints. Clearly, V(jb) = 0 for b 6= Bj∗ . If jk 6∈ gjBj∗ , then dG (j, k) > Bj∗ , which excludes cases (i) and (ii), the only two cases in (jBj∗ ) (jBj∗ ) (jB ∗ ) ) could be nonzero. Thus, Vgc ∗j = 0. jB j P 0 b0 ) ∗ (j We next verify that j 0 b0 ∈I V = Σ . In case (i), which Vjk (and Vkj (jBj∗ ) 0 0 X [V(j b ) ]jk = Vjk (kBk∗ ) = Σ∗jk . + Vjk j 0 b0 ∈I In case (ii), X 0 0 (kBk∗ ) 0 0 (jBj∗ ) [V(j b ) ]jk = Vjk = Σ∗jk . j 0 b0 ∈I In case (iii), X [V(j b ) ]jk = Vjk = Σ∗jk . j 0 b0 ∈I (jBj∗ ) Now, we have that |Vjk X ∗ | ≤ |Σ∗jk |, which implies that kV(jBj ) kF ≤ kΣ∗gjB∗ kF . Thus, j wjb kV(jb) kF = X wjBj∗ kV (jBj∗ ) kF ≤ j jb∈I X wjBj∗ kΣ∗gjB∗ kF ≤ kΣ∗ k∞ j j X |gjBj∗ |. j Now, each jk ∈ S ∗ appears only in gjBj∗ or gkBk∗ (or potentially both). Thus, by (13), 2|S ∗ |. ∗ ∗ It follows that P̃ (Σ ; G) ≤ 2kΣ k∞ |S ∗ |, P j |gjBj∗ | ≤ and so (on Aλ ) kΣ̃ − Σ∗ k2F ≤ λ2 p + 4kΣ∗ k∞ |S ∗ |λ. Assumptions 1 and 2 of the main paper are used (as in Appendix B) to show that Aλ holds with the desired probability. E Proofs about GGB on sample correlation matrix We begin by establishing a concentration inequality for the correlation matrix that will be used in the proofs of both of these theorems. This result is similar to Lemma A.2 of Liu et al. (2017) except that we assume sub-Gaussian rather than Gaussian data. It is also similar to Lemma D.5 of Sun et al. (2017) except that we assume that S has been centered by the sample mean. Lemma 4. Suppose that Assumptions 1, 2, and 3 hold. There exists a constant x (i.e., a value not depending on n or p) such that for all n and p for which log{p, n}/n < 1/x2 , p P(kR̂ − R∗ k∞ > x log(max{p, n})/n) ≤ 16/ max{p, n}. 24 Proof. The following proof is based on the proof of Lemma A.2 of Liu et al. (2017). Certain details have been fleshed out and some modifications have been made to accommodate the differing assumptions. Let Aj = {|Sjj − Σ∗jj | ≤ Σ∗jj /2}. Observing that Aj = {1/2 ≤ Sjj /Σ∗jj ≤ 3/2}, it follows that Sjj Skk ≤ (3/2)2 Σ∗jj Σ∗kk   Sjj Skk 1/2 =⇒ 1/2 ≤ ≤ 3/2 Σ∗jj Σ∗kk Aj ∩ Ak =⇒ (1/2)2 ≤ 1/2 1/2 1/2 =⇒ (1/2)(Σ∗jj Σ∗kk )jk ≤ (Sjj Skk )jk ≤ (3/2)(Σ∗jj Σ∗kk )jk 1/2 1/2 1/2 =⇒ |(Sjj Skk )jk − (Σ∗jj Σ∗kk )jk | ≤ (1/2)(Σ∗jj Σ∗kk )jk . (14) Now, {|R̂jk − R∗jk | > t} = {|Sjk − Σ∗jk | > t(Sjj Skk )1/2 } ⊆ {|Sjk − Σ∗jk | > t(Sjj Skk )1/2 } ∩ (Aj ∩ Ak ) [ (Aj ∩ Ak )c . By (14) and the triangle inequality, {|Sjk − Σ∗jk | > t(Sjj Skk )1/2 } ∩ (Ai ∩ Aj ) ⊆ {|Sjk − Σ∗jk | > (t/2)(Σ∗jj Σ∗kk )1/2 }, so {|R̂jk − R∗jk | > t} ⊆ {|Sjk − Σ∗jk | > (t/2)(Σ∗jj Σ∗kk )1/2 } [ (Aj ∩ Ak )c . Now, {max |R̂jk − R∗jk | > t} ⊆ j6=k i [h {|Sjk − Σ∗jk | > (t/2)(Σ∗jj Σ∗kk )1/2 } ∪ Acj ∪ Ack j6=k = [ {|Sjk − Σ∗jk | > (t/2)(Σ∗jj Σ∗kk )1/2 } ∪ ⊆ Acj j j6=k [ [ {|Sjk − Σ∗jk | > (t/2)κ} ∪ [ Acj j j6=k ⊆ {max |Sjk − j6=k Σ∗jk | > (t/2)κ} ∪ {max |Sjj − Σ∗jj | > (1/2)κ} j ∗ ⊆ {kS − Σ k∞ > (κ/2) min{t, 1}}. Since R̂jj = 1 = R∗jj , maxj6=k |R̂jk − R∗jk | = kR̂ − R∗ k∞ and thus we have established that P(kR̂ − R∗ k∞ > t) ≤ P(kS − Σ∗ k∞ > (κ/2) min{t, 1}). By Lemma A.1 of Bien et al. (2015c) (with a typo corrected), there exist constants c1 , c2 such that 2 P(kS − Σ∗ k∞ > ) ≤ 2p2 e−c2 n(/κ̄) + 8pe−c1 n/κ̄ for any 0 <  < 2κ̄. This constraint on  implies that (/κ̄)2 < 2(/κ̄) and so 2 2 2p2 e−c2 n(/κ̄) + 8pe−c1 n/κ̄ < 2p2 e−c2 n(/κ̄) + 8pe−c1 n(/κ̄) 25 2 /2 . Taking c3 = min{c2 , c1 /2}, 2 2 P(kS − Σ∗ k∞ > ) ≤ (2p2 + 8p)e−c3 n(/κ̄) ≤ 16p2 e−c3 n(/κ̄) . Observing that  = (κ/2) min{t, 1} < κ̄ < 2κ̄, we have that 2 /(2κ̄)2 P(kR̂ − R∗ k∞ > t) ≤ 16p2 e−c3 nκ min{t2 ,1} . p We take t = x log(max{p, n})/n for x = 12(κ̄/κ)2 /c3 . By Assumption 3, κ and κ̄ are treated as constants. If x2 log(max{p, n})/n then min{t2 , 1} = t2 and 2 /(2κ̄)2 x2 P(kR̂ − R∗ k∞ > t) ≤ 16p2 e−c3 κ log(max{p,n}) 2 /(2κ̄)2 x2 ≤ 16 max{p, n}2−c3 κ . Thus, we just need that 2 − c3 κ2 /(2κ̄)2 x2 ≤ −1, which can be ensured by choosing x = 12(κ̄/κ)2 /c3 . We define the event Bλ = {kR̂ − R∗ k∞ < λ}. Lemma 4 establishes that there exist constants x and c for which choosing λ = x ensures that P(Bλ ) ≥ 1 − c/ max{n, p}. E.1 (15) q log(max{p,n}) n Proof of Theorem 2 (Frobenius error of global GGB on correlation matrix) Let Σ̂λ (R̂) be the minimizer of Equation (2) of the main paper where S is replaced by R̂. Proof of Theorem 2. The proof is nearly identical to that of Theorem 1 given in Section C. We take Σ̂ to be Σ̂λ (R̂), we replace S with R̂, and we replace Aλ with Bλ . Instead of (9), we get 2 kR̂ − R∗ k2F = k(Σ̂ − Σ∗ )gB∗ k2F < 4λ2 wB ∗, which leads to the stated result. E.2 Proof of Theorem 6 (Frobenius error of local GGB on correlation matrix) Let Σ̃λ (R̂) be the minimizer of Equation (4) of the main paper where S is replaced by R̂. Proof of Theorem 6. The proof is nearly identical to that of Theorem 5 given in Section D. We take Σ̃ to be Σ̃λ (R̂) and replace S with R̂. Equation 12 becomes instead hR̂ − R∗ , Σ̃ − R∗ i ≤ P̃ ∗ (R̂ − R∗ ; G)P̃ (Σ̃ − R∗ ; G). Following the same steps as in that proof, we note that on the set Bλ , defined in (15), kΣ̃ − Σ∗ k2F ≤ 4kΣ∗ k∞ |S ∗ |λ. 26 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Figure 8: TSP solutions used for the two graphs used in the simulation studies F Traveling salesman problem Let C be a p × p matrix of costs, with Cjk being the cost of traveling from node j to node k. The traveling salesman problem (TSP) seeks a loop v1 → v2 → . . . vp → v1 through all the nodes such P that p−1 `=1 Cv` v`+1 + Cvp v1 is minimal. In our context, we have a graph G and wish to find an ordering of the nodes that is strongly informed by G. In particular, we would like this path to travel along edges of G as much as possible and when this is not possible and the path must “fly” between two nodes that are not connected by a node, that it take the shortest flight possible. We therefore take Cjk = dG (j, k) − 1. We use the R package TSP (Hahsler & Hornik 2017), which provides an interface to the Concorde solver (Applegate et al. 2017), and Figure 8 shows the resulting paths. G An empirical study of positive semidefiniteness For each of the models considered in Section 4.1.1 of the main paper, we record the proportion of the time each method is positive semidefinite. In particular, this average is over both the 200 simulation replicates and the values of the tuning parameter of each method. Table 5 shows that throughout this study the banding methods (GGB and hierband) are always observed to give positive semidefinite estimates. This is not the case for the soft-thresholding estimator. H A higher dimensional example In Section 4.1.1, we study four models in which p = 400 and n = 300. The covariance matrix has p(p + 1)/2 ≈ 80, 000 parameters. Thus, the number of parameters to be estimated greatly exceeds 27 Table 5: A comparison of propor PSD (averaged over a grid of tuning parameters and 200 replicates). 2-d lattice (20 by 20), b = 4 2-d lattice (20 by 20) w/ var-bw Scale free (p = 400), b = 4 Scale free (p = 400) w/ var-bw GGB 1.000 1.000 1.000 1.000 - global (0.000) (0.000) (0.000) (0.000) GGB 1.000 1.000 1.000 1.000 - local (0.000) (0.000) (0.000) (0.000) 1.0 0.4 0.6 0.8 0.6 0.8 0.2 0.2 0.0 0.0 0.0 0.4 Specificity 0.8 0.6 0.4 GGB − global bandwidth GGB − local bandwidth Soft thresholding 0.2 Specificity TSP + hierband 1.000 (0.000) 1.000 (0.000) 1.000 (0.000) 1.000 (0.000) 2−d lattice (20 by 20) 1.0 2−d lattice (50 by 50) Soft thresholding 0.349 (0.008) 0.625 (0.008) 0.998 (0.001) 1.000 (0.000) 1.0 0.0 Sensitivity 0.2 0.4 0.6 0.8 1.0 Sensitivity Figure 9: ROC curves for three methods when p = 400 and p = 2, 500. the number of samples. Nonetheless, we can ask what happens if p is even larger than this. We revisit the example of the 2-d lattice, increasing the side length from 20 to 50 so that p = 2, 500. In this case the covariance matrix has p(p + 1)/2 ≈ 3, 000, 000 parameters. We focus in particular on the GGB methods and soft thresholding. Figure 9 provides a side-by-side comparison of the ROC curves (five replicates are shown per method) when one increases from p = 400 to p = 2, 500. The curves in the two plots are different although this is difficult to discern by eye. This suggests that we are effectively in the same regime in these two simulated scenarios. References Applegate, D., Bixby, R., Chvatal, V. & Cook, W. (2017), Concorde TSP Solver. URL: http://www.math.uwaterloo.ca/tsp/concorde/ Backstrom, L., Boldi, P., Rosa, M., Ugander, J. & Vigna, S. (2011), ‘Four degrees of separation. doi: arxiv1111. 4570v1’. Banerjee, O., El Ghaoui, L. E. & d’Aspremont, A. (2008), ‘Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data’, Journal of Machine Learning Research 9, 485–516. Bickel, P. J. & Levina, E. (2008a), ‘Regularized estimation of large covariance matrices’, Annals of Statistics pp. 199–227. 28 Bickel, P. & Levina, E. (2008b), ‘Covariance regularization by thresholding’, Annals of Statistics 36, 2577–2604. Bickel, P. & Lindner, M. (2012), ‘Approximating the inverse of banded matrices by banded matrices with applications to probability and statistics’, Theory of Probability & Its Applications 56(1), 1– 20. Bien, J. (2016a), simulator: An Engine for Running Simulations. R package version 0.2.0. URL: https://CRAN.R-project.org/package=simulator Bien, J. (2016b), ‘The simulator: arXiv:1607.00021 . An engine to streamline simulations’, arXiv preprint Bien, J., Bunea, F. & Xiao, L. (2015a), ‘Convex banding of the covariance matrix’, Journal of the American Statistical Association DOI: 10.1080/01621459.2015.1058265 . Bien, J., Bunea, F. & Xiao, L. (2015b), hierband: Convex Banding of the Covariance Matrix. R package version 1.0. URL: https://CRAN.R-project.org/package=hierband Bien, J., Bunea, F. & Xiao, L. (2015c), ‘Supplementary materials to “convex banding of the covariance matrix”’, Journal of the American Statistical Association . Bien, J. & Tibshirani, R. (2011), ‘Sparse estimation of a covariance matrix’, Biometrika 98(4), 807– 820. Cai, T., Liu, W. & Luo, X. (2011), ‘A constrained l1 minimization approach to sparse precision matrix estimation’, Journal of the American Statistical Association 106(494), 594–607. Cai, T. T. & Yuan, M. (2012), ‘Adaptive covariance matrix estimation through block thresholding’, The Annals of Statistics 40(4), 2014–2042. Cai, T. T. & Yuan, M. (2015), ‘Minimax and adaptive estimation of covariance operator for random variables observed on a lattice graph’, Accepted to Journal of the American Statistical Association . Cai, T. T., Zhang, C.-H. & Zhou, H. H. (2010), ‘Optimal rates of convergence for covariance matrix estimation’, The Annals of Statistics 38(4), 2118–2144. Chandrasekaran, V., Parrilo, P. A. & Willsky, A. S. (2010), Latent variable graphical model selection via convex optimization, in ‘Communication, Control, and Computing (Allerton), 2010 48th Annual Allerton Conference on’, IEEE, pp. 1610–1613. Csardi, G. & Nepusz, T. (2006), ‘The igraph software package for complex network research’, InterJournal Complex Systems, 1695. URL: http://igraph.org Das, J. & Yu, H. (2012), ‘Hint: High-quality protein interactomes and their applications in understanding human disease’, BMC systems biology 6(1), 92. Dempster, A. P. (1972), ‘Covariance selection’, Biometrics 28(1), 157–175. 29 Deng, X. & Yuan, M. (2009), ‘Large gaussian covariance matrix estimation with markov structures’, Journal of Computational and Graphical Statistics 18(3). Donoho, D. L., Gavish, M. & Johnstone, I. M. (2013), ‘Optimal shrinkage of eigenvalues in the spiked covariance model’, arXiv preprint arXiv:1311.0851 . Fan, J., Fan, Y. & Lv, J. (2008), ‘High dimensional covariance matrix estimation using a factor model’, Journal of Econometrics 147(1), 186–197. Fan, J., Liao, Y. & Mincheva, M. (2013), ‘Large covariance estimation by thresholding principal orthogonal complements’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 75(4), 603–680. Friedman, J., Hastie, T. & Tibshirani, R. (2008), ‘Sparse inverse covariance estimation with the graphical lasso’, Biostatistics 9, 432–441. Hahsler, M. & Hornik, K. (2017), TSP: Traveling Salesperson Problem (TSP). R package version 1.1-5. URL: https://CRAN.R-project.org/package=TSP Hastie, T., Tibshirani, R. & Friedman, J. (2009), The Elements of Statistical Learning; Data Mining, Inference and Prediction, Second Edition, Springer Verlag, New York. Huang, J., Liu, N., Pourahmadi, M. & Liu, L. (2006), ‘Covariance matrix selection and estimation via penalised normal likelihood’, Biometrika 93(1), 85. Jacob, L., Obozinski, G. & Vert, J.-P. (2009), Group lasso with overlap and graph lasso, in ‘Proceedings of the 26th annual international conference on machine learning’, ACM, pp. 433–440. Johnstone, I. M. (2001), ‘On the distribution of the largest eigenvalue in principal components analysis’, Annals of statistics pp. 295–327. Khare, K., Oh, S.-Y. & Rajaratnam, B. (2014), ‘A convex pseudolikelihood framework for high dimensional partial correlation estimation with convergence guarantees’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) . Lam, C. & Fan, J. (2009), ‘Sparsistency and rates of convergence in large covariance matrix estimation’, Annals of Statistics 37(6B), 4254–4278. Le Cun, B. B., Denker, J. S., Henderson, D., Howard, R. E., Hubbard, W. & Jackel, L. D. (1990), Handwritten digit recognition with a back-propagation network, in ‘Advances in neural information processing systems’, Citeseer. Ledoit, O. & Wolf, M. (2004), ‘A well-conditioned estimator for large-dimensional covariance matrices’, Journal of multivariate analysis 88(2), 365–411. Levina, E., Rothman, A. & Zhu, J. (2008), ‘Sparse estimation of large covariance matrices via a nested lasso penalty’, The Annals of Applied Statistics pp. 245–263. Liu, H., Wang, L. & Zhao, T. (2013), ‘Sparse covariance matrix estimation with eigenvalue constraints’, Journal of Computational and Graphical Statistics . 30 Liu, H., Wang, L. et al. (2017), ‘Tiger: A tuning-insensitive approach for optimally estimating gaussian graphical models’, Electronic Journal of Statistics 11(1), 241–294. Luo, X. (2011), ‘Recovering model structures from large low rank and sparse covariance matrix estimation’, arXiv preprint arXiv:1111.1133 . Meinshausen, N. & Bühlmann, P. (2006), ‘High dimensional graphs and variable selection with the lasso’, Annals of Statistics 34, 1436–1462. Obozinski, G., Jacob, L. & Vert, J. (2011), ‘Group lasso with overlaps: The latent group lasso approach’, arXiv preprint arXiv:1110.0413 . Parikh, N. & Boyd, S. P. (2014), ‘Proximal algorithms.’, Foundations and Trends in optimization 1(3), 127–239. Peng, J., Wang, P., Zhou, N. & Zhu, J. (2009), ‘Partial correlation estimation by joint sparse regression models’, Journal of the American Statistical Association 104(486). R Core Team (2017), R: A Language and Environment for Statistical Computing, R Foundation for Statistical Computing, Vienna, Austria. URL: https://www.R-project.org/ Rothman, A. (2012), ‘Positive definite estimators of large covariance matrices’, Biometrika 99(3), 733–740. Rothman, A. J., Levina, E. & Zhu, J. (2009), ‘Generalized thresholding of large covariance matrices’, Journal of the American Statistical Association 104(485), 177–186. Rothman, A., Levina, E. & Zhu, J. (2008), ‘Sparse permutation invariant covariance estimation’, Electronic Journal of Statistics 2, 494–515. Rothman, A., Levina, E. & Zhu, J. (2010), ‘A new approach to Cholesky-based covariance regularization in high dimensions’, Biometrika 97(3), 539. Sun, Q., Tan, K. M., Liu, H. & Zhang, T. (2017), ‘Graphical nonconvex optimization for optimal estimation in gaussian graphical models’, arXiv preprint arXiv:1706.01158 . Tibshirani, R. (1996), ‘Regression shrinkage and selection via the lasso’, J. Royal. Stat. Soc. B. 58, 267–288. Travers, J. & Milgram, S. (1969), ‘An experimental study of the small world problem’, Sociometry pp. 425–443. Tseng, P. (2001), ‘Convergence of a block coordinate descent method for nondifferentiable minimization’, Journal of optimization theory and applications 109(3), 475–494. Wagaman, A. & Levina, E. (2009), ‘Discovering sparse covariance structures with the isomap’, Journal of Computational and Graphical Statistics 18(3), 551–572. Watts, D. J. & Strogatz, S. H. (1998), ‘Collective dynamics of ‘small-world’ networks’, Nature 393(6684), 440–442. 31 Wickham, H. (2009), ggplot2: elegant graphics for data analysis, Springer New York. URL: http://had.co.nz/ggplot2/book Won, J.-H., Lim, J., Kim, S.-J. & Rajaratnam, B. (2013), ‘Condition-number-regularized covariance estimation’, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 75(3), 427–450. Wu, W. B. & Pourahmadi, M. (2003), ‘Nonparametric estimation of large covariance matrices of longitudinal data’, Biometrika 90(4), 831–844. Wu, W. B. & Pourahmadi, M. (2009), ‘Banding sample autocovariance matrices of stationary processes’, Statistica Sinica 19(4), 1755. Xue, L., Ma, S. & Zou, H. (2012), ‘Positive-definite l1-penalized estimation of large covariance matrices’, Journal of the American Statistical Association 107(500), 1480–1491. Yan, X. & Bien, J. (2017), ‘Hierarchical sparse modeling: A choice of two group lasso formulations’, Statistical Science 32(4), 531–560. Yu, G. & Bien, J. (2017), ‘Learning local dependence in ordered data’, Journal of Machine Learning Research 18(42), 1–60. Yuan, M. (2010), ‘High dimensional inverse covariance matrix estimation via linear programming’, The Journal of Machine Learning Research 11, 2261–2286. Yuan, M. & Lin, Y. (2006), ‘Model selection and estimation in regression with grouped variables’, Journal of the Royal Statistical Society, Series B 68, 49–67. Yuan, M. & Lin, Y. (2007), ‘Model selection and estimation in the Gaussian graphical model’, Biometrika 94(1), 19–35. Zhu, Z. & Liu, Y. (2009), ‘Estimating spatial covariance using penalised likelihood with weighted l1 penalty’, Journal of Nonparametric Statistics 21(7), 925–942. 32
10math.ST
Exploiting ConvNet Diversity for Flooding Identification Keiller Nogueira1 , Samuel G. Fadel2 , Ícaro C. Dourado2 , Rafael de O. Werneck2 , Javier A. V. Muñoz2 , Otávio A. B. Penatti3 , Rodrigo T. Calumby4 , Lin Tzy Li2,3 , Jefersson A. dos Santos1 , Ricardo da S. Torres2 arXiv:1711.03564v1 [cs.CV] 9 Nov 2017 1 Departamento de Ciência da Computação, Universidade Federal de Minas Gerais (UFMG) {keiller.nogueira,jefersson}@dcc.ufmg.br 2 Institute of Computing, University of Campinas (Unicamp) {samuel.fadel,icaro.dourado,rafael.werneck,lintzyli,rtorres}@ic.unicamp.br 3 Advanced Technologies Group, SAMSUNG Research Institute [email protected] 4 Department of Exact Sciences, University of Feira de Santana (UEFS) [email protected] November 13, 2017 Abstract Flooding is the world’s most costly type of natural disaster in terms of both economic losses and human causalities. A first and essential procedure towards flood monitoring is based on identifying the area most vulnerable to flooding, which gives authorities relevant regions to focus. In this work, we propose several methods to perform flooding identification in high-resolution remote sensing images using deep learning. Specifically, some proposed techniques are based upon unique networks, such as dilated and deconvolutional ones, while other was conceived to exploit diversity of distinct networks in order to extract the maximum performance of each classifier. Evaluation of the proposed algorithms were conducted in a high-resolution remote sensing dataset. Results show that the proposed algorithms outperformed several state-of-the-art baselines, providing improvements ranging from 1 to 4% in terms of the Jaccard Index. Keywords: Flooding identification, Natural disaster, Remote Sensing, Inundation, MediaEval, Satellites. 1 Introduction Natural disaster monitoring is a fundamental task to create prevention strategies, as well as to help authorities to act in the control of damages, coordinate rescues, and help victims. Among all kinds of natural hazards, flooding is possibly the most extensive and devastating one, destroying buildings, roads, bridges; tearing out trees; devastating agriculture; causing mudslides; and threatening human lives [1]. All these consequences make such events to be considered as the world’s most costly type of natural disaster in terms of both economic losses and human causalities as pointed out by the disaster statistical review released every year by the Centre for Research on the Epidemiology of Disasters [2]. Some of these disasters happen annually [3], for example in humid tropics and subtropical climates, where river flooding is a recurrent natural phenomenon due to excessive rain within a short period of time. However, other events may occur atypically [4], which is the case of flooding caused by hurricanes, such as the recent triple hurricanes (e.g., Harvey, Maria, and Irma) that brought massive flooding in several countries [5]. Although extremely important, floods are difficult to monitor, because they are highly dependent on several local conditions, such as precipitation, slope of terrain, drainage network, protective structures, and land cover [6]. A first and essential step towards such monitoring is based on identifying 1 areas most vulnerable to flooding, helping authorities to focus on such regions while monitoring inundations. Remotely sensed data play a crucial role in identifying such areas, since it allows the capture of whole inundated regions during a flooding event, allowing a better understanding of what and how it is flooded. Although there are lots of works [7,8] performing flooding detection using remote sensing data integrated with elevation maps in order to augment the amount and type of information available for an efficient flood management, as far as we know, there are no works that focus on identifying flooding areas using only remote sensing data. Because of the importance of such task and the lack of works dealing with it, a subtask (called Flood-Detection in Satellite Images) of the 2017 Multimedia Satellite Task [9], which was part of the traditional MediaEval Benchmark, was proposed to leverage the development of methods for identifying flooding events in high-resolution remote sensing images. In this paper, we present our proposed methods, which won the aforementioned task, to automatic identify flooding areas in high-resolution remote sensing images using deep learning paradigm. Deep learning [10], commonly represented as multi-layered neural networks, can learn simultaneously the features and the classifiers. In other words, during the training process, a deep neural network is able to learn both the features and the classifier in a unified manner, adjusting itself to better represent the characteristics of the data and their labels. Among all deep learning-based networks, a specific type, called Convolutional (Neural) Networks, ConvNets or CNNs [10], is the most popular for learning visual features in computer vision applications, including remote sensing [11,12]. This type of network relies on the natural stationary property of an image, i.e., the statistics of one part of the image are assumed to be the same as those of any other part. Furthermore, deep ConvNets can be considered as an inherently multiscale approach since they usually obtain different levels of abstraction for the data, ranging from local low-level information in the initial layers (e.g., corners and edges), to more semantic descriptors, mid-level information (e.g., object parts) in intermediate layers, and high-level information (e.g., whole objects) in the final layers. We introduce several approaches to identify flooding areas of remote sensing images exploiting the advantages of ConvNets. Some methods are based uniquely on networks with distinct properties, including: (i) dilated convolutions [13], which, unlike standard ConvNets, process the input without downsampling it, and (ii) deconvolution layers, such as SegNet [14], in which a coarse feature map is upsampled outputting a dense map with the same resolution of the original image. Another approach exploits the diversity of distinct networks in order to extract the maximum performance of each classifier. In summary, the contributions of the paper are: (i) novel ConvNet architectures specialized in identifying flooding areas; and (ii) a new strategy to exploit network diversity for inundation identification. Obtained results of the proposed methods represent the state of the art, in terms of the Jaccard Index, in a remote-sensing-based flooding detection task. These results made us the winner of the Flood-Detection in Satellite Images, a subtask of 2017 Multimedia Satellite Task [9]. 2 Proposed Methods In this section, we present the proposed techniques to perform flooding identification. The first approaches (Section 2.1) are based upon new and specific architectures to handle such important task. The other method (Section 2.2) was conceived to better combine the diversity of distinct, but complementary networks. 2.1 Network Architectures All networks conceived specifically for flooding identification are based on ConvNets and have architectures illustrated in Figure 1. Some use dilated convolutions while others are based on deconvolutional networks. Specifically, two architectures are based on the concept of dilated convolutions [13]. In these layers, the convolution filter is expanded by dilation rate. Given this rate, the weights are placed far away at given intervals and the kernel size increases by allowing gaps (or “holes”) inside their filters. Therefore, networks composed of these layers allow the receptive field to expand but preserving the resolution, i.e., without downsampling the input data. This procedure represents a great advantage in terms 2 of computational processing, as well as in terms of learning, since internal feature maps do not lose resolution (and maybe useful information). The first architecture, presented in Figure 1a, is composed of seven layers: six dilated convolutions (that are responsible for learning the patterns of the input images) and a final 1 × 1 convolution layer, which is responsible for identifying the flooding areas. There are no pooling or normalization operations inside this network. Specifically, the first two convolutions have 5 × 5 filters with dilation rate 1. The following two convolutions have 4 × 4 filters and rate 2 while the last two convolutions have smaller filters (3 × 3) with 4 dilation rate. The second proposed network, presented in Figure 1b, is also based on dilated convolution layers. This network shares the same architecture of the first one, except for the fact that there are additional max-pooling layers between each dilated convolutions layer. Each pooling has 3 × 3 kernel and stride of 1. Although pooling usually reduces the resolution of the input data, in this case, it also preserves the resolution because of zero padding used in the input. The core idea of this network is to conserve the benefits of dilated convolutional layers but adding known advantages of pooling layers, such as invariance to small rotations and translations, as well as the preservation of the most important features. inputDimage overlapping patches DilatedDConvolutionD1 DilatedDConvolutionD2 KernelD=D5x5 ReLUs =D64 Dilatation RateD=D1 Kernel =D5x5 ReLUsD=D64 Dilatation RateD=D1 Kernel =D4x4 ReLUsD=D128 Dilatation RateD=D2 2Dclasses: flooding non-flooding KernelD=D3x3 ReLUsD=D256 Dilatation RateD=D4 KernelD=D3x3 ReLUs =D256 Dilatation Rate =D4 Kernel =D4x4 ReLUs =D128 Dilatation Rate =D2 ClassificationDLayer DilatedDConvolutionD6 ... DilatedDConvolutionD5 DilatedDConvolutionD3 DilatedDConvolutionD4 predictedDimage (a) Dilated ConvNet #1 inputDimage overlapping patches ... Dilated ConvolutionD1 KernelD=D5x5 ReLUs =D64 Dilatation RateD=D1 2Dclasses: flooding non-flooding KernelD=D3x3 StrideD=D1x1 Classification Layer Max-PoolingD6 Max-PoolingD1 KernelD=D3x3 StrideD=D1x1 KernelD=D3x3 ReLUs =D256 Dilatation Rate =D4 Dilated ConvolutionD6 Dilated ConvolutionD2 KernelD=D5x5 ReLUs =D64 Dilatation RateD=D1 KernelD=D3x3 StrideD=D1x1 Max-PoolingD5 Max-PoolingD2 KernelD=D3x3 StrideD=D1x1 KernelD=D3x3 ReLUs =D256 Dilatation Rate =D4 Dilated ConvolutionD5 Dilated ConvolutionD3 Kernel =D4x4 ReLUsD=D128 Dilatation RateD=D2 KernelD=D3x3 StrideD=D1x1 Max-PoolingD4 Max-PoolingD3 KernelD=D3x3 StrideD=D1x1 Kernel =D4x4 ReLUsD=D128 Dilatation RateD=D2 Dilated ConvolutionD4 predictedDimage (b) Dilated ConvNet #2 inputyimage overlapping patches Convolutiony1 Max-Poolingy1 Convolutiony2 Max-Poolingy2 Convolutiony3 Max-Poolingy3 ... Kernely=y5x5 ReLUs =y64 Kernely=y2x2 Stridey=y2x2 Kernely=y3x3 ReLUs =y128 Kernely=y2x2 Stridey=y2x2 Kernely=y3x3 ReLUs =y256 Kernely=y2x2 Stridey=y2x2 2yclasses: flooding non-flooding Kernely=y5x5 ReLUs =y64 Kernely=y2x2 ReLUsy=y64 Stridey=y2x2 Kernely=y3x3 ReLUs =y64 Kernely=y2x2 ReLUsy=y64 Stridey=y2x2 Kernely=y3x3 ReLUs =y128 Kernely=y2x2 ReLUsy=y128 Stridey=y2x2 Classification Layer Convolutiony6 Deconvolutiony3 Convolutiony5 Deconvolutiony2 Convolutiony4 Deconvolutiony1 predictedyimage (c) Deconvolution ConvNet #1 inputMimage overlapping patches ConvolutionM1 Max-PoolingM1 ConvolutionM2 Max-PoolingM2 ConvolutionM3 Max-PoolingM3 ... KernelM=M4x4 ReLUs =M64 KernelM=M2x2 StrideM=M2x2 KernelM=M4x4 ReLUs =M128 KernelM=M2x2 StrideM=M2x2 KernelM=M3x3 ReLUs =M256 KernelM=M2x2 StrideM=M2x2 2Mclasses: flooding non-flooding KernelM=M3x3 ReLUs =M64 KernelM=M3x3 ReLUsM=M64 StrideM=M2x2 KernelM=M4x4 ReLUs =M128 KernelM=M3x3 ReLUsM=M128 StrideM=M2x2 KernelM=M3x3 ReLUs =M128 KernelM=M3x3 ReLUsM=M256 StrideM=M1x1 Classification Layer ConvolutionM6 DeconvolutionM3 ConvolutionM5 DeconvolutionM2 ConvolutionM4 DeconvolutionM1 predictedMimage (d) Deconvolution ConvNet #2 Figure 1: ConvNet architectures proposed in this work. The two remaining networks are based on deconvolutional networks [14]. This type of network has two modules: the first receives input images, learns the visual features by using standard convolution and pooling layers, and outputs a coarse feature map while the second receives this map as input, 3 learns to upsample these features by using several deconvolution layers, and outputs a dense prediction map with the same resolution of the original image. Both modules work together without distinction and can be trained end-to-end by using standard feedforward and backpropagation algorithms. The two architectures, presented in Figures 1c and 1d, are based on the solution discussed in [14]. The encoder of both is based on three standard convolution layers intercalated with max-pooling operations. The only difference is the kernel of the convolutions, i.e., while the first layer uses a larger kernel in the first layer (in order to learn more information about flooding regions directly from the input image), the other one bets on similar filter sizes, which should extract the same amount of information in all layers resulting in a balanced learning of the flooding patterns. The deconvolutional part has similar architecture with the same number of layers (three deconvolutional ones intercalated with standard convolutions) differing only in the size of deconvolutional and convolutional kernels. The premise was conserved, i.e., while the first deconvolutional network bets on larger kernel, the second tries to use similar filter sizes. 2.2 Combination As previously explained, we also proposed another strategy to solve the flooding detection task, which aims to exploit the diversity of distinct ConvNets. The main premise of the proposed method is that the previous presented ConvNets learn and produce distinct outcomes, which are dense prediction maps. This difference should make ConvNets complementary to each other. Therefore, a clever combination of such outcomes should improve the final prediction map if compared with the ConvNets individual results.We propose a combination method based upon Support Vector Machines (SVM). DistinctFConvNets TrainedFwithFDifferentFData TestFImage DilatedNetF#1 ConcatenatedFPredictions FinalFPrediction DilatedNetF#2 ... LinearFSVM DeconvNetF#1 DeconvNetF#2 Figure 2: Pipeline for the prediction phase of the proposed combination approach. The proposed method is divided into three main steps: (i) extraction: In this phase, an image is processed by all proposed network, which produce distinct outcomes (i.e., different probability or prediction maps). All these maps (that have the same resolution of the original input image) are then concatenated creating a feature vector that, in fact, represents the input image. (ii) learning: In this step, the SVM receives the aforementioned feature vector as well as the ground-truth flooding map for all training data. Then, it independently process each pixel of these images, learning which and when each classifier is better; and (iii) prediction: This final step receives feature vectors of testing images and, using the trained SVM, outputs the improved prediction map for each test image. This final step is illustrated in Figure 2. 3 Experiments In this section, we present the experimental setup. Also, we present and discuss the obtained results of the proposed methods comparing them with the best performing teams of the Flood-Detection in Satellite Images subtask of the 2017 Multimedia Satellite Task. 4 3.1 Dataset (a) Location 1 (b) Location 2 (c) Location 3 (d) Location 4 (e) Location 5 (f) Location 6 Figure 3: Examples of patches for all locations of the training set with its respective ground-truth, in which white regions refer to flooded area and black ones correspond to background. The dataset consists of satellite image patches collected from eight different flooding events June 1st, 2016 to May 1st, 2017. Each image patch is composed of four bands (red, green, blue, and near infrared bands) and has resolution of 320 × 320 pixels, with a ground-sample distance (GSD) of 3.7 meters and an orthorectified pixel size of 3 meters [9]. The training set is composed of 462 image patches unevenly extracted from six locations. Among these images, 92 (20%) were employed as internal validation set to evaluate the proposed algorithms while the remaining 370 images were used to train the proposed methods. Some examples of image patches for each of these locations are presented in Figure 3. Two test sets were released in this dataset: the Same Locations test set contains 216 unseen patches unevenly extracted from the same region presented in the training set, while the New Locations test set contains 58 unseen patches extracted from a region not present in the training set. Figure 4 presents some examples of both test sets. It is important to highlight that, until the submission of this current paper, ground-truth of the test sets were not released by the organization of the competition. 5 (a) Location 1 (b) Location 2 (e) Location 5 (c) Location 3 (f) Location 6 (d) Location 4 (g) New Location Figure 4: Examples of patches for both test sets. 3.2 Experimental Evaluation In order to assess the performance of generated segmentation masks for flooded areas in the satellite image patches, the intersection-over-union metric (also known as Jaccard Index), was used. The metric measures the accuracy for the pixelwise classification, and as defined as IoU = (T P +FT PP +F N ) , where T P , F P , and F N are the numbers of true positive, false positive, and false negative pixels, respectively, determined over the whole test set. 3.3 Experimental Protocol First, we trained all ConvNets (presented in Section 2.1) using overlapping patches of size 25 × 25 extracted from all training images (independent of the location). In the prediction phase, we also extracted overlapping patches with the same resolution from the testing images and averaged the probabilities outputted by the network. Among all networks, the best one (in our internal validation set) is reported as ConvNet 25 × 25. Another proposed method relied on training the aforementioned ConvNets using larger overlapping patches, with 50 × 50 pixels, also extracted from all training images. The motivation behind this strategy is based on the entire context that could be extract from the input patches and improve the learning process. The prediction phase is similar to the previous strategy. Considering this configuration, the best network (in our internal validation set) is referred to in the next section as ConvNet 50 × 50. The Location ConvNets strategy is based on the idea of creating specialized ConvNets for each flooding event. Since the dataset has six distinct flooding event locations, we propose to train a specific Dilated ConvNet #1 (using patches of 25 × 25) for each location. The prediction is similar to the other proposed protocols, except for the fact that, in this case, each ConvNet was used in its respective location. For the New Locations test set, we combined the outcomes extracted from each ConvNet (trained specifically for each location) using a linear SVM, as proposed in Section 2.2. The Fusion-SVM strategy expands above idea. Differently from previous scheme, in this procedure, an SVM is used to create prediction maps for both test sets (and not only for the New Locations test set). Based on the premise that distinct ConvNets (trained using different input data) produce distinct (and possible complementary) outcomes, we propose to combine the predictions extracted from all above ConvNets using a linear SVM, as presented in Section 2.2. In this way, the SVM should be able to learn when and how these networks complement each other in order to improve 6 the final performance. Specifically, the SVM receives as input concatenated probabilities extracted from all previously trained ConvNets, which include: (i) all four ConvNets presented in Section 2.1 trained with overlapping 25 × 25 patches, (ii) all four networks introduced in Section 2.1 trained with overlapping 50 × 50 patches, and (iii) six Dilated ConvNet #1 trained specifically for each location of the training set. Another strategy relied on exploiting the diversity of distinct ConvNets by combining all outcomes of previous methods using a majority voting scheme, which is referred to in following section as Fusion-MV. It is important to emphasize that all proposed methods were created using TensorFlow framework and will have code released upon the acceptance of this paper. When training, all the aforementioned protocol used the same hyper-parameters, i.e., learning rate, weight decay, momentum and number of epochs as 0.01, 0.0005, 0.9 and 20, respectively. 3.4 Baselines The baselines evaluated in this work were, in fact, the best performing approaches proposed for the Flood-Detection in Satellite Images subtask of the 2017 Multimedia Satellite Task. An overview of the such methods (which includes state-of-the-art methods, such as Generative Adversarial, Deconvolutional and Fully Convolutional Networks) are presented in Table 1. 3.5 Results and Discussion All results for the test sets are presented in Table 1. These are the official results released by the Mediaeval since no ground-truth for the test set was released yet. Also, it is worth mentioning that, for the two strategies of learning ConvNets using all available training data (but with distinct patch size), the Dilated ConvNet #1 yielded the best results among all experimented networks. Therefore, these were the ones submitted to the competition as well as reported in this work as ConvNet 25 × 25 and ConvNet 50 × 50. For both test sets, the best solution was obtained by combining the probabilities of all trained ConvNets using a Linear SVM. This technique yielded state-of-the-art results in both test set, outperforming all baselines by, at least, 4% in the Same Locations test set and 1% in the New Locations test set (in terms of Jaccard Index). Some samples of this obtained results are presented in Figure 5. For the Same Locations test set, training a network for each location (Location ConvNets) or training a ConvNet with all available data (ConvNet 25 × 25) achieved the same result. This may indicate that the proposed architecture can, in fact, extract and interpret all feasible information from the whole data, which is a great advantage given that it reduces the number of networks to train and, consequently, the processing time. This conclusion does not hold for the New Locations test set. In this set, training a specific network for each location (Location ConvNets) achieved higher performance (aside the Fusion-SVM strategy) when compared to unique networks trained with the whole training set (such as ConvNet 25 × 25 and ConvNet 50 × 50). This indicates that specific Location Network can learn details that may not be useful for classification of a known image, but that is important for unseen data, which is the case. Another relevant outcome is that increasing the size of the input patch (ConvNet 50×50) decreases the final result, a conclusion that holds for both datasets. We believe that this is because of the amount of training patches generated in each case. More specifically, a large amount of data may be used for training with smaller patch sizes while large patches means less data to train. This corroborates with the fact that deep learning really needs a large amount of labeled data to train [10]. Finally, for both sets, the worst result was obtained using the majority voting scheme. This may be justified by the fact that Majority Voting is not so robust to aggregate information from multiple networks, when they disagree in the classification. This fact can be overcome by using a machine learning technique to capture about the opinions of the ConvNets. 7 Table 1: IoU (%) results of the proposed method and baselines for both test sets. Higher values of IoU indicates better performance. Methods Test Set Overview Same Locations WISC [15] NDVI plus SVM-RBF K-Means to cluster and classify 80 81 83 77 CERTH-ITI [16] Mahalanobis dist. with stratified cov. 75 56 BMC [17] ResNet-152 and random forest 37 40 UTAOS [18] Gen. Gen. Gen. Gen. Gen. 82 80 83 83 81 73 70 74 74 73 DFKI [19] VGG13-FCN with RGB data VGG13-FCN with RGB and NIR data VGG13 adapted to be a DeconvNet 73 84 84 69 70 74 Dilated 25 × 25 Dilated 50 × 50 Location ConvNets Fusion-SVM Fusion-MV Dilated ConvNet #1 (25 × 25 patches) Dilated ConvNet #1 (50 × 50 patches) Dilated ConvNet #1 trained per location SVM over concatenated predictions MV over concatenated predictions 87 86 87 88 78 82 80 84 84 49 Baselines Proposed 4 New Locations Adv. Adv. Adv. Adv. Adv. Net. Net. Net. Net. Net. with with with with with 0.78 0.94 0.50 0.35 0.12 threshold threshold threshold threshold threshold Conclusion In this paper, we propose new approaches based on Convolutional Neural Networks to perform detection of flooding areas in remote sensing images. Specifically, we proposed four distinct architectures based on dilated convolutions [13] and deconvolution layers [14]. Furthermore, different strategies to combine such networks were proposed and evaluated. Experimental results have showed that the methods are effective and robust. We have achieved state-of-the-art performance, in terms of Jaccard Index, in a specific dataset proposed for the FloodDetection in Satellite Images subtask of the 2017 Multimedia Satellite Task. The proposed methods outperformed all baselines, winning that subtask challenge. Such results show that our proposed approaches are effective and robust to identify flooding areas (independent if it is for a recurrent or atypical event). This identification process performed by our proposed algorithms may help authorities to keep focus on most vulnerable regions while monitoring forecast inundations, which may aid in coordinate rescues, and help victims. As future work, we intend to use different post-processing methods, such as Conditional Random Fields, in order to exploit the contextual information. Acknowledgments The authors thank FAPESP (grants #2013/50169-1, #2013/50155-0, #2014/50715-9, #2014/122361, and #2016/18429-1), FAPEMIG, CNPq, and CAPES. References [1] NOAA/NWS (National Weather Service), Floods: The awesome power (2005). [2] CRED, Centre for research on the epidemiology of disasters (cred) (2017). URL http://www.emdat.be/ 8 [3] T. De Groeve, Flood monitoring and mapping using passive microwave remote sensing in namibia, Geomatics, Natural Hazards and Risk 1 (1) (2010) 19–35. [4] B. P. Harman, S. Heyenga, B. M. Taylor, C. S. Fletcher, Global lessons for adapting coastal communities to protect against storm surge inundation, Journal of Coastal Research 31 (4) (2013) 790–801. [5] C. Eric Levenson, 3 storms, 3 responses: Comparing harvey, irma and maria (2017). URL http://edition.cnn.com/2017/09/26/us/response-harvey-irma-maria/index.html [6] V. Klemas, Remote sensing of floods and flood-prone areas: an overview, Journal of Coastal Research 31 (4) (2014) 1005–1013. [7] L. Pulvirenti, N. Pierdicca, G. Boni, M. Fiorini, R. Rudari, Flood damage assessment through multitemporal cosmo-skymed data and hydrodynamic models: The albania 2010 case study, JSTARS 7 (7) (2014) 2848–2855. [8] A. D’Addabbo, A. Refice, G. Pasquariello, F. P. Lovergine, D. Capolongo, S. Manfreda, A bayesian network for flood detection combining sar imagery and ancillary data, TGRS 54 (6) (2016) 3612–3625. [9] B. Bischke, P. Helber, C. Schulze, S. Venkat, A. Dengel, D. Borth, The multimedia satellite task at mediaeval 2017: Emergence response for flooding events, in: Proc. of the MediaEval 2017 Workshop, Dublin, Ireland. [10] I. Goodfellow, Y. Bengio, A. Courville, Deep Learning, MIT Press, 2016. [11] K. Nogueira, W. O. Miranda, J. A. Dos Santos, Improving spatial feature representation from aerial scenes by using convolutional networks, in: Conference on Graphics, Patterns and Images (SIBGRAPI), IEEE, 2015, pp. 289–296. [12] K. Nogueira, O. A. Penatti, J. A. dos Santos, Towards better exploiting convolutional neural networks for remote sensing scene classification, Pattern Recognition 61 (2017) 539–556. [13] F. Yu, V. Koltun, Multi-scale context aggregation by dilated convolutions, in: ICLR, 2016. [14] V. Badrinarayanan, A. Kendall, R. Cipolla, Segnet: A deep convolutional encoder-decoder architecture for image segmentation, arXiv preprint arXiv:1511.00561. [15] N. Tkachenko, A. Zubiaga, R. Procter, Wisc at mediaeval 2017: Multimedia satellite task, in: Working Notes Proc. MediaEval Workshop, 2017, p. 2. URL http://slim-sig.irisa.fr/me17/Mediaeval_2017_paper_12.pdf [16] K. Avgerinakis, A. Moumtzidou, S. Andreadis, E. Michail, I. Gialampoukidis, S. Vrochidis, I. Kompatsiaris, Visual and textual analysis of social media and satellite images for flood detection @ multimedia satellite task mediaeval 2017, in: Working Notes Proc. MediaEval Workshop, 2017, p. 2. URL http://slim-sig.irisa.fr/me17/Mediaeval_2017_paper_31.pdf [17] X. Fu, Y. Bin, L. Peng, J. Z. Y. Yang, H. T. Shen, Bmc@mediaeval 2017 multimedia satellite task via regression random forest, in: Working Notes Proc. MediaEval Workshop, 2017, p. 2. URL http://slim-sig.irisa.fr/me17/Mediaeval_2017_paper_46.pdf [18] K. Ahmad, P. Konstantin, M. Riegler, N. Conci, P. Holversen, Cnn and gan based satellite and social media data fusion for disaster detection, in: Working Notes Proc. MediaEval Workshop, 2017, p. 2. URL http://slim-sig.irisa.fr/me17/Mediaeval_2017_paper_15.pdf 9 [19] B. Bischke, P. Bhardwaj, A. Gautam, P. Helber, D. Borth, A. Dengel, Detection of flooding events in social multimedia and satellite imagery using deep neural networks, in: Working Notes Proc. MediaEval Workshop, 2017, p. 2. URL http://slim-sig.irisa.fr/me17/Mediaeval_2017_paper_51.pdf 10 (a) Location 1 (b) Location 2 (c) Location 3 (d) Location 4 (e) Location 5 (f) Location 6 (g) New Location Figure 5: Examples of some test images and the obtained results achieved by using SVM with the aggregated probabilities. White areas refer to flooded regions and black areas correspond to background. 11
1cs.CV
1 Z2Z4-Additive Cyclic Codes: Kernel and Rank Joaquim Borges Steven T. Dougherty Cristina Fernández-Córdoba arXiv:1711.03784v2 [cs.IT] 16 Jan 2018 Roger Ten-Valls Abstract β A Z2 Z4 -additive code C ⊆ Zα 2 × Z4 is called cyclic if the set of coordinates can be partitioned into two subsets, the set of Z2 coordinates and the set of Z4 coordinates, such that any cyclic shift of the coordinates of both subsets leaves the code invariant. Let Φ(C) be the binary Gray map image of C. We study the rank and the dimension of the kernel of a Z2 Z4 -additive cyclic code C, that is, the dimensions of the binary linear codes hΦ(C)i and ker(Φ(C)). We give upper and lower bounds for these parameters. It is known that the codes hΦ(C)i and ker(Φ(C)) are binary images of Z2 Z4 -additive codes R(C) and K(C), respectively. Moreover, we show that R(C) and K(C) are also cyclic and we determine the generator polynomials of these codes in terms of the generator polynomials of the code C. Keywords Z2 Z4 -additive cyclic codes, Gray map, kernel, rank. I. I NTRODUCTION Denote by Z2 and Z4 the rings of integers modulo 2 and modulo 4, respectively. We denote the space of n-tuples over these rings as Zn2 and Zn4 . A binary code is any non-empty subset C J. Borges is with the Department of Information and Communications Engineering, Universitat Autònoma de Barcelona, 08193-Bellaterra, Spain (e-mail: [email protected]). S. T. Dougherty is with the Department of Mathematics, University of Scranton, Scranton, PA 18510, USA (email:[email protected]). C. Fernández-Córdoba is with the Department of Information and Communications Engineering, Universitat Autònoma de Barcelona, 08193-Bellaterra, Spain (e-mail: [email protected]). R. Ten-Valls is with the Department of Information and Communications Engineering, Universitat Autònoma de Barcelona, 08193-Bellaterra, Spain (e-mail: [email protected]). This work has been partially supported by the Spanish MINECO grants TIN2016-77918-P and MTM2015-69138-REDT, and by the Catalan AGAUR grant 2014SGR-691. January 20, 2018 DRAFT 2 of Zn2 , and if that subset is a vector space then we say that it is a linear code. Any non-empty subset C of Zn4 is a quaternary code and a submodule of Zn4 is called a linear code over Z4 . In 1994, Hammons et al. discovered that some good non-linear binary codes can be seen as the Gray map images of linear codes over Z4 , [9]. From then on, the study of codes over Z4 and other finite rings has been developing and the construction of Gray maps has been a topic of study. In Delsarte’s 1973 paper (see [5]), he defined additive codes as subgroups of the underlying abelian group in a translation association scheme. For the binary Hamming scheme, namely when the underlying abelian group is of order 2n , the only structures for the abelian group are those of the form Zα2 × Zβ4 , with α + 2β = n. This means that the subgroups C of Zα2 × Zβ4 are the only additive codes in a binary Hamming scheme. Hence, the study of codes in Zα2 × Zβ4 became important. These codes are called Z2 Z4 -additive codes. In recent times, the structure and properties of Z2 Z4 -additive codes have been intensely studied (see [2]). In [1], Z2 Z4 -additive cyclic codes were introduced and in [3], the duality was studied. In this paper, we study the rank and the kernel of Z2 Z4 -additive cyclic codes, taking into account the known results for general codes over Z4 and Z2 Z4 -additive codes [6], [7], [8]. The paper is organized as follows. In Section II, we recall the necessary concepts and properties on Z2 Z4 -additive codes and Z2 Z4 -additive cyclic codes. In Section III, we give the main results of the paper about the rank and the kernel of Z2 Z4 -additive cyclic codes. We prove that both the binary span and the kernel are binary images of Z2 Z4 -additive cyclic codes, we determine the possible values of the dimensions of the corresponding binary images, and we compute the generator polynomials of these codes. II. P RELIMINARIES A. Z2 Z4 -additive codes A Z2 Z4 -additive code C is a subgroup of Zα2 × Zβ4 (see [2]). Since C is a subgroup of Zα2 × Zβ4 , it is also isomorphic to a commutative structure of the form Zγ2 × Zδ4 and it has |C| = 2γ+2δ codewords. Let X (respectively Y ) be the set of Z2 (respectively Z4 ) coordinate positions, so |X| = α and |Y | = β. Unless otherwise stated, the set X corresponds to the first α coordinates and Y corresponds to the last β coordinates. Let CX be the binary punctured code of C formed by deleting the coordinates outside X. Define similarly the quaternary code CY . January 20, 2018 DRAFT 3 Let Cb be the subcode of C generated by all order two codewords and let κ be the dimension of (Cb )X , which is a binary linear code. For the case α = 0, we write κ = 0. With all these parameters, we say that a code C is of type (α, β; γ, δ; κ). For a vector u ∈ Zα2 × Zβ4 we write u = (u | u′ ), where u = (u0 , . . . , uα−1 ) ∈ Zα2 and u′ = (u′0 , . . . , u′β−1) ∈ Zβ4 . In [2], it is shown that a Z2 Z4 -additive code is permutation equivalent to a Z2 Z4 -additive code with standard generator matrix of the form:   0 0 Iκ Tb 2T2    GS =  0 0 2T1 2Iγ−κ 0  , 0 Sb Sq R Iδ (1) where Ik is the identity matrix of size k × k; Tb , Sb are matrices over Z2 ; T1 , T2 , R are matrices over Z4 with all entries in {0, 1} ⊂ Z4 ; and Sq is a matrix over Z4 . A Z2 Z4 -additive code C is said to be separable if C = CX × CY . Otherwise the code is said to be non-separable. Let u′ = (u′0 , . . . , u′n−1) be an element of Zn4 such that u′i = ũ′i + 2û′i , for i = 0, . . . , n − 1 and with ũ′i , û′i ∈ {0, 1}. As in [9], the Gray map φ from Zn4 to Z2n 2 is defined by φ(u′) = (û′0 , . . . , û′n−1, ũ′0 + û′0 , . . . , ũ′n−1 + û′n−1). The extended Gray map Φ is the map from Zα2 × Zβ4 to Zα+2β given by 2 Φ(u | u′) = (u | φ(u′)). B. Z2 Z4 -additive cyclic codes Cyclic codes have been a primary area of study for coding theory, [10]. Recently, the class of Z2 Z4 -additive cyclic codes has been defined in [1]. Let u = (u | u′) ∈ Zα2 × Zβ4 , then the cyclic shift π is given by π(u) = (π(u) | π(u′)) where π(u) = π(u0 , u1, . . . , uα−1 ) = (uα−1 , u0 , u1, . . . , uα−2 ) and π(u′ ) = (u′β−1 , u′0, u′1 , . . . , u′β−2) . We say that a Z2 Z4 -additive code C is cyclic if π(C) = C. There exists a bijection between Zα2 × Zβ4 and Rα,β = Z2 [x]/(xα − 1) × Z4 [x]/(xβ − 1) given by: (u0 , u1, . . . , uα−1 | u′0 , . . . , u′β−1) 7→ (u0 + u1 x + · · · + uα−1 xα−1 | u′0 + · · · + u′β−1xβ−1 ). January 20, 2018 DRAFT 4 Therefore, as usual in the study of cyclic codes, any codeword is identified as a vector or as a polynomial. From now on, the binary reduction of a polynomial p(x) ∈ Z4 [x] will be denoted by p̃(x). Let p(x) ∈ Z4 [x] and (b(x) | a(x)) ∈ Rα,β and consider the following multiplication p(x) ⋆ (b(x) | a(x)) = (p̃(x)b(x) | p(x)a(x)). From [1], Rα,β is a Z4 [x]-module with respect to this multiplication. Let u′ (x) = ũ′ (x) + 2û′ (x) be the polynomial representation of u′ ∈ Zn4 . Then, the polynomial version of the Gray map is φ(u′ (x)) = (û′(x), ũ′ (x) + û′(x)). In the following, a polynomial p(x) ∈ Z2 [x] or Z4 [x] will be denoted simply by p. Using the polynomial representation, an equivalent definition of Z2 Z4 -additive cyclic codes is the following. Definition 1 ([1]). A subset C ⊆ Rα,β is called a Z2 Z4 -additive cyclic code if C is a Z4 [x]submodule of Rα,β . From [1], if β is odd, we know that if C is a Z2 Z4 -additive cyclic code then it is of the form h(b | 0), (ℓ | f h + 2f )i, (2) where f hg = xβ −1 in Z4 [x], b divides xα −1 in Z2 [x], and we can assume that deg(ℓ) < deg(b). The polynomials satisfying these conditions are said to be in standard form. In this case, we have that |C| = 2α−deg(b) 4deg(g) 2deg(h) . From now on, we assume that β is odd. Then f , g and h are pairwise coprime polynomials. Since h and g are coprime, there exist polynomials λ and µ, that will be used later along the paper, such that λh + µg = 1. (3) Lemma 2 ([3, Corollary 2]). Let C be a Z2 Z4 -additive cyclic code of type (α, β; γ, δ; κ) with C = h(b | 0), (ℓ | f h + 2f )i. Then, b divides We can put the generator matrix (1)  Iκ 1 T   0 Iκ 2   0 0  0 0 January 20, 2018 xβ −1 f˜ gcd(b, ℓ) and b divides h̃ gcd(b, ℓg̃). in the following form, called the standard form:  0 0 Tb1 0  Tb2 2T2 0 0  . 0 2T1 2Iγ−(κ1 +κ2 ) 0   R Iδ S′ S (4) DRAFT 5 The next theorem relates the parameters of the type of a Z2 Z4 -additive code to its generator polynomials. Theorem 3 ([3, Theorem 5 and Proposition 6]). Let C be a Z2 Z4 -additive cyclic code of type (α, β; γ, δ; κ) with C = h(b | 0), (ℓ | f h + 2f )i, where f hg = xβ − 1. Then γ = α − deg(b) + deg(h), δ = deg(g), κ = α − deg(gcd(ℓg̃, b)) and κ1 = α − deg(b), κ2 = deg(b) − deg(gcd(b, ℓg̃)), δ1 = deg(gcd(b, ℓg̃)) − deg(gcd(b, ℓ)) and δ2 = deg(g) − δ1 . It is well known that if C is a Z2 Z4 -additive code, then the Z2 Z4 -linear code C = Φ(C) is not linear in general. The linearity of these codes was studied in [8]. The key to establish this linearity was the fact that Φ(v + w) = Φ(v) + Φ(w) + Φ(2v ∗ w), (5) where ∗ denotes the component-wise product. It follows immediately that Φ(C) is linear if and only if 2u ∗ v ∈ C, for all u, v ∈ C. It is shown in [4] that, for a Z2 Z4 -additive cyclic code C, CX is a binary cyclic code and CY is a linear cyclic code over Z4 . Moreover, if Φ(C) is linear, then φ(CY ) is also linear but the converse is not true in general. The characterization of linear cyclic codes over Z4 of odd length whose Gray map images are linear binary codes was given in [11]. Let p be a divisor of xn − 1 in Z2 [x] with n odd and let ξ be a primitive nth root of unity over Z2 . The polynomial (p ⊗ p) is defined as the divisor of xn − 1 in Z2 [x] whose roots are the products ξ i ξ j such that ξ i and ξ j are roots of p. Theorem 4 ([11, Theorem 20]). Let D = hf h + 2f i be a Z4 -additive cyclic code of odd length n and where f hg = xn − 1. The following properties are equivalent. 1) gcd(f˜, (g̃ ⊗ g̃)) = 1 in Z2 [x]; 2) φ(D) is a binary linear code of length 2n. January 20, 2018 DRAFT 6 This result was generalized for Z2 Z4 -additive cyclic codes of type (α, β; γ, δ; κ) with β odd. Theorem 5 ([4]). Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code of length α + β, β odd, and where f hg = xβ − 1. The following properties are equivalent. ˜ fb , (g̃ ⊗ g̃)) = 1 in Z2 [x]; 1) gcd( gcd(b,ℓg̃) 2) Φ(C) is a binary linear code of length α + 2β. As a result, it is completely characterized when a Z2 Z4 -additive code C has binary linear image under the Gray map, just considering its generator polynomials. The next step is study the rank and the dimension of the kernel for those codes whose image Φ(C) is not linear. III. K ERNEL AND R ANK OF Z2 Z4 -A DDITIVE C YCLIC C ODES For an additive code C ⊆ Zα2 × Zβ4 , the kernel of Φ(C) is defined as ker(Φ(C)) = {v ∈ Zα+2β 2 | v + Φ(C) = Φ(C)}. Define K(C) = {v ∈ Zα2 × Zβ4 | Φ(v) ∈ ker(Φ(C))}. Let rank(Φ(C)) = dim(hΦ(C)i) and R(C) = {v | v ∈ Zα2 × Zβ4 , φ(v) ∈ hΦ(C)i}. It is clear that K(C) ⊆ C ⊆ R(C). It is known that if C is a Z2 Z4 -additive code, then hΦ(C)i and ker(Φ(C)) are both Z2 Z4 -linear codes ([8]). Therefore, R(C) and K(C) are both Z2 Z4 -additive codes. In the next sections we will see that if the code C is a Z2 Z4 -additive cyclic code, then R(C) and K(C) are also Z2 Z4 -additive cyclic. Therefore, the following proposition will be useful to relate the generator polynomials of C to the generator polynomials of R(C) and K(C). Proposition 6. Let C0 = h(b | 0), (ℓ | f h + 2f )i and C1 = h(b′ | 0), (ℓ′ | f ′ h′ + 2f ′ )i be Z2 Z4 -additive cyclic codes with C0 ⊆ C1 . Then 1) f ′ divides f ; 2) gcd(b′ , ℓ′ ) divides gcd(b, ℓ). Proof. Since C0 ⊆ C1 , we have that (C0 )Y = hf h + 2f i ⊆ (C1 )Y = hf ′ h′ + 2f ′ i. Therefore, by [6, Theorem 3], f ′ divides f . Finally, since C0 and C1 are cyclic Z2 Z4 -additive codes, then clearly (C0 )X = hgcd(b, ℓ)i and (C1 )X = hgcd(b′ , ℓ′ )i. Then, since (C0 )X ⊆ (C1 )X , gcd(b′ , ℓ′) divides gcd(b, ℓ). In order to study the rank and the kernel of a Z2 Z4 -additive code C, it is necessary to consider the code Cb . January 20, 2018 DRAFT 7 Proposition 7 ([4]). Let C be a Z2 Z4 -additive cyclic code with C = h(b | 0), (ℓ | f h + 2f )i. Then Cb = h(b | 0), (µ̄ℓg̃ | 2f )i. Note that if C = Cb , then (5) is satisfied and the code Φ(C) is linear. In this case, δ = 0 and, by Theorem 3, g = 1. Therefore Cb = h(b | 0), (ℓ | 2f )i. A. Kernel of Z2 Z4 -Additive Cyclic Codes In this section, we will study the kernel of Z2 Z4 -additive cyclic codes. We will prove that, for a Z2 Z4 -additive cyclic code C, the code K(C) is also cyclic and we will establish some properties of its generator polynomials. We will show that there does not exist a Z2 Z4 -additive cyclic code for all the possible values of the dimension of the kernel as for general Z2 Z4 -additive codes. Let C be a Z2 Z4 -additive code. By (5), we can give the following definition of K(C) (see [8]): K(C) = {v ∈ C | 2v ∗ w ∈ C, ∀w ∈ C}. Lemma 8. Let C be a Z2 Z4 -additive code. Then, K(C)Y ⊆ K(CY ). Proof. Let C be a Z2 Z4 -additive cyclic. Let v = (v | v ′ ) ∈ C. We have that v ∈ K(C) if and only if 2v ∗ w ∈ C, ∀w = (w | w ′) ∈ C. Since 2v ∗ w = (0 | 2v ′ ∗ w ′ ), we have that if v ∈ K(C) then v ′ ∈ K(CY ) and the statement follows. Example 1. Let C be the Z2 Z4 -additive cyclic code in Z2 [x] hx−1i [x] × hxZ34−1i generated by h(1 | x + 1)i, where f = 1 and h = x − 1. Note that C is of type (1, 3; 1, 2; 1) and the generator matrix of C in standard form, (1), is  1 2 0 0     0 3 1 0 .   0 3 0 1 Since f = 1, by Theorem 4, we know that K(CY ) = CY = h(x+1)i. We have that the generator matrix of K(C) in standard form is  1 2 0 0     0 2 2 0    0 2 0 2 and therefore K(C) = h(1 | 2)i. Hence, K(C)Y January 20, 2018 K(CY ). DRAFT 8 The following theorems determine an upper and a lower bound for the kernel of a Z2 Z4 additive code and that there exists a Z2 Z4 -additive code of type (α, β, γ, δ, κ) for all possible values of the kernel. Theorem 9 ([8]). Let C be a Z2 Z4 -additive code with parameters (α, β, γ, δ, κ). Then γ + δ ≤ dim(ker(Φ(C)) ≤ γ + 2δ. Theorem 10 ([8]). Let α, β, γ, δ, κ be integers satisfying α, β, γ, δ, κ ≥ 0, 0<δ+γ ≤β+κ and α + β > 0, κ ≤ min(α, γ). (6) Then, there exists a Z2 Z4 -linear code C of type (α, β; γ, δ; κ) with dim(ker(C)) = γ + 2δ − k̄ if and only if     k̄ = 0, k̄ ∈ {0} ∪ {2, . . . , δ} and k̄ even,    k̄ ∈ {0} ∪ {2, . . . , δ}, if s = 0, if s = 1, if s ≥ 2, where s = β − (γ − κ) − δ. We will see that not all possible values for the kernel of a Z2 Z4 -additive code C are possible if C is cyclic. First, we will determine some properties of the kernel of a Z2 Z4 -additive cyclic code. Proposition 11. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code. Then α − deg(b) + deg(h) + deg(g) ≤ |K(C)| ≤ α − deg(b) + deg(h) + 2 deg(g). Proof. Straightforward from Theorems 9 and 3. Note that the upper bound is sharp when the code has binary linear image, i.e., C = K(C). Moreover, the lower bound is tight when K(C) only has the all-zero vector and all order two codewords; that is, C = Cb . Proposition 12. Let C be a Z2 Z4 -additive cyclic code, then K(C) ⊆ CX × K(CY ). Proof. Let v = (v, v ′) ∈ K(C). For all w = (w, w ′) ∈ C, 2v ∗ w ∈ C since v is in the kernel. Then v ∈ CX and 2v ′ ∗ w ′ ∈ CY , for all w ′ ∈ CY which gives v ′ ∈ K(CY ) and v ∈ CX × K(CY ) and the result follows. January 20, 2018 DRAFT 9 Proposition 13. If C is a separable Z2 Z4 -additive code then K(C) = CX × K(CY ). Proof. Let v ∈ CX × K(CY ), then 2v ∗ w = (0 | 2v ′ ∗ w ′) for all w ∈ C. Since v ′ ∈ K(CY ), then 2v ′ ∗ w ′ ∈ CY . Moreover, since C is a separable Z2 Z4 -additive cyclic code, 2v ∗ w = (0 | 2v ′ ∗ w ′ ) ∈ C. Therefore v ∈ K(C) and CX × K(CY ) ⊆ K(C). Now, by Proposition 12, we have K(C) ⊆ CX × K(CY ). w ∈ C. Since C is a separable Z2 Z4 -additive cyclic code, 2v ′ ∗ w ′ ∈ CY for all w ′ ∈ CY and so v ′ ∈ K(CY ). Therefore The following example shows that if the Z2 Z4 -additive code C is non-separable, then the kernel is not necessarily CX × K(CY ). Example 2. Let C = h(1 | x + 1)i, the Z2 Z4 -additive code of Example 1, with CX = h1i and CY = hx + 1i. We have seen that K(CX ) = CX , K(CY ) = CY and K(C) = h(1 | 2)i. Therefore K(C) ( CX × K(CY ). Therefore, if the code is non-separable, the equality is not satisfied in general. From Proposition 12, we obtain that dim(ker(Φ(C))) ≤ κ + dim(ker(φ(CY ))). However, we can give a bound that is more accurate. Proposition 14. Let C be a Z2 Z4 -additive code, then dim(ker(Φ(C))) ≤ κ1 + dim(ker(φ(CY ))). Proof. Define C0 = {v = (v | v ′ ) ∈ C | v ′ = 0}. We have that C0 ⊆ K(C), and dim(ker(C0 )) = κ1 . Let v = (v | v ′ ) ∈ K(C). If v′ = 0, then v ∈ C0 . Otherwise, v ′ ∈ K(C)Y ⊆ K(CY ) by Lemma 8 and, therefore, dim(ker(Φ(C))) ≤ κ1 + dim(ker(φ(CY ))). From the generator matrix G of C given in (4), we have that the code CY has a generator matrix of the form  2T2 0 0     2T1 2Iγ−(κ +κ ) 0  . 1 2   S R Iδ (7) By [3, Proposition 1], we know that the code CY has type 4δ 2γ−κ1 . The minimum value for the dimension of ker(φ(CY )) is δ + γ − κ1 . Theorem 15. Let C be a Z2 Z4 -additive code. If K(CY ) is a minimum then K(C) is a minimum. January 20, 2018 DRAFT 10 Proof. If K(CY ) is a minimum, by Proposition 14, then dim(ker(Φ(C))) ≤ κ1 + δ + γ − κ1 = γ + δ. In the previous statements, we compute an upper bound of the kernel of a Z2 Z4 -additive code C by considering the kernel of a code over Z4 . Now we shall give the exact value of the kernel of a Z2 Z4 -additive code C in terms of CX and the kernel of a linear code over Z4 , C ′ . As we have seen, in the case of a separable code C, the code C ′ is exactly CY and the value dim(ker(Φ(C))) is dim(ker(Φ(CX ))) + dim(ker(Φ(CY ))), where CY is a cyclic code over Z4 . If the code C is not separable, then C ′ is not necessarily cyclic. Let C be a Z2 Z4 -additive code with generator matrix in the form of (4) and let C ′ be the subcode generated by 0 0 0 0 0 S′ 2T1 2Iγ−(κ1 +κ2 ) 0 S R Iδ ! . (8) Theorem 16. Let C be a Z2 Z4 -additive with generator matrix in the form of (4) and let C ′ be the subcode generated by the matrix in (8). Then dim(ker(Φ(C)) = κ1 + κ2 + dim(ker(φ(CY′ ))). Proof. Let C be a Z2 Z4 -additive cyclic code with generator matrix G in the form of (4). Let {ui = (ui | u′i )}γi=1 be the first γ rows and {vj = (vj | vj′ )}δj=1 the last δ rows of G. Define the 1 +κ2 codes C¯ = h{ui }κi=1 i, C ′ = h{ui }γi=κ1 +κ2 +1 , {vj }δj=1i. By [8], v ∈ K(C) if and only if 2v ∗ w ∈ C for all w ∈ C. We have that v ∈ C̄ is of ¯ = κ1 + κ2 . Let order 2 and hence 2v ∗ w = 0, ∀w ∈ C. Then, C¯ ⊆ K(C) and dim(ker(C)) ¯ we have that v ∈ K(C) if and only v = (v | v ′ ) ∈ C ′ . Since 2v ∗ w = 0 for all w ∈ C, if 2v ∗ w ∈ C ′ for all w ∈ C ′ ; that is, v ∈ K(C ′ ). Finally, 2v ∗ w = (0 | 2v ′ ∗ w ′ ) ∈ C ′ if and only if 2v ′ ∗ w ′ ∈ (C ′ )Y , and hence dim(ker(Φ(C ′ ))) = dim(ker(Φ((C ′ )Y ))). Therefore, dim(ker(Φ(C))) = κ1 + κ2 + dim(ker(φ(CY′ ))). Now we will establish the kernel of a Z2 Z4 -additive cyclic codes taking into account its generator polynomials. In the following theorem we shall prove that if C is Z2 Z4 -additive cyclic code, then K(C) is also cyclic. This result is a generalization of the case when C is a linear cyclic code over Z4 that is given in [6]. Theorem 17. Let C be a Z2 Z4 -additive cyclic code. Then K(C) is a Z2 Z4 -additive cyclic code. Proof. We know that K(C) is a Z2 Z4 -additive code so we just have to show that if u = (u | u′ ) ∈ K(C) then π(u) ∈ K(C). That is, we want to show that 2π(u) ∗ w ∈ C, for all w ∈ C. January 20, 2018 DRAFT 11 Let u ∈ K(C), w ∈ C. Then 2π(u) ∗ w = π(2u ∗ π −1 (w)). We have that u ∈ K(C) and π −1 (w) ∈ C, therefore 2u ∗ π −1 (w) ∈ C by (5). Since the code C is cyclic, π(2u ∗ π −1 (w)) ∈ C, which gives that 2π(u) ∗ w ∈ C, and π(u) ∈ K(C). Corollary 18. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ − 1. Then, K(C) = h(bk | 0), (ℓk | fk hk + 2fk )i, where fk hk gk = xβ − 1 and 1) f divides fk ; 2) gcd(b, ℓ) divides gcd(bk , ℓk ). Proof. By Theorem 17, K(C) is cyclic and therefore K(C) = h(bk | 0), (ℓk | fk hk + 2fk )i, where fk hk gk = xβ − 1. Since K(C) ⊆ C, the result follows from Proposition 6. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ − 1. In [4] it is proved that C = h(b | 0), (ℓ′ | f h), (µ̃ℓg̃ | 2f )i, (9) where ℓ′ = ℓ − µ̃ℓg̃. Lemma 19. Let C = h(b | 0), (ℓ | f h+2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ −1. Let h(b | 0), (ℓk | f hk + 2f )i ⊂ C, for k|g. Then ℓk = k̃ℓ + (1 − k̃)µ̃ℓg̃ (mod b), for µ in (3). Proof. Let C = h(b | 0), (ℓ′ | f h), (µ̃ℓg̃ | 2f )i, where ℓ′ = ℓ − µ̃ℓg̃, as in (9). Since (ℓk | f hk + 2f ) ∈ C and (ℓk | f hk + 2f ) = c1 (b | 0) + c2 (ℓ′ | f h) + c3 (µ̃ℓg̃ | 2f ), we obtain c2 = k, c3 = 1 and ℓk = k̃ℓ′ + µ̃ℓg̃ (mod b) = k̃ℓ + (1 − k̃)µ̃ℓg̃ (mod b). Theorem 20. Let C = h(b | 0), (ℓ | f h+2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ −1. Then, K(C) = h(b | 0), (ℓk | f hk + 2f )i, where k divides g and ℓk = k̃ℓ + (1 − k̃)µ̃ℓg̃ (mod b), for µ in (3). Proof. By Theorem 17, K(C) is cyclic and then K(C) = h(bk | 0), (ℓk | fk hk + 2fk )i. Clearly, bk = b. Since Cb ⊆ K(C) ⊆ C, by Proposition 7 and Proposition 6, we conclude that fk = f . Since K(C)Y = hf hk + 2f i ⊆ CY , with an argument analogous to that of [6, Theorem 9] we obtain that hk = hk with k a divisor of g. Let ℓ′ = ℓ − µ̃ℓg̃. By (9), (ℓ′ | f h), (µ̃ℓg̃ | 2f ) ∈ C. Therefore, ℓk = k̃ℓ′ + µ̃ℓg̃ (mod b) = k̃ℓ + (1 − k̃)µ̃ℓg̃ (mod b). January 20, 2018 DRAFT 12 Theorem 10 shows that there exists a Z2 Z4 -additive code for all possible values of the kernel for a given type (α, β; γ, δ; κ). Considering the last theorem, the next example illustrates that this result is not true for Z2 Z4 -additive cyclic codes; i.e., for a given type (α, β; γ, δ; κ) there does not always exist a Z2 Z4 -additive cyclic code for all possible values of the kernel. Furthermore, it shows that there does not always exist a Z2 Z4 -additive cyclic code for a given type (α, β; γ, δ; κ). Example 3. By Theorem 10, there exists a Z2 Z4 -additive code C of type (2, 7; 2, 3; κ) with dim(ker(Φ(C))) = kd , for all kd ∈ {5, 6, 8}. We will see that there does not exist any cyclic Z2 Z4 -additive code of type (2, 7; 2, 3; κ), with dimension of the kernel in {6, 8}. Let α = 2 and β = 7. We have that x7 − 1 = (x − 1)(x3 + 2x2 + x + 3)(x3 + 3x2 + 2x + 3). Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code of type (2, 7; 2, 3; κ), where f hg = x7 − 1. By Theorem 3, deg(g) = 3 and deg(b) = deg(h) ≤ 2. Let {p3 , q3 } = {(x3 + 2x2 + x+ 3), (x3 + 3x2 +2x+3)}. Assume without loss of generality that g = p3 and, since deg(h) ≤ 2, we have that ˜ fb , (g̃ ⊗ g̃)) 6= 1. q3 divides f . It is easy to see that gcd(q3 , (p˜3 ⊗ p˜3 )) 6= 1 and therefore gcd( gcd(b,ℓg̃) Hence, by Theorem 5, there does not exist a Z2 Z4 -additive code of type (2, 7; 2, 3; κ) with linear Gray image. Thus, dim(ker(Φ(C))) 6= 8. By Theorem 20, K(C) = h(b | 0), (ℓk | f hk+2f )i where k divides g. By the previous argument, k 6= 1 and then we have that k = g = p3 and K(C) = h(b | 0), (ℓk | 2f )i. Therefore K(C) does not contain codewords of order 4, thus dim(ker(Φ(C))) = γ + δ = 5. Finally, we will give Z2 Z4 -additive cyclic codes of type (2, 7; 2, 3; κ), for different values of κ. Recall that κ ≤ min{α, γ} = 2 and κ = α − deg(gcd(b, ℓg̃)), then • κ = 2: C = h(x − 1 | 0), (1 | (x3 + 2x2 + x + 3)(x − 1) + 2(x3 + 2x2 + x + 3))i, or C = h(x − 1 | 0), (1 | (x3 + 3x2 + 2x + 3)(x − 1) + 2(x3 + 3x2 + 2x + 3))i. • κ = 1: C = h(x − 1 | 0), (0 | (x3 + 3x2 + 2x + 3)(x − 1) + 2(x3 + 3x2 + 2x + 3))i, or C = h(x − 1 | 0), (0 | (x3 + 2x2 + x + 3)(x − 1) + 2(x3 + 2x2 + x + 3))i. • κ = 0: In this case, deg(gcd(b, ℓg̃)) = 2 and therefore, gcd(b, ℓg̃) = x2 − 1. Note that p̃3 and q̃3 are not divisors of x2 − 1 over Z2 , thus there does not exist ℓ with deg(ℓ) < 2 such that ℓg̃ = x2 − 1. There does not exist a Z2 Z4 -additive cyclic code of type (2, 7; 2, 3; 0). The statement in Theorem 20 is also true for any maximal Z2 Z4 -additive cyclic subcode of a Z2 Z4 -additive cyclic code C whose Gray image is a linear subcode of Φ(C). January 20, 2018 DRAFT 13 Corollary 21. Let C = h(b | 0), (ℓ | f h + 2f )i be a cyclic code, where f hg = xβ − 1. Then, if C1 is a maximal Z2 Z4 -additive cyclic subcode with Φ(C1 ) linear, then C1 = h(b | 0), (ℓk | f hk+2f )i, where k divides g and ℓk = k̃ℓ + (1 − k̃)µ̃ℓg̃ (mod b), for µ in (3). The kernel of a binary code is the intersection of all its maximal linear subspaces. Therefore, if C1 , C2 , . . . Cs are all the maximal subcodes of a Z2 Z4 -additive code C such that φ(Ci ) is a linear subcode of φ(C), for 1 ≤ i ≤ s, then K(C) = s \ Ci . (10) i=1 In [6] it is proved that if C1 = hf h1 + 2f i and C2 = hf h2 + 2f i are quaternary cyclic codes of odd length n, then C1 ∩C2 = hf lcm(h1 , h2 )+2f i. We will give a similar result for Z2 Z4 -additive cyclic codes. Proposition 22. Let C = h(b | 0), (l | f h + 2f )i be a Z2 Z4 -additive cyclic code. Let C1 = h(b | 0), (lk1 | f hk1 + 2f )i and C2 = h(b | 0), (lk2 | f hk2 + 2f )i be Z2 Z4 -additive maximal subcodes of C whose images under the Gray map are linear subcodes of φ(C). Then C1 ∩ C2 = h(b | 0), (lk′ | f hk ′ + 2f )i, where k ′ = lcm(k1 , k2 ) and ℓk′ = k̃ ′ ℓ + (1 − k̃ ′ )µ̃ℓg̃ (mod b), for µ in (3). Proof. Let C = h(b | 0), (l | f h + 2f )i be a Z2 Z4 -additive cyclic code and let Ci = h(b | 0), (lki | f hki + 2f )i be a Z2 Z4 -additive maximal subcode of C whose image under the Gray map is a linear subcode of φ(C). We first consider (C1 )Y ∩(C2 )Y . By [6], (C1 )Y ∩(C2 )Y = hf lcm(hk1 , hk2 )+2f i = hf hk ′ +2f i, where k ′ = lcm(k1 , k2 ). Since h(b|0)i ∈ C1 ∩ C2 , then C1 ∩ C2 = h(b | 0), (lk′ | f hk ′ + 2f )i, where ℓk′ = k̃ ′ ℓ + (1 − k̃ ′ )µ̃ℓg̃ (mod b), for µ in (3) by Lemma 19. Lemma 23. Let C be a Z2 Z4 -additive cyclic code and let D be a maximal cyclic subcode with linear binary image. Then, K(C) ⊆ D. Proof. If K(C) 6⊆ D, then consider the Z2 Z4 -additive code D ′ generated by K(C) ∪ D ∪ {2u ∗ v | u, v ∈ K(C) ∪ D}. Since the binary image of K(C) ∪ D is cyclic, D ′ is a cyclic subcode of C. Moreover, since 2u ∗ v ∈ D ′ , for all u, v ∈ D ′ , we have that D ′ has linear binary image, leading to a contradiction since we are assuming that D is maximal. January 20, 2018 DRAFT 14 Theorem 24. Let C = h(b | 0), (ℓ | f h+2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ −1. Assume that k1 , . . . , ks are the divisors of g of minimum degree such that  ! g̃ g̃ f˜b , ⊗ = 1, gcd gcd(b, ℓ kg̃˜ ) k̃i k̃i i for i = 1, . . . , s. Then, K(C) = h(b | 0), (ℓ′k | f hk ′ + 2f )i, where k ′ = lcm(k1 , . . . , ks ) and ℓk′ = k̃ ′ ℓ + (1 − k̃ ′ )µ̃ℓg̃ (mod b), for µ in (3). Proof. Assume that k1 , . . . , ks are the divisors of g of minimum degree such that !  g̃ f˜b g̃ ⊗ = 1, gcd , gcd(b, ℓ kg̃˜ ) k̃i k̃i i for i = 1, . . . , s. Let Di be a cyclic subcode of C, where Di = h(b | 0), (ℓki | f hki + 2f )i, for some ℓki . Note that Φ(Di ) is linear by Theorem 5. Since ki is a polynomial of minimum degree dividing g, then Di is a maximal cyclic subcode of C with linear binary image. Then each Di extends to Ci which is a maximal subcode of C, not necessarily cyclic, with linear binary image. Note that every maximal code with linear image must contain a cyclic code with linear image, e.g., every maximal code contains K(C) that is cyclic with linear image. By Lemma 23, we know K(C) ⊆ Di and, therefore K(C) ⊆ ∩i Di . But ∩i Ci = K(C) ⊆ ∩i Di ⊆ ∩i Ci , so K(C) = ∩i Di . By Corollary 21 and Proposition 22, the result follows. Example 4. Let x7 − 1 = (x − 1)p3 q3 over Z4 . Let C = h(1 | 0), (0 | f )i of type (1, 7; 1, 6; 1) with f = (x − 1), h = 1 and g = p3 q3 . ˜ fb Note that gcd( gcd(b,ℓg̃) , (g̃⊗g̃)) = x−1 6= 1. We have that all maximal cyclic subcodes of C with binary linear image are C1 = h(1 | 0), (0 | f p3 + 2f )i, and C2 = h(1 | 0), (0 | f q3 + 2f )i. Clearly, k ′ = lcm(p3 , q3 ) = p3 q3 and then K(C) = h(1 | 0), (0 | f p3 q3 + 2f )i = h(1 | 0), (0 | 2f )i. B. Rank of Z2 Z4 -Additive Cyclic Codes In this section, we will study the rank of a Z2 Z4 -additive cyclic code C. We will prove that R(C) is also cyclic and we will establish some properties of its generator polynomials. However, we will show that there does not exist a Z2 Z4 -additive cyclic code for all possible values of the rank, in contrast to what is exhibited in the following results for a Z2 Z4 -additive code. January 20, 2018 DRAFT 15 Proposition 25 ([8]). Let C be a Z2 Z4 -linear code of binary length n = α + 2β and type  (α, β; γ, δ; κ). Then, rank(Φ(C)) ∈ {γ + 2δ, . . . , min(β + δ + κ, γ + 2δ + δ2 )}. Theorem 26 ([8]). Let α, β, γ, δ, κ be integers satisfying (6). Then, there exists a Z2 Z4 -linear code C of type (α, β; γ, δ; κ) with rank(Φ(C)) = r if and only if   δ )}. r ∈ {γ + 2δ, . . . , min(β + δ + κ, γ + 2δ + 2 Proposition 27 ([8]). Let C be a Z2 Z4 -additive code of type (α, β; γ, δ; κ) and let C = Φ(C). Let G be a generator matrix of C as in (1) and let {ui }γi=1 be the rows of order two and {vj }δj=1 the rows of order four in G. Then, hCi is generated by {Φ(ui )}γi=1 , {Φ(vj ), Φ(2vj )}δj=1 and {Φ(2vj ∗ vk )}1≤j<k≤δ . Moreover, hCi is both binary linear and Z2 Z4 -linear. Corollary 28 ([6]). Let C be a Z2 Z4 -additive code of type (α, β; γ, δ; κ) and let C = Φ(C). Let G be a generator matrix of C as in (1) and let {ui }γi=1 be the rows of order two and {vj }δj=1 the rows of order four in G. Then, R(C) = C ∪ h{2vj ∗ vk }1≤j<k≤δ i. Lemma 29. Let C be a Z2 Z4 -additive code. Then, R(C)Y = R(CY ). Proof. Let {ui = (ui | u′i )}γi=1 be the first γ rows and {vj = (vj | vj′ )}δj=1 the last δ rows of G. By Corollary 28, R(C) = C ∪ h{2vj ∗ vk }1≤j<k≤δ i. By the same argument, R(CY ) = CY ∪ h{2vj′ ∗ vk′ }1≤j<k≤δ i. Since 2vj ∗ vk = (0 | 2vj′ ∗ vk′ ) for all 1 ≤ j < k ≤ δ, the statement follows. The following theorem shows that if C is Z2 Z4 -additive cyclic code, then R(C) is also cyclic. As in the case of K(C), this theorem is a generalization of the case when C is a linear cyclic code over Z4 [6]. Theorem 30. Let C be a Z2 Z4 -additive cyclic code. Then R(C) is Z2 Z4 -additive cyclic code. Proof. Let x ∈ R(C). By Corrollary 28, R(C) is generated by C and {2v∗w | v, w ∈ C}, then x = u + 2v ∗ w, for some u, v, w ∈ C. As C is a Z2 Z4 -additive cyclic code then π(u), π(v), π(w) ∈ C and 2π(v) ∗ π(w) ∈ R(C). Thus, π(x) = π(u) + 2π(v) ∗ π(w) ∈ R(C) and R(C) is Z2 Z4 -additive cyclic code. The next proposition is straightforward from Theorems 26 and 3. January 20, 2018 DRAFT 16 Proposition 31. Let C be a Z2 Z4 -additive cyclic code. Then α − deg(b) + deg(h) + 2 deg(g) ≤ rank(Φ(C)) ≤  deg(g) ). min(α + β + deg(g) − deg(gcd(b, ℓg̃)), α − deg(b) + deg(h) + 2 deg(g) + 2  For a Z2 Z4 -additive cyclic code C, define C1 = h(b | 0)i and C2 = h(ℓ | f h + 2f )i. Since C = C1 ∪ C2 and C1 ∩ C2 = {0}, we have that rank(Φ(C)) = rank(Φ(C1 )) + rank(Φ(C2 )). (11) If the code C is separable, then ℓ = 0 and rank(Φ(C1 )) = rank(Φ(CX )). Moreover, C2 = h(0 | f h + 2f )i, and therefore rank(Φ(C2 )) = rank(Φ(CY )). We obtain the following result. Proposition 32. If C is a separable Z2 Z4 -additive cyclic code, then R(C) = R(CX ) × R(CY ) and rank(Φ(C)) = κ1 + rank(Φ(CY )). Note that, if C is not separable, rank(Φ(C)) is not necessarily equal to κ1 + rank(Φ(CY )) as it is shown in the following example. Example 5. Consider the Z2 Z4 -additive  1   0    0   0  0 code generated by the following matrix.  0 0 0 0 0  1 0 0 0 0    0 1 2 0 0   0 0 1 1 0   0 0 1 0 1 (12) In [4, Example 2] it was proved that φ(CY ) is binary linear whereas Φ(C) is not binary linear. In this example we have that κ1 = 2. Since Φ(CY ) is linear, rank(Φ(CY )) = 5. Nevertheless, Φ(C) is not binary linear and rank(Φ(C)) = 8 > 5 + 2. In fact, rank(Φ(C)) is always greater or equal to κ1 + rank(Φ(CY )). Proposition 33. Let C be a Z2 Z4 -additive cyclic code, then rank(Φ(C)) ≥ κ1 + rank(Φ(CY )). Proof. Let C be a Z2 Z4 -additive cyclic code. By (11), rank(Φ(C)) = rank(Φ(C1 ))+rank(Φ(C2 )) = κ1 + rank(Φ(C2 )) . By Proposition 27, in order to determine the rank, we have to consider the set of vectors 2v ∗ w, for v = (v | v ′ ), w = (w | w ′ ) ∈ C. Since for all v ∈ C if w ∈ C1 we obtain 2v ∗ w = 0, we just have to consider v, w ∈ C2 . We have that if 2v ′ ∗ w ′ 6∈ CY January 20, 2018 DRAFT 17 then 2v ∗ w 6∈ C. Therefore, rank(Φ(C2 )) ≥ rank(Φ((C2 )Y )) = rank(Φ(CY )) and, therefore, rank(Φ(C1 )) ≥ κ1 + rank(Φ(CY )). Now we can determine the rank of a Z2 Z4 -additive code C as the rank of CX and the rank of a linear code over Z4 , C ′ . As in the case of the kernel, when C is separable we have seen that C ′ = CY , but if C is not separable such a code C ′ may not be cyclic over Z4 . Theorem 34. Let C be a Z2 Z4 -additive cyclic code with generator matrix in the form of (4) and let C ′ be the subcode generated by the matrix in (8). Then, rank(Φ(C)) = κ1 + κ2 + rank(Φ(CY′ )). Proof. Let C be a Z2 Z4 -additive cyclic code with generator matrix G in the form of (4). Let {ui = (ui | u′i )}γi=1 be the first γ rows and {vj = (vj | vj′ )}δj=1 the last δ rows of G. Define the 1 +κ2 codes C¯ = h{ui }κi=1 i and C ′ = h{ui }γi=κ1 +κ2 +1 , {vj }δj=1 i. By Corollary 28 we have R(C) = h{ui }γi=1 , {vj }δj=1, {2vj ∗ vk }1≤j<k≤δ i, ¯ = h{ui }κ1 +κ2 i, R(C) i=1 R(C ′ ) = h{ui }γi=κ1 +κ2 +1 , {vj , 2vj }δj=1, {2vj ∗ vk }1≤j<k≤δ i. ¯ ∪ R(C ′ ). Moreover, R(C) ¯ ∩ R(C ′ ) = {0} due to the fact that for Note that R(C) = R(C) ¯ Therefore, rank(Φ(C)) = rank(Φ(C)) ¯ + all 1 ≤ j < k ≤ δ, 2vj ∗ vk = (0 | 2vj′ ∗ vk′ ) 6∈ C. rank(Φ(C ′ )) = κ1 + κ2 + rank(Φ(C ′ )). Finally, by Lemma 29, rank(Φ(C ′ )) = rank(Φ(CY′ )) and the statement follows. Theorem 35. Let C = h(b | 0), (ℓ | f h+2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ −1. Then, R(C) = h(br | 0), (ℓr | f h + 2 fr )i, where r is a divisor of f and br divides b. Proof. By Theorem 30, R(C) is a Z2 Z4 -additive cyclic code, therefore R(C) = h(br | 0), (ℓr | fr hr + 2fr )i. Since (b | 0) ∈ R(C), it is clear that br divides b. By [8, Lemma 3], C and R(C) have the same number of order four codewords and since C ⊆ R(C) we have that fr hr = f h. Then gr = g. By Proposition 6, we know that fr divides f and hence there exists r ∈ Z4 [x] such that fr = January 20, 2018 f r and hr = hr. Therefore, R(C) = h(br | 0), (ℓr | f h + 2 fr )i. DRAFT 18 Let Ch(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code. In the following example, we will see that R(C) = h(br | 0), (ℓr | fr hr + 2fr )i, where br 6= b, if we consider the generators of R(C) in standard form. Example 6. Let x7 − 1 = (x − 1)p3 q3 over Z4 . Let C = h((x − 1) | 0), (1 | (x − 1) + 2)i, with f = 1, h = x − 1 and g = p3 q3 . If we compute R(C) we obtain that R(C) = h(1 | 0), (0 | (x − 1) + 2)i. Z2 Z4 -additive As it is shown in Theorem 26, there exists a Z2 Z4 -additive code for any possible value of the rank. Nevertheless, the following example gives a particular type (α, β; γ, δ; κ) such that it is not possible to construct a Z2 Z4 -additive cyclic code with a specific, and valid, value of the rank. Example 7. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code of type (2, 7; 2, 3; κ). By Theorem 26, rank(Φ(C)) ∈ {8, 9, 10, 11}. We will see that there does not exist any cyclic Z2 Z4 -additive code of type (2, 7; 2, 3; κ), C, with rank(Φ(C)) ∈ {8, 9, 10}. Let x7 − 1 = (x − 1)p3 q3 over Z4 , with p3 and q3 as in Example 3. By Theorem 3, deg(g) = 3 and deg(b) = deg(h) ≤ 2. Assume without loss of generality that g = p3 and, since deg(h) ≤ 2, we have that q3 divides f . We have already proved, in Example 3, that there does not exist a Z2 Z4 -additive code of type (2, 7; 2, 3; κ) with linear Gray image. Thus, rank(Φ(C)) 6= 8. By Theorem 35, R(C) = h(b | 0), (ℓr | fr hr + 2fr )i where r divides f and hr = hr. Since rank(Φ(C)) ∈ {8, 9, 10, 11}, we have that deg(r) ≤ 3 as |R(C)| = 43 22+deg(r) ≤ 211 . Since gcd(q̃3 , p̃3 ⊗ p̃3 ) 6= 1 we have that q3 must divide r. Therefore deg(r) ≥ 3, and by the previous argument, we know that r = q3 . So, rank(Φ(C)) ∈ / {9, 10}. Finally, we will give Z2 Z4 -additive cyclic codes of type (2, 7; 2, 3; κ), for different values of κ, such that rank(Φ(C)) = 11. Recall that κ ≤ min{α, γ} = 2 and κ = α − deg(gcd(b, ℓg̃)), then • κ = 2: C = h(x − 1 | 0), (1 | (x3 + 2x2 + x + 3)(x − 1) + 2(x3 + 2x2 + x + 3))i, or C = h(x − 1 | 0), (1 | (x3 + 3x2 + 2x + 3)(x − 1) + 2(x3 + 3x2 + 2x + 3))i. • κ = 1: C = h(x − 1 | 0), (0 | (x3 + 3x2 + 2x + 3)(x − 1) + 2(x3 + 3x2 + 2x + 3))i, or C = h(x − 1 | 0), (0 | (x3 + 2x2 + x + 3)(x − 1) + 2(x3 + 2x2 + x + 3))i. • κ = 0: As in Example 3, there does not exist a Z2 Z4 -additive cyclic code of type (2, 7; 2, 3; 0). January 20, 2018 DRAFT 19 Proposition 36. Let C = hf h + 2f i be a cyclic code over Z4 of length n, with f hg = xn − 1. Then, R(C) = f h + 2 f , r where r is the Hensel lift of gcd(f˜, g̃ ⊗ g̃). Proof. From [6], we have that R(C) = hf h + 2 fr i, where r divides f . Since R(C) is the minimum cyclic code over Z4 containing C whose image under the Gray map is linear, then r is the polynomial of minimum degree dividing f satisfying that hf h + 2 fr i  ˜ has linear image. This is equivalent, by [11], to the condition gcd fr̃ , g̃ ⊗ g̃ = 1. Therefore, the polynomial r of minimum degree dividing f satisfying this condition is the Hensel lift of gcd(f˜, g̃ ⊗ g̃). Proposition 37. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ − 1, such that Φ(C) is not linear and Φ(CY ) is linear. Then, R(C) = h(br | 0), (ℓr | f h + 2f )i, where br = gcd(b, µ̃g̃ℓ), µ is as in (3), and ℓr = ℓ − µ̃g̃ℓ (mod br ). Proof. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code, CY = hf h + 2f i. Let G be a generator matrix of C as in (1) and let {ui = (ui | u′i )}γi=1 be the rows of order two and {vj = (vj | vj′ )}δj=1 the rows of order four in G. By Corollary 28, R(C) = C∪h{2vj ∗vk }1≤j<k≤δ i. We have that Φ(C) is not linear, therefore there exist i, k ∈ {1, . . . , δ} such that 2vj ∗ vk = (0 | 2vj′ ∗ vk′ ) 6∈ C. Since Φ(CY ) is linear, 2vj′ ∗ vk′ ∈ h2f h, 2f i. Moreover, h(0 | 2f h)i ∈ C and therefore R(C) = C ∪ h(0 | 2f )i. Considering the generators polynomials of R(C) and µ as in (3), we have R(C) = h(b | 0), (ℓ − µ̃g̃ℓ | f h), (µ̃g̃ℓ | 2f ), (0 | 2f )i = h(b | 0), (µ̃g̃ℓ | 0), (ℓ − µ̃g̃ℓ | f h + 2f )i = h(gcd(b, µ̃g̃ℓ) | 0), (ℓ − µ̃g̃ℓ | f h + 2f )i. Therefore, considering the polynomial generators of R(C) in standard form, we have that br = gcd(b, µ̃g̃ℓ) and ℓr = ℓ − µ̃g̃ℓ (mod br ). January 20, 2018 DRAFT 20 Theorem 38. Let C = h(b | 0), (ℓ | f h+2f )i be a Z2 Z4 -additive cyclic code, where f hg = xβ −1. Then, f R(C) = h(br | 0), (ℓr | f h + 2 )i, r where r is the Hensel lift of gcd(f˜, g̃ ⊗ g̃), br = gcd(b, µ̃g̃ℓ), µ is as in (3), and ℓr = ℓ − µ̃g̃ℓ. Proof. Let C = h(b | 0), (ℓ | f h + 2f )i be a Z2 Z4 -additive cyclic code. By Theorem 35, R(C) = h(br | 0), (ℓr | f h + 2 fr )i, where r is a divisor of f and br divides b. Consider the quaternary code CY = hf h+2f i. By Lemma 29, we have that (R(C))Y = R(CY ). Therefore, by Proposition 36, R(CY ) = f h + 2 f , where r is the Hensel lift of gcd(f˜, g̃ ⊗ g̃). r Note that R(CY ) = CY ∪ 2 fr . From Corollary 28, C = C ∪ h{2vj ∗ vk }1≤j<k≤δ i, where {ui = (ui | u′i )}γi=1 are the rows of order four of the generator matrix of C as in (1). Note that, for all uj , uk , 1 ≤ j ≤ k ≤ δ, 2uj ∗ uk = (0 | 2u′j ∗ u′k ), where 2u′j ∗ u′k ∈ R(CY ) = CY ∪ h2 fr and, therefore, (0 | 2u′j ∗ u′k ) ∈ C ∪ h(0 | 2 fr ) . Hence, we have that R(C) = C ∪ h(0 | 2 fr ) . Therefore, for µ as in (3), R(C) = h(b | 0), (ℓ − µ̃g̃ℓ | f h), (µ̃g̃ℓ | 2f ), (0 | 2 fr )i = h(b | 0), (µ̃g̃ℓ | 0), (ℓ − µ̃g̃ℓ | f h + 2 fr )i = h(gcd(b, µ̃g̃ℓ) | 0), (ℓ − µ̃g̃ℓ | f h + 2 fr )i. From the last equation, and considering the polynomial generators of R(C) in standard form, we have that br = gcd(b, µ̃g̃ℓ) and ℓr = ℓ − µ̃g̃ℓ (mod br ). Example 8. Let α = 3 and β = 7. Consider, as in Example 3, C = h(x − 1 | 0), (0 | x − 1)i where f = x − 1 and h = 1. As we have seen, C does not have linear binary image. Then, by Theorem 38, we have that R(C) = h(1 | 0), (0 | (x − 1) + 2)i where r = f = x − 1. Example 9. Let α = 3 and β = 15. Consider C = h(x − 1 | 0), (1 | f h + 2f )i where f = x4 + 2x2 + 3x + 1 and h = (x − 1)(x4 + x3 + x2 + x + 1). Then, by Theorem 38, we have that R(C) = h(1 | 0), (0 | f h + 2 fr )i where r = f = x4 + 2x2 + 3x + 1. IV. C ONCLUSIONS Given a Z2 Z4 -additive cyclic code C, we have shown that the codes K(C) and R(C) are also Z2 Z4 -additive cyclic. We have computed the generator polynomials of these codes in terms of January 20, 2018 DRAFT 21 the generator polynomials of C. Using these results, we have concluded that the dimensions of the binary images of K(C) and R(C), i.e. the dimension of the kernel and the rank of C, cannot take all the possible values as for a general Z2 Z4 -additive code. In other words, if a Z2 Z4 -additive code is cyclic, then the set of possible values for the rank and the dimension of the kernel becomes more restrictive. R EFERENCES [1] T. Abualrub, I. Siap and N. Aydin, “Z2 Z4 -additive cyclic codes,” IEEE Transactions on Information Theory, vol. 60, pp. 1508-1514, 2014. [2] J. Borges, C. Fernández-Córdoba, J. Pujol, J. Rifà and M. Villanueva, “Z2 Z4 -linear codes: generator matrices and duality,” Designs, Codes and Cryptography, vol. 54, pp. 167-179, 2010. [3] J. Borges, C. Fernández-Córdoba, R. Ten-Valls, “Z2 Z4 -additive cyclic codes, generator polynomials and dual codes,” IEEE Transactions on Information Theory, vol. 62, No. 10, pp. 6348-6354, 2016. [4] J. Borges, S.T. Dougherty, C. Fernández-Córdoba, R. Ten-Valls, “Binary images of Z2 Z4 -additive cyclic codes,” arXiv:1707.03214v1, 2017. [5] P. Delsarte, “An algebraic approach to the association schemes of coding theory,” Philips Res. Rep. Suppl., vol. 10, 1973. [6] S.T. Dougherty, C. Fernández-Córdoba. “Kernels and ranks of cyclic and negacyclic quaternary codes,” Designs, Codes and Cryptography, vol. 81, no. 2, pp. 347-364, 2016. [7] C. Fernández-Córdoba, J. Pujol and M. Villanueva, “On rank and kernel of Z4 -linear codes,” Lecture Notes in Computer Science, no. 5228, pp. 46-55, 2008. [8] C. Fernández-Córdoba, J. Pujol and M. Villanueva, “Z2 Z4 -linear codes: rank and kernel,” Designs, Codes and Cryptography, vol. 56, pp. 43-59, 2010. [9] A.R. Hammons, P.V. Kumar, A.R. Calderbank, N.J.A. Sloane, P. Solé, “The Z4 -linearity of kerdock, preparata, goethals and related codes,” IEEE Transactions on Information Theory, vol. 40, pp. 301-319, 1994. [10] F.J. MacWilliams, N.J.A. Sloane. The Theory of Error-Correcting Codes. North-Holland Publishing Company, Amsterdam, New York, Oxford, 1975. [11] J. Wolfmann. “Binary Images of Cyclic Codes over Z4 ,” IEEE Transactions on Information Theory, vol. 47, pp. 1773-1779, 2001. January 20, 2018 DRAFT
7cs.IT
L ONG SHORT- TERM MEMORY AND L EARNING - TO LEARN IN NETWORKS OF SPIKING NEURONS arXiv:1803.09574v1 [cs.NE] 26 Mar 2018 Guillaume Bellec*, Darjan Salaj*, Anand Subramoney*, Robert Legenstein & Wolfgang Maass Institute for Theoretical Computer Science Graz University of Technology Austria {bellec,salaj,subramoney,legenstein,maass}@igi.tugraz.at * = first authors A BSTRACT Networks of spiking neurons (SNNs) are frequently studied as models for networks of neurons in the brain, but also as paradigm for novel energy efficient computing hardware. In principle they are especially suitable for computations in the temporal domain, such as speech processing, because their computations are carried out via events in time and space. But so far they have been lacking the capability to preserve information for longer time spans during a computation, until it is updated or needed - like a register of a digital computer. This function is provided to artificial neural networks through Long Short-Term Memory (LSTM) units. We show here that SNNs attain similar capabilities if one includes adapting neurons in the network. Adaptation denotes an increase of the firing threshold of a neuron after preceding firing. A substantial fraction of neurons in the neocortex of rodents and humans has been found to be adapting. It turns out that if adapting neurons are integrated in a suitable manner into the architecture of SNNs, the performance of these enhanced SNNs, which we call LSNNs, for computation in the temporal domain approaches that of artificial neural networks with LSTM-units. In addition, the computing and learning capabilities of LSNNs can be substantially enhanced through learning-to-learn (L2L) methods from machine learning, that have so far been applied primarily to LSTM networks and apparently never to SSNs. This preliminary report on arXiv will be replaced by a more detailed version in about a month. 1 I NTRODUCTION Deep learning in artificial neural networks (ANNs) usually employs feedforward networks. Feedforward networks tend to support computing and learning mechanisms that differ strongly from those of recurrently connected networks of neurons, which one finds in the brain. Recurrent ANNs have been applied very successfully for demanding tasks such as speech processing and video recognition, which require integration of information over time. But virtually all of these applications involve recurrent ANNs that employ specialized modules for preserving information over time, such as Long Short-Term memory (LSTM) units (Hochreiter & Schmidhuber, 1997). A simpler type of memory module had been introduced for artificial neural networks by Mikolov et al. (2014). Modules of this type have been missing in spiking neural network (SNN) models, and as a result, their performance for tasks that require integration over longer timespans has remained inferior. A first step for alleviating this problem was made through the inclusion of short-term synaptic plasticity in randomly connected SNNs (Maass et al., 2002). This improved their capabilities for tasks that require integration of information over hundreds of ms, but did not solve the problem for tasks that involve the behaviourally relevant time scale of seconds and longer. Neurons in the brain are subject to intracellular processes on many different times scales, from ms to s, minutes, hours, and days. We show that by including just one of their longer lasting processes, neuronal adaptation, and by simultaneously considering structured rather than randomly connected 1 network architectures, one arrives at recurrent SNNs with substantially enhanced computing and learning capabilities. We will refer to these SNNs with longer short-term memory as LSNNs. 2 T HE LSNN MODEL We use simple leaky integrate-and-fire neuron models (see Supplementary Information). One population R of regularly firing neurons in the LSNN consists of standard neurons of this type, whereas a simple adaptation mechanism is included for neurons in a second subpopulation A. Both populations receive spike trains from a population X of external input neurons. Results of computations in the LSNN are read out by a population Y of external linear readout neurons, see Fig. 1A. In neuroscience the term neural adaptation refers to a broad range of phenomena and mechanisms. It was already discovered in the 19th century that the intensity of a constant stimulus tends to cause a diminishing sensation, see e.g. the Wikipedia article “Neural adaptation”. A closer look shows that these phenomena take place simultaneously on several time scales, from hundreds of ms to s, hours, or even days. In the context of neuron models, adaptation refers to changes in the firing threshold or subthreshold currents of a neuron that reduce its excitability in response to its own firing (Gerstner et al., 2014). Experimental data on that are documented for example in the form of a distribution of measured adaptation indices of neurons for large sets of neurons, both from mouse and humans, in the online Allen Brain Atlas (Allen Institute, 2018). This adaptation index measures the increase of interspike intervals of a neuron that receives a constant input current. Common ways for modeling such data are described in (Gerstner et al., 2014; Pozzorini et al., 2015; Gouwens et al., 2018; Teeter et al., 2018). We are using here the arguably simplest form of integrating adaptation into a neuron model: We assume that the firing threshold Bj (t) of neuron j increases by some fixed amount β for each spike of this neuron j, and then decays exponentially back to a baseline value b0j with a time constant τa,j . The neural dynamics for a discrete time step of δt = 1 reads as follows Bj (t) bj (t + 1) = b0j + βbj (t), = ρj bj (t) + (1 − ρj )zj (t), (1) (2) where ρj = exp(− τδt ) and zj (t) is the spike train of neuron j. Note that this dynamics of thresha,j olds of adaptive spiking neurons is similar to the dynamics of the state of context neuron in (Mikolov et al., 2014). We optimize the weights, and in some cases also the connections of an LSNN through standard optimization algorithms for specific ranges of tasks. This optimization algorithm is not claimed to be biologically realistic. But it might correspond functionally to evolutionary processes that optimized LSNNs in the brain for tasks that were relevant for survival. For the three experiments that we report here we used backprop through time (BPTT). BP has already been applied by (Courbariaux et al., 2016) and (Esser et al., 2016) to feedforward networks of spiking neurons, and by (Huh & Sejnowski, 2017) to recurrent networks of spiking neurons. The gradient is backpropagated through spikes by replacing in these approaches the non-existent derivative of the membrane potential at the time of a spike by a pseudo-derivative that smoothly increases from 0 to 1, and then decays back to 0. For our applications we needed to modify the pseudo-derivative in order to achieve stable performance of BPTT for larger time spans, that required backpropagation through several 1000 layers of an unrolled feedforward network of spiking neurons: we reduced (“dampened”) the amplitude of the pseudo-derivative by a factor < 1. 3 L ONG SHORT- TERM MEMORY IN LSNN S Store-Recall task: We first test the performance of LSNNs on a very simple working memory task (see Fig. 1D): The network has to store a bit – encoded by spikes from input neurons – in working memory if it receives simultaneously a “store” instruction, which is given in the form of spikes from other input neurons. The stored bit has to be recalled by the network after a subsequent “recall” instruction, that is also given in the form of spikes from dedicated input neurons. At the same time other spike inputs should be ignored by the network. 2 Figure 1: Store-recall task. A An LSNN consists of a regular spiking and an adaptive neural population. B A standard LSNN architecture that corresponds to the ANN architecture of Mikolov et al. (2014) C A sample LSNN architecture that resulted from using Deep R, a biologically inspired technique that prunes and rewires gradually the connectivity matrices during training (Bellec et al., 2018). D The raster plot shows the activity of a network after convergence. From top to bottom, the sub-panels show spike rasters from input neurons (X), regular spiking neurons (R), and adaptive neurons (A) followed by the output of the readout and the dynamics of the adaptive thresholds of adaptive neurons (this network is based on the standard architecture). 3 More precisely, the input neurons marked in blue and red at the top of Fig. 1D are Poisson neurons that produce random spike sequences. An input bit to the network is encoded by spiking activity at 50 Hz in the corresponding input channels X0 or X1 for a pattern duration D = 200 ms. “Store” and “recall” instructions are analogously encoded through firing of populations XS and XR of other Poisson input neurons at 50 Hz for D = 200 ms. Otherwise input neurons are assumed to be silent in this simple experiment. When a “recall” instruction is received, the network should output the bit value received concurrently with the most recent “store” instruction before that. After a “store”, a “recall” instruction is given during a subsequent time period of length D with probability π. This results in an expected delay of D π between a “store” and “recall” instruction. The next “store” appears similarly in a subsequent period of length D with probability π. During a recall cue, the binary output is supposed to be encoded by the sign of the time-averaged membrane potential of a linear readout neuron Y . The LSNN consisted of 60 regular spiking and 20 adaptive neurons. An example trial after training is shown in Fig. 1D. A summary of results on performance of trained networks for several versions of the store-recall tasks is given in Tables 1 and 2 of the Supplement. A SNN without adapting neurons can solve the store-recall task only if working memory for a few 100 ms suffices. LSNNs work best if the time constants of their adapting neurons are in the same range as the required durations of working memory in the network. If the adapting neurons of an LSNN have a spread of different time constants, such LSNN generally performs well for a variety of tasks that require working memory durations with a similar spread of memory durations. Table 2 shows that the architecture of an LSNN also influences its performance for these tasks. In general, the standard architecture (Fig. 1 B) works quite well. But first tests where the network architecture was optimized together with its parameters suggest that more specific architectures, such as the one shown in Fig. 1 C may perform substantially better for specific tasks (see lowest row of Table 2). We applied there the rewiring method Deep R (Bellec et al., 2018). Deep R converges theoretically to an optimal network configuration by continuously updating the set of active connections in a biologically inspired manner (Kappel et al., 2015; 2017; Bellec et al., 2018). Sequential MNIST: We next tested the performance of LSNNs on a task that requires continuous updates of working memory over a longer time span: sequential MNIST. The task is to classify the handwritten digits of the MNIST datasets when the pixels are presented one after another. We compare the performance of LSNNs with that of LSTM networks. For fair comparison, the size of the LSNN is chosen to match the number of parameters of the LSTM network. This leads to 140 regular spiking and 100 adaptive neurons with adaptation time constant 700 ms in the LSNN, in comparison to 128 LSTM units. The pixels are presented sequentially in 784 time steps, after which the network is required to output the class of the presented digit. For LSNNs, the gray level of each pixel is encoded into the spikes of 80 input neurons. Several different ways of encoding pixel values by spikes can be used. Fig. 2C shows a version where the gray level of each pixel is encoded by population coding through the firing probability of the 80 input neurons, 1ms for each pixel. Somewhat better performance is achieved when each of the 80 input neurons is associated with a particular threshold for the gray value, and this input neuron fires whenever the gray value of the currently presented pixel crosses its threshold (two input neurons were used per threshold, one spiked at threshold crossings from below, and one at the crossings from above; this input convention is chosen for the LSNN results of Fig. 2B). In either case, an additional input neuron becomes active when the presentation of the 784 pixel values is finished, in order to prompt an output from the network. The firing of this additional input neuron is shown at the top right of the top panel of Fig. 2C. The softmax of 10 linear output neurons Y is trained to produce, during that time segment, the label of the sequentially presented handwritten digit (see yellow shading around 800 ms of the output neuron for label 6 in the plot of the dynamics of the output neurons Y in Fig. 2C; this output was correct). In contrast to the store-recall task, we see that the firing thresholds of adapting neurons undergo complex temporal modifications. The output of the network is determined by averaging the readout output over the 56 ms following the presentation of the digit. The network is trained by minimizing the cross entropy between the softmax of the averaged readout and the label distributions. 4 Figure 2: Sequential MNIST. A The goal of this task is to classify images of handwritten digits when the pixels are shown sequentially row by row. B The performance of spiking neural networks is compared for three different setups: without adapting neurons (LIF), an LSNN in the standard architecture, but with connections from the regular to the adaptive spiking pool (LSNN), and an LSNN with randomly initialized connectivity that was rewired during training (LSNN rewired). For comparison, the performance of an artificial fully connected RNN and an LSTM with standard gray level inputs are shown. C Dynamics of a network classifying a digit as in Figure 1. 5 A performance comparison is given in Figure 2B. LSNNs achieve a 93% classification accuracy on the test set using the standard architecture with added connections from the regular to the adaptive spiking pool. A higher performance of 96% is reached if the network is rewired during training with DEEP R (Bellec et al., 2018). The same performance is achieved by an LSTM receiving continuous gray levels instead of spikes. The first and fourth bars in Fig. 2B show that this range of accuracy is out of reach for spiking or nonspiking neural networks without enhanced working memory capabilities. Each image presentation with this setup takes 784 ms. To test if the model can also integrate information over a longer time span we expanded this duration to 3.36 s by presenting each pixel for 4 milliseconds instead of 1. An LSNN trained on this expanded presentation duration achieved in a first experiment 83% classification accuracy (all adaptive neurons had an adaptation time constant of 3500 ms). 4 L EARNING - TO -L EARN FOR LSNN S Some of the most intriguing applications of LSTM networks were demonstrations of Learning-toLearn (L2L) or Meta-learning capabilities of this type of neural networks. This research direction was initiated by (Hochreiter et al., 2001), and has lead in recent years to a host of remarkable new methods and results, see e.g. (Wang et al., 2016; Gupta et al., 2018). The reason why LSTM networks have been used for most work on L2L is that they can naturally accommodate two levels of learning and representation of learned insight: network parameters such as synaptic weights can be used to encode “innate” or transfer knowledge from preceding learning of more-or-less related tasks. At the same time, a sufficiently long short-term memory in the neural network can accumulate and apply knowledge gained during a single learning iteration (generally consisting of many episodes) for a specific learning task. Of course, many other schemes for encoding, fusing, and applying results of long-term meta-learning and results from the current learning task are possible and should be explored. The results of (Hochreiter et al., 2001) show that besides backprop there are likely to be many other methods which recurrent neural networks can use to learn nonlinear functions from a teacher. This supervised learning scenario is also of interest from the perspective of understanding learning in the brain, since learning to predict future sensory inputs, the consequences of an action, or sensory input from one modality in terms of sensory inputs from other modalities, are all learning scenarios where the target output values are given to networks of neurons in the brain – with often some delay – from the environment or internal processing modules. Another aspect of this L2L approach is that it produces a host of new ideas and algorithms for implementing learning in recurrent neural networks. This is of interest from the perspective of neuroscience, because on the basis of the currently available experimental data it is not clear to what extent synaptic weights are able to support fast learning by storing knowledge from previous trials for the current learning task. It is also not clear whether spike-timing-dependent plasticity (STDP) is the primary local learning rule in neural networks of the brain, and which other local learning rules are there implemented (Lisman & Spruston, 2010; Titley et al., 2017). In addition, experimental data for STDP question its usefulness for fast and reliable learning, since STDP is subject to high synapse-to-synapse variability, and requires dozens of repetitions of pairing of pre- and postsynaptic firing (Froemke et al., 2010). We show here that the L2L paradigm of Hochreiter et al. (2001) for LSTM networks can be ported to the biologically more realistic LSNNs. L2L results for SNNs have the advantage that many features and fingerprints of resulting new learning algorithms for SNNs, such as neural activity (spike trains), changes in the excitability of neurons and synaptic weights, and changes in the network dynamics through learning can be compared with corresponding measurements from networks of neurons in the brain. At the same time, the resulting new methods for learning nonlinear functions are also of interest for spike-based neuromorphic chips such as Brainscales (Schemmel et al., 2010), SpiNNaker (Furber et al., 2013), True North (Esser et al., 2016), chips from ETH Zürich such as (Qiao et al., 2015), and Loihi (Davies et al., 2018). Nonlocal learning rules such as backprop are real challenges for these neuromorphic devices, and alternative local rules for learning nonlinear functions are therefore of particular interest. The standard setup of L2L involves a large, possibly infinitely large, family F of learning tasks C. Some parameters P of a neural network N , in our case an LSNN, are optimized in an outer 6 optimization loop to support fast learning of a randomly drawn task C from F. Like in (Hochreiter et al., 2001) we let all synaptic weights W of N belong to the set of parameters P that are optimized through the outer loop, i.e., through meta-learning. Hence the network is forced to encode all results from learning the current task C in its internal state, in particular in its short-term memory. Thus the synaptic weights W of the neural network N encode an efficient algorithm for learning arbitrary tasks C from F, rather than results of learning a particular task C. The teacher input for learning a particular function C from F is given in (Hochreiter et al., 2001) in a delayed manner: The target output value of C is given after N has provided its guessed output value for the preceding input values. This avoids that N learns to cheat by simply using the teacher input as its guessed output value. We are using the same convention in our experiment. The learning methods that can possibly be encoded by the synaptic weights W range over a substantially larger range of local update rules than commonly considered for network learning. Note for example that most commonly considered local update rules are formulated as functions where a parameter update (e.g., a weight update) depends in a particular but smooth manner on previous parameter values and specific aspects of the recent network activity, such as spike times or rates of particular neurons. As long as this function is smooth, it can be approximated by a neural network. But importantly, ANY smooth update function – even a function that was previously never considered for neural network learning can be approximated by a neural network. The L2L approach of (Hochreiter et al., 2001) allows in principle in the outer optimization loop a search over the best performing ones among all these potential local update rules. They are only restricted to those that can be implemented by the neural network N . In particular, they are constrained to local learning rules if the neural network N only supports local rules for computing and changing the content of short-term memories, as is the case for the LSNNs N that we are considering here. For example, the network N is free to use the delayed teacher input for computing the error that it made on the preceding step, and to transmit this error through its internal spiking activity to other neurons in N , in particular also to adapting neurons. One of the more challenging family F of tasks considered by Hochreiter et al. (2001) for LSTM networks was the class of all quadratic functions over two real-valued variables. We found that L2L for this family F works also very well for LSNNs. We present here instead a potentially even more interesting variation of this L2L task, where F consists of all functions of two real-valued variables that can be realized by a minimal class of artificial neural networks: small two-layer target neural networks TN, i.e., feedforward networks with one hidden layer, consisting of sigmoidal (nonspiking) neurons. We found that LSNNs can learn to learn quickly to reproduce the input-output behavior of any such ANN TN, by just using their network dynamics and their internal states for learning and emulating this ANN. Note that BPTT was only used for the outer learning loop, in order to determine the synaptic weights W of the LSNN. But these could not be optimized for a particular target network TN. Constraints of compute time did not yet allow us to emulate learning for larger target networks TN, and we also did not try to optimize the architecture of the LSNN for this task. Hence the results below provide just a proof of concept. The target network TN represents a function C(x1 , x2 ), with 2 inputs x1 and x2 and 2 hidden neurons, with a sigmoid activation at both the hidden and output layers (shown in Fig. 3A). The outputs of this function, which serve as the targets for the output Y of the LSNN, are scaled to be between [0, 1]. 7 Figure 3: (Caption next page.) 8 Figure 3: Learning to Learn for SNNs. A Illustration of the two-layer feed-forward target network (TN) used to generate the targets for the LSNN to learn. B The architecture of the LSNN used for the learning to learn task. It received as inputs at each step x1 , x2 and the target from the previous step C(x01 , x02 ). Its prediction Ĉ(x1 , x2 ) was output through a linear readout. C Performance during training and testing. A new function (target network TN) was randomly chosen for each episode. The LSNN is enabled by its weights W to learn approximations to the input-output behavior of target networks TN that was significantly better than the best linear approximation to its inputoutput behavior. D The first 100 steps in a sample test episode where the network initially had high error, but after few steps learned to predict the new targets successfully. E The correlation of the output of the LSNN vs target outputs at the start, middle and end of training. F Sample spike raster during testing, of the input neurons (every third neuron, top panel), and the regular (middle panel) and adaptive neuron populations (bottom panel) for the same episode as in (D). The point where the error goes to 0 is marked by a red cross corresponding to the one in (D). The training procedure was as follows: Network training was divided into training episodes. At the start of each training episode, a new set of input pairs x1 , x2 ∈ [−1, 1] and new weights (between [−1, 1]) for the target network TN were randomly chosen and used to generate targets C(x1 , x2 ) ∈ [0, 1]. These input pairs and targets were used as training data and presented to the LSNN during the episode. The LSNN parameters were updated using BPTT to minimize the mean squared error between the LSNN output and the target in the training set, using gradients computed over batches of 10 such episodes. In other words, each weight update included gradients calculated on the input/target pairs from 10 different TNs, which prevented the LSNN from specializing on predicting the output of one single TN. In each episode, for the given TN, 500 different input/target pairs were presented, one per step. Each step lasted for 20 timesteps, which corresponds to 20 ms. The LSNN received at each step three input values as input: x1 , x2 and C(x01 , x02 ), where x01 , x02 were the inputs for the preceding step (i.e., C(x01 , x02 ) was the target of the previous step; it was set to 0 in the first step) during both the training and testing process, as illustrated in Fig. 3B. While testing, the weights of the LSNN remained fixed, and it was required to predict targets from functions Ctest ∈ F that it had never seen before. The input population consisted of three subpopulations of 100 neurons each, one population for each of the inputs x1 , x2 and C(x01 , x02 ). These input populations produced Poisson spike trains based on a Gaussian population-rate encoding of the input values, between 0 and 200 Hz. The range of each input was split evenly among all the neurons responsible for that input, and for each given analog input value, the firing rate of the neurons had a Gaussian activity profile with mean at that analog value, and a variance of 0.1. We used an LSNN architecture that contained, in addition to the connections of the standard architecture, connections from the regular-spiking to the adaptive population (see Fig. 3B), since performance of the standard architecture was much worse. The network contained 100 in each of the regular spiking and adaptive populations. A sample spike raster is shown in Fig. 3F (which is for the same episode as shown in Fig. 3D). The top panel shows the input values. During training, there was an initial steep drop in error (see Fig. 3C) when the network learned to output values in the same range as the target functions, see Fig. 3E left and middle. The performance of the network was compared to a linear baseline: for each TN, an optimal linear regressor was computed using the same input/target pairs presented to the LSNN. The mean squared error for the predictions of this linear regressor on these input/target pairs was the linear baseline. During testing, even though the network was shown target functions Ctest (x1 , x2 ) it had not seen before, the test error remained low. The temporal evolution of test errors for the first 100 steps in a sample test episode for a new target function C is shown in Fig. 3D. It can be seen that the network had a high error in the first few steps of the episode, but it quickly learned to output the correct targets, even though its weights W remained fixed. Thus the LSNN had learnt to learn in other ways than through changes of its synaptic weights. 9 5 D ISCUSSION We have shown that the inclusion of adapting neurons significantly enhances computing and learning capabilities of recurrent networks of spiking neurons. In particular we have shown that the resulting LSNN is able to integrate and maintain information over several seconds in a working memory. In fact, it is reasonable to assume that any duration for working memory can be achieved with corresponding large time constants of adapting neurons. Furthermore, our tests so far suggest that LSNNs are able to approach the computational power and learning capability of the generally best performing ANN model for temporal processing tasks: LSTM networks. BPTT tends to work well for LSNNs because the error gradient can be propagated through the slowly changing firing threshold of an adapting neuron without causing vanishing or exploding gradients. Hence adapting neurons appear to provide “highways” for propagating errors backwards even over 100s and 1000s of layers of an unrolled LSNN. A remarkable feature of a realization of working memory in SNNs through increased firing thresholds is that this method is very energy-efficient: When a memory is stored through an increased firing threshold, this tends to reduce firing activity in the SNN. In contrast, working memory was previously modelled in SNNs via persistent firing of a subset of neurons, i.e., through increased firing activity. In neuroscience there is an ongoing debate to what extent working memory is implemented in the brain through persistent firing or through activity-silent mechanisms (Stokes, 2015). Interestingly, experimental data show that also one form of long-term memory, familiarity, is expressed in some brain regions (perirhinal and entorhinal cortex) through reduced activity during the presentation of a familiar stimulus (Eichenbaum et al., 2007). These results are consistent with a memory model based on longer lasting increases of the firing threshold of specific subsets of neurons, see also (Titley et al., 2017). The implementation of short-term memory through neural adaptation is somewhat analogous to an interesting variant of long short-term memory in artificial neural networks (Mikolov et al., 2014). They introduced a particular population of neurons, termed context neurons, whose state changes on a slower time scale than that of the other neurons. If one interprets the firing threshold of adapting neurons as their “state”, then the dynamics of this state is analogous to the dynamics of context neurons in their approach. However, in the non-spiking setting of (Mikolov et al., 2014) one cannot see an advantage of this model with regard to energy-efficiency of a physical realization: the state of context neurons has to be read out at every discrete time step, like for all other neurons. In other words, a clocked network cannot make use of the possibility to convey information by not sending a message, as one can do in SNNs. This option, to maintain and use information by not firing, is extensively used by LSNNs. In (Costa et al., 2017) an LSTM module was modelled through a recurrent network of non-spiking neurons, i.e., of sigmoidal neurons whose analog outputs are interpreted as firing rates. Their model is consistent with models for working memory based on persistent firing. It achieved remarkable results for several datasets, including the same sequential MNIST data that we have considered for the case of spike-based network inputs and spike-based network computations. We have shown in Fig. 3 that the inclusion of adapting neurons in SNNs opens the door to porting methods and results on L2L from LSTM networks to SNNs. Our result suggests new ways of storing the “program” of a computation in SNNs: In the states of adapting neurons, i.e., in the working memory of the LSNN. Similarly as previously shown for artificial neural networks in (Hochreiter et al., 2001), this approach simultaneously opens the door to the exploration of new classes of learning algorithms for SNNs that could previously not be considered. In particular, our result shows that LSNNs can learn the input/output behaviour of feedforward artificial neural network with a hidden layer by just using readily available local mechanisms. This shows that LSNNs are able to emulate the function of backprop learning in quite different ways than considered so far. We will show in (Bellec et al., 2018) that LSNNs also pave the way for porting new ideas for learning to learn from rewards (Wang et al., 2016) to networks of spiking neurons. In particular, one can see that LSNNs are able to learn nontrivial sequential behaviors, and that they can make use of control transfer learning, as shown there for LSTM networks. 10 ACKNOWLEDGMENTS Research leading to these results has in parts been carried out on the Human Brain Project PCP Pilot Systems at the Juelich Supercomputing Centre, which received co-funding from the European Union (Grant Agreement #604102). We gratefully acknowledge Sandra Diaz, Alexander Payser and Wouter Klijn from the Simulation Laboratory Neuroscience of the Jülich Supercomputing Centre for their support. This research was carried out under partial support by the Human Brain Project of the European Union #720270 and #785907. R EFERENCES Allen Institute. c 2018 Allen Institute for Brain Science. Allen Cell Types Database, cell feature search. Available from: celltypes.brain-map.org/data. 2018. Guillaume Bellec, Anand Subramoney, Robert Legenstein, and Wolfgang Maass. Networks of spiking neurons learn to learn. In Preparation, 2018. Rui Costa, Ioannis Alexandros Assael, Brendan Shillingford, Nando de Freitas, and Tim Vogels. Cortical microcircuits as gated-recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 272–283, 2017. Matthieu Courbariaux, Itay Hubara, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained to+ 1 or-1. arXiv preprint arXiv:1602.02830, 2016. Mike Davies, Narayan Srinivasa, Tsung-Han Lin, Gautham Chinya, Yongqiang Cao, Sri Harsha Choday, Georgios Dimou, Prasad Joshi, Nabil Imam, Shweta Jain, et al. Loihi: A neuromorphic manycore processor with on-chip learning. IEEE Micro, 38(1):82–99, 2018. Howard Eichenbaum, Andrew P Yonelinas, and Charan Ranganath. The medial temporal lobe and recognition memory. Annu. Rev. Neurosci., 30:123–152, 2007. Steven K. Esser, Paul A. Merolla, John V. Arthur, Andrew S. Cassidy, Rathinakumar Appuswamy, Alexander Andreopoulos, David J. Berg, Jeffrey L. McKinstry, Timothy Melano, Davis R. Barch, Carmelo di Nolfo, Pallab Datta, Arnon Amir, Brian Taba, Myron D. Flickner, and Dharmendra S. Modha. Convolutional networks for fast, energy-efficient neuromorphic computing. Proceedings of the National Academy of Sciences, 113(41):11441–11446, November 2016. ISSN 0027-8424, 1091-6490. doi: 10.1073/pnas.1604850113. Robert C Froemke, Dominique Debanne, and Guo-Qiang Bi. Temporal modulation of spike-timing-dependent plasticity. Frontiers in synaptic neuroscience, 2:19, 2010. Steve B Furber, David R Lester, Luis A Plana, Jim D Garside, Eustace Painkras, Steve Temple, and Andrew D Brown. Overview of the spinnaker system architecture. IEEE Transactions on Computers, 62(12):2454– 2467, 2013. Wulfram Gerstner, Werner M. Kistler, Richard Naud, and Liam Paninski. Neuronal dynamics: From single neurons to networks and models of cognition. Cambridge University Press, 2014. Nathan W Gouwens, Jim Berg, David Feng, Staci A Sorensen, Hongkui Zeng, Michael J Hawrylycz, Christof Koch, and Anton Arkhipov. Systematic generation of biophysically detailed models for diverse cortical neuron types. Nature communications, 9(1), 2018. Abhishek Gupta, Russell Mendonca, YuXuan Liu, Pieter Abbeel, and Sergey Levine. Meta-reinforcement learning of structured exploration strategies. arXiv preprint arXiv:1802.07245, 2018. Geoffrey Hinton, Nitish Srivastava, and Swersky Kevin. Lecture 6d - a separate, adaptive learning rate for each connection. Slides of Lecture Neural Networks for Machine Learning, 2012. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pp. 87–94. Springer, 2001. Dongsung Huh and Terrence J Sejnowski. Gradient descent for spiking neural networks. arXiv preprint arXiv:1706.04698, 2017. 11 David Kappel, Stefan Habenschuss, Robert Legenstein, and Wolfgang Maass. Network Plasticity as Bayesian Inference. PLOS Computational Biology, 11(11):e1004485, 2015. David Kappel, Robert Legenstein, Stefan Habenschuss, Michael Hsieh, and Wolfgang Maass. Reward-based stochastic self-configuration of neural circuits. arXiv preprint arXiv:1704.04238, 2017. Diederik P Kingma and Jimmy Ba. arXiv:1412.6980, 2014. Adam: A method for stochastic optimization. arXiv preprint John Lisman and Nelson Spruston. Questions about STDP as a general model of synaptic plasticity. Frontiers in synaptic neuroscience, 2:140, 2010. Wolfgang Maass, Thomas Natschläger, and Henry Markram. Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural computation, 14(11):2531–2560, 2002. Tomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc’Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014. Christian Pozzorini, Skander Mensi, Olivier Hagens, Richard Naud, Christof Koch, and Wulfram Gerstner. Automated high-throughput characterization of single neurons by means of simplified spiking models. PLoS computational biology, 11(6):e1004275, 2015. Ning Qiao, Hesham Mostafa, Federico Corradi, Marc Osswald, Fabio Stefanini, Dora Sumislawska, and Giacomo Indiveri. A reconfigurable on-line learning spiking neuromorphic processor comprising 256 neurons and 128k synapses. Frontiers in neuroscience, 9:141, 2015. Johannes Schemmel, Daniel Brüderle, Andreas Grübl, Matthias Hock, Karlheinz Meier, and Sebastian Millner. A wafer-scale neuromorphic hardware system for large-scale neural modeling. In Circuits and systems (ISCAS), proceedings of 2010 IEEE international symposium on, pp. 1947–1950. IEEE, 2010. Mark G. Stokes. ‘Activity-silent’ working memory in prefrontal cortex: a dynamic coding framework. Trends in Cognitive Sciences, 19(7):394–405, 2015. Corinne Teeter, Ramakrishnan Iyer, Vilas Menon, Nathan Gouwens, David Feng, Jim Berg, Aaron Szafer, Nicholas Cain, Hongkui Zeng, Michael Hawrylycz, et al. Generalized leaky integrate-and-fire models classify multiple neuron types. Nature communications, 1(1):1–15, 2018. Heather K Titley, Nicolas Brunel, and Christian Hansel. Toward a neurocentric view of learning. Neuron, 95 (1):19–32, 2017. Jane X Wang, Zeb Kurth-Nelson, Dhruva Tirumala, Hubert Soyer, Joel Z Leibo, Remi Munos, Charles Blundell, Dharshan Kumaran, and Matt Botvinick. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016. 12 S UPPLEMENTARY I NFORMATION Neuron model: In continuous time the spike trains xi (t) and zj (t) are formalized as sums of Dirac pulses. Neurons are modeled according to a standard adaptive leaky integrate-and-fire model. A neuron j spikes as soon at its membrane potential Vj (t) is above its threshold Bj (t). At each spike time t, the membrane potential Vj (t) is reset by subtracting the current threshold value Bj (t). Importantly at each spike the threshold Bj (t) of an adaptive neuron is increased by a constant β. Then the threshold decays back to a baseline value b0j . Between spikes the membrane voltage Vj (t) and the threshold Bj (t) are following the dynamics τm V̇j (t) τa,j Ḃj (t) = −Vj (t) + Rm Ij (t) = b0j − Bj (t), (3) (4) where τm is the membrane time constant, τa,j is the adaptation time constant and Rm is the membrane resistance. The input current Ij (t) is defined as the weighted sum of spikes from external inputs and other neurons in the network: X X in rec Ij (t) = Wji xi (t − din Wji zi (t − drec (5) ji ) + ji ), i i in rec where Wji and Wji denote respectively the input and the recurrent synaptic weights and din ji rec and dji the corresponding synaptic delays. All network neurons are connected to a population of out . When network neuron j spikes, the output synaptic strength readout neurons with weights Wkj out Wkj is added to the membrane voltage yk (t) of all readout neurons k. yk (t) also follows the dynamics of a leaky integrator τm ẏk (t) = −yk (t). The physical units of voltages, currents, delays, Dirac pulses and synaptic weights are respectively Volt, Ampere, Second, Hertz and Coulomb. Implementation in discrete time: Our simulations were performed in discrete time with a time step δt = 1 ms. In discrete time, the spike trains are modeled as binary sequences xi (t), zj (t) ∈ {0, 1}. Neuron j emits a spike at time t if it is currently not in a refractory period, and its membrane potential Vj (t) is above its threshold Bj (t). During the refractory period following a spike, zj (t) is fixed to 0. The dynamics of the threshold is defined by Bj (t) = b0j + βbj (t) where β is a constant which scales the deviation bj (t) from the baseline b0j . The neural dynamics in discrete time reads as follows Vj (t + 1) = bj (t + 1) = αVj (t) + (1 − α)Rm Ij (t) − Bj (t)zj (t) ρj bj (t) + (1 − ρj )zj (t), (6) (7) where α = exp(− τδtm ) and ρj = exp(− τδt ). The term Bj (t)zj (t) implements the reset of the a,j membrane voltage after each spike. The current Ij (t) is the weighted sum of the incoming spikes. The definition of the input current in equation (5) holds also for discrete time, with the difference that spike trains now assume values in {0, 1}. Parameter values: For adaptive neurons, we used βj = 1.7, and for regular spiking neurons we used βj = 0 (i.e. Bj is constant). The baseline threshold voltage was b0j = 0.01 and the membrane time constant τm = 20 ms. Initial network weights were drawn from a Gaussian distribution Wji ∼ √w0 N (0, 1), where nin is the number of afferent neurons in the considered weight matrix (i.e., nin the number of columns of the matrix), N (0, 1) is the zero-mean unit-variance Gaussian distribution, and w0 is a weight scaling factor chosen to be w0 = R1Vm δt . For this choice, a spike transmitted with synaptic weight w0 resulted in an increase of post-synaptic potential of 1 − α. In this way, the standard initialization of synaptic weights initialized the networks in a stable regime producing realistic firing rates. In store-recall the test performance is computed over sequences of 32 consecutive store-recall pairs and averaged over 32 random input sequences. During training with BPTT the depth of the unrolled network is adapted to the distribution of store-recall delays. For expected delays of 2, 4, and 6 s it resulted in 3200, 5200 and 8000 unrolled time steps respectively. All networks were trained for 500 iterations. We used the Adam optimizer (Kingma & Ba, 2014) with default parameters and a 13 learning rate of 0.01, with sequences presented in batches of sizes indicated in Table 1 and 2 (as “batch size”). To avoid unrealistically high firing rates, the loss function contains a regularization term that minimizes the distance of average firing rate between individual neurons and a target firing rate of 10 Hz. In sequential MNIST all networks were trained for 36, 000 iterations with approximately 66, 000 parameters, with a batch size of 256, using the default Adam optimizer, and a learning rate initialized at 0.01 and decayed by a factor 0.8 every 2500 iterations. The baseline artificial RNN contains 128 hidden units and uses hyperbolic tangent as the activation function. The LIF network is formed by a fully connected population of 220 regular spiking neurons. In the learning to learn task, the network was trained for 5, 000 iterations with a batch size of 10 episodes, using the RMSProp (Hinton et al., 2012) optimizer, and a learning rate of 0.001. Propagation of gradients in recurrent networks of LIF neurons: In artificial recurrent neural networks such as LSTMs, gradients can be computed with back propagation through time (BPTT). For BPTT in spiking neural networks, complications arise from the non-differentiability of the output of spiking neurons, and from the fact that gradients need to be propagated either through continuous time or through many time steps if time is discretized. Therefore, in (Courbariaux et al., 2016; Esser et al., 2016) it was proposed to use a pseudo-derivative. dzj (t) := max{0, 1 − |vj (t)|}, dvj (t) V (t)−B (t) (8) where vj (t) denotes the normalized membrane potential vj (t) = j Bj (t)j . This made it possible to train deep feed-forward networks of deterministic binary neurons (Courbariaux et al., 2016; Esser et al., 2016). We observed that this convention tends to be unstable for very deep (unrolled) recurrent networks of spiking neurons (see Fig. 1E). To achieve stable performance we dampened the increase of back propagated errors through spikes by using a pseudo-derivative of amplitude γ < 1 (typically γ = 0.3): dzj (t) := γ max{0, 1 − |vj (t)|}. (9) dvj (t) Note that in adaptive neurons, gradients can propagate through many time steps in the dynamic threshold. This propagation is not affected by the dampening. 14 expected delay between “store” and “recall” instructions D (ms) batch size LSNN τa = 200ms LSNN τa = 2s LSNN τa = 4s LSNN τa = 6s LSNN τa = 8s LSNN τa spread over [0, 8]s LIF 200ms 2s 4s 6s uniform in [0-8]s 50 24 0.11 0.24 0.30 0.58 0.40 0.41 0.08 200 24 51 1.59 7.62 7.24 16.3 3.08 49 200 24 48 1.97 3.77 9.17 45.1 3.25 49 200 24 48 15.7 8.27 5.06 34.0 8.12 51 200 256 49 16.9 6.96 3.44 8.33 4.36 49 Table 1: Test error (%) on store-recall tasks with different delays, and different time constants of adapting neurons in LSNNs with the standard architecture. Mean test errors (over 3 random network initializations on test batch of size 512) reached by different networks after 500 training iterations. Best and second best results per task (column) are marked with boldface (D: pattern presentation time). For comparison, the performance of a fully connected recurrent SNN without adapting neurons is shown in the last row (LIF). expected delay D (ms) batch size Standard Fully connected Deep R 4s 200 24 3.25 6.39 0.41 uniform in [0-8]s 200 256 4.36 31.8 5.17 Table 2: Test error (%) of different LSNN architectures on two store-recall tasks. Mean test errors (over 3 random network initializations on test batch of size 512) reached by different networks after 500 training iterations. Rows show results for SSNs with different architectures. The adaptation time constants were spread for all these networks uniformly over [0, 8] s, like in the second to last row of Table 1. 15
9cs.NE
Comparison between two common collocation approaches based on radial basis functions for the case of heat transfer equations arising in porous medium K. Parand1,a , S. Abbasbandyb,∗, S. Kazemb , A.R. Rezaeia a arXiv:1008.2348v2 [math-ph] 16 Aug 2010 b Department of Computer Sciences, Shahid Beheshti University, G.C., Tehran, Iran Department of Mathematics, Imam Khomeini International University, Ghazvin 34149-16818, Iran Abstract In this paper two common collocation approaches based on radial basis functions have been considered; one be computed through the integration process (IRBF) and one be computed through the differentiation process (DRBF). We investigated the two approaches on natural convection heat transfer equations embedded in porous medium which are of great importance in the design of canisters for nuclear wastes disposal. Numerical results show that the IRBF be performed much better than the common DRBF, and show good accuracy and high rate of convergence of IRBF process. Keywords: Collocation method; Nonlinear ODE; Radial Basis Functions; Direct Inverse Multiquadric; Indirect Multiquadric; Porous media. PACS: 47.56.+r, 02.70.Hm 1. Introduction Natural convective heat transfer in porous media has received considerable attention during the past few decades. This interest can be attributed due to its wide range of applications in ceramic processing, nuclear reactor cooling system, crude oil drilling, chemical reactor design, ground water pollution and filtration processes. External natural convection in a porous medium adjacent to heated bodies was analyzed by Nield and Bejan [1], Merkin [2, 3], Minkowycz and Cheng [4, 5], Pop and Cheng [6, 7], Ingham and Pop [8]. In all of these analysis, it was assumed that boundary layer approximations are applicable and the coupled set of governing equations were solved by numerical methods. In this paper, the same approximations are applied to the problem of natural convection about an inverted heated cone embedded in a porous medium of infinite extent. No similarity ∗ Corresponding author. Tel:(+98912) 1305326 Fax:(+98281) 3780040 Email addresses: [email protected] (K. Parand), [email protected] (S. Abbasbandy), [email protected] (S. Kazem), [email protected] (A.R. Rezaei) 1 Member of research group of Scientific Computing. August 17, 2010 solution exists for the truncated cone, but for the case of full cone, if the prescribed wall temperature or surface heat flux is a power function of distance from the vertex of the inverted cone similarity solutions exist [1, 6], a great deal of information is available on heat and fluid flow about such cones as reviewed by Refs. [9, 10]. Bejan and Khair [11] used Darcy’s law to study the vertical natural convective flows driven by temperature and concentration gradients. Nakayama and Hossain [12] applied the integral method to obtain the heat and mass transfer by free convection from a vertical surface with constant wall temperature and concentration. Yih [13] examined the coupled heat and mass transfer by free convection over a truncated cone in porous media for variable wall temperature and concentration or variable heat and mass fluxes and [14] applied the uniform transpiration effect on coupled heat and mass transfer in mixed convection about inclined surfaces in porous media for the entire regime. Cheng [15] used an integral approach to study the heat and mass transfer by natural convection from truncated cones in porous media with variable wall temperature and [16] studied the Soret and Dufour effects on the boundary layer flow due to natural convection heat and mass transfer over a vertical cone in a porous medium saturated with Newtonian fluids with constant wall temperature. Natural convective mass transfer from upward-pointing vertical cones, embedded in saturated porous media, has been studied using the limiting diffusion [17]. The natural convection along an isothermal wavy cone embedded in a fluid-saturated porous medium are presented in [18, 19]. Lai and Kulacki [20] studied the natural convection boundary layer flow along a vertical surface with constant heat and mass flux including the effect of wall injection. In [21] fluid flow and heat transfer of vertical full cone embedded in porous media have been solved by Homotopy analysis method [22, 23]. Mathematical modeling of many problems in science and engineering leads to ordinary differential equations (ODEs) [24–28]. The methods based on radial basis functions (RBF) which are part of an emerging field of mathematics are famous ways to solve these kinds of problems . First studied by Roland Hardy, an Iowa State geodesist, in 1968, these methods allow for scattered data to be easily used in computations [29]. The concept of solving DEs by using RBFs was first introduced by Kansa [30]. Since then, it has received a great deal of attention from researchers. And consequently, many further interesting developments and applications have been reported (e.g. Zerroukat et al.[31], Mai-Duy and Tran-Cong[32, 33]). Essentially, in a typical RBF collocation method, each variable and its derivatives are all expressed as weighted linear combinations of basis functions, where the sets of network weights are identical. These closed forms of representations are substituted with the governing equations as well as boundary conditions, and the point collocation technique is then employed to discretize the system [27]. If all basis functions in networks are available in analytic forms, the RBF collocation methods can be regarded as truly meshless methods [34]. There are two basic approaches for obtaining new basis functions from RBFs, namely direct approach (DRBF) based on a differential process (Kansa [30]) and indirect approach (IRBF) based on an integration process (Mai-Duy and Tran-Cong [29, 32, 35]). Both approaches were tested on the solution of second order DEs and the indirect approach was found to be superior to the direct approach (Mai-Duy and Tran-Cong [32]). 2 In this paper we apply the DRBF and IRBF for solving natural convection of Darcian fluid about a vertical full cone embedded in porous media prescribed surface heat flux which is third order nonlinear ODE. 2. Problem formulation Consider an inverted cone with semi-angle γ and take axes in the manner indicated in Fig. 1(a). The boundary layer develops over the heated frustum x = x0 . The boundary layer equations for natural convection of Darcian fluid about a cone are [6]: ∂ ∂ (ru) + (rv) = 0, ∂x ∂y ρ∞ βKg cos γ(T − T∞ ) u= , µ ∂T ∂2T ∂T +v =α 2. u ∂x ∂y ∂y (2.1) (2.2) For a thin boundary layer, r is obtained approximately xsin(γ). Suppose that a power law of heat flux is prescribed on the frustum. Accordingly, the boundary conditions at infinity are: u = 0, T = T∞ , if y → ∞ (2.3) (2.4) and at the wall are v = 0 if y = 0. If the surface heat flux qw [6] is prescribed, qw is obtained as qw = −k( ∂T )y=0 = A(x − x0 )λ , ∂y x0 ≤ x ≤ ∞. For the case of a full cone (x0 = 0, F ig.1(b)) a similarity solution exists [6]. In the case of prescribed surface heat flux the similarity solution for the stream function ψ and T where u= 1 ∂ψ , r ∂y v=− 1 ∂ψ r ∂x (2.5) is of the form [6]: ψ = αr(Rax )1/3 f (η), 1 qw x T − T∞ = (Rax )− 3 θ(η), k y 1/3 η = (Rax ) , x (2.6) 3 where Rax = ρ∞ βgK cos(γ)qw x2 µαk (2.7) is the local Rayleigh number for the case of prescribed surface heat flux. The governing equations become f ′ = θ, λ + 5 ′ 2λ + 1 ′ fθ − f θ = 0, θ′′ + 2 3 subjected to boundary conditions as: f (0) = 0, θ′ (0) = −1, θ(∞) = 0. Finally from Eqs. (2.8) and (2.9) we have: (  ′′  ′ 2 f f − 2λ+1 (f ) = 0, ODE. f ′′′ + λ+5 2 3 ′′ B.C. f (0) = 0, f (0) = −1, f ′ (∞) = 0. (2.8) (2.9) (2.10) It is of interest to obtain the value of the local Nusselt number which is defined as [6]: qw x Nux = . (2.11) k(Tw − T∞ ) From Eqs. (2.11), (2.6) and (2.7) it follows that the local Nusselt number which is interest to obtain given by: Nux = Ra1/3 x [−θ(0)]. (2.12) 3. RBF Functions Let R+ = {x ∈ R, x ≥ 0} be the non-negative half-line and let φ : R+ → R be a continuous function with φ(0) ≥ 0. A radial basis function on Rd is a function of the form φ(kX − Xi k) (3.1) where X, Xi ∈ Rd and k.k denotes the Euclidean distance between X, Xi . If one chooses N points {Xi }N i=1 in R then by custom s(X) = N X i=1 λi φ(kX − Xi k); λi ∈ R, (3.2) is called a radial basis function as well [36]. In order to explain RBF methods briefly, suppose that the one-dimensional input data point set or the center set xi in the given domain Ω ⊆ R is given. The center point is not necessarily structured, that is, it can have an arbitrary distribution. The arbitrary grid structure is one of the major differences between the RBF method and other global methods. Such a meshfree grid structure yields high flexibility especially when the domain is irregular. In this work the uniform grid is used for RBF approximation. 4 3.1. Properties of RBF With a radial function φ(r) and with data values ui given at the locations xi , for i = 1, 2, ..., N the function s(x) = N X λi φi (x) (3.3) i=1 where r = ri = kx − xi k and φi (x) = φ(kx − xi k), interpolates the data if we choose the expansion coefficients λi in such a way that s(xj ) = uj , for j = 1, 2, ..., N [37, 38]. The expansion coefficients λi can therefore be obtained by solving the linear system AΛ = U, where: Aij = φ(kxj − xi k), Λ = [λ1 , λ2 , ..., λN ]T , U = [u1 , u2 , . . . , uN ]T . (3.4) (3.5) (3.6) All the infinitely smooth RBF choices listed in Table (1) will give coefficient matrices A in (3.4) which are symmetric and nonsingular [39], i.e. there is a unique interpolant of the form (3.3) no matter how the distinct data points are scattered in any number of space dimensions. In the cases of inverse quadratic, inverse multiquadric and GA the matrix A is positive definite and, for multiquadric (MQ), it has one positive eigenvalue and the remaining ones are all negative [39]. Interpolation using Conical splines and thin-plate splines (TPSs) can become singular in multidimensions [34]. However, low-degree polynomials can be added to the RBF interpolant to guarantee that the interpolation matrix is positive definite (a stronger condition than nonsingularity). For example, for the Conical RBF and Pm the TPS inPdNdimensions this becomes the case if we use as an interpolant s(x) = i=1 λi φ(kx − xi k) i=1 ai pi (x) + PN together with the constraints j=1 λj pi (xj ) = 0, for i = 1, 2, ..., m. Here pi (x) denotes a basis for polynomials of Pqd in Rd (Pqd denotes the space of d-variate polynomials of order not exceeding q) and m = (q − 1 + d)!/(d!(q − 1)!) [40]. 3.2. RBF Interpolation One dimensional function u(x) to be interpolated or approximated can be represented by an RBF as: N X λi φi (x) = ΦT (x)Λ (3.7) ΦT (x) = [φ1 (x), φ2 (x), ..., φN (x)], Λ = [λ1 , λ2 , ..., λN ]T , (3.8) (3.9) u(x) ≈ s(x) = i=1 where 5 x is the input and λi s are the set of coefficients to be determined. By choosing N interpolate nodes (xj , j = 1, 2, ..., N) in Ω ∪ ∂Ω, the function u(x) can be approximated in Ω ∪ ∂Ω. uj = N X λi φi (xj ), (j = 1, 2, ..., N). (3.10) i=1 To brief discussion on coefficient matrix we define: AΛ = U (3.11) where U =[u1 , u2 , ..., uN ]T , (3.12) A =[ΦT (x1 ), ΦT (x2 ), ..., ΦT (xN )]T  φ1 (x1 ) φ2 (x1 ) . . . φN (x1 )  φ1 (x2 ) φ2 (x2 ) . . . φN (x2 )  = .. .. .. ..  . . . . φ1 (xN ) φ2 (xN ) . . . φN (xN )    .  (3.13) Note that φi (xj ) = φ(kxi − xj k) therefore φi (xj ) = φj (xi ) consequently A = AT . The shape parameter c which is shown in Table (1) affects both the accuracy of the approximation and the conditioning of the interpolation matrix [44]. In general, for a fixed number of N, smaller shape parameters produce the more accurate approximations, but also are associated with a poorly conditioned A. The condition number also grows with N for fixed values of the shape parameter c. Many researchers (e.g.[41, 42]) have attempted to develop algorithms for selecting optimal values of the shape parameter. The optimal choice of the shape parameter is still an open question. In practice it is most often selected by brute force. Recently, Fornberg et. al.[43] have developed a Contour-Padé algorithm which is capable of stably computing the RBF approximation for all c > 0 [44]. The following theorem about the convergence of RBF interpolation is discussed [45, 46]. Theorem 3.1. assume xi , (i = 1, 2, ..., N) are N nodes in Ω which is convex, let h = max min kx − xi k2 x∈Ω 1≤i≤N R when φ̂(η) < c(1 + |η|)−(2l+d) for any u(x) satisfies (û(η))2 /φ̂(η)dη < ∞ we have kuN (α) − u(α) k∞ ≤ chl−α where φ(x) is RBF and the constant c depends on the RBF, d is space dimension, l and α are nonnegative integer. It can be seen that not only RBF itself but also its any order derivative has a good convergence. 6 3.3. Direct RBF for ODEs (DRBF) In the direct method, the closed form DRBF approximating function (3.7) is first obtained from a set of training points, and its derivative of any order, e.g. pth order, can then be calculated in a straightforward manner by differentiating such a closed form DRBF as follows: N N N X dk s(x) dk X dk φi (x) X [k] = k( λi φi (x)) = λi = λi Gi (x) k k dx dx i=1 dx i=1 i=1 (3.14) where [k] Gi (x) = dk φi (x)/dxk , k = 0, 1, ..., p. Now we aim to apply the DRBF method for solving the ODEs in general form : ( F (x, u, u′, ..., u(p−1) , u(p) ) = 0, a ≤ x ≤ b, u(i) (ei ) = αi+1 , i = 0, 1, ..., p − 1, (3.15) where ei ∈ {a, b} and u(i) (x) = di u(x)/dxi , F is known function and {αi }pi=1 are known constants. By substituting Eq. (3.7) in (3.15) and using Eq. (3.14) we have: F (x, s, s′ , ..., s(p) ) = F (x, N X i=1 [0] λi Gi (x), N X i=1 [1] λiGi (x), ..., N X [p] λi Gi (x)). i=1 Now, to obtain λi s (i = 1, 2, ..., N) we define the residual function: Res(x) = F (x, s, s′ , ..., s(p) ). (3.16) The set of equations for obtaining the coefficients {λi }N i=1 come from equalizing Eq. (3.16) N −p to zero at N − p interpolate nodes {xj }j=1 plus p boundary conditions: ( Res(xj ) = 0, j = 1, 2, ..., N − p, (3.17) PN [k] i=1 λi Gi (ei ) = αi+1 , k = 0, 1, ..., p − 1. Since the direct approach is based on a differentiation process, all derivatives obtained here are very sensitive to noise arising from the interpolation of DRBFs from a set of discrete data points. Any noise here, even at the small level, will be badly magnified with an increase in the order of derivative [29]. 7 3.4. Indirect RBF for ODEs (IRBF) In the indirect method, the formulation of the problem starts with the decomposition of the highest order derivative under consideration into RBFs. The obtained derivative expression is then integrated to yield expressions for lower order derivatives and finally for the original function itself. In contrast, the integration process, where each integral represents the area under the corresponding curve, is much less sensitive to noise. Based on this observation, it is expected that through the integration process, the approximating functions are much smoother and therefore have higher approximation power. Also To numerically explore tile IRBF methods with shape parameters for which the interpolation matrix is too poorly conditioned to use standard methods [47]. Let p be the highest order of the derivative under consideration the boundary value ODEs in general form Eq. (3.15) when (∃k s.t. ek = b) then we can define: N dp ŝ(x) X = λi φi (x), dxp i=1 Z X Z N N N p−1 X X d ŝ(x) [p−1] = λ φ (x)dx = λ φ (x)dx = λi hi (x) + d1 , i i i i dxp−1 i=1 i=1 i=1 (3.18) .. . dŝ(x) = dx = Z X N [2] λi hi (x)dx + d1 i=1 N X [1] λi hi (x) i=1 xp−3 xp−2 + d2 + ... + dp−1 (p − 2)! (p − 3)! xp−2 xp−3 + d1 + d2 + ... + dp−1 , (p − 2)! (p − 3)! Z X N xp−3 xp−2 [1] + d2 + ... + dp−1)dx λi hi (x) + d1 ŝ(x) = ( (p − 2)! (p − 3)! i=1 = N X i=1 [0] λi hi (x) + d1 xp−2 xp−1 + d2 + ... + dp−1 x + dp , (p − 1)! (p − 2)! where (R φi (x)dx, k = p − 1, [k] hi (x) = R [k+1] hi (x)dx, k = 0, 1, ..., p − 2. (3.19) Substituting Eqs. (3.18) in (3.16) at N interpolate nodes {xj }N j=1 plus p boundary conditions p the set of coefficients {λi }N and {d } is obtained as follow : j j=1 i=1 ( Res(xj ) = 0, ŝ(i) (ei ) = αi+1 , j = 1, 2, ..., N, i = 1, 2, ..., p. 8 4. Solving the model Consider governing equation of fluid flow and heat transfer of full cone embedded in porous medium that is expressed by Eq. (2.10) for prescribed surface heat flux. In the first step of our analysis, we approximate f (η) for solving the model by DRBF: f (η) ≃ s(η) = N X λi φi (η), (4.1) i=1 and f ′′′ (η) for solving the model by IRBF: N X d3 f (η) ≃ 3 ŝ(η) = λi φi (η). dη i=1 ′′′ The general form of problem appear to: ( Fλ (η, f, f ′ , f ′′ , f ′′′ ) = 0, f (0) = 0, f ′′ (0) = −1, f ′ (∞) = 0. (4.2) (4.3) To solve this problem we define residual function: Res(η) = Fλ (η, s, s′, s′′ , s′′′ ); f or DRBF, (4.4) Res(η) = Fλ (η, ŝ, ŝ′ , ŝ′′ , ŝ′′′ ); f or IRBF. (4.5) The unknown coefficients {λi }N i=1 come from equalizing Res(η) to zero at N interpolate nodes ηi from Uniform distribution between 0 and η∞ which we set 9/2 for this problem. 4.1. Solving the model by DRBF In the first step of solving, φi (η) is set by inverse multiquadric function which is shown in Table (1). Now, the residual function is constructed by substituting Eq. (4.1) in Eq. (4.4): Res(η) = N X i=1 N N N X 2λ + 1 X λ+5 X ′′ ′ )( λi φi (η))( λi φi (η)) − ( )( λi φi (η))2 . λi φi (η) + ( 2 3 i=1 i=1 i=1 ′′′ N −2 By using N − 2 interpolate nodes {ηj }j=1 plus two boundary conditions of Eq. (4.3) ′′ (f (0) = 0, f (0) = −1), the set of equations can be solved, consequently the coefficients {λi }N i=1 will be obtained:   Res(ηj ) = 0, j = 1, 2, ..., N − 2, P N i=1 λi φi (0) = 0,  PN ′′ i=1 λi φi (0) = −1. 9 Take into account φ′i (∞) = 0, for i = 1, 2, ..., N the infinity boundary condition (f ′ (∞) = 0) is already satisfied. Table (2) show the f ′ (η) for some λ in comparison with solutions of [21]. Also f ′ (η) for two selected λ = 1/4 and 3/4 are showed in Table (3) in comparison with Runge-Kutta solution is obtained by the MATLAB software command ODE45 which is used and applied by the authors in ref. [21]. Absolute errors show that DRBF give us approximate solution with a high degree of accuracy with a small N. The resulting graph of Eq. (2.10) is shown in Figure (2). 4.2. Solving the model by IRBF In the first of solving φi (η) is set by multiquadric function which is shown in Table (1). Now, the residual function is constructed by substituting Eq. (4.2) in Eq. (4.5) and using Eq. (3.18): Z Z Z Z N N N X X λ+5 X ) λi φi (η)dη λi φi (η)dη Res(η) = λi φi (η) + ( 2 i=1 i=1 i=1 Z Z N 2λ + 1 X −( )( λi φi (η)dη)2 3 i=1 = N X i=1 N N X d1 η 2 λ+5 X [0] [2] )( λi hi (η) + + d2 η + d3 )( λi hi (η) + d1 ) λi φi (η) + ( 2 2 i=1 i=1 N 2λ + 1 X [1] )( λi hi (η) + d1 η + d2 )2 . −( 3 i=1 By using N interpolate nodes {ηj }N j=1 plus three boundary conditions of Eq. (4.3) the set of 3 equations can be solved, consequently the coefficients {λi }N i=1 and {di }i=1 will be obtained. In this method we put η∞ instead of infinity condition:  Res(ηj ) = 0, j = 1, 2, ..., N,    PN λ h[0] (0) + d = 0, i i 3 Pi=1 [2] N   i=1 λi hi (0) + d1 = −1, PN  [1] i=1 λi hi (η∞ )d1 η∞ + d2 = 0. Table (4) shows the f ′ (η) for some λ in comparison with solutions of [21]. Also f ′ (η) for two selected λ = 1/4 and 3/4 are showed in Table (5) in comparison with Runge-Kutta solution is obtained by the MATLAB software command ODE45 which is used and applied by the authors in ref. [21]. Absolute errors show that IRBF give us approximate solution with a high degree of accuracy with a small N. The resulting graph of Eq. (2.10) is shown in Figure (3). A graph in figures (4) for λ = 2/3 show kResk2 for some N. Table (6) shows kResk2 for some N and λ. Comparison between DRBF solution in Table (3) with N = 12 and IRBF solution in Table (5) with N = 10 for f ′ (η) show that the convergence of the IRBF method is faster, because of using less numbers of collocation points. 10 5. Conclusion In this paper we made a comparison between the two common collocation approaches based on radial basis functions namely DRBF and IRBF methods on natural convection equation about an inverted heated cone embedded in a porous medium of infinite extent which are of great importance in the design of canisters for nuclear wastes disposal. These functions are proposed to provide an effective but simple way to improve the convergence of the solution by collocation method. The direct approach (DRBF) is based on a differentiation process, all derivatives are very sensitive to noise arising from the interpolation of DRBFs from a set of discrete data points. Any noise, even at the small level, will be bad magnified with an increase in the order of derivative. The indirect technique (IRBF) which is based on integration process, each integral represents the area under the corresponding curve, is much less sensitive to noise. Based on this observation, it is expected that through the integration process, the approximating functions are much smoother and therefore have higher approximation power. Additionally, through the comparison with other methods such as HAM we show that the RBFs methods have good reliability and efficiency. Also high convergence rates and good accuracy are obtained with the proposed method using relatively low numbers of data points. References [1] D.A. Nield, A. Bejan, Convection in Porous Media, third ed., Springer-Verlag, New York, (2006). [2] J.H. Merkin, Free convection boundary layers in a saturated porous medium with lateral mass flux, Int. J. Heat Mass Transfer, 21 (1978) 1499-1504. [3] J.H. Merkin, Free convection boundary layers on axisymmetric and two dimensional bodies of arbitrary shape in a saturated porous medium, Int. J. Heat Mass Transfer, 22 (1979) 1461-1462. [4] W.J. Minkowycz, P. Cheng, Local non-similar solutions for free convective flow with uniform lateral mass flux in a porous medium, Lett. Heat Mass Transfer, 9 (1982) 159-168. [5] W.J. Minkowycz, P. Cheng, F. Moalem, The effect of surface mass transfer on buoyancy induced Darcian flow adjacent to a horizontal heated surface, Int. Commun. Heat Mass Transfer, 12 (1985) 55-65. [6] P. Cheng, T.T. Le, I. Pop, Natural convection of a Darcian fluid about a cone, Int. Commun. Heat Mass Transfer, 12 (1985) 705-717. [7] I. Pop, P. Cheng, An integral solution for free convection of a Darcian fluid about a cone with curvature effects, Int. Commun. Heat Mass Transfer, 13 (1986) 433-438. [8] D.B. Ingham, I. Pop, Natural convection about a heated horizontal cylinder in a porous medium, J. Fluid Mech. 184 (1987) 157-181. [9] I. Pop, D.B. Ingham Convective heat transfer: mathematical and computational modeling of viscous fluids and porous media, Pergamon Press, Oxford, 2001. [10] K. Vafai, Handbook of porous media. Marcel Dekker, New York, 2000. [11] A. Bejan, K.R. Khair, Heat and mass transfer by natural convection in a porous medium, Int. J. Heat Mass Transfer, 28 (1985) 909-918. [12] A. Nakayama, M.A. Hossain, An integral treatment for combined heat and mass transfer by natural convection in a porous medium, Int. J. Heat Mass Transfer, 38 (1995) 761-765. [13] K.A. Yih, Coupled heat and mass transfer by free convection over a truncated cone in porous media: VWT/VWC or VHF/VMF, Acta Mech. 137 (1999) 83-97. [14] K.A. Yih, Uniform transpiration effect on coupled heat and mass transfer in mixed convection about inclined surfaces in porous media : the entire regime, Acta Mech. 132 (1999) 229-240. 11 [15] C.Y. Cheng, An integral approach for heat and mass transfer by natural convection from truncated cones in porous media with variable wall temperature and concentration, Int. Commun. Heat Mass Transfer, 27 (2000) 437-548. [16] C.Y. Cheng, Soret and Dufour effects on natural convection heat and mass transfer from a vertical cone in a porous medium, Int. Commun. Heat Mass Transfer, 36 (2009) 1020-1024. [17] S.U. Rahman, K. Mahgoub, A. Nafees, Natural Convective Mass Transfer from Upward Pointing Conical Surfaces in Porous Media, Chem. Eng. Commun. 194 (2007) 280-290. [18] I. Pop, T.Y. Na, Naturnal convection of a Darcian fluid about a wavy cone, Int. Commun. Heat Mass Transfer, 21 (1994) 891-899. [19] I. Pop, T.Y. Na, Natural convection over a frustum of a wavy cone in a porous medium, Mech. Res. Commun. 22 (1995) 181-190. [20] F. C. Lai and F. A. Kulacki, Coupled heat and mass transfer by natural convection from vertical surfaces in porous media, Int. J. Heat Mass Transfer, 34,4-5 (1991) 1189-1194. [21] A.R. Sohouli, M. Famouri, A. Kimiaeifar, G. Domairry, Application of homotopy analysis method for natural convection of Darcian fluid about a vertical full cone embedded in pours media prescribed surface heat flux, Commun. Nonlinear Sci. Numer. Simul. 15 (7) (2010) 1691-1699. [22] S. Abbasbandy, T. Hayat, Solution of the MHD Falkner-Skan flow by homotopy analysis method, Commun. Nonlinear Sci. Numer. Simul. 14 (9-10) (2009) 3591-3598. [23] S. Abbasbandy, Approximate solution for the nonlinear model of diffusion and reaction in porous catalysts by means of the homotopy analysis method, Chem. Eng. J. 136 (2008) 144-150. [24] K. Parand, M. Razzaghi, Rational Legendre approximation for solving some physical problems on semi-infinite intervals, Phys. Scr. 69 (2004) 353-357. [25] K. Parand, M. Dehghan, A. Pirkhedri, Sinc-collocation method for solving the Blasius equation, Phys. Lett. A, 373 (44) (2009) 4060-4065. [26] K. Parand, M. Dehghan, A.R. Rezaei, S.M. Ghaderi.An approximational algorithm for the solution of the nonlinear Lane-Emden type equations arising in astrophysics using Hermite functions collocation method, Comput. Phys. Commun. 2010; DOI:10.1016/j.cpc.2010.02.018. [27] K. Parand, A.R. Rezaei, S.M. Ghaderi, An approximate solution of the MHD Falkner-Skan flow by Hermite functions pseudospectral method, Commun. Nonlinear Sci. Numer. Simul. 2010; Doi:10.1016/j.cnsns.2010.03.022. [28] S. Abbasbandy, E. Shivanian, Exact analytical solution of a nonlinear equation arising in heat transfer, Phys. Lett. A, 374 (4) (2010) 567-574. [29] N. Mai-Duy, Solving high order ordinary differential equations with radial basis function networks, Int. J. Numer. Meth. Engng. 62 (6) (2005) 824-852. [30] E.J. Kansa, Multiquadrics-A scattered data approximation scheme with applications to computational fluiddynamics II. Solutions to parabolic, hyperbolic and elliptic partial differential equations, Comput. Math. Appl. 19 (8,9) (1990) 147-161. [31] M. Zerroukat, H. Power, C.S. Chen, A numerical method for heat transfer problems using collocation and radial basis functions, Int. J. Numer. Meth. Engng. 42 (1998) 1263-1278. [32] N. Mai-Duy, T. Tran-Cong, Numerical solution of differential equations using multiquadric radial basis function networks, Neural Netw. 14(2)(2001) 185-199. [33] N. Mai-Duy, T. Tran-Cong, Numerical solution of NavierStokes equations using multiquadric radial basis function networks, Int. J. Numer. Meth Fluids, 37 (2001) 65-86. [34] B. Fornberg, Comparisons between pseudospectral and radial basis function derivative approximations, IMA J. Numer. Anal. 30 (1) (2008) 149-172. [35] N. Mai-Duy, T. Tran-Cong, Approximation of function and its derivatives using radial basis function network methods, Appl. Math. Modelling, 27 (2003) 197-220. [36] M.A. Golberg, C.S. Chen, H. Bowman, Some recent results and proposals for the use of radial basis functions in the BEM, Eng. Anal. Bound. Elem. 23 (4) (1999) 285-296. [37] M.D. Buhmann, Radial basis functions, Cambridge University Press, Cambridge, 2003. [38] G.E. Fasshauer, Meshfree Approximation Methods with Matlab, World Scientific Publishing, Singapore, 12 (2007). [39] M.J.D. Powell, The theory of radial basis function approximation in 1990, Advances in Numerical Analysis, Clarendon, Oxford, (1992). [40] M. Dehghan, A. Shokri, A meshless method for numerical solution of the one-dimensional wave equation with an integral condition using radial basis functions, Numer. Algo. 52(3) (2009) 461-477. [41] R.E. Carlson, T.A. Foley, The parameter r2 in multiquadric interpolation, Comput. Math. Appl. 21 (9) (1991) 29-42. [42] S. Rippa, An algorithm for selecting a good parameter c in radial basis function interpolation, Adv. Comput. Math. 11 (1999) 193-210. [43] B. Fornberg, T. Dirscol, G. Wright, R. Charles, Observations on the behavior of radial basis function approximations near boundaries, Comput. Math. Appl. 43 (2002) 473-490. [44] S.A. Sarra, Adaptive radial basis function method for time dependent partial differential equations, Appl. Numer. Math. 54 (2005) 79-94. [45] Z.M. Wu, Radial basis function scattered data interpolation and the meshless method of numerical solution of PDEs, J. Eng. Math. 19 (2) (2002), pp. 112 [In Chinese]. [46] Z.M. Wu, R. Schaback, Local error estimates for radial basis function interpolation of scattered data, IMA J. Numer. Anal. 13 (1993) 13-27. [47] B. Fornberg, G. Wright, Stable computation of multiquadric interpolants for all values of the shape parameter, Computers Math. Applic. 48 (5/6) (2004) 853-867. 13 List of Figures 1 2 3 4 (a) Coordinate system for the boundary layer on a heated frustum of a cone, (b) full cone, x0 = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DRBF approximation of f ′ (η) for different values λ = 0, 1/4, 1/3, 1/2, 3/4 and 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IRBF approximation of f ′ (η) for different values λ = 0, 1/4, 1/3, 1/2, 3/4 and 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . kResk2 for λ = 2/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 16 17 18 List of Tables 1 2 3 4 5 6 Some well–known functions that generate RBFs (r = kx − xi k = ri ), c > 0 . A comparison between solutions obtained by [21] and the DRBF method for f ′ (0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison between DRBF solution and Runge-Kutta solution for f ′ (η) for λ = 1/4 and λ = 3/4 with N = 12 . . . . . . . . . . . . . . . . . . . . . . . . A comparison between solutions obtained by [21] and the IRBF method for f ′ (0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison between IRBF solution and Runge-Kutta solution for f ′ (η) for λ = 1/4 and λ = 3/4 with N = 10 . . . . . . . . . . . . . . . . . . . . . . . . kResk2 for different N and λ by IRBF . . . . . . . . . . . . . . . . . . . . . 14 20 21 21 22 22 23 xxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxx r(x)xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx g xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx u xxxxx xxxxx X0 x v xxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx y (a) (b) Figure 1: (a) Coordinate system for the boundary layer on a heated frustum of a cone, (b) full cone, x0 = 0. 15 Figure 2: DRBF approximation of f ′ (η) for different values λ = 0, 1/4, 1/3, 1/2, 3/4 and 1 16 Figure 3: IRBF approximation of f ′ (η) for different values λ = 0, 1/4, 1/3, 1/2, 3/4 and 1 17 Figure 4: kResk2 for λ = 2/3 18 Nomenclature A prescribed constant f similarity function for stream function temperature g acceleration due to gravity parameter K permeability of the fluid-saturated porous medium N ux local Nusselt number qw surface heat flux fluid-saturated porous medium r local radius of the cone fluid Rax local Raleigh number T temperature T∞ ambient temperature u, v velocity vector along x,y axis x, y Cartesian coordinate system x0 distance of start point of cone from the vertex Greek symbols α thermal diffusivity the fluid-saturated porous medium β expansion coefficient of the fluid η independent dimensionless θ similarity function for λ prescribed constants µ viscosity of the fluid ρ∞ density of the fluid at infinity ψ stream function 19 Table 1: Some well–known functions that generate RBFs (r = kx − xi k = ri ), c > 0 Name of functions Multiquadrics (MQ) Inverse multiquadrics (IMQ) Thin plate (polyharmonic)Splines (TPS) Conical splines Gaussian (GA) Exponential spline Definition √ r 2√+ c2 1/( r 2 + c2 ) (−1)k+1 r 2k log(r) r 2k+1 exp(−cr 2 ) exp(−cr) 20 Table 2: A comparison between solutions obtained by [21] and the DRBF method for f ′ (0) λ 0 1/4 1/3 1/2 3/4 1 Runge-Kutta Solution[21] 0.94760 0.91130 0.90030 0.87980 0.85220 0.82760 N 10 12 10 10 12 10 DRBF method c DRBF Error with RK 3.46543 0.94750 0.0001 3.943 0.91086 0.00044 4.9665 0.90038 0.0008 5.36 0.87981 0.00001 5.23 0.85227 0.00007 5.89 0.82737 0.00023 Other methods HAM[21] 0.94783 0.91119 0.90103 0.87964 0.85242 0.82726 Table 3: Comparison between DRBF solution and Runge-Kutta solution for f ′ (η) for λ = 1/4 and λ = 3/4 with N = 12 η 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 λ = 1/4, f ′(η) DRBF Runge-Kutta Solution Solution[21] 0.910886 0.911295 0.813122 0.813604 0.720720 0.721351 0.634656 0.635531 0.555601 0.556661 0.483877 0.484997 0.419467 0.420587 0.362196 0.363276 0.311655 0.312677 0.267358 0.268264 0.228756 0.229508 0.195268 0.195878 0.166342 0.166847 0.141450 0.141837 0.120090 0.120362 0.101811 0.102025 Error with RK 0.000409 0.000482 0.000631 0.000875 0.001061 0.001120 0.001120 0.001080 0.001022 0.000906 0.000752 0.000610 0.000505 0.000387 0.000272 0.000214 21 λ = 3/4, f ′(η) DRBF Runge-Kutta Solution Solution[21] 0.852268 0.852193 0.755678 0.755377 0.666229 0.665448 0.584176 0.582985 0.509628 0.508141 0.442519 0.440849 0.382620 0.380907 0.329539 0.327973 0.282878 0.281536 0.242076 0.241013 0.206652 0.205832 0.176015 0.175434 0.149653 0.149275 0.127026 0.126821 0.107681 0.107596 0.091167 0.091196 Error with RK 0.000075 0.000301 0.000781 0.001191 0.001487 0.001670 0.001713 0.001566 0.001342 0.001043 0.000820 0.000581 0.000378 0.000205 0.000085 0.000029 Table 4: A comparison between solutions obtained by [21] and the IRBF method for f ′ (0) λ 0 1/4 1/3 1/2 3/4 1 Runge-Kutta Solution[21] 0.94760 0.91130 0.90030 0.87980 0.85220 0.82760 N 10 10 10 10 10 10 c 1.860 2.005 2.050 2.150 2.418 2.380 IRBF method IRBF Error with RK 0.94758 0.00002 0.91128 0.00002 0.90030 0.00000 0.87979 0.00001 0.85206 0.00014 0.82762 0.00002 Other methods HAM[21] 0.94783 0.91119 0.90103 0.87964 0.85242 0.82726 Table 5: Comparison between IRBF solution and Runge-Kutta solution for f ′ (η) for λ = 1/4 and λ = 3/4 with N = 10 η 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 2 2.5 3 3.5 4 4.5 λ = 1/4, f ′ (η) IRBF Runge-Kutta Solution Solution[21] 0.911278 0.911295 0.813594 0.813604 0.721302 0.721351 0.635394 0.635531 0.556440 0.556661 0.484753 0.484997 0.420334 0.420587 0.362989 0.363276 0.312347 0.312677 0.267934 0.268264 0.229197 0.229508 0.195584 0.195878 0.166546 0.166847 0.141548 0.141837 0.120107 0.120362 0.101771 0.102025 0.043769 0.043951 0.018310 0.018546 0.007391 0.007610 0.002716 0.002953 0.000719 0.000962 0.000010 0.000123 Error with RK 0.000017 0.000010 0.000049 0.000137 0.000221 0.000244 0.000253 0.000287 0.000330 0.000330 0.000311 0.000294 0.000301 0.000289 0.000255 0.000254 0.000182 0.000236 0.000219 0.000237 0.000243 0.000113 22 λ = 3/4, f ′(η) IRBF Runge-Kutta Solution Solution[21] 0.852059 0.852193 0.755254 0.755377 0.665278 0.665448 0.582736 0.582985 0.507827 0.508141 0.440510 0.440849 0.380599 0.380907 0.327647 0.327973 0.281184 0.281536 0.240696 0.241013 0.205482 0.205832 0.175053 0.175434 0.148891 0.149275 0.126408 0.126821 0.107158 0.107596 0.090757 0.091196 0.038887 0.039223 0.016225 0.016574 0.006433 0.006832 0.002255 0.002668 0.000445 0.000913 −0.00001 0.000237 Error with RK 0.000134 0.000123 0.000170 0.000249 0.000314 0.000339 0.000308 0.000326 0.000352 0.000317 0.000350 0.000381 0.000384 0.000413 0.000438 0.000439 0.000336 0.000349 0.000399 0.000413 0.000468 0.000247 λ 0 1/4 1/3 1/2 3/4 1 N=5 1.161037 0.851976 0.770207 0.637068 0.469112 0.355474 Table 6: kResk2 for different N and λ by IRBF N=6 0.306257 0.278068 0.269714 0.216095 0.230425 0.221336 N=8 0.016229 0.018364 0.018842 0.016813 0.020280 0.020463 23 N=10 0.000108 0.000363 0.000494 0.000587 0.001051 0.001077 N=12 0.77e − 5 0.52e − 4 0.24e − 4 0.83e − 5 0.15e − 4 0.31e − 4 N=15 0.11e − 7 0.27e − 6 0.13e − 5 0.47e − 6 0.83e − 6 0.39e − 6
5cs.CE
AngularJS in the Wild: A Survey with 460 Developers Miguel Ramos Marco Tulio Valente arXiv:1608.02012v3 [cs.SE] 27 Sep 2016 UFMG, Brazil {miguel,mtov}@dcc.ufmg.br Ricardo Terra Gustavo Santos UFLA, Brazil [email protected] RMoD Team, INRIA, France [email protected] Abstract To implement modern web applications, a new family of JavaScript frameworks has emerged, using the MVC pattern. Among these frameworks, the most popular one is A NGU LAR JS, which is supported by Google. In spite of its popularity, there is not a clear knowledge on how A NGULAR JS design and features affect the development experience of Web applications. Therefore, this paper reports the results of a survey about A NGULAR JS, including answers from 460 developers. Our contributions include the identification of the most appreciated features of A NGULAR JS (e.g., custom interface components, dependency injection, and two-way data binding) and the most problematic aspects of the framework (e.g., performance and implementation of directives). Categories and Subject Descriptors D.3.3 [Frameworks] Keywords JavaScript, AngularJS, MVC frameworks. 1. Introduction JavaScript is a fundamental piece of modern Web applications. It was initially designed as a scripting language to extend web pages with small executable code. However, the language is used nowadays to construct a variety of complex systems (Kienle 2010; Silva et al. 2015). As a result, we are observing the birth of new technologies and tools—including JavaScript libraries and frameworks—to solve common problems faced in the development of such applications. For example, frameworks following the ModelView-Controller (MVC) architecture pattern (or variations of it) are widely used nowadays, including systems such as A NGULAR JS, BACKBONE . JS, and E MBER . JS. Among these frameworks, A NGULAR JS is probably the most popular one. This fact is evidenced by comparing the number of Google searches (the most queried framework since 2013), the num- ber of contributors in GitHub and the increasing number of questions and answers in Stack Overflow (the framework with more Q&A since mid-2013). However, despite the increasing practical interest on A N GULAR JS, there is no clear knowledge on how the design and features proposed by this framework affect the development experience of JavaScript software. More specifically, it is not clear what are the most appreciated features of A N GULAR JS, what are the main problems faced by developers when using the framework, and which aspects of A N GULAR JS can be improved. Answers to these questions are important to different developers. First, developers who use A NGULAR JS can learn how to improve this usage and also how to avoid bad A NGULAR JS programming practices. Second, developers who do not use JavaScript MVC frameworks can understand the benefits and problems related to these frameworks, by reviewing the case of A NGULAR JS. Third, MVC framework builders can use our results to design more powerful and usable frameworks. This paper reports the results of a survey with 460 developers, when we collected their perceptions about A NGU LAR JS. We reveal the relevant features of the framework, e.g., custom components, dependency injection, and twoway data binding. We also shed light on the most frequent problems faced by A NGULAR JS developers, e.g., due to the complexity of the API to declare directives. The remainder of the paper is organized as follows. Section 2 introduces A NGULAR JS. Section 3 documents the survey design and Section 4 presents the survey results. Threats to validity are presented in Section 5. Section 6 discusses related work and Section 7 concludes. 2. AngularJS in a Nutshell In this section, we briefly describe the key components of A NGULAR JS. A basic understanding of these components is important to interpret our survey results. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, contact the Owner/Author(s). Request permissions from [email protected] or Publications Dept., ACM, Inc., fax +1 (212) 869-0481. Modules: An A NGULAR JS application is a set of modules, which act as containers to the different parts of the application. Modules can also depend on other modules. PLATEAU ’16, November 01 2016, Amsterdam, Netherlands Copyright © 2016 held by owner/author(s). Publication rights licensed to ACM. ACM 978-1-4503-4638-2/16/11. . . $15.00 DOI: http://dx.doi.org/10.1145/3001878.3001881 Services: A NGULAR JS services are objects that encapsulate code related with a specific concern. They are instantiated 1 2 3 4 5 6 7 8 9 10 < html lang = " en " ng-app = " todomvc " > ... < header id = " header " > <h1 > todos </ h1 > < form ng-submit = " addTodo () " > < input placeholder = " What needs to be done ? " ng-model = " newTodo " / > </ form > </ header > ... </ html > Listing 1. Template sample only once by factories or constructor functions. The created singleton object is shared by the components that depend on it (e.g., controllers, directives, filters, and other services). Typically, A NGULAR JS services are stateless objects with a set of methods that deal with specific concerns, such as server requests, manipulation of arrays, asynchronous operations, etc. A NGULAR JS also provides built-in services to deal with common concerns in Web applications, such as $http, $filter, and $timeout. Templates: In Web applications, HTML documents are parsed to generate the DOM (Document Object Model), which is the data structure that models the final document presented to users. A NGULAR JS supports DOM-based templates, which are written in HTML and contain proprietary elements and attributes to render the dynamic interface of web applications. Listing 1 shows a sample template. It includes the definition of the document (html element in line 1) and the markup for the main input of the application, which is represented by the form element (line 5). Directives: Directives are specific HTML markers used in templates to define the UI behavior. In Listing 1, the ng-app attribute (line 1) is an A NGULAR JS directive that specifies the root node of the application. When directives are executed by A NGULAR JS they can modify the DOM structure and also register event handlers. During the compilation process, A NGULAR JS traverses the DOM and searches for all directives. The directives are executed in order of priority generating the final DOM presented to users. Directives can (1) use the same scope of the parent element; (2) create a scope that inherits from the scope of the parent element; or (3) create a completely new scope. It is also possible to create custom directives. Expressions: A NGULAR JS expressions are delimited by double curly brackets ({{expression}}) or are the values of some directive attributes. Literals (e.g., arrays ([]), objects ({})), operators, and variables are examples of elements that can be used in expressions. Expressions are evaluated using a context represented by an object, called scope. Variables and functions used in expressions must be defined in the scope object. During the template compilation, when the ng-app directive is parsed, A NGULAR JS creates an object representing the main application scope, which is referenced as the $rootScope. Since directives can define different scopes from $rootScope, expressions from different parts of the template may be evaluated under different scopes. When the value of an expression changes, A NGULAR JS updates the view accordingly. Controllers: A NGULAR JS controllers are used to initialize the state of an application and provide an interface to update it. Controllers are used with the ngController directive. When this directive is used in a template, it receives the name of a controller and the scope created by the directive is passed as a parameter to the specified controller. The controller must populate the scope object with properties and methods that are used when evaluating expressions. Digest Cycle: A NGULAR JS constantly maintains in sync the state of the application with the view presented to the final user. The framework provides this synchronization by comparing the current value of all variables in the scope referenced by the template expressions with their previous values. When a change is detected, the framework adequately updates the DOM, in a process known as digest cycle. 3. Survey Design First, we performed a Mapping Study (Section 3.1) to gather information about A NGULAR JS. We relied on the results of this first study to construct the survey. The survey participants were selected among Stack Overflow users (Section 3.2). 3.1 Mapping Study We use a mapping study to gather information about the use of A NGULAR JS. A mapping study is more flexible than a systematic review and it is recommended for studying emergent fields or technologies (Wohlin et al. 2012). For example, information about A NGULAR JS is primarily found in blogs, forums, and Q&A sites. Therefore, using the Google search engine, we initially focused on finding documents reporting the benefits and disadvantages of A NGULAR JS. To this purpose, we used search queries such as “the best features of AngularJS” or “the bad parts of AngularJS”. We also used two other strategies to reach more sources of information. First, we recursively accessed the references in the sites already reviewed (a practice called “snowballing”). Second, we performed additional search queries for frequently mentioned topics. As an example, we searched for “transclusion directives”, due to the frequency of references to this topic as a complex A NGULAR JS concept. During the revision of blogs, we only considered well-written posts, by authors with experience in software development. A complete list of the posts we consider is available in a companion website.1 Finally, these documents were analyzed and classified by identifying topic trends, which were used for the survey design. 1 https:// github.com/ aserg-ufmg/ angularjs-survey Figure 1. Selecting the survey participants 3.2 Survey Construction and Participants As a result of the mapping study, we built a 15-minute survey with 25 questions, organized in seven sections: (1) background of the participants, (2) key characteristics of A NGU LAR JS, (3) problems with A NGULAR JS templates, (4) debugging and testing, (5) development practices, (6) complex concepts and features, and (7) A NGULAR JS 2.0. To avoid unreliable responses, we asked developers to skip the questions they did not feel confident to answer. All the scales used in the survey have an even number of points, to force participants to make a choice. In multiple choice questions, when the respondents could provide a response not included in the set of answers, we included an Other option. To find participants, we used the Stack Exchange API2 to search for A NGULAR JS developers in the Stack Overflow community. As illustrated in Figure 1, we retrieved all existing tags with the substring “angularjs”. We retrieved 120,696 questions and 153,689 answers containing these tags. Next, we extracted data about three types of users: users who own a question (QO); users who own an answer (AO); or users who edited a question or answer (E). In this way, we collected a total of 74,005 users. To find their e-mail address, we matched each user nickname at StackOverflow with an equivalent nickname at GitHub. In this way, we obtained a total of 20,695 matched users (28%). However, only 8,084 users (10.9%) had public contact information at GitHub. In a last step, 7,157 users were marked as potential participants in the survey, because they have valid e-mail address and at least one operation with the collected answers that is not a simple edition. These users were ranked considering the number of A NGULAR JS-related questions and answers at Stack Overflow. Each user received the following score: S = QO +3∗AO, where QO is number of questions owned by the user and AO is the number of answers he owns. We gave an additional weight to answers since users who pro2 https:// api.stackexchange.com vide answers tend to have more experience than those who are looking for them. We randomly selected 30 users from the middle of the rank, with scores between 9 and 24, to run a pilot survey. Their feedback helped us to correct typographical errors and ambiguities in some questions. However, the most important change was in the structure of some questions. In the initial survey version, we used ranking questions, when survey respondents have to rank a list of items in order of importance. After this pilot study, we decided to change to rating questions (when respondents just have to rank each item in a scale ranging from 1 to 4) because some participants complained about the time to answer ranking questions. Due to these changes in the survey, the responses obtained during the pilot phase were discarded. The final version of the survey—which is also available in our companion website—was first sent to a group of 60 users. This time, we received complete responses and an improved response rate. Therefore, we extended the invitation to the rest of the users by daily emailing groups of nearly 700 users from the top of the ranking. At one point, we decided to stop due to replies from developers saying that they had a limited experience with A NGULAR JS. In total, we sent the survey to 3,060 users with score between 3 and 831. We received 460 complete responses, representing a response rate of 15%. The survey was open during approximately one month (from early November to early December 2015). 4. Survey Results 4.1 Background Figure 2 reveals the participants background. The majority of the respondents (97.6%) have at least one year of experience in JavaScript (Figure 2(a)), and 74.8% have one to three years of experience with A NGULAR JS (Figure 2(b)). For 37.4% of the developers, the largest application implemented with A NGULAR JS has more than 10 KLOC (Fig- (a) JavaScript experience (b) AngularJS experience (c) Largest application Custom interface components 452 (98%) Dependency injection 452 (98%) Two−way data binding 451 (98%) Behavior specified in HTML 440 (96%) Predefined components 439 (95%) Templates directly in HTML 447 (97%) One solution to many problems 434 (94%) Modeling with POJOs 443 (96%) Ease of tests 428 (93%) Google support 445 (97%) 40 20 0 1 (not valuable) 20 40 Percentage 2 3 60 80 Number of answers Figure 2. Respondents’ background 100 4 (very valuable) Figure 3. Key features and characteristics of AngularJS ure 2(c)). Therefore, we can conclude that at least the participants are not novice A NGULAR JS developers. 6. Ease of writing tests: A NGULAR JS provides the ngMock module to simulate logging operations, HTTP reqs, etc. 4.2 7. Two-way data binding: A NGULAR JS provides synchronization between data in the view and in the model. Key Characteristics and Features of AngularJS We asked developers about the the following features: 1. Pre-defined components for code organization: A NGU LAR JS has different components to modularize code, which may help in separation of concerns. 2. Dependency injection: This design pattern is used by A NGULAR JS to manage dependencies between components, to reduce coupling and increase testability. 3. Use of POJOs in model components: In A NGULAR JS, models are implemented using Plain Old JavaScript Objects (POJOs). There is no need to extend proprietary classes, for example, to provide accessor methods. 4. Templates in HTML: A NGULAR JS uses DOM-based templates to simplify data binding operations, event mapping, and updating of large interface components. 5. Support to custom components: Custom directives can be used as a DSL to define reusable UI components. 8. Use of HTML to declare UI behavior: The UI, including its behavior, is defined in standard HTML documents. 9. One solution to manage many problems: A NGULAR JS is an “opinionated framework”, meaning that its design handles common decisions related with Web apps. 10. Supported by Google: This support may guarantee the evolution and constant maintenance of the project. Figure 3 reports the value given by developers to these characteristics and features, ranging from not valuable (score 1) to very valuable (score 4). At the right of the charts, we include the number of answers of each item. Each individual item was rated by at least 93% of the participants. The top-3 features with more positive scores are the support to custom components, the use of dependency injection, and the support for two-way data binding. The characteristic 439 (95%) Dump/Debug problems 449 (98%) Modularity and SOC loss 434 (94%) Low readability of HTML 448 (97%) 80 70 60 50 40 1 (never) 30 20 10 Percentage 2 3 0 10 20 30 Number of answers Silent failures 40 4 (very often) Figure 4. How often these items represent a real problem caused by using code in A NGULAR JS templates? with the lowest number of positive answers is Google support, with 45.2% of the respondents seeing it as having no value (score 1) or limited value (score 2). 4.3 Code in HTML Templates In the mapping study, we detected four possible problems related to placing code in A NGULAR JS templates: 1. Silent failures: In A NGULAR JS, when undefined functions or objects are used in templates no exceptions are raised. As a consequence, applications might fail silently. 2. Code hard to debug: Since the code used in A NGULAR JS templates is not pure JavaScript, it is not possible, for example, to define break points. 3. Low readability: A NGULAR JS code might be spread all over the HTML document, hindering readability. 4. Modularity and Separation of Concerns: The use of large amount of JavaScript code in HTML is often seen as bad smell (Nguyen et al. 2012), which might hinder separation of concerns. We asked developers whether these issues are real problems in their daily development. In this case, the score 1 means the issue was never a problem and a score 4 means it is a very frequent problem. As shown in Figure 4, none of the issues have a major detrimental impact, according to the respondents; they have at least 60% of the answers in the low part of the scale (scores 1 or 2). In a separate question, we asked if the developers had at least once used large amounts of logic in HTML templates and 26.3% of them answered positively. Since this is not a recommended practice, we asked them to indicate possible reasons for their decision The two most voted reasons are A NGULAR JS design (54.8%) and the lack of experience in A NGULAR JS (43.5%). Lack of experience in Web architecture and in JavaScript were also voted (20.9% and 4.3%, respectively). We also gave the respondents the possibility to indicate other reasons, which were provided by 31 developers. These reasons include, for example, tight deadlines, special cases, easiness or laziness, prototyping purposes, etc. 4.4 Testing First, we asked the participants to rate the frequency they make use of mocking (provided by the ngMock module) when testing their systems. From 441 answers, 72.8% indicated they never or rarely use this module (scores 1 or 2). Possible reasons for this result include limited usefulness of ngMock features, unfamiliarity with the module, and few developers putting testing into practice. We also asked the participants to rank how complex is testing A NGULAR JS components, from very easy to very difficult. As presented in Figure 5, services, filters, controllers, and providers received the higher number of answers with scores 1 and 2. The reason is that these components are very common and usually do not include complex code or code that deals with complex APIs. For example, most code in filters only make string transformations. By contrast, the two components more difficult to test are transclusion directives and directives with external templates. Probably, developers find these directives more difficult to test because they demand a deeper understanding of A NGULAR JS concepts. For example, when creating directives, there are different types of transclusion, different types of scopes, and different ways to interact with the DOM API. 4.5 Complex Concepts and Features We asked the participants to evaluate several characteristics of A NGULAR JS, which were originally identified in the 337 (73%) Directives with external templates 350 (76%) Simple HTML directives 371 (81%) Providers 361 (78%) Controllers 386 (84%) Filters 369 (80%) Services 381 (83%) 80 60 40 1 (very easy) 20 0 Percentage 2 3 20 40 Number of answers Transclusion directives 60 4 (very difficult) Performance degradation details 413 (90%) Transclusion directives API 397 (86%) Directive scopes 424 (92%) Compile, link and controller functions 424 (92%) Correct use of $scope.$apply 425 (92%) Dependency registration methods 419 (91%) Scopes prototypal inheritance 414 (90%) External components integration 416 (90%) Dependency injection methods 419 (91%) 80 60 40 1 (very simple) 20 0 20 Percentage 2 3 40 60 Number of answers Figure 5. How difficult is it to test these A NGULAR JS components? 80 4 (very complex) Figure 6. How complex are the the following A NGULAR JS aspects and features? mapping study as complex concepts. The following characteristics were proposed: (1) use of different scopes in directives; (2) use of prototypes to simulate scope inheritance; (3) different types of entities to register dependencies; (4) compile, link, and controller functions (necessary to implement DOM-related directives); (5) transclusion directives; (6) correct use of $scope.$apply to manually trigger the digest cycle; (7) tackling of performance degradation details; (8) integration with external components and plug-ins; and (9) correct usage of the syntax to inject dependencies (in order to avoid unexpected results when minifying the code). Figure 6 summarizes the developers’ classification from very simple concept (score 1) to very complex one (score 4). Tackling all the details that can lead to performance degradation was rated by 76% of the participants as a complex task. The next three items in terms of complexity are transclusion directives, the different scopes that can be used when building directives, and the correct use of the functions compile, link, and controller. All these items are somehow re- Integration with ES6 modules New API for UI components definition Component router New mechanism for change detection New mobile features Server rendering New template syntax New API for dependency injection No more $scope.$apply Execution time measurement service Other 0 10 20 30 40 50 60 70 Percent of developers Figure 7. Most expected A NGULAR JS 2.0 features lated with the implementation of directives. The remaining items were rated as more simple than complex, mainly the integration with external components and the use of the correct syntax to inject dependencies. In a separate question, we asked the developers about the frequency they create directives. As a result, 83.5% of the participants answered they often or very often create their own directives. Despite this fact, many tasks and features related to the implementation of directives are usually considered complex by the survey participants. 4.6 • The two problems that arise more frequently regarding the use of code in A NGULAR JS templates are the emergence of silent failures and the difficulty to dump/debug the variables referenced in the HTML. New debug tools and techniques can then be developed to alleviate these problems faced by developers. AngularJS 2.0 To reveal the most expected features or improvements in A NGULAR JS 2.0, we selected the following features that appeared in the mapping study: (1) the new API to define the main UI building blocks; (2) Zone.js (no more $scope.$apply()); (3) server rendering; (4) the new logging service, called diary.js; (5) new mobile features (e.g. support for touch event gestures); (6) the new template syntax; (7) the new change detection mechanism; (8) the new API for injecting dependencies; (9) integration with ECMAScript 6 (ES6) modules; (10) component router, which allows asynchronous loading. Figure 7 indicates that the most expected feature is the integration with ES6 modules (68.3%). The second most expected feature is the new API to create UI components, which is expected because the current API is perceived by most developers as difficult to use and understand (see Section 4.5). The third most expected feature is the component router, which allows the dynamic loading of UI components, followed by the new change detection mechanism. 4.7 ponents by means of custom directives, the use of dependency injection, and the ease to set up two-way data binding. Therefore, JavaScript MVC framework builders can embrace these characteristics and improve them by offering a more simple interface to build reusable UI components (without exposing final users to internal concepts and decisions) and by using better mechanisms to detect changes in the model (i.e., mechanisms that reduce the number of details to be considered). Key Findings and Implications The main findings of our survey are as follows: • Three characteristics of A NGULAR JS excel by the value that developers give to them: the ability to create UI com- • The two main reasons for placing large amounts of logic in templates are the lack of experience in A NGULAR JS and the design of the framework. This shows the importance of correctly training developers before they start to use A NGULAR JS on complex applications. It also reveals an opportunity for framework builders to investigate new framework designs. • The components that are more difficult to test in A NGU LAR JS are directives, mainly the ones using transclusion; the remaining components (i.e., controllers, services, filters, etc.) are mostly considered easy to test. 5. Threats to Validity The first threat to validity relates to the execution of the mapping study. Due to the large amount of information on the Internet about A NGULAR JS, it is possible that literature addressing more specific topics about the framework or presenting different points of view was not included. Regarding the construction of the questionnaire, the main threat is the insertion of ambiguous and leading questions. We made our best to avoid this problem by constantly reviewing and improving the proposed questions. Additionally, we ran a pilot survey to identify and correct this type of questions. In some questions, we also gave the participants the opportunity to respond with an answer different from the proposed ones by adding an “Other” option. Furthermore, with the exception of the background questions, no question was mandatory. Therefore, participants were not forced to provide answers when they did not want or when they were not sure about their answers. There are also two threats related to the method used to retrieve the participants’ e-mails. The first one is related with the match between the Stack Overflow profile and the GitHub profile of the participants. It is possible that a Stack Overflow user has been matched with a homonym user in GitHub (i.e., users who have exactly the same login name, but who are different people). Additionally, it is possible that the heuristic used to assess and rank the expertise of the selected developers does not reflect the reality. There are also some aspects that limit the generalization of our results (external validity). First, the sample for the survey was selected only from the Stack Overflow community. Therefore, it is possible that the findings in this study do not apply to a different population. Moreover, constant and rapid changes in Web development environments, including new technologies and new versions of A NGULAR JS, can lead to different results if the study is repeated in the future. Finally, we have to mention threats related to human behavior. For instance, we can mention the ordering of the questions since one may provide context for the next one. Another threat is the attitude of the participants towards the topic of research. Their responses can introduce bias to make A NGULAR JS appear in a positive or negative light. We can mention the case of one participant who declared that he is a contributor of the A NGULAR JS project. Ocariza et al. (2015) proposed two types of inconsistencies that can be found in A NGULAR JS applications: (i) when identifiers used in one layer are undefined in the lower layer; and (ii) when values assigned to a variable, or returned by a function, do not match their type in the view. According to the authors, both inconsistencies are not easily caught during development and might cause bugs. However, in our survey, only 39% of the respondents considered that silent failures, corresponding to identifier inconsistency, are real problems in their daily development. Moreover, 84.5% of the respondents considered two-way data binding, which relates to type consistency, as a valuable feature. Both results shed light over real problems developers face when they use A NGULAR JS. 7. Conclusion This paper reported an empirical study about different aspects of A NGULAR JS based on opinions and experiences of developers. Our main contributions include the identification of the most appreciated features of A NGULAR JS (e.g., custom interface components, dependency injection, and twoway data binding) and the most problematic aspects of the framework (e.g., performance degradation and implementation of directives). Future work includes an analysis of the results using statistical tests. Interviews with A NGULAR JS developers can also contribute to strengthen our findings. Acknowledgments Our research is supported by FAPEMIG and CNPq. We also deeply thank the 460 developers who answered the survey. References B. Dobing and J. Parsons. How UML is used. Commununications of the ACM, 49(5):109–113, 2006. H. M. Kienle. It’s about time to take JavaScript (more) seriously. IEEE Software, 27(3):60–62, 2010. 6. Related Work Some works have been focusing on practitioners’ use of known technologies. Dobing and Parsons (2006) conducted the first survey on how UML diagrams are used by practitioners and their clients. The authors gathered 182 responses from analysts with average experience of 4.7 years in UML. Class diagrams are being used regularly by the majority of the respondents, followed by Sequence and Use Case diagrams. Some of the reasons why a UML diagram is not used vary from “not well understood by analysts” to “insufficient value to justify the cost”. In another study, Petre (2013) reported two years of interviews with practitioners. Most of them (35 out of 50) currently do not use UML at all, due to notation overhead, lack of context, etc. Both work highlight the complexity of UML. They also suggest that more tooling is needed for both newcomers and professionals in order to use the language more effectively. H. V. Nguyen, H. A. Nguyen, T. T. Nguyen, A. T. Nguyen, and T. N. Nguyen. Detection of embedded code smells in dynamic web applications. In 27th International Conference on Automated Software Engineering (ASE), pages 282–285, 2012. F. Ocariza, K. Pattabiraman, and A. Mesbah. Detecting inconsistencies in JavaScript MVC applications. In 37th International Conference on Software Engineering (ICSE), pages 325–335, 2015. M. Petre. UML in practice. In 35th International Conference on Software Engineering (ICSE), pages 722–731, 2013. L. Silva, M. Ramos, M. T. Valente, N. Anquetil, and A. Bergel. Does Javascript software embrace classes? In 22nd International Conference on Software Analysis, Evolution and Reengineering (SANER), pages 73–82, 2015. C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslén. Experimentation in software engineering. Springer, 2012.
2cs.AI
ActionFlowNet: Learning Motion Representation for Action Recognition Joe Yue-Hei Ng1 Jonghyun Choi2 Jan Neumann3 Larry S. Davis1 1 2 3 University of Maryland, College Park Allen Institute for AI Comcast Labs, DC arXiv:1612.03052v3 [cs.CV] 16 Feb 2018 {yhng,lsd}@umiacs.umd.edu [email protected] Abstract We present a data-efficient representation learning approach to learn video representation with small amount of labeled data. We propose a multitask learning model ActionFlowNet to train a single stream network directly from raw pixels to jointly estimate optical flow while recognizing actions with convolutional neural networks, capturing both appearance and motion in a single model. Our model effectively learns video representation from motion information on unlabeled videos. Our model significantly improves action recognition accuracy by a large margin (23.6%) compared to state-of-the-art CNN-based unsupervised representation learning methods trained without external large scale data and additional optical flow input. Without pretraining on large external labeled datasets, our model, by well exploiting the motion information, achieves competitive recognition accuracy to the models trained with large labeled datasets such as ImageNet and Sport-1M. 1. Introduction Convolutional Neural Networks have demonstrated great success to multiple visual recognition tasks. With the help of large amount of annotated data like ImageNet, the network learns multiple layers of complex visual features directly from raw pixels in an end-to-end manner without relying on hand-crafted features. Unlike image labeling, manual video annotation often involves frame-by-frame inspection and temporal trimming of videos that are expensive and time consuming. This prohibits the technique to be applied to other problem domains like medical imaging where data collection is difficult. We focus on effectively learning video motion representation for action recognition without large amount of external annotated video data. Following previous work [17, 28, 6] that leverages spatio-temporal structure in videos for unsupervised or self-supervised representation learning, we are interested in learning video representation from motion information encoded in videos in addition to semantic la- bels. jan [email protected] CxTxHxW 3x16x224x224 128x16x56x56 512x4x14x14 … 64x16x112x112 Optical Flow 256x8x28x28 64x16x56x56 128x8x28x28 256x4x14x14 512x2x7x7 … concat 3D-conv Action Label 3D-resnet fc Figure 1: ActionFlowNet for jointly estaimting optical flow and recognizing actions. Orange and blue blocks represent ResNet modules, where blue blocks represents strided convolution. Channel dimension is not shown in the figure. Learning motion representation on videos from raw pixels is challenging. With large scale datasets such as Sports1M [10] and Kinetics [11], one could train a high capacity classifier to learn complex motion signatures for action recognition by extending image based CNN architectures with 3D convolutions for video action recognition [10, 26, 2]. However, while classification loss is an excellent generic appearance learner for image classification, it is not necessarily the most effective supervision for learning motion features for action recognition. As shown in [2], even with large amount of labeled video data, the model still benefits from additional optical flow input stream. This suggests that the model is ineffective in learning motion representation for action recognition from video frames, and thus alternative approach should be explored for learning video representation. Two-stream convolutional neural networks, which separately learn appearance and motion by two convolutional networks on static images and optical flow respectively, show impressive results on action recognition [22]. The separation, however, fails to learn the interaction between the motion and the appearance of objects, and introduces additional complexity of computing the flow to the classification pipeline. In addition, human visual system does not take optical flow as front end input signals but infer the motion from raw intensities internally. Therefore, we focus to learn both motion features and appearance directly from raw pixels without hand-crafted flow input. Encouraged by the success on estimating optical flow with convolutional neural networks [7], we train a single stream feed-forward convolutional neural network ActionFlowNet - for jointly recognizing actions and estimating optical flow. Specifically, we formulate the learning problem as multitask learning, which enables the network to learn both appearance and motion in a single network from raw pixels. The proposed architecture is illustrated in Figure 1. With the auxiliary task of optical flow learning, the network effectively learns useful representations from motion modeling without a large amount of human annotation. Based on the already learned motion modeling, the model then only requires action annotations as supervision to learn action class specific details, which results in requiring less annotation to perform well for action recognition. Our experiments and analyses show that our model successfully learns motion features for action recognition and provide insights on how the learned optical flow quality affects action classification. We demonstrate the effectiveness of our learned motion representation on two standard action recognition benchmarks - UCF101 and HMDB51. Without providing external training data or fine-tuning from already well-trained models with millions of samples, we show that jointly learning action and optical flow significantly boosts action recognition accuracy compared to state-ofthe-art representation learning methods trained without external labeled data. Remarkably, our model outperforms the models trained with large datasets Sports-1M pretrained C3D by 1.6% on UCF101 dataset, showing the importance of feature learning algorithms. 2. Related Work Over the past few years, action recognition accuracy has been greatly improved by learned features and various learning models utilizing deep networks. Two-stream network architecture was proposed to recognize action using both appearance and motions separately [22]. A number of follow up methods have been proposed based on twostream networks that further improved action recognition accuracies [5, 31, 30, 4, 18]. Our work is motivated by their success in incorporating optical flow for action recognition, but we focus on learning from raw pixels instead of relying on hand-crafted representations. Optical flow encodes motion between frames and is highly related to action recognition. Our model is motivated by the success of FlowNet [7] and 3D convolutions for optical flow estimation in videos [27], but emphasizes on improving action recognition. Pre-training the network with a large dataset helps to learn appearance signatures for action recognition. Karpathy et al. proposed a “Slow Fusion” network for large scale video classification [10]. Tran et al. trained a 3D convo- lutional neural network (C3D) with a large amount of data and showed the learned features are generic for different tasks [26]. Recently, Carreira and Zisserman trained I3D models [2] on the Kinetics dataset [11] and achieved strong action recognition performance. In contrast, since training networks on such large scale datasets is extremely computationally expensive, we focus on learning from small amounts of labeled data. With only small amount of labeled data, we show that our model performs competitive to models trained with large datasets. Leveraging videos as a source for unsupervised learning has been suggested to learn video representations without large labeled data. Different surrogate tasks have been proposed to learn visual representations from videos without any labels. Wang et al. trained a network to learn visual similarity for patches obtained from visual tracking in videos [32]. Misra et al. trained a network to differentiate the temporal order of different frames from a video [17]. Jacob et al. learned apperance features by predicting the future trajectories in videos [29]. Fernando et al. proposed Odd-One-Out networks (O3N) to identify video sequences that are out of order for self-supervised learning [6]. Our work, similarly, uses video as an additional source for learning visual representation. However, in contrast to previous work which focused on learning visual representations for a single image, we learn motion representations for videos which models more than a single frame. Vondrick et al. used a Generatie Adversarial Network to learn a generative model for video [28]. We focus on learning motion representations but not video generation. Independent to our work, Diba et al. trained a two stream network with flow estimation [3]. They based their network on C3D with a two-stream architecture. Our work employs a single stream network to learn both appearance and motion. While we both estimate motion and recognize actions in the same model, we focus on learning motion representations without pretraining on large labeled datasets and provide more analysis to learn flow representations for action recognition. 3. Approach We propose a single end-to-end model to learn both motions and action classes simultaneously. Our primary goal is to improve action classification accuracy with the help of motion information; we use optical flow as a motion signature. Unlike previous methods that utilize externally computed optical flow as the input to their models, we only use the video frames for input and simultaneously learn the flow and class labels. 3.1. Multi-frame Optical Flow with 3D-ResNet Fischer et al. proposed FlowNet [7] that is based on convolutional neural networks to estimate high quality optical flow. Tran et al. proposed to use 3D convolution and deconvolution layers to learn multi-frame optical flow from videos [27]. In addition, He et al. introduced residual networks (ResNet) to train a deeper convolutional neural network model by adding shortcut connections [8]. In addition to the benefit of easy training, ResNet is fully convolutional, so is easily applied to pixel-wise prediction of optical flow, unlike many architectures with fully connected layers including AlexNet [13] and VGG-16 [23]. In contrast to other classification architectures like AlexNet and VGG-16, which contains multiple max pooling layers that may harm optical flow estimation, the ResNet architecture only contains one pooling layer right after conv1. We believe the reduced number of pooling layers makes ResNet more suitable for optical flow estimation where spatial details need to be preserved. Specifically, we use an 18 layers ResNet, which is computationally efficient with good classification performance [8]. Taking advantage of ResNet for flow estimation, we extend ResNet-18 to 3D-ResNet-18 for multi-frame optical flow estimation by replacing all k × k 2D convolutional kernels with extra temporal dimension k × k × 3, inspired by [27]. The deconvolution layers in the decoder are extended similarly. Skip connections from encoder to decoder are retained as in [7] to obtain higher resolution information in the decoder. Unlike [7], we only use the loss on the highest resolution to avoid downsampling in the temporal dimension. We do not apply temporal max pooling suggested in [26, 27], but use only strided convolutions to preserve temporal details. After the third residual block, the temporal resolution is reduced by half when the spatial resolution is reduced. Future Prediction. In addition to computing the optical flow between the T input frames, we train the model to predict the optical flow on the last frame, which is the optical flow between the T th and (T + 1)st frames. There are two benefits of training the model to predict the optical flow of the last frame: 1) It is practically easier to implement a model with the same input and output sizes, since the output sizes of deconvolution layers are usually multiples of the inputs; and 2) Semantic reasoning is required for the model to extrapolate the future optical flow given the previous frames. This possibly trains the model to learn better motion features for action recognition, as also suggested by previous work [29], which learned appearance feature by predicting the future. Following [7], the network is optimized over the endpoint error (EPE), which is the sum of L2 distance between the ground truth optical flow and the obtained flow over all pixels. The total loss for the multiple frame optical flow model is the EPE of T output optical flow frames: T X X koj,t,p − o[ (1) j,t,p k2 , t=1 p where oj,t,p is 2-dimensional optical flow vector of the tth and the (t + 1)st frame in the j th video at pixel p. Note that the T th optical flow frame oj,t is the future optical flow for the T th and (T + 1)st input frames, where the (T + 1)st frame is not given to the model. 3.2. ActionFlowNet Knowledge Transfer by Finetuning. Finetuning a pretrained network is a common practice to transfer knowledge from different datasets and tasks. Unlike previous work, where knowledge transfer has been accomplished between very similar tasks (image classification and detection or semantic segmentation), knowledge transfer in our model is challenging since the goals of pixel-wise optical flow and action classification are not obviously compatible. We transfer the learned motion by initializing the classification network using a network trained for optical flow estimation. Since the network was trained to predict optical flow, it should encode motion information in intermediate levels which support action classification. However, finetuning a pretrained network is known to have the problem of catastrophic forgetting. Specifically, when training the network for action recognition, the originally initialized flow information could be destroyed when the network adapts the appearance information. We prevent catastrophic forgetting by using the multitask learning framework. ActionFlowNet. To force the model to learn motion features while training for action recognition, we propose a multitask model ActionFlowNet, which simultaneously learns to estimate optical flow, together with predicting the future optical flow of the last frame, and action classification to avoid catastrophic forgetting. With optical flow as supervision, the model can effectively learn motion features while not relying on explicit optical flow computation. In our implementation, we take 16 consecutive frames as input to our model. In the last layer of the encoder, global average pooling across the spatial-temporal feature map, with size 512 × 2 × 7 × 7, is employed to obtain a single 512 dimensional feature vector, followed by a linear softmax classifier for action recognition. The architecture is illustrated in Figure 1. The multitask loss is given as follows: MT-Lossj = −1(yj = ybj ) log p(ybj ) + {z } | Classification Loss λ T X X t=1 | koj,t,p − o[ j,t,p k2 , (2) p {z Flow Loss } where 1(·) is a indicator function, yj and ybj are the groundtruth and predicted action labels respectively of the j th video. λ is a hyper-parameter balancing the classification loss and the flow loss, where optical flow estimation can be seen as a regularizer for the model to learn motion feature for classification. Although previous work on multitask learning [16] suggests that sharing parameters of two different tasks may hurt performance, this architecture performs well since optical flow is known empirically to improve video action recognition significantly. In addition, our architecture contains multiple skip connections from lower convolutional layers to decoder. This allows higher layers in the encoder to focus on learning more abstract and high level features, without constraining them to remembering all spatial details for predicting optical flow, which is beneficial for action recognition. This idea is central to Ladder Networks [20] which introduced lateral connections to learn denoising functions and significantly improved classification performance. It is worth noting that this is a very general architecture and requires minimal architectural engineering. Thus, it can be trivially extended to learn more tasks jointly to adapt knowledge from different domains. ActionFlowNet Inference. During inference for action classification, optical flow estimation is not required since the motion information is already learned in the encoder. Therefore, the decoder can be removed and only the forward pass of the encoder and the classifier are computed. If the same backbone architecture is used, our model runs at the same speed as a single-stream RGB network without extra computational overhead. Since the optical flow estimation and flow-stream CNN are not needed, it is more efficient than two-stream counterparts. 3.3. Two-Frame Based Models In this section, we propose various models that take two consecutive input frames. Experimenting with two-frame models has three benefits. First, when there are multiple frames in the input, it is difficult to determine whether the performance improvement comes from motion modeling or aggregating long term appearance information. Thus for better analysis, it is desirable to use the two frame input. Second, training two-frame models is computationally much more efficient than multi-frame models which take N video frames and output N − 1 optical flow images. Third, we can measure the effectiveness of external large scale optical flow datasets, such as the FlyingChairs dataset [7], which provide ground-truth flow on only two consecutive frames, for action recognition. Learning Optical Flow with ResNet. Similarly, we use ResNet-18 as our backbone architecture and learn optical flow. Like FlowNet-S [7], we concatenate two consecutive frames to produce a 6(ch) × 224(w) × 224(h) input for our two frames model. At the decoder, there are four outputs with different resolutions. The total optical flow loss is the weighted sum of end-point error at multiple resolutions per the following equation: 4 X αr X r=1 [ (r) (r) koj,t,p − oj,t,p k2 , (3) p (r) where oj,t,p is the optical flow vector of the rth layer output and αr is the weighting coefficient of the rth optical flow output. We refer to this pre-trained optical flow estimation network as FlowNet. We first propose an architecture to classify actions on top of the optical flow estimation network, which we call the Stacked Model. Then, we present the two-frame version of ActionFlowNet to classify the actions and estimate the optical flow, which we call the ActionFlowNet-2F. 3.3.1 Stacked Model A straightforward way to use the trained parameters from FlowNet is to take the output of FlowNet and learn a CNN on top of the output, as shown in Figure 2. This is reminiscence of the temporal stream in [22] which learns a CNN on precomputed optical flow. If the learned optical flow has high quality, it should give similar performance to learning a network on optical flow. 6x224x224 64x56x56 128x28x28 256x14x14 512x7x7 Optical Flow 64x56x56 128x28x28 256x14x14 Action Labels 512x7x7 FC Softmax ResNet Figure 2: Network structure of the ‘Stacked Model’. Since the output of FlowNet has 4 times lower resolution than the original image, we remove the first two layers of the CNN (conv1 and pool1) and stack the network on top of it. We also tried to upsample the flow to the original resolution and use the original architecture including conv1 and pool1, but this produces slightly worse results and is computationally more expensive. The stacked model introduces about 2x number of parameters compared to the original ResNet, and is also 2x more expensive for inference. It learns motion features by explicitly including optical flow as an intermediate representation, but cannot model appearance and motion simultaneously, similar to learning a CNN on precomputed optical flow. 3.3.2 ActionFlowNet-2F The multitask ActionFlowNet-2F architecture, as illustrated in Figure 3, is based on the two-frame FlowNet with additional classifier. Similar to ActionFlowNet, classification is performed by average pooling the last convolutional layer in the encoder followed by a linear classsifier. 56x56x64 128x28x28 6x224x224 64x56x56 Optical Flow 256x14x14 128x28x28 256x14x14 512x7x7 R2 R3 R4 R1 Action Label ResNet FC Softmax Figure 3: Network structure of the ActionFlowNet-2F Just as with the stacked model, the loss function is defined for each frame. For the tth frame in the j th video the loss is defined as a weighted sum of classification loss and optical flow loss: MT-Lossj,t = −1(yj = ybj ) log p(ybj ) + | {z } Classification Loss λ 4 X r=1 | 4. Experiments αr X [ (r) (r) koj,t,p − oj,t,p k2 , (4) p {z Flow Loss } 4.1. Datasets We use two publicly available datasets, UCF101 and HMDB51, to evaluate action classification accuracy. The UCF101 dataset contains 13,320 videos with 101 action classes [24]. The HMDB51 contains 6,766 videos with 51 action categories [14]. As the number of training videos in HMDB51 is small, we initialized our models trained on UCF101 and fine-tuned for HMDB51 similar to [22] The UCF101 and HMDB51 do not have groundtruth optical flow annotation. Similar to [27], we use EpicFlow [21] as a psuedo-groundtruth optical flow to train the motion part of the network. To experiment models with better learned the motion signature, we also use FlyingChairs dataset [7] as it has groundtruth optical flow since it is a synthetic dataset. The FlyingChairs dataset contains 22,872 image pairs and ground truth flow from synthetically generated chairs on real images. We use the Sintel dataset [1], which provides dense groundtruth optical flow, to validate the quality of optical flow models. 4.2. Experimental Setup Overfitting Prevention. We use different data augmentations on different datasets and tasks. On the FlyingChairs dataset for optical flow estimation, we augment the data using multi-scale cropping, horizontal flipping, translation and rotation following [7]. On the UCF101 dataset for optical flow estimation, we use multi-scale cropping and horizontal flipping, but do not use translation and rotation in order to maintain the original optical flow distribution in the data. On UCF101 dataset for action recognition, we use color jittering [25], multi-scale cropping and horizontal flipping. Dropout is applied to the output of the average pooling layer before the linear classifier with probability 0.5. Optimization and Evaluation. The models are trained using Adam [12] for 40,000 iterations with batch size 128 and learning rate 1 × 10−4 . For evaluation, we sample 25 random video segments from a video and run a forward pass to the network on the 10-crops (4 corners + center with their horizontal reflections) and average the prediction scores. 4.3. Improving Action Recognition We first evaluate the action recognition accuracy by the various proposed two-frame models described in Section 3.3, and then the multi-frame models in Section 3.2, on both UCF101 and HMDB51 datasets. All models take RGB inputs only without external optical flow inputs. The recognition accuracies are summarized in Table 1. Method UCF101 HMDB51 Two-frame Models Scratch FlowNet fine-tune Stacked ActionFlowNet-2F (UCF101) ActionFlowNet-2F (FlCh+UCF101) ImageNet pretrained ResNet-18 51.3 66.0 69.6 70.0 71.0 80.7 23.9 29.1 42.4 42.4 42.6 47.1 Multi-frame Models Multi-frame FlowNet fine-tune ActionFlowNet (UCF101) Sports-1M pretrained C3D [26] Kinetics pretrained I3D [2] 80.8 83.9 82.3 95.6 50.6 56.4 53.5 74.8 Table 1: Action recognition accuracies of our models on UCF101 and HMDB51 datasets (split 1). FlCh denotes FlyingChairs dataset. “ActionFlowNet-2F (UCF101)” denotes its FlowNet part is pretrained on UCF101, and “ActionFlowNet-2F (FlCh+UCF101)” denotes its FlowNet part is pretrained on FlyingChairs dataset. All ActionFlowNets are then learned on UCF101 dataset for action and flow. For reference, we additionally show the results trained with large scale datasets [27, 2], but it is not directly comparable since our models are trained with significantly less annotation. Two-frame Models. ‘Scratch’ is a ResNet-18 model that is trained from scratch (random initialization) using UCF101 without any extra supervision, which represents the baseline performance without motion modeling. ‘FlowNet fine-tune’ is a model that is pretrained from UCF101 for optical flow only, and then fine-tuned with action classification, which captures motion information by initialized FlowNet. ‘Stacked’ is a stacked classification model on top of optical flow output depicted in Figure 2. Its underlying FlowNet is trained with UCF101 and is fixed to predict optical flow, so only the CNN classifier on top is learned. ‘ActionFlowNet-2F’ is the multitask model depicted in Figure 3, which is trained for action recognition and optical flow estimation to learn both motion and appearance. We trained two versions of ActionFlowNet-2F: one with FlowNet pretrained on UCF101 and one on FlyingChairs dataset. As shown in the table, all proposed models - ‘FlowNet fine-tune’, ‘Stacked’ and ‘ActionFlowNet-2F’ significantly outperform ‘Scratch’ . This implies that our models can take advantage of the learned motion for action recognition, which is difficult to learn implicitly from action labels. Both the Stacked model and two ActionFlowNet-2Fs outperform the finetuning models by a large margin (up to 5.0% in UCF101 and up to 13.5% in HMDB51). As all models are pretrained from the high quality optical flow model, the results show that the knowledge learned from previous task is prone to be forgotten when learning new task without multitask learning. With extra supervision from optical flow estimation, multitask models regularize the action recognition with the effort of learning the motion features. While the Stacked model performs similarly to ActionFlowNet-2F when trained only on UCF101, ActionFlowNet-2F is much more compact than the Stacked model, containing only approximately half the number of parameters of the Stacked model. When ActionFlowNet2F is first pretrained with FlyingChairs, which predicts better quality optical flow in EPE, and finetuned with the UCF101 dataset, it further improves accuracy by 1%. This implies that our multitask model is capable of transferring general motion information from other datasets to improve recognition accuracy further. Our ActionFlowNet-2F still performs inferior compared to ResNet pretrained on ImageNet, especially in UCF101 (71.0% vs 80.7%) because of the rich background context appearance in the dataset. When evaluated on HMDB51, where the backgrounds are less discriminative, our ActionFlowNet-2F is only slightly behind the ImageNet pretrained model (42.6% vs 47.1%), indicating that our model learns strong motion features for action recognition. Multi-frame Models. We train 16-frame ActionFlowNet on UCF101. The results are shown in the lower part of Table 1. By taking more frames per model, our multi-frame models significantly improve two-frame models (83.9% vs 70.0%). This confirms previous work [10, 19] that taking more input frames in the model is important. Remarkably, without pretraining on large amounts of labeled data, our ActionFlowNet outperforms the ImageNet pretrained single frame model and Sports-1M pretrained C3D. Our ActionFlowNet gives 1.6% and 2.9% improvements over C3D on UCF101 and HMDB51 repsectively. The recently published I3D models [2] achieved strong performance by training on the newly released Kinetics dataset [11] with large amount of clean and trimmed labeled video data and performing 3D convolutions on 64 input frames instead of 16 frames. Although the I3D model achieved better results compared to previous work, their RGB model could still benefit from optical flow inputs, which indicates that even with large amount of labeled data the I3D model does not learn motion features effectively. It should be noted that there is prior work that gives better results with the use of large scale datasets like ImageNet and Kinetics dataset [2], or with the help of external optical flow input [22]. Those results are not directly comparable to us because we are using a significantly smaller amount of labeled data - only UCF101 and HMDB51. Nevertheless, our method shows promising results for learning motion representations from videos. Even with only a small amount of labeled data, our action recognition network outperforms methods trained with a large amount of labeled data with the exception of the recently trained I3D models [2] which used ImageNet and Kinetics dataset [11]. We envision the performance of ActionFlowNet would further improve when trained on larger datasets like Kinetics and taking more input frames in the model. Method ResNet-18 Scratch VGG-M-2048 Scratch [22] Sequential Verification [17] VGAN [28] O3N [6] OPN [15] FlowNet fine-tuned (ours) ActionFlowNet-2F (ours) ActionFlowNet (ours) UCF101 Accuracy 51.3 52.9 50.9 52.1 60.3 59.8 66.0 70.0 83.9 Table 2: Results on UCF101 (split 1) from single stream networks with raw pixel input and without pretraining on large labeled dataset. Comparison to state-of-the-arts. We compare our approach to previous work that does not perform pretraining with external large labeled datasets in Table 2 on UCF101. All models are trained only with UCF101 labels with different unsupervised learning methods. Our models significantly outperform previous work that use videos for unsupervised feature learning [17, 28, 6, 15]. Specifically, even with only our two-frame fine-tuned model on UCF101, the model obtain more than 5.9% improvement compared to Sequential Verification, VGAN and O3N, indicating the importance of motion in learning video representations. When combined with multitask learning, the performance improves to 70.0%. Finally, when extending our model to 16 frames by 3D convolutions, the performance of ActionFlowNet further boost to 83.9%, giving a 23.6% improve- (a) Image (b) Output flow from (c) ImageNet Model: (d) ActionFlowNet-2F: ActionFlowNet-2F Appearance Only Motion and Appearance Figure 4: Visualization of important regions for action recognition. Our ActionFlowNet-2F discovers the regions where the motions are happening to be important while ‘Appearance Only’ captures discriminative regions based on the appearance. tion, while the ImageNet pretrained network relies more on background appearance, which may not directly relate to the action itself. However, when appearance is discriminative - for example the writing on the board in the last example - our model can also focus on appearance, which is not possible for models that learn from optical flow only. 4.3.2 4.3.1 Learning Motions for Discriminative Regions We visualize what is learned from the multitask network by using the method from [33] by using a black square to occlude the frames at different spatial locations and compute the relative difference between classification confidence before and after occlusion. We visualize the two-frame based ActionFlowNet-2F for more straightforward visualization. We compare the discriminative regions discovered by our multitask network with ones by the ImageNet pretrained ResNet-18, which only models the discriminative appearances without motion. Figure 4 shows example results. The visualization reveals that our model focuses more on mo- 0.5 0.0 WallPushups ApplyEyeMakeup BodyWeightSquats ShavingBeard PlayingDaf Haircut FrontCrawl PlayingTabla BlowDryHair Knitting YoYo PlayingDhol Shotput ThrowDiscus HandstandPushups JavelinThrow LongJump PoleVault Lunges HeadMassage SalsaSpin JumpingJack BreastStroke TennisSwing MilitaryParade CleanAndJerk BoxingSpeedBag PlayingFlute CricketShot PullUps Hammering CuttingInKitchen HighJump BenchPress PizzaTossing Drumming Mixing Diving Typing PlayingViolin HulaHoop HorseRace PommelHorse VolleyballSpiking Billiards RockClimbingIndoor RopeClimbing Biking BasketballDunk BandMarching Skijet TrampolineJumping HorseRiding IceDancing SoccerPenalty JugglingBalls TableTennisShot GolfSwing ParallelBars CricketBowling FloorGymnastics Rowing BrushingTeeth HandstandWalking SumoWrestling Surfing BlowingCandles ApplyLipstick SkyDiving PushUps PlayingPiano Rafting WritingOnBoard Swing SoccerJuggling Punch BalanceBeam HammerThrow PlayingGuitar Bowling UnevenBars Kayaking PlayingSitar Archery Skiing FrisbeeCatch PlayingCello BabyCrawling FieldHockeyPenalty StillRings CliffDiving WalkingWithDog Fencing TaiChi BoxingPunchingBag JumpRope SkateBoarding Nunchucks BaseballPitch Basketball MoppingFloor ment over the best previous work. This shows that explicitly learning motion information is important for learning video representations. Figure 5 shows the optical flow estimation and prediction results from our multi-frame model. Although the model does not have accurate optical flow groundtruth for training, the optical flow quality is fairly good. The model predicts reasonable future optical flow, which shows semantic understanding from the model to the frames in addition to simply performing matching between input frames. (a) ActionFlowNet vs C3D 0.5 0.0 SoccerJuggling JumpRope CricketShot PullUps JumpingJack BodyWeightSquats Lunges Nunchucks WallPushups FrontCrawl PommelHorse FloorGymnastics TrampolineJumping SalsaSpin Haircut CleanAndJerk Archery BoxingSpeedBag BenchPress HeadMassage Swing HandstandWalking Drumming PushUps PoleVault Knitting HighJump GolfSwing RockClimbingIndoor Shotput JavelinThrow RopeClimbing YoYo CricketBowling HandstandPushups Skijet SkyDiving Surfing HulaHoop BabyCrawling VolleyballSpiking WalkingWithDog Kayaking ThrowDiscus BlowDryHair Biking LongJump JugglingBalls ApplyEyeMakeup Typing BreastStroke SumoWrestling TableTennisShot Billiards Diving BasketballDunk Basketball Punch PlayingTabla BandMarching HammerThrow HorseRace ParallelBars TennisSwing HorseRiding IceDancing Bowling SoccerPenalty PizzaTossing MilitaryParade UnevenBars PlayingViolin PlayingPiano WritingOnBoard PlayingDaf FieldHockeyPenalty Skiing FrisbeeCatch Rowing Hammering PlayingDhol PlayingFlute ApplyLipstick StillRings ShavingBeard Mixing CuttingInKitchen BalanceBeam TaiChi PlayingGuitar Fencing PlayingSitar Rafting CliffDiving SkateBoarding PlayingCello BoxingPunchingBag BaseballPitch BlowingCandles MoppingFloor BrushingTeeth Figure 5: Optical flow and future prediction outputs from our multi-frame model. The 1st and 3rd row shows an example of input videos, and the 2nd and 4th row shows the corresponding optical flow outputs. The last optical flow output frames (in red border) are extrapolated rather than computed within input frames. Only last 8 frames are shown per sample due to space limit. Optical Flow and Future Prediction (b) ActionFlowNet vs ImageNet pretrained ResNet-18 Figure 6: Classwise accuracy improvement by ActionFlowNet over pretrained models. The blue bars show positive improvements and the red ones show otherwise. 4.3.3 Classes Improved By Learning Motions We compare the per class accuracy for ActionFlowNet, ImageNet pretrained model and C3D. Not all action classes are motion-centric - objects and their contextual (background) appearances provide more discriminative information for some classes [9], which can greatly benefit from large amounts of labeled data. As shown in Figure 6, our model better recognizes action classes with simple and discriminative motion like WallPushups and ApplyEyeMakeup, while C3D and ImageNet models perform better on classes with complex appearance like MoppingFloor and BaseballPitch. (a) Frame with movements highlighted with red (b) EpicFlow (c) FlowNet on FlyingChairs (d) FlowNet on UCF101 4.4. Recognition and Optical Flow Quality In this section, we study the effects of different optical flow models for action recognition based on the twoframe models. We train our optical flow models on FlyingChairs or UCF101 and evaluate their accuracies on the Sintel dataset (similar to [7] that trains the model on FlyingChairs but tests on other datasets). We investigate how the quality of the learned optical flow affects action recognition. Since optical flow in the multitask model is collaboratively learned with the recognition task, the quality of optical flow in the multitask model does not directly affect recognition accuracy. Thus, we use our Stacked model learned with different datasets, fix the optical flow part and train the classification part in the network shown in Figure 2. We compare the end-point-error of different optical flow learners and the corresponding classification accuracy in Table 3. Method Stacked on FlyingChairs Stacked on UCF101 ResNet on EpicFlow EPE on Sintel 9.12 11.84 6.29 Classification Accuracy (%) 51.7 69.6 77.7 Table 3: Comparison between End-Point-Error (EPE, lower is better) and the classification accuracy. Interestingly, better optical flow does not always result in better action recognition accuracy. Refer to the text for discussion. Action Recognition with Learned Flow. Surprisingly, even with lower end-point-error the Stacked model pretrained on FlyingChairs performs significantly worse than the one pretrained on UCF101 dataset (51.7% vs 69.6%), as shown in Table 3. Compared to the model directly taking high quality optical flow as input (77.7%), our models are still not as good as training directly on optical flow. We believe this is because the quality of learned optical flow is not high enough. To understand how the learned optical flow affects action recognition, we qualitatively observe the optical flow performance in Figure 7. Even though the end-point error on Sintel of the FlowNet pretrained on FlyingChairs is low, the estimated optical flow has lots of artifacts in Figure 7: Qualitative comparison of flow outputs. It shows an example of small motion, where the maximum magnitude of displacement estimated from EpicFlow is only about 1.6px. FlowNet trained on FlyingChairs dataset fails to estimate small motion, since the FlyingChairs dataset consists of large displacement flow. the background and the recognition accuracy on top of that is correspondingly low. We believe the reason is that the FlyingChairs dataset mostly consists of large displacement flow, and therefore the model performs badly on estimating small optical flow, which contributes less in the EPE metric when averaged over the whole dataset. This is in contrast to traditional optimization based optical flow algorithms that can predict small displacements well but have difficulties for large displacements. In addition, traditional optical flow algorithms such as TV-L1 and EpicFlow explicitly enforce smoothness and constancy. They are able to preserve object shape information when the flow displacements are small, which is important for action recognition. While our models perform comparably to traditional optical flow algorithms in terms of endpoint error, our model is not optimized for preserving flow smoothness. This shows that end-point-error of optical flow in public dataset may not be a good indicator of action classification performance, since shape preservation is not accounted for in the metric. 5. Conclusion We presented a multitask framework for learning action with motion flow, named ActionFlowNet. By using optical flow as supervision for classification, our model captures motion information while not requiring explicit optical flow computation as input. Our model significantly outperforms previous feature learning methods trained without external large scale data and additional optical flow input. Acknowledgments This research was supported in part by funds provided from the Office of Naval Research under grant N000141612713 entitled “Visual Common Sense Reasoning for Multi-agent Activity Prediction and Recognition”. References [1] D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black. A naturalistic open source movie for optical flow evaluation. In ECCV, 2012. 5 [2] J. Carreira and A. Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017. 1, 2, 5, 6 [3] A. Diba, A. M. Pazandeh, and L. V. Gool. Efficient twostream motion and appearance 3d cnns for video classification. arXiv preprint arXiv:1608.08851, 2016. 2 [4] C. Feichtenhofer, A. Pinz, and R. Wildes. Spatiotemporal residual networks for video action recognition. In NIPS, 2016. 2 [5] C. Feichtenhofer, A. Pinz, and A. Zisserman. Convolutional two-stream network fusion for video action recognition. In CVPR, 2016. 2 [6] B. Fernando, H. Bilen, E. Gavves, and S. Gould. Selfsupervised video representation learning with odd-one-out networks. In CVPR, 2017. 1, 2, 6 [7] P. Fischer, A. Dosovitskiy, E. Ilg, P. Häusser, C. Hazırbaş, V. Golkov, P. van der Smagt, D. Cremers, and T. Brox. FlowNet: Learning Optical Flow with Convolutional Networks. In ICCV, 2015. 2, 3, 4, 5, 8 [8] K. He, X. Zhang, S. Ren, and J. Sun. Deep Residual Learning for Image Recognition. CVPR, 2016. 3 [9] M. Jain, J. van Gemert, and C. Snoek. What do 15,000 object categories tell us about classifying and localizing actions? In CVPR, 2015. 8 [10] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale Video Classification with Convolutional Neural Networks. In CVPR, 2014. 1, 2, 6 [11] W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, P. Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. 1, 2, 6 [12] D. Kingma and J. Ba. Adam: A Method for Stochastic Optimization. In ICLR, 2015. 5 [13] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In NIPS, 2012. 3 [14] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: A large video database for human motion recognition. In ICCV, 2011. 5 [15] H.-Y. Lee, J.-B. Huang, M. Singh, and M.-H. Yang. Unsupervised representation learning by sorting sequences. In ICCV, 2017. 6 [16] I. Misra, A. Shrivastava, A. Gupta, and M. Hebert. Crossstitch Networks for Multi-task Learning. In CVPR, 2016. 4 [17] I. Misra, L. C. Zitnick, and M. Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In ECCV, 2016. 1, 2, 6 [18] J. Y.-H. Ng and L. S. Davis. Temporal difference networks for video action recognition. In WACV, 2018. 2 [19] J. Y.-H. Ng, M. Hausknecht, S. Vijayanarasimhan, O. Vinyals, R. Monga, and G. Toderici. Beyond Short Snippets: Deep Networks for Video Classification. In CVPR, 2015. 6 [20] A. Rasmus, H. Valpola, M. Honkala, M. Berglund, and T. Raiko. Semi-Supervised Learning with Ladder Networks. In NIPS, 2015. 4 [21] E. Revaud, P. Weinzaepfel, Z. Harchaoui, and C. Schmid. EpicFlow: Edge-Preserving Interpolation of Correspondences for Optical Flow. In CVPR, 2015. 5 [22] K. Simonyan and A. Zisserman. Two-Stream Convolutional Networks for Action Recognition in Videos. In NIPS, 2014. 1, 2, 4, 5, 6 [23] K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. In ICLR, 2014. 3 [24] K. Soomro, A. R. Zamir, and M. Shah. UCF101: A Dataset of 101 Human Action Classes From Videos in The Wild. In CRCV-TR-12-01, 2012. 5 [25] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going Deeper with Convolutions. In CVPR, 2015. 5 [26] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Learning Spatiotemporal Features with 3D Convolutional Networks. In ICCV, 2015. 1, 2, 3, 5 [27] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Deep End2End Voxel2Voxel Prediction. In CVPRW DeepVision Workshop, 2016. 2, 3, 5 [28] C. Vondrick, H. Pirsiavash, and A. Torralba. Generating videos with scene dynamics. In NIPS, 2016. 1, 2, 6 [29] J. Walker, C. Doersch, A. Gupta, and M. Hebert. An uncertain future: Forecasting from static images using variational autoencoders. In ECCV, pages 835–851. Springer, 2016. 2, 3 [30] L. Wang, Y. Xiong, Z. Wang, Y. Qiao, D. Lin, X. Tang, and L. Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, 2016. 2 [31] X. Wang, A. Farhadi, and A. Gupta. Actions ˜ transformations. In CVPR, 2016. 2 [32] X. Wang and A. Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. 2 [33] M. D. Zeiler and R. Fergus. Visualizing and Understanding Convolutional Networks. In ECCV, 2014. 7
1cs.CV
Kernel entropy estimation for linear processes Hailin Sanga , Yongli Sangb and Fangjun Xuc arXiv:1712.00196v1 [math.ST] 1 Dec 2017 a Department of Mathematics, University of Mississippi, University, MS 38677, USA [email protected] b Department of Mathematics, University of Louisiana at Lafayette, Lafayette, LA 70504, USA [email protected] c School of Statistics, East China Normal University, Shanghai 200241, China and NYU-ECNU Institute of Mathematical Sciences at NYU Shanghai, Shanghai 200062, China [email protected]; [email protected] Abstract Let {Xn : n ∈ N} be a linear process with bounded probability density function f (x). We R study the estimation of the quadratic functional R f 2 (x) dx. With a Fourier transform on the kernel function and the projection method, it is shown that, under certain mild conditions, the estimator   X 2 Xi − Xj K n(n − 1)hn hn 1≤i<j≤n has similar asymptotical properties as the i.i.d. case studied in Giné and Nickl (2008) if the linear process {Xn : n ∈ N} has the defined short range dependence. We also provide an application to L22 divergence and the extension to multivariate linear processes. The simulation study for linear processes with Gaussian and α-stable innovations confirms our theoretical results. As an illustration, we estimate the L22 divergences among the density functions of average annual river flows for four rivers and obtain promising results. Keywords: linear process, kernel entropy estimation, quadratic functional, projection operator 2010 Mathematics Subject Classification: Primary 60F05; Secondary 62M10, 60G10, 62G05. 1 Introduction Let f (x) be the probability density function ofRa sequence of identically distributed observations 2 {Xn }∞ n=1 . The quadratic functional Q(f ) R= R f (x) dx plays an important role in the study 2 of quadratic R Rényi entropy R(f ) = − ln( f (x) dx), Rényi (1970), and the Shannon entropy S(f ) = − f (x) ln f (x) dx, Shannon (1948). Entropy is widely applied in the fields of information theory, statistical classification, pattern recognition and so on since it is a measure of uncertainty in a probability distribution. In the literature, different estimators for the quadratic functional and entropies with independent data have been well studied. For example, the nearest-neighbor estimator [Leonenko, Pronzato and Savani (2008); Penrose and Yukich (2013)], the kernel estimator [Hall and Marron (1987); Bickel and Ritov (1988); Giné and Nickl (2008)], the orthogonal projection estimator [Laurent (1996, 1997)] and the U -statistics estimator (a special kernel estimator) [Leonenko and Seleznjev (2010); Källberg, Leonenko and Seleznjev (2012)] under the independence assumption. It is a challenging problem to study the estimation of the quadratic functional and the corresponding entropies for dependent case. In Källberg, Leonenko and Seleznjev (2014) the authors successfully extended the U -statistics method to m-dependence sequence. They showed the rate optimality and asymptotic normality of the U -statistics estimator for multivariate sequence. 1 Ahmad (1979) obtained the strong consistency of the quadratic functional by orthogonal series method for stationary time series with strong mixing condition. Nevertheless, to the best of our knowledge, general results for quadratic functional estimations of regular time series data under mild conditions are still unknown. R In this paper, we study the quadratic functional R f 2 (x) dx for the following linear process Xn = ∞ X ai εn−i , (1) i=0 where the innovations εi are independent and identically distributed (i.i.d.) real-valued random ∞ P ai εn−i convariables in some probability space (Ω, F, P) and ai are real coefficients such that i=0 verges in distribution. We would apply the kernel method which was first introduced by Rosenblatt (1956) and Parzen (1962). This method was proved to be successful in estimating the probability density functions and their derivatives, the regression functions and so on in the independent setting; see the books [Devroye and Györfi (1985); Silverman (1986); Nadaraya (1989); Wand and Jones (1995); Schimek (2000); Scott (2015)] and references therein. Kernel method was also proved to be successful in estimating the density functions and regression functions for time series data [see Tran (1992); Honda (2000); Wu and Mielniczuk (2002); Wu, Huang and Huang (2010)]. In the classical kernel estimation of the quadratic functional Q(f ) with i.i.d. observations n {X R i }2i=1 , Giné and Nickl (2008) applied a convolution method to obtain the bias E Tn (hn ) − R f (x) dx of the kernel estimator   X Xi − Xj 2 Tn (hn ) = . (2) K n(n − 1)hn hn 1≤i<j≤n They then used the Hoeffding’s decomposition for U -statistics to study the stochastic part Tn (hn )− E Tn (hn ). In this way, they showed the rate optimality and efficiency of the kernel estimator for the quadratic functional. Krishnamurthy et. al. (2015) applied a similar method to study the L22 divergence between two distributions. R Nevertheless, this method does not work well in the estimation of the quadratic functional R f 2 (x)dx for linear process Xn given in (1) due to the dependence structure. Instead we utilize the Fourier transform and projection methods to derive the asymptotic properties of the kernel estimator for the quadratic functional on time series data. With the help of the Fourier transform, one can easily separate the random part Xi − Xj and the kernel function K in the estimator Tn (hn ) given in (2) and also obtain the Hoeffding’s decomposition for Tn (hn ) − E Tn (hn ) when {Xn } is a linear process; see (33). In fact, the Hoeffding’s decomposition works for general stationary processes. Then we use projection and some kind of chain rule to determine which terms contribute to the limit and which terms are negligible. Our method is different from the martingale approximation method applied in Wu and Mielniczuk (2002) when studying the kernel density estimation for linear processes. Moreover, this method allows us to get rid of the 2nd moment assumption on the innovations of linear processes, that is, E |ε1 |2 < ∞. This allows innovations to take heavy tail distributions, which are often followed by data in finance, see Mittnik, Rachev and Paolella (1998). We only need E |eιλε1 − φε (λ)|2 ≤ cγ,2 (|λ|2γ ∧ 1) or E |eιλε1 − φε (λ)|4 ≤ cγ,4 (|λ|4γ ∧ 1) for some γ ∈ (0, 1], where φε (λ) is the characteristic function of the innovations. The range γ ∈ (0, 1] here is optimal when ε1 has non-degenerate distribution. In this paper, the innovations have non-degenerate distribution because of the existence of the probability density function f (x) of the linear process. See Lemma 7.4. On the other hand, our method gives a clear picture on the relationship between the linear process {Xn } and the efficiency of the estimator Tn (hn ). In addition, this methodology would have applications in kernel 2 estimations. For example, we can use it to extend results in Krishnamurthy et. al. (2015) to short memory linear processes, and simplify existing proofs and assumptions in kernel density estimations. Furthermore, we could suggest a more general definition for short memory and long memory linear processes (see Definition 2.1 below) and extend our results to multivariate linear processes. Throughout this paper, if not mentioned otherwise, the letter c, with or without a subscript, denotes a generic positive finite constant √ whose exact value is independent of n and may change from line to line. We use ι to denote −1. For a complex number z, we use z and |z| to denote its conjugate and modulus, respectively. The notation k · k2 means [E | · |2 ]1/2 . For two functions a(x) and b(x) of real numbers, a(x)∼b(x) means a(x)/b(x)R → 1 as x → ∞. For any integrable function g(x), its Fourier transform is defined as gb(u) = R eιxu g(x) dx. Let φ(λ) be ∞ P ai εn−i , φn (λ) the empirical characteristic the characteristic function of linear process Xn = i=0 function from observations {Xi }ni=1 and φε (λ) the characteristic function of the innovations. That n P is, φ(λ) = E [eιλXi ], φn (λ) = n1 eιλXi and φε (λ) = E [eιλε1 ]. For each i ∈ N, define H(Xi ) := i=1 H(Xi )(λ) := eιλXi − φ(λ), λ ∈ R. The paper has the following structure. The main results are given in Section 2. We then give a few examples in Section 3, an application of the results to L22 divergence in Section 4, simulation study and real data analysis in Section 5, and extensions to multivariate linear processes in Section 6. Section 7 is devoted to the proofs of Theorems 2.1 and 2.2, based on the Fourier transform. 2 Main results If {εi : i ∈ Z} is a sequence of i.i.d. random variables in Lp (R) for some p > 0, E εi = 0 when p ≥ 1, ∞ P and {ai }∞ |ai |2∧p < ∞, then the linear process Xn i=0 is a sequence of real coefficients such that i=0 given in (1) exists and is well-defined. For p = 2, the process has short memory (short range ∞ P dependence) if |ai | < ∞ and long memory (long range dependence) otherwise. As for linear i=0 processes with symmetric α-stable innovations (0 < α ≤ 2), i.e., the law of innovations having characteristic function E [eιλε1 ] = exp(−cα |λ|α ) for some positive constant cα only depending on ∞ ∞ P P α, {Xn } has short memory if |ai |α/2 < ∞ and it has long memory if |ai |α/2 = ∞ but ∞ P i=0 i=0 |ai |α < ∞, respectively. See, e.g., Hsing (1999). i=0 Let f (x) be the probability density function of the linear process Xn = ∞ P ai εn−i , n ∈ N defined i=0 R in (1). We study the estimation of the quadratic functional of f (x), that is, R f 2 (x)dx, when the ∞ P linear process Xn = ai εn−i has short memory in the sense of the following definition. i=0 Definition 2.1 A linear process Xn = ∞ P ai εn−i defined in (1) has short memory if i=0 ∞ q X Var (eιλai ε1 ) < ∞ i=1 3 for all λ close enough to 0, and long memory if ∞ ∞ q X X Var (eιλai ε1 ) = ∞, but Var (eιλai ε1 ) < ∞ i=1 i=1 for all λ close enough to 0. In fact this definition generalizes the definitions of short memory or long memory linear processes stated at the beginning of this section. Note that Var (eιλε1 ) can also be written as E |eιλε1 −φε (λ)|2 or 1 − |φε (λ)|2 . By the first part of Lemma 7.3, this definition contains the original one for linear processes with finite second moment innovations. Using the characteristic function of α-stable distribution, E |eιλε1 − φε (λ)|2 ≤ c α2 ,2 (|λ|α ∧ 1). Hence it also contains the one introduced in Hsing (1999) for symmetric α-stable innovations. See the details in Example 3.2. Moreover, Definition 2.1 can be used to define short and long memory linear processes with general infinite variance innovations. Therefore, it can be applied to define all short and long memory linear processes with finite variance innovations or infinite variance innovations. The advantage of Definition 2.1 is that we only need to know the behavior of Var (eιλai ε1 ) = 1 − |φε (ai λ)|2 without any moment assumption. This definition relates the coefficients {ai } with the distribution of the innovations which is fully represented by the characteristic function. By contrast, the traditional definition only relates the coefficients {ai } with the moment information of the innovations. The definition in Hsing (1999) is only for linear processes with symmetric α-stable innovations and it only relates the coefficients {ai } with the parameter α of the α-stable innovations. Throughout the paper, we use Definition 2.1 to classify linear processes with short or long memory. R To estimate the quadratic functional R f 2 (x)dx, we shall apply the kernel method   X Xi − Xj 2 Tn (hn ) = K , n(n − 1)hn hn 1≤i<j≤n R R where the kernel K is a symmetric and bounded function with R K(u) du = 1 and R u2 |K(u)| du < ∞. The bandwidth sequence hn satisfies 0 < hn → 0 as n → ∞. The following are the main results of this paper. Theorem 2.1 Assume that ∞ P |ai |γ < ∞, i=0 2γ 2 R |λ| |φε (λ)| dλ R < ∞ and  E |eιλε1 − φε (λ)|4 ≤ cγ,4 |λ|4γ ∧ 1 (3) for some γ ∈ (0, 1]. We further assume that f is bounded. Then there exist positive constants c1 and c2 such that   Z 1 2γ 2 + hn , (4) E Tn (hn ) − f (x) dx ≤ c1 n R n  1  ηn,γ 1 X 2 h2γ n E Tn (hn ) − E Tn (hn ) − Yi ≤ c2 2 + 2 + n n hn n n  (5) i=1 and, if additionally nhn → ∞ as n → ∞, i √ h L n Tn (hn ) − E Tn (hn ) −→ N (0, 4σ 2 ), where Yi = 2 f (Xi ) − R n P ∞  P 2 (x) dx , η f = |ai |γ and σ 2 = lim n−1 Var (Sn ) with n,γ R n→∞ `=0 i=`  Z n  X 2 Sn = f (Xi ) − f (x) dx . R i=1 4 (6) Theorem 2.2 Assume that ∞ P i=0 |ai |γ < ∞, 2γ 2 R |λ| |φε (λ)| dλ R < ∞ and  E |eιλε1 − φε (λ)|2 ≤ cγ,2 |λ|2γ ∧ 1 (7) R b for some γ ∈ (0, 1]. We further assume that f is bounded and R |K(λ)| dλ < ∞. Then there exist positive constants c3 and c4 such that   Z 1 2 2γ f (x) dx ≤ c3 E Tn (hn ) − + hn , (8) n R n  1 hγn  1X +√ Yi ≤ c4 E Tn (hn ) − E Tn (hn ) − n nhn n (9) i=1 and, if additionally √ nhn → ∞ as n → ∞, i √ h L n Tn (hn ) − E Tn (hn ) −→ N (0, 4σ 2 ) (10) for some σ 2 ∈ (0, ∞). Remark 2.1 By Definition 2.1, Theorems 2.1 and 2.2 are results for short memory linear processes. On the other hand, we work on the well-defined linear process (1) in Theorem 2.1, Theorem ∞ P 2.2 and the rest of the paper. If we assume ε1 ∈ Lγ (R), together with condition |ai |γ < ∞ in the i=0 theorems, then the linear process (1) is well-defined. However, the moment condition ε1 ∈ Lγ (R) is not needed in the proofs of our results. Remark 2.2 When {Xn } is an i.i.d. sequence, the kernel estimator (2) was studied in Giné and Nickl R(2008) with assumptions that the density function f (x) is and the smoothness R bounded 1 2γ 2 2 condition R |λ| |φ(λ)|R dλ < ∞ of f (x) for γ restricted to (0, 2 ]. If R u |K(u)| du < ∞ is replaced by a weaker condition R |u|β |K(u)| du < ∞ for some 0 < β ≤ 2, then the upper bounds in (4) and (8) above should be replaced by a constant multiple of n1 + hβ∧2γ . n Remark 2.3 The assumption (3) in Theorem 2.1 is required to obtain (5) and (6). To just get the inequality (4), we only need to assume (7). Using Lemma 7.3, we could easily see that E |ε1 |4γ < ∞ and E |ε1 |2γ < ∞ are sufficient for these two assumptions, respectively. However, these two moment conditions are not necessary. For example, when the innovation ε1 takes symmetric α-stable distributions with α ∈ (0, 2), E |eιλε1 − φε (λ)|4 ≤ c α4 ,4 (|λ|α ∧ 1), E |eιλε1 − φε (λ)|2 ≤ c α2 ,2 (|λ|α ∧ 1), but E |ε1 |α = ∞. On the other hand, assumption (3) is stronger than assumption (7). This explains why the results in Theorem 2.1 are better than the results in Theorem 2.2 if both assumptions (3) and (7) hold for a same γ in (0, 1]. Remark 2.4 If the underlying linear process {Xn } is i.i.d. or m-dependent, then the assumption  E |eιλε1 − φε (λ)|4 ≤ cγ,4 |λ|4γ ∧ 1 for some γ ∈ (0, 1] in Theorem 2.1 can be removed by making some minor modifications of its proof, and ηn,γ can be replaced by 0. Furthermore, for the i.i.d. case, the right hand side of (4) can be replaced by c1 h2γ n . R Remark 2.5 In Theorems 2.1 and 2.2, if we further have R |λ|4γ |φε (λ)|2 dλ < ∞, then, using 2β for all β ∈ [0, 1], the inequality (5) can be improved to b b the fact |K(λh n ) − K(0)| ≤ cβ |λhn | n 1X E Tn (hn ) − E Tn (hn ) − Yi n i=1 5 2 ≤ c2  1  ηn,γ h4γ n + + n2 hn n2 n while (9) to n E Tn (hn ) − E Tn (hn ) −  1  h2γ 1X n +√ . Yi ≤ c4 n nhn n i=1 As consequences of Theorem 2.1 and Theorem 2.2, we can easily obtain the following results. Corollary 2.1 Under the assumptions in Theorem 2.1. Let hn have order n then Z − 4γ f 2 (x) dx = OP (n 4γ+1 ); Tn (hn ) − 2 − 4γ+1 . If 0 < γ ≤ 1/4, (11) R if 1/4 < γ ≤ 1, then Z i √ h L n Tn (hn ) − f 2 (x) dx −→ N (0, 4σ 2 ), (12) R and, if we additional requireR K(x) ≥ 0 for all x, the estimator − ln( n1 + Tn (hn )) of the quadratic Rényi entropy R(f ) = − ln( R f 2 (x) dx) satisfies   i √ h 1 4σ 2 L , n − ln( + Tn (hn )) − R(f ) −→ N 0, R 2 n ( R f (x) dx)2 where σ 2 = lim n−1 Var (Sn ) with Sn = n→∞ n P f (Xi ) − i=1 R Rf 2 (x) dx  (13) . Corollary 2.2 Under the assumptions in Theorem 2.2. Let hn have order n then Z − 2γ Tn (hn ) − f 2 (x) dx = OP (n 2γ+1 ); 1 − 2γ+1 . If 0 < γ ≤ 1/2, (14) R if 1/2 < γ ≤ 1, then Z i √ h L f 2 (x) dx −→ N (0, 4σ 2 ), n Tn (hn ) − (15) R and, if we additional requireR K(x) ≥ 0 for all x, the estimator − ln( n1 + Tn (hn )) of the quadratic Rényi entropy R(f ) = − ln( R f 2 (x) dx) satisfies   i √ h 1 4σ 2 L n − ln( + Tn (hn )) − R(f ) −→ N 0, R 2 n ( R f (x) dx)2 for some σ 2 ∈ (0, ∞). 3 Examples In this section, we shall give a few examples of linear processes to illustrate our results. 6 (16) Example 3.1 (Linear process with Gaussian white noise innovations) Here the distribuλ2 tion Gaussian with mean 0 and variance σ 2 .  Note that E [eιλε1 ] = exp(− 2σ So 2 ).  R 2 of ε1 is 2 dλ < ∞, E |eιλε1 − φ (λ)|4 ≤ c 4 ∧ 1 and E |eιλε1 − φ (λ)|2 ≤ c 2∧1 . λ |φ (λ)| λ λ ε ε 1,4 ε 1,2 R Therefore, Theorems 2.1, 2.2 and Corollaries 2.1 and 2.2 hold for all short memory linear processes with Gaussian white noise innovations. Example 3.2 (Linear process with symmetric α-stable innovations) Here the distribution of ε1 is the symmetric α-stableR (SαS) with 0 < α < 2. Note that E [eιλε1 ] = exp(−cα |λ|α ) for some positive constant cα . So R λ2 |φε (λ)|2 dλ < ∞, E |eιλε1 − φε (λ)|4 ≤ c α4 ,4 (|λ|α ∧ 1) and E |eιλε1 − φε (λ)|2 ≤ c α2 ,2 (|λ|α ∧ 1). Therefore, Theorems 2.1 and 2.2 hold for all short memory linear processes having symmetric α-stable innovations (0 < α < 2) with γ = α4 and γ = α2 , respectively. The central limit theorem (12) in Corollary 2.1 and the central limit theorem (15) in Corollary 2.2 hold if 1 < α < 2. We should apply Theorem 2.2 and Corollary 2.2 instead of Theorem 2.1 and Corollary 2.1 P in order to study all short-memory processes with α-stable innovations and coefficients satisfying i |ai |α/2 < ∞. See Step 2 of Section 5 for the detailed discussion. Example 3.3 (Causal ARM A(p, q) process) An ARM A(p, q) model has the form φ(B)Xt = θ(B)εt , where εt are i.i.d random variables with E εt = 0 and E ε2t = σε2 , φ and θ are two polynomials with no common zeros, φ(z) = 1 − φ1 z − φ2 z 2 − · · · − φp z p , φp 6= 0, θ(z) = 1 + θ1 z + θ2 z 2 + · · · − θq z q , θq 6= 0, and B is the back shift operator with B k Xt = Xt−k . An ARM A(p, q) process is causal if it can be ∞ ∞ P P written as a one-sided linear process Xt = ai εt−i with |ai | < ∞. It is causal if and only if i=0 i=0 φ(z) 6= 0 for |z| ≤ 1. In this case, the coefficients of the linear process can be determined by solving a(z) = ∞ X ai z i = i=0 φ(z) , θ(z) where |z| ≤ 1. It is easy to see that the coefficients ai decay exponentially fast to zero. So ∞ P ∞ P |ai |γ < ∞ for any γ > 0. This means that we can choose γ as small as possible, which will `=0 i=` enlarge the choices of the innovations ε. Moreover, the upper bound in (5) of Theorem 2.1 can be 2γ improved to a constant multiple of n21hn + hnn . 4 An application to L22 divergence Let f (x) and g(x) be the probability densities for independent linear processes Xn = and Yn = ∞ P j=0 ∞ P ai εn−i i=0 bj ξn−j defined as in (1), respectively. Then the L22 divergence between f and g is defined as Z D(f, g) := R (f (x) − g(x))2 dx = Z f 2 (x) dx + R Z R 7 g 2 (x) dx − 2 Z f (x)g(x) dx. R The estimator for D(f, g) is b g) = Tn (f, hn ) + Tn (g, hn ) − 2Tn (f, g, hn ), D(f, where  Xi − Xj K , hn 1≤i<j≤n   X Yi − Yj 2 K Tn (g, hn ) = n(n − 1)hn hn 2 Tn (f, hn ) = n(n − 1)hn  X 1≤i<j≤n and 1 Tn (f, g, hn ) = 2 n hn  X K 1≤i,j≤n Xi − Yj hn  . Krishnamurthy et. al. (2015) studied the estimation of L22 divergence for multivariate independent 2n i.i.d. samples {Xi }2n i=1 ∼ f (x) and {Yi }i=1 ∼ g(x). They used data splitting in the estimation which is necessary to obtain the asymptotic normality [see Gretton et. al. (2012); Krishnamurthy et. al. (2015)]. However, in our case, the data splitting is not needed. Using similar arguments as in the proof of Theorems 2.1 and 2.2, one can obtain the same results for Tn (f, g, hn ). Together with Theorems 2.1 and 2.2, we then have the following results. Theorem 4.1 Assume that the independent linear processes {Xn } and {Yn } satisfy the same conditions as in Theorem 2.1. Then there exist positive constants c1 and c2 such that   1 2γ b E D(f, g) − D(f, g) ≤ c1 + hn , (17) n n X b g) − E D(f, b g) − 1 E D(f, Wi n 2 i=1   1 ηn,γ h2γ n ≤ c2 2 + 2 + n hn n n and, if additionally nhn → ∞ as n → ∞, i √ h L b g) − E D(f, b g) −→ n D(f, N (0, 4σ 2 ), (18) (19) where Z Z Z   f 2 (x) dx + g(Yi ) − g 2 (x) dx + g(Xi ) + f (Yi ) − 2 f (x)g(x) dx , Wi = 2 f (Xi ) − R ηn,γ = n P ∞ P `=0 i=` |ai |γ ∨ n P ∞ P R |bi |γ , and σ 2 = lim n−1 Var (Sn ) with Sn = n→∞ `=0 i=` Let hn have order n R 2 − 4γ+1 1 2 n P Wi . i=1 b g). . Then similar results as in Corollary 2.1 can be obtained for D(f, Theorem 4.2 With the same notations as in Theorem 4.1, assume that the independent linear processes {Xn } and {Yn } satisfy the same conditions as in Theorem 2.2. Then there exists a positive constant c such that n  1 X hγn  b g) − E D(f, b g) − 1 E D(f, Wi ≤ c +√ n nhn n (20) i=1 and (17), (19) hold for some Let hn have order n 1 − 2γ+1 σ2 ∈ (0, ∞). b g). . Then similar results as in Corollary 2.2 can be obtained for D(f, 8 5 Simulation study and real data analysis In this section we first conduct a simulation study to verify the central limit theorems in Section 2 for the kernel entropy estimator of linear processes with different coefficient sequences and innovations with stable or Gaussian laws. For this purpose, we shall draw normal quantile plots and histograms, perform hypothesis tests and provide confidence intervals on the means. In the second part of this section, we apply the kernel method to study the divergences between each pair of the annual average flow distributions of four rivers on the earth. The simulation study has two steps. R Step 1: Calculate or approximate the true value of the quadratic functional R f 2 (x)dx. By the inverse Fourier transform, the probability density function f (x) of the linear process in (1) and its characteristic function φ(t) = E[eιtX1 ] have the following relationship: Z 1 f (x) = φ(t)e−ιtx dt. (21) 2π R Also, we have φ(t) = E[eιtXn ] = ∞ Y E[eιtai εn−i ]. i=0 Γ(i+d) Now let ai = Γ(d)Γ(i+1) , i ≥ 0, for any d < 21 , d 6= 0, −1, −2, · · · . Applying Stirling’s formula, √ Γ(x) ∼ 2πe−x+1 (x − 1)x−1/2 as x → ∞, ai ∼ id−1 /Γ(d) as i → ∞. In particular, under the condition −1 < d < 21 , d 6= 0, the FARIMA(0, d, 0) processes Xn = (1 − B)−d εn , where B is the Γ(i+d) backshift operator, are causal and they have the form of linear process with ai = Γ(d)Γ(i+1) . See Bondon and Palma (2007) for the extension of causality of FARIMA(p, d, q) processes to the range of −1 < d < 1/2. We shall perform simulation study for linear processes with Gaussian or Cauchy innovations and some selected values of d. t2 Case 1. Suppose the innovations {εi } are i.i.d. N (0, 1) random variables, then φε (t) = e− 2 t2 P∞ 2 and hence φ(t) = e− 2 i=0 ai . By the Gauss’s theorem [Gauss (1866)] for hypergeometric series, P∞ 2 Γ(1−2d) 1 i=0 ai = Γ2 (1−d) for any d < 2 , d 6= 0, −1, −2, · · · . See also Bailey (1935) or its direct calculation in Sang and Sang (2017). By the formula (21) and the application of MATLAB, √ Z 2 − πx2 1 ∞ − t22 ΓΓ(1−2d) 2 (1−d) f (x) = e cos(tx)dt = e 8 π 0 4 if we take d = −0.5. As a result, Z f 2 (x)dx = 0.2500 if d = −0.5. R In this way, we also calculate or approximate the value of in Table 1. Table 1: The approximate value of d R 2 R f (x)dx −0.1 0.2801 −0.3 0.2678 R Rf 2 (x)dx −0.5 0.2500 R Rf 2 (x)dx for other d values as listed for linear processes with Gaussian innovations −0.7 0.2300 −0.9 0.2095 −1.5 0.1531 −2.5 0.0856 −3.5 0.0462 Case 2. If the innovations {εi } P have i.i.d. symmetric α-stable distribution with 0 < α < 2, ∞ α α α then φε (t) = e−|t| and φ(t) = e−|t| i=0 |ai | . In particular, if α = 1, we have the standard Cauchy 9 P∞ −|t| i=0 |ai | distribution with φε (t) = e−|t| and P∞φ(t) = e P100,000 . In this case, with the help of the software |ai | and then calculate f (x) and the value of we approximate i=0 |ai | by i=0 RMathematica, 2 (x)dx. The result is in Table 2. f R Table 2: The approximate value of d R 2 R f (x)dx R Rf −0.1 0.0934 2 (x)dx −0.3 0.0806 for linear processes with Cauchy innovations −0.5 0.0796 −0.7 0.0796 −0.9 0.0796 Step 2: For each case, linear processes with Gaussian or Cauchy innovations, and each memory parameter d, we produce m = 1, 000 linear processes with n = 4, 096 observations {Xi }ni=1 in each of them by applying the MATLAB code in Faÿ et. al. (2009) with some modification. For each generated linear R 2 process, we apply the estimator Tn (hn ) as in (2) to estimate the true quadratic functional R f (x)dx. The estimation is realized in MATLAB. Here we choose the normal kernel, x2 that is, K(x) = √12π e− 2 , in the estimator Tn (hn ). The other common kernel functions are also applicable since the main theorems and corollaries only assume some basic conditions on the kernel functions. Γ(i+d) 1 For the chosen ai = Γ(d)Γ(i+1) since , i ≥ 0, and for all results in Section 2, we require γ > 1−d P∞ γ d−1 /Γ(d). i=0 |ai | < ∞ and ai ∼ i Case 1. Suppose the innovations εi , i ∈ Z, are i.i.d. N (0, 1) random variables. Then E [eιλε1 ] =  R 2 λ2 2 ιλε1 − φ (λ)|4 ≤ c 4 ιλε1 − φ (λ)|2 ≤ exp(− 2σ ε 1,4 λ ∧ 1 and E |e ε 2 ). So R λ |φε (λ)| dλ < ∞, E |e c1,2 λ2 ∧ 1 . In this case, we should apply Theorem 2.1 and Corollary 2.1 instead of Theorem 2.2 and Corollary 2.2. The convergence rate (11) in Corollary 2.1 is faster than the convergence rate (14) in Corollary 2.2. The central limit theorem (12) in Corollary 2.1 holds for 1/4 < γ ≤ 1 while the central limit theorem (15) in Corollary 2.2 holds only for 1/2 < γ ≤ 1. See also Remark 1 2.3. To have the central limit theorem (12), we require 1−d ∨ 41 < γ ≤ 1 and the bandwidth hn − 2 to have the order of n 4γ+1 . In this Gaussian case, we recommend to take γ = 1 and hn to have 2 the order of n− 5 to make (12) hold for all d < 0. To apply kernel method in estimation, one should select an optimal bandwidth based on some criteria, for example, to minimize the mean squared error. R For the i.i.d. case, Giné and Nickl (2008) construct a kernel-based rate adaptive in the first step. It is interesting estimator of R f 2 (x)dx by selecting the bandwidth hn adaptively R 2 to investigate the bandwidth adaptive kernel estimator of R f (x)dx for linear processes from both theoretical and application viewpoints. However, it seems that the study in this direction is very difficult. We leave it as an open question for future study. For the current simulation study, we take hn = n−2/5 in the Gaussian case. R Case 2. In the α-stable case, R λ2 |φε (λ)|2 dλ < ∞, E |eιλε1 − φε (λ)|4 ≤ c α4 ,4 (|λ|α ∧ 1) and E |eιλε1 − φε (λ)|2 ≤ c α2 ,2 (|λ|α ∧ 1). Therefore, Theorem 2.1 (Corollary 2.1) and Theorem 2.2 (Corollary 2.2) hold for all short memory linear processes having symmetric α-stable innovations P α/4 < ∞ in Theorem (0 < α < 2) with γ = α4 and γ = α2 , respectively. Hence we require ∞ |a | i=0 i P α/2 < ∞ in Theorem 2.2 and Corollary 2.2. For 2.1 and Corollary 2.1 and we only require ∞ |a | i i=0 this reason, we should apply Theorem 2.2 and Corollary 2.2 instead of Theorem 2.1 and Corollary 2.1. Since γ = α2 , Theorem 2.2 holds for all α ∈ (0, 2) while in Corollary 2.2, we have (14) for α ∈ (0, 1] and the central limit theorem (15) only for α ∈ (1, 2). Hence if 1 < α < 2, we should take 1 hn to have the order of n− α+1 to confirm the central limit theorem (15). If 0 < α ≤ 1, we should √ not expect to have (15). But in this case we can take hn with nhn → ∞ to confirm the central limit theorem (10) in Theorem 2.2. In the simulation study, we take hn = n−2/5 . In Theorem 2.2 and Corollary 2.2, the coefficients ai should have parameter d with d < 1 − γ1 = 1 − α2 . 10 Figure 1 and Figure 2 show the histograms with kernel density fits and normal Q-Q plots of rn = i R 2 √ h n Tn (hn ) − R f (x) dx from m = 1, 000 simulated linear processes with Gaussian innovations and d = −0.1, −0.9, −3.5. It is clear that the realizations of rn are distributed as some normal distribution in each case. We also have performed simulation study for d = −0.3, −0.5, −0.7, −1.5 and −2.5 and obtained similar plots and results. We then perform hypothesis test H0 : µ = 0; H1 : µ 6= 0 for the mean of the asymptotic distribution of rn and provide the 95% confidence interval for µ for each value of d. The result is listed in Table 3. It is clear that rn is asymptotically centered in each case. Over all, the simulation study here confirms the analysis for the Gaussian case based on the main results in Section 2. 2 Histogram: Gaussian case, d=-0.1 2.5 Histogram: Gaussian case, d=-0.9 8 1.8 Histogram: Gaussian case, d=-3.5 7 1.6 2 6 1.4 1.2 5 1.5 1 4 0.8 1 3 0.6 2 0.4 0.5 1 0.2 0 -1 -0.5 0 0.5 1 0 -1 1.5 -0.5 0 0.5 0 -0.3 1 -0.2 -0.1 0 0.1 0.2 0.3 Figure 1: The histograms with kernel density fits of rn from m = 1, 000 simulated processes with Gaussian innovations and d = −0.1, −0.9, −3.5. QQ Plot: Gaussian case, d=-0.1 0.8 Quantiles of Input Sample Quantiles of Input Sample 0.2 0.6 0.6 0.4 0.2 0 -0.2 -0.4 -2 0 2 Standard Normal Quantiles 4 0.2 0 -0.2 -0.4 -0.8 -4 QQ Plot: Gaussian case, d=-3.5 0.15 0.4 -0.6 -0.6 -0.8 -4 QQ Plot: Gaussian case, d=-0.9 Quantiles of Input Sample 1 0.8 0.1 0.05 0 -0.05 -0.1 -0.15 -2 0 2 Standard Normal Quantiles 4 -0.2 -4 -2 0 2 4 Standard Normal Quantiles Figure 2: The normal Q-Q plots of rn from m = 1, 000 simulated processes with Gaussian innovations and d = −0.1, −0.9, −3.5. 11 Table 3: The p-values on testing H0 : µ = 0; H1 : µ 6= 0 for the asymptotic distribution of rn and the 95% confidence intervals for µ. d p-value CI d p-value CI −0.1 0.3996 (-0.0191,0.0076) −0.9 0.6705 (-0.0148, 0.0095) −0.3 0.7810 (-0.0159,0.0120) −1.5 0.8297 (-0.0064,0.0080) −0.5 0.5058 (-0.0086,0.0174) −2.5 0.2055 (-0.0021, 0.0098) −0.7 0.6676 (-0.0099, 0.0154) −3.5 0.2211 (-0.0058, 0.0013) Figureh 3 and Figure 4 show i the histograms with kernel density fits and normal Q-Q plots of R 2 √ rn = n Tn (hn ) − R f (x) dx from m = 1, 000 simulated processes with Cauchy innovations and d = −0.1, −0.5, −0.9. It is clear that the realizations of rn do not follow normal distribution in the case d = −0.1 or d = −0.5. We also have performed simulation study for d = −0.3, −0.7 and obtained similar plots and results. For d = −0.9, the histogram and normal Q-Q plot indicate that the distribution of rn is very close to some normal distribution with mean 0. This is because the central limit theorem (15) in Corollary 2.2 holds for α = 1 +  with  an arbitrary small positive number, d < 1 − α2 , which is close to the case α = 1, d = −0.9 here. In the case 0 < α ≤ 1, we have the central limit theorem (10) although (15) does not hold any more. 0.6 Histogram: Cauchy case, d=-0.1 1.2 0.5 1 0.4 0.8 0.3 0.6 0.2 0.4 0.1 0.2 Histogram: Cauchy case, d=-0.5 2.5 Histogram: Cauchy case, d=-0.9 2 1.5 1 0 -8 -6 -4 -2 0 2 4 0 -4 0.5 -3 -2 -1 0 1 2 0 -1.5 -1 -0.5 0 0.5 1 Figure 3: The histograms with kernel density fits of rn from m = 1, 000 simulated processes with Cauchy innovations and d = −0.1, −0.5, −0.9. 12 QQ Plot: Cauchy case, d=-0.1 4 1.5 QQ Plot: Cauchy case, d=-0.5 0.6 1 2 1 0 -1 -2 -3 -4 0.5 0 -0.5 -1 -1.5 -2 -6 -4 -2 0 2 4 -3 -4 Standard Normal Quantiles 0.2 0 -0.2 -0.4 -0.6 -0.8 -2.5 -5 QQ Plot: Cauchy case, d=-0.9 0.4 Quantiles of Input Sample Quantiles of Input Sample Quantiles of Input Sample 3 -2 0 2 4 -1 -4 -2 Standard Normal Quantiles 0 2 4 Standard Normal Quantiles Figure 4: The normal Q-Q plots of rn from m = 1, 000 simulated processes with Cauchy innovations and d = −0.1, −0.5, −0.9. Figure 5 and Figure 6 show the histograms with kernel density fits and normal Q-Q plots √ of nTn (hn ) from m = 1, 000 simulated processes with stable innovations (α = 0.5) and d = √ −1.8, −2.5, −3.5. It is clear that the values of nTn (hn ) do not follow normal distribution in the case d = −1.8 while they do follow normal distribution in the case d = −3.5. For d = −2.5, the √ histogram and normal Q-Q plot indicate that the distribution of nTn (hn ) is not Gaussian but √ is close to some normal distribution. This confirms the analysis that nTn (hn ) follows a normal distribution when d < 1 − α2 even if 0 < α ≤ 1. Histogram: alpha=0.5, d=-1.8 6 12 Histogram: alpha=0.5, d=-2.5 5 10 25 4 8 20 3 6 15 2 4 10 1 2 5 0 0 0.1 0 0.2 0.4 0.6 0.8 1 0.2 0.3 0.4 0.5 Histogram: alpha=0.5, d=-3.5 30 0.6 0 0.14 0.16 0.18 0.2 0.22 0.24 0.26 0.28 √ Figure 5: The histograms with kernel density fits of nTn (hn ) from m = 1, 000 simulated processes with stable innovations (α = 0.5) and d = −1.8, −2.5, −3.5. 13 QQ Plot: alpha=0.5, d=-1.8 0.6 Quantiles of Input Sample Quantiles of Input Sample 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 -4 QQ Plot: alpha=0.5, d=-2.5 0.28 QQ Plot: alpha=0.5, d=-3.5 0.55 Quantiles of Input Sample 1 0.9 0.5 0.45 0.4 0.35 0.3 0.25 0.26 0.24 0.22 0.2 0.18 0.2 -2 0 2 Standard Normal Quantiles 4 0.15 -4 -2 0 2 Standard Normal Quantiles 4 0.16 -4 -2 0 2 4 Standard Normal Quantiles √ Figure 6: The normal Q-Q plots of nTn (hn ) from m = 1, 000 simulated processes with stable innovations (α = 0.5) and d = −1.8, −2.5, −3.5. b g) to study For the purpose of illustration, we apply the L22 kernel divergence estimator D(f, the difference of annual average river flows among four rivers on the earth. The data sets consist of annual average river flows (1,000 cubic meters per second) from Danube River at Orshava, Romania, Gota River near Sjotop-Vannersburg, Sweden, Mississippi River near St. Louis, Missouri, USA and Rhine River near Basle, Switzerland for 96 years between 1861 and 1956. The river flow data of these rivers are well studied in ecology and statistics, e.g., Hipel and McLeod (1994). The original data sets cover different time periods. We choose part of each data set from year 1861 to year 1956 in order to compare the flows in the same time period. The Kwiatkowski, Phillips, Schmidt, and Shin (KPSS) test, the time series plots in Figure 7 and the autocorrelation plots in Figure 8 show the stationarity and short memory property of the river flow level of each river. We apply the estimator to calculate the divergence between the flow distributions of every two rivers. As in the simulation study, we take the standard normal density function as the kernel function. The right part of Figure 7 gives the kernel density estimations of river flows for each river. Since they approximately follow some normal distributions, we let the bandwidth to be hn = 96−0.4 ≈ 0.161. All the divergences are presented in Table 4. According to the density curves in Figure 7, it is not a surprise that the biggest L22 divergence is between the Gota River and the Rhine River. The density functions of these two rivers do not have much overlap although they are very close in location. On the other hand, the density functions of Gota River and Rhine River, in particular the density function of the Gota River, have much bigger values in their supports than those of the other two rivers. The squared difference (f (x) − g(x))2 , not the relative location between the supports of f (x) and g(x), makes contribution to the value of the L22 divergence D(f, g). Mississippi River and Danube River have very similar density functions in terms of supports and values. Mississippi River has the smallest maximum density and it has a little bit overlap with Gota River or Rhine River. There is almost no overlap between the Danube River and Gota River or Rhine River. This explains the order of the divergences in Table 4. 14 Danube River Yearly flow 8 3.5 4 1870 1880 1890 1900 1910 1920 1930 1940 1950 1960 3 Gota River 0.8 Yearly flow Danube Gota Mississippi Rhine 6 2 1860 0.6 2.5 0.4 0.2 1860 1870 1880 1890 Yearly flow 1900 1910 1920 1930 1940 1950 1960 2 Mississippi River 10 1.5 5 0 1860 1870 1880 1890 1900 1910 1920 1930 1940 1950 1 1960 Rhine River 1.4 Yearly flow Probability density curves of four river flows 4 1.2 0.5 1 0.8 0.6 1860 1870 1880 1890 1900 1910 1920 1930 1940 1950 0 -2 1960 Time (years) 0 2 4 6 8 10 12 Average annual river flow (1,000 cubic meters per second) Figure 7: The time series plots and probability density functions of average annual river flow. Sample ACF: Danube River 0.8 0.6 0.4 0.2 0 -0.2 -0.4 0 5 10 15 Sample ACF: Gota River 1 Sample Autocorrelation Sample Autocorrelation 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 20 0 5 Lag Sample ACF: Mississippi River 0.8 0.6 0.4 0.2 0 -0.2 -0.4 0 5 10 15 20 15 Sample ACF: Rhine River 1 Sample Autocorrelation Sample Autocorrelation 1 10 Lag 0.8 0.6 0.4 0.2 0 -0.2 -0.4 20 Lag 0 5 10 15 20 Lag Figure 8: The sample autocorrelation functions of average annual river flow. 15 Table 4: River flow divergences The rivers Gota River, Rhine River Gota River, Danube River Gota River, Mississippi River Rhine River, Danube River Rhine River, Mississippi River Danube River, Mississippi River 6 Divergence 2.7797 2.1421 2.0725 1.6129 1.5433 0.0348 Extensions to multivariate linear processes √ In this section, we denote norm functions in various linear spaces by | · |. For x ∈ Rd , |x| := x xT where xT is the transposition of x. For a d × d deterministic real matrix a, |a| := max |a xT |. x∈Rd ,|x|=1 In the sequel, we give extensions to the following multivariate linear process Xn = ∞ X ai εn−i , (22) i=0 where the innovations εi are i.i.d. d × 1 random vectors in some probability space (Ω, F, P) and ai ∞ P are d × d deterministic real matrices such that ai εn−i converges in distribution. It is easy to i=0 see that the multivariate linear process Xn in (22) exists and is well defined when εi are i.i.d. d × 1 random vectors in Lp (Rd ) for some p > 0 and ai are d × d deterministic real matrices satisfying ∞ P |ai |2∧p < ∞. Let f be the probability density function of Xn . To estimate the quadratic i=0 functional of f , we would use the estimator Tn (hn ) = 1 n(n − 1) det(hn ) X  K h−1 n (Xi − Xj ) , 1≤i6=j≤n R R where the kernel K is a symmetric and bounded function with Rd K(u) du = 1 and Rd |u|2 |K(u)| du < ∞. The bandwidth sequence hn are diagonal matrices diag[hn1 , hn2 , · · · , hnd ] satisfying 0 < hni → 0 for all i = 1, 2, · · · , d. We require the following assumptions on ai and εi . Assumption R 1 det(a0 ) 6= 0, det(am ) 6= 0 for some m ≥ 1 and ai = d × d zero matrix for all i > m, and Rd |λ|2γ |φε (λ)|2 dλ < ∞ for some γ ∈ (0, 1]. Assumption 2 det(a0 ) 6= 0, det(ap ) 6= 0 and det(aq ) 6= 0 with p = min{i ∈ N : det(ai ) 6= 0} and ∞  P q = min{i ∈ N : det(ai ) 6= 0 and i > p} < ∞, |ai |γ < ∞, E |eιλε1 − φε (λ)|4 ≤ cγ,4 |λ|4γ ∧ 1 i=0 R and Rd |λ|2γ |φε (λ)|2 dλ < ∞ for some γ ∈ (0, 1], ∃ two indices ir s.t. det(air +r − air ) 6= 0 for each r ∈ {1, 2, · · · , q}. Assumption 3 det(a0 ) 6= 0, det(ap ) 6= 0 with p = min{i ∈ N : det(ai ) 6= 0} < ∞, ∃ indice ir such ∞  P that det(air − air +r ) 6= 0 for each r ∈ {1, · · · , p}, |ai |γ < ∞, E |eιλε1 − φε (λ)|2 ≤ cγ,2 |λ|2γ ∧ 1 i=0 R and Rd |λ|2γ |φε (λ)|2 dλ < ∞ for some γ ∈ (0, 1]. 16 Using similar arguments as in the proof of Theorems 2.1 and 2.2 with some proper modifications, we can get the following results. Theorem 6.1 Under the assumption 1 or 2, we further assume that f is bounded. Then there exist positive constants c1 and c2 such that   Z 1 2 2γ f (x) dx ≤ c1 + det(hn ) , (23) E Tn (hn ) − n Rd n E Tn (hn ) − E Tn (hn ) − 1X Yi n 2 ≤ c2  i=1 ηn,γ 1 det(hn )2γ  + + n2 det(hn ) n2 n (24) and, if additionally n det(hn ) → ∞ as n → ∞, i √ h L n Tn (hn ) − E Tn (hn ) −→ N (0, 4σ 2 ), where Yi = 2 f (Xi ) − R Rd (25) n P ∞  P f 2 (x) dx , ηn,γ = |ai |γ and σ 2 = lim n−1 Var (Sn ) with n→∞ `=0 i=` Sn = n  X Z f (Xi ) − 2  f (x) dx . Rd i=1 Theorem 6.2 Under the assumption 3, we further assume that f is bounded and ∞. Then there exist positive constants c3 and c4 such that   Z 1 2 2γ + det(hn ) , E Tn (hn ) − f (x) dx ≤ c3 n Rd R Rd b |K(λ)| dλ < (26) n  1X 1 det(hn )γ  E Tn (hn ) − E Tn (hn ) − Yi ≤ c4 + √ n n det(hn ) n (27) i=1 and, if additionally √ n det(hn ) → ∞ as n → ∞, i √ h L n Tn (hn ) − E Tn (hn ) −→ N (0, 4σ 2 ) (28) for some σ 2 ∈ (0, ∞). Remark 6.1 In the i.i.d case, that is, det(a0 ) 6= 0 and ai = d × d zero matrix for all i ≥ 1, and R 2γ |φ (λ)|2 dλ < ∞ for some γ ∈ (0, 1], then results in Theorem 6.1 still hold with the right |λ| ε Rd hand side of (23) replaced by a constant multiple of det(hn )2γ and ηn,γ in (24) by 0, respectively. 17 7 Proofs In this section, the proofs of our main results, Theorems 2.1 and 2.2, are given. First we provide two useful lemmas based on the projection method. For each i ∈ Z, let Fi be the σ-field generated by {εk : k ≤ i}. Given an integrable complexvalued random variable Z, we define the following projection operator Pi as Pi Z = E [Z|Fi ] − E [Z|Fi−1 ] (29) for each i ∈ Z. It is easy to see that E [Pi Z Pj W ] = 0 (30) for any two integrable complex-valued random variables Z and W if i 6= j. The estimation in the following lemma is useful in deriving the order of the bias of the kernel estimator (2). Lemma 7.1 Suppose ∞ P  |ai |γ < ∞ and E |eιλε1 − φε (λ)|2 ≤ cγ,2 |λ|2γ ∧ 1 for some γ ∈ (0, 1]. i=0 Then there exists a positive constant c such that i h X E H(Xi )(λ)H(Xj )(λ) 1≤i6=j≤n p Y ∞ h i X ≤ c n |φε (λa0 )| |λ|2γ |φε (λa0 )| + |λ|γ |φε (λap )| + |φε (λ(a` − a`+r ))| , r=1 `=1 where p = min{i ∈ N : ai 6= 0} < ∞. Moreover, the right hand side of the above inequality is equal to 0 if ai = 0 for all i ∈ N. Proof. It suffices to show the case when ai 6= 0 for some i ∈ N. Recall the definition of projection operator Pk in (29). Applying telescoping, (30) and the triangle inequality, we have X h i E H(Xi )(λ)H(Xj )(λ) ≤ 2 X i X i h E Pk H(Xi )(λ)Pk H(Xj )(λ) 1≤i<j≤n k=−∞ 1≤i6=j≤n =2 X i X i h E P0 H(Xi−k )(λ)P0 H(Xj−k )(λ) . 1≤i<j≤n k=−∞ Note that ∞ j−k−1 i−k−1 i h ιP i Y λ(a`+i−k −a`+j−k )ε−` ih Y E P0 H(Xi−k )(λ)P0 H(Xj−k )(λ) = E e `=1 |φε (λa` )|2 φε (−λa` ) h `=0 `=i−k h i × E (eιλai−k ε0 − φε (λai−k ))(e−ιλaj−k ε0 − φε (−λaj−k )) . Pn−1 Pn Pi Next, we decompose the triple sum i=1 j=i+1 k=−∞ into the sum with k < i, the sum with k = i and i + 2 ≤ j ≤ n and the sum with k = i and j = i + 1. By Cauchy-Schwartz inequality, we 18 have h i E H(Xi )(λ)H(Xj )(λ) X 1≤i6=j≤n ≤2 n−1 X n X i−1 X |φε (λa0 )|2 p 1 − |φε (λai−k )|2 q 1 − |φε (λaj−k )|2 i=1 j=i+1 k=−∞ +2 n−1 X j−i−1 Y n X |φε (λa` )| i=1 j=i+2 `=0 +2 n−1 X ∞ Y q p |φε (λ(a` − a`+j−i ))| 1 − |φε (λa0 )|2 1 − |φε (λaj−i )|2 `=1 |φε (λa0 )| i=1 ∞ Y  |φε (λ(a` − a`+1 ))| . `=1 Note that the second term on the right hand side of the above inequality is less than 2 n−1 X n X |φε (λa0 )||φε (λap )| q 1 − |φε (λaj−i )|2 i=1 j=i+1+p +2 i+p n−1 X X |φε (λa0 )| i=1 j=i+2 ∞ Y q |φε (λ(a` − a`+j−i ))| 1 − |φε (λaj−i )|2 . `=1 Therefore, using the conditions of the lemma, X n−1 n h i X X 2γ E H(Xi )(λ)H(Xj )(λ) ≤ c1 |λ| i−1 X |φε (λa0 )|2 |ai−k |γ |aj−k |γ i=1 j=i+1 k=−∞ 1≤i6=j≤n γ + c1 |λ| n−1 X n X |φε (λa0 )||φε (λap )||aj−i |γ i=1 j=i+1+p + c1 n−1 X |φε (λa0 )| p Y ∞ X |φε (λ(a` − a`+r ))|. r=1 `=1 i=1 This gives the desired result. Remark 7.1 Note that in Lemma 7.1, if the linear process {Xn } is m-dependent, then am 6= p Q ∞ P 0, m ≥ p and |φε (λ(a` − a`+r ))| ≤ p|φε (λam )|. If lim ai = 0, a0 6= 0 and ai 6= 0 for i→∞ r=1 `=1 infinite many i ∈ N, then for each r ∈ {1, 2, · · · , p}, qr = min{i ∈ N : ai − ai+r 6= 0} < ∞ and p Q p ∞ P P |φε (λ(a` − a`+r ))| ≤ |φε (λ(aqr − aqr +r ))|. r=1 `=1 r=1 The next lemma is needed in the proof of Theorem 2.2.  Lemma 7.2 For any m ∈ N and γ ∈ (0, 1], if E |eιλε1 − φε (λ)|2 ≤ cγ,2 |λ|2γ ∧ 1 , then there exists a positive constant c such that h E φn (λ) − φ(λ) 2 i ∞ i2 X Y  γ m−1 ch γ ≤ m+2 |ai | |λ| |φε (λaj )| . n i=m j=0 Proof. Obviously, E H(X1 ) = 0, E |H(X1 )|2 < ∞ and n(φn (λ) − φ(λ)) = n h X n i X eιλXi − E eιλXi = H(Xi ). i=1 i=1 19 Note that P0 H(Xi ) = E [H(Xi )|F0 ] − E [H(Xi )|F−1 ] for each i ∈ N. Then, P0 H(Xi ) = E [eιλXi |F0 ] − E [eιλXi |F−1 ] ι =e ∞ i−1 λaj εi−j j=i ι =e ∞ P ∞ P i P P h ι P λaj εi−j i ι λaj εi−j h ι λaj εi−j i E e j=0 − e j=i+1 E e j=0 i−1 λaj εi−j j=i+1 h ι P λaj εi−j ih i E e j=0 eιλai ε0 − E eιλai ε0 := I ∗ II ∗ III, ι where I = e ∞ P i−1 λaj εi−j j=i+1 h ι P λaj εi−j i i−1 Q , II = E e j=0 = φε (λaj ) and j=0 III = eιλai ε0 − E [eιλai ε0 ] = eιλai ε0 − φε (λai ). Since I and III are independent, i h kP0 H(Xi )k22 = E P0 H(Xi )P0 H(Xi ) = [II ∗ II]E [I ∗ Ī]E [III ∗ III] = i−1 Y |φε (λaj )|2 [1 − |φε (λai )|2 ] j=0 for i ≥ 1 and kP0 H(X0 )k22 = 1 − |φε (λa0 )|2 . Consequently, ∞ X kP0 H(Xi )k2 = ∞ Y i−1 X p p 1 − |φε (λa0 )|2 + |φε (λaj )| 1 − |φε (λai )|2 i=0 i=1 j=0 ≤m+ ∞ Y i−1 X p |φε (λaj )| 1 − |φε (λai )|2 i=m j=0 ≤m+ m−1 Y ∞ p X |φε (λaj )| 1 − |φε (λai )|2 i=m j=0 ≤ m + cγ  ∞ X γ |ai |  |λ| i=m γ m−1 Y |φε (λaj )|. j=0 This completes the proof. Now we give the proof of Theorem 2.1. Proof of Theorem 2.1. The proof will be done in several steps. Step 1. We give the estimation for Z E [Tn (hn )] − R 20 f 2 (x) dx . By Fourier inverse transform, Tn (hn ) can be written as X Z 1 −ιλ(Xi −Xj ) b K(λh dλ. Tn (hn ) = n )e πn(n − 1) R (31) 1≤i<j≤n Together with the Plancherel theorem, we have Z E [Tn (hn )] − f 2 (x) dx R h i X Z 1 ιλXi b = K(λh − φ(λ))(e−ιλXj − φ(−λ)) dλ n ) E (e 2πn(n − 1) 1≤i6=j≤n R Z   1 2 b b K(λh + n ) − K(0) |φ(λ)| dλ. 2π R (32) 2β for any β ∈ [0, 1], b b Using Lemma 7.1 and the inequality |K(λh n ) − K(0)| ≤ cβ |λhn | Z Z Z c1 2 2γ 2 2γ E [Tn (hn )] − f (x) dx ≤ (1 + |λ| )|φε (λ)| dλ + c1 hn |λ|2γ |φ(λ)|2 dλ n R R R   1 2γ ≤ c2 + hn . n In the case that {Xi }ni=1 are i.i.d. random variables, the term (32) equals zero and hence E [Tn (hn )]− R 2 2γ R f (x) dx ≤ c2 hn . This is consistent with the result using convolution method as in Giné and Nickl (2008). Step 2. We give the decomposition for Tn (hn ) − E Tn (hn ). Using (31), we can obtain the following decomposition Tn (hn ) − E Tn (hn ) = 2Nn + Dn − E [Dn ], (33) where n 1 X Nn = 2πn Z  ιλXi b − φ(λ) φ(−λ) dλ K(λh n) e R i=1 and 1 Dn = 2πn(n − 1) X Z   ιλXi b K(λh − φ(λ) e−ιλXj − φ(−λ) dλ. n) e 1≤i6=j≤n R Step 3. Here we estimate E |Dn |2 . We first assume that {Xn } is m-dependent, that is, a0 6= 0, am 6= 0 and ai = 0 for all i > m. In this case, X Z 2  −ιλX  1 2 ιλXi j b E |Dn | ≤ 2 E K(λh ) e − φ(λ) e − φ(−λ) dλ n n (n − 1)2 j−i>4m R X Z 2   1 ιλXi b + 2 E K(λh − φ(λ) e−ιλXj − φ(−λ) dλ . (34) n) e 2 n (n − 1) R 0<j−i≤4m 21 For the first expectation on the right hand side of (34), X Z 2   ιλXi b E K(λh − φ(λ) e−ιλXj − φ(−λ) dλ n) e j−i>4m R Z ≤ R2 X b 1 hn )||K(λ b 2 hn )| |K(λ   E (eιλ1 Xi1 − φ(λ1 ))(e−ιλ2 Xi2 − φ(−λ2 )) |i1 −i2 |≤m X ×  E (e−ιλ1 Xj1 − φ(−λ1 ))(eιλ2 Xj2 − φ(λ2 )) dλ1 dλ2  |j1 −j2 |≤m Z ≤ R2 b 1 hn )||K(λ b 2 hn )| |K(λ h X  i2 |E eιλ1 Xi1 −ιλ2 Xi2 | + |φ(λ1 )φ(−λ2 )| dλ1 dλ2 |i1 −i2 |≤m Z h i b 1 hn )||K(λ b 2 hn )| |φ(λ1 − λ2 )|2 + |φε (λ1 a0 )φε (λ2 am )|2 + |φ(λ1 )φ(λ2 )|2 dλ1 dλ2 |K(λ 2 Z ZR 2 2 2 2 b 2 hn )|2 |φ(λ1 − λ2 )|2 dλ1 dλ2 b |K(λ |K(λ1 hn )| |φ(λ1 − λ2 )| dλ1 dλ2 + c4 n ≤ c4 n 2 2 R Z ZR 2 2 2 + c4 n |φε (λ1 a0 )φε (λ2 am )| dλ1 dλ2 + c4 n |φ(λ1 )φ(λ2 )|2 dλ1 dλ2 ≤ c3 n2 R2 ≤ c5 n2 hn R2 , (35) where in the last inequality we used the Plancherel theorem. Set Kn (x) = h1n K( hxn ). Then X Z   ιλXi b E − φ(λ) e−ιλXj − φ(−λ) dλ K(λh n) e 2 0<j−i≤4m R ≤ c6 n2 ≤ c7 n 2 4m X k=1 4m X Z   ιλX1 b K(λh − φ(λ) e−ιλX1+k − φ(−λ) dλ n) e E R E Kn2 (X1 2 Z 2 ιλX1 b K(λh φ(−λ) dλ n) e − X1+k ) + c7 n E R k=1 + c7 n2 2 4m X k=1 Z Z 2 −ιλX1+k b K(λh φ(λ) dλ + c7 n2 n) e E R 2 2 b K(λh n )|φ(λ)| dλ . R Hence E Z X   ιλXi b K(λh − φ(λ) e−ιλXj − φ(−λ) dλ n) e 2 0<j−i≤4m R ≤ c8 n 2 Z c2 (λ)||φε (λa0 )||φε (λam )| dλ + c8 n2 |K n R Z 2 2 + c8 n |φ(λ)|2 dλ Z 2 b |K(λh n )| dλ Z R |φ(λ)|2 dλ R R n2 ≤ c9 , hn (36) c2 (λ)| ≤ where in the last inequality we used the fact that |K n Combining (34), (35) and (36) gives E |Dn |2 ≤ 22 c10 . n 2 hn 1 hn R RK 2 (x) dx for all λ ∈ R. In the sequel, we can assume that a0 6= 0 and ai 6= 0 for infinite many i ∈ N. Let p1 = min{i ∈ N : ai 6= 0} and p2 = min{i ∈ N : ai 6= 0, i > p1 }. Note that kDn k2 ≤ I0 + I1 + · · · + Ip1 + Ip1 +1 , (37) where Z 1 Ip = 2πn(n − 1) X X 1≤i6=j≤n k≤i, `≤j |k−i|+|`−j|=p b K(λh n) R   Pk H(Xi )(λ)P` H(Xj )(−λ) dλ , 2 for 0 ≤ p ≤ p1 and Ip1 +1 Z 1 = 2πn(n − 1) X X 1≤i6=j≤n k≤i, `≤j |k−i|+|`−j|≥p1 +1 b K(λh n) R We first estimate I0 . Note that Z 1 b I0 = K(λh n) 2πn(n − 1) R X    Pk H(Xi )(λ)P` H(Xj )(−λ) dλ . 2  Pi H(Xi )(λ)Pj H(Xj )(−λ) dλ , 2 1≤i6=j≤n and I02 Z c11 ≤ 4 n b K(λh n) R + X  j−i=1 Z c11 n4  Pi H(Xi )(λ)Pj H(Xj )(−λ) dλ b K(λh n) R X  2 2  Pi H(Xi )(λ)Pj H(Xj )(−λ) dλ j−i=2 2 2 Z + ··· + + c11 n4 X   c11 b K(λh Pi H(Xi )(λ)Pj H(Xj )(−λ) dλ n) 4 n R j−i=p2 Z X  2  b K(λh Pi H(Xi )(λ)Pj H(Xj )(−λ) dλ n) R 2 2 2 j−i≥p2 +1 := I0,1 + I0,2 + · · · + I0,p2 + I0,p2 +1 . Recall properties of the projection operator Pk defined in (29). It is easy to see that, for 1 ≤ q ≤ p2 , I0,q ≤ = c12 n3 Z c12 n3 Z R2 R2 b 1 hn )||K(λ b 2 hn )| |K(λ ∞ Y E [eι(λ2 −λ1 )(ak+q −ak )εj−k−q ] dλ1 dλ2 k=1 b 1 hn )||K(λ b 2 hn )| |K(λ ∞ Y |φε ((λ2 − λ1 )(ak+q − ak ))| dλ1 dλ2 . k=1 Since lim ai = 0 and ai 6= 0 for infinite many i ∈ N, there exist infinite many indices k such that i→∞ ak+q 6= ak . Doing some simple calculations then gives I0,q ≤ c13 , n3 hn 23 for 1 ≤ q ≤ p2 . To estimate the last term in the upper bound of I02 , observe that Z c11 b 1 hn )K(−λ b I0,p2 +1 = 4 K(λ 2 hn ) n R2 X E [Pi1 H(Xi1 )(λ1 )Pi2 H(Xi2 )(−λ2 )Pj H(Xj )(−λ1 )Pj H(Xj )(λ2 )] dλ1 dλ2 j−i1 ≥p2 +1, j−i2 ≥p2 +1 c11 = 4 n Z Z c11 b b b 1 hn )K(λ b 2 hn )I2 (λ1 , λ2 ) dλ1 dλ2 K(λ1 hn )K(−λ2 hn )I1 (λ1 , λ2 ) dλ1 dλ2 + 4 K(λ n R2 R2 Z c11 b 1 hn )K(−λ b + 4 K(λ 2 hn )I3 (λ1 , λ2 ) dλ1 dλ2 , n R2 where X I1 (λ1 , λ2 ) = E [Pi1 H(Xi1 )(λ1 )Pi2 H(Xi2 )(−λ2 )Pj H(Xj )(−λ1 )Pj H(Xj )(λ2 )] , j−i1 ≥p2 +1, j−i2 ≥p2 +1, i2 >i1 X I2 (λ1 , λ2 ) = E [Pi1 H(Xi1 )(λ1 )Pi2 H(Xi2 )(−λ2 )Pj H(Xj )(−λ1 )Pj H(Xj )(λ2 )] , j−i1 ≥p2 +1, j−i2 ≥p2 +1, i1 <i2 X I3 (λ1 , λ2 ) = E [Pi1 H(Xi1 )(λ1 )Pi2 H(Xi2 )(−λ2 )Pj H(Xj )(−λ1 )Pj H(Xj )(λ2 )] . j−i1 ≥p2 +1, j−i2 ≥p2 +1, i2 =i1 Note that X |I1 (λ1 , λ2 )| ≤ |φε (ap1 (λ1 − λ2 ))| |φε (ap2 (λ1 − λ2 ))| j−i1 ≥p2 +1, j−i2 ≥p2 +1, i2 >i1 i h × E (e−ιλ2 a0 εi2 − φε (−λ2 a0 ))(e−ι(λ1 −λ2 )aj−i2 εi2 − φε (−(λ1 − λ2 )aj−i2 ) X |φε ((λ1 − λ2 )ap1 )| |φε ((λ1 − λ2 )ap2 )| ≤ j−i1 ≥p2 +1, j−i2 ≥p2 +1, i2 >i1 × e−ι(λ1 −λ2 )aj−i2 εi2 − φε (−(λ1 − λ2 )aj−i2 ) 2 X |φε ((λ1 − λ2 )ap1 )| |φε ((λ1 − λ2 )ap2 )| |λ1 − λ2 |γ |aj−i2 |γ ≤ c16 ≤ j−i1 ≥p2 +1, j−i2 ≥p2 +1, i2 >i1 c17 n2 |λ1 − λ2 |γ |φε ((λ1 − λ2 )ap1 )| |φε ((λ1 − λ2 )ap2 )| . Similarly, |I2 (λ1 , λ2 )| ≤ c18 n2 |λ1 − λ2 |γ |φε ((λ1 − λ2 )ap1 )||φε ((λ1 − λ2 )ap2 )|. Finally, |I3 (λ1 , λ2 )| ≤ ≤ X E [Pi H(Xi )(λ1 )Pi H(Xi )(−λ2 )Pj H(Xj )(−λ1 )Pj H(Xj )(λ2 )] j−i≥p2 +1 c19 n2 |φε ((λ1 − λ2 )ap1 )||φε ((λ1 − λ2 )ap2 )|. So I0,p2 +1 Z c20 b 1 hn )||K(λ b 2 hn )|(1 + |λ1 − λ2 |γ )|φε ((λ1 − λ2 )ap )||φε ((λ1 − λ2 )ap )| dλ1 dλ2 ≤ 2 |K(λ 1 2 n R2 c21 ≤ 2 . n hn 24 Therefore, I02 ≤ I0,1 + I0,2 + · · · + I0,p2 + I0,p2 +1 ≤ c22 . n2 hn (38) Using similar arguments, for 1 ≤ p ≤ p1 , we can obtain Ip2 ≤ c23 . n 2 hn (39) We now estimate Ip1 +1 . Note that 1 (2π)2 n2 (n − 1)2 Ip21 +1 = Z R2 b 1 hn )K(−λ b K(λ 2 hn ) Jn (λ1 , λ2 ) dλ1 dλ2 , where Jn (λ1 , λ2 ) = i h E Pk1 H(Xi1 )(λ1 )Pk2 H(Xj1 )(−λ1 )Pk3 H(Xi2 )(−λ2 )Pk4 H(Xj2 )(λ2 ) . X i1 6=j1 , i2 6=j2 k1 ≤i1 , k2 ≤j1 , k3 ≤i2 , k4 ≤j2 |k1 −i1 |+|k2 −j1 |≥p1 +1 |k3 −i2 |+|k4 −j2 |≥p1 +1 Recall properties of the projection operator Pk defined in (29). By Cauchy-Schartz inequality and the condition (3), we can obtain    |Jn (λ1 , λ2 )| ≤ c24 |λ1 |2γ |λ2 |2γ |φε (λ1 a0 )|2 + |φε (λ1 ap1 )|2 |φε (λ2 a0 )|2 + |φε (λ2 ap1 )|2 X |ai1 −k1 |γ |aj1 −k2 |γ |ai2 −k3 |γ |aj2 −k4 |γ . (40) × i1 6=j1 , i2 6=j2 k1 ≤i1 , k2 ≤j1 , k3 ≤i2 k4 ≤j2 |k1 −i1 |+|k2 −j1 |≥p1 +1, |k3 −i2 |+|k4 −j2 |≥p1 +1 at least two k indices are identical, identical k indices are greater than the others There are only four possibilities for the k indices in the above summation: 1) all the k indices are identical; 2) three k indices are identical and strictly larger than the last one; 3) two pairs of different identical k indices; 4) one pair of identical k indices and strictly larger than the remaining two different indices. For the first three possibilities, the summation in (40) is less than a constant ∞ P multiple of n2 since |ai |γ < ∞. For the last possibility, the summation in (40) is less than a i=0 constant multiple of n2 ηn,γ where ηn,γ = n P ∞ P |ai |γ . Therefore, `=0 i=` Ip21 +1 ≤ c25 ηn,γ n2   2 2γ 2 2 b |K(λh )| |λ| |φ (λa )| + |φ (λa )| dλ . n ε 0 ε p1 Z R Putting inequalities (37), (38), (39) and (41) together gives   ηn,γ 1 2 + 2 . kDn k2 ≤ c26 n2 hn n Step 4. Here we estimate   E |Nn − N n |2 , where Nn = 1 2π Z  b K(0) φn (λ) − φ(λ) φ(−λ) dλ. R 25 (41) Note that    E |Nn − N n |2 = E 1 2π Z   b b K(λh n ) − K(0) φn (λ) − φ(λ) φ(−λ) dλ R   Z 2  ιλX1  b b K(λhn ) − K(0) e φ(−λ) dλ E 1 (2π)2 n R i2 1 h = E Kn ∗ f (X1 ) − f (X1 ) , n ≤ where Kn (x) = h1n K( hxn ). Since f is bounded, 2  E |Nn − N n |  Z  2 c27 Kn ∗ f (x) − f (x) dx ≤ n R Z c27 2 2 b b = |K(λh n ) − K(0)| |φ(λ)| dλ (2π)2 n R Z c27 2 2 b b |K(λh ≤ n ) − K(0)| |φε (a0 λ)| dλ (2π)2 n R c28 h2γ n ≤ , n where in the first equality we used the Plancherel theorem. It is easy to see that  Z n  1X 2 Nn = f (Xi ) − f (x) dx . n R i=1 Combining all the above results gives n 1X E Tn (hn ) − E Tn (hn ) − Yi n 2 ≤ c29 i=1 ηn,γ h2γ 1 n + + 2 2 n hn n n ! . Step 5. We show the central limit theorem for n 1 X √ f (Xi ) − n i=1 Z  f 2 (x) dx . R It suffices to consider the case when the Xi are dependent. Note that Z   P0 f (Xi ) − f 2 (x) dx R = E [f (Xi )|F0 ] − E [f (Xi )|F−1 ] i−1 ∞ P P  Z i λaj εi−j +ι λaj εi−j h ι 1 ιλai ε0 ιλai ε00 j=i+1 j=0 = E φ(λ) e e −e dλ F0 , 2π R where {ε0i : i ∈ Z} is an independent copy of {εi : i ∈ Z}. 26 2  Then  P0 f (Xi ) − Z 2 f (x) dx R ι Z  2 ≤ φ(λ) e ZR ≤ ∞ P λaj εi−j +ι j=i+1 |φ(λ)||eιλai ε0 − e i−1 P j=0 ιλai ε00 λaj εi−j  | dλ R Z 0  eιλai ε0 − eιλai ε0 dλ 2 |φ(λ)||eιλai ε0 − φε (λai )| dλ RZ |λ|γ |φ(λ)| dλ ≤ 2|ai |γ RZ |λ|γ |φε (λ)|2 dλ. ≤ c30 |ai |γ ≤2 2 2 R Now by Lemma 1 in Wu (2006), we can easily obtain n 1 X √ f (Xi ) − n i=1 Z  d f 2 (x) dx −→ N (0, σ 2 ) R for some σ 2 ∈ (0, ∞). Using similar arguments as in Step 3, we can show that sup n where Sn = Hence, n P i=1 σ2 = f (Xi ) − R Rf 2 (x) dx  1 E |Sn |4 < ∞, n2 . lim n−1 Var (Sn ). This completes the proof. n→∞ Proof of Theorem 2.2. The proof of this theorem is similar to that of Theorem 2.1. We only need to modify the Step 3 in the proof of Theorem 2.1 and consider the dependent case. Using the same notations as in the proof of Theorem 2.1 and then Lemma 7.2, Z   √ √ 2 b n E |Dn | ≤ n |K(λh dλ n )|E |φn (λ) − φ(λ)| R Z i h 1 ιλX1 ιλX1 2 b +√ |K(λh )|E |e − E e | dλ n n R Z Z c1 c1 b ≤√ |K(λ)| dλ + √ |λ|2γ |φε (λa0 )|2 dλ. nhn R n R This completes the proof. At the end, we give two useful lemmas which are related to the sufficient and necessary conditions for the assumptions in Theorems 2.1 and 2.2. Lemma 7.3 Let φε (λ) = E [eιλε1 ] for all λ ∈ R. For any γ ∈ [0, 1], if E |ε1 |2γ < ∞, then there exists a positive constant cγ,2 such that E |eιλε1 − φε (λ)|2 ≤ cγ,2 |λ|2γ . Moreover, if E |ε1 |4γ < ∞, there exists a positive constant cγ,4 such that E |eιλε1 − φε (λ)|4 ≤ cγ,4 |λ|4γ . 27 Proof. This first inequality follows from E |eιλε1 − φε (λ)|2 = 1 − |φε (λ)|2 ≤ 1 − [E cos(λε1 )]2 ≤ c1 |λ|2γ . For the second inequality, E |eιλε1 − φε (λ)|4  2 = E 1 − eιλε1 φε (−λ) − e−ιλε1 φε (λ) + |φε (λ)|2 = 1 + φε (2λ)φ2ε (−λ) + φε (−2λ)φ2ε (λ) − 3|φε (λ)|4   = 1 + 2E cos(2λε1 ) E 2 cos(λε1 ) − E 2 sin(λε1 ) + 4E sin(2λε1 )E cos(λε1 )E sin(λε1 )  2 − 3 E 2 cos(λε1 ) + E 2 sin(λε1 )    λε1 2 = 1 + 2 1 − 2E sin2 (λε1 ) (1 − 2E sin2 ( )) − E 2 sin(λε1 ) 2   λε λε1 1 + 8E sin(λε1 )(1 − 2 sin2 ( )) E sin(λε1 )[1 − 2E sin2 ( )] 2 2  2 λε1 2 − 3 (1 − 2E sin2 ( )) + E 2 sin(λε1 ) 2 4γ ≤ c2 |λ| . This completes the proof. Lemma 7.4 Let φε (λ) = E [eιλε1 ] for all λ ∈ R. If ε1 has non-degenerate distribution, i.e., it is not equal to a constant almost surely, then in the inequalities E |eιλε1 − φε (λ)|2 ≤ cγ,2 (|λ|2γ ∧ 1) and E |eιλε1 − φε (λ)|4 ≤ cγ,4 (|λ|4γ ∧ 1), the range γ ∈ (0, 1] is optimal. Proof. By Cauchy-Schwarz inequality, we only need to show that the range γ ∈ (0, 1] is optimal for the first inequality. Suppose E |eιλε1 −φε (λ)|2 = 1−|φε (λ)|2 ≤ c(|λ|2γ ∧1) for some γ > 1. Since ε2 is an independent copy of ε1 , let φε1 −ε2 (λ) = E [eιλ(ε1 −ε2 ) ], then 1 − φε1 −ε2 (λ) = 1 − |φε (λ)|2 ≤ c(|λ|2γ ∧ 1) for some γ > 1. Note that E |eιλ(ε1 −ε2 ) − 1|2 = 1 − φε1 −ε2 (λ) + 1 − φε1 −ε2 (−λ) = 2(1 − φε1 −ε2 (λ)). Therefore, for λ close enough to 0,  1 2 |φε1 −ε2 (x + λ) − φε1 −ε2 (x)| ≤ E |eιλε1 −ε2 − 1| ≤ E |eιλε1 −ε2 − 1|2 ≤ c1 |λ|γ . Since γ > 1, φ0ε1 −ε2 (x) = 0 for all x ∈ R. That is, |φε (x)|2 = φε1 −ε2 (x) = 1 for all x ∈ R or ε1 equals a constant almost surely. So the γ must be less than or equal to 1. Acknowledgement We would like to thank the two referees and the Associate Editor for their valuable comments. We would also like to thank Professor Xia Chen for very helpful discussions. F. Xu is partially supported by National Natural Science Foundation of China (Grant No.11401215), Shanghai Pujiang Program (14PJ1403300), 111 Project (B14019) and Natural Science Foundation of Shanghai (16ZR1409700). 28 References [1] Ahmad IA. 1979. Strong consistency of density estimation by orthogonal series methods for dependent variables with applications. Ann. Inst. Statist. Math. 31: 279–288. [2] Bailey WN. 1935. General Hypergeometric Series. Cambridge Tracts in Mathematics and Mathematical Physics. [3] Bickel JP and Ritov Y. 1988. Estimating integrated squared density derivatives: Sharp best order of convergence estimates. Sankhyā Ser. A 50: 381–393. [4] Bondon P and Palma W. 2007. A class of antipersistent processes. J. Time Series Anal. 28: 261-273. [5] Devroye L and Györfi L. 1985. Nonparametric Density Estimation: The L1 View. New York: Wiley. [6] Faÿ G, Moulines E, Roueff F and Taqqu MS. 2009. Estimators of long-memory: Fourier versus wavelets. J. Econometrics 151: 159-177. [7] Gauss F. 1866. Disquisitiones generales circa sericm infinitam, Ges. Werke 3: 123-163 and 207-229. [8] Giné E and Nickl R. 2008. A simple adaptive estimator of the integrated square of a density. Bernoulli 14: 47–61. [9] Gretton A, Borgwardt KM, Rasch MJ, Schölkopf B and Smola A. 2012. A kernel two-sample test. J. Mach. Learn. Res. 13: 723–773. [10] Hall P and Marron JS. 1987. Estimation of integrated squared density derivatives. Statist. Probab. Lett. 6: 109–115. [11] Hipel KW and McLeod AI. 1994. Time Series Modelling of Water Resources and Environmental Systems. Elsevier. [12] Honda T. 2000. Nonparametric density estimation for a long-range dependent linear process. Ann. Inst. Statist. Math. 52: 599–611. [13] Hsing T. 1999. On the asymptotic distributions of partial sums of functionals of infinitevariance moving averages. Ann. Probab. 27: 1579–1599. [14] Källberg D, Leonenko N and Seleznjev O. 2012. Statistical inference for Rényi entropy functionals. Lecture Notes in Comput. Sci. 7260: 36–51. [15] Källberg D, Leonenko N and Seleznjev O. 2014. Statistical estimation of quadratic Rényi entropy for a stationary m-dependent sequence. Journal of Nonparametric Statistics 26: 385– 411. [16] Krishnamurthy A, Kandasamy K, Poczós B and Wasserman L. 2015. On estimating L22 divergence. Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS), San Diego, CA, USA. JMLR: W&CP 38. [17] Laurent B. 1996. Efficient estimation of integral functionals of a density. Ann. Statist. 24: 659–681. [18] Laurent B. 1997. Estimation of integral functionals of a density and its derivatives. Bernoulli 3: 181–211. 29 [19] Leonenko N, Pronzato L and Savani V. 2008. A class of Rényi information estimators for multidimensional densities. Ann. Statist. 36: 2153–2182. Corrections, Ann. Statist. 38 (2010), 3837–3838. [20] Leonenko N and Seleznjev O. 2010. Statistical inference for the ε-entropy and the quadratic Rényi entropy. J. Multivariate Anal. 101: 1981–1994. [21] Mittnik S, Rachev ST and Paolella MS. 1998. Stable paretian modeling in finance: Some empirical and theoretical aspects. In : Adler, R. J., Feldman, R.E., Taqqu, M.S., eds. A Practical Guide to Heavy Tails. Birkhäuser: 79–110. [22] Nadaraya EA. 1989. Nonparametric Estimation of Probability Densities and Regression Curves. Kluwer Academic Pub. [23] Parzen E. 1962. On estimation of a probability density and mode. Ann. Math. Stat. 31: 1065– 1079. [24] Penrose M and Yukich JE. 2013. Limit theory for point processes in manifolds. Ann. Appl. Probab. 23: 2161–2211. [25] Rényi A. 1970. Probability Theory Amsterdam: North-Holland. [26] Rosenblatt M. 1956. Remarks on some nonparametric estimates of a density function, Ann. Math. Statist. 27: 832–837. [27] Sang H and Sang Y. 2017. Memory properties of transformations of linear processes. Stat. Inference Stoch. Process. 20: 79-103. [28] Schimek MG. 2000. Smoothing and Regression : Approaches, Computation, and Application. John Wiley & Sons. [29] Scott DW. 2015. Multivariate Density Estimation: Theory, Practice, and Visualization 2. John Wiley & Sons. [30] Shannon CE. 1948. A mathematical theory of communication. Bell Syst. Tech. Jour. 27: 379–423, 623–656. [31] Silverman BW. 1986. Density Estimation for Statistics and Data Analysis. London: Chapman and Hall. [32] Tran LT. 1992. Kernel density estimation for linear processes. Stochastic Process. Appl. 41: 281–296. [33] Wand MP and Jones MC. 1995. Kernel Smoothing. London: Chapman and Hall. [34] Wu WB. 2006. Unit root testing for functionals of linear processes. Econometric Theory 22: 1–14. [35] Wu WB, Huang Y and Huang Y. 2010. Kernel estimation for time series: An asymptotic theory. Stochastic Process. Appl. 120: 2412–2431. [36] Wu WB and Mielniczuk J. 2002. Kernel density estimation for linear processes. Ann. Statist. 30: 1441–1459. [37] Zhou Z. 2014. Inference of weighted V-statistics for non stationary time series and its applications. Ann. Statist. 42: 87–114. 30
10math.ST
A fast marching algorithm for the factored eikonal equation Eran Treistera,∗, Eldad Habera,b a Department of Earth and Ocean Sciences, The University of British Columbia, Vancouver, BC, Canada. of Mathematics, The University of British Columbia, Vancouver, BC, Canada. b Department arXiv:1607.00973v3 [cs.CE] 27 Aug 2016 Abstract The eikonal equation is instrumental in many applications in several fields ranging from computer vision to geoscience. This equation can be efficiently solved using the iterative Fast Sweeping (FS) methods and the direct Fast Marching (FM) methods. However, when used for a point source, the original eikonal equation is known to yield inaccurate numerical solutions, because of a singularity at the source. In this case, the factored eikonal equation is often preferred, and is known to yield a more accurate numerical solution. One application that requires the solution of the eikonal equation for point sources is travel time tomography. This inverse problem may be formulated using the eikonal equation as a forward problem. While this problem has been solved using FS in the past, the more recent choice for applying it involves FM methods because of the efficiency in which sensitivities can be obtained using them. However, while several FS methods are available for solving the factored equation, the FM method is available only for the original eikonal equation. In this paper we develop a Fast Marching algorithm for the factored eikonal equation, using both first and second order finite-difference schemes. Our algorithm follows the same lines as the original FM algorithm and requires the same computational effort. In addition, we show how to obtain sensitivities using this FM method and apply travel time tomography, formulated as an inverse factored eikonal equation. Numerical results in two and three dimensions show that our algorithm solves the factored eikonal equation efficiently, and demonstrate the achieved accuracy for computing the travel time. We also demonstrate a recovery of a 2D and 3D heterogeneous medium by travel time tomography using the eikonal equation for forward modeling and inversion by Gauss-Newton. Keywords: eikonal equation, Factored eikonal equation, Fast Marching, First arrival, Travel Time Tomography, Gauss Newton, Seismic imaging. 1. Introduction The eikonal equation appears in many fields, ranging from computer vision [30, 31, 33, 11], where it is used to track evolution of interfaces, to geoscience [19, 12, 22, 14, 24] where it describes the propagation of the first arrival of a wave in a medium. The equation has the form |∇τ |2 = κ(~x)2 , (1.1) where | · | is the Euclidean norm. In the case of wave propagation, τ is the travel time of the wave and κ(~x) is the slowness (inverse velocity) of the medium. The value of τ is usually given at some sub-region. For example, in this work we assume the wave propagates from a point source at location ~x0 , for which the travel time is 0, and hence τ (~x0 ) = 0. Equation (1.1) is nonlinear, and as such may have multiple branches in its solution. One of these branches, which is the one of interest in the applications mentioned earlier, corresponds to the ”first-arrival” viscosity solution, and can be calculated efficiently [5, 25]. One of the ways to compute it is by using the Fast Marching ∗ Corresponding author Email addresses: [email protected] (Eran Treister), [email protected] (Eldad Haber) Preprint submitted to Elsevier August 30, 2016 Figure 1: The l2 norm of the approximation error |∇τ0 − Dτ0 | around a source point at [0.5,0.5], where τ0 is the distance function and D is a central difference gradient operator on a mesh with hx = hy = 0.01. (FM) methods [36, 30, 31], which solve it directly using first or second order schemes in O(n log n) operations. These methods are based on the monotonicity of the solution along the characteristics. Alternatively, (1.1) can be solved iteratively by Fast Sweeping (FS) methods, which may be seen as Gauss-Seidel method for (1.1). First order accurate solutions of (1.1) can be obtained very efficiently in 2d Gauss-Seidel sweeps in O(n) operations, where d is the dimension of the problem [35, 38]. An alternative for the mentioned approaches is to use FS to solve a Lax-Friedrichs approximation for (1.1), which involves adding artificial viscosity to the original equation [10]. This approach was suggested for general Hamilton-Jacobi equations, and is simple to implement. In [23], such Lax-Friedrichs approximation is obtained using FS up to third order accuracy using the weighted essentially non-oscillatory (WENO) approximations to the derivatives. For a performance comparison between some of the mentioned solvers see [7]. In some cases, the eikonal equation (1.1) is used to get a geometrical-optics ansatz of the solution of the Helmholtz equation in the high frequency regime [12, 15, 19, 17]. This is done using the Rytov decomposition of the Helmholtz solution: u(~x) = a(~x) exp(iωτ (~x)), where a(~x) is the amplitude and τ (~x) is the travel time. This approach involves solving (1.1) for the travel-time and solving the transport equation 1 1 ∇τ · ∇a + a∆τ = (∇τ · ∇a + ∇ · (a∇τ )) = 0 2 2 (1.2) for the amplitude [15, 19]. The resulting approximation includes only the first arrival information of the wave propagation. Somewhat similarly, the work of [9] suggests using the eikonal solution to get a multigrid preconditioner for solving linear systems arising from discretization of the Helmholtz equation. In many cases in seismic imaging, the eikonal equation is used for modeling the migration of seismic waves from a point source at some point ~x0 . In this case, when solving (1.1) numerically by standard finite differences methods, the obtained solution has a strong singularity at the location of the source, which leads to large numerical errors [22, 6]. Figure 1 illustrates this phenomenon by showing the approximation error for the gradient of the distance function, which is the solution of (1.1) for κ = 1. It is clear that the largest approximation error for the gradient is located around the source point, and that its magnitude is rather large. In addition, it is observed that although τ may have more singularities in other places, the singularity at the source is more damaging and polluting for the numerical solution [22, 6]. A rather easy treatment to the described phenomenon is suggested in [21, 6], and achieved using a factored version of (1.1). That is, we define τ = τ0 τ1 , (1.3) where τ0 is the distance function, τ0 = k~x − ~x0 k2 , from the point source—the analytical solution for (1.1) in the case where κ(~x) = 1 is a constant. Indeed, at the location of the source, the function τ0 is non-smooth. However, the computed factor τ1 is expected to be very smooth at the surrounding of the source, and can be approximated up to high order of accuracy [18]. Plugging (1.3) into (1.1) and applying the chain rule yields the factored eikonal equation τ02 |∇τ1 |2 + 2τ0 τ1 ∇τ0 · ∇τ1 + τ12 = κ(~x)2 . (1.4) 2 Similarly to it original version, Equation (1.4) can be solved by fast sweeping methods in first order accuracy [6, 16, 18], or by a Lax-Friedrichs scheme up to third order of accuracy [19, 15, 18]. The recent works [18, 20] suggest hybrid schemes where the factored eikonal is solved at the neighborhood of the source and the standard eikonal, which is computationally easier, is solved in the rest of the domain. One geophysical tool that fits the scenario described earlier is travel time tomography. One way to formulate it is by using the eikonal equation as a forward problem inside an inverse problem [29]. To solve the inverse problem, one should be able to solve (1.1) accurately for a point source, and to compute its sensitivities efficiently. The works of [13, 34] computes the tomography by FS, and require an FS iterative solution for computing the sensitivities. The more recent [14] uses the FM algorithm for forward modeling using the non-factored eikonal equation, because this way the sensitivities are obtained more efficiently by a simple solution of a lower triangular linear system. [3] suggests to use FS for forward modeling using the factored equation, but also efficiently obtain the sensitivities by approximating them using FM with the non-factored eikonal equation. In this paper, we develop a Fast Marching algorithm for the factored eikonal equation (1.4), based on [30, 31]. As in [31], our algorithm is able to solve (1.4) using first order or second order schemes, in guaranteed O(n log n) running time. When using our method for forward modeling in travel time tomography, one achieves both worlds: (1) have an accurate forward modeling based on the factored eikonal equation, and (2) obtain the sensitivities of the (factored) forward modeling efficiently, by solving lower triangular linear systems in O(n) operations. Computationally, this is one of the most attractive ways to solve the inverse problem, since the cost of the inverse problem can be governed by the cost of applying the sensitivities. Our paper is organized as follows. In the next section we briefly review the FM method in [30, 31], including some of its implementation details. Next, we show our extension to the FM method for the factored eikonal equation—in both first and second order of accuracy—and provide some theoretical properties. Following that, we discuss the derivation of sensitivities using FM and briefly present the travel time tomography problem. Last, we show some numerical results that demonstrate the effectiveness of the method in two and three dimensions, for both the forward and inverse problems. 2. The Fast Marching algorithm We now review the FM algorithm of [30, 31] in two dimensions. The extension to higher dimensions is straightforward. The FM algorithm is based on the Godunov upwind discretization [25] of (1.1). In two dimensions, this discretization is given by   −y +y −x +x |∇τ |2 ≈ max{Dij τ, −Dij τ, 0}2 + max{Dij τ, −Dij τ, 0}2 = κ(~xij )2 , ~xij ∈ Ωh , (2.5) τ −τ τ −τ +x −x τ = i+1,jh i,j are the backward and forward first where in the simplest form Dij τ = i,j hi−1,j and Dij derivative operators, respectively. In principal, one can replace these operators with ones of higher order of accuracy. The FM algorithm solves (2.5) in a sophisticated way, exploiting the fact that the upwind difference structure of (2.5) imposes a unique direction in which the information propagates—from smaller values of τ to larger values. Hence, the FM algorithm rests on solving (2.5) by building the solution outwards from the smallest τ value. It assumes that some initial value of τ is given at some region of Ωh (or a point ~x0 ) and it propagates outwards from this initial region, by updating the next smallest value of τ at each step. To apply the rule above, let us define three disjoint sets of variables: the known variables, the front variables (which are sometimes called the trial variables) and the unknown variables. These three sets together contain all the grid points in the problem. For simplicity, let us assume that we solve (2.5) for a point source. That is, a source is located at point ~x0 , for which τ (~x0 ) = 0. Initially, known is chosen as an empty set, front is set to contain only ~x0 , and unknown has the rest of the variables for which τ is set to infinity. At each step we choose the point ~xij in front with minimal value of τ (~xij ) and move it to known . Next, we move all of its neighbors which are in unknown to front , and solve (2.5) for all neighbors which are not in known . This 3 Algorithm: Fast Marching Initialize: τij = ∞ for all ~xij ∈ Ωh , τ (~x0 ) = 0, known ← ∅, front ← {~x0 }. while front 6= ∅ do 1. Find the minimal entry in front : ~ximin ,jmin = arg min~xij {τij : ~xij ∈front } 2. Add ~ximin ,jmin to known and take it out of front : front ←front \{~ximin ,jmin } ; known ←known ∪{~ximin ,jmin }. 3. Add the unknown neighborhood of ~ximin ,jmin to front : Nmin = {~ximin −1,jmin , ~ximin +1,jmin , ~ximin ,jmin −1 , ~ximin ,jmin +1 }\known front ←front ∪ Nmin . 4. Foreach ~xij ∈ Nmin Update τij by solving the quadratic (2.5), using only entries in known . End end Figure 2: A minimum heap and its implementation using array. way, we set all variables to be in known in n steps, and the algorithm finishes. A precise description of the algorithm is given in Algorithm 1. In [30] it was proved that Algorithm 1 produces a viable viscosity solution to (2.5) when using first order approximations for the first derivatives. Furthermore, it is proved that the values of τ in the order of which the points are set to known in Step 2 are monotonically increasing. 2.1. Efficient implementation using minimum heap Algorithm (1) has two main computational bottlenecks in Steps 1 and 4, which are repeated n times. For d−1 a d-dimensional problem, the set front contains a d-1 dimensional manifold of points, of size O(n d ). To find the minimum of front efficiently, a minimum heap data structure is used [30, 31]. A minimum heap is a binary tree with a property that a value at any node is less than or equal to the values at its two children. Consequently, the root of the tree holds the minimal value. The simplest implementation of such a tree is done by a sequential array of nodes, using the rule that if a node is located at entry k, then its two children are located at entries 2k and 2k + 1 (the first element of the array is indexed by 1, and is the root of the tree). Equivalently, the parent of a node at entry k is located at entry bk/2c. Figure 2 shows an example of a minimum heap and its implementation using array. Generally, each element in the array can hold many properties, and one of these has to be defined as a comparable “key”, which is used in the heap for sorting. In our case, each node holds a point ~x in the mesh, and its value τ (~x) as a key. 4 In its simplest form, the minimum heap structure supports two basic operations: insert(element,key) and getMin(). For example, this is the case in the C++ standard library implementation of the minimum heap structure. To apply getMin(), we remove the first element in the array, and take the last element in the array and push it in the first place. Then, to maintain the property of the heap, we repeatedly replace this value with its smaller child (the smaller of the two) until it reaches down in the tree to the point where it is smaller than its two children or it has no children. The insert(element,key) operation first places a new element at the next empty space of the array. Then, it propagates this element upwards, each time replacing it with its parent until it reaches a point where the element is either the root or its key is larger than its parent’s key. Both of the described operations are performed in O(log m) complexity where m is the number of elements in the heap. In Algorithm 1, the set front is implemented using a min-heap. Steps 1-2 are trivially implemented using getMin(), and insert(element,key) is used in Step 3. However, Step 4 of Algorithm 1 requires updating values which are inside the heap but are not at the root. This operation is not supported in the standard definition of either priority queue or minimum heap. Indeed, the papers [30, 31] use a variant of a priority queue, which includes back-links from points ~xij to their corresponding locations inside the heap, and a more “software-engineering friendly” implementation of this idea is suggested in [2], where those back-links are incorporated within the heap implementation, without any relation to the mesh. However, although this way an update of a key inside the heap can still be implemented in O(log m), it requires a specialized implementation of the heap, and encumbers the operations described earlier to maintain these back-links. In our implementation, we bypass this need for back-links, and implement Step 4 by reinserting elements to the heap if they are indeed smaller than their value in the heap. In Step 1, we simply ignore entries which are in known already. If the algorithm is indeed monotone, like the first order version in [30], this implementation detail will not change the result of the algorithm. The downside of this change is that it enables front to grow more than in the back-linked version. However, even if it grows four times compared to the back-linked version, then the heap tree is just two nodes higher, making the difference in running time insignificant. 2.2. Second order Fast Marching Solving the eikonal equation based on a first order discretization in (2.5) provides guaranteed monotonicity and stability. However, it also provides a less accurate solution because of the added viscosity that is associated with the first order approximation. To get a more accurate FM method, [31] suggests to use a second order upwind approximation in (2.5), e.g. −3τi + 4τi+1 − τi+2 3τi − 4τi−1 + τi−2 , Di+ τ = . (2.6) 2h 2h However, in some cases, the scheme may revert to first order approximations from certain directions. The obvious case for that is when there are not enough known points for the high order stencil. This case occurs for example when the given initial region contains only one point. Another condition for using second order operators is given in [31]: τi−1 ≥ τi−2 or τi+1 > τi+2 , (2.7) Di− τ = where the left condition is used for backward operators and the right one for forward operators. If (2.7) is not satisfied, the algorithm reverts to first order operators. Later we show that this condition guarantees the monotonicity of the non-factored FM solution using second order scheme. 3. Fast Marching for the factored eikonal equation Let us rewrite the factored eikonal equation (1.4) in a squared form, which is closer (1.1): |τ0 ∇τ1 + τ1 ∇τ0 |2 = κ(~x)2 . (3.8) This writing is the key for deriving the FM algorithm for (1.4). Similarly to the Godunov upwind scheme in (2.5), we discretize (3.8) for τ1 using a derivative operator D̂ instead of D h i −y +y −x +x max{D̂ij τ1 , −D̂ij τ1 , 0}2 + max{D̂ij τ1 , −D̂ij τ1 , 0}2 = κ(~xij )2 , ~xij ∈ Ωh . (3.9) 5 For example, the backward first order factored derivative operator is given by −x D̂ij τ1 = (τ0 )ij (τ1 )i,j − (τ1 )i−1,j + (p0 )ij (τ1 )ij , h (3.10) 0 where τ0 and p0 = ∂τ ∂x are known. From this point we apply the Algorithm 1 as it is. We hold the values of τ0 τ1 in front , and in Step 4 we update (τ1 )ij with the solution of (3.9). Initialization: For the non factored equation, Algorithm 1 is initialized by τ (~x0 ) = 0 at the point source. In the factored equation, this is trivially fulfilled by definition, because at the source τ0 (~x0 ) = 0. Still, τ1 (~x0 ) should not be chosen arbitrarily since its value is used in the finite difference approximations when evaluating its neighbors. Examining (3.8) at the source yields τ1 (~x0 )2 |∇τ0 |2 = τ1 (~x0 )2 = κ(~x0 )2 , since we choose τ0 such that |∇τ0 |2 = 1, independently of κ. In some cases in the literature, i.e., [6], the value κ(~x0 ) is absorbed in τ0 , such that |∇τ0 |2 = κ(~x0 )2 . Then τ1 (~x0 ) should be chosen as 1. This is obviously equivalent for computing τ , however, it is much more convenient to choose τ0 independently of κ if one wants to obtain the sensitivities of the FM algorithm (for more details, see Section 4). Second order discretization: Similarly to the non-factored equation, the second order upwind approximations (2.6) can be used in (3.9)-(3.10) for τ1 . Again, we revert to the first order approximation in cases where the additional point needed for the second order approximation is not in known . We note that unlike the non-factored case, the solution τ1 is in most cases very smooth at the source (expected to be close to constant or linear). So, when we initialize the algorithm with the value of τ1 at the point source and revert to a first order approximation for the neighbors, we do not introduce large discretization errors. In the non-factored case, the second derivative of τ is singular at the source, so using first order approximation there significantly pollutes the rest of the solution. 3.1. Solution of the piecewise quadratic equation We now describe how to solve both the non-factored and factored piecewise quadratic equations (2.5) and (3.9) respectively. This is required in Step 4 of Algorithm 1. Solving such an equation consists of the following four steps: 1. Determine the order of approximation for each derivative in (2.5)/(3.9) (Only required for high order schemes). 2. Determine which directions to choose (backward or forward) for each dimension (x, y or z). 3. Solve the quadratic equation in (2.5)/(3.9), assuming all terms are positive. 4. Make sure that the solution is valid, such that all max terms in (2.5)/(3.9) are indeed held with positive values. If not, some terms should be dropped, and the quadratic problem with the remaining terms is solved again. Let us first consider solving the non-factored first order (2.5), for which the Step 1 is not relevant. In this + − case, Step 2 is simple: for each max{Dij τ, −Dij τ, 0} term, the smaller of the two values of τ from both sides (forward or backward) is guaranteed to give a higher finite difference derivative. Furthermore, in Step 4, if some of the terms turn out negative after Step 3, then we can drop terms from (2.5) in decreasing order of the τ values, until a valid solution is reached. The same is true for a first order factored version in (3.9). However, using second order schemes (selectively) imposes additional complications on the solution of the piecewise quadratic equations (2.5) and (3.9). There are many options for order of accuracy vs directions in Steps 1-2, and in addition it is not clear in which order to drop terms in Step 4 if negative terms are detected. Obviously, one can check all possibilities, but such an option may be costly in high dimensions. To simplify this we follow [31], and in Step 1 we use the second order approximation if the extra point is available in known and fulfils the condition (2.7), and revert to first order approximation if not. Then, in Step (2) we determine the choice of directions considering the non-factored first order approximation (2.5). That is, if (τ0 τ1 )i−1 < (τ0 τ1 )i+1 , then we choose the backward upwind direction; otherwise we choose the forward direction. That is done correspondingly for each dimension. Once Steps 1-2 are done, (3.9) reduces to a piecewise quadratic equation of the form X 2 max{αk (τij − βk ), 0} = κ(~xij )2 , (3.11) k 6 where αk ≥ 0, βk ≥ 0 are non-negative constants that are coming from the finite difference approximations. For example, assuming that k = 1 corresponds to the x coordinate, then (3.10) would correspond to α1 = (τ ) (τ ) (τ0 )i,j + (p0 )i,j and β1 = 0 i,jhα11 i−1,j . In Step 3 we simply ignore the max{·, 0} function and solve the h equation assuming all terms are positive. We solve a simple quadratic function and choose the larger one of its two solutions for τij . If all chosen derivative terms are positive, the solution is valid; otherwise, we reduce the terms in (3.11) in decreasing order of βk , each time solving (3.11) with the remaining terms until a valid solution is reached. In three dimensions for example, this involves at most three quadratic solves. Algorithm 2 summarizes the solution of the piecewise quadratic equation. Algorithm: Solution of the piecewise quadratic equation for each dimension x,y,... do % Choosing direction, forward or backward. if both forward and backward neighboring points are in known then Choose the direction with smaller neighboring τ . else Otherwise, choose the direction in known . end % Choosing order of approximation, 1st or 2nd. if next neighboring point is in known then Use second order approximation. else Use first order approximation. end end % Now all coefficients of αk and βk of Equation (3.11) are known. Calculate (τ1 )i,j by solving Equation (3.11). while the solution (τ1 )i,j is not valid do Remove the term with largest βk from the remaining terms in (3.11). Calculate (τ1 )i,j by solving (3.11) with the remaining terms. end 3.2. The monotonicity of the obtained solution It is known that the solution of (1.1) is monotone in the direction of the characteristics. We now show how to enforce the monotonicity of our solution using the FM method for the factored eikonal equation. To set the stage, we first consider the FM method for the original non-factored equation. In [30] the non-factored first order discretization (2.5) is considered. In this case, each newly calculated value τij is guaranteed to be larger than its known neighbors at the time of the calculation. To show this clearly, consider for example that the backward derivative is chosen in the x direction. Then, τi−1,j = τi,j − h τi,j − τi−1,j −x = τi,j − hDi,j τ, h (3.12) −x so since Di,j τ ≥ 0 in the solution of (2.5), we have that τi,j ≥ τi−1,j . This means that τi,j is greater or equal to its known neighbors. This property insures the monotonicity of the solution. The proof for this appears in [30], but here we can simplify it because unlike [30], we only calculate entries using known values. We state the following lemma: Lemma 1. Let τ be the result of Algorithm 1, for solving the (non-factored) first order equation (2.5). Then the values of τ are monotonically non-decreasing in the order in which they are set to known . 7 Proof 1. Denote by ~xk an element that is set to known at Step 2 of the k-th iteration of Algorithm 1. Assume by contradiction that there exists two elements ~xp and ~xk , such that τ (~xp ) > τ (~xk ) and p < k. Without loss of generality, assume that k is the earliest iteration that this condition is fulfilled. Let k̄ < k be the iteration in which the value of τ (~xk ) is updated in the last time and it is entered to front . We know that ~xk̄ is a neighbor of ~xk . By the algorithm, we know that at the k̄-th iteration ~xp is already set to known , otherwise ~xk would have been chosen to known at the p-th iteration instead of ~xp . By the assumption, we know that τ (~xp ) ≤ τ (~xk̄ ), because otherwise ~xk would not have been the earliest element to violate the monotonicity. By the property in (3.12), we know that τ (~xk̄ ) ≤ τ (~xk ), and hence we reach τ (~xp ) ≤ τ (~xk ), which contradicts our assumption. Furthermore, the lemma above can be extended for a Fast Marching solution of any equation (2.5) such that the discretization operator D satisfies a monotonicity condition: −x +x Dij τ ≥ 0 ⇒ τij ≥ τi−1,j and − Dij τ ≥ 0 ⇒ τij ≥ τi+1,j . (3.13) The next corollary can be proved using the same arguments as in Lemma 1: Corollary 1. Let τ be the result of Algorithm 1, for solving the Godunov upwind equation (2.5) using operators D which satisfy (3.13). Then the values of τ are monotonically non-decreasing in the order in which they are set to known . The condition (3.13) and the corollary above is violated when the second order operators (2.6) are used in (2.5). However, if we look at a single violation, then it is of order h2 . To show this, we examine the backward difference derivative using Taylor expansion:   ∂τ −x + O(h2 ) = τi,j − hDi,j τ + O(h2 ), (3.14) τi−1,j = τi,j − h ∂x i,j −x where Di,j is given in (2.6) (the same arguments can be derived for the forward difference derivative). −x Assuming again that Di,j τ > 0, this means that each newly calculated τi,j is generally greater than its −x known neighbors, but may violate that up to magnitude O(h2 ). Note that if Di,j τ is sufficiently bounded 2 ∂ τ away from zero and the second derivative ∂x 2 is bounded in [xi−1 , xi ], then τi,j > τi−1,j will be satisfied. To correct this and obtain a monotone solution using (2.6), one may impose the condition (2.7) for using the second order scheme. If it is not satisfied, the scheme reverts to the first order scheme, which satisfies (3.13). If (2.7) is satisfied, then (2.6) does satisfy (3.13), because −x 2hDij τ = 3τij − 4τi−1,j + τi−2,j < 3τij − 3τi−1,j . (3.15) Note that the condition (2.7) is suggested in [31] but the monotonicity guarantee of the second order scheme is not examined. We now examine the monotonicity of the obtained factored solution τ0 τ1 when using first order operators in (3.9). Suppose that we are calculating (τ1 )ij using the backward operator (3.10) in the x direction in (3.9). We again start with a Taylor expansion      ∂τ1 2 2 0 (τ0 τ1 )i−1,j = (τ0 )ij − h ∂τ + O(h ) (τ ) − h + O(h ) 1 ij ∂x i,j   ∂x i,j 2 ∂τ0 1 (3.16) = (τ0 τ1 )ij − h(τ0 )ij ∂τ − h(τ ) + O(h ) 1 ij ∂x ∂x i,j = −x (τ0 τ1 )ij − hD̂ij τ1 + O(h2 ), i,j  (τ1 )i,j −(τ1 )i−1,j 1 where the last equality is obtained by placing ∂τ +O(h). This expansion shows that if ∂x i,j = h the monotonicity is not obtained, i.e., (τ0 τ1 )i,j − (τ0 τ1 )i−1,j < 0, then the non-factored derivative is negative, −x −x Dij (τ0 τ1 ) < 0, while the factored derivative is non-negative D̂ij τ1 ≥ 0 (otherwise it is not chosen in (3.9)). This means that the monotonicity may be violated only up to an error of O(h2 ). This holds for both first 8 and second order upwind approximations. In fact, (3.2) shows that this is a result of using the chain rule rather than the order of discretization of the operators D̂, since the monotonicity condition involves the value (τ0 )i−1,j , while it does not appear in the discretization scheme. In any case, the magnitude of the error in the monotonicity violation is either of the same or of higher order as the error in τ1 , using first or second 2 −x order schemes. Again, if Di,j τ1 is sufficiently bounded away from zero and ∂∂xτ21 is bounded in [xi−1 , xi ], then the monotonicity (τ0 τ1 )i,j > (τ0 τ1 )i−1,j will be satisfied. Nevertheless, in our algorithm we may enforce the monotonicity of the obtained solution by reverting to the non-factored operators in cases where the monotonicity is not satisfied, or, the factored and non-factored −x −x schemes do not agree in sign, for example: D̂ij τ1 ≥ 0, but Dij (τ0 τ1 ) < 0. Note that in this case the numerical derivative is approximately zero, hence the direction of the characteristic is almost parallel to the y direction. We apply this change using the same order of derivative which the algorithm chooses to use. That is, if the algorithm chooses a first or second order factored stencil, we revert to a standard first or second order stencil, respectively. Following Corollary 1, this guarantees the monotonicity of the solution, because we enforce the condition (3.13) at all stages of the algorithm. We note that experimentally, this small correction does not influence the accuracy of the solution obtained with our algorithm in both first and second order schemes in two and three dimensions. 4. Calculation of sensitivities and travel time tomography Travel time tomography is a useful tool in some Geophysical applications. One way to obtain it is by using the eikonal equation as a forward problem inside an inverse problem [29]. To solve the inverse problem, one should be able to solve (1.1) accurately, and to compute its sensitivities. The works of [13, 34] computes the tomography by FS, and require an FS iterative solution for computing the sensitivities. When using the FM algorithm for forward modeling, those are obtained more efficiently by a simple solution of a lower triangular linear system [14, 3]. More explicitly, let us denote by boldface all the discretized values of the mentioned functions on a grid, and suppose that we set m to be the vector of the values of κ(~x)2 on this grid. By solving (3.9), we get a function τ 1 (m) for the values of τ1 on the grid. We wish to get a linearization for τ 1 (m), such that we can predict its change following a small change in m. That is, we wish to be able to apply an approximation τ 1 (m + δm) ≈ τ 1 (m) + Jδm, (4.17) where J is the sensitivity matrix (or Jacobian) defined by Jij = (∇m τ 1 )ij = ∂(τ 1 )i . ∂mj (4.18) To obtain the sensitivity we first rewrite (3.9) in implicit form f (m, τ 1 ) = (D̂x τ 1 )2 + (D̂y τ 1 )2 − m = 0, (4.19) where D̂x = diag (τ 0 )Dx + diag (p0 ) and D̂y = diag (τ 0 ) · Dy + diag (q0 ) are the matrices that apply the finite difference derivatives that are chosen by the FM algorithm when applied for m. p0 and q0 are the analytical derivatives of τ0 with respect to x and y on the grid respectively, and diag (x) denotes a diagonal matrix whose diagonal elements are those of the vector x. We note that in the points where no derivative is chosen in the solution of (3.9), a zero row is set in the corresponding operator D̂. Also, at the row of the point source, we set each of D̂x and D̂y to have only one diagonal non-zero element, which equals to the values of p0 and q0 at the source. This way, (4.19) is exactly fulfilled for D̂x and D̂y and τ 1 . To obtain the sensitivity, we apply the gradient operator to both sides of (4.19), yielding (∇τ 1 f )(∇m τ 1 )+ ∇m f = 0, and define [8]: J(m) = ∇m τ 1 = −(∇τ 1 f )−1 (∇m f ). (4.20) J = (diag (2D̂x τ 1 )D̂x + diag (2D̂y τ 1 )D̂y )−1 , (4.21) This results in 9 following ∇m f = −I, and since the operators D̂ do not depend on m (we defined τ0 and its derivatives so it does not depend on κ). The matrix (4.21) can be multiplied with any vector efficiently given the order of variables (i, j) in which the FM algorithm set their values as known . To apply J on an arbitrary vector x, i.e. calculate e = Jx, a linear system Ae = x can be solved with A = J−1 (note that A is a sparse matrix). The equations of this linear system, which correspond to the rows of A, can be approached and solved sequentially in the FM order of variables. Since the FM algorithm uses only known variables for determining each new variable, then when looking at each row i of A, the non-zero entries in that row (except i) correspond to variables that where in known when τ i was determined during the FM run. Therefore, if all those variables are known except i, then the i-th equation has only one unknown (ei ) and can be trivially solved. In other words, if we permute A according to the FM order, we get a sparse lower triangular matrix, and the corresponding system can be solved efficiently in one forward substitution sweep in O(n) operations. For the non-factored equation one may use (4.21) with non-factored operators Dx and Dy instead of the factored ones [14]. 4.1. Travel time tomography using Gauss-Newton Assume that we have several sources and receivers set on an open surface, and for each source we have traveltime data diobs given in the location of the receivers. Based on these observations we wish to compute the unknown slowness model of the ground underneath. The inverse problem for this process, called travel time tomography, may be given by (n ) s X > i i 2 kP τ (m) − dobs k + αR(m) , min φ(m) = min (4.22) mL <m<mH mL <m<mH i=1 where |∇τ i |2 = m(~x) τ i (~xi ) = 0 i = 1, . . . , ns (4.23) Here τ i is the travel time from the point source ~xi , and m(~x) = κ(~x)2 is the squared slowness model as in (1.1), only now it is unknown. The operator P> is a projection to the set of receivers that gather the wave information. Here we assume that the information from all sources is available on all the receivers, i.e., the projection operator P does not change between sources. R(m) is a regularization term and α > 0 is its balancing parameter. The parameters mL and mH are positive lower and upper bounds needed for keeping the slowness of the medium physical. We note that the observations diobs can be obtained manually from recorded seismic data or by automatic time picking—for more information see [28] and references therein. Without the regularization term R(m), the problem (4.22) is ill-posed, i.e., many solutions m may fit the predicted travel time to the measured data [37, 32]. For this reason, in most cases we cannot expect to exactly recover the true model, but wish to recover a reasonable model by adding prior information using the regularization term R(m). This term aims to promote physical or meaningful solutions that we may expect to see in the recovered model. For example, in seismic exploration, one may expect to recover a layered model of the earth subsurface, hence may choose R to promote smooth or piecewise-smooth functions like the total variation regularization term [26]. There are several ways to solve (4.22), and most of them are gradient-based. Here we focus on GaussNewton. This method is computationally favorable here, since its cost is governed by the application of sensitivities, which are easy to obtain using FM. Given an approximation m(k) at the k-th iteration, we place (4.17) into (4.22) and get min δm ns   1X kP> diag (τ i0 ) τ i1 (m(k) ) + Ji δm − diobs k2 + αR(m(k) + δm), 2 i=1 (4.24) where Ji is the sensitivity of τ i1 at m(k) . Minimizing this approximation for δm leads to computing the gradient ∇m φ(m(k) ) = ns X  (Ji )> diag (τ i0 )P P> diag (τ i0 )τ i1 − diobs + α∇m R(m(k) ). i=1 10 (4.25) We then approximately solve the linear system Hδm = −∇m φ(m(k) ) where H= n X (Ji )> diag (τ i0 )PP> diag (τ i0 )Ji + α∆m R(m(k) ). i=1 The linear system is solved using the conjugate gradient method where only matrix vector products are computed. Finally, the model is updated, m ← m + µδm where µ ≤ 1 is a line search parameter that is chosen such that the objective function is decreased at each iteration. 5. Numerical results: solving the eikonal equation In this section we demonstrate the FM algorithm using first or second order upwind discretization for solving the factored eikonal equation (1.4). We demonstrate both the accuracy of the obtained solution, and the computational cost of calculating it using the FM algorithm. The accuracy of the algorithm is demonstrated by two error norms: one in the maximum norm l∞ , and one is the mean l2 norm defined by the standard l2 norm of the error divided by the square root of the total number of variables. Similarly to [31], we show these two measures to demonstrate the accuracy of the second order scheme. Showing the l∞ norm of the error for this scheme may result in only first order accuracy, because at some points our second order FM algorithm reverts to first order operators, which may be picked by the l∞ norm. To demonstrate the efficiency of the computation, we measure the time in which the algorithm solves each test. We also show this timing in terms of work-units, where each work unit is defined by the time that it takes to evaluate the equation (1.1) using given central difference gradient stencils (without memory allocation time). We note that the more reliable timings appear for the large scale examples. We use analytical examples for media where there is a known analytical solution for a point source located at ~x0 . The first two appear in [6]. We show results for two and three dimensions. Our code is written in Julia language [4] version 0.4.5, and all our tests were calculated on a laptop machine using Windows 10 64bit OS, with Intel core-i7 2.8 GHz CPU with 32 GB of RAM. Our code is publicly available in https://github.com/JuliaInv/FactoredEikonalFastMarching.jl. We do not enforce the monotonicity in the results below, but those can be enforced in our package. The three test cases are listed below. Test case 1: Constant gradient of squared slowness. In this test case we set: κ2 (~x) = s20 + 2a~e1 · (~x − ~x0 ), (5.26) where ~e1 = (1, 0) is a unit vector, and · is the standard dot product. The parameters a, s0 , the domain and the source location are chosen differently in 2D and 3D. The corresponding exact solution is given by 1 τexact (~x) = S̄ 2 σ − a2 (σ 3 ), 6 (5.27) where S̄ 2 (~x) = σ 2 (~x) = s20 + a~e1 · (~x − ~x0 )  −1 q 2 4 2 2 2k~x − x~0 k2 . S̄ + S̄ − a k~x − x~0 k Figures 3(a) and 3(d) show the model κ for this test case with the chosen parameters for 2D. 11 (5.28) (5.29) (a) Test case 1: Constant gradient of (b) Test case 2: Constant gradient of vesquared slowness. locity. (c) Test case 3: Gaussian factor (d) Test case 1: Contours of the solution. (e) Test case 2: Contours of the solution. (f) Test case 3: Contours of the solution. Figure 3: The 2D slowness model κ(~ x) of the three test cases and the corresponding contours of the 2D solutions. Test case 2: Constant gradient of velocity. In this test case we set:  κ(~x) = 1 + a~e1 · (~x − ~x0 ) s0 −1 , (5.30) where again ~e1 = (1, 0), · is the dot product, and the parameters a, s0 , the domain and the source location are chosen differently in 2D and 3D. The exact solution is given by   1 1 2 2 (5.31) τexact (~x) = acosh 1 + s0 a κ(~x)k~x − ~x0 k . a 2 Figures 3(b) and 3(e) show the model κ for this test case with the chosen parameters for 2D. Test case 3: Gaussian factor. In this test case we choose a function for τ1exact and multiply it by τ0 to get τexact . We choose τ1 as a Gaussian function centered around a point x~1 : τ1exact (~x) =  1 1 exp −(~x − ~x1 )T Σ(~x − ~x1 ) + , 2 2 (5.32) where Σ is a 2 × 2 or 3 × 3 positive diagonal matrix. As before, the parameters ~x1 and Σ, the domain and the source location x~0 are chosen differently in 2D and 3D. Here κ(~x) is defined by (3.8), with τ0 being the distance function. Figures 3(c) and 3(f) show the model κ for this test with the chosen parameters for 2D. 5.1. Two dimensional tests Now we show results for the two dimensional versions of the tests mentioned above. For all tests in 2D we choose the domain to be [0, 4] × [0, 8], while h = hx = hy varies from large to small. Test case 1: Constant gradient of squared slowness. For this 2D setting, we use the parameters a = −0.4, s0 = 2.0, and the source location is ~x0 = (0, 4). Table 1 summarizes the results for this test. On the first order section we see a typical first order convergence rate in both error norms. As the mesh size increases by two in each direction, the errors drop by a factor of two. In the second order section we see the typical behavior of the FM algorithm. At some points, first order operators are used, and hence the error at those 12 h n 1/40 1/80 1/160 1/320 1/640 1/1280 161 × 321 321 × 641 641 × 1281 1281 × 2561 2561 × 5121 5121 × 10241 1st order error in τ [3.71e-03, 9.42e-04] [1.85e-03, 4.69e-04] [9.22e-04, 2.34e-04] [4.60e-04, 1.17e-04] [2.30e-04, 5.83e-05] [1.15e-04, 2.92e-05] time(work) 0.05s(217) 0.19s (199) 0.85s (217) 3.89s (266) 16.4s (278) 76.6s (316) 2nd order error in τ time(work) [9.33e-05, 9.26e-06] 0.05s (202) [3.30e-05, 2.21e-06] 0.20s (209) [1.14e-05, 5.32e-07] 0.85s (218) [4.06e-06, 1.28e-07] 3.84s (262) [1.47e-06, 3.12e-08] 17.1s (289) [5.18e-07, 7.64e-09] 77.5s (320) Table 1: Results for 2D constant gradient of squared slowness (test case 1). The error measures are in the [l∞ , mean l2 ] norms. locations dominates the l∞ norm. Still, we observe much better convergence compared to the first order l∞ , only it is not of second order. In the mean l2 norm we see typical second order convergence—as the mesh size increases by two in each direction, the errors drop by a factor of four. In any case, the errors in the second order columns are much smaller than those in the first order columns. In terms of computational cost, the 2D FM algorithm exhibits favorable timings and work counts. Except the small cases, the cost of the algorithm is comparable to 200-300 function evaluations using standard difference stencils. This is maintained for all the considered mesh sizes. The difference in the computational cost between using first and second order schemes is only about 10% of execution time. Test case 2: Constant gradient of velocity. For this 2D setting, we use the parameters a = 1.0, s0 = 2.0, and the location of the source is again at ~x0 = (0, 4). Table 2 summarizes the results for this test. The results here are almost identical to the previous test case. The first order columns show typical first order convergence in both error norms. The second order columns show better convergence and exhibits second order convergence in the mean l2 norm column. The computational costs columns show timings which are almost identical to the previous test case. h n 1/40 1/80 1/160 1/320 1/640 1/1280 161 × 321 321 × 641 641 × 1281 1281 × 2561 2561 × 5121 5121 × 10241 1st order error in τ [2.66e-02, 1.01e-02] [1.32e-02, 5.05e-03] [6.59e-03, 2.52e-03] [3.29e-03, 1.26e-03] [1.65e-03, 6.28e-04] [8.22e-04, 3.14e-04] time(work) 0.05s (205) 0.21s (221) 0.87s (223) 3.80s (259) 16.2s (274) 73.8s (304) 2nd order error in τ time(work) [4.86e-04, 2.90e-04] 0.05s (236) [1.67e-04, 7.38e-05] 0.20s (206) [5.18e-05, 1.85e-05] 0.86s (221) [1.90e-05, 4.61e-06] 3.88s (265) [6.58e-06, 1.15e-06] 16.6s (280) [2.28e-06, 2.86e-07] 74.6s (307) Table 2: Results for the 2D constant gradient of velocity (test case 2). The error measures are in the [l∞ , mean l2 ] norms. Test case 3: Gaussian factor. For this setting, we use the parameters Σ = diag (0.1, 0.4), ~x1 = (4/3, 2) (floored to the closest grid point), and the source is located in the point ~x0 = (1, 2). Table 3 summarizes the results for this test. Again we see first order convergence at the first order columns in both norms. On the second order columns we again see faster convergence, and in the mean l2 norm column we see convergence rate that is close to second order—the error decreases by a factor of about 3.9 when the mesh size increases by a factor of 2 in each dimension. Again we see similar behavior in the computational cost columns. We now wish to better illustrate the difference between the accuracy of the first order scheme and the second order scheme. First, Figure 4 shows contours of the exact and approximate solutions in certain regions of the domain for the second and third test cases. It is clear that the first order approximation is less accurate than the second order one. Next, Figure 5 shows plots of the errors in Tables 1-3 in logarithmic scales for both h and the error norms, where the order of convergence determines the slope of the lines. It is clear that in all cases, using the second order scheme we get second order convergence in mean l2 norm, and a bit more than first order convergence in the l∞ norm. 13 h n 1/40 1/80 1/160 1/320 1/640 1/1280 161 × 321 321 × 641 641 × 1281 1281 × 2561 2561 × 5121 5121 × 10241 1st order error in τ [6.15e-03, 3.86e-03] [3.07e-03, 1.93e-03] [1.54e-03, 9.67e-04] [7.68e-04, 4.83e-04] [3.84e-04, 2.42e-04] [1.92e-04, 1.21e-04] time(work) 0.05s(205) 0.21s (221) 0.87s (223) 3.80s (259) 16.2s (275) 73.8s (304) 2nd order error in τ time(work) [1.60e-04, 5.94e-05] 0.05s(236) [3.85e-05, 1.56e-05] 0.20s (206) [1.08e-05, 4.03e-06] 0.86s (221) [3.18e-06, 1.04e-06] 3.88s (265) [9.59e-07, 2.66e-07] 16.6s (280) [2.99e-07, 6.88e-08] 74.6s (307) Table 3: Results for the 2D Gaussian factor test case (test case 3). The error measures are in the [l∞ , mean l2 ] norms. (a) Constant gradient of velocity. (b) Gaussian factor. Figure 4: Contours of small regions in the exact, first order accurate and second order accurate travel times τ using h = 0.1. The exact solution appears in black line. The first order approximation appears in dotted red line and the second order approximation appears in a dashed blue line mostly right with the exact solution. 5.2. Three dimensional tests We now show results for the same type of tests in three dimensions. For all the 3D tests we choose the domain to be [0, 0.8] × [0, 1.6] × [0, 1.6], and h = hx = hy = hz varies. Test case 1: Constant gradient of squared slowness. For the 3D version of this test case we use the parameters a = −1.65, and s0 = 2.0, and the source is located at (0, 0.8, 0.8). Table 4 summarizes the results for this test case. Again, like in two dimensions, the first order version of FM yields first order convergence rate in both error norms. When using the second order scheme we get a super-linear convergence rate in the l∞ column, and second order convergence in the mean l2 column. We note that in 3D the FM algorithm reverts to first order scheme on 2D manifolds, where the derivative in each dimension switches sign, and not on 1D curves as in 2D. In terms of computational cost, it is obvious that the 3D problem is much more expensive than the 2D one. The computational cost in seconds per grid-point in 3D is about 3 times higher than the corresponding cost in 2D. That is because the treatment of each grid point is more expensive (more neighbors and more derivative directions), and the number of grid points that are processed inside the heap is much larger (a 2D manifold of points compared to a 1D curve). As a result, when we normalize the timing by the cost of a 3D “work-unit” (evaluation of (1.1) in 3D), the cost grows a little when the mesh-size grows. Still, solving the problem requires 200-500 work units. Again, using the first and second order schemes requires similar computational effort in our 3D implementation of the FM algorithm. Test case 2: Constant gradient of velocity. For the 3D version of this test case we use the parameters a = 1.0, and s0 = 2.0, and the source is located at (0, 0.8, 0.8). Table 5 summarizes the results for this test case. As in the previous case, we get first order convergence when using the first order scheme, in both error norms. Again, when using the second order scheme we get a super-linear convergence rate in the l∞ column, and second order convergence in the mean l2 column. 14 (a) 2D constant squared slowness. gradient of the (b) 2D constant gradient of velocity. (c) 2D Gaussian factor. Figure 5: The accuracy of the FM approximations in logarithmic scales for the 2D cases. Red plots are used for first order approximations, blue plots for second order approximations; dotted lines for l∞ error norm and solid for mean l2 norm. Black circles denote a reference for exact second order convergence rate. h n 1/20 1/40 1/80 1/160 1/320 17 × 33 × 33 33 × 65 × 65 65 × 129 × 129 129 × 257 × 257 257 × 513 × 513 1st order error in τ [5.41e-03, 1.46e-03] [2.64e-03, 7.05e-04] [1.30e-03, 3.46e-04] [6.41e-04, 1.72e-04] [3.19e-04, 8.55e-05] time(work) 0.04s(236) 0.30s (230) 2.88s (332) 28.7s (427) 264s (481) 2nd order error in τ time(work) [5.63e-4 ,1.49e-04] 0.04s(234) [2.00e-04 ,3.52e-05] 0.32s (235) [6.99e-05 ,7.82e-06] 2.90s (334) [2.51e-05 ,1.68e-06] 29.0s (432) [8.78e-06 ,3.53e-07] 272s (497) Table 4: Results for the 3D constant gradient of squared slowness test case (test case 1). The error measures are in the [l∞ , mean l2 ] norms. Test case 3: Gaussian factor. For this 3D test case we use the parameters Σ = diag (0.2, 0.4, 0.1), ~x1 = (0.4, 1.6 x0 = (0.2, 0.4, 0.4). 3 , 0.4) (floored to the closest grid point), and the source is located in the point ~ Table 5 summarizes the results for this test case. The results are similar to the previous test case in both the convergence (first/second order using l∞ /l2 norms) and computational costs in seconds and work units. Again we wish to demonstrate the order accuracy of the FM approximations using the first and second order schemes. Figure 6 shows the results in Tables 4-6 in logarithmic scales. Like in 2D, we observe second order convergence rate when the error is measure in mean l2 norm. However, because the second order stencil reduces to first order stencil in two dimensional manifolds, the error in l∞ norm is higher in 3D than it is in 2D. 6. Numerical results: travel time tomography. In this section we demonstrate a solution of travel time tomography using synthetic travel time data dobs for a 2D and SEG/EAGE salt model given in [1] and presented in Figure 7(a), using a 256 × 128 grid that represents an area of approximately 13.5km × 4.2km. We choose 51 equally distanced sources locations on the open surface (that is, they are located every 5 pixels on the top row), and 256 receivers (located in every pixel on the top row). We note that to have a reasonable solution using the first arrivals for the inverse problem under this setup, the velocity in the interior has to be larger than that on the surface. This is to guarantee that the first arrival rays obtained on the surface actually come from the interior but not only travel along the surface. To dobs we add white Gaussian noise with standard deviation of 0.01 × mean(|dobs |). To fit the model to the data, we minimize (4.22) using Gauss-Newton (we perform 10 iterations, where in each we apply 8 CG steps for the Gauss Newton direction problem). We use the general-propose inversion package [27], which is freely available in https://github.com/JuliaInv/jInv.jl, together with our FM 15 h n 1/20 1/40 1/80 1/160 1/320 17 × 33 × 33 33 × 65 × 65 65 × 129 × 129 129 × 257 × 257 257 × 513 × 513 1st order error in τ [1.35e-02, 5.04e-03] [6.24e-03, 2.44e-03] [3.00e-03, 1.20e-03] [1.47e-03, 5.99e-04] [7.30e-04, 2.99e-04] time(work) 0.04s(237) 0.31s (234) 2.86s (330) 27.6s (411) 263s (481) 2nd order error in τ time(work) [2.34e-03, 9.36e-04] 0.04s(255) [5.12e-04, 1.72e-04] 0.32s (236) [1.70e-04, 3.82e-05] 2.89s (334) [5.42e-05, 9.33e-06] 28.9s (430) [1.95e-05, 2.29e-06] 271s (496) Table 5: Results for the 3D constant gradient of velocity test case (test case 2). The error measures are in the [l∞ , mean l2 ] norms. h n 1/20 1/40 1/80 1/160 1/320 17 × 33 × 33 33 × 65 × 65 65 × 129 × 129 129 × 257 × 257 257 × 513 × 513 1st order error in τ [7.53e-03, 3.26e-03] [3.69e-03, 1.56e-03] [1.83e-03, 7.62e-04] [9.11e-04, 3.77e-04] [4.54e-04, 1.87e-04] time(work) 0.04s (230) 0.33s (245) 2.77s (319) 26.4s (393) 267s (487) 2nd order error in τ time(work) [3.65e-04, 1.27e-04] 0.04s (229) [9.95e-05, 2.85e-05] 0.34s (253) [3.22e-05, 7.50e-06] 2.80s (323) [1.06e-05, 2.06e-06] 27.2s (405) [3.54e-06, 5.66e-07] 276s (504) Table 6: Results for the 3D Gaussian factor test case (test case 3). The error measures are in the [l∞ , mean l2 ] norms. (a) 3D constant gradient of the squared slowness. (b) 3D constant gradient of velocity. (c) 3D Gaussian factor. Figure 6: The accuracy of the FM approximations in logarithmic scales for the 3D cases. Red and blue plots are used for first and second order approximations, respectively; dotted lines for l∞ error norm and solid for mean l2 norm. Black circles denote an exact second order convergence rate. package mentioned earlier. For that, we first generate an initial slowness model m(0) = mref , whose velocity model shown in Figure 7(b). This corresponds to a velocity field with a constant gradient in the y direction, similarly to the model in Figure 3(b). To bound m from above and from below throughout the minimization, we invert for an auxiliary variable m0 and use the following scalar bounded bijective mapping that prevents m from being below mL or above mH :     mH − mL 2 mH + mL 0 0 mbound (m ) = · tanh · m − + 1 + mL . 2 mH − mL 2 That is, instead of minimizing (4.22) as is, we minimize (n ) s X 0 > i 0 i 2 0 min φ(m ) = min kP τ (mbound (m )) − dobs k + αR(m ) , 0 0 m m (6.33) i=1 subject to the same constraints in (4.23). For the regularization R use a simple discrete central-differences 16 (a) True velocity model. (b) Initial velocity model mref (c) Recovered velocity model. Figure 7: 2D travel time tomography experiment, grid size 256 × 128. Velocities are given in km/sec. (a) Initial data using mref . (b) Final predicted data. (c) Initial residual: |dref − dobs | (d) The final residual: |dpred − dobs | Figure 8: Initial and final data and residuals in the source-receiver domain. Laplacian, and apply it for m0 ; that is R(m0 ) = 1 0 (m − m0ref )> ∆h (m0 − m0ref ), 2 where m0ref is the model such that mbound (m0ref ) = mref . For ∆h we use Neumann boundary conditions, since those lead to an effect of an automatic salt flooding, which is a popular way to treat salt bodies. We set the regularization parameter to be α = 0.5. We note that other choices of mref and regularization terms may definitely be suitable here, but are beyond the scope of this paper. Figure 7(c) shows the result model of the Gauss Newton minimization, and Figure 8 presents the initial and final data and data residuals. In particular, Figure 8(d) shows that the final residual mostly contains the added Gaussian noise. Figure 9 shows that the misfit was indeed reduced throughout the iterations, until the reduction stalls and the misfit reflect the noise level. To demonstrate our algorithm in 3D, we use a 3D version of the same SEG/EAGE model, presented in Figure 10(a), using a 256 × 256 × 128 grid that represents a volume of 13.5km × 13.5km × 4.2km. We choose 144 equally distanced sources locations on the open surface, located every 23 pixels on the top surface, and 256 × 256 receivers located on the top surface. We use the same parameters as in the 2D experiment (bound function, regularization, initial 3D model, added noise to the data, number of iterations etc.). Figure 10(b) shows the result of the inversion. Similarly to the 2D case, the top part of the model is recovered quite well, while a “salt flooding” effect is evident in the bottom part of the model. We performed the inversion using a machine with two Intel(R) Xeon(R) E5-2670 v3 processors with 128 GB of RAM. Using 24 cores, we applied the inversion in approximately 15 hours, and the highest memory footprint of the algorithm reached around 30GB. 17 Figure 9: Convergence history of the inversion. (a) True velocity model. (b) Recovered model. Figure 10: 3D travel time tomography experiment, grid size 256 × 256 × 128. Velocities are given in km/sec. 7. Conclusions In this paper we developed a Fast Marching algorithm for the factored eikonal equation, which in many cases yields a more accurate solution of the travel time than the original equation. Similarly to the original FM algorithm, our version solves the factored problem by exploiting the monotonicity of the solution along the characteristics. Our algorithm is capable of solving the problem using both first and second order schemes. The advantages of our algorithm are (1) its favorable guaranteed O(n log n) running time, and (2) the easily computed sensitivity matrices for solving the inverse (factored) eikonal equation. 8. Acknowledgement The research leading to these results has received funding from the European Union’s - Seventh Framework Programme (FP7/2007-2013) under grant agreement no 623212 - MC Multiscale Inversion. References References [1] F. Aminzadeh, B. Jean, and T. Kunz, 3-D salt and overthrust models, Society of Exploration Geophysicists, 1997. [2] J. A. Bærentzen, On the implementation of fast marching methods for 3D lattices, Tech. Report IMM-TR-2001-13, Informatics and Mathematical Modelling, Technical University of Denmark, DTU, Richard Petersens Plads, Building 321, DK-2800 Kgs. Lyngby, 2001. 18 [3] A. Benaichouche, M. Noble, and A. Gesret, First arrival traveltime tomography using the fast marching method and the adjoint state technique, in 77th EAGE Conference Proceedings., 2015. [4] J. Bezanzon, S. Karpinski, V. Shah, and A. Edelman, Julia: A fast dynamic language for technical computing, in Lang.NEXT, Apr. 2012. [5] M. G. Crandall and P.-L. Lions, Viscosity solutions of Hamilton-Jacobi equations, Transactions of the American Mathematical Society, 277 (1983), pp. 1–42. [6] S. Fomel, S. Luo, and H. Zhao, Fast sweeping method for the factored eikonal equation, Journal of Computational Physics, 228 (2009), pp. 6440–6455. [7] P. A. Gremaud and C. M. Kuster, Computational study of fast methods for the eikonal equation, SIAM journal on scientific computing, 27 (2006), pp. 1803–1816. [8] E. Haber, Computational Methods in Geophysical Electromagnetics, vol. 1, SIAM, 2014. [9] E. Haber and S. MacLachlan, A fast method for the solution of the Helmholtz equation, Journal of Computational Physics, 230 (2011), pp. 4403–4418. [10] C. Y. Kao, S. Osher, and J. Qian, Lax–friedrichs sweeping scheme for static Hamilton-Jacobi equations, Journal of Computational Physics, 196 (2004), pp. 367–391. [11] R. Kimmel and J. A. Sethian, Computing geodesic paths on manifolds, Proceedings of the National Academy of Sciences, 95 (1998), pp. 8431–8435. [12] S. Leung, J. Qian, and R. Burridge, Eulerian Gaussian beams for high-frequency wave propagation, Geophysics, 72 (2007), pp. SM61–SM76. [13] S. Leung, J. Qian, et al., An adjoint state method for three-dimensional transmission traveltime tomography using first-arrivals, Communications in Mathematical Sciences, 4 (2006), pp. 249–266. [14] S. Li, A. Vladimirsky, and S. Fomel, First-break traveltime tomography with the double-square-root eikonal equation, Geophysics, 78 (2013), pp. U89–U101. [15] S. Luo and J. Qian, Factored singularities and high-order lax–friedrichs sweeping schemes for pointsource traveltimes and amplitudes, Journal of Computational Physics, 230 (2011), pp. 4742–4755. [16] , Fast sweeping methods for factored anisotropic eikonal equations: multiplicative and additive factors, Journal of Scientific Computing, 52 (2012), pp. 360–382. [17] S. Luo, J. Qian, and R. Burridge, Fast Huygens sweeping methods for Helmholtz equations in inhomogeneous media in the high frequency regime, Journal of Computational Physics, 270 (2014), pp. 378–401. [18] S. Luo, J. Qian, and R. Burridge, High-order factorization based high-order hybrid fast sweeping methods for point-source eikonal equations, SIAM Journal on Numerical Analysis, 52 (2014), pp. 23–44. [19] S. Luo, J. Qian, and H. Zhao, Higher-order schemes for 3d first-arrival traveltimes and amplitudes, Geophysics, 77 (2012), pp. T47–T56. [20] M. Noble, A. Gesret, and N. Belayouni, Accurate 3-d finite difference computation of traveltimes in strongly heterogeneous media, Geophysical Journal International, 199 (2014), pp. 1572–1585. [21] A. Pica et al., Fast and accurate finite-difference solutions of the 3d eikonal equation parametrized in celerity, 67th Ann. Internat. Mtg, Soc. of Expl. Geophys, (1997), pp. 1774–1777. [22] J. Qian and W. W. Symes, An adaptive finite-difference method for traveltimes and amplitudes, Geophysics, 67 (2002), pp. 167–176. 19 [23] J. Qian, Y.-T. Zhang, and H.-K. Zhao, A fast sweeping method for static convex Hamilton-Jacobi equations, Journal of Scientific Computing, 31 (2007), pp. 237–271. [24] N. Rawlinson and M. Sambridge, Wave front evolution in strongly heterogeneous layered media using the fast marching method, Geophysical Journal International, 156 (2004), pp. 631–647. [25] E. Rouy and A. Tourin, A viscosity solutions approach to shape-from-shading, SIAM Journal on Numerical Analysis, 29 (1992), pp. 867–884. [26] L. I. Rudin, S. Osher, and E. Fatemi, Nonlinear total variation based noise removal algorithms, Physica D: Nonlinear Phenomena, 60 (1992), pp. 259–268. [27] L. Ruthotto, E. Treister, and E. Haber, jInv – a flexible Julia package for PDE parameter estimation, Submitted, (2016). [28] C. Saragiotis, T. Alkhalifah, and S. Fomel, Automatic traveltime picking using instantaneous traveltime, Geophysics, 78 (2013), pp. T53–T58. [29] A. Sei, W. W. Symes, et al., Gradient calculation of the traveltime cost function without ray tracing, in 65th Ann. Internat. Mtg., Soc. Expl. Geophys., Expanded Abstracts, 1994, pp. 1351–1354. [30] J. A. Sethian, A fast marching level set method for monotonically advancing fronts, Proceedings of the National Academy of Sciences, 93 (1996), pp. 1591–1595. [31] , Fast marching methods, SIAM review, 41 (1999), pp. 199–235. [32] E. Somersalo and J. Kaipio, Statistical and computational inverse problems, Applied Mathematical Sciences, 160 (2004). [33] A. Spira and R. Kimmel, An efficient solution to the eikonal equation on parametric manifolds, Interfaces and Free Boundaries, 6 (2004), pp. 315–328. [34] C. Taillandier, M. Noble, H. Chauris, and H. Calandra, First-arrival traveltime tomography based on the adjoint-state method, Geophysics, 74 (2009), pp. WCB1–WCB10. [35] Y.-H. R. Tsai, L.-T. Cheng, S. Osher, and H.-K. Zhao, Fast sweeping algorithms for a class of Hamilton-Jacobi equations, SIAM journal on numerical analysis, 41 (2003), pp. 673–694. [36] J. N. Tsitsiklis, Efficient algorithms for globally optimal trajectories, Automatic Control, IEEE Transactions on, 40 (1995), pp. 1528–1538. [37] C. R. Vogel, Computational methods for inverse problems, vol. 23, SIAM, Philadelphia, 2002. [38] H. Zhao, A fast sweeping method for eikonal equations, Mathematics of computation, 74 (2005), pp. 603–627. 20
5cs.CE
1 arXiv:1803.06790v2 [math.ST] 28 Mar 2018 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion Eugene Katsevich Department of Statistics Stanford University [email protected] Aaditya Ramdas Departments of Statistics and EECS University of California, Berkeley [email protected] 03.30.18 Abstract The false discovery rate (FDR) has become a popular Type-I error criterion for multiple testing, but it is not without its flaws. Indeed, (a) controlling the mean of the false discovery proportion (FDP) does not preclude large FDP variability, and (b) committing to an error level q before observing the data limits its use in exploratory data analysis. In this paper, we take a step towards addressing both of the above drawbacks by proving uniform FDP bounds for a variety of existing FDR procedures. In particular, many such procedures proceed by examining a path of potential rejection sets ∅ = R0 ⊆ R1 ⊆ · · · ⊆ Rn ⊆ [n], assigning some algorithm-dependent estimate d k ) to each one, and choosing the final rejection set Rk∗ via k∗ = max{k : FDP(R d k ) ≤ q}. The resulting FDP(R ∗ inferential guarantee applies only to the set Rk , guaranteeing the FDP of this set will be small on average. In this paper, we prove that for a wide variety of such procedures (including Benjamini-Hochberg, accumulation d bounds the FDP to within a small explicit tests, knockoffs, AdaPT, and STAR), under independent p-values, FDP constant factor calg (α), uniformly across the entire path, with probability 1 − α. In each case calg (α) scales FDP(Rk ) has exponentially decaying tails. The consequences of this like log( α1 ), meaning that the quantity supk FDP(R d k) statement are two-fold. First of all, they imply that existing FDR procedures also have FDP bounded with high probability by a small constant multiple of the target FDR level q. This constant is close to 2 for several procedures at the 95% confidence level. Secondly, our bounds open up a middle ground between fully simultaneous inference (guarantees for all 2n possible rejection sets), and fully selective inference (guarantees only for Rk∗ ). They allow the scientist to spot one or more suitable rejection sets (select post-hoc on the algorithm’s trajectory) by picking d k ) and the uniform upper band on data-dependent sizes or error-levels, after examining the entire path of FDP(R FDP. This post hoc mode of inference addresses both aforementioned drawbacks of FDR. Our bounds apply to online FDR procedures as well, providing simultaneous high-probability uniform FDP bounds at arbitrary datadependent query times for arbitrary online procedures, including alpha-investing, LORD and SAFFRON. Our analysis unifies existing martingale and empirical process viewpoints on FDR algorithms. Keywords: false discovery rate, FDR, multiple testing, post hoc confidence bounds, false discovery exceedence, FDX, simultaneous selective inference, optional spotting, uniform martingale concentration. 1 Introduction The false discovery rate (FDR) [1] is a popular Type-I error criterion for multiple testing problems. Given a set of hypotheses H1 , . . . , Hn and a rejection set R ⊂ [n] obtained based on a set of p-values p1 , . . . , pn , the false discovery proportion is defined by V |R ∩ H0 | FDP(R) ≡ ≡ , (1) |R| R where H0 ⊂ [n] is the set of nulls. By convention, FDP ≡ 0 when R = ∅ (we use the ≡ symbol for definitions). The false discovery rate is defined as the expectation of the false discovery proportion: FDR ≡ E [FDP]. 2 1.1 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Offline versus online multiple testing Multiple testing may occur in a batch (or offline) context, where all p-values are available ahead of time, or in an online context, where p-values arrive in a (potentially infinite) stream. Given an FDR target level q, e.g. q = 0.1, the usual goal in the offline context is to find one set of rejections R for which FDR ≡ E [FDP(R)] ≤ q. (2) In the online context, one tests a possibly infinite sequence of hypotheses, maintaining a rejection set Rk ⊇ Rk−1 at each time k, by irrevocably deciding whether to reject Hk immediately after seeing pk , but before seeing pk+1 , . . . . These decision are made to ensure that for any k ∈ N, we have FDRk ≡ E [FDP(Rk )] ≤ q. (3) In the batch setting, the most widely adopted FDR procedure is the Benjamini-Hochberg procedure [1], which guarantees the desired bound (2) if the p-values are independent or positively dependent [2]. While the BH procedure satisfies certain optimality criteria when the hypotheses are treated as exchangable and there is no structure to exploit [3], this fact is not true in the presence of prior information or structural constraints. Recognition of this fact has led to the development of more powerful procedures that are applicable in a wide variety of settings, and we will discuss many such examples in this work, like ForwardStop for sequential model selection [4], Selective SeqStep for variable selection using knockoffs [5], multilayer grouped constructions like p-filter [6, 7, 8], accumulation tests for ordered testing [9], and interactive human-in-the-loop protocols like AdaPT [10] and STAR [11]. The online FDR literature began with Foster and Stine’s alpha-investing algorithm [12], with more recent work proposing some generalizations [13], and also more powerful alternatives like LORD [14, 15] and SAFFRON [16]. 1.2 Criticism of the FDR, and alternatives The FDR and associated methodologies have gained broad acceptance across many application domains. This approach is attractive compared to controlling the family-wise error rate (FWER), defined as FWER = Pr{V > 0}, because it often affords more power while retaining a meaningful type-I error guarantee. Especially in modern large-scale testing applications, requiring the absence of false discoveries with high probability is much too stringent. Despite the advantages of FDR, this error rate is not without its pitfalls. Its two primary weaknesses, which several authors have highlighted already, are as follows. FDR control gives no guarantee on FDP variability. The FDR by definition only controls the expectation of the FDP. Hence, the data set at hand might have an FDP much higher than the nominal FDR target level. In this paper, we show that even for independent p-values, some FDR procedures may exhibit high FDP variability. This criticism also applies to the online context. In order to remedy this issue, it has been proposed that the FDP be controlled with high probability, instead of just on average: Pr{FDP > γ} ≤ α. The quantity on the left hand side is sometimes called the false discovery exceedance (FDX). Bounding the FDP with high probability provides a high-confidence guarantee for a given dataset as opposed to a guarantee on average across potential data sets. Several related step-down procedures have been proposed for FDX control in the offline setting [17, 18, 19, 20, 21, 22], and a rather conservative Bonferroni-like approach by Javanmard and Montanari (JM) [14] has been proposed in the online setting. The standard multiple testing paradigm, and FDR control in particular, provides little or no flexibility. Whether controlling FDR or FDX, the standard multiple testing paradigm involves choosing a target level q (or bound γ) before looking at the data and formally cannot be changed afterwards. Even for a prespecified target level q, FDR procedures do not allow for post hoc analyses. In the offline context, the rejection set R cannot be modified (shrunk or expanded or altered otherwise) in a post hoc fashion without invalidating the guarantee. In the 3 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 online setting, we have no guarantees on FDPk at random times in the past, since the FDR guarantee (3) holds at all fixed times but not uniformly over time. This rigid multiple testing paradigm has limited applicability for exploratory data analysis, in which additional flexibility is desirable, as eloquently argued by Goeman and Solari (GS) [23], as well as by earlier authors [24, 25]. GS argue that this inflexibility clashes with the practice of exploratory data analysis, where it is common to re-run the algorithm with multiple target levels to get a set of the desired size, or to choose a subset of the rejection set that makes sense based on the user’s domain knowledge. To allow more flexibility in multiple testing, procedures have been designed [26, 27, 28, 29, 23, 30] to provide high-probability bounds FDPα simultaneously for all subsets R ⊂ [n]:  Pr FDP(R) ≤ FDPα (R) for all R ≥ 1 − α. (4) While FDR and FDX are instances of selective inference, where inferential guarantees are made only on the selected (i.e. rejected) set of hypotheses, statement (4) represents simultaneous inference, providing guarantees on all 2n possible rejection sets. Goeman and Solari (GS) [23] argue that simultaneous inference paves the way for a more flexible paradigm for multiple testing, called exploratory multiple testing. This paradigm reverses the traditional roles of the data analyst and multiple testing algorithm. Instead of the data analyst providing an FDR target level and the algorithm returning a rejection set, the algorithm provides simultaneous FDP bounds for all sets, and then the data analyst may choose a rejection set however she wishes. For this reason, bounds like (4) are also called post hoc bounds, bringing multiple testing procedures more in line with the practice of exploratory data analysis. In addition to resolving the issue of a priori selection of the target level, exploratory multiple testing allows data analysts to apply their domain knowledge, intuition, or any other outside information to examine multiple candidate rejection sets and choose the one that makes the most sense for the given application. 1.3 Preview: Uniform FDP bounds for existing FDR procedures Despite the weaknesses of FDR, this criterion and procedures controlling it are used widely in practice. Moreover, as described in Section 1.1, much progress has been made in designing FDR procedures in a variety of settings. Moreover, while the FDR criterion itself does not provide any guarantees on FDP variability, at least under independent (or weakly dependent) p-values, many of these procedures have been empirically found to have well-behaved FDP. In particular, it is well-known the the BH procedure has a tight FDP histogram under independence. Hence, one of the goals of this paper is to formally study the FDX performance of existing FDR procedures under independent p-values. To get a handle on this question, we study a construction common to many offline FDR procedures, including BH and nearly all others mentioned in Section 1.1. These procedures can be each viewed as constructing a path of rejection sets ∅ = R0 ⊆ R1 ⊆ · · · ⊆ Rn ⊆ [n]. (5) d k ) of false discovery proportion in Rk is defined. FiThen, for each k, an algorithm-dependent estimate FDP(R nally, the algorithm rejects the set Rk∗ , where d k ) ≤ q}. k ∗ = max{k : FDP(R (6) It turns out that for all these procedures, when the p-values are independent, one can summarize a proof that they control the FDR in a single line. One begins by constructing an appropriate backwards filtration Ωk with respect to which k ∗ can be viewed as a stopping time, and then identifying a nonnegative backwards supermartingale Mk with E [Mn ] ≤ 1, such that FDP(Rk ) V (Rk ) = ≤ Mk . (7) d k) FDP(R Vb (Rk ) It is often an art to identify Mk , Ωk , but after doing so, the proof of the fact that FDR = E [FDP(Rk∗ )] ≤ q reduces to the following simple argument that applies inequality (7) at stopping time k ∗ : " #   (ii) FDP(Rk∗ ) (i) FDP(Rk∗ ) ≤E ≤ E [Mk∗ ] ≤ 1, (8) E d k∗ ) q FDP(R Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 4 03.30.18 where inequality (i) follows by definiton of k ∗ , and inequality (ii) follows by the optional stopping theorem. One take-away message from the above proof is that, for a variety of existing procedures, proving that FDR ≤ q actually amounts to establishing the fact that " # FDP(Rk∗ ) E ≤ 1. (9) d k∗ ) FDP(R The central technical claim of this paper is that, in fact, a similar kind of statement can be made uniformly over the entire path. Main result: For a variety of FDR procedures working with independent p-values, FDP(Rk ) is only a constant d k ) (or a small variant thereof), uniformly over k with high probability. More precisely, factor larger than FDP(R we prove for several FDR algorithms that ( ) FDP(Rk ) ≤ calg (α) ≥ 1 − α, Pr sup (10) d k) k FDP(R where calg (α) are explicit algorithm-dependent constants. By integrating the bound (10) across α, we also obtain results of the form " # FDP(Rk ) E sup ≤ Calg . d k) k FDP(R (11) Here, Calg are algorithm-dependent constants that are not only independent of the number of hypotheses n, but remarkably, are less than 2 in most cases. If we compare inequality (11) with statement (9), we find that by paying a factor of about 2 or less, we move from a bound at the point k ∗ to a uniform bound across the whole path. 1.4 Towards “simultaneous selective inference”: from stopping times to spotting times Here, we briefly summarize some interpretations and implications of our bounds. To begin, it is possible to interpret the bounds (10) and (11) in the context of the stopping time k ∗ in definition (6), or in fact also for any other post d k∗ ) ≤ q. For such an index k ∗ , our bounds imply that hoc means of selecting k ∗ for which FDP(R Pr{FDP(Rk∗ ) ≤ calg (α) · q} ≥ 1 − α, (12) E [FDP(Rk∗ )] ≤ Calg · q. (13) and also that For this reason, we call calg (α) an “FDP multiplier” and Calg an “FDR multiplier”. Note that inequality (12) states something slightly surprising about existing FDR procedures: though designed to control the expected FDP at one point, they automatically control FDX uniformly to within a multiplicative factor of the nominal level. In addition, inequality (13) is useful for proving FDR guarantees in contexts where k ∗ has a complex definition (e.g. cannot be described as the stopping time with respect to a backwards filtration). This partially alleviates the FDP variability issue for FDR procedures, at least under independence. Note that statements (12) and (13) apply to the context where a target FDR level q is specified in advance. However, an equally important interpretation of the claim (10) is to view it as a uniform upper confidence bound (or confidence envelope) for the unknown FDP along the path of the algorithm: n o d k ) for all k ≥ 1 − α. Pr FDP(Rk ) ≤ calg (α)FDP(R (14) d k ), we see that inequality (14) is similar to inequality (4), except it is a Defining FDPα (Rk ) = calg (α)FDP(R uniform statement over the path of an FDR procedure instead of over all subsets. Hence, statement (14) also represents a solution to the issues concerning FDR laid out in Section 1.2: the uniformity of the bound provides flexibility and its FDX formulation avoids the FDP variability problem of traditional FDR methods. 5 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 For these reasons, we refer to statements (10) and (11) as “optional spotting” bounds, where to spot is to Select Posthoc On the Trajectory of the algorithm (the last term refers to the fact that each FDR algorithm effectively uses the information available at hand to pick sets of shrinking sizes from the full set to the empty set, carving out a trajectory of at most n + 1 sets out of the 2n possible sets). Spotting is a variant of GS’s vision for exploratory multiple testing, where the user is first presented with the d k ), calg (α)FDP(R d k )) and the user has the option of “spotting” one full trajectory of n + 1 triplets (Rk , FDP(R or more sets whose combination of size, content, and high-probability FDP bound is to their liking. Reporting the results on only some spotted triplets is statistically valid and mathematically principled, since the underlying bounds are uniform and simultaneous over all n + 1 sets. The term optional spotting is also used to explicitly contrast of our bounds (10) and (11) to the standard FDR guarantee (9), usually proved via optional stopping arguments. Moving from stopping to spotting resolves both aforementioned drawbacks of FDR procedures at the cost of a small multiplicative constant. Since this approach represents a middle path between fully selective inference (guarantees on the single rejection set Rk∗ ) and fully simultaneous inference (guarantees for all possible 2n rejection sets), we term our approach as “simultaneous selective inference”. Indeed, the FDP is controlled simultaneously, but only over the sets that were selected by the FDR algorithm. This approach is a promising path towards flexible, powerful, and computationally tractable multiple testing procedures. 1.5 Summary of contributions and paper outline Some contributions of our paper are briefly summarized below, after which we briefly describe the organization of the rest of this paper. • For several existing FDR procedures (or minor modifications thereof), we find tight and explicit constants d process, assuming bounding with high probability the extent to which the FDP process exceeds the FDP independent p-values. • We accomplish this by developing a simple yet versatile proof technique to obtain tight non-asymptotic bounds for the probability that the stochastic process V (Rk ) hits the boundary c(α)Vb (Rk ). • In the batch context, the corollary (12) shows that existing FDR procedures (or minor modifications thereof) also control FDX to within a constant factor c(α) of the nominal target level q. For BH, c(α) ≈ 2.1 for α = 0.05, justifying theoretically the common observation that the FDP of BH is well-behaved under independent p-values. • In the online context, we prove statement (10) for a broad class of online procedures, covering all existing online FDR algorithms and more. This provides high-probability bounds on FDP for any data-dependent query times in the present or past. • The reformulation (14) provides a uniform confidence envelope for the FDP process, echoing prior works like GS [23] and GW [29]. This points towards an “optional spotting” approach to multiple testing that addresses three common criticisms of traditional FDR methods. • Since our bounds are fairly tight, the differences in FDP multipliers across procedures reflects differences in the inherent variability of FDP for these procedures. Using this observation, we can quantitatively study the trade-off between power and FDP quantiles. Having overviewed our results and their implications, the remainder of the paper will focus on describing the corresponding multiple testing procedures in more detail (Section 2), formally stating these results (Section 3), discussing their implications for multiple testing (Section 4) and beyond (Section 5), exploring potential extensions to the correlated setting (Section 6), and proving these results (Section 7). We conclude the paper in Section 8. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 6 2 03.30.18 FDR controlling procedures: a unified review The purpose of this section is two-fold: (a) to recap existing classes of FDR procedures for the uninitiated (especially since much rapid progress has been made in the past few years), and (b) to present the variety of procedures using a somewhat unified viewpoint. Readers that are familiar with the literature may still benefit from the unified view that we present here, which has not been provided elsewhere to the best of our knowledge. The impatient reader may skip to Section 3, where we present our main results. To begin, we note that in both the batch and the online contexts, a path (5) of rejection sets is constructed. This path may be finite or infinite, depending on the context. For batch multiple testing, the path represents a sequence of increasingly liberal rejection sets, among which one member (indexed by k ∗ ) is finally chosen as the reported rejection set Rk∗ that satisfies the desired FDR bound (2). In this setting, the path is based on an ordering π(1), . . . , π(n) of the hypotheses, constructed so that non-nulls are more likely to occur early in the ordering. This ordering may be specified in advance or constructed data-adaptively. On the other hand, in the case of online testing, the FDR guarantee is on each set Rk on the path (recall the definition (3)), and the ordering π is dictated by the order in which hypotheses arrive in the stream, which might not be in the user’s control. In the batch setting, in order to choose which set to reject, several algorithms adopt a common paradigm: the FDP for each set Rk is estimated via b d k ) ≡ V (Rk ) , (15) FDP(R |Rk | where Vb is a (possibly data-dependent) estimate of Vk ≡ |H0 ∩ Rk |. Then, the rejection set Rk∗ is defined via d k ) ≤ q}. k ∗ ≡ max{k : FDP(R (16) d Several Batch FDR procedures vary based on the definitions of the ordering π, the path Rk and the estimate FDP. examples are detailed in this section, and our theoretical guarantees will apply to all of them, such as (a) Benjamini-Hochberg (BH) [1], (b) accumulation tests [9], Selective SeqStep [5], and Adaptive SeqStep [31] for ordered testing, or (c) AdaPT [10] and STAR [11] for interactive testing. We first discuss batch procedures mentioned in items (a), (b) and (c), and then the case of online testing. 2.1 The BH procedure In this procedure, π is the ascending ordering of the p-values, i.e. hypotheses are considered in order of increasing p-value. Despite the discreteness of the path, it is easier to parameterize it using a continuous p-value threshold t ∈ [0, 1]. Then, the rejection set corresponding to t is Rt ≡ {j ∈ [n] : pj ≤ t}, d is based on the estimate and FDP Vb (Rt ) ≡ nt. P Note that E [Vt ] ≡ E [Rt ∩ H0 ] = j∈H0 Pr{pj ≤ t} = |H0 |t. Hence, Vb (Rt ) is an upwardly biased estimate of Vt , the bias being fairly small if |H0 | ≈ n. 2.2 Ordered testing with a fixed, pre-defined order As in BH, the hypothesis order π for ordered testing is chosen so that non-nulls are likely to occur near the beginning of the ordering. However, unlike BH, the ordering π is specified in advance based on prior knowledge, 7 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 meaning that the hypotheses are ordered as Hπ(1) , Hπ(2) , . . . , Hπ(n) . Given such a predefined ordering π, two kinds of rejection sets have been considered: Rk ≡ {π(j) : j ≤ k}; (R1) Rk ≡ {π(j) : j ≤ k, pπ(j) ≤ p∗ }, (R2) for some pre-specified constant p∗ . The first choice corresponds to rejecting the first k hypotheses in the ordering regardless of p-value, whereas the second corresponds to rejecting those among the first k with p-values below a threshold p∗ . The definition of Rk clearly impacts the choice of Vb , so the two choices above lead to different constructions of Vb . Case (R1). For this choice of rejection sets, a family of accumulation tests has been proposed [9]. An accumulation function is a nondecreasing function h : [0, 1] → [0, ∞) that integrates to 1: Z 1 h(u)du = 1. 0 For example, for λ ∈ (0, 1), the SeqStep [5] accumulation function is h(pj ) ≡ I(pj > λ) . 1−λ 1 Other choices include ForwardStop [4], which used h(u) = log( 1−p ), and HingeExp [9], which used h(pj ) =   1 1−λ 1−λ log 1−pj I(pj > λ)). In all cases, we note that Eu∼U [0,1] [h(u)] = 1, which inspires the definition Vb (Rk ) ≡ B + k X h(pπ(j) ), (17) j=1 for some constant B, often chosen as B = supu∈[0,1] h(u) if the latter quantity is finite. From the defining properties of h, it follows that Vb (Rk ) is an upwardly biased estimator for Vb . The extra additive term B is a regularization employed to ensure exact finite-sample FDR control. This FDR control does not hold without regularization due to the unstable behavior of Vb near the beginning of the path; we return to this issue in Section 3. As a minor note, the original work on accumulation tests [9] required a slight modification of the definition (15): they use the denominator 1 + |Rk | instead of |Rk |. For consistency with the other procedures discussed in this paper, we deviate from the original authors’ proposal, and refer to the accumulation test as the procedure with d defined via equations (15) and (17). We explicitly specify if we wish to refer to the original accumulation test FDP with 1 + |Rk | in the denominator. Case (R2). The first procedure proposed for this case was Selective SeqStep [5], and a generalization called Adaptive SeqStep [31] was later proposed. Selective SeqStep is defined via   k X p∗  Vb (Rk ) ≡ 1+ I(pπ(j) > p∗ ) . (18) 1 − p∗ j=1 Note that if p∗ is small, then even non-nulls are likely to contribute to Vb (Rk ), making the procedure more conservative. To fix this issue, Adaptive SeqStep [31] instead defines   k X p ∗  Vb (Rk ) ≡ 1+ I(pπ(j) > λ) , (19) 1−λ j=1 where λ > p∗ . For example, we might define p∗ = 0.1 and λ = 0.5. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 8 2.3 03.30.18 Interactive algorithms (ordered testing with an adaptive order) Recently, it was noted that ordered testing procedures described in the previous subsection can be improved and generalized to a variety of settings, by constructing the ordering π data-adaptively, and possibly interactively with a scientist-in-the-loop. Two examples are noted below. AdaPT. Working in the context of definitions (R2) and (18) with p∗ = 0.5, Lei and Fithian note that only part of the information in the p-values is being used at the inference step (namely I(p > 1/2)), so the “left over” information may be used to help construct the ordering. This idea was inspired by the concept of data carving [32]. More precisely, this left over information is captured by the masking function g(p) = min(p, 1 − p). Indeed, note that min(u, 1 − u) and I(u > 1/2) are independent for uniformly distributed u. They showed that this information g(pj ) can be used freely in order to determine the ordering π while maintaining the FDR guarantee based on definition (18). Based on this idea, they proposed AdaPT (adaptive p-value thresholding), where the ordering is constructed based on g(pj ) as well as arbitrary side information xj attached to each hypothesis. AdaPT builds up the ordering π backwards, starting from π(n), at each step k using the information Gk ≡ σ({xj , g(pj )}j∈[n] , {pπ(j) }j>k ), (20) to determine π(k). Note that in addition to the masked p-values and the side information, the AdaPT algorithm gives access to unmasked p-values as well for hypotheses that have been excluded from the rejection set. STAR. Despite the many benefits of AdaPT, it cannot guarantee that the final rejection set obeys any userspecified constraints or desired structural properties, and further, one was restricted to using the pair min(p, 1 − p) and I(p > 1/2). This motivated the development of STAR (selectively traversed accumulation rules) [11], that generalized the notion of data carving to any accumulation function (17), by showing that for any non-decreasing h, a corresponding masking function g may be constructed. Like AdaPT, STAR also builds up the ordering from back to front, using the information in the filtration (20), and also guaranteeing access to unmasked p-values for hypotheses outside the rejection set. However, unlike AdaPT which uses definition (R2), the STAR procedure uses definition (R1), allowing it to guarantee arbitrary user-defined structural constraints on the rejected sets (in fact, these constraints can themselves be data-dependent). We refer the reader to the original works for more intuition for how interaction is enabled by masking p-values. In particular, the original authors describe many new problems for which we can control the FDR while having a human-in-the-loop, possibly gaining power due to the human’s ability to use their intuition, prior knowledge and flexible modeling capabilities. Here, we just point out that our bounds and resulting implications apply to both AdaPT and STAR. 2.4 Online testing Batch ordered testing procedures attempt to ensure that non-nulls occur early in the ordering (either using just the raw p-values like in BH, or using just prior information like in ordered testing, or using a combination of prior information, covariates and masked p-values in the case of AdaPT and STAR). In the online context, two distinct situations can arise. If the order of the hypotheses is in the experimenter’s control, then once more it is advantageous to attempt to use any available side information to have the non-nulls appear early in the ordering. However, if the entire order of hypotheses is not in the experimenter’s control, then non-nulls might not necessarily occur early, and further the rejection decision for the Hk must be made without knowing the outcomes of future experiments. Hence, in general, online multiple testing procedures must proceed differently from aforementioned batch experiments, since they may prefer not to reject most of the first k hypotheses while accepting the rest, and may not wish to test all hypotheses at a fixed level. Instead, online procedures produce a sequence of levels αj at which to test hypotheses, resulting in rejection sets of the form Rk ≡ {π(j) : j ≤ k, pπ(j) ≤ αj }. (21) 9 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 These levels αj are chosen based on the outcomes of past experiments. Foster and Stine’s alpha-investing procedure [12] and follow-up works [13, 14] are built on the analogy of testing a hypothesis at level αj as spending wealth. One pays a price to test each hypothesis, and gets rewarded for each rejected hypothesis. In particular, generalized alpha-investing (GAI) [13] is defined as follows. The procedure begins with wealth W0 ≤ α. At step j, the algorithm pays a price of ϕj to test the jth hypothesis, and gets a reward ψj if this hypothesis is rejected: Wj ≡ Wj−1 − ϕj + Rj ψj , where Rj = I(pj ≤ αj ). The rules for defining ϕj and ψj must be chosen so that Wj ≥ 0 at all times j. A particular GAI procedure called LORD [14] chooses ϕj = αj , and ψj ≤ α. Until recently, online FDR procedures were formulated without reference to an estimate of FDP. However, it d defined by was recently noted [15] that LORD implicitly keeps track of an FDP Vb (Rk ) ≡ k X αj , (22) j=1 d j ) ≤ q for all j. This places reformulating the requirement that Wj ≥ 0 for all j as the requirement that FDP(R LORD in the same framework as the batch algorithms considered in this paper. Moving beyond LORD, an adaptive algorithm called SAFFRON [16] was recently proposed, which is defined by equation (21) and Vb (Rk ) ≡ k X j=1 αj I(pπ(j) > λj ). 1 − λj (23) SAFFRON improves upon the naive estimate (22) by correcting for the proportion of nulls, making it the online analog of the Storey-BH procedure [33], or of Adaptive SeqStep (19). Like the levels αj , the constants λj may also be chosen based on the outcomes of prior experiments. Interestingly, the original alpha-investing algorithm is recovered by picking λj = αj , and the LORD estimate (22) is recovered by choosing λj = 0 (however, the SAFFRON algorithm does not reduce to the LORD algorithm when λj → 0, because for nonzero λj , SAFFRON requires λj ≥ αj for all j). Simulations [16] demonstrate that SAFFRON with constant λ = 1/2 successfully adapts to the null proportion and enjoys higher power than LORD as a result. 2.5 Tying together ordered, interactive and online testing algorithms By examining the procedures in the preceding sections, it is clear that they share many similar features. Here, we make these similarities explicit by situating all ordered, interactive, and online testing algorithms in a common framework. The first part of the framework is the definition (21) of the rejection sets, considered before in the online context. Next, we note that (R1) and (R2) are recovered as special cases of definition (21), corresponding to αk = 1 and αk = p∗ respectively. Lastly, we note that each definition of Vb can be written as Vb (Rk ) ≡ a + k X hj (pπ(j) ) (24) j=1 for some additive regularization a and some functions hj . We call hj generalized accumulation functions, because for uniform [0, 1] random variables U , they satisfy Z 1 hk (u)du = αk = Pr{U ≤ αk } . E [h(U )] = Eu∼U [0,1] [hk (u)] = (25) 0 The above property allows us to generalize all earlier constructions, which satisfy the intuitive property of hk obtained by comparing the leftmost and rightmost expressions in equation (25). Table 1 summarizes how the different ordered, interactive and online testing procedures fall into this framework. Having introduced several different classes of FDR procedures and presented them in a unified fashion, we now turn to stating our uniform FDP bounds for these procedures. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 10 Algorithm Accumulation test STAR Selective SeqStep AdaPT Adaptive SeqStep LORD SAFFRON a a ≡ supu h(u) a ≡ supu h(u) p∗ a ≡ 1−p ∗ p∗ a ≡ 1−p ∗ p∗ a ≡ 1−λ a≡0 a≡0 αk αk ≡ 1 αk ≡ 1 αk ≡ p∗ αk ≡ p∗ αk ≡ p∗ (defined via GAI) (defined via GAI) hk hk ≡ h hk ≡ h p∗ hk (pk ) ≡ 1−p I(pk > p∗ ) ∗ p∗ I(pk > p∗ ) hk (pk ) ≡ 1−p ∗ p∗ hk (pk ) ≡ 1−λ I(pk > λ) hk (pk ) ≡ αk αk hk (pk ) ≡ 1−λ I(pk > λk ) k 03.30.18 π fixed adaptive fixed adaptive fixed (stream) (stream) Table 1: Ordered, interactive and online testing algorithms. 3 Main results Before presenting our central theorems, we briefly discuss three subtle issues: additive regularization, reversal of interactive procedures, and the use of arbitrary online rules. We will return to the first issue in more detail in the next section, after presenting the main results. Regularization. As noted earlier, past work has often used some additional regularization (denoted by the additive quantity a in the definition of Vb ) to ensure exact FDR control for many of the procedures under consideration. Despite the fact that regularization is not necessary for FDR control for the other procedures—BH, LORD, and SAFFRON—the behavior of Vb is nevertheless unstable near the beginning of the path. For example, consider BH under the global null. Then, ( ) ) ( Pn FDP(Rt ) 1 j=1 I(pj ≤ t) Pr sup >x = , > x = Pr sup d nt x t∈[0,1] FDPa=0 (Rt ) t∈[0,1] as shown by Robbins in 1954 [34], which is in sharp contrast to the exponentially decaying tails that we derive below using regularization. Without regularization, we would achieve an impractical and nearly trivial h i confidence FDP(Rt ) bound of c(α) = 20 for α = 0.05. Moreover, integrating across x gives E supt∈[0,1] FDP d a=0 (Rt ) = ∞. This motivates us to consider all procedures with regularization. In fact, we will prove bounds for Vb defined in equation (24) with arbitrary a > 0, not just those dictated by Table 1. The only exception is BH, for which we will take a = 1 by default. Let BH+, LORD+, and SAFFRON+ denote the regularized counterparts of the original procedures. Specifically, note that VbBH+ (Rt ) = 1 + nt. (26) Reversal of STAR and AdaPT. As discussed in Section 2.3, STAR and AdaPT build up the ordering π from back to front, at each step choosing the least promising hypothesis to remove from the rejection set. The p-values are masked until they are removed from the rejection set, at which point they are unmasked. We find reversed versions of STAR and AdaPT more amenable to our theoretical analysis. Let rSTAR and rAdaPT be procedures analogous to STAR and AdaPT, but which build up the ordering π from front to back; i.e. π must be predictable with respect to the filtration Gkr ≡ σ({xj , g(pj )}j∈[n] , {pπ(j) }j≤k ). (27) Hence, rAdaPT and rSTAR begin with R0 = ∅, and then at each step choose the most promising hypothesis to add to the ordering. In this case, p-values are masked until they are added to the ordering, after which they are unmasked. Note the difference between the filtrations (27) and (20); the p-values are unmasked upon entering the path, rather than upon exiting the path. We do not anticipate this to change the behavior of these procedures by much at all, and neither the original nor reversed procedures will uniformly dominate each other from the perspective of power. Indeed, as discussed in the original papers, the masked p-values contain most of the information in the p-values, and the additional information obtained from unmasking a p-value is fairly incremental (to see this, Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 11 03.30.18 note that in the special case of h(pj ) = I(pj > 1/2), only a single bit per p-value is hidden at the start, and this is all that is gained by unmasking). It is unlikely that there is a major difference between a top-down (full to empty) and a bottom-up (empty to full) ordering, since the original and the reversed procedures both receive all masked p-values right at the start, and both learn one unmasked p-value per step. Arbitrary levels αk for online procedures. Whereas alpha-investing, LORD and SAFFRON each correspond to a particular prescribed set of rules that decide the levels αk , our theoretical results hold whenever αk is any predictable sequence, whether or not it was derived from any of the aforementioned online FDR algorithms. A particularly extreme example would occur when αk is set to an absolute constant for all k; such a rule will not guarantee control of the FDR, but our results will provide uniform bounds on the achieved FDP of such an online algorithm at any time. 3.1 Optional spotting theorems We first state our results for BH+, and then for ordered testing, interactive testing, and online testing. The results below are illustrated in Figure 1, which shows the FDP multipliers (with α = 0.05) from Theorems 1, 2, 3, and 4 as well as the FDR multipliers from Corollary 1. Theorem 1. (FDP multipliers; BH+). Suppose the null p-values are independent and uniformly distributed. Then, the BH+ procedure (26) satisfies statement (10) for all α ≤ 0.31, with cBH+ (α) ≡ log( α1 ) . log 1 + log( α1 ) (28) We remark that the range α ≤ 0.31 covers most practically relevant choices, but we conjecture that the bound actually holds for all α. Next, we state the bounds for ordered testing procedures. Theorem 2. (FDP multipliers; ordered testing). Suppose the null p-values are independent and superuniformly distributed, i.e. Pr{pj ≤ s} ≤ s for all j ∈ H0 and s ∈ [0, 1]. 1. Accumulation test: Given any (possibly unbounded) accumulation function h, and any additive regularization a, statement (10) holds for all α, with log( α1 ) chacc (α) ≡ a log  R 1 0 −1  . (29) αh(u)/a du Moreover, for any accumulation function bounded by B, we have log( α1 ) chacc (α) ≤ cB acc (α) ≡ a log  1− 1−αB/a B −1  . (30) For the original formulation of the accumulation test (additive regularization B, with 1 + |Rk | in the ded we have nominator of FDP),   1 log( ) 1 1 +  α  . c̃B (31) acc (α) ≡ B log B−α B−1 2. Adaptive SeqStep, Selective SeqStep: Noting that the generalized accumulation function used by Adaptive p∗ p∗ , statement (10) SeqStep is bounded by B = 1−λ , and that of Selective SeqStep is bounded by B = 1−p ∗ holds for all α, with: log( α1 )  . (32) cB (α) ≡ AS B/a a log 1 + 1−αB 12 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 When the ordering is not fixed, but is interactively determined, we have the following result. Theorem 3. (FDP multipliers; interactive setting). If the null p-values are independent of each other and of the non-null p-values, and the null p-values have nondecreasing densities, then statement (10) holds for all α with B B B cB rAdaPT (α) ≡ cAS (α) and crSTAR (α) ≡ cacc (α). The definitions of B for rAdaPT and rSTAR mimic those for Selective SeqStep and accumulation test respectively. Lastly, shifting to the online FDR setting, we derive the following guarantee. Theorem 4. (FDP multipliers; online setting). Let p1 , p2 , . . . be a stream of p-values adapted to a filtration Gk . If the null p-values are superuniformly distributed conditional on the past, meaning that Pr{pk ≤ s|Gk−1 } ≤ s for each k ∈ H0 and each s ∈ [0, 1], (33) then the bound (10) holds with the following constants: 1. LORD+. If αk is predictable with respect to Gk , then we have cLORD+ (α) ≡ log( 1 )  α 1 . log( ) a log 1 + a α 2. SAFFRON+. If αk and λk are predictable with respect to Gk , with αk ≤ λk for all k, and supk B < ∞, then we have cSAFFRON+ (α) ≡ cB AS (α). (34) αk 1−λk ≤ d and not necessarily Importantly, the names LORD+ and SAFFRON+ refer to the formulae used to calculate FDP, to the rule used to derive the sequence αk . Indeed, one can theoretically use the LORD (or any other) rule to d derive αk , but give a post hoc uniform guarantee on the achieved FDP using the SAFFRON+ formula for FDP. The following FDR multipliers can be calculated by integrating the above high-probabilty tail bounds. Corollary 1. (FDR multipliers). For each of the above procedures except BH+, the bound (11) holds with Z 1 Calg ≡ calg (α)dα. 0 R 0.31 For BH+, we instead have CBH+ = 0 cBH+ (α)dα + 0.69cBH+ (0.31). The above calculations typically yield constants smaller than 2; for example CBH+ = 1.62, CLORD+ = 1.42 for a = 1, and CAS = 1.92 for B = 2 and a = 1. See Figure 1 for more examples of FDR multipliers. Remark 1 (A connection to prior work). A bound of the kind stated in Corollary 1 was first proved by [8] for Selective SeqStep, with a = 1 and p∗ = 0.5, in the context of the multilayer knockoff filter. The goal of that work was to prove FDR control for a predefined target level q with respect to multiple hypothesis groupings; the uniform bound was necessary because the more complicated form of k ∗ in that context precluded the use of standard martingale arguments. Remark 2 (Assumptions for different procedures). The optional spotting theorems rely on slightly different assumptions on the distributions of the p-values. Note that Theorems 1 and 2 make assumptions only on the distribution (pj )j∈H0 , not requiring independence between null and non-null p-values. This is in contrast to FDR results established before [1, 9] for the corresponding procedures, which do require independence between null and non-null p-values. On the other hand, our results for ordered, interactive and online procedures result assume dependence conditions that are nearly identical to the conditions that appear in the original works. Further, note that Theorem 1 requires uniform null p-values, whereas the other theorems have looser restrictions on the distributions of null p-values. For ordered testing, we allow superuniform null p-values, an assumption that is at least as general as those made for the original methods. For the interactive methods, we assume that null p-values have an increasing density, which is the same assumption made by STAR and similar to the one made by AdaPT. Finally, our assumption of superuniformity conditional on the past for online procedures is similar to those made in previous works [12, 14, 16]. 13 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Remark 3 (The constants for BH+). In Theorem 1, we require that α ≤ 0.31. However, strong numerical evidence shows that the bound (10) is valid for BH+ with cBH+ (α) for all α. The restriction on α is an artifact of our proof and does not represent an intrinsic breaking point of the bound. Despite this limitation in our proof, the range α ≤ 0.31 comfortably includes any confidence level that would be used in practice. This limitation leads to an estimate of CBH+ = 1.62, that is slightly more conservative compared to what we observed in simulations, which suggest that in reality, CBH+ ≈ 1.35. Independently, we note that our constant being smaller than 2 seems morally related to Eq. (12) in work by Goeman et al. [35], where the authors were interested specifically in FDP-quantiles of BH (but did not derive any closed form bounds). Figure 1: FDP multipliers for α = 0.05 (red) and FDR multipliers (salmon) for each method for a = 1. Where applicable, multipliers for original regularizations shown using dashed lines. 3.2 Tightness of the bounds Here, we investigate the tightness of our bounds using numerical simulations. For all simulations, we chose n = 500. We simulated independent test statistics Xj = µj +j , where j ∼ N (0, 1), for j = 1, . . . , n, and derived p-values pj = 1 − Φ(Xj ). Here, µj = µI(j ∈ H1 ). We chose a signal strength of µ = 4; other signal strengths produced qualitatively similar figures. We simulated four sparsity settings, corresponding to |H1 | = 0, 10, 25, 50. The locations of the signals were either chosen randomly, or biased towards the beginning. For each simulation k) setting, we generated 10,000 Monte Carlo realizations of supk FDP(R . d FDP(R k) Figure 2 shows the theoretical FDP multipliers (in black) and empirical realizations (in shades of blue) for four batch procedures: BH+, accumulation test with SeqStep accumulation function (p∗ = 0.5), Selective SeqStep with p∗ = 0.5, and Adaptive SeqStep with p∗ = 0.05 and λ = 0.5. The regularization was chosen to be a = 1 for each method. We generated the signals to be biased towards the beginning, because the three ordered methods are designed with this assumption built in and for BH the order does not matter anyways. We find that across the range of sparsity settings, the bounds are fairly tight. For BH+, the bounds get looser as the number of non-nulls increases, which reflects the fact that the BH method does not correct for the non-null proportion. For relatively small non-null proportions (common in modern large-scale testing applications), this 14 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Figure 2: (Batch) The theoretically derived FDP bounds are generally tight for all four batch procedures considered. does not have a large effect. For the other three methods, the performance is not affected much by the sparsity level, because the SeqStep accumulation function and its variants are relatively insensitive to non-nulls as long as their p-values are small enough. While our bounds c(α) are smooth in all cases, we see that the Monte Carlo curves can be jagged, especially for SeqStep and Selective SeqStep. In these cases, this jaggedness reflects the d discreteness of FDP. Figure 3 shows the results of a similar simulation for the online FDR methods considered here: LORD+ and SAFFRON+. For both LORD+ and SAFFRON+, we choose αk = 0.05 for all k, and for SAFFRON+ we additionally set λk = 0.5 for all k. Again, we choose a = 1. Unlike batch ordered testing, the signals for online testing do not necessarily occur near the beginning, so in addition we considered the situation when signals are randomly located. Like BH+, we find that the bounds for LORD+ get looser as the sparsity fraction increases. While for randomly located signals the difference is not very large, for signals near the beginning we see that the LORD+ bound becomes quite conservative. This is because the “local” non-null fraction near the beginning is large even if the overall non-null fraction is not, resulting in much looser bounds. On the other hand, we find that the SAFFRON+ bounds are fairly tight across sparsity levels and signal locations. 4 Implications for existing FDR procedures and new spotting methods The optional spotting theorems allow us to view existing FDR procedures in a new light. In addition, they point the way towards a new spotting paradigm for exploratory multiple testing. In this section, we consider both of these implications of our results. 15 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Figure 3: (Online) The theoretically derived FDP bounds are generally tight, except for LORD+ when signals are near the beginning. SAFFRON+ adapts to the non-null proportion and thus does not suffer from this issue. 4.1 New FDX bounds for existing FDR procedures d k∗ ) ≤ q. As discussed in the introduction, the Batch FDR procedures choose the rejection set Rk∗ so that FDP(R optional stopping theorems immediately imply that in this setting, Pr{FDP(Rk∗ ) ≤ calg (α) · q} ≥ 1 − α. (35) Hence, existing FDR procedures also control FDX at level calg (α) · q. To our knowledge, these are the first finitesample FDX bounds for FDR procedures. Of course, the practical implications of this result depend on the multipliers calg (α). Figure 1 depicts these multipliers for regularization a = 1 at confidence α = 0.05. We see from the figure that the constants are remarkably small for BH+, SAFFRON+, and LORD+, all near 2. Hence, under independent p-values, the FDP of BH+ is at most about twice the nominal level q with probability 95%. This provides a theoretical foundation for the common knowledge that the FDP distribution of BH is tightly concentrated around its mean under independence. On the other hand, note that the multipliers are somewhat larger for accumulation test and Selective SeqStep, both being slightly larger than 4. As we discuss below, this reflects the fact that these procedures have intrinsically more variable FDP than BH. We must bear in mind that the aforementioned multipliers are obtained for regularization a = 1, which is not necessarily the same as the original regularization. For those procedures where regularization was originally employed, the corresponding multipliers are depicted in Figure 1 using dashed lines. We see from the discrepancies between the multipliers for original regularization and a = 1 that the regularization necessary for FDR control says 16 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 little about the consequences for FDX control. For BH, LORD, and SAFFRON, no regularization is necessary for FDR control, so we do not have FDP or FDR multipliers for those procedures. For Adaptive SeqStep, only a small amount of regularization is necessary, so the resulting multipliers are very large. On the other hand, accumulation tests require the most regularization for FDR control, and thus the multipliers are small. For both FDR and FDX control, regularization is especially necessary for the case when few rejections are made. Our results suggest that FDR methods with little or no regularization should be used with extreme caution (or not at all) in low-signal scenarios. On the other hand, regularization does not have a large effect on an FDR procedure if the signal is strong enough that there are many discoveries (which is anyways the case in which FDR is most applicable as an error criterion). Hence, in many cases our results are relevant even for procedures like BH defined originally with no regularization. 4.2 Quantifying FDP variability using the constants c(α) As we have observed, different FDR procedures have different FDP multipliers. For example, the multiplier for Selective SeqStep (for p∗ = 0.5) is about twice as large as the multiplier for BH+. Moreover, as demonstrated in Section 3.2, our bounds are fairly tight. Hence, examining how calg (α) behaves for different procedures can help provide insight about the intrinsic variability of FDP for these procedures. More precisely, (35) shows that calg (α) is related to the quantiles of FDP. However, especially when comparing FDP quantiles between two procedures controlling FDR at the same level (thus with roughly similar FDP means), the FDP quantiles are directly tied to FDP variability. To illustrate this, consider the case of accumulation tests. Li and Barber [9] show that any accumulation function bounded by B leads to the same FDR guarantee. However, there are many accumulation functions with the same value of B. For example, the left panel of Figure 4 shows three such functions (truncated and renormalized if necessary to have B = 2). The right panel of this figure has the corresponding FDP multipliers, and we observe that steeper accumulation functions have larger FDP multipliers. This reflects the fact that for a uniform random variable U , h(U ) is more variable if h is steeper, d since this random variable has more mass at its extremes. This translates to an increase in the variance of FDP. d Since accumulation tests stop when FDP(Rk ) ≤ q, this in turn increases FDP variance. In particular, the SeqStep accumulation function is the “steepest" among all accumulation functions with a fixed maximum B, corresponding to the fact that hSeqStep = arg max Var[h(U )]. h:h≤B Hence, the SeqStep accumulation function leads to the highest-variance accumulation test. On the other hand, Li and Barber showed that the SeqStep accumulation function also leads to the highest-power accumulation test! Indeed, they proved that the asymptotic power of an accumulation test increases as the quantity Epj ∼F1 [h(pj )] decreases, where F1 is the distribution of non-null p-values (assuming a two-groups model). Since non-null pvalues tend to be smaller, accumulation tests will be powerful to the extent that their accumulation functions put d This makes steeper accumulation functions more powerful. little mass near the origin, resulting in a smaller FDP. This demonstrates that for accumulation tests controlling FDR at a fixed level, there exists a trade-off between FDP variability and power. This is not surprising if we recall that the FDP variability in this context is a proxy for FDP quantiles. It is well known that there is a trade-off between mean FDP and power; a similar trade-off exists involving FDP quantiles, which are simply another way to measure the location of the FDP distribution. This conclusion adds more nuance to Li and Barber’s conclusion that SeqStep accumulation functions are the most powerful for a fixed FDR level. If we switch from considering the mean of the FDP to its upper quantiles, then other accumulation functions are likely to more favorably trade off FDP with power. We leave this direction of inquiry for future work. We have used accumulation tests as a case study for what insight we can glean by inspecting the bounds calg (α). The same approach can be used to make other comparisons between either different settings of the same method or between different methods. As another example of the former, note that several of the methods under consideration are indexed by a parameter B. If we inspect each of the FDP multipliers c(α) for these methods, we see that these multipliers are all increasing in B. Hence, B can be interpreted as a parameter controlling the FDP variability for a given method. In parallel to what we saw above, increasing B also has the dual effect of increasing power. Hence, choosing B involves a trade-off as well. For brevity’s sake, we do not elaborate on this in detail but encourage 17 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Figure 4: Three accumulation functions and the corresponding FDP multipliers. Note that the steeper the accumulation function, the larger the FDP multiplier. the reader to think about B in the context of accumulation tests and Adaptive SeqStep. We can also use the multipliers c(α) to make comparisons across procedures. For example, we saw that Selective SeqStep has a larger FDP multiplier than BH. This reflects the fact that Selective SeqStep relies on “one-bit p-values" I(pj > 0.5) to d This results in a coarse estimate of FDP, which we see reflected in the increased multiplier. define FDP. 4.3 “Simultaneous selective inference” via spotting Our optional spotting theorems can provide more information than just about FDP(Rk∗ ) for k ∗ defined using d k ) is a confidence envelope for the entire FDP a fixed q. Indeed, we have proved that FDP(Rk ) = c(α)FDP(R curve; recall (14). This puts our bounds into the realm of the uniform FDX literature, where many other confidence envelopes for FDP have been proposed, including [26, 27, 29, 23, 30]. Some works [26, 29, 23] directly construct bounds on the FDP of all subsets, whereas other [27] bound FDP only across a path of candidate rejection sets. The latter kind of FDP bounds can be extended to any other sets, as pointed out implicitly by GW [29] and GS [23], and explicitly by more recent work [30]. In particular, this implies that our uniform bounds on FDP(Rk ) can also be extended to uniform bounds on all subsets. Most of the existing literature on uniform bounds for FDP takes place in the unstructured setting, where hypotheses are considered in order of increasing p-values. Hence, the existing confidence envelopes are most comparable with our confidence envelope for BH+. We have found that confidence envelopes like those of [29] can be competitive with or even tighter than those we derive for BH+. We do not show these comparisons here, since it is not the goal of this work to derive the tightest possible confidence envelopes for FDP. As another point of comparison, the closest result in the online setting is that of Javanmard and Montanari (JM) [14]. JM consider a truncated version of GAI rules that satisfy a uniform FDX bound like Pr{supk FDPk ≥ γ} ≤ α. Their result is similar in spirit to our result in Theorem 4 about LORD+, but there are some subtle differences. Their results, like most other FDX bounds, are pre-hoc, meaning that given a γ, α ∈ (0, 1), their procedure produces a sequence of rejections satisfying the desired FDX guarantee. Our guarantees are post hoc, meaning that they would apply to any sequence of rejections produced by any online algorithm, that may or may not have been designed for FDR or FDP control. On the other hand, we are not currently aware of confidence envelopes that explicitly leverage side information 18 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 in the form of covariates, a priori hypothesis orderings, and so on. If this side information is informative, we expect that better confidence envelopes can be developed than those derived in the unstructured setting. From this point d k ) we derived for all procedures except BH represent the first of view, the envelopes FDP(Rk ) = c(α)FDP(R uniform FDX bounds in structured settings. We leave the uniform FDX performance of these envelopes for future work. As observed by Goeman and Solari before us, uniform bounds on FDP open up the possibility to reconcile data exploration with multiple testing, via post hoc inference. Our bounds suggest that FDR procedures themselves d Using prior information can be reinterpreted as vehicles for simultaneous inference based on the path of FDP. if applicable, the FDR procedures we analyze can be viewed as carving out a path of candidate rejection sets, d is small. We hope that from which the user can spot a set of appropriate size and content, while keeping FDP restricting the user’s attention to a smaller collection of promising candidate rejection sets (simultaneous selective inference) can keep the exploration more focused while enjoying better statistical and computational properties than simultaneous inference. In the previous section, we found trade-offs between power and FDP variability. For a procedure controlling d (lower FDP d permits more discoveries), and the FDR at a fixed target level q, the power is represented by FDP FDP variability is represented by c(α). The same trade-off is present in the confidence envelope FDP(Rk ) = d k ), where these two quantities come together. Hence, good confidence envelopes must also navigate c(α)FDP(R d the trade-off between c(α) and FDP. To investigate this phenomenon further, we conducted a numerical experiment to examine the effect of accumulation function on the FDP confidence envelope. We consider the same simulation setup as in Section 3.2, with 50 non-nulls, except we decrease the signal amplitude to µ = 2.5. The reason for this is that the differences in d are more pronounced when the signal is weaker, so there is a nontrivial trade-off between power and FDP FDP variability. To consider an extreme case, if the non-null p-values all equaled zero, then the accumulation function h(pj ) = I(pj > 0) would simultaneously maximize power and minimize FDP variability. d and FDP for three accumulation functions. In the left panel, the three paths of FDP d Figure 5: Comparing FDP d are plotted, along with the mean FDP. Flatter accumulation functions lead to larger FDP estimates. In the right d k ) are shown for the three accumulation functions, along with the pointwise FDP panel, FDP(Rk ) = c(α)FDP(R d with HingeExp providing the best FDP curve. quantiles. We see the nontrivial trade-off between c(α) and FDP, In Figure 5, we compare the SeqStep, HingeExp, and ForwardStop accumulation functions. The first panel d curves, averaged over 10,000 simulations. For comparison, the black curve is the average true depicts the FDP 19 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 d then HingeExp in a close second, FDP. As expected, the SeqStep accumulation function leads to the smallest FDP, d and then ForwardStop has the largest FDP. This trend reflects how steep each accumulation function is. The second d k ). As a reference, the black curve represents the pointwise 1−α panel shows the average FDP bounds c(α)FDP(R d but the largest c(α), quantiles for the true FDP. Here, we see the trade-off in action. SeqStep has the smallest FDP and as a result leads to the worst FDP bound. ForwardStop and HingeExp both give better bounds than SeqStep, with HingeExp being a little better over the most interesting range of k, around 25-50. Hence, HingeExp strikes the best balance between power and FDP variability. 5 5.1 Implications beyond standard multiple testing From multiple testing to model selection All of the results presented here have been formulated in the multiple testing context, where we have p-values available for a set of hypotheses. However, these results also apply to model selection and variable selection contexts as well. In particular, G’Sell et. al. [4] proposed the ForwardStop accumulation function as a means to the end of model selection with FDR control. Using selective inference techniques, valid p-values may be obtained at each step of forward step-wise regression, and thus an accumulation test may be applied to select a model. As another example, the knockoff filter [5] is a recent proposal for FDR control in the variable selection context. Their idea is to create a knockoff variable for each original variable, and then use these knockoffs as controls for the originals. Instead of p-values, the knockoff filter produces knockoff statistics Wj for each variable j. However, the methodology is based on the fact that sign(Wj ) are independent fair coin flips for null j, in effect producing a set of “one-bit p-values”. Then, Selective SeqStep with p∗ = 0.5 may be applied to these one-bit p-values to select a set of variables with FDR control. Hence, our uniform FDX bounds apply to the knockoff filter as well. It is interesting to note that the knockoff filter has been observed to produce somewhat highly variable results, due to the coarse nature of one-bit p-values. We encountered this phenomenon in our theoretical results, since the FDP multiplier c(α) for Selective SeqStep was one of the largest among the procedures considered. 5.2 Extensions to the multilayer setting using the p-filter An intermediate statistical guarantee between FDR control and uniform FDX control is multilayer FDR control, introduced by Barber and Ramdas [6]. This criterion applies when the rejected set R will be interpreted according to multiple groupings (or layers) that are specified in advance. For example, these authors consider an application to neuroscience, in which the hypotheses are indexed by brain location and by time. Then, specific voxels discovered to be activated at specific times may be interpreted by grouping by time (finding voxels activated at any time during the experiment) or by location (finding times at which any voxels were active). Multilayer FDR control is the requirement that FDRm ≤ qm for each layer m, where qm are pre-specified FDR target levels. Barber and Ramdas proposed the p-filter methodology, where p-value thresholds at each layer are chosen such that an estimate of FDP at each layer m is below the target threshold qm , with extensions [7] proposed to handle weights, adaptivty, overlapping or incomplete groups, etc. Porting the p-filter into the variable selection setting, Katsevich and Sabatti introduce the multilayer knockoff filter [8], which allows (group) knockoff statistics to be used at each layer instead of p-values. The proof of the multilayer knockoff filter proceeds by decoupling the layers from each other via supremum bounds like inequality (11), which was proved for Selective SeqStep and conjectured for BH+. However, the purpose of these bounds was, like in most classical settings, as a tool to guarantee FDR control of the underlying procedure. In this paper, we prove the conjecture for BH+, extend our proof technique to a multitude of other procedures and settings, provide the post hoc spotting interpretation of these bounds in terms of uniform guarantees on the FDP, and more. Now that our paper derives such supremum bounds for a much larger variety of procedures, we note that one may use the same p-filter framework to arbitrarily “stack" any of these FDR procedures at different layers (meaning that we could apply a different procedure at each layer) while maintaining multilayer FDR control. 20 6 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Future work: the effect of correlation Note that all of the results in this paper have assumed independence of p-values in one form or another. Many of the procedures considered here also only have guarantees under independence, though BH is a notable exception. Aside from online testing applications, independent p-values are hard to come by in practice, so more robust guarantees are necessary. BH is known to control FDR under the PRDS criterion [2], a form of positive dependence that contains no information about the strength of the dependence. Indeed, a set of p-values that are all equal to each other almost surely satisfy the PRDS condition. However, it is known that while the mean of FDP might not change much as dependence increases, the variance of the FDP will increase [36, 37]. Hence, high-probability bounds on FDP under dependence are likely to use criteria other than PRDS to capture this dependence. Figure 6: FDP multipliers under local correlation are displayed for several algorithms. For all subplots, negative correlation does not seem to hurt, but strong positive correlations violate our theoretical bounds. As a first step in this direction, Figure 6 shows the result of numerical simulations under AR(1) dependence for the six procedures considered before, all with a = 1. These curves all correspond to the global null case, which leads to the largest FDP multipliers. As we vary the correlation parameter ρ from −0.9 to 0.9, we can see how the empirical quantiles change. We observe that higher correlations lead to larger FDP quantiles, as expected, but under moderate correlations these quantiles are still below or at least near the theoretical bounds under independence. Figure 7 shows how the expectation bounds change with ρ. Interestingly, for all methods besides Selective SeqStep and accumulation test, the FDR multipliers are U-shaped, whereas for the two aforementioned methods, the empirical quantiles are monotonically increasing in ρ. The bounds for BH+ and LORD+ are remarkably robust to local correlation, whereas the other bounds grow somewhat more rapidly for large ρ. Investigating theoretically how our bounds change under correlation (and how to precisely quantify correlation) is left for future work. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 21 03.30.18 Figure 7: FDR bounds under local correlation are displayed for several algorithms. Most procedures seem less affected by negative correlation than by strong positive correlations. Crosses indicate multipliers for ρ = 0, the case with independent p-values as considered in the theorems of this paper. 7 Proofs of the four optional spotting theorems The method we employ to obtain all our FDP multipliers is to investigate the properties of the stochastic process FDP(Rk ). Below, we prove the optional spotting theorems; the proof of Corollary 1 will follow from the fact that the expectation of a random variable is the integral of its quantile function. We start with the BH+ procedure, for which we must proceed differently since the hypotheses are ordered according to the p-values, while for all other d settings, the hypothesis order is either pre-specified or is in some sense “orthogonal” to FDP. 7.1 FDP multipliers for BH+ Proof of Theorem 1. Let Vt ≡ ( P FDP(Rk ) Pr sup ≥x d k) k FDP(R j∈H0 ) I(pj ≤ t). Then, for any fixed x > 1 we have ( Vt = Pr sup ≥x 1 + nt t∈[0,1] ) = Pr{Vt ≥ x + xnt, for some t ∈ [0, 1]} . (36) Hence, the quantity of interest is the probability that the stochastic process Vt hits the linear boundary x + xnt. This event is illustrated in Figure 8. 22 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 Figure 8: Stochastic process view of (36), with the solid black line representing Vt , the dashed red line representing the linear boundary x + xnt, and the dashed black line being the diagonal that emphasizes our knowledge that V (0) = 0 and V (1) = n. Since the null p-values were assumed to be independent and uniformly distributed, we deduce that the distribution of Vt is that of an unscaled empirical process for n0 = |H0 | uniform random variables. If we were to replace Vt by the unscaled empirical process of n ≥ n0 uniform random variables, denoted Vt0 , it can only increase the probability in equation (36). However, it is somewhat difficult to obtain non-asymptotic bounds for hitting probabilities of empirical processes like Vt0 . Instead, we claim that for x ≥ 1.5, replacing Vt0 with a rate n Poisson process Nt only further increases the hitting probability: Pn i.i.d. Lemma 1. Let Vt0 ≡ j=1 I(pj ≤ t) for pj ∼ U [0, 1]. Let Nt be a rate n Poisson process. Then, for x ≥ 1.5, Pr{Vt0 ≥ x + xnt, for some t ∈ [0, 1]} ≤ Pr{Nt ≥ x + xnt, for some t ∈ [0, 1]} . (37) d See the appendix for the proof of this lemma. To understand why the lemma holds, note that Vt0 = Nt |N1 = n; i.e. the distribution of the empirical process is the same as that of the Poisson process, conditioned on observing exactly n events at time t = 1. Hence, Lemma 1 states that for sufficiently large x, a Poisson process is less likely to hit the line t 7→ x + xnt if we know that it is equal to its mean at time t = 1. This makes intuitive sense because the process needs to be far above its mean to hit this line for large x, which is less likely to happen if it must be equal to its mean at time t = 1. Now, we may use the martingale properties of Poisson processes to bound the probability a Poisson process hits a linear boundary: Lemma 2 ([8]). If Nt is a rate n Poisson process, then for any x > 1, we have Pr{Nt ≥ x + xnt for some t ∈ [0, 1]} ≤ exp(−xθx ), where θx is the unique positive root of the equation eθ = 1 + θx. (38) Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 23 03.30.18 To complete the derivation of the FDP multiplier for BH+, suppose we choose x such that α = exp(−xθx ). Then, plugging this choice of x into the definition of θx implies that x= − log α − log α − log α = = = cBH+ (α), θx log(1 + θx x) log(1 − log α) (39) which proves the bound (28). Hence, statement (10) holds for all α corresponding to x ≥ 1.5, which translates to holding for all α ≤ 0.31, since cBH+ (0.31) = 1.5. 7.2 An exponential tail inequality lemma The optional spotting theorems for each of the ordered, interactive and online testing procedures will be derived in the next subsection, as consequences of the following lemma. Lemma 3. Consider an ordered testing procedure (batch or online), as described in Section 2.5. Suppose there exists a filtration Fk ⊇ σ(H0 , {π(j)}j≤k , {pπ(j) , αj }j≤k,π(j)∈H0 ). (40) such that for all π(k) ∈ H0 , we have    Pr pπ(k) ≤ αk Fk−1 ≤ αk and E hk (pπ(k) ) Fk−1 ≥ αk almost surely. (41) Then, for each x > 1, ( FDP(Rk ) Pr sup ≥x d k) k FDP(R ) ≤ exp(−aθx x), (42) where θx is defined in the following four cases: 1. If hk = h for some accumulation function h, αk = 1, π(k) is pre-specified (i.e. nonrandom), and pπ(k) ⊥ ⊥ Fk−1 for all π(k) ∈ H0 , then θx is the unique positive root of the equation Z 1 exp(−θxh(u))du = exp(−θ). (43) 0 2. If hk = h for some accumulation function h bounded by B and αk = 1, then θx is the unique positive root of the equation 1 − exp(−θxB) = 1. (44) exp(−θ) + B 3. If hk (p) = 0 for all p ≤ αk , and hk (p) ≤ B for all k, p, then θx is the unique positive root of the equation exp(θ) − 1 − exp(−θxB) = 1. B (45) 4. If hk (pk ) = αk , then θx is the unique positive root of equation (38). Proof. Fix any arbitrary x > 1 and θ > 0. Since we make no assumptions whatsoever on the non-null p-values, we first restrict our attention to only the nulls as follows: ( ) ( ) FDP(Rk ) V (Rk ) Pr sup ≥ x = Pr sup ≥x b (Rk ) d k) k FDP(R k V   k k X  X = Pr I(pπ(j) ≤ αj )I(π(j) ∈ H0 ) ≥ ax + x hj (pπ(j) ), for some k   j=1 j=1   k k X  X ≤ Pr I(pπ(j) ≤ αj )I(π(j) ∈ H0 ) ≥ ax + x hj (pπ(j) )I(π(j) ∈ H0 ), for some k .   j=1 j=1 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 24 03.30.18 Now, we may rearrange terms and employ the Chernoff exponentiation trick, to conclude that:      ( ) k   X FDP(Rk ) Pr sup ≥ x = Pr sup exp θ  [I(pπ(j) ≤ αj ) − xhj (pπ(j) )]I(π(j) ∈ H0 ) ≥ exp(aθx) d k)  k  k FDP(R j=1   ≡ Pr sup Zk ≥ exp(aθx) . k We claim that if θ = θx , then Zk is a supermartingale with respect to Fk . Note that this supermartingale and filtration is unrelated to the supermartingale Mk and filtration Ωk mentioned in the introduction of this paper that are typically used to prove FDR control for these procedures (indeed, Zk , Fk are forward supermartingales and filtrations, while Mk , Ωk are backwards supermartingales and filtrations). If Zk is indeed a supermartingale as claimed, then the conclusion of the lemma would follow from the maximal inequality for positive supermartingales:   Pr sup Zk ≥ exp(aθx) ≤ exp(−aθx)E [Z0 ] = exp(−aθx), (46) k as desired. Hence the rest of this proof will focus on showing the supermartingale property of Zk . Note first of all that Zk is adapted to Fk by assumption (40). Hence, it suffices to show that      Zk Fk−1 = E exp [θ(I(pπ(k) ≤ αk ) − xhk (pπ(k) ))]I(π(k) ∈ H0 ) Fk−1 ≤ 1. E Zk−1 Clearly, this inequality holds for any k such that π(k) 6∈ H0 . For k such that π(k) ∈ H0 , we find that    E exp θ(I(pπ(k) ≤ αk ) − xhk (pπ(k) )) Fk−1    = E I(pπ(k) ≤ αk ) exp θ(1 − xhk (pπ(k) )) Fk−1    + E I(pπ(k) > αk ) exp −θxhk (pπ(k) )) Fk−1 . (47) To show that the above quantity is at most one, we consider the four cases defined in the statement of the lemma. Case 1: Since αk = 1, the second term of equation (47) equals zero. Since hk = h, π(k) is fixed, and pπ(k) ⊥ ⊥ Fk−1 , the first term simplifies to       E exp θx (1 − xh(pπ(k) )) Fk−1 = E exp θx (1 − xh(pπ(k) )) ≤ exp(θx )EU ∼U [0,1] [exp(−θx xh(U ))] = 1, The inequality holds because pπ(k) is superuniformly distributed by assumption and u 7→ exp(−θx xh(u)) is a nonincreasing function (since h is nondecreasing by definition), and the last step holds because θx satisfies equation (43) by definition. Case 2: Again, the second term of equation (47) equals zero because αk = 1. We may bound the first term as:      1 − exp(−θx xB) E exp θx (1 − xh(pπ(k) )) Fk−1 ≤ exp(θx )E 1 − h(pπ(k) ) Fk−1 B   1 − exp(−θx xB) ≤ exp(θx ) 1 − B = 1. In the first line, we used the fact that hk (pπ(k) ) = h(pπ(k) ) ≤ B, and we bounded the convex function z 7→ 1−exp(−θx xB) exp(−θ z. In the second step, we used the assumption x xz) on [0,B] with the line z 7→ 1 − B  E h(pπ(k) ) Fk−1 ≥ αk = 1, and in the third line we used the definition of θx . Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 25 03.30.18 Because hk (p)I(p ≤ αk ) = 0, the first term of equation (47) simplifies to     E I(pπ(k) ≤ αk ) exp θx (1 − xhk (pπ(k) )) Fk−1 = exp(θx )Pr pπ(k) ≤ αk Fk−1 . Case 3: To bound the second term, we write    E I(pπ(k) > αk ) exp −θx xhk (pπ(k) )) Fk−1     1 − exp(−θx xB) Fk−1 ≤ E I(pπ(k) > αk ) 1 − hk (pπ(k) ) B   1 − exp(−θx xB)  = Pr pπ(k) > αk Fk−1 − E hk (pπ(k) )I(pπ(k) > αk ) Fk−1 B   1 − exp(−θx xB)  = Pr pπ(k) > αk Fk−1 − E hk (pπ(k) ) Fk−1 B  1 − exp(−θx xB) αk . ≤ Pr pπ(k) > αk Fk−1 − B The inequality in the second line follows from the same convexity argument as in Case 2, the fourth  line is a consequence of the fact that hk (p)I(p ≤ αk ) = 0, and the last line follows from E hk (pπ(k) ) Fk−1 ≥ αk . Combining the results of the previous two equations, we obtain that       E I(pπ(k) ≤ αk ) exp θx (1 − xhk (pπ(k) )) Fk−1 + E I(pπ(k) > αk ) exp −θx xhk (pπ(k) )) Fk−1   1 − exp(−θx xB) ≤ exp(θx )Pr pπ(k) ≤ αk Fk−1 + Pr pπ(k) > αk Fk−1 − αk B  1 − exp(−θx xB) = (exp(θx ) − 1)Pr pπ(k) ≤ αk Fk−1 + 1 − αk B 1 − exp(−θx xB) αk ≤ (exp(θx ) − 1)αk + 1 − B   1 − exp(−θx xB) = αk exp(θx ) − 1 − +1 B = 1. The inequality in the fourth line follows from the first part of assumption (41), and the last equality follows from the definition of θx . Case 4: Since hk (p) = αk , equation (47) simplifies to:   exp(θx (1 − xαk ))Pr pπ(k) ≤ αk Fk−1 + exp(−θx xαk )Pr pπ(k) > αk Fk−1  = exp(−θx xαk )((exp(θx ) − 1)Pr pπ(k) ≤ αk Fk−1 + 1) ≤ exp(−θx xαk )((exp(θx ) − 1)αk + 1). Noting that θx satisfies (38), we see that the above expression can be bounded by one: exp(−θx xαk ) (θx xαk + 1) ≤ 1, as desired, where the inequality follows because the function z 7→ e−z (z + 1) is decreasing and takes the value 1 at z = 0. 7.3 Proofs of Theorems 2, 3, and 4 Now, we may derive Theorems 2, 3, and 4 as corollaries of Lemma 3. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 26 03.30.18 Proof of Theorem 2. For all ordered procedures, the ordering π is pre-specified, so we may assume without loss of generality that π(j) = j. First we note that the filtration Fk = σ(H0 , {pj }j≤k,j∈H0 ) (48) satisfies the required condition (40). Next, we consider accumulation tests and Adaptive SeqStep separately. Since Selective SeqStep is a special case of Adaptive SeqStep, the corresponding bound will follow. 1. Accumulation test: For any k ∈ H0 , since αk = 1, the first part of the requirement (41) is trivially satisfied. To show the second part, we use the independence assumption in Theorem 2 and the assumed superuniformity of null p-values to derive Z 1 E [hk (pk ) | Fk−1 ] = E [h(pk )] ≥ EU ∼U [0,1] [h(U )] = h(u)du = 1 = αk . 0 The inequality follows because pk is superuniform and h is nondecreasing. Hence, the assumptions of Lemma 3, case 1 are satisfied. Hence, the bound (42) holds with θx satisfying equation (43). In order to prove the bound (29), we simply note that for any α ∈ (0, 1), we may choose x such that exp(−aθx x) = α, from which it follows that x= log α log α − log α = = = chacc (α), R1 R1 aθx a log 0 exp(−θx xh(u))du a log 0 αh(u)/a du as desired. If the accumulation function is bounded by B, then the assumptions of Lemma 3, case 2 are also satisfied, so the bound (42) holds with θx satisfying equation (44). In order to prove the bound (30), we note that for any α ∈ (0, 1), we may choose x such that exp(−aθx x) = α, from which it follows that x= log α log α − log α  =   = cB = acc (α), 1−exp(−θx xB) 1−αB/a aθx a log 1 − a log 1 − B B as desired. The proof of bound (31) is similar to that of (30), so we omit it here for brevity. 2. Adaptive SeqStep: We claim that the assumptions of Lemma 3 are satisfied with Fk defined as in equation (48). Indeed, fix k ∈ H0 . Then, the assumed superuniformity of null p-values implies that Pr{pk ≤ αk | Fk−1 } = Pr{pk ≤ p∗ } ≤ p∗ = αk and   p∗ E [hk (pk ) | Fk−1 ] = E I(p > λ) ≥ p∗ = αk . 1−λ Hence, by case 3 of Lemma 3, it follows that (42) holds for θx satisfying (45). For fixed α ∈ (0, 1), define x such that exp(−aθx x) = α. Then, x= − log α − log α − log α  =   = cB = AS (α), 1−exp(−θ xB) 1−αB/a x aθx a log 1 + a log 1 + B B which proves the bound (32). Proof of Theorem 3. This proof is similar to that of Theorem 2, exception the filtrations must be somewhat more complicated to accommodate the interactivity of rAdaPT and rSTAR. For both of these procedures, define the filtration Fk = σ(H0 , {xj , g(pj )}j∈[n] , {pπ(j) }j≤k ). Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 27 03.30.18 Since π is predictable with respect to the filtration Gkr (27) by the definition of rSTAR and Fk ⊃ Grk , it follows that π is also predictable with respect to Fk . Hence, requirement (40) holds for Fk as defined above. Now, let π(k) ∈ H0 . For rAdaPT, the first part of condition (41) holds because     Pr pπ(k) ≤ αk Fk−1 = E Pr pπ(k) ≤ p∗ g(pπ(k) ), π(k) π(k) ≤ PrU ∼U [0,1] {U ≤ p∗ | g(U )} = p∗ = αk . The first equality follows from the independence assumption on the p-values, the first inequality follows from the predictability of π(k) and from the assumption that the null p-values have increasing densities (see the proof of [11, Proposition 1]). Similarly,       p∗ E hk (pπ(k) ) Fk−1 = E E I(pπ(k) > p∗ ) g(pπ(k) ), π(k) π(k) 1 − p∗ p∗ ≥ PrU ∼U [0,1] {U > p∗ | g(U )} = p∗ = αk . 1 − p∗ For rSTAR, the first part of condition (41) is trivially satisfied. To derive the second part, we write       E hk (pπ(k) ) Fk−1 = E E h(pπ(k) ) g(pπ(k) ), π(k) π(k) ≥ EU ∼U [0,1] [h(U )|g(U )] = 1 = αk . The justification for this derivation is similar to that for rAdaPT, noting in addition that EU ∼U [0,1] [h(U )|g(U )] = 1 by construction. Having established that the assumptions of Lemma 3 are satisfied for rAdaPT and rSTAR, the rest of the proof is as in the proof of Theorem 2. Proof of Theorem 4. Let Gk be the filtration defined in the statement of Theorem 4. Define Fk ≡ σ(Gk , H0 ). (49) Then, assumption (40) holds for LORD+ and SAFFRON+ because pk are adapted to Fk and αk are predictable with respect to Fk by assumption. The first part of (41) holds for both online procedures considered by assumption (33). For LORD+, the second part holds because hk (pk ) = αk . For SAFFRON+, the second part holds because for k ∈ H0 ,   αk E [hk (pk ) | Fk−1 ] = E I(pk > λk ) Fk−1 ≤ αk , 1 − λk where the last step follows from the predictability of αk and λk and the assumption (33). Hence, LORD+ and SAFFRON+ satisfy the assumptions of Lemma 3. The remainder of the proof corresponds exactly to analogous parts of the earlier proofs described for BH+ and Adaptive SeqStep, respectively. 8 Conclusion We have shown in this paper that under independence, for a variety of procedures in the literature, the estimated d (or a minor variant thereof) actually bounds the unknown FDP not just on average for the rejected set, but also FDP up to a small constant factor with high probability over the entire path of rejected sets proposed by each procedure. This nontrivial and somewhat surprising result gives new guarantees for old procedures and sheds light on their performance in terms of FDX. In particular, we can interpret c(α) as quantitative reflections of the variability in FDP because our bounds are fairly tight. For example, our results support the empirical observations that BH has a tight FDP distribution under independence, while echoing the fact that knockoff filter (i.e. Selective SeqStep) can suffer from high FDP variance. In addition, our bounds have produced new insights into how the behavior of accumulation tests’ FDP depends on the accumulation function. The FDP and FDR multipliers are only one d By investigating this half of the story, since decreasing these multipliers comes at a cost of increasing FDP. trade-off, we have added nuance to Li and Barber’s [9] conclusion that the SeqStep accumulation function has the highest asymptotic power by pointing out that it also has the highest-variance FDP, and hence that other choices of accumulation function might better navigate this trade-off. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 28 03.30.18 In addition to helping us understand existing FDR procedures, our results also open up a new perspective on these procedures as tools for “simultaneous selective inference”. Instead of picking a single rejected set out of 2n , we can use the same machinery to computationally-efficiently carve out a path of n + 1 rejected sets based d for each of them, along with a uniform on structural constraints or prior knowledge, provide an estimated FDP confidence band for the unknown FDP, and allow the user to choose one or more rejection sets in hindsight, providing simultaneous guarantees over all such rejection sets. Exploring such bounds and trade-offs is an important direction, since we believe that control of the FDP is as important or more so than control of the FDR. Procedures with FDX control provide more interpretable guarantees in practice, and those with uniform FDX control may pave the way to a new exploratory paradigm of multiple testing à la Goeman and Solari. Finally, the proof technique we developed in this paper is versatile enough to cover a large portion of the currently available FDR procedures. Like Genovese and Wasserman [28], we employ a stochastic process approach to analyze the FDP. However, while GW’s bounds are asymptotic, we have used martingale arguments instead to obtain tight, non-asymptotic bounds. Perhaps these proof techniques may be extended further to apply to other multiple testing scenarios as well. 9 Acknowledgements E.K. would like to thank Chiara Sabatti for her generous and valuable feedback on this work and on the manuscript itself. E.K. also thanks David Siegmund, Emmanuel Candes, Anya Katsevich, and Michael Sklar for helpful discussions. E.K.’s work was supported by the Fannie and John Hertz Foundation. A.R. acknowledges several fruitful conversations and email exchanges with Ohad Feldheim, Jim Pitman and Jon Wellner. Both authors are also grateful to the organizers of the MCP 2017 conference, where this collaboration began. References [1] Y. Benjamini and Y. Hochberg. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 57(1):289–300, 1995. [2] Y. Benjamini and D. Yekutieli. The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics, 29(4):1165–1188, 2001. [3] E. Arias-Castro and S. Chen. Distribution-free multiple testing. Electronic Journal of Statistics, 11(1):1983– 2001, 2017. [4] M. G. G’Sell, S. Wager, A. Chouldechova, and R. Tibshirani. Sequential selection procedures and false discovery rate control. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 78(2):423– 444, 2016. [5] R. F. Barber, E. J. Candès, et al. Controlling the false discovery rate via knockoffs. The Annals of Statistics, 43(5):2055–2085, 2015. [6] R. F. Barber and A. Ramdas. The p-filter: multilayer false discovery rate control for grouped hypotheses. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 2016. [7] A. Ramdas, R. F. Barber, M. J. Wainwright, and M. I. Jordan. A unified treatment of multiple testing with prior knowledge. arXiv preprint arXiv:1703.06222, 2017. [8] E. Katsevich and C. Sabatti. Multilayer knockoff filter: Controlled variable selection at multiple resolutions. arXiv preprint arXiv:1706.09375, 2017. [9] A. Li and R. F. Barber. Accumulation tests for FDR control in ordered hypothesis testing. Journal of the American Statistical Association, pages 1–13, 2017. 29 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 03.30.18 [10] L. Lei and W. Fithian. AdaPT: An interactive procedure for multiple testing with side information. arXiv preprint arXiv:1609.06035, 2016. [11] L. Lei, A. Ramdas, and W. Fithian. STAR: A general interactive framework for FDR control under structural constraints. arXiv preprint arXiv:1710.02776, 2017. [12] D. P. Foster and R. A. Stine. α-investing: a procedure for sequential control of expected false discoveries. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(2):429–444, 2008. [13] E. Aharoni and S. Rosset. Generalized α-investing: definitions, optimality results and application to public databases. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(4):771–794, 2014. [14] A. Javanmard and A. Montanari. Online rules for control of false discovery rate and false discovery exceedance. The Annals of Statistics, 2017. [15] A. Ramdas, F. Yang, M. J. Wainwright, and M. I. Jordan. Online control of the false discovery rate with decaying memory. In Advances In Neural Information Processing Systems, 2017. [16] A. Ramdas, T. Zrnic, M. J. Wainwright, and M. I. Jordan. SAFFRON: an adaptive algorithm for online control of the false discovery rate. arXiv preprint arXiv:1802.09098, 2018. [17] E. L. Korn, J. F. Troendle, L. M. McShane, and R. Simon. Controlling the number of false discoveries: application to high-dimensional genomic data. Journal of Statistical Planning and Inference, 124(2):379– 398, 2004. [18] E. L. Lehmann and J. Romano. Generalizations of the familywise error rate. The Annals of Statistics, pages 1138–1154, 2005. [19] J. Romano and A. Shaikh. On stepdown control of the false discovery proportion. In Optimality, pages 33–50. Institute of Mathematical Statistics, 2006. [20] J. P. Romano and M. Wolf. Control of generalized error rates in multiple testing. The Annals of Statistics, pages 1378–1408, 2007. [21] W. Guo, L. He, and S. K. Sarkar. Further results on controlling the false discovery proportion. The Annals of Statistics, 42(3):1070–1101, 2014. [22] S. Delattre and E. Roquain. New procedures controlling the false discovery proportion via Romano-Wolf’s heuristic. The Annals of Statistics, 43(3):1141–1177, 2015. [23] J. Goeman and A. Solari. Multiple testing for exploratory research. Statistical Science, pages 584–597, 2011. [24] J. F. Troendle. Stepwise normal theory multiple test procedures controlling the false discovery rate. Journal of Statistical Planning and Inference, 84(1-2):139–158, 2000. [25] H. Finner and M. Roters. On the false discovery rate and expected type I errors. Biometrical Journal, 43(8):985–1005, 2001. [26] M. J. van der Laan, S. Dudoit, and K. S. Pollard. Multiple testing. Part III. Procedures for control of the generalized family-wise error rate and proportion of false positives. 2004. [27] N. Meinshausen. False discovery control for multiple tests of association under general dependence. Scandinavian Journal of Statistics, 33(2):227–237, 2006. [28] C. Genovese and L. Wasserman. A stochastic process approach to false discovery control. The Annals of Statistics, pages 1035–1061, 2004. [29] C. R. Genovese and L. Wasserman. Exceedance control of the false discovery proportion. Journal of the American Statistical Association, 101(476):1408–1417, 2006. Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 30 03.30.18 [30] G. Blanchard, P. Neuvial, and E. Roquain. Post hoc inference via joint family-wise error rate control. arXiv preprint arXiv:1703.02307, 2017. [31] L. Lei and W. Fithian. Power of ordered hypothesis testing. In International Conference on Machine Learning, pages 2924–2932, 2016. [32] W. Fithian, D. Sun, and J. Taylor. Optimal inference after model selection. arXiv preprint arXiv:1410.2597, 2014. [33] J. Storey, J. Taylor, and D. Siegmund. Strong control, conservative point estimation and simultaneous conservative consistency of false discovery rates: a unified approach. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 66(1):187–205, 2004. [34] H. Robbins. A one-sided confidence interval for an unknown distribution function. In Annals of Mathematical Statistics, volume 25, pages 409–409, 1954. [35] J. Goeman, R. Meijer, T. Krebs, and A. Solari. Simultaneous control of all false discovery proportions in large-scale multiple hypothesis testing. arXiv preprint arXiv:1611.06739, 2016. [36] A. B. Owen. Variance of the number of false discoveries. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(3):411–426, 2005. [37] B. Efron. Large-scale inference, volume 1 of Institute of Mathematical Statistics (IMS) Monographs. Cambridge University Press, Cambridge, 2010. Empirical Bayes methods for estimation, testing, and prediction. [38] G. D. Anderson, R. W. Barnard, K. C. Richards, M. K. Vamanamurthy, and M. Vuorinen. Inequalities for zero-balanced hypergeometric functions. Transactions of the American Mathematical Society, pages 1713– 1723, 1995. A Technical lemmas: From empirical to Poisson processes Lemma 4. Let {Nt }t≥0 be a Poisson process with rate n. For x ≥ 1.5, # " # " Nt Nt ≥ x N1 = n ≤ P sup ≥x . P sup t∈[0,1] 1 + nt t∈[0,1] 1 + nt (50) Proof. Let us define  τ = inf t :  Nt ≥x . 1 + nt We claim that it suffices to show that for x ≥ 1.5, P[N1 = n|τ ] ≤ P[N1 = n] for all τ ≥ 0. Indeed, it would then follow that " # Nt P sup ≥ x N1 = n = P [τ ≤ 1|N1 = n] t∈[0,1] 1 + nt P[τ ≤ 1]P[N1 = n|τ ≤ 1] P[N1 = n] ≤ P[τ ≤ 1] " # Nt = P sup ≥x . t∈[0,1] 1 + nt = (51) Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 31 Note that for a given x, x(1 + nt) > n for t > only consider 1 x − n1 . Hence, statement (51) is trivial for τ > τ≤ 03.30.18 1 x − n1 , so we need 1 1 − . x n Define f (λ, y) = e−λ λy . Γ(y + 1) (52) (53) This function f : [0, ∞) → R is equal to the probability mass function of the Poisson with parameter λ when y ∈ {0, 1, 2, . . . }. We have P[N1 = n|τ ] = P[N1 = n|Nτ = dx(1 + nτ )e] = P[N1−τ = n − dx(1 + nτ )e] = f (n(1 − τ ), n − dx(1 + nτ )e) (54) ≤ f (n(1 − τ ), n − x(1 + nτ )) ≡ g(τ, x). The inequality follows by Lemma 6 because n − x(1 + nτ ) ≤ n(1 − τ ) − x ≤ n(1 − τ ) − 1.5. Define   (n(1 − τ ))n−x(1+nτ ) h(τ, x) = log g(τ, x) = log exp(−n(1 − τ )) Γ(1 + n − x(1 + nτ )) (55) = −n(1 − τ ) + (n − x(1 + nτ )) log(n(1 − τ )) − log Γ(1 + n − x(1 + nτ )). Note that ∂ n − x(1 + nτ ) h(τ, x) = n − xn log(n(1 − τ )) − + xnψ(1 + n − x(1 + nτ )) ∂τ 1−τ   1 n − x(1 + nτ ) + xn log(1.5 + n − x(1 + nτ )) − ≤ n − xn log(n(1 − τ )) − 1−τ 1.5 + n − x(1 + nτ ) ≡ r(τ, x). (56) The inequality follows by Lemma 5. To prove the inequality (51), it suffices to show that (a) g(0, x) ≤ P[N1 = n] for all x ≥ 1.5; (b) r(τ, 1.5) ≤ 0 for each τ ≤ (c) ∂ ∂x r(τ, 1.5) 1 1.5 ≤ 0 for each τ ≤ − n1 ; 1 1.5 − n1 ; (d) r(τ, x) is concave in x for each τ . 1 Indeed, note that (c) and (d) imply that for each τ ≤ 1.5 − n1 , r(τ, x) is a decreasing function of x for x ≥ 1.5. Hence, for each x ≥ 1.5 and each τ , we have r(τ, x) ≤ r(τ, 1.5) ≤ 0, where the last inequality follows from (b). Hence, by inequality (56), ∂h ∂τ (τ, x) ≤ r(τ, x) ≤ 0 for each x ≥ 1.5. This means that h(τ, x) is decreasing in τ for each x ≥ 1.5, so g(τ, x) is decreasing in τ for each x ≥ 1.5, from which it follows that g(τ, x) ≤ g(0, x) ≤ P[N1 = n], where the last inequality follows by (a). Proof of (a). We have g(0, x) = f (n, n − x) ≤ f (n, n − 1) = f (n, n) = P[N1 = n]. where the inequality follows by Lemma 6 and the equality f (n − 1, n) = f (n, n) holds because f (n, n − 1) = f (n, n) nn−1 Γ(n) nn Γ(n+1) = Γ(n + 1) = 1. nΓ(n) Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 32 03.30.18 Proof of (b). We have n − 1.5(1 + nτ ) r(τ, 1.5) = n − 1.5n log(n(1 − τ )) − 1−τ   1 + 1.5n log(1.5 + n − 1.5(1 + nτ )) − 1.5 + n − 1.5(1 + nτ )   n − nτ − 1.5 − 0.5nτ 1 = n − 1.5n log(n(1 − τ )) − + 1.5n log(n(1 − 1.5τ )) − 1−τ n(1 − 1.5τ )   1 − 1.5τ 1.5 + 0.5nτ 1.5 = 1.5n log + − 1−τ 1−τ 1 − 1.5τ       1 − 1.5τ 0.5τ 1 1 = n 1.5 log + + 1.5 − 1−τ 1−τ 1−τ 1 − 1.5τ     1 − 1.5τ 0.5τ ≤ n 1.5 log + 1−τ 1−τ     0.5τ 0.5τ = n 1.5 log 1 − + 1−τ 1−τ   0.5τ 0.5τ ≤ n −1.5 + 1−τ 1−τ 0.25τ = −n 1−τ ≤ 0. Proof of (c). We have ∂r 1 + nτ (τ, x) = −n log(n(1 − τ )) + + n log(1.5 + n − x(1 + nτ )) ∂x 1−τ 1.5 + n − x(1 + nτ ) + x(1 + nτ ) (1 + nτ )xn −n − 1.5 + n − x(1 + nτ ) (1.5 + n − x(1 + nτ ))2 1 + nτ = −n log(n(1 − τ )) + + n log(1.5 + n − x(1 + nτ )) 1−τ (1 + nτ )xn 1.5 + n − −n . 1.5 + n − x(1 + nτ ) (1.5 + n − x(1 + nτ ))2 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 33 03.30.18 Plugging in x = 1.5, we have ∂r 1 + nτ 1.5(1 + nτ )n 1.5 + n (τ, 1.5) = −n log(n(1 − τ )) + + n log(n(1 − 1.5τ )) − −n ∂x 1−τ n(1 − 1.5τ ) (n(1 − 1.5τ ))2   1 − 1.5τ 1.5 1 τ 1.5 1 1.5 = n log − + +n − (1 + nτ ) − 2 1−τ 1−τ 1−τ 1 − 1.5τ n (1 − 1.5τ ) (1 − 1.5τ )2       1 − 1.5τ τ 1.5τ 1 1.5 ≤ n log + − + − 1−τ 1−τ 1 − 1.5τ 1−τ 1 − 1.5τ     1 − 1.5τ τ 1.5τ ≤ n log + − 1−τ 1−τ 1 − 1.5τ   −0.5τ τ 1.5τ ≤n + − . 1−τ 1−τ 1 − 1.5τ   1.5τ 0.5τ − . =n 1−τ 1 − 1.5τ τ (0.75τ − 1) ≤n (1 − τ )(1 − 1.5τ ) ≤ 0, where the last inequality follows because τ ≤ Proof of (d). 1 1.5 − 1 n ≤ 4/3. Modulo terms linear in x and the scaling factor n, r(τ, x) is equal to x x log (1.5 + n − x(1 + nτ )) − . 1.5 + n − x(1 + nτ ) We claim that the first term is concave in x and the second term is convex, from which it will follow that their difference is concave. By linear transformations, the concavity of the first term will follow from the concavity x of x log(1 − x), which follows because its first derivative log(1 − x) − 1−x is decreasing in x. Again by linear x 1 transformations, the convexity of the second term will follow from the convexity of 1−x = −1 + 1−x on x < 1, which is clear. Lemma 5. Let ψ(x) = Γ0 (x)/Γ(x) be the digamma function. Then, ψ is increasing, and for x ≥ 1, ψ(x) ≤ log(x) − 1 1 ≤ log(x + 0.5) − ≤ log x. 2x x + 0.5 (57) Proof. The fact that ψ is increasing is well-known. The first inequality follows directly from [38, Theorem 3.1]. To prove the second inequality, write    2 0.5 0.5 1 0.5 log(x + 0.5) − log(x) = log 1 + ≥ − , x x 2 x and the conclusion follows because  2 0.5 1 0.5 1 1 1 1 x − 0.5 − ≥ − ⇐⇒ − ≥ ⇐⇒ x ≥ 1/6. x 2 x x + 0.5 2x 2x 8x2 2x(x + 0.5) To prove the third inequality, write   0.5 0.5 log(x + 0.5) − log(x) = log 1 + ≤ , x x and the conclusion follows because 0.5 1 ≤ ⇐⇒ x ≥ 0.5. x x + 0.5 Towards “simultaneous selective inference”: post hoc bounds on the false discovery proportion 34 Lemma 6. Let f be as defined in equation (53). Then, ∂ f (λ, y) ≥ 0 ∂y for all y ≤ λ − 1. Proof. To prove this, it suffices to show that for y ≤ λ − 1, 0≤ ∂ ∂ log f (λ, y) = (−λ + y log λ − log Γ(y + 1)) = log λ − ψ(y + 1). ∂y ∂y Indeed, by Lemma 5, for y ≤ λ − 1 we have ψ(y + 1) ≤ ψ(λ) ≤ log λ. 03.30.18
10math.ST
Achievability Bounds for T-Fold Irregular Repetition Slotted ALOHA Scheme in the Gaussian Multiple Access Channel Nikolay Matveev‡, Kirill Andreev∗, Alexey Frolov∗† and Andrey Turlikov ‡ ∗ Skolkovo Institute of Science and Technology Moscow, Russia † Institute for Information Transmission Problems arXiv:1802.07332v1 [cs.IT] 20 Feb 2018 Russian Academy of Sciences Moscow, Russia ‡ State University of Aerospace Instrumentation, St. Petersburg, Russia [email protected], [email protected], [email protected], [email protected] Abstract—We address the problem of massive random access for an uncoordinated Gaussian multiple access channel (MAC). The performance of T-fold irregular repetition slotted ALOHA (IRSA) scheme for this channel is investigated. The main difference of this scheme in comparison to IRSA is as follows: any collisions of order up to T can be resolved with some probability of error introduced by Gaussian noise. First, we generalize the density evolution method for T -fold IRSA and noisy channel and find optimal degree distributions for different values of T . Then we perform analysis and find minimal Eb /N0 for a fixed length, rate and packet loss probability. The scheme is shown to work closer to finite length random coding bound proposed by Y. Polyanskiy, than existing solutions. I. I NTRODUCTION Existing wireless networks are designed with the goal of increasing a spectral efficiency in order to serve human users. Next generation of wireless networks will face a new challenge in the form of machine-type communication. Analysts predict that the number of devices connected to the network will exceed 50 millions by 2020. The main challenges are as follows: (a) huge number (billions) of autonomous devices connected to one access point, (b) low energy consumption, (c) short data packets. This problem has attracted attention of 3GPP standardization committee under the name of mMTC (massive machine-type communication). Let us describe the system model. There are Ktot ≫ 1 users, of which only K are active in each time instant. Communication proceeds in a frame-synchronized fashion (this can be implemented with use of beacons). The length of each frame is n. Each active user has k bits to transmit during a frame. The main goal is to minimize the energy-perbit spent by each of the users. We are interested in grant-free access (5G terminology), i.e. active users transmit their data, without any resource requests. This paper deals with construction of low-complexity random coding schemes for the Gaussian multiple-access channel (GMAC) with equal-power users, i.e. y= Ktot X si xi + z, (1) i=1 where xi ∈ Rn is a codeword transmitted by the i-th user, si is an activity indicator for the i-th user, i.e. si = 1 if the i-th user is active and si = 0 otherwise. z ∼ N (0, I) is an additive white Gaussian noise (AWGN). Following [1] we assume all the users to use the same message set [M ] , {1, . . . , M } and the same codebook C = {x(ω)}M ω=1 of size M . Let ωi denote the message of the i-th user. To transmit the message ωi the user will use a codeword xi = x(ωi ). We require in addition that ||x(ω)||22 ≤ nP , which means a natural power constraint. Decoding is done up to permutation of messages. We only require the decoder to output a set L(y) = (ω1 , ω2 , . . . , ωJ ) ∈ [M ]J , J ≤ K. Thus in accordance to [1] we decouple the user identification problem and the data transmission problem. The probability of error (per user) is defined as follows Pe = max |(s1 ,s2 ,...,sKtot )|=K Ktot 1 X si Pr(Wi 6∈ L(y)). K i=1 Let us emphasize the main differences from the classical setting. Almost all well-known low-complexity coding solutions for the traditional MAC channel (e.g. [2]) assume coordination between the users. Due to the gigantic number users we assume them to be symmetric, i.e. the users use the same codes and equal powers. We continue the line of work started in [1], [3], [4]. In [1] the bounds on the performance of finite-length codes for GMAC are presented. In [3] Ordentlich and Polyanskiy describe the first low-complexity coding paradigm for GMAC. The improvement (it terms of required Eb /N0 ) was given in [4]. The overall scheme can be called T-fold irregular repetition slotted ALOHA (IRSA, [5], [6]) scheme for GMAC. The main difference of this scheme in comparison to IRSA is as follows: any collisions of order up to T can be resolved with some probability of error introduced by Gaussian noise. users + + + + In this paper we investigate the potential capabilities of T fold IRSA. The authors of [4] suggested to split the error probability into three terms: interference cancellation (IC) error, preamble error and decoder error. Then a union bound was applied. We were able to write joint density evolution rules, which include all the terms. In what follows we show, that this change allows us to better predict the error probability. We also note the following thing. In [4] in each slot preambles were used to identify active users. So the packet consists of preamble and data part. The authors used finite length random coding bound [1] to estimate the probability of decoding failure in the data part. We emphasize, that preambles are not needed to characterize the potential capabilities (derive achievability bounds) of T -fold IRSA scheme as we do not need to identify users, that are active in a slot to use IC algorithm. Our contribution is as follows. Achievability bounds for T fold IRSA are derived. To achieve this goal we generalized the density evolution method for T -fold IRSA and noisy channel and find optimal degree distributions for different values of T . Then we perform analysis and find minimal Eb /N0 for a fixed length, rate and packet loss probability. The scheme is shown to work closer to finite length random coding bound proposed by Y. Polyanskiy, than existing solutions. slots Fig. 1: Tanner graph representation The algorithm stops when all the slots are either decoded or empty (see Algorithm 1 for more details). Algorithm 1 Interference cancellation decoder 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: while slot set not empty do Remove empty slots Select slot with the minimal collision order t if t ≤ T then Resolve the collision Subtract decoded packets from all the slots Update collision indices for all slots end if Remove decoded slot from slot set end while II. P RELIMINARIES A. System model The main features of the scheme are as follows: • transmission is performed in a frame-synchronized fashion. The length of a frame is n channel uses; • the frame consists of M slots of size ñ = n/M channel uses; • the user chooses a message ω, then encodes it and obtains a codeword x(ω) of length ñ; • users repeat their codewords in multiple slots. The distribution of the repetition count is denoted by D[i]. This distribution is the same for all the users; • the number of repetitions r and the r slots in which to send are chosen based on the message ω (see [4]): as ω is distributed uniformly on [M ] the slots are chosen uniformly at random (definitely without repetitions) from M existing slots. B. Interference cancellation decoder Decoding algorithm is based on successive cancellation approach. The algorithm is iterative. The slot with the minimum collision order is selected at every step. If the order of collision is less or equal to T we resolve the collision. As a result some messages (in collision) are decoded successfully, some of the messages are decoded incorrectly. Then all successfully decoded messages are removed from other slots (if the message was transmitted by user more than once), the slot itself is marked as resolved and collision indices are updated for all other slots. We note, that we can always find where the replicas were transmitted as these positions are chosen based on the data (so in contrast to [5] we do not need to store the pointers). Remark 1: We note, that during the slot decoding the errors may occur, i.e. some of the packets (codewords) may be decoded incorrectly. In what follows we assume, that we can always detect the error packets (the packets include control information). C. Tanner graph representation The transmission and decoding processes can be described with the use of a bipartite graph, which is called the Tanner graph [7]. The vertex set of the graph consists of the set of user nodes V = {v1 , v2 , . . . , vK } which correspond to the set of users and the set of slot nodes C = {c1 , c2 , . . . , cM } which correspond to signals received in slots. The user node vi and the slot node cj are connected with an edge if and only if the i-th users transmitted a packet in the j-th slot. D. Degree distributions P P i−1 i denote the Let L(x) = i λi x i Li x and λ(x) = user node degree distributions from node and edge degree perspective, respectively. We recall (see e.g. [8]), that Li and λi denote respectively the fractions of user nodes of degree i and the fraction of edges incident to user nodes of degree i. ′ Also recall, that λ(x) = L′ (x)/L (1). In our case L Pi = D[i]. P i−1 i Analogously, let R(x) = i ρi x i Ri x and ρ(x) = denote the slot node degree distributions from node and edge degree perspective, respectively. Let G = K/M . Let us consider the j-th slot. Each user chooses ′ this slot ′for transmission independently with probability LM(1) = GLK(1) . Thus,the slot node  distribution GL′ (1) . In the limit (from node perspective) is Bino K, K K → ∞ this distribution becomes a Poisson distribution. In ′ what follows we use R(x) = ρ(x) = e−GL (1)(1−x) . xℓ xl yl+1 User node III. D ENSITY EVOLUTION we note, that L′ (1) is actually the average number of transmissions. Let us introduce a notation. By Pe (ñ, k, P, t) we denote the error probability per user, calculated with use of random coding bound [1]. Now let us write the density evolution rules. By xl and yl we denote the probability that an outgoing message from the user node and slot node, respectively, are erased during the l-th iteration. We start with initial condition x0 = 1, which means, that the user messages are erased at the beginning and we observe only the noisy signal sums in slots. … xl xl r-1 … yl i … i-1 yℓ xl yl yℓ yℓ yl Fig. 2: Density evolution rules 16 Random coding bound Reference T = 2 Reference T = 4 10 decoding iterations 100 decoding iterations 14 12 T=1 T=2 10 Eb/N0, dB Following [1] we want to minimize the required energy-perbit Eb /N0 . For this purpose we suggest a density evolution method, which helps us to choose the system parameters. Similar to [5], [6] we consider the ensemble of Tanner graphs G(K; M ; cλ(x); ρ(x)) corresponding to the multipleaccess scheme with K users, M slots, and the degree distributions λ(x) and ρ(x). We are interested in the decoding performance averaged over the ensemble G(K; M ; λ(x); ρ(x)) in the limit as K,M → ∞. The major difference of our approach in comparison to [5], [6] is that we • consider co-called T -fold IRSA, i.e. collisions of order up to T can be resolved in slot node with some probability of error introduced by Gaussian noise; • take into account a noisy channel (AWGN channel to be precise); • take into account finite length effect as the slots have small length; • take into account a transmit energy. Assume we use a strategy with L(x) = x2 . In this case we spent 2 times more energy while transmitting in comparison to L(x) = x strategy; Let us fix the slot length ñ, the number of information bits k to be sent by each user, the maximal number of iterations ℓ, the average transmit power P (linear scale) and L(x). Then the average energy per information bit can be calculated as follows ñP L′ (1) Eb = , N0 2k User node Slot node T=4 8 6 4 2 0 0 100 200 300 User count 400 500 600 Fig. 3: Minimum Eb /N0 required to achieve less than 5% error rate as a user count function because of finite length effects in the slot. So in what follows we do not consider infinite number of iterations and fix ℓ. Proof: Consider the l-th iteration. Let us consider the slot node of degree r. We want to calculate the erasure probability of the outgoing message yl+1 based on incoming messages (with erasure probabilities xl ). The probability can be calculated as follows   min(r,T )−1 X r−1 t 1− (1 − Pe (ñ, k, P, t)) xl (1 − xl )r−1−t . t t=1 Each term in the sum corresponds to a probability of collision of order t. We are interested only in collisions of order t ≤ T . The probability of correct outgoing message decoding is given by 1 − Pe (ñ, k, P, t). We only need to apply the sum rule of total probability to obtain the needed result. Recall, that ρr is the probability, that the outgoing edge is connected to a slot node of degree r.   rX max h min(r,T The rule in user node coincides with the rules from [5], [6]. X)−1 r−1 yl+1 = 1 − ρr (1 − Pe (ñ, k, P, t)) t r=1 t=1 i IV. N UMERICAL RESULTS × xtl (1 − xl )r−1−t We choose the same system parameters as in [1], [3], [4] xl = λ(yl ), 1 ≤ l < ℓ. for honest comparison. xℓ = L(yℓ ). Parameter Description 4 n = 3 × 10 Frame length Remark 2: We note, that k = 100 Number of information bits lim xℓ > 0. P = 0.05 Maximum error probability allowed e ℓ→∞ K 25 50 100 150 200 250 300 350 400 450 500 550 DE for T = 2, 100 iterations 1.0000x 0.4447x + 0.5553x2 0.1261x + 0.8739x2 0.1155x + 0.8845x2 0.1226x + 0.8774x2 0.1252x + 0.8748x2 0.1591x + 0.6886x2 + 0.1524x3 0.1776x + 0.5895x2 + 0.2329x3 0.1860x + 0.5429x2 + 0.2711x3 0.2005x + 0.4861x2 + 0.3135x3 0.2048x + 0.4620x2 + 0.3333x3 0.2140x + 0.4269x2 + 0.3590x3 0.2218x + 0.3982x2 + 0.3776x3 +0.0015x4 + 0.0005x5 +0.000x6 + 0.0001x7 M 79 61 66 97 128 159 181 205 232 258 286 312 Eb /N0 , dB 1.63 3.09 3.89 4.64 5.46 6.32 7.19 8.03 8.88 9.73 10.60 11.48 339 12.37 K 25 50 100 150 200 250 300 350 400 450 500 550 600 DE for T = 4, 100 iterations 1.0000x 1.0000x 0.6260x + 0.3740x2 0.3190x + 0.6810x2 0.3228x + 0.6772x2 0.3279x + 0.6721x2 0.3259x + 0.6741x2 0.3333x + 0.6667x2 0.3298x + 0.6702x2 0.3349x + 0.6651x2 0.3381x + 0.6619x2 0.3386x + 0.6436x2 + 0.0177x3 0.3445x + 0.6077x2 + 0.0477x3 M 25 41 47 43 57 71 85 99 113 127 140 153 166 Eb /N0 , dB 0.53 1.09 2.84 3.41 4.04 4.75 5.49 6.24 7.03 7.82 8.63 9.46 10.30 K 25 50 100 150 200 250 300 350 400 450 500 DE for T = 1, 100 iterations 0.0920x + 0.9080x2 1.0000x2 1.0000x2 0.0009x + 0.4560x2 + 0.5431x3 0.1138x + 0.0931x2 + 0.7930x3 0.1371x + 0.0146x2 + 0.8482x3 0.1450x + 0.8550x3 0.1466x + 0.8534x3 0.1531x + 0.7928x3 + 0.0540x4 0.1610x + 0.7137x3 + 0.1253x4 0.1647x + 0.6666x3 + 0.1687x4 0.1700x + 0.6125x3 +0.1955x4 + 0.0219x5 M 68 106 195 203 251 309 368 427 482 535 590 Eb /N0 , dB 3.71 4.45 5.79 6.77 7.66 8.54 9.43 10.35 11.28 12.21 13.16 700 15.07 600 600 A. Optimization procedure The goal is to find the optimal slot count M and a polynomial L(x) in order to minimize the Eb /N0 under the maximum error probability allowed. The optimization procedure is conducted separately for every user count and consists of two sub-procedures. The first one is a constrained local minimum search with respect to L coefficients and the number of slots used in the system. The constraints are formed by • Li ≥ 0 ∀i = 1, . . . , Lmax , • L(1) = 1 The error probability is minimized under fixed Eb /N0 at this step. As soon as constrained local minimum search procedures can search the local minimum only, one need to run multiple optimization procedures starting from different random initial points within constraints. The second sub-procedure is to find a minimum Eb /N0 that satisfies maximum allowed error probability Pe . We expect the error probability at the optimal configuration to be a monotonic function of Eb /N0 and use a binary search. The numerical experiment results show that L(x) behaves smoothly when varying the number of users. This means that a global minimum is found at every optimization point. Note, that the error probability has multiple local minimums, because the slot count changes sharply at several points. B. Simulation results Interference cancellation algorithm was tested via Gaussian MAC Monte Carlo simulations. The result of a single run is a set of slots and the number of simultaneous transmissions (or collision index) for each slot. Each user selects the number of transmissions in accordance to L(x) and then selects particular non-coinciding slots from uniform distribution during each run. The same Eb /N0 is assumed for all slots. The decoding is done in accordance to Algorithm 1. The only thing we need to explain is how we resolve the collisions. Error probability is set to 1 if the number of simultaneous transmissions within some slot exceeds the threshold (T ∈ {1, 2, 4}). If the order of collision is less or equal to T , then the error probability is calculated independently for each transmitted message in a slot in accordance to finite length random coding bound from [1]. R EFERENCES [1] Y. Polyanskiy, “A perspective on massive random-access,” in Information Theory (ISIT), 2017 IEEE International Symposium on. IEEE, 2017, pp. 2523–2527. [2] B. Rimoldi and R. Urbanke, “A rate-splitting approach to the gaussian multiple-access channel,” IEEE Transactions on Information Theory, vol. 42, no. 2, pp. 364–375, 1996. [3] O. Ordentlich and Y. Polyanskiy, “Low complexity schemes for the random access gaussian channel,” in 2017 IEEE International Symposium on Information Theory (ISIT), June 2017, pp. 2528–2532. [4] A. Vem, K. R. Narayanan, J. Cheng, and J.-F. Chamberland, “A userindependent serial interference cancellation based coding scheme for the unsourced random access gaussian channel,” in Proc. IEEE Information Theory Workshop (ITW), 2017, pp. 1–5. [5] G. Liva, “Graph-based analysis and optimization of contention resolution diversity slotted aloha,” IEEE Transactions on Communications, vol. 59, no. 2, pp. 477–487, February 2011. [6] K. R. Narayanan and H. D. Pfister, “Iterative collision resolution for slotted aloha: An optimal uncoordinated transmission policy,” in 2012 7th International Symposium on Turbo Codes and Iterative Information Processing (ISTC), Aug 2012, pp. 136–139. [7] R. Tanner, “A recursive approach to low complexity codes,” IEEE Transactions on information theory, vol. 27, no. 5, pp. 533–547, 1981. [8] T. Richardson and R. Urbanke, Modern coding theory. Cambridge university press, 2008.
7cs.IT
1 Hybrid Algorithm for Multi-Objective Optimization by Greedy Hypervolume Maximization arXiv:1506.05424v1 [cs.NE] 17 Jun 2015 Conrado S. Miranda, Fernando J. Von Zuben, Senior Member, IEEE Abstract—This paper introduces a high-performance hybrid algorithm, called Hybrid Hypervolume Maximization Algorithm (H2MA), for multi-objective optimization that alternates between exploring the decision space and exploiting the already obtained non-dominated solutions. The proposal is centered on maximizing the hypervolume indicator, thus converting the multi-objective problem into a single-objective one. The exploitation employs gradient-based methods, but considering a single candidate efficient solution at a time, to overcome limitations associated with population-based approaches and also to allow an easy control of the number of solutions provided. There is an interchange between two steps. The first step is a deterministic local exploration, endowed with an automatic procedure to detect stagnation. When stagnation is detected, the search is switched to a second step characterized by a stochastic global exploration using an evolutionary algorithm. Using five ZDT benchmarks with 30 variables, the performance of the new algorithm is compared to state-of-the-art algorithms for multi-objective optimization, more specifically NSGA-II, SPEA2, and SMS-EMOA. The solutions found by the H2MA guide to higher hypervolume and smaller distance to the true Pareto frontier with significantly less function evaluations, even when the gradient is estimated numerically. Furthermore, although only continuous decision spaces have been considered here, discrete decision spaces could also have been treated, replacing gradient-based search by hill-climbing. Finally, a thorough explanation is provided to support the expressive gain in performance that was achieved. Index Terms—Exploration-exploitation algorithm; Gradientbased optimization; Hypervolume maximization; Multi-objective optimization. I. I NTRODUCTION ULTI-OBJECTIVE optimization (MOO) is a generalization of the standard single-objective optimization to problems where multiple criteria are defined and they conflict with each other [1]. In this case, there can be multiple optimal solutions with different trade-offs between the objectives. Since the optimal set can be continuous, an MOO problem is given by finding samples from the optimal set, called Pareto set. However, we also wish that the projection of the obtained samples of the Pareto set into the objective space be welldistributed along the Pareto frontier, which is the counterpart for the Pareto set, so that the solutions present more diverse trade-offs. The current state-of-the-art for MOO relies on the use of evolutionary algorithms for finding the desired samples [2]. One of these algorithms is the NSGA-II [3], which performs non-dominance sorting, thus ordering the proposed solutions according to their relative dominance degree, and dividing the M C. S. Miranda and F. J. Von Zuben are with the School of Electrical and Computer Engineering, University of Campinas (Unicamp), Brazil. E-mail: {conrado,vonzuben}@dca.fee.unicamp.br solution set in subsequent frontiers of non-dominated solutions. NSGA-II also uses crowding distance, which measures how close the nearby solutions are, to maintain diversity in the objective space. Another well-known algorithm is the SPEA2 [4], where the solutions have a selective pressure to move towards the Pareto frontier and also to stay away from each other. These algorithms are based on heuristics to define what characterizes a good set of solutions. However, the hypervolume indicator [5] defines a metric of performance for a set of solutions, thus allowing a direct comparison of multiple distinct sets of solutions [6], with higher values indicating possible better quality. The hypervolume is maximal at the Pareto frontier and increases if the samples are better distributed along the frontier [7]. Due to these properties, it represents a good candidate to be maximized in MOO, being explicitly explored in the SMS-EMOA [8], where solutions that contribute the least to the hypervolume are discarded. On the other hand, local search methods have been successful in single-objective optimization (SOO) due to their efficiency in finding a local optimum for some problems [9], [10], so that research has been performed to try to adapt these methods for MOO problems. For instance, [11] defined a method for finding all minimizing directions in a MOO problem, but the proposed algorithm achieved low performance on usual benchmark functions. Alternatively, instead of adapting the single-objective methods to work on MOO problems, we can create a SOO problem associated with the MOO one, such that a good solution for the single-objective case is a good solution for the multi-objective case. Since the hypervolume is able to describe how good a population is, based on a single indicator, the MOO problem can be converted into the maximization of the population’s hypervolume. Based on this idea, [12] proposed a method to compute the hypervolume’s gradient for a given population, so that the optimal search direction for each individual could be established. However, [13] showed that adjusting the population through integration of the hypervolume’s gradient not always work, with some initially non-dominated points becoming dominated and others changing very little over the integration. In this paper, we introduce an algorithm for maximizing the hypervolume by optimizing one point at a time, instead of adjusting a whole population at once. The algorithm alternates between exploring the space for non-dominated solutions and, when they are found, exploiting them using local search methods to maximize the populations’ hypervolume when only this active point can be moved. Therefore, once the hypervolume has converged, which is guaranteed to happen 2 because the problem is bounded, the point is fixed in all further iterations. We found that this restriction is enough to overcome the issues presented in [13] when using the hypervolume’s gradient. The proposed algorithm, called Hybrid Hypervolume Maximization Algorithm (H2MA), is a hybrid one, since it is composed of global exploration and local exploitation procedures, properly managed to be executed alternately. Results over the ZDT benchmark [14] show that the new algorithm performs better than the state-of-the-art evolutionary algorithms, both in terms of total hypervolume and distance to the Pareto frontier. Moreover, the algorithm was able to work deterministically in most of the benchmark problems, which makes it less susceptible to variations due to random number generation. Due to the high quality of the solutions found in less function evaluations than what is achieved by the current state-of-the-art, we consider that the new algorithm is a viable choice for solving MOO problems. Moreover, since a single solution is introduced at a time, the user is able to stop the algorithm when the desired number of solutions is found, while evolutionary algorithms must evolve the whole population at the same time. This paper is organized as follows. Section II introduces the concepts of multi-objective optimization required, including the hypervolume indicator, and discusses the problems with the gradient-based approach for hypervolume maximization introduced in [13]. Section III provides the details of the new H2MA algorithm, and Section IV shows the comparison with the state-of-the-art algorithms. Finally, Section V summarizes the results and discusses future research direction. II. M ULTI -O BJECTIVE O PTIMIZATION H YPERVOLUME I NDICATOR AND THE A multi-objective optimization problem is described by its decision space X and a set of objective functions fi (x) : X → Yi , i ∈ {1, . . . , M }, where Yi ⊆ R is the associated objective space for each objective function [15]. Due to the symmetry between maximization and minimization, only the minimization problem is considered here. Each point x in the decision space has a counterpart in the objective space Y = Y1 ×· · ·×YM given by y = f (x) = (f1 (x), . . . , fM (x)). Since there are multiple objectives, a new operator for comparing solutions must be used, since the conventional “less than” operator < can only compare two numbers. This operator is denoted the dominance operator and is defined as follows. Definition 1 (Dominance). Let y and y ′ be points in Y, the objective space. Then y dominates y ′ , denoted y ≺ y ′ , if yi < yi′ for all i. From this definition, a point y that dominates another point y ′ is better than y ′ in all objectives. Thus, there is no reason someone would choose y ′ over y, and it can be discarded, as occurs in many multi-objective optimization algorithms [15]. Note that there are other definitions of the dominance operator [6], where one considers the inequality ≤ instead of the strict inequality < used here. However, equality in some of the coordinates may be an issue when using the hypervolume indicator, such as when taking its derivative [12]. This is why the strict version is used in this work. Using the dominance, we can define the set of points characterized by the fact that no other point can have better performance in all objectives. Definition 2 (Pareto Set and Frontier). The Pareto set is defined by the set of all points in the decision space that are not dominated by any other point in the decision space, when using the objectives. That is, the Pareto set is given by P = {x ∈ X | ∄x′ ∈ X : f (x′ ) ≺ f (x)}. The Pareto frontier is the associated set in the objective space, given by F = {f (x) | x ∈ P}. A. The Hypervolume Indicator In order to define the hypervolume indicator [5], we must first define the Nadir point, which is a point in the objective space that is dominated by every point in a set. Definition 3 (Nadir Point). Let X = {x1 , . . . , xN } ∈ X N be a set of points in the decision space. Let z ∈ RM be a point in the objective space. Then z is a valid Nadir point if, for all x ∈ X and i ∈ {1, . . . , M }, we have that fi (x) < zi . Using Definition 1, this can be written as f (x) ≺ z. Again, it is possible to allow equality in the definition of the Nadir point, just like in the definition of dominance. However, when equality is allowed, it is possible for some point to have a null hypervolume, which can guide to undesired decisions when using the hypervolume as a performance metric, since such points would not contribute to the hypervolume and would be replaced by other points. Using the definition of a Nadir point, we can define the hypervolume for a set of points. Definition 4 (Hypervolume). Let X = {x1 , . . . , xN } ∈ X N be a set of points in the decision space. Let z ∈ RM be a valid Nadir point in the objective space. Then the hypervolume can be defined as: Z H(X; z) = 1[∃x ∈ X : f (x) ≺ y ≺ z]dy, (1) RM where 1[·] is the indicator function. The hypervolume measures how much of the objective space is dominated by a current set X and dominates the Nadir point z. Fig. 1 shows an example of the hypervolume for a set of three non-dominated points. For each point, the shaded region represents the area dominated by the given point, with colors combining when there is overlap. B. Gradient of the Hypervolume As stated earlier, since the hypervolume provides such a good indicator of performance in multi-objective problems, it can be used to transform the multi-objective problem into a single-objective one, characterized by the maximization of the hypervolume. Although such approach proved to be successful when using evolutionary algorithms as the optimization method [8], the same did not happen when using the hypervolume’s gradient 3 1 0.9 0.8 y2 0.7 0.6 0.5 0.4 0.3 0.2 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 y1 Figure 1: Example of hypervolume. The non-dominated solutions in the objective space are shown in black circles, and the Nadir point is shown in the black square. For each nondominated solution, the region between it and the Nadir point is filled, with colors combining when there is overlap, and the total hypervolume is given by the area of the shaded regions. Best viewed in color. to perform the optimization [13]. However, it is well-known that gradient methods have been successful in single-objective optimization [9], [10], thus suggesting that they should be a reasonable choice for multi-objective optimization devoted to maximizing the hypervolume, since the hypervolume operator is well-defined almost everywhere in the objective space. The hypervolume’s gradient for a set of points was introduced in [12], and it can be used to compute the optimal direction in which a given point should move to increase the hypervolume associated with the current set of non-dominated solutions. Although the hypervolume is not a continuously differentiable function of its arguments, since dominated points do not contribute to the hypervolume and thus have null gradient, the gradient can be computed whenever any two points have different values for all objectives. Based on this motivation, [13] used the hypervolume’s gradient as a guide for adjusting a set of points by numerical integration, that is, performing a small step in the direction pointed by the gradient. Even though the algorithm was able to achieve the Pareto set in some cases, it failed to converge to efficient points when some points got stuck along the iterative process, either because their gradients became very small or because they became dominated by other points. Once dominated, these points do not contribute to the hypervolume and remain fixed. This causes a major issue to using the hypervolume gradient in practice, since dominated points can be discarded, because there is no possibility to revert them to non-dominated points anymore, and the points with small gradients remain almost stagnant. If we analyze Eq. (1), we can see that points at the border in the objective space are the only ones that can fill some portions of the objective space. On the other hand, points that are not at the border have less influence in the hypervolume, since part of the area dominated by them is also dominated by some other points. In the analysis presented in [13], it is clear that the cases where some points got stuck had higher gradients for the border points in the objective space, which led to the dominance or decrease of contribution of some or all central points. To make this idea clearer, consider the example in Fig. 1. If the point located at (0.75, 0.25) decreases its value on the second objective, it can increase the population’s hypervolume. Moreover, it is the only point that can do so without competition for that portion of the space, since it is the point with the largest value for the first objective. The same holds for the point at (0.25, 0.75) and the first objective. However the point located at (0.5, 0.5) has to compete with the other two points to be the sole contributor for some regions. Therefore, its effect on the hypervolume is smaller, which leads to a smaller gradient. Furthermore, if less area is dominated by the middle point alone, which can occur during the points adjustment as the middle one moves less, then its influence becomes even smaller and it can become dominated. It is important to highlight that this behavior does not happen always, but can occur along the iterative process, as shown in [13]. This leads to the base hypothesis for the algorithm developed in this paper: when using the hypervolume’s gradient for optimization, the competition for increasing the hypervolume among points should be avoided. III. H YBRID H YPERVOLUME M AXIMIZATION A LGORITHM From the discussion in Section II-B, one can see that the major problem when optimizing the hypervolume directly using its gradient may be the competition among points. Therefore, our proposed algorithm optimizes a single solution at a time, avoiding this competition. Theoretically, the algorithm can be described by choosing a new point that maximizes the hypervolume when taking into account the previous points, such that its recurring equation can be written as: xt = arg max H(Xt−1 ∪{x}), Xt = Xt−1 ∪{xt }, t ∈ N, (2) x∈X where the initial set is given by X−1 = {}. Since a single point is being optimized at a time, the optimization becomes simpler and, as we will show in Section IV, requires less function evaluations. Moreover, one could argue that maintaining the previous set fixed reduces the flexibility allowed in comparison with a set where all the points are being concurrently adjusted. Although this may be true, we will also show in Section IV that the proposed algorithm performs well despite this loss of flexibility. The algorithm described in Eq. (2) is theoretically ideal, since finding the maximum is hard in practice. Therefore, the actual algorithm proposed is shown in Fig. 2. This algorithm performs exploration of the objective space until a new solution that is not dominated by the previous candidate solutions is found. When it happens, the hypervolume of the whole set is larger than the hypervolume when considering only previous candidate solutions. The new candidate solution is then exploited to maximize the total hypervolume and, after convergence, is then added to the existing set. It is important to highlight that the exploitation phase cannot make the solution become dominated, since that would reduce the hypervolume in comparison with the initial condition. Therefore, the problem of points becoming 4 Input: Objectives f Input: Design space X Input: Nadir point z Output: Set of candidate solutions X function H YBRID G REEDYO PTIMIZER(f, X , z) Regions, X ← C REATE I NITIAL R EGION(f,X ) while not stop condition and |Regions| > 0 do R ← Regions.pop() ⊲ Removes the region with the largest volume x0 ← E XPLORE D ETERMINISTIC(f,X , R, X) if x0 is valid then x ← E XPLOIT (f, X , x0 , X, z) N ewRegions ← C REATE R EGIONS(R,x, f ) Regions ← Regions ∪ N ewRegions X ← X ∪ {x} end if end while while not stop condition do x0 ← E XPLORE S TOCHASTIC(f,X , X) x ← E XPLOIT (f, X , x0 , X, z) X ← X ∪ {x} end while return X end function Figure 2: Hybrid algorithm that performs deterministic and stochastic exploration until a suitable solution is found, and then exploits it. Input: Objectives f Input: Design space X Input: Current exploration region R Input: Set of candidate solutions X Output: New initial condition x0 function E XPLORE D ETERMINISTIC(f, X , R, X) x0 ← M EAN(R.X) Minimize kR.mid − f (x)k from x0 until some candidate x is not dominated by X if found non-dominated x then x0 ← x else x0 ← some invalid state end if return x0 end function Figure 3: A deterministic exploration is performed based on some region. dominated during the exploitation is avoided. Furthermore, the exploitation is a traditional single-objective optimization, so that gradient methods can be used if the decision set X is continuous or hill-climbing methods can be used for discrete X. Once finished the exploitation, the algorithm begins the exploration phase again. The exploration can be deterministic, based on regions of the objective space defined by previous solutions, or stochastic, where a stochastic algorithm, such as an evolutionary algorithm, is used to find the new candidate. When a non-dominated candidate is found, the algorithm turns to exploitation again. We highlight that the deterministic exploitation algorithm proposed is based on the definition of these regions, but other deterministic methods can be used. However, the algorithm must be able to establish when it is not able to provide Input: Objectives f Input: Design space X Output: Set of candidate solutions X Output: Initial exploration region R function C REATE I NITIAL R EGION(f,X ) X ← {} x0 ← X .mean ⊲ Gets the average candidate for i = 1, . . . , |f | do x ← M INIMIZE (fi, x0 , X ) X ← X ∪ {x} end for R ← C REATE R EGION(X,f ) return {R}, X end function Figure 4: The initial region is created from the points that minimize each objective individually. Input: Current explored region R Input: Current solution x Input: Objectives f Output: New exploration regions N ewRegions function C REATE R EGIONS(R, x, f ) N ewRegions ← {} for X ′ in C OMBINATIONS(R.X, |R.X| − 1) do R′ ← C REATE R EGION(X ′ ∪ {x}, f ) N ewRegions ← N ewRegions ∪ {R′ } end for return N ewRegions end function Figure 5: New exploration regions are created by combining the current solution with the previous region. further improvements, so that the change to the stochastic global exploration can be made. In the algorithm shown in Fig. 2, regions that do not provide a valid initial condition are discarded without creating new regions, so that eventually the algorithm can switch to the stochastic global exploration. The algorithm for deterministic exploration is shown in Fig. 3. It combines the points used to create a given region in order to produce an initial condition and tries to minimize the distance between its objective value and a reference point. Once a non-dominated point is found, it is returned for exploitation. Although this simple optimization provided good results without requiring many function evaluations, other methods can be used to perform this exploration. Alternatively, one can also perform a stochastic exploration instead of a deterministic one, but this may have negative effects on the performance if the information provided by the output (region R) is not used, since a global search would be required. The first region is created by finding points that minimize each objective separately, as shown in Fig. 4. This establishes that the initial region will have a number of candidate solutions associated with it equal to the number of objectives, so that the solutions are at the border of the region. When new regions are created after exploitation, we ignore the solutions that created the region, one at a time, and replace it with the proposed new solution, as shown in Fig. 5, to create a new region. This guarantees that the number of solutions for each region is kept equal to the number of objectives. Finally, Fig. 6 shows how a region is created. If a region 5 f (x12 ) f (x2 ) 1 R f (x′ ) 0.6 y 12 0.4 H′ 0.8 f2 (·) f2 (·) 0.8 f (x1 ) 0.2 0.4 f (x′ ) f (x∗ ) 0.2 0 H∗ R2 0.6 0.4 0.2 0 f (x2 ) 1 0.6 0.8 1 1.2 0 R1 f (x1 ) 0 0.2 0.4 0.6 0.8 1 1.2 f1 (·) f1 (·) (b) Exploitation (a) Deterministic exploration Figure 7: Deterministic exploration and exploitation steps of the new algorithm in an example problem. The Pareto frontier is shown in the blue line, and the regions used by the deterministic exploration are shown in yellow. Input: Objectives f Input: Set of candidate solutions X Output: Exploration region R function Q C REATE R EGION(X,f ) | V = |f i=1 (maxx∈X fi (x) − minx∈X fi (x)) if V > 0 then R.X ← X R.mid ← M EAN({f (x) | x ∈ X}) R.V ← V else R ← null element such that {R} ≡ {} end if return R end function Figure 6: An exploration region is created from a set of candidates if the region have some volume. does not have a volume, then at least one objective for two solutions is the same. Although we could allow such region to exist without modifying the rest of the algorithm, these regions tend to not provide good candidates for exploitation and delay the change to stochastic global exploration. Furthermore, one can even prohibit regions with volume smaller than some known constant, as they probably will not provide good exploitation points, and the change to stochastic global exploration happens earlier. Fig. 7 shows a step of the algorithm in an example problem with two objectives. The deterministic exploration receives a region R, composed of the points x1 and x2 . The mean of the points that compose the region is given by x12 = (x1 + x2 )/2 and its evaluation in the objective space is shown in Fig. 7a. The mean objective of the points that compose the region is also computed and is shown as y 12 = (f (x1 ) + f (x2 ))/2. The deterministic exploration is then defined by the problem min kf (x) − y 12 k, x∈X f (x2 ), this should guide the search to the non-dominated region of the space. While performing this optimization, some intermediary points are evaluated, either while computing the numeric gradient or after performing a gradient descent step. The deterministic exploration stops as soon as a non-dominated point is found, which is given by f (x′ ) in the example in Fig. 7a. Note that this example shows f (x12 ) as being dominated by f (x1 ) and f (x2 ), but it can also be non-dominated. In this case, x′ = x12 and no optimization step for the problem in Eq. (3) is performed. Supposing no non-dominated point f (x′ ) is found during the deterministic exploration, the region is simply discarded, without performing an exploitation step. Using the point x′ , whose f (x′ ) is non-dominated, provided by the deterministic or stochastic exploration, the exploitation is performed. Fig. 7b shows the hypervolume contributions for the initial point x′ and the optimal point x∗ , which maximizes the total hypervolume as in Eq. (2). Since x′ is non-dominated, its hypervolume contribution H ′ is positive and the hypervolume gradient relative to the objectives is non-zero. After finding x∗ and if x′ was provided by the deterministic exploration, new regions must be created to allow further exploration. Therefore, according to Fig. 5, the regions R1 = (x1 , x∗ ) and R2 = (x2 , x∗ ) are created for further exploration. This finalizes a step of the algorithm, which is repeated until the given stop condition is not met. As at most one point is found by each step, the stop condition can be defined based on the number of desired points. Note that all the methods used in this algorithm assume that the optimization, either for exploitation or for minimizing one objective alone, requires an initial condition. This is true for hill climbing or gradient methods, but the algorithm can easily be modified if the optimization does not require it. (3) which uses x12 as the initial condition for the optimization. Since y12 is guaranteed to be non-dominated by f (x1 ) and IV. E XPERIMENTAL R ESULTS To compare the algorithm proposed in Section III, called Hybrid Hypervolume Maximization Algorithm (H2MA), with 6 22 1 NSGA−II SPEA2 SMS1 SMS2 H2MA 0.5 21 0 20 −0.5 H log10 P 19 18 −1 −1.5 −2 17 −2.5 NSGA−II SPEA2 SMS1 SMS2 H2MA 16 15 −0.5 0 0.5 1 1.5 2 # evaluations −3 2.5 4 x 10 (a) Hypervolume −3.5 −0.5 0 0.5 1 1.5 2 # evaluations 2.5 4 x 10 (b) P-distance. Zero values not shown. Figure 8: 0th, 25th, 50th, 75th, and 100th percentiles every 2000 evaluations for the all algorithms on ZDT1. Table I: Benchmark problems used for evaluation. See the Appendix for Eqs. (4) to (8). Problem ZDT1 ZDT2 ZDT3 ZDT4 ZDT6 Objectives Eq. (4) Eq. (5) Eq. (6) Eq. (7) Eq. (8) X [0, 1]n [0, 1]n [0, 1]n [0, 1] × [−5, 5]n−1 [0, 1]n Nadir point (2, 11) (2, 11) (2, 11) (2, 2 + 50(n − 1)) (2, 11) the existing algorithms, the ZDT family of functions [14] was chosen. These functions define a common benchmark set in the multi-objective optimization literature, since they define a wide range of problems to test different characteristics of the optimization algorithm. All functions defined in [14] have a continuous decision space X , except for the ZDT5 which has a binary space. In this paper, only the continuous test functions were used to evaluate the performance of the new algorithm, and their equations are shown in the appendix. Table I provides a summary of the evaluation functions, their decision spaces, and the Nadir points used to compute the hypervolume. The Nadir points are defined by upper bounds of the objectives, which guarantees that the hypervolume computation is always valid, plus one, since not adding an extra value would mean that points at the border of the frontier would have no contribution to the hypervolume and would be avoided. In all instances, a total of n = 30 variables were considered, as common in the literature. The evolutionary algorithms’ and evaluation functions’ implementations were given by the PaGMO library [16]. We compare our algorithm with existing state-of-the-art multi-objective optimization algorithms, namely NSGA-II [3], SPEA2 [4], and SMS-EMOA [8]. All of them used a population size of 100 individuals. Tests have shown that this size is able to provide a good performance due to balance between exploration of the space and exploitation of the individuals, with much less individuals not providing good exploration and much more not providing good exploitation. The SMS-EMOA can use two methods for selecting points in dominated fronts: the least hypervolume contribution or the domination count. Both methods were tested, with labels SMS1 and SMS2, respectively, in the following figures. Note that this method only applies for the dominated fronts, since the domination count is zero for all points in the non-dominated front and the least contributor method must be used. Furthermore, the SMS-EMOA algorithm’s performance presented in this paper uses a dynamic Nadir point, which is found by adding one to the maximum over all points in each objective, since using the Nadir points presented in Table I created a very high selective pressure, which in turn led to poor exploration and performance. Since the decision space and objectives are continuous, the exploitation and deterministic exploration methods may resort to a gradient-based algorithm. In this paper, we used the LBFGS-B method implemented in the library SciPy [17], which is able to handle the bounds of X and is very efficient to find a local optimum. As the other algorithms being compared are evolutionary algorithms, which can only access the objective functions by evaluating them at given points, the gradient for the L-BFGS-B is computed numerically to avoid an unfair advantage in favor of our algorithm. For the stochastic global exploration, we used an evolutionary algorithm with non-dominance sorting and removal based on the number of dominating points. The population had a minimum size of 20 and was filled with the given set of previous solutions X. If less than 20 points were provided, the others were created by randomly sampling the decision space X uniformly. Once a new point is introduced to the non-dominated front, it is returned for exploitation because it increases the hypervolume when added to the previous solutions X. The size of this population was chosen experimentally to provide a good enough exploration of the space toward the initial conditions for the exploitation. This size is smaller than the population size for the pure evolutionary algorithms 7 22 1 NSGA−II SPEA2 SMS1 SMS2 H2MA 21 0.5 20 0 19 −0.5 H log10 P 18 17 16 −1 −1.5 −2 15 −2.5 14 NSGA−II SPEA2 SMS1 SMS2 H2MA 13 12 −0.5 0 0.5 1 1.5 2 # evaluations −3 −3.5 −0.5 2.5 0 0.5 1 1.5 2 2.5 # evaluations 4 x 10 (a) Hypervolume 4 x 10 (b) P-distance. Zero values not shown. Figure 9: 0th, 25th, 50th, 75th, and 100th percentiles every 2000 evaluations for the all algorithms on ZDT2. 23 1 NSGA−II SPEA2 SMS1 SMS2 H2MA 0.5 22 0 21 −0.5 H log10 P 20 19 −1 −1.5 18 −2 NSGA−II SPEA2 SMS1 SMS2 H2MA 17 16 −0.5 0 0.5 1 # evaluations 1.5 2 −2.5 2.5 4 x 10 (a) Hypervolume −3 −0.5 0 0.5 1 1.5 2 # evaluations 2.5 4 x 10 (b) P-distance. Zero values not shown. Figure 10: 0th, 25th, 50th, 75th, and 100th percentiles every 2000 evaluations for the all algorithms on ZDT3. because the pure evolutionary algorithm need diversity to explore and exploit all of its population, but the stochastic part of the H2MA is already initialized with good and diverse candidate solutions provided by the exploitation procedure, reducing its exploration requirements. Besides computing the solutions’ hypervolume, which is the metric that the H2MA is trying to maximize and that provides a good method for comparing solutions, we can compute the distance between the achieved objectives and the Pareto frontier, since the Pareto frontiers for the ZDT functions are known. This defines the P-distance, which is zero, or close to zero due to numerical issues, for points at the frontier. Figs. 8, 9, 10, 11, and 12 present the results for the problems ZDT1, ZDT2, ZDT3, ZDT4, and ZDT6, respectively. A maximum of 20000 function evaluations was considered, and the graphs show the 0th, 25th, 50th, 75th, and 100th percentiles for each performance indicator over 100 runs of the algorithms. Since the P-distance is shown in log-scale, some values obtained by our proposal are absent or partially present, because they have produced zero P-distance. From ZDT1 to ZDT4, the H2MA never ran out of regions to explore, so the stochastic exploration was not used and all runs have the same performance. For the function ZDT6, the first objective, given by Eq. (8a), causes some problems to the deterministic exploration. During the creation of the first region for this problem, the mean point is used as initial condition for optimizing each objective, as shown in Fig. 4. However, the first objective for ZDT6 has null derivative when x1 = 0.5. In this case, even traditional higher-order methods would not help, since the first non-zero derivative of f1 (x) is the sixth. As the first objective does not change in this case and it also has local minima that 8 4 3000 2900 NSGA−II SPEA2 SMS1 SMS2 H2MA 2 2800 0 2700 −2 H log10 P 2600 2500 2400 −4 −6 2300 −8 2200 NSGA−II SPEA2 SMS1 SMS2 H2MA 2100 2000 −0.5 0 0.5 1 1.5 2 # evaluations −10 −12 −0.5 2.5 0 0.5 1 1.5 2 2.5 # evaluations 4 x 10 (a) Hypervolume 4 x 10 (b) P-distance. Zero values not shown. Figure 11: 0th, 25th, 50th, 75th, and 100th percentiles every 2000 evaluations for the all algorithms on ZDT4. 20 1 18 0.8 16 0.6 NSGA−II SPEA2 SMS1 SMS2 H2MA 0.4 H log10 P 14 12 0.2 0 10 −0.2 8 −0.4 NSGA−II SPEA2 SMS1 SMS2 H2MA 6 4 −0.5 0 0.5 1 # evaluations 1.5 2 −0.6 2.5 4 x 10 (a) Hypervolume −0.8 −0.5 0 0.5 1 1.5 2 # evaluations 2.5 4 x 10 (b) P-distance. Zero values not shown. Figure 12: 0th, 25th, 50th, 75th, and 100th percentiles every 2000 evaluations for the all algorithms on ZDT6. are very hard to overcome, the algorithm quickly switches to using stochastic exploration. Once new regions have candidate points, the algorithm is able to exploit them. Besides this issue in the deterministic exploration of the problem ZDT6, the local minima of the first objective makes some candidate solutions be sub-optimal, increasing the Pdistance as shown in Fig. 12b. Nonetheless, the achieved Pdistance is better than the evolutionary algorithms and the 75th percentile is zero. Moreover, Figs. 8b, 9b, 10b, and 11b show that the candidate solutions are always on the Pareto frontier for the problems ZDT1 to ZDT4. This allows the user to stop the optimization at any number of evaluations, even with very few function evaluations, and have a reasonable expectation that the solutions found are efficient. When we evaluate the hypervolume indicator, we see that, for the problems ZDT1, ZDT2, ZDT4, and ZDT6, the per- formance of the H2MA is much better, even for the last one using stochastic exploration. Moreover, the H2MA’s worst hypervolume was always better than the best hypervolume for all evolutionary algorithms and it was able to get closer to the maximum hypervolume possible with relatively few function evaluations, being a strong indication of its efficiency. For the problem ZDT3, whose hypervolume performance is shown in Fig. 10a, the H2MA was generally better than the evolutionary algorithms. The Pareto frontier for ZDT3 is composed of disconnected sets of points, which was created to test the algorithm’s ability to deal with discontinuous frontiers. Since the exploitation algorithm used for the results is gradient-based, it is not able to properly handle discontinuous functions, which is the case of the hypervolume on discontinuous frontiers. However, the deterministic exploration method is able to find points whose exploitation lay on the 9 4 2 x 10 1.8 1.6 1.4 Numeric 1.2 1 0.8 0.6 0.4 ZDT1 ZDT2 ZDT3 ZDT4 0.2 0 0 100 200 300 400 500 600 700 Analytic Figure 13: Comparison between the number of function evaluations required to achieve the same hypervolume using numeric or analytic gradient. The dotted line represents a 30fold improvement. different parts of the Pareto frontier, providing the expected diversity. Fig. 13 shows a comparison between the number of function evaluations required by the numeric and the analytic gradient to achieve the same hypervolume on the problems ZDT1 to ZDT4. The analytic method for computing the hypervolume’s gradient is described in [12]. The comparison for ZDT6 is not shown due to its different scale, since many function evaluations are used in the global stochastic exploration because the deterministic exploration fails to find regions. As expected, using the analytic gradient causes a 30-fold improvement in comparison to the numeric gradient, since the number of decision variables is 30. However, the gain is not linear. This can be explained by the difference in behavior during the deterministic exploration: the first nondominated point found is used to perform the exploitation, even if this point was found during the computation of the numeric gradient. For ZDT1 and ZDT4, this causes the new points found by the numeric gradient to be very close to the original points, reducing its performance and increasing the improvement of using the analytic gradient. Moreover, a similar effect makes the ZDT3 performance to have a lower improvement when using the analytic gradient. Since the Pareto frontier for ZDT3 is discontinuous and this causes a discontinuity in the hypervolume, these large changes can be seen by the numeric gradient because small changes in the variables can have large effects on the hypervolume, pulling the solution if the difference is significant, while the analytic gradient is not able to provide such knowledge. Nonetheless, the analytic gradient presents at least a 15-fold improvement over the numeric one over the ZDT3. A. Analysis of the H2MA’s performance As shown in Section IV, the proposed H2MA is able to surpass the state-of-the-art in multi-objective optimization, based on evolutionary algorithms. Therefore, it is important to analyze the algorithm and to discuss why this improvement happened. Evolutionary algorithms perform a guided exploration, with new individuals created based on existing high-performing individuals, which allows them to escape local minima but reduces the convergence speed. On the other hand, traditional optimization algorithms tend to find local minima quickly, but the optimal point achieved depends on the minima’s regions of attraction. These two kind of algorithms have complementary natures, which makes them good candidates for creating a hybrid algorithm: the evolutionary algorithm explores the space and provides initial conditions for the local optimization, which then finds minima quickly. Although this does create better results, it only explains the performance on the ZDT6 problem, since the other problems did not enter the stochastic phase. In order to understand the algorithm’s behavior, we must keep in mind that each new point added by the algorithm is solving a very different problem. Since the previous points that are considered during the hypervolume optimization change as more points are added, the objective surface for each new point is different from the previous ones and takes into account the already achieved portion of the hypervolume. To visualize this, supposed that the hypervolume’s gradient is defined over previously found points and one previous solution is used as the initial condition for the gradient-based exploitation to find a new point to be added to the solution set. Although the initial condition was a local optimum for a previous problem, it is not a local optimum to the current problem, because any small change that creates a non-dominated point will improve the total hypervolume. Therefore, we do not need to worry about the new optimization converging to a previous solution point because the problem landscape is different and different local minima will be found, increasing the total hypervolume. The deterministic exploration is only required because the hypervolume’s gradient is not defined at the border of the hypervolume, so a new independent point must be found. This explains the performance improvement over ZDT1 to ZDT4, because every added point improves the hypervolume as much as it can do locally, so that an improvement is guaranteed to happen. Evolutionary algorithms, on the other hand, use function evaluations without guarantees of improvement of the total hypervolume, since dominated solutions can be found. Moreover, although a local optimum found during exploitation may not be an efficient solution due to irregularities in the objective surface, the experiments show that this is not the case most of the time, since the P-distance of the solutions found are generally zero. This result is expected, since the hypervolume is maximal when computed over points in the Pareto set, and the performance on all ZDT problems provide support to this claim. We must highlight that we are not saying that evolutionary algorithms should not be used at all, but that they should 10 be applied whenever traditional optimization methods are not able to solve the problem. This is the case of the ZDT6, for instance, where an evolutionary algorithm was required to provide initial conditions for the exploitation. We consider very important to have alternative methods that are better on a subset of the problems and to use them when a problem from such subset is present. This is exactly what the H2MA does: when the traditional optimization is not able to find an answer, which indicates that the problem is outside of the subset with which it can deal, an evolutionary algorithm, which is able to handle a superset class of problems, is used until the problem becomes part of the subset again, establishing a switching behavior that takes advantage of both algorithms. V. C ONCLUSION This paper proposed the Hybrid Hypervolume Maximization Algorithm (H2MA) for multi-objective optimization, which tries to maximize the hypervolume one point at a time. It first tries to perform deterministic local exploration and, when it gets stuck, it switches to stochastic global exploration using an evolutionary algorithm. The optimization algorithm used during deterministic optimization is problem-dependent and can be given by a gradient-based method, when the decision space is continuous, or a hill-climbing method, when the decision space is discrete. Here we have explored solely continuous decision spaces. The algorithm was compared with state-of-the-art algorithms for multi-objective optimization, namely NSGA-II, SPEA2, and SMS-EMOA on the ZDT problems. Despite using numeric gradient for the objective functions, which increases the number of function calls, the algorithm consistently provided a higher hypervolume for the same number of function evaluations when compared to the aforementioned evolutionary algorithms. Only for the ZDT3 the performance was slightly reduced due to the discontinuous nature of the Pareto frontier, which causes a discontinuity in the hypervolume, not properly handled by gradient-based methods. Moreover, for all problems except for ZDT6, all the solutions found by the algorithm were over the Pareto frontier, which makes them efficient solutions. For the ZDT6, the median case also had all solutions over the Pareto frontier, but the use of the stochastic exploration not always guided to a solution at the Pareto frontier. Nonetheless, the obtained solutions were better than those provided by the evolutionary algorithms. Moreover, the solutions provided for ZDT1 to ZDT4 achieved high performance using only the deterministic part of the algorithm. Evolutionary algorithms usually have better performance when their populations are larger, so that diverse individuals can be selected for crossover. However, most of the time people do not require many options, so the H2MA presents itself as an alternative choice for finding a good set of solutions at a lower computational cost in most problems, although it does not limit the computational burden and the number of points found. If the problem has more reasonable objectives than ZDT6, which was designed with an extreme case in mind, we can expect that many points will be found by the deterministic mechanisms, which makes the algorithm more reliable. Moreover, the solutions found should be efficient, which is characterized by a low P-distance, and diverse on the objectives, which is characterized by a larger hypervolume when only efficient solutions are considered. Future work should focus on using surrogates to reduce the number of evaluations [18], [19], [20]. Although the H2MA is very efficient on its evaluations, the numeric gradient may consume lots of evaluations and be unreliable for complicated functions, as their implementation can cause numerical errors larger than the step used. Using a surrogate, the gradient can be determined directly and less evaluations are required. Another important research problem is to find a new algorithm for computing the hypervolume, since existing algorithms are mainly focused on computing the hypervolume given a set of points [21]. Since the solution set is constructed one solution at a time in the H2MA, a recursive algorithm that computes the hypervolume of X ∪ {x} given the hypervolume of X should reduce the computing requirement. A PPENDIX ZDT1: f1 (x) = x1 ZDT2: (4a) f2 (x) = g(x)h(f1 (x), g(x)) n 9 X xi g(x) = 1 + n − 1 i=2 p h(f1 (x), g(x)) = 1 − f1 (x)/g(x) (4b) (4c) (4d) f1 (x) = x1 (5a) f2 (x) = g(x)h(f1 (x), g(x)) n 9 X xi g(x) = 1 + n − 1 i=2 (5b) h(f1 (x), g(x)) = 1 − (f1 (x)/g(x))2 (5c) (5d) ZDT3: f1 (x) = x1 f2 (x) = g(x)h(f1 (x), g(x)) n 9 X xi g(x) = 1 + n − 1 i=2 s f1 (x) f1 (x) h(f1 (x), g(x)) = 1 − − sin(10πf1 (x)) g(x) g(x) (6a) (6b) (6c) (6d) ZDT4: f1 (x) = x1 (7a) f2 (x) = g(x)h(f1 (x), g(x)) (7b) n X (x2i − 10 cos(4πxi )) g(x) = 1 + 10(n − 1) + i=2 (7c) p h(f1 (x), g(x)) = 1 − f1 (x)/g(x) (7d) 11 ZDT6: f1 (x) = 1 − exp(−4x1 ) sin6 (6πx1 ) (8a) f2 (x) = g(x)h(f1 (x), g(x)) !0.25 n X xi g(x) = 1 + 9 n−1 i=2 (8b) h(f1 (x), g(x)) = 1 − (f1 (x)/g(x))2 [21] N. Beume, C. M. Fonseca, M. López-Ibáñez, L. Paquete, and J. Vahrenhold, “On the complexity of computing the hypervolume indicator,” Evolutionary Computation, IEEE Transactions on, vol. 13, no. 5, pp. 1075–1082, 2009. (8c) (8d) ACKNOWLEDGMENT Conrado S. Miranda received his M.S. degree on Mechanical Engineering and his B.S. in Control and Automation Engineering from the University of Campinas (Unicamp), Brazil, in 2014 and 2011, respectively. He is currently a Ph.D. student at the School of Electrical and Computer Engineering, Unicamp. His main research interests are machine learning, multi-objective optimization, neural networks, and statistical models. The authors would like to thank CNPq for the financial support. R EFERENCES [1] K. Miettinen, Nonlinear Multiobjective Optimization. Springer US, 1999. [2] K. Deb, Multi-Objective Optimization Using Evolutionary Algorithms. John Wiley & Sons, 2001. [3] K. Deb, A. Pratap, S. Agarwal, and T. A. M. T. Meyarivan, “A fast and elitist multiobjective genetic algorithm: NSGA-II,” Evolutionary Computation, IEEE Transactions on, vol. 6, no. 2, pp. 182–197, 2002. [4] E. Zitzler, M. Laumanns, and L. Thiele, “SPEA2: Improving the strength Pareto evolutionary algorithm,” 2001. [5] E. Zitzler, D. Brockhoff, and L. Thiele, “The hypervolume indicator revisited: On the design of Pareto-compliant indicators via weighted integration,” in Evolutionary multi-criterion optimization. Springer, 2007, pp. 862–876. [6] E. Zitzler, L. Thiele, M. Laumanns, C. M. Fonseca, and V. G. Da Fonseca, “Performance Assessment of Multiobjective Optimizers: An Analysis and Review,” Evolutionary Computation, IEEE Transactions on, vol. 7, no. 2, pp. 117–132, 2003. [7] A. Auger, J. Bader, D. Brockhoff, and E. Zitzler, “Theory of the hypervolume indicator: optimal µ-distributions and the choice of the reference point,” in Proceedings of the tenth ACM SIGEVO workshop on Foundations of genetic algorithms. ACM, 2009, pp. 87–102. [8] N. Beume, B. Naujoks, and M. Emmerich, “SMS-EMOA: Multiobjective selection based on dominated hypervolume,” European Journal of Operational Research, vol. 181, no. 3, pp. 1653–1669, 2007. [9] D. Bertsekas, Nonlinear programming. Athena Scientific, 1999. [10] D. Luenberger and Y. Ye, Linear and Nonlinear Programming. Springer US, 2008. [11] P. A. N. Bosman, “On gradients and hybrid evolutionary algorithms for real-valued multiobjective optimization,” Evolutionary Computation, IEEE Transactions on, vol. 16, no. 1, pp. 51–69, 2012. [12] M. Emmerich and A. Deutz, “Time Complexity and Zeros of the Hypervolume Indicator Gradient Field,” in EVOLVE-A Bridge between Probability, Set Oriented Numerics, and Evolutionary Computation III. Springer, 2014, pp. 169–193. [13] V. A. S. Hernández, O. Schütze, and M. Emmerich, “Hypervolume Maximization via Set Based Newton’s Method,” in EVOLVE-A Bridge between Probability, Set Oriented Numerics, and Evolutionary Computation V. Springer, 2014, pp. 15–28. [14] E. Zitzler, K. Deb, and L. Thiele, “Comparison of Multiobjective Evolutionary Algorithms: Empirical Results,” Evolutionary Computation, vol. 8, no. 2, pp. 173–195, 2000. [15] K. Deb, “Multi-objective optimization,” in Search methodologies. Springer, 2014, pp. 403–449. [16] F. Biscani, D. Izzo, and C. H. Yam, “A global optimisation toolbox for massively parallel engineering optimisation,” arXiv preprint arXiv:1004.3824, 2010. [17] E. Jones, T. Oliphant, P. Peterson et al., “SciPy: Open source scientific tools for Python,” 2001–, [Online; accessed 2015-05-10]. [Online]. Available: http://www.scipy.org/ [18] Y. Jin, “A Comprehensive Survey of Fitness Approximation in Evolutionary Computation,” Soft computing, vol. 9, no. 1, pp. 3–12, 2005. [19] J. Knowles and H. Nakayama, “Meta-Modeling in Multiobjective Optimization,” in Multiobjective Optimization. Springer, 2008, pp. 245–284. [20] I. Voutchkov and A. Keane, “Multi-objective Optimization Using Surrogates,” in Computational Intelligence in Optimization. Springer, 2010, pp. 155–175. Fernando J. Von Zuben received his Dr.E.E. degree from the University of Campinas (Unicamp), Campinas, SP, Brazil, in 1996. He is currently the header of the Laboratory of Bioinformatics and Bioinspired Computing (LBiC), and a Full Professor at the Department of Computer Engineering and Industrial Automation, School of Electrical and Computer Engineering, University of Campinas (Unicamp). The main topics of his research are computational intelligence, natural computing, multivariate data analysis, and machine learning. He coordinates open-ended research projects in these topics, tackling real-world problems in the areas of information technology, decision-making, pattern recognition, and discrete and continuous optimization.
9cs.NE
arXiv:1609.01763v2 [math.GT] 28 Nov 2016 HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS LEONID POTYAGAILO AND WEN-YUAN YANG Abstract. In this paper, we study the Hausdorff dimension of the Floyd and Bowditch boundaries of a relatively hyperbolic group, and show that for the Floyd metric and shortcut metrics respectively, they are are both equal to a constant times the growth rate of the group. In the proof, we study a special class of conical points called uniformly conical points and establish that, in both boundaries, there exists a sequence of Alhfors regular sets with dimension tending to the Hausdorff dimension and these sets consist of uniformly conical points. 1. Introduction 1.1. Main results. The main goal of the paper is to calculate the Hausdorff dimension of the limit set of a geometrically finite action of a finitely generated group G on a compactum X. Every action G y X we consider is a convergence action, i.e. the induced action on the space of the distinct triples is discontinuous. We say that G y X is minimal if X coincides with the limit set ΛX G (or ΛG if X is fixed) of the action, which is the set of the accumulation points of every orbit Gx (x ∈ X). A point ξ ∈ X is called conical if there exists a sequence of elements gn ∈ G (n ≥ 1) such that the closure of {(gn ξ, gn η) : n ≥ 1} in X 2 is disjoint from the diagonal ∆(X 2 ) = {(x, x) : x ∈ X} for any η ∈ X \ ξ. If, in addition, the set of −1 elements {gn gn+1 : n ≥ 1} is in a uniformly bounded distance from the identity, then ξ is called uniformly conical. A quantitative version of an L-uniformly conical point for L ≥ 0 is given in Definition 2.2. The action of a subgroup H < G on X is parabolic if H fixes a point p ∈ X, called parabolic fixed point. The parabolic action is bounded parabolic if H acts properly and cocompactly on X \ {p}. We will always assume that the action of the whole group G is non-parabolic so there is no a global fixed point. A minimal non-parabolic action G y X is called geometrically finite (or relatively hyperbolic) if every point x ∈ X is either conical or bounded parabolic (cf. Definition 2.2). The stabilizer of a parabolic point is a maximal parabolic subgroup of G. We denote by P the set of maximal parabolic subgroups and call it peripheral system for the action. A group is called relatively hyperbolic with respect to P if G admits a geometrically finite action on X with the peripheral system P. If the compactum X on which G acts is metrizable then the action is geometrically finite if and only if the induced action on the space of distinct pairs is co-compact (we say in this case that the action on X is 2-cocompact) [11]. If the opposite is not stated Date: April 11, 2016. 2000 Mathematics Subject Classification. Primary 20F65, 20F67. This research is supported by the ERC starting grant GA 257110 RaWG and by ANR grant BLAN2011BS0101304. 1 2 LEONID POTYAGAILO AND WEN-YUAN YANG we will always assume that a relatively hyperbolic group is finitely generated and so X is metrizable. Let G be a group with a finite generating set S. Assume that 1 ∈ / S and S = S −1 . Consider the word metric dS on G. Denote B(n) = {g ∈ G : dS (1, g) ≤ n} for n ≥ 0. The growth rate δG,S of G relative to S is the limit log ]B(n) . n Recall that Floyd completion of a group G generated by S is the Cauchy completion of the Cayley graph G (G, S) equipped with the distance ρoλ obtained by rescaling the length of an edge e ∈ G (G, S) by a scalar function λd(e,o) for a fixed λ ∈]0, 1[ and a basepoint o ∈ G. The distance ρoλ is called Floyd distance at o, and we use the notation ρ if o and λ are clear from the context (see Subsection 2.2 for more details). We denote by Gλ and ∂λ G the corresponding Floyd completion and its boundary respectively. By V. Gerasimov’s theorem [12, Proposition 3.4.6] for every finitely generated relatively hyperbolic group the space ∂λ G is the universal pullback space for every geometrically finite action of G y X in the sense that there exists an equivariant continuous mapping F : ∂λ G → X (called Floyd map). A. Karlsson proved that the action of G on the compact space Gλ is a convergence action [19]. Let ∂λc G (resp. ∂λuc G) denote the set of all (resp. uniformly) conical points for the action. We denote by Hdimρ the Hausdorff dimension with respect to ρ = ρλ,o . The first main result of the paper is the following. δG,S = lim n→∞ Theorem 1.1. Let G be a relatively hyperbolic group with a finite generating set S. There exists a constant 0 < λ0 < 1 such that Hdimρ (∂λ G) = Hdimρ (∂λc G) = Hdimρ (∂λuc G) = − δG,S log λ for any λ ∈ [λ0 , 1). Remark. Note that for a hyperbolic group the Floyd metric is bilipschitz equivalent to the visual metric on the Gromov boundary (with appropriate choices of parameters). Even though this result seems to be a folklore, we have not found the corresponding reference in the literature. We provide a proof of it in the Appendix. As a consequence the result of M. Coornaert [6] for the hyperbolic groups is a partial case of Theorem 1.1. Note that the action of G on the Floyd boundary ∂λ G is not necessarily geometrically finite, as it is shown in [29] for Dunwoody’s inaccessible groups. In particular the Floyd boundary is not in general homeomorphic to the limit set ΛG. So it is natural to ask if an analogous result to Theorem 1.1 is true for ΛG. Consider a minimal geometrically finite action of G on a compact X = ΛG. It is shown in [13] that the Floyd metric ρ transferred by the Floyd map F : ∂λ G → ΛG is a metric on ΛG, called shortcut metric, and is denoted by ρ̄ (see subsection 2.2). Our next goal is to calculate the Hausdorff dimension Hdimρ̄ of ΛG with respect to ρ̄. Denote by Λuc G the set of uniformly conical points of ΛG. The following theorem provides the same conclusion for the shortcut metric as in the case of the Floyd metric. Theorem 1.2. Let G be a group with a finite generating set S acting geometrically finitely on a compactum X = ΛG. Then there exists a constant 0 < λ0 < 1 such HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 3 that Hdimρ̄ (ΛG) = Hdimρ̄ (Λuc G) = − δG,S log λ for any λ ∈ [λ0 , 1). The above theorems implies the following. Corollary 1.3. For any shortcut metric ρ̄, the Hausdorff dimension of the limit set of every relatively hyperbolic action of a group G is constant and is equal to Hdimρ (∂λ G) = Hdimρ̄ (ΛG) = − δG,S log λ for any λ ∈ [λ0 , 1[ where λ0 ∈]0, 1[ is a fixed number. We say that a metric space X is Ahlfors Q-regular for a constant Q > 0 if there exists a Borel measure µ on X such that the following holds µ(B(x, r))  rQ for any open ball B(x, r) centered at x ∈ X of radius r > 0, where the symbol  denotes the bilipschitz equivalence between two quantities: C −1 rQ ≤ µ(B(x, r)) ≤ CrQ for a uniform constant C. Our next main result shows that the Hausdorff dimension of the Floyd boundary and of the limit set of a relatively hyperbolic action can be well-approximated by a sequence of Ahlfors regular subsets. Theorem 1.4. Let G be a finitely generated relatively hyperbolic group with a finite generating set S. Then there exists a sequence of Ahlfors Qi -regular subsets Xi in ∂λ G or ΛG such that Xi consists of uniformly conical points, 0 < Qi < δG,S and Qi → δG,S as i → ∞. The proof of Theorem 1.4 is based on the existence of an L-transitional geodesic tree T = T (L) ⊂ G (Lemma 3.7) depending on a parameter L  0. Every vertex of T is a central point of a geodesic interval, whose size depends on L, and which belongs to a neighbourhood of a left coset (horosphere) gP where P ∈ P (see Subsection 2.4). We show that the endpoints of such a tree are L-uniformly conical (Lemma 2.12). However it is not true in general that every uniformly conical point appears as an endpoint of an L-transitional tree for a bounded L (see the discussion after Lemma 2.12). The proof of Theorem 1.4 shows that the Hausdorff dimension of the endpoints of L-transitional trees well approximate the Hausdorff dimension of the Floyd boundary (or the limit set) if L → ∞. We recapitulate all these facts in the following. Corollary 1.5. There exists a sequence Ti of Li -transitional trees such that Xi = ∂Ti are Ahlfors Qi -regular spaces from the statement of Theorem 1.4. Our next result given in Section 5 generalizes the result of [14] that the geodesics of the Floyd metrics are approximated by so called tight paths. Considering generalized tight paths (see Definition 5.9) we show that they approximate the geodesics with respect to the shortcut metric defined on the limit set. uc uc Let ∂L,o G and Λuc L,o G denote subsets of uniformly conical points in ∂λ G and uc Λ G depending on the above parameter L (see Subsection 2.4 for the precise definitions). The following result is central in this Section. 4 LEONID POTYAGAILO AND WEN-YUAN YANG Theorem 1.6 (Proposition 5.13). Under the assumptions of Theorem 1.1 there exists 0 < λ0 < 1 such that for any L > 0 and λ ∈ [λ0 , 1[ we have uc ρλ,o (ξ, η) L λn , ∀ ξ 6= η ∈ ∂L,o G and ρ̄λ,o (ξ, η) L λn , ∀ ξ 6= η ∈ Λuc L,o G, where n = d(o, [ξ, η]). 1.2. Historical remarks and motivations. We provide here a short history of the study of the Hausdorff dimension of the limit set of various convergence actions: Kleinian, hyperbolic and relatively hyperbolic. The identification of the Hausdorff dimension with the critical exponent of Poincaré series was first established by S. Patterson [21]. He introduced a probability measure on the limit set of the convex-cocompact Fuchsian groups, and proved that up to a constant it is equal to the Hausdorff measure. D. Sullivan generalized this result and constructed such measures (called since then Patterson-Sullivan measures) on the limit sets of geometrically finite Kleinian groups acting on the hyperbolic space Hn of dimension n [25]. To finish the discussion of the case of Kleinian groups, we note the result of C. Bishop and P. Jones who proved in [1] that for a non-elementary Kleinian group acting on the hyperbolic 3-space the Hausdorff dimension of the conical limit set is equal to the critical exponent of the Poincaré series (compare with our Theorems 1.1 and 1.2). The latter results were generalized by F. Paulin [22] to discrete groups of isometries of Riemannian manifolds of strictly negative curvature. M. Coornaert has generalized the results of Patterson-Sullivan to the class of word-hyperbolic groups [6]. In particular he proved that the Hausdorff dimension of the (Gromov) boundary of such a group with respect to the visual metric is equal to the critical exponent of the Poincaré series. A natural question arises whether Coornaert’s theorem holds for the class of relatively hyperbolic groups. However it was shown by M. Burger and S. Mozes that if G is a closed subgroup of the isometry group of a CAT(−1) space X and the parabolic subgroups of G are not amenable then the critical exponent is infinite [4, Proposition 1.6]. Such an example of a relatively hyperbolic group whose parabolic subgroups contain non-cyclic free subgroups was constructed by D. Gaboriau and F. Paulin [10, Example 1, p. 189]. By [22] it then follows that the Hausdorff dimension of the limit set for the action of such a group with respect to the visual metric is infinite too. So in order to generalize Coornaert’s theorem to the class of relatively hyperbolic groups one must replace the visual metric by a different one. The Floyd metric obtained by a rescaling procedure of the word metric is a natural candidat as it extends to the Floyd compactification of a group. Furthermore by a theorem of V. Gerasimov there exists an equivariant and continuous map from the Floyd boundary ∂λ G to the limit set of any relatively hyperbolic action of G [12]. In particular, if G is hyperbolic, the Floyd and Gromov boundaries are bilipschitz equivalent for some exponential Floyd function. M. Bourdon has observed (private communication) that the Hausdorff dimension of the Floyd boundary of a relatively hyperbolic group, calculated with respect to the Floyd metric obtained with the exponential rescaling function λn (λ ∈ (0, 1)) is δG,S always upper bounded by − log λ (cf. Lemma 4.1). However the question whether it HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 5 admits a lower strictly positive bound, which is equal to the same constant remained open. This was our first motivation giving rise to Theorem 1.1. Theorem 1.2 is then obtained by transferring the Floyd metric from the Floyd boundary ∂λ G to the limit set ΛG of the geometrically finite action using the above Gerasimov’s map. The lower bound estimate for the Hausdorff dimension in Theorems 1.1 and 1.2 follow from Theorem 1.4 providing the approximation of the boundary points by Ahlfors regular subsets Xi . These subsets entirely consist of uniformly conical points which are the space of ends of subtrees of the Cayley graph of G. Note that the idea of such an approximation by trees is quite standard in both settings: hyperbolic (see e.g. [18, 6.1]) or Kleinian (see [1]). However these constructions of trees essentially use the hyperbolicity of the ambiant space. The latter property is not true for a relatively hyperbolic group: the Cayley graph is not in general hyperbolic and the relative Cayley graph is hyperbolic but the action on the set of vertices is not proper. The approximating trees constructed in the paper admits certain periodicity allowing us to obtain a Patterson-Sullivan measure µ on Xi also having periodic properties. Theorem 1.4 then shows that these measures converge to the Hausdorff measure on a subset of uniformly conical points and whose dimension coincides with the full Hausdorff dimension of the ambiant space. Acknowledgments. The authors are deeply grateful to Marc Bourdon for several discussions motivating our initial interest to the subject of the paper, we owe the proof of Lemma 4.1 to him as well as the references to the papers [4] and [10]. We also thank Misha Kapovich who indicated us that the bilipschitz equivalence between the Floyd and the visual metrics needs to be justified (see the Remark above). During the work on this paper the first author was partially supported by the ANR grant DiscGroup (BLAN 2011 BS01 013 04). He is also very grateful to the Max-Planck-Institut für Mathematik in Bonn for the hospitality and support during his research stay at the Institute where a part of the work was done. The second author is grateful to the CNRS for providing him a research fellowship at the University of Lille 1, and was partially supported by the ERC starting grant GA 257110 RaWG when he was a postdoc in Orsay. 2. Preliminaries 2.1. Notations and Conventions. Let (Y, d) be a geodesic metric space. Given a subset X and a number r ≥ 0, let Nr (X) = {y ∈ Y : d(y, X) ≤ r}. For x ∈ Y denote B(x, r) = Nr ({x}). Sometimes, we will write Bd (x, r) to emphasize the metric d. Given a point y ∈ Y and a subset X ⊂ Y , let ProjX (y) be the set of points x in X such that d(y, x) = d(y, X). The projection of a subset A ⊂ Y to X is then ProjX (A) = ∪a∈A ProjX (a). We always consider a rectifiable path α in Y with arc-length parametrization. Denote by `(α) the length of α, and by α− , α+ the initial and terminal points of α respectively. Let x, y ∈ α be two points which are given by parametrization. Then denote by [x, y]α the parametrized subpath of α going from x to y. We also denote by [x, y] a choice of a geodesic in Y between x, y ∈ Y . A path α is called a c-quasi-geodesic for c ≥ 1 if the following holds `(β) ≤ c · d(β− , β+ ) + c 6 LEONID POTYAGAILO AND WEN-YUAN YANG for any rectifiable subpath β of α. Let α, β be two paths in Y . Denote by α · β (or simply αβ) the concatenated path provided that α+ = β− . A path α going from α− to α+ induces a first-last order as follows. Given a property (P), a point z on α is called the first point satisfying (P) if z is among the points w on α with the property (P) such that `([α− , w]α ) is minimal. The last point satisfying (P) is defined in a similar way (replacing [α− , w]α by [w, α+ ]α ). Let f, g be real-valued functions with domain understood in the context. Then f ≺ci g means that there is a constant C > 0 depending on parameters ci such that f < Cg, and ci is defined similarly. We use the symbol ci if both inequalities are true. For simplicity, we omit ci if they are some universal constants. Denote by k · k the diameter of a set in a metric space. Recall the notion of Hausdorff measures in a metric space. Definition 2.1. Let X be a subset in a metric space (Y, d). Given numbers , s ≥ 0, define ∞ X [ s Hs (X) = inf{ kUi k : X ⊂ Ui , Ui ⊂ Y, kUi k ≤ }. i=1 Define Hs (X) = lim Hs (X), the s-dimensional Hausdorff measure of X. The →0 Hausdorff dimension of X is defined as follows, Hdimd (X) = inf{s ≥ 0 : Hs (X) = 0} = sup{s ≥ 0 : Hs (X) = ∞}. By convention, set inf ∅ = sup{s ∈ R≥0 } = ∞. Thus, Hdimd X ∈ [0, ∞]. Note that Hs (X) may be zero for s = Hdimd X. 2.2. Floyd boundary and relative hyperbolicity. Let G be a group with a finite generating set S. Assume that 1 ∈ / S and S = S −1 . Let G (G, S) be the Cayley graph of G with respect to S. Denote by dS (or simply by d if there is no ambiguity) the word metric on G (G, S). Fix 0 < λ < 1 and a basepoint o ∈ G. We define a Floyd metric ρλ,o as follows. The Floyd length lλ,o (e) of an edge e in G (G, S) is λn , where n = d(o, e). The Floyd length lλ,o (γ) of a path γ is the sum of Floyd lengths of its edges. This induces a length metric ρλ,o on G (G, S), which is the infimum of Floyd lengths of all possible paths between two points. Let Gλ be the Cauchy completion of G with respect to ρλ,o . The complement ∂λ G of G (G, S) in Gλ is called Floyd boundary of G. The ∂λ G is called non-trivial if ]∂λ G > 2. We refer the reader to [9], [12], [13], [19] for more details. By construction, the following equivariant property holds (1) ρλ,o (x, y) = ρλ,go (gx, gy) for any g ∈ G. The Floyd metrics with different basepoints are related by a biLipschitz inequality: (2) 0 λd(o,o ) ≤ 0 ρλ,o (x, y) ≤ λ−d(o,o ) ρλ,o0 (x, y) for any two points o, o0 ∈ G. We now recapitulate few standard definitions concerning geometrically finite convergence actions which will be often used further. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 7 Definition 2.2. Let X be a compact metrizable space on which G admits a minimal and non-trivial convergence action by homeomorphisms. (1) A point ξ ∈ X is called conical if there exists a sequence of elements gn ∈ G (n ≥ 1) such that the closure of {gn (ξ, η) : n ≥ 1} in X 2 is disjoint from the diagonal ∆(X 2 ) = {(x, x) : x ∈ X} for any η ∈ X \ ξ. −1 If, in addition, there exists L > 0 such that d(1, gn gn+1 ) ≤ L, then ξ is called L-uniformly conical (or uniformly conical if the constant L is not important). (2) A point ξ ∈ X is called bounded parabolic if the stabilizer Gξ of ξ in G is infinite, and acts properly and co-compactly on X \ ξ. The subgroup Gξ is called maximal parabolic. (3) A convergence group action of G on X is called geometrically finite if every limit point ξ ∈ X is either a conical point or a bounded parabolic point. As it was mentioned in the Introduction a pair (G, P) is relatively hyperbolic if G admits a geometrically finite group action on a compact metrizable space X such that P coincides with the collection of maximal parabolic subgroups (peripheral system). Using the relative Cayley graph one can construct the limit set ΛG of the action with the boundary of this graph [3]. We will often call Bowditch boundary the limit set ΛG of a geometrically finite action. Bowditch proved that if G is finitely generated then ΛG up to an equivariant homeomorphism depends only on the pair (G, P) [2]. We also note the same result still holds in general case when G is not finitely generated [16, Corollary 6.1.e]. The following result establishes the following universal pullback property of the Floyd boundary. Proposition 2.3. [12] Suppose (G, P) is a relatively hyperbolic pair. Then there exists 0 < λ0 < 1 such that for any λ ∈ [λ0 , 1) there exists a continuous G-equivariant surjective map (called Floyd map): Fλ : ∂λ G → ΛG. Let Gp be the stabilizer of a parabolic point p ∈ X for the action G y X = ΛG. Denote by Λ∂λ G (Gp ) and ∂λ Gp the limit set of Gp for its action on the Floyd boundary ∂λ G of G, and the Floyd boundary of Gp respectively. The following result precisely describes the kernel of the Floyd map. Proposition 2.4. [13] Under the assumption of Proposition 2.3, the following holds Fλ−1 (p) = Λ∂λ G (Gp ) = ∂λ Gp for any parabolic point p in ΛG. Moreover, Fλ−1 (p) consists of one point if p is a conical point. We equip ΛG with a shortcut metric as follows: let ω = {(η, ξ) ∈ ∂λ G × ∂λ G : Fλ (ξ) = Fλ (η)} be the relation on ∂λ G given by the Floyd map Fλ : ∂λ G → ΛG. For any ξ, η ∈ Gλ , define a pseudo-distance ρ̃λ,o (ξ, η) on Gλ to be (3) n X ρ̃λ,o (ξ, η) = inf { ρλ,o (ξi , ηi ) : (ηi , ξi+1 ) ∈ ω, 1 ≤ i < n, ξ1 = ξ, ηn = η}. n≥1 i=1 8 LEONID POTYAGAILO AND WEN-YUAN YANG We have (4) ∀ξ, η ∈ Gλ : ρ̃λ,o (ξ, η) ≤ ρλ,o (ξ, η), and it is a maximal pseudo-metric on Gλ ×Gλ satisfying this inequality. It is shown g := ΛG t G (G, S) (called attractor sum) is compact. The in [12] that the space ΛG g is convergence such that its restriction on G (G, S) is the identity action G y ΛG and on ΛG it coincides with the initial action. Furthermore the Floyd map Fλ extends to an equivariant continuous map (denoted by the same symbol): g Fλ : Gλ → ΛG such that Fλ |G ≡ id. Pushing forward ρ̃λ,o with Fλ , we obtain a shortcut pseudog: metric on ΛG g : ρ̄λ,o (x, y) = ρ̃λ,o (F −1 (x), F −1 (y)), (5) ∀x, y ∈ ΛG λ λ g (see [13, Section 3] for details). By the which turns out to be a real metric on ΛG above construction, one can easily see that the shortcut metrics ρ̄λ,o satisfy the properties (1) and (2) too. Convention 2.5. Since now on we will always suppose that λ ∈ [λ0 , 1) where λ0 is given by Proposition 2.3. We omit the index λ in lλ,o , ρλ,o and ρ̄λ,o if λ is given in the context. Finally, we recall the following Visibility Lemma. Lemma 2.6 (Visibility lemma). [19] There is a function ϕ : R≥0 → R≥0 such that for any v ∈ G and any geodesic γ in G (G, S), we have if lv (γ) ≥ κ, then d(v, γ) ≤ ϕ(κ). Remark. The same result is valid for quasi-geodesics or more general Θ-geodesics where Θ : N → G is a polynomial distortion function [13, Lemma 5.1]. 2.3. Floyd geodesics. In this subsection, we provide a few basic tools to study Floyd geodesics. We say that a path α : Z → G (G, S) ends at ξ ∈ ∂λ G if ξ = limn→∞ α(n). Denote in this case α+ = ξ, and α− = limn→−∞ α(n). It follows from Lemma 2.6 that every geodesic ray ends at a point of the Floyd boundary. Moreover, Gλ is a geodesic metric space and is a visual boundary: any two distinct points ξ, η ∈ Gλ are connected by a bi-infinite word geodesic belonging to the Cayley graph [13, Proposition 2.4]. We note that a Floyd geodesic between ξ, η does not necessarily belong to the graph (e.g. an example of such situation is given by the Floyd geodesic [n, +∞] ∪ [−∞, −n] between −n and n for the group Z + Z). A method to overcome this problem was proposed in [14]. It consists in introducing a special type of paths called tight paths (see Definition 5.1 in section 5) situating in the Cayley graph which will approximate well the Floyd geodesics. To provide a certain development of this method we will need the following preliminary statements. Lemma 2.7. [14, Lemma 7.2] For any l > 0, there exists 0 < λ0 < 1 such that the following property hold for any λ ∈ [λ0 , 1). Let x, y ∈ G (G, S) such that d(x, y) ≤ l, and p be a path with α− = x such that `(α) ≥ d(x, y) + 1. Then lλ,o (α) > ρλ,o (x, y). In particular, the ρλ,o -geodesic between x, y is a geodesic in G (G, S) HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 9 We consider the following shortening procedure introduced in [14]: consider two points x, y ∈ Gλ , we take a sequence of paths γn in G (G, S) such that (γn )− → x, (γn )+ → y and lλ,o (γn ) → ρλ,o (x, y). For every l > 0 we can choose λ0 ∈]0, 1[ such that γn is an l-local geodesic. Indeed, if a segment between two points of γn at distance at most l is not a geodesic, then it can be replaced by a geodesic. Applying this procedure several times, we obtain a l-local geodesic, still denoted by γn , whose Floyd length is not increased by Lemma 2.7 (see Lemma 5.8 for more details). The following lemma states that word geodesic rays are also Floyd and shortcut geodesics. Lemma 2.8. Let o ∈ G be a base point and γ be a geodesic ray with γ− = o. Then for any v ∈ γ we have lλ,o ([v, x]γ ) = ρ̄λ,o (v, y), and lλ,o ([v, x]γ ) = ρλ,o (v, x), where x = γ+ ∈ ∂λ G and y = F (x) ∈ ΛG where F is the Floyd map given in Proposition 2.3. Proof. We only prove the result for the shortcut metric. In the case of Floyd metric a straightforward calculation shows that the geodesic ray γ as well as every its subray is also a ρλ,o -Floyd geodesic. By definition (3) of a shortcut metric, for any n ∈ N, there exist pairs (ηi , ξi+1 ) ∈ ω where 1 ≤ i < m such that ρ̄λ,o (v, y) ≥ X ρλ,o (ξi , ηi ) − 1≤i≤m 1 , 2n where ξ1 = v, ηm = x. Every geodesic ray [o, η1 ] is also a Floyd geodesic so we can 1 . It follows choose η̃1 ∈ [o, η1 ] such that ρλ,o (η̃1 , η1 ) ≤ 2n ρ̄λ,o (v, y) ≥ ρλ,o (v, η̃1 ) − 1 . n Choose w ∈ [v, y]γ such that d(v, w) = d(v, η̃1 ) = m. Then the following is true: (6) ρλ,o (v, η̃1 ) ≥ ρλ,o (v, w). Indeed, connect v and η̃1 by a curve α. There exists a point u = α(t0 ) such that d(v, u) = m and choose a sub-curve α0 = [v, u]α containing m edges. Since γ is a word geodesic, for the k-th edge e ∈ α0 and the k-th edge e1 ∈ [v, w]γ we have lλ,o (e) ≥ lλ,o (e1 ) (k ∈ {0, ..., m}). Then lλ,o (α) ≥ lλ,o (α0 ) ≥ ρλ,o (v, w). So (6) follows. 10 LEONID POTYAGAILO AND WEN-YUAN YANG x η 1 η 1 u w α v= ξ 1 o We have 1 1 ≥ ρλ,o (v, w) − ≥ 2n n 1 λn − . ≥ lλ,o ([v, x]γ ) − 1−λ n Passing to the limit we obtain ρ̄λ,o (v, y) ≥ lλ,o ([v, x]γ ) = ρλ,o (v, x). Since ρλ,o (v, x) ≥ ρ̄λ,o (v, y), we conclude that lλ,o ([v, γ+ ]γ ) = ρ̄λ,o (v, γ+ ).  ρ̄λ,o (v, y) ≥ ρλ,o (v, η̃1 ) − 2.4. Transitional paths and uniformly conical points. In this subsection we shall give a description of uniformly conical points in ΛG using the geometry of Cayley graph. Let (G, P) be a relatively hyperbolic pair. Denote P = {gP : g ∈ G, P ∈ P̃}, where P̃ is a maximal set of non-conjugate subgroups in P. Following [13] we call the elements of P horospheres. Definition 2.9. Fix , R > 0. Let γ be a path in G (G, S) and v ∈ γ a vertex. Given X ∈ P, we say that v is (, R)-deep in X if γ ∩ B(v, R) ⊂ N (X). If v is not (, R)-deep in any X ∈ P, then v is called an (, R)-transition point of γ. The following lemma together with Lemma 2.6 will be invoked several times. Lemma 2.10. (1) For any c ≥ 1, R > 0, there exists  = (c), κ = κ(, R) > 0 such that for any c-quasi-geodesic γ and an (, R)-transitional point v in γ, we have ρv (γ− , γ+ ) ≥ ρ̄v (γ− , γ+ ) > κ. (2) For any c ≥ 1, κ,  > 0 there exists R = R(c, κ, ) > 0 such that for any c-quasi-geodesic γ and a point v ∈ γ with ρ̄v (γ− , γ+ ) > κ, we have that v is an (, R)-transitional point of γ. Proof. Let us first prove (2). Suppose not, then ∃c ≥ 1, κ,  > 0 : ∀n, ∃ c-quasigeodesics γn and vn ∈ γn such that vn is (, n)-deep and ρ̄vn ((γn )− , (γn )+ ) > κ. Up to a normalization we may assume that vn = v = γn (0). Then γn (] − n, n[) ⊂ N (Xn ) for Xn ∈ P. By compactness of geodesics in the Tikhonoff topology, we obtain a limit horocycle α such that α± = q and every part of α belongs to γn for sufficiently large n (see [14, Prop. 5.2.3] for more details). Then the diameter of ∂(γn ∩ α) with respect to the distance ρv tends to 0. As γn are geodesics whose HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 11 all interior points are in the graph we must have ρ̄v ((γn )− , (γn )+ ) → 0 which is a contradiction. (1). By [13, Corollary 3.9] there exists a constant  = (c) such that for every X ∈ P any c-quasi-geodesic with endpoints in X lies in N (X) (all horospheres are uniformly quasi-convex). For the constants c and  = (c) the statement now follows from [15, Corollary 5.10], following a similar argument as above.  We introduce a special class of paths, which plays an important role in the present study. Definition 2.11. Given , R, L > 0, a path γ in G (G, S) is called (, R, L)-transitional (or simply transitional if the choice of the constants is not important) if for any point v ∈ γ, there exists an (, R)-transitional point w ∈ γ such that `([v, w]γ ) ≤ L. We say that an infinite path γ in G (G, S) is eventually (, R, L)-transitional if there exists v ∈ γ such that [v, γ+ )γ is (, R, L)-transitional. We fix the constant  = (1) > 0 given by Lemma 2.10.1. The following lemma characterizes uniformly conical points as the endpoints of transitional geodesic rays. Lemma 2.12. Let (G, P) be a relatively hyperbolic pair. There exists R > 0 for which tplhe following property is true: a point ξ ∈ ΛG is uniformly conical if and only if some (or any) geodesic ray ending at ξ is eventually an (, R, L)-transitional geodesic ray for some L > 0. Proof of “ ⇒ ”. Since G acts geometrically finitely on ΛG, it follows from [26, Theorem 1C] that there exists δ > 0 such that for any conical point ξ ∈ ΛG, there exists a sequence (gn ) ⊂ G such that for all points η ∈ (ΛG ∪ G) \ ξ one has ρ̄1 (gn ξ, gn η) > δ. Denote r0 := ϕ(δ/2), where ϕ is given by Lemma 2.6. Assume that ξ is an L-uniformly conical point for some L > 0. Let γ = [γ− , ξ[ be a geodesic ray ending at ξ and (gn ) ⊂ G be the above sequence taken for the −1 pair (γ− , ξ). Then ρ̄1 (gn ξ, gn γ− ) = ρ̄gn−1 (ξ, γ− ) > δ/2 and d(1, gn gn+1 ) ≤ L for −1 all n ≥ 1. By Lemma 2.6, γ ∩ B(gn , r0 ) 6= ∅ for n ≥ 1. Let vn ∈ γ such that d(vn , gn−1 ) < r0 . By the inequality (2) such that ρ̄vn (γ− , ξ) > κ where κ = λr0 · δ/2 is a uniform constant. Moreover, d(vn , vn+1 ) ≤ L + 2r0 . Hence, Lemma 2.10.2 gives rise to a uniform constant R for which vn are all (, R)-transitional for n ≥ 1. Proof of “ ⇐ ”. Let γ be an (, R, L)-transitional geodesic ray at ξ = γ+ , and vn (n ≥ 0) a sequence of (, R)-transitional points in γ such that d(vn , vn+1 ) ≤ L and vn → ξ. Then ρ̄vn (γ− , ξ) ≥ κ, where κ > 0 is given by Lemma 2.10.1. Denote gn := vn−1 . Then ρ̄1 (gn γ− , gn ξ) ≥ κ. In other words, {(gn γ− , gn ξ)} lies outside a uniform neighborhood of the diagonal ∆(ΛG2 ). −1 Since the action is convergence the point ξ is conical. As d(1, gn gn+1 ) ≤ L it is uniformly conical.  Remarks. (1) The proof of the “ ⇐ ” direction equally applies to a conical point in Floyd boundary ∂λ G without assuming the geometrical finiteness of the action. (2) The existence of the uniform constant δ > 0 which measures the size of a compact fundamental set for the co-compact action of G on the set of distinct pairs was only used to prove the implication “ ⇒ ” (in order to get a uniform constant R). The existence of such a constant implies that the action of G on a metrizable space ΛG is 2-cocompact; the converse 12 LEONID POTYAGAILO AND WEN-YUAN YANG statement that a 2-cocompact and non-elementary convergence action is geometrically finite is shown in [11], and its proof does not request the metrisability of the space X = ΛG. (3) As a corollary we see that for each L > 0 the set of L-uniformly conical points is G-invariant, although this is not clear at all from the dynamical definition. Corollary 2.13. Let  = (1) > 0 given by Lemma 2.10.1. For any R, L > 0, an (, R, L)-transitional geodesic ray ends at a uniformly conical point ξ ∈ ∂λ G. As another consequence of the proof, we have the following result. Corollary 2.14. Let G y X be a geometrically finite action. Then there exists a constant L > 0 such that for any conical point ξ ∈ X there is a sequence of elements gn ∈ G such that for any geodesic γ ending at ξ, we have [v, ξ[γ ⊂ ∪n≥1 B(gn , L) for some v ∈ γ. Remark. In the setting of Kleinian groups, this property is used to define uniformly conical points, cf. [24]. Here we do not need to assume that G acts geometrically finitely on ∂λ G. Also the corollary holds for “quasi-geodesics” instead of “geodesics”. We setup some notations for future discussions about uniformly conical points. Let , R be given by Lemma 2.12. Denote by Λuc L G the set of uniformly conical points ξ ∈ ΛG such that there exists an (, R, L)-transitional geodesic ray γ ending at ξ. It is obvious that Λuc L G is a G-invariant set. Fixing a basepoint o ∈ G, denote by Λuc L,o G the set of all uniformly conical points ξ ∈ Λuc L G where a geodesic γ between o and ξ is (, R, L)-transitional. uc uc Clearly, G·Λuc L,o G = ΛL G. Thus, the set ΛL,o G can be thought as a fundamental uc domain for the action of G on the set ΛL G. uc G and ∂Luc G on the Similarly, we define the set of uniformly conical points ∂L,o Floyd boundary ∂λ G. By Proposition 2.4, there exists one-to-one correspondence uc between Λuc L G and ∂L G. 2.5. Contracting property. Recall that k · k denotes the diameter of a set in a metric space. Definition 2.15. For c ≥ 1, a subset X is called c-contracting in a metric space Y if there exists µc , Dc > 0 such that the following holds (7) kProjX (γ)k < Dc for any c-quasi-geodesic γ in Y with Nµc (X) ∩ γ = ∅. A collection of c-contracting subsets is referred to as a c-contracting system if µc , Dc depends only on c. A system X has a bounded intersection property if for any  > 0 there exists R = R() > 0 such that kN (X) ∩ N (X 0 )k < R for any two distinct X, X 0 ∈ X. In what follows, our discussion applies to the Cayley graph of a relatively hyperbolic group (G, P) with a finite generating set S. In particular, we are interested in the contracting system with bounded intersection given by the following lemma. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 13 Lemma 2.16. [13] Let P = {gP : g ∈ G, P ∈ P̃}, where P̃ is a complete set of conjugacy representatives in P. There exists R : R>0 → R>0 such that the collection P is a c-contracting system with the R-bounded intersection for each c ≥ 1. Proof. The contracting property is proven in [13, Proposition 8.5], and the bounded intersection is in [13, Corollary 5.7].  The following lemma will be often used further on. Lemma 2.17. Let P be the collection of horospheres in (2.16). For any c ≥ 1, there exist c = (c) > 0 such that for every c-quasi-geodesic γ in G (G, S) and  ≥ c we have: ∀ R ≥ 0, ∃ L = L(, R) > 0 such that the condition max{d(γ− , X), d(γ+ , X)} < , for some X ∈ P, implies that every point z ∈ γ satisfying d(z, γ− ), d(z, γ+ ) > L is (c , R)-deep in X. Proof. The result is proved in [27, Lemma 2.8] for geodesics. We provide below a proof to precise the choice of the constants. By Lemma 2.16, let µc , Dc be the constants such that for any X ∈ P, for any cquasi-geodesic outside Nµc (X), the diameter of its projection to X is upper bounded by Dc . Set c := c(2µc + Dc ) + c. If a c-quasi-geodesic has two endpoints in Nµc (X) for X ∈ P, then it lies in Nc (X). Indeed, if x, y ∈ γ satisfy max{d(x, X), d(y, X)} ≤ µc and ]x, y[γ ∩Nµc (X) = ∅, then by Lemma 2.16, d(x, y) ≤ 2µc + Dc . Since γ is c-quasi-geodesic we have `([x, y]γ ) ≤ c and [x, y]γ ⊂ Nc (X). Set L = c(2 + Dc ) + c + R for  ≥ c . We first claim γ ∩ Nµc (X) 6= ∅. Otherwise, we obtain using projection the following 2L ≤ `(γ) ≤ cd(γ− , γ+ ) + c ≤ c(2 + Dc ) + c. This gives a contradiction by the choice of L. Thus, there exist the entry point x and the exit point y of γ in Nµc (X). By the same argument one obtains max{`([γ− , x]γ ), `([y, γ+ ]γ )} ≤ c( + µc + Dc ) + c < L. Since min{d(z, γ− ), d(z, γ+ )} > L, we have z ∈ [x, y]γ . Then we obtain min{d(x, z), d(z, y)} ≥ L − ( + µc + Dc ) > R. By definition of c , we have [x, z]γ ⊂ Nc (X) and [z, y]γ ⊂ Nc (X). So z is (c , R)-deep in X.  Remark. By the proof, we actually have c > µc , where µc is uniform for every X ∈ P by Lemma 2.16. In what follows, we take constants , R as in Convention 2.18. Convention 2.18 (About c , Rc ). When talking about (c , Rc , L)-transitional c-quasigeodesics, or (c , Rc )-transitional and (c , Rc )-deep points in a c-quasi-geodesic, we assume without explicitely specifying the quantifiers: (1) c = (c) > µc to satisfy Lemmas 2.10 and 2.17, where µc is given by Definition 2.15. (2) Rc > R(), where R is given by Lemma 2.16. 14 LEONID POTYAGAILO AND WEN-YUAN YANG Besides the peripheral cosets (horospheres), transitional quasi-geodesics provide another source of contracting subsets. Lemma 2.19 (Transitional geodesic is contracting). For any L ≥ 0, any (, R, L)transitional geodesic γ is 1-contracting. Remark. The same argument also applies (with natural changes for the constants) to show that if γ is c-quasi-geodesic then it is contracting for any c ≥ 1. For our purposes, we only need to consider the case when c = 1. Proof. Let κ = κ(, R) given by Lemma 2.10 and φ given by Lemma 2.6. By Lemma 2.6, there exists D0 = φ(κ/4) > 0 such that for any v ∈ G, a geodesic segment outside the ball B(v, D0 ) has lv -Floyd length less than κ/4. Let D = 2(L + 2D0 + 1) and µ = φ(κ/2). Let β be a geodesic such that β ∩ Nµ (γ) = ∅. Let x, y ∈ Projγ (β) such that d(x, y) = kProjγ (β)k. We are going to prove that d(x, y) ≤ D. Suppose by contradiction that d(x, y) > D. Assume that x, y are projection points of x̃, ỹ ∈ β respectively. Observe that (8) 2d(z, [x, x̃]) ≥ d(z, x), 2d(z, [y, ỹ]) ≥ d(z, y), for any z ∈ [x, y]γ . We only prove the first inequality; the second one is completely analogous. Let m ∈ [x, x̃] such that d(z, m) = d(z, [x, x̃]). Note that d(m, z) + d(m, x̃) ≥ d(x, x̃) by the shortest point property. Since d(x, x̃) = d(x, m) + d(m, x̃) we obtain d(m, z) ≥ d(x, m). Then d(z, x) ≤ d(z, m) + d(m, x) ≤ 2d(z, m) implying (8). ~x ~y β m m D0 x z v γ z y Since d(x, y) > D, there exists z ∈ [x, y]γ such that min{d(z, x), d(z, y)) > D/2 = L + 2D0 + 1. Since γ is (, R, L)-transitional, one of the intervals [x, z]γ or [z, y]γ contains an (, R)-transitional point v such that min{d(x, v), d(y, v)} > 2D0 . Hence by (8), min{d(v, [x, x̃]), d(v, [y, ỹ]))} > D0 . By the choice of D0 = φ(κ/4), we have max{ρv (x, x̃), ρv (y, ỹ)} < κ/4. From the other hand, v is (, R)-transitional, so ρv (x, y) ≥ κ by Lemma 2.10. Hence, ρv (x̃, ỹ) > κ/2 and thus d(v, β) ≤ µ which is impossible.  For a c-quasigeodesic we denote by c = (c), Rc = R(c ) any numbers satisfying Convention 2.18 (in particular 1 and R1 correspond to geodesics). In the following Proposition we will establish a ”thinness” of a triangle whose two sides are transitional geodesics. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 15 Proposition 2.20 (Transitional triangle is thin). For any L, c > 0 and the there exist constants D = D(c), M = M (L, c), L0 = L0 (L, c) > 0 with the following properties. Let α1 , α2 be (1 , R1 , L)-transitional geodesic rays issuing at o and ending at ξ 6= η ∈ ΛG respectively. Then for any c-quasi-geodesic γ with γ− ∈ α1 , γ+ ∈ α2 , the following holds. (1) γ is (c , Rc , L0 )-transitional. (2) If the length of γ is sufficiently large then there exists an (c , Rc )-transitional point z ∈ γ such that d(z, α1 ∪ α2 ) ≤ D and d(z, αi ) ≤ M for i = 1, 2. (3) Let d(o, [ξ, η]) denote the distance from o to a geodesic between ξ, η. If min{d(γ− , o), d(γ+ , o)}  0. Then |d(o, [ξ, η]) − d(o, γ)| ≤ M . Remark. Note that in (2) D is a uniform constant not depending on L, this will play a crucial role in establishing Lemma 5.13 below. Proof. Let κ = κ(c , Rc ) given by Lemma 2.10 and D = φ(κ/2), where φ is given by Lemma 2.6. The constant L0 will be computed below. (1) Given a point x in γ, assume that x is (, Rc )-deep in some X ∈ P. Let x− , x+ be the entry and exit points of γ in Nc (X) respectively. Observe first that x− , x+ are (c , Rc )-transitional in γ. Indeed, if not, there exists Y ∈ P such that x− is (c , Rc )-deep in Y. Then Y 6= X by the choice of x− as the entry point of γ in Nc (X). Since d(x, x− ) ≥ Rc , we have kN (X) ∩ N (Y )k ≥ Rc > R(c ) by Convention 2.18. This contradicts to Lemma 2.16. To find a constant L0 we will check when the opposite inequality: (9) min{`([x, x− ]γ ), `([x, x+ ]γ )} > L0 is not valid. We have `([x− , x+ ]γ ) ≥ 2L0 . Since x− , x+ are (c , Rc )-transitional, by Lemma 2.10, min{ρx− (γ− , γ+ ), ρx+ (γ− , γ+ )} > κ. By the triangle inequality κ , 2 and the same for ρx+ . Then max{d(x− , α1 ∪ α2 ), d(x+ , α1 ∪ α2 )} ≤ D = φ(κ/2). For concreteness consider the case that max{ρx− (γ− , o), ρx− (o, γ+ )} ≥ (10) d(x− , α1 ), d(x+ , α2 ) ≤ D; the other cases are similar and even easier. Project x− , x+ to x0− , x0+ ∈ X so that d(x− , x0− ), d(x+ , x0+ ) ≤ c . So d(x0− , α1 ), d(x0+ , α2 ) ≤ c + D and ND+c (X) ∩ αi 6= ∅ (i = 1, 2). Let w ∈ X be a projection point of o to X. We claim that (11) d(w, αi ) ≤ D2 := max{D + c + D1 , µ1 + D1 } (i = 1, 2), where µ1 , D1 > 0 are given for 1-contracting X ∈ P such that (7) holds. Indeed if, first, o ∈ Nµ1 (X) then there is nothing to prove. If not, there are two more cases: if αi ∩Nµ1 (X) = ∅, then by the contracting property we have d(w, αi ) ≤ D + c + D1 ; otherwise the projection on X of the maximal connected subcurve of γ, situated outside of Nµ1 (X) and containing o, gives d(w, αi ) ≤ µ1 + D1 . So (11) follows. 16 LEONID POTYAGAILO AND WEN-YUAN YANG Let L0 = L(c + D + D2 , R1 + L) given by Lemma 2.17. Set L0 = 2c(D2 + D + L0 + 2c ) + c2 . (12) Since γ is a c-quasi-geodesic, we have d(x0− , x0+ ) ≥ `([x− , x+ ]γ )/c − c − 2c ≥ 2L0 /c − c − 2c ≥ 4(c + D + D2 + L0 ). Since max{d(x0− , α1 ), d(x0+ , α2 )} ≤ c + D, we obtain from (11) kα1 ∩ Nc +D+D2 (X)k ≥ d(x0− , w), kα2 ∩ Nc +D+D2 (X)k ≥ d(x0+ , w). We have d(x0− , w) + d(x0+ , w) ≥ d(x0− , x0+ ) ≥ 4(c + D + D2 + L0 ). Thus max kαi ∩ Nc +D+D2 (X)k ≥ 2(c + D + D2 + L0 ). i=1,2 Hence, αi contains a subcurve of length at least 2L0 such that its endpoints lie in Nc +D+D2 (X). By the choice of L0 and Lemma 2.17, αi contains an (1 , R1 +L)deep point in X. This gives a contradiction, as αi is (1 , R1 , L)-transitional. So for the value of L0 chosen in (12) the inequality (9) is not valid. The statement (1) is proved. (2) By the statement (1) γ is (c , Rc , L0 )-transitional. Lemma 2.19 implies that γ is contracting. By the projection argument (used to prove (11)) we have a constant D3 = D3 (c , Rc , L0 ) > 0 such that for any projection point v of o to γ we have d(v, αi ) ≤ D3 for i = 1, 2. Remark. We need a new constant D3 (and not D2 used above) since we project now on γ and not on a horosphere. Recall that D = φ(κ/2). By Lemma 2.6, for any z ∈ G, a geodesic segment outside B(z, D) has lz -Floyd length less than κ/2. The curve γ is quasigeodesic and its length is sufficently large. So by continuity of the distance function d(v, x) (x ∈ γ) we find a point z 0 such that D + D3 + L0 ≤ d(v, z 0 ) ≤ D + D3 + L0 + 1. Since γ is (c , Rc , L0 )-transitional by Definition 2.11 there exists an (c , Rc )-transitional point z ∈ γ for which d(z 0 , z) ≤ l([z, z 0 ]γ ) ≤ L0 . We obtain (13) D + D3 ≤ d(v, z) ≤ D + D3 + 2L0 + 1. Then d(z, αi ) ≤ d(z, v) + d(v, αi ) ≤ M, where M = 2L0 + 2D3 + D + 1. To prove the first claim of (2) assume for definiteness that z ∈ [v, γ+ ]. Lemma 2.10 yields ρz (v, γ+ ) ≥ κ. Let z2 ∈ α2 such that d(v, z2 ) ≤ D3 . We have d(z, [v, z2 ]) ≥ d(z, v) − d(z2 , v) ≥ D + D3 − D3 = D. By Lemma 2.6 ρz (v, z2 ) < κ/2 and so ρz (z2 , γ+ ) ≥ ρz (v, γ+ ) − ρz (v, z2 ) ≥ κ/2. Lemma 2.6 gives d(z, α2 ) ≤ D. The statement (2) is proved. (3) Since ξ, η are distinct, by Lemma 2.6, there exists n0 = n0 (ξ, η), r = r(ξ, η) > 0 such that if min{d(γ− , o), d(γ+ , o)} > n0 , then d(o, γ) ≤ r. In the proof of the statement (2), we projected o to a point v in γ, and found an (, R)-transitional point z ∈ γ such that d(v, z) ≤ M . HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 17 Since d(o, z) ≤ M + r (and these constants do not depend on γ) up to increasing n0 , by Lemma 2.6 we have max{ρ̄z (ξ, γ− ), ρ̄z (η, γ+ )} ≤ κ/4. The point z is (, R)-transitional, thus ρ̄z (γ− , γ+ ) ≥ κ, and so ρ̄z (ξ, η) ≥ κ/2. Consequently d(z, [ξ, η]) ≤ D which yields: d(o, [ξ, η]) ≤ d(o, z) + d(z, [ξ, η]) ≤ d(o, γ) + M + d(z, [ξ, η]) ≤ d(o, γ) + M + D. By symmetry, we obtain d(o, γ) ≤ d(o, [ξ, η]) + M + D. Since D is a uniform constant not depending on L we put M := M +D. Then the statements of (2) and (3) are both valid for the same constant M. The Proposition is proved.  The claim (3) of the Proposition and Lemma 2.12 imply: Corollary 2.21. Suppose (G, P) is a relatively hyperbolic pair. Then for any L > 0, uc there exists M = M (L) such that for any ξ, η ∈ Λuc L,o G or ξ, η ∈ ∂L,o G, the distance d(o, [ξ, η]) is comparable with the distance d(o, γ) where γ is a c-quasi-geodesic with the endpoints on the corresponding geodesic rays converging to ξ and η.. 3. Patterson-Sullivan measures on ends of a geodesic tree In this section, we shall construct an iterated transitional tree having several nice properties which will allow us to carry out the Patterson’s construction on this tree. The space of ends of the tree equipped with the Patterson-Sullivan measure will give rise to an Ahlfors regular subset of the boundary. 3.1. Iterated Transitional Trees. Let (G, P) be a relatively hyperbolic pair and G (G, S) the Cayley graph of G with respect to S. The existence of large transitional trees is established in [27, Theorem 5.9]. The main difference of the construction below is that these trees will be equipped with certain periodicity. By this reason we call them iterated transitional trees. We start by recalling several results from [27]. Definition 3.1 (Partial Cone). For , R ≥ 0, the partial cone Ω,R (g) at g ∈ G is the set of elements h ∈ G such that there exists a geodesic γ = [1, h] containing g and one of the following holds. (1) d(1, h) ≤ d(1, g) + 2R, (2) γ contains an (, R)-transitional point v such that d(v, g) ≤ 2R. For ∆ ≥ 0, n ≥ 0, define A(g, n, ∆) = {h ∈ G : n − ∆ ≤ d(1, h) − d(1, g) < n + ∆}, for any g ∈ G. For simplicity we write A(n, ∆) := A(1, n, ∆). For r, , R, ∆ > 0, define Ω,R (g, n, ∆) = Ω,R (g) ∩ A(g, n, ∆), for any g ∈ G, n ≥ 0. For fixed , R > 0, two partial cones Ω,R (g), Ω,R (g 0 ) are of same type if g 0 g −1 · Ω,R (g) = Ω,R (g 0 ). By abuse of language, we say that g, g 0 have the same partial cone types. The following result generalizes the result of Cannon [5] for hyperbolic groups. 18 LEONID POTYAGAILO AND WEN-YUAN YANG Lemma 3.2 (Finiteness of partial cone types). [27, Lemma B.1] There exist , R0 > 0 such that for any R > R0 , there are at most M = M (, R) types among all (, R)partial cones {Ω,R (g) : g ∈ G}. The following is a key technical result in [27, Lemma 5.8]. Lemma 3.3. There exist , R, ∆, θ, L0 > 0 with the following property. For any L > L0 there exists a subset Ĝ of G such that ](Ω,R (g, L, ∆) ∩ Ĝ) > θ · exp(L · δG,S ), 1 ∈ Ĝ (14) for any g ∈ Ĝ. Convention 3.4 (, R, ∆). Until the end of Section 3, the constants , R, ∆ > 0 are given by Lemmas 3.2 and 3.3, and satisfy Convention 2.18. The following terminology comes from the paper [1] which was certainly very motivating for us. Definition 3.5 (Iterated Tree Set). For given L > 0, an L-iterated tree set T in G is a union of a sequence of sets Ti (i ≥ 0) in G defined inductively as follows. Let T0 = {1}. Assume that Ti is defined for i ≥ 0. The children T (x) of x ∈ Ti is a subset in Ω,R (x, L, ∆). Then Ti+1 is the union of children of all x ∈ Ti . Recall that a subset Z of a metric space space (X, d) is called C-separated if the distanced(z1 , z2 ) ≥ C for every pair of distinct points {z1 , z2 } ⊂ Z. The following fact is elementary. Lemma 3.6. Let (X, d) be a proper metric space on which a group G ⊂ Isom(X) acts properly on X. For any orbit Go (o ∈ X) and C > 0 there exists a constant θ = θ(Go, C) > 0 with the following property. For any finite set Y in Go, there exists a C-separated subset Z ⊂ Y such that ]Z ≥ θ · ]Y . Proof. Let Z be a maximal C-separated set in Y . We have Y ⊂ NC (Z). Since the action of G on (X, d) is proper, any ball of radius C contains at most N points in Go. The result follows for θ := 1/N .  An (, R, L)-transitional geodesic tree T rooted at o in G (G, S) is a tree subgraph with a distinguished vertex x such that every branch in T originating at x is a (, R, L)-transitional geodesic in G (G, S). In order to obtain a useful theory of Patterson-Sullivan measures, certain symmetry on the iterated tree set is required. This is the content of the following. Lemma 3.7 (Existence of iterated transitional trees). There exist constants L0 , C0 , t0 , n0 > 0 such that for L > L0 , C > C0 there are θ = θ(C) and L0 = L0 (L) and an iterated tree set T parameterized by (, R, L) with the following properties: (1) (2) (3) (4) (5) x−1 T (x) = y −1 T (y) for any x ∈ Tt , y ∈ Tt+n0 and t ≥ t0 , x−1 T (x) = y −1 T (y) for any x, y ∈ Tt and t ≥ t0 . ]T (x) ≥ θ · exp(δG,S L) for any x ∈ T . T (x) is C-separated for any x ∈ T . there exists an (, R, L0 )-transitional geodesic tree T rooted at 1 in G (G, S) such that the vertex set T 0 contains T , and lies in NL0 (T ). HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 19 Proof. Set L0 = ∆, and all other constants will be defined in the proof. We divide the proof into 3 steps for the reader convenience. Step 1: At this step we construct the iterated tree set T with properties (1-3). The construction proceeds by an induction argument. Set T0 = {1} to start. Let M be the number of (, R)-partial cone types in G given by Lemma 3.2, and Ĝ the set by Lemma 3.3. Then there exists T1 ⊂ Ω,R (1, L, ∆) ∩ Ĝ such that every element in T1 has the same partial cone type and the inequality (14) holds for g = 1 where the constant κ is divided by M . By Lemma 3.6, we can also require that T1 is C-separated, where κ is further decreased and depends on C (given in Step 3 below). Fix some x1 ∈ T1 . Up to dividing θ by M again, we choose Y to be a subset of Ω,R (x1 , L, ∆) ∩ Ĝ such that the inequality (14) holds for Y and every element in Y has the same partial cone type. By the same reason, we can choose Y to be C-separated. Since all x ∈ T1 are of same type as x1 , we could define T (x) := xx−1 1 Y ⊂ Ω,R (x, L, ∆). Then all elements in the union T2 := ∪x∈T1 T (x) have the same partial cone types. We note that Y is chosen to be contained in Ĝ, but T2 may not be in Ĝ. We repeat the same argument to construct Ti for i ≥ 3, with a sequence of divisions of κ. By construction, all elements in the constructed Ti are of the same partial cone type. Since there are finitely many partial cone types, we obtain that there are 1 ≤ t0 , n0 ≤ M so that x−1 T (x) = y −1 T (y) for any x ∈ Tt , y ∈ Tt+n0 and t ≥ t0 . This also implies that the division of θ stops after at most n0 times, and thus θ in the inequality (14) can be chosen uniformly for all T (x) where x ∈ Ti (i ≥ 1). The set T satisfies the properties (1 − 3). Step 2: Using the iterated tree set T , we will now construct a geodesic graph T. Without loss of generality assume that κ < 1. The root of T is T0 = {1}. Assume that Ti is defined for i ≥ 0 and for each terminal vertex x ∈ Ti , denote by γx the geodesic [1, x] in Ti . We choose a geodesic [x, y] for each y ∈ T (x). Since Ti (x) is a subset in Ω,R (x, L, ∆) ∩ Ĝ, we set (15) Ti+1 = ∪x∈Ti (∪y∈T (x) γx · [x, y]), where γx ·[x, y] is a geodesic in G (G, S). Inductively, we get the limit T = limi→∞ Ti . By construction, each geodesic ray originating at 1 is (, R, L0 )-transitional for L0 := L + 2R + ∆. By construction we have T ⊂ T 0 ⊂ NL0 (T ). Step 3: We now prove that T is a geodesic tree rooted at 1 in G (G, S). Indeed, if not, there exist two distinct geodesics α1 , α2 in T with the same endpoints x, w ∈ T such that the length of α1 , α2 is minimal among all such choices. Assume that x is closer to 1 than w. Consider two points yi ∈ αi ∩ T (x) for i = 1, 2. By the choice of α1 , α2 , we have y1 6= y2 . Then by construction, d(yi , w) ≥ L − ∆ for i = 1, 2. Moreover, there exists an (, R)-transitional point z1 ∈ α1 such that d(y1 , z1 ) ≤ 2R. Let D0 = φ(κ), where φ is given by Lemma 2.6 and κ = κ(, R) by Lemma 2.10. There exists z2 ∈ α2 such that d(z1 , z2 ) ≤ D0 and then d(y1 , z2 ) ≤ 2R+D0 . We can choose ỹ2 ∈ α2 such that d(x, ỹ2 ) = d(x, y1 ). Hence d(z2 , ỹ2 ) = |d(x, z2 )−d(x, ỹ2 )| = |d(x, z2 ) − d(x, y1 )| ≤ 2R + D0 . It follows that d(y1 , ỹ2 ) ≤ 2(2R + D0 ). Since y1 , y2 lie in the annulus A(x, L, ∆), we get |d(x, y1 ) − d(x, y2 )| ≤ 2∆, and then d(y2 , ỹ2 ) = |d(x, ỹ2 )−d(x, y2 )| ≤ 2∆. It follows that d(y1 , y2 ) ≤ 2(2R+D0 +∆). 20 LEONID POTYAGAILO AND WEN-YUAN YANG Choosing now the constant C to be greater than (16) C0 := 2(2R + φ(κ/2) + ∆) we obtain that T (x) is C-separated in Ω,R (x, L, ∆), and d(y1 , y2 ) ≥ C0 > 2(2R + D0 + ∆) which is a contradiction. Thus, T is a rooted geodesic tree.  Remarks. (1) By Lemma 2.12 the boundary of the tree T (in ΛG or in ∂λ G) constructed above consists of uniformly conical points. (2) The constant C0 in (16) is bigger than we really need in the above proof (it is enough to replace ϕ(κ/2) by the smaller term D0 = ϕ(κ))) but we do need such a constant in the next lemma. In the next two lemmas, we shall derive more properties of the sets T and T constructed in Lemma 3.7. To this end, we recall the notion of Poincaré series. For a subset X ⊂ G and a point o ∈ G, set X ΘX (s, o) = exp(−sd(o, g)), s ≥ 0. g∈X Define the critical exponent of ΘX (s, o) to be (17) δX,S = lim sup n→∞ log ](B(o, n) ∩ X) , n where S is a fixed finite symmetric generating set of G, and B(o, n) is the ball in the word metric of radius n centered at o. It is elementary fact that ΘX (s, o) converges for s > δX,S , and diverges for s < δX,S . Recall that the bilipschitz equivalence const between two functions means that they are comparable up to a constant (see Section 2). We have the following. Lemma 3.8. Under the same assumptions as in Lemma 3.7, we have ΘT (s, x) L ΘT (s, y) for any x, y ∈ T and s ≥ 0, whenever one of the series converges. Proof. Let Ω(x) be a cone at x ∈ T , which is the union of y ∈ T such that the unique geodesic [1, y] in the geodesic tree T contains x. Claim. The Poincaré series of T is bilipschitz equivalent to that of any cone at a vertex in T : (18) ΘT (s, 1) L ΘΩ(x) (s, x), for any x ∈ T . Proof of the Claim. It follows from Lemma 3.7.(1) that after a finite time t0 , the set T is periodic with a fixed period n0 . So it is enough to show (18) for x ∈ T such that t0 ≤ d(1, x) ≤ n0 + t0 . By Lemma 3.7.2, the cones based at points y ∈ Tt have the same type where t = d(1, x). Thus the number an of points in T situated at the distance n from 1 is at most C · bn,x . Here C is the number of elements in the ball B(1, t), and b(n, x) is the number of elements of Ω(x) at the distance n from x. The same argument works in the opposite sense. The Claim follows.  HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 21 To complete the proof of the lemma, by (18), it suffices to establish the following ΘT (s, 1) L ΘT \Ω(x) (s, x), (19) as 18 and 19 would imply ΘT (s, 1) L ΘT (s, x), ∀ x ∈ T. For y ∈ T \ Ω(x), let o be the farrest point to 1 such that o ∈ T and [1, o] ⊂ [1, x] ∩ [1, y], where the geodesics [1, x] and [1, y] are in the geodesic tree T . The point o will be referred to as the branch point of [1, x] and [1, y]. By Lemma 3.7, [1, x], [1, y] are (, R, L0 )-transitional geodesics, where L0 = L0 (L). By Proposition 2.20, [x, y] is transitional and so is contracting by Lemma 2.19. Claim. There exists a uniform constant D = D(L) > 0 such that d(o, [x, y]) ≤ D. Proof of the Claim. Let z ∈ [x, y] be the projection of o to a geodesic [x, y] in the Cayley graph G (G, S). By the contracting property of [x, y] it follows from the inequality 11 that there exists D1 = D1 (, R, L0 ) such that max{d(z, [o, x]), d(z, [o, y])} ≤ D1 . So, let x1 ∈ [o, x], y1 ∈ [o, y] such that d(z, x1 ) ≤ D1 and d(z, y1 ) ≤ D1 . Set d(o, z) = d, then min{d(o, x1 ), d(o, y1 )} ≥ d − D1 (20) Let w ∈ [o, x1 ] ∩ T (o) where T (o) ⊂ Ω,R (o, L, ∆). Then d(o, w) < L + ∆. Furthermore since x ∈ T there exists an (, R)-transitional point x2 ∈ [o, x] such that d(w, x2 ) ≤ 2R, and so d(o, x2 ) ≤ L + ∆ + 2R. Using (20) we deduce (21) d(x2 , [x1 , y1 ]) ≥ d(x1 , o) − d(x2 , o) − 2D1 ≥ K, where K = d − 3D1 − L − ∆ − 2R. We affirm that K ≤ φ(κ/2), (22) where κ and φ are universal constants given by Lemmas 2.10 and 2.6. respectively. Indeed, suppose (22) is not true, then d(x2 , [x1 , y1 ]) ≥ φ(κ/2). By Lemma 2.6 we have ρx2 (x1 , y1 ) ≤ κ/2. Since x2 is transitional, Lemma 2.10 yields ρx2 (o, x1 ) ≥ κ. It follows ρx2 (o, y1 ) ≥ κ/2, and thus ∃ x̃2 ∈ [o, y] : d(x2 , [o, y]) = d(x2 , x̃2 ) ≤ φ(κ/2). z x y x1 w" w’ w x2 ~ x 2 o 1 y 1 22 LEONID POTYAGAILO AND WEN-YUAN YANG Following the argument of Step (3) of Lemma 3.7 we choose a vertex w0 ∈ [o, y] such that d(o, w0 ) = d(o, w). Then we have d(x̃2 , w0 ) = |d(o, x̃2 ) − d(o, w)| ≤ d(x̃2 , w) ≤ 2R + φ(κ/2). Then d(w0 , w) ≤ d(w0 , x̃2 ) + d(x̃2 , w) ≤ 2(2R + φ(κ/2)). Let w00 ∈ T (o) ∩ [o, y]. Since w ∈ Ω,R (o, L, ∆) we have d(w00 , w0 ) ≤ |d(o, w0 ) − d(o, w00 )| ≤ 2∆. Indeed |(d(o, w0 ) = d(o, w)) − L| ≤ ∆ and also |d(o, w00 ) − L| ≤ ∆. Therefore for the vertices w00 , w ∈ T (o) ⊂ T we have d(w, w00 ) ≤ 2(φ(κ/2) + R + ∆). This is impossible by (16). The obtained contradiction implies that K ≤ φ(κ/2) and by definition of K (see (21)), we have d(o, z) = d ≤ D = D1 + φ(κ/2) + L + ∆ + 2R. The claim is proved.  The second claim implies d(o, x) + d(o, y) ≥ d(x, y) ≥ d(o, x) + d(o, y) − 2D. (23) Given o ∈ [1, x) ∩ T , we denote by Yo the set of elements y ∈ T \ Ω(x) such that o ∈ [1, x] is the branch point of [1, y] and [1, x] in T . The argument of the first Claim also yields ΘΩ(o) (s, o) L ΘYo (s, o). Then (18) and (23) imply X exp(−sd(x, y)) L exp(−sd(o, x)) · ΘT (s, 1), y∈Yo for every o ∈ [1, x) ∩ T . By construction of T in Lemma 3.7 the sequence of points [1, x) ∩ T has the property that any two consecutive points has a distance between L − ∆ and L + ∆. Summing up over all o ∈ [1, x) ∩ T , we get X X exp(−sd(x, y)) L exp(−sk) · ΘT (s, 1) L ΘT (s, 1), y∈T \Ω(x) 0≤k<d(1,x) which proves (19). The Lemma is proved.  Lemma 3.9. Under the same assumptions in Lemma 3.7, the Poincaré series ΘT (s, 1) is divergent at s = δT,S . Furthermore, lim δT,S = δG,S . L→∞ Proof. It is inspired by the proof of Proposition 4.1 in [8]. Consider the annulus set in T , AT (g, n, 3∆0 ) := A(g, n, 3∆0 ) ∩ T, where ∆0 := ∆ + L + 2R and n ≥ 0. Observe that there exists c > 0 such that (24) c−1 · ]AT (g 0 , n, 3∆0 ) ≤ ]AT (g, n, 3∆0 ) ≤ c · ]AT (g 0 , n, 3∆0 ) for any g, g 0 ∈ T and n ≥ 0. Indeed, this is a direct consequence of Lemma 3.7 that T has certain periodicity. Moreover, we claim that Claim. The following inequality holds ]AT (1, n + m, 3∆0 ) ≤ c · ]AT (1, n, 3∆0 ) · ]AT (1, m, 3∆0 ), for n, m ≥ 0. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 23 Proof of the Claim. For h ∈ AT (n + m, 3∆0 ), we connect 1 and h by a geodesic [1, h] in T . Assume that d(1, h) = m + n + 3∆1 for some |∆1 | ≤ ∆0 . Let z ∈ [1, h] such that d(1, z) = n + 3/2 · ∆1 . Note that z might not be in T . However, by Lemma 3.7.4), there exists w ∈ T such that d(z, w) ≤ ∆ + L + 2R = ∆0 and then d(w, h) ≤ m + 3∆0 . This implies that w ∈ A(1, n, 3∆0 ) and h ∈ AT (w, m, 3∆0 ). The conclusion thus follows from (24).  Define an = c · ]AT (1, n, 3∆0 ). The above Claim implies that an+m ≤ an am . log an So the sequence (log an )n is subadditive. Then by Fekete Lemma lim = n→∞ n n log a o P n inf : n ≥ 1 . Since (an )n is non-decreasing we have an ≤ 0≤i≤n ai ≤ nan . n So P n log a o log 0≤i≤n ai log an n = lim = inf :n≥1 . δT,S = lim sup n→∞ n n n n→∞ It follows that ]AT (1, n, ∆0 ) ≥ c−1 exp(nδT,S ) for n ≥ 1. Observe that X ΘT (s, 1) L,∆ ]AT (1, n, ∆0 ) · exp(−sn), s ≥ 0, n≥0 whenever both parts are finite. Thus, ΘT (s, 1) is divergent at s = δT,S . To prove the second statement we estimate the lower bound of δT,S . By Lemma 3.7, we notice that ](B(1, i(L + ∆)) ∩ T ) ≥ θi · exp(i · δG,S · L), for i ≥ 0. This implies that δT,S ≥ log ]BT (1, i(L + ∆)) ∩ T L · δG,S + log θ ≥ . i(L + ∆) L+∆ We obtain lim δT,S ≥ δG,S . Since δT,S ≤ δG,S (∀L), the lemma follows. L→∞  3.2. Patterson-Sullivan measures on the space of ends of an iterated transitional tree. In this and next subsections, for any L  0, let T and T be the iterated tree set and transitional tree respectively given by Lemma 3.7. At the same time, assume that they satisfy Lemmas 3.8 and 3.9. We denote by the common notation ∂T the limit set of T in either the Bowditch boundary ΛG or in the Floyd boundary ∂λ G. In this subsection, we shall construct a Patterson-Sullivan measure on ∂T . Consider the set M(Te) of finite Borel measures on Te := T ∪∂T , which is endowed with the weak-convergence topology. Then µn → µ for µn ∈ M(Te) if and only if lim inf µn (U ) ≥ µ(U ) for any open set U ⊂ Te. Note that a set of uniformly bounded n→∞ measures in M(Te) is relatively compact. We first construct a family of measures {µsv }v∈T ⊂ M(Te) supported on T . Set X 1 µsv = exp(−sd(v, g)) · Dirac(g), ΘT (s, 1) g∈T where s > δT,S and v ∈ T . By Lemma 3.8, the measures {µsv }v∈T are bounded by a uniform constant depending on L. 24 LEONID POTYAGAILO AND WEN-YUAN YANG By Lemma 3.9, for any v ∈ T , ΘT (s, v) is divergent at s = δT,S . Choose si → δT,S such that µsvi converge in M(Te). The limit measures µv = lim µsvi are called Patterson-Sullivan measures at v. Clearly, {µv }v∈G are absolutely continuous with respect to each other. In the sequel, we will write PS-measures as shorthand for Patterson-Sullivan measures. A horofunction co-cycle Bξ : G × G → R at conical points ξ ∈ ΛG or ξ ∈ ∂λ G was studied in [27]. The precise definition is not relevant here, but we have the following estimation. Lemma 3.10. [27, Lemma 2.20] For any L > 0 there exists C = C(L) > 0 such that the following holds. Fix ξ ∈ ∂T . For any x, y ∈ G, there is a neighbourhood V of ξ in Gλ or G ∪ ΛG such that the following property holds: |Bξ (x, y) − Bz (x, y)| < C, ∀z ∈ V ∩ G, where Bz (x, y) := d(z, x) − d(z, y). Remarks. (on the proof) The above statement is proved in [27, Lemma 2.20] for a conical point of the Bowditch boundary, where the constant C is universal (not depending on L). In our setting by Lemma 3.7 there exists an (, R, L0 )-transitional ray in the tree T ending at ξ in ∂T . Then by Lemma 2.12 the constant R is uniform for every ξ ∈ ∂T . So the same proof as [27, Lemma 2.20] works to produce a constant C = C(L). We have to warn the reader that the constant C > 0 cannot be made uniform for all conical points for the action G y ∂λ G on the Floyd boundary as the action is not necessarily geometrically finite (see the discussion after Lemma 2.12). End of remarks. With the help of Lemma 3.10, the following can be proven exactly as Théorème 5.4 in [6]. Lemma 3.11. PS-measures {µg }g∈T on ∂T satisfy the following property, dµg (ξ) L exp(−δT,S Bξ (g, h)), dµh for µh -a.e. points ξ ∈ ∂T and any g, h ∈ T . (25) 3.3. Shadow Lemma. We shall establish a shadow lemma for {µg }g∈T on ∂T . Definition 3.12 (Shadow). The shadow Πr (g) at g ∈ T is the set of points ξ ∈ ∂T such that there exists SOME geodesic [1, ξ] in T intersecting B(g, r). Lemma 3.13 (Shadow Lemma). There exists r0 > 0 such that the following holds exp(−δT,S d(1, g)) ≺ µ1 (Πr (g)) ≺r exp(−δT,S d(1, g)) for any r > r0 and g ∈ T . Remark. In [27] the Shadow lemma was proved for the whole group G. The current lemma describes the shadows of the points g ∈ T in terms of δT,S . Proof. By Lemmas 3.10 and 3.11, there exists C1 = C1 (L), C2 = C2 (L) > 0 such that the following holds dµ1 (ξ) ≤ C2 exp(−δT,S d(1, g)) (26) C1 exp(−δT,S d(1, g)) ≤ dµg HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 25 for µ1 -a.e. points ξ ∈ ∂T . So in order to estimate µ1 (Πr (g)) we can do it for µg (Πr (g)). Claim. Given any  > 0, there is a constant r0 > 0 such that the following holds µg (∂T \ Πr (g)) <  for all g ∈ T and r > r0 . Proof of the Claim. Note that Πr (g) is a closed set. We consider the convex cone C(∂T \ Πr (g)) of ∂T \ Πr (g), which consists of all geodesic rays in T originating at 1 and terminating at a point in ∂T \ Πr (g). Let V be the set of vertices of T in C(∂T \ Πr (g)). For any x ∈ V , consider the branch point o of [1, x] and [1, g] in T (defined in the proof of Lemma 3.8). Since x ∈ / C(Πr (g)), we have d(g, o) > r. By a similar argument to that of Lemma 3.8, we get X X ΘV (s, g) = exp(−sd(x, g))  exp(−sk) · ΘT (s, 1). x∈V r≤k≤d(1,g) So, µsg (V ) = ΘV (s, g)  ΘT (s, 1) X exp(−sk), r≤k≤d(1,g) which tends to 0 when r → ∞ and s > δT,S . Thus, the µsg -measure of the open set V ∪ (∂T \ Πr (g)) can be arbitrarily small for r large enough, and so is µg (∂T \ Πr (g)). This proves the claim.  By Lemma 3.8, we have that {µg (∂T )}g∈T are lower and upper bounded by a uniform constant depending on L. Let η1 = 1/2 inf{µg (∂T ) : g ∈ T } > 0 and η2 = sup{µg (∂T ) : g ∈ T } < ∞. By the above Claim, there is a constant r0 > 0 such that the following holds (27) η1 < µg (Πr (g)) < η2 , ∀r > r0 , for all g ∈ T . So (26) implies that η1 C1 exp(−δT,S d(1, g)) ≤ µ1 (Πr (g)) ≤ η2 C2 exp(−δT,S d(1, g)), for all g ∈ G. The Lemma is proved.  By Shadow Lemma to estimate the PS-measure of balls we need to compare it with that of shadows a in the boundary ∂T . Below, we use the symbol bsc to denote the integer part of s ∈ R. Denote by Bρλ,1 (ξ, t) (resp. Bρλ,1 (ξ, t)) the ball in ∂T around ξ ∈ ∂T of radius t with respect to the metric ρλ,1 (resp. ρ̄λ,1 ). Lemma 3.14 (Shadows  Balls). Let r0 given by Lemma 3.13. There exists 0 < λ0 < 1 such that for any λ ∈ [λ0 , 1) and L > 0, there exist r = r(L, λ) > r0 and C = C(L, λ) > 0 with the following property. For any ξ ∈ ∂T and 0 < t < λ, the following holds (28) Bρλ,1 (ξ, C −1 t) ⊂ Πr (g) ⊂ Bρλ,1 (ξ, Ct), and (29) Bρ̄λ,1 (ξ, C −1 t) ⊂ Πr (g) ⊂ Bρ̄λ,1 (ξ, Ct), where g ∈ [1, ξ] is chosen such that d(1, g) = blogλ tc. 26 LEONID POTYAGAILO AND WEN-YUAN YANG Proof. Let λ0 be given by Proposition 2.3. For any λ ∈ [λ0 , 1[, we consider the family of Floyd metrics {ρλ,v }v∈ G . For any 0 < t < λ, let g ∈ [1, ξ] such that d(1, g) = blogλ tc. Thus, λd(1,g)+1 < t ≤ λd(1,g) . By construction of T (see Lemma 3.7.5), we know that [1, ξ] is (, R, L)-transitional. So there exists an (, R)-transitional point z in [1, ξ] such that d(z, g) ≤ L. By Lemma 2.10.2, there exists κ = κ(λ, , R) such that ρ̄λ,z (1, ξ) ≥ κ. By property (2), we have ρλ,g (1, ξ) ≥ ρ̄λ,g (1, ξ) ≥ κ · λL . Set 2C1 = κ · λL and r = max{φλ (C1 ), r0 } where the function φ is given in Lemma 2.6. Let η ∈ Bρλ,1 (ξ, C1 t). By property (2), it follows that ρλ,g (η, ξ) ≤ λ−d(g,1) ρλ,1 (η, ξ) ≤ C1 . Then ρλ,g (1, η) ≥ C1 and by Lemma 2.6, we have d(g, [1, η]) ≤ r. So η ∈ Πr (g). This proves the first inclusions of (28) and (29) for C = C1 Let η ∈ Πr (g) so that d(g, [1, η]) ≤ r for some geodesic [1, η]. Consequently, there exists w ∈ [1, η[ such that d(1, w) = d(1, g) and d(g, w) ≤ 2r. By Lemma 2.7 d(1,g) any segment of [1, ξ] is a Floyd geodesic with respect to ρλ,1 , so ρλ,1 (ξ, g) = λ1−λ . Let α be a word geodesic between w and g. Every edge of α is in the word distance at most d(1, g) − 2r from 1. So the Floyd length of α is at most 2r · λd(1,g)−2r . We obtain ρ̄λ,1 (ξ, η) ≤ ρλ,1 (ξ, η) ≤ ρλ,1 (g, ξ) + ρλ,1 (w, η) + ρλ,1 (g, w) 1 ≤ 2( 1−λ + r λ2r ) · λd(g,1) . 1 r + ). Then ρ̄λ,1 (ξ, η) ≤ ρλ,1 (ξ, η) ≤ C2 t and so the second 1 − λ λ2r inclusions of (28) and (29) follow. Setting C = max{C1 , C2 } we complete the proof of the lemma.  Let C2 = 2λ−1 ( 3.4. Proof of Theorem 1.4. We recapitulate the main results of the previous Subsections in the following. Proposition 3.15. There exists λ0 > 0 such that for every λ ∈ [λ0 , 1) and L  0, there exist an L-iterated tree set T and a PS-measure µ1 on ∂T satisfying: (30) µ1 (Bρλ,o (ξ, t)) λ,L t−δT ,S / log λ , for any ξ ∈ ∂T and 0 < t < λ. Proof. The existence of the tree T is proved in Lemma 3.7. Lemmas 3.13 and 3.14 and direct calculations imply that ∂T is Alhfors Q-regular for Q = −δT,S / log λ (see the definition in the Introduction). Hence, (30) follows.  By Lemma 2.12 ∂T consists of uniformly conical points, so Proposition 3.15 implies the first claim of the Theorem. The statement Qi → δG,S (i → ∞) is proved in Lemma 3.9. Theorem 1.4 is proved. 4. Proofs of Theorems 1.1 and 1.2 We consider the Floyd metric on ∂λ G and shortcut metric on ΛG, where the corresponding Theorems 1.1 and 1.2 are proved with the same argument. The following lemma giving the upper bound for the Hausdorff dimension is due to Marc Bourdon. We notice that it is a general fact which is true for a finitely generated group G without assuming that it is relatively hyperbolic. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 27 Lemma 4.1 (M. Bourdon, oral communication). For every λ ∈ (0, 1), the Hausdorff dimension Hdimρλ,1 of ∂λ G (respectively Hdimρ̄λ,1 of ΛG) with respect to the Floyd metric ρλ,1 (respectively to the shortcut metric ρ̄λ,1 is upper bounded by −δG,S / log λ. Proof. To give an upper bound, it suffices to prove that Hs (∂λ G) = 0 for any fixed s > −δG,S / log λ. Define Sn = {g ∈ G : d(1, g) = n}. For any g ∈ Sn , define the cone Ωg := {ξ ∈ ∂λ G, g ∈ [1, ξ]}, where [1, ξ] is a geodesic between 1 and ξ. For any ξ ∈ ∂λ G, consider a point x ∈ [1, ξ]∩Sn . By Lemma 2.8 the sub-ray [x, ξ) λn is a ρλ,1 -Floyd geodesic. So ρλ,1 (x, ξ) = 1−λ for any ξ ∈ ∂λ G. Thus, {Ωg : g ∈ Sn } 2λn . is an ε-covering of ∂λ G, where ε := 1−λ δ G,S −tn For any t ∈] − log for n ≥ 1. λ , s[, we have −t log λ > δG,S and so ]Sn ≺t λ We obtain for all n ≥ 1: X Hs (∂λ G) ≤ εs ≺ λ(s−t)n g∈Sn δ G,S which then tends 0 as n → ∞. Thus, Hs (∂λ G) = 0 for any s > − log λ . The lemma is proved.  So the upper bound on the Hausdorff dimension of ∂λ G and ΛG in Theorems 1.1, 1.2 is proved. In the remainder of proofs, we aim to establish the lower bound for the Hausdorff dimension. Taking into account Proposition 3.15: there exists a universal λ0 > 0 such that for each L  0, there exist an L-iterated tree T and a PS-measure µ1 on ∂T such that (30) holds and δT,S → δG,S as L → ∞. The following lemma shows that PS-measures constructed in Section 3 are actually the Hausdorff measures on ∂T with respect to the Floyd metric ρλ,1 restricted on ∂T . Lemma 4.2. Let µ1 be a PS-measure on ∂T in ΛG or ∂λ G. Denote σ = −δT,S / log λ. Then we have Hσ (A) L µ1 (A). for any subset A ⊂ ∂T . Proof. In the proof, we assume that ∂T is a subset of the Bowditch boundary. The proof for ∂T ⊂ ∂λ G is similar. P Let B be an ε-covering of A for ε > 0. Then µ1 (A) ≤ B∈B µ1 (B). Let ε → 0. By Proposition 3.15, we obtain that µ1 (A) ≺L Hσ (A). For the other inequality, we need to make use of the following well-known covering result. Let B be a metric ball of radius rad(B) in a proper metric space X. Denote by 5B the union of all balls of radius 2 · rad(B) intersecting B so that k5Bk ≤ 10 · rad(B). Then by [20, Theorem 2.1] for a family of balls B in X with uniformly bounded radii there exists a sub-family B 0 ⊂ B of pairwise disjoint balls such that the following holds [ [ (31) B⊂ 5B. B∈B B∈B0 Note that µ1 , Hσ are Radon measures. Then for any τ > 0 there exists a compact set K and an open set U such that K ⊂ A ⊂ U and Hσ (U \ K) < τ, µ1 (U \ K) < τ . 28 LEONID POTYAGAILO AND WEN-YUAN YANG Set 0 := ρ1 (K, ΛG \ U ) > 0. For any 0 <  < 0 , let B be an ε-covering of K. By (31) and Proposition 3.15, there exists a sub-family B 0 of B such that X X (10 · rad(B))σ ≺L µ1 (U ). (k5Bk)σ ≤ Hσ (K) ≤ B∈B0 B∈B0 The condition τ → 0 yields Hσ (A) ≺ µ1 (A).  Remark. We note that µ1 is unique in the following sense: if µ1 , µ01 are two PSmeasures, then dµ1 /dµ01 is bounded from up and below. Lemma 4.2 proves that the Hausdorff dimension of ∂T is equal to σ. Since ∂T is a subset of the set of uniformly conical points in ∂λ G and ΛG, the dimension σ = −δT,S / log λ of ∂T gives a lower bound of Hdimρλ,1 (∂λuc G) and Hdimρ̄λ,1 (Λuc G). Letting L → ∞, we have δT,S → δG,S by Proposition 3.15. So, Hdimρλ,1 (∂λuc G) ≥ −δG,S / log λ and Hdimρλ,1 (Λuc G) ≥ −δG,S / log λ. The proofs of Theorems 1.1 and 1.2 are complete. 5. Tight Paths and Floyd metrics In this section, we shall develop a detailed understanding of shortcut geodesics via a class of well-controlled paths called (generalized) tight paths. 5.1. Tight paths. It is well-known that in hyperbolic spaces, a sufficiently “long” local geodesic becomes globally a quasi-geodesic. This property in general fails for the Cayley graph of a relatively hyperbolic group. V. Gerasimov and L. Potyagailo proposed in [14] a notion of tight paths as a generalization of local geodesics to the relative setting. The following definition is a small modification of it. Definition 5.1. For c ≥ 1, l > 0, a path γ is called (c, l)-tight path if for any two points x, y ∈ γ with d(x, y) ≤ l the subpath [x, y]γ is a c-quasi-geodesic. Remark. This definition is a partial case of [14, Definition 6.1] where a local quasigeodesicity is requested outside of the horospheres only and an additional condition is assumed for the horospheres. So if a path is tight in the sense of Definition 5.1 it is also tight in the sense of [14, Definition 6.1] but not necessarily vice versa. In particular we can use all results proven in [14]. In addition, the above definition implies that every subpath of a tight path is a tight path itself, which is not always true in the general case. This stability of the tightness for subpaths will be often used below. We also stress that the above definition does not coincide with the standard notion of local (quasi-)geodesicity when the assumption that the length of a subpath (and not its diameter) is small implies its (quasi-)geodesicity. In what follows, to reduce cumbersome quantifiers, we continue to use Convention 2.18 without explicit mention on the constants , R, which depend on the parameter c > 0 in tight paths. We recall the following result about tight paths proved in [14]. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 29 Lemma 5.2. For any c ≥ 1, there exist κ = κ(c), l0 = l0 (c) > 0 with the following property. Let γ be a (c, l)-tight path for l ≥ l0 . Then ρv (γ− , γ+ ) ≥ κ for any (, R)transitional point v ∈ γ. Comments on the proof. The statement that ρv (γ− , γ+ ) ≥ κ is first established in [14, Proposition 6.7] for a special sub-sequence of transitional vertices v ∈ γ. Then it is shown in the proof of [14, Theorem B] that the tigthtness of a path implies it for every transitional vertex (up to decreasing the constant κ).  We call below a sequence of points zi = γ(ti ) of a length-parametrized path γ well-ordered if ti > ti−1 (ti ∈ Z). The following lemma is an intermediate step in the proof of Proposition 5.6 below which is the main result of this subsection. Lemma 5.3 (Transitional tight path is quasi-geodesic). For any c, L ≥ 0, there exist l0 = l0 (L), c0 = c0 (c) ≥ 1 with the following property. Let γ be a (c, l)-tight path for l ≥ l0 . Assume that γ is an (, R, L)-transitional path, where , R satisfy Convention 2.18. Then γ is a c0 -quasi-geodesic. Proof. By Lemma 5.2, there exists κ = κ(c) ≥ 0 such that ρx (γ− , γ+ ) ≥ κ for every (, R)-transitional point x ∈ γ. Set D0 = φ(κ/2). Choose l0 ≥ 2(L + D0 ). Since any subpath of γ is (c, l)-tight, it is enough to prove that there exists a linear bound for `(γ) with respect to d(γ− , γ+ ). Let α be a geodesic with the same endpoints as γ. The idea of proof is to find two sequences of well-ordered points in γ and α respectively which are uniformly close. Since γ is (, R, L)-transitional, there exists a maximal set of (, R)-transitional well-ordered points {zi : 1 ≤ i ≤ n} in γ such that `([zi , zj ]γ ) ≥ 2D0 for i 6= j and `([zi , zi+1 ]γ ) ≤ 2(L + D0 ) for 1 ≤ i < n. Indeed, let z1 be the first (, R)-transitional point in γ. Suppose zi is chosen for i ≥ 1. If `([zi , γ+ ]) ≤ 2(L + D0 ) then zi+1 = γ+ . Consider the point z in [zi , γ+ ]γ such that `([zi , z]γ ) = L + 2D0 . If z is (, R)-transitional in γ, then set zi+1 = z. Otherwise, there exists an (, R)-transitional point zi+1 such that `([z, zi+1 ]γ ) ≤ L and `([zi , zi+1 ]γ ) ≤ 2(L + D0 ). By Lemma 5.2, there exists κ > 0 such that ρzi+1 (zi , γ+ ) ≥ κ for any 1 ≤ i < n. By Lemma 2.6, there exists w1 ∈ α such that d(z1 , w1 ) ≤ D0 . We now choose other wi inductively for i ≥ 1. Suppose wi ∈ α is chosen such that d(zi , wi ) ≤ D0 . Since d(zi+1 , zi ) ≥ 2D0 , we obtain [zi , wi ] ∩ B(zi+1 , D0 ) = ∅. By the choice of D0 = φ(κ/2), we know that for any v ∈ G, any geodesic outside B(v, D0 ) has lv -length at most κ/2. So ρzi+1 (wi , zi ) ≤ κ/2 and then ρzi+1 (wi , γ+ ) ≥ κ/2. Thus there exists wi+1 ∈ [wi , α+ ]α such that d(zi+1 , wi+1 ) ≤ D0 . Clearly, the obtained points wi are wellordered on α. As l0 > 2(L+D0 ), [zi , zi+1 ]γ is a c-quasi-geodesic by the tightness property. Since wi are well-ordered on α, we see that γ is a c0 -quasi-geodesic for c0 := c + 2D0 .  The following lemma will be often used further. 30 LEONID POTYAGAILO AND WEN-YUAN YANG Lemma 5.4 (Bounded overlap). For c ≥ 1 and (, R) given by Convention 2.18, there exist K0 , l0 > 0 with the following property. Let γ be a (c, l)-tight path for l ≥ l0 . Assume that β1 , β2 are two maximal connected segments of γ such that (βi )− , (βi )+ ∈ N (Xi ) for some Xi ∈ P with i = 1, 2. Then `(β1 ∩ β2 ) ≤ K0 . In particular, the endpoints of βi are (, R)transitional for i = 1, 2. Proof. By Definition 5.1 a subpath of a tight path is itself tight. Then by [14, Proposition 7.6] it follows that there exists l0 > 0 such that for all l ≥ l0 the elements of P are uniformly quasi-convex with respect to the system of (c, l)-tight paths. This implies that there exists a uniform constant ε = ε(, c) > 0 such that βi ⊂ Nε (Xi ) for i = 1, 2. By Lemma 2.16 we find a constant R = R(ε) > 0 such that kNε (X) ∩ Nε (X 0 )k ≤ R for every X, X 0 ∈ P. Assume that l0 > cR + c. Since βi are l-local c-quasi-geodesic for l > l0 , it follows that `(β1 ∩ β2 ) ≤ K0 := cR + c.  Remark. By the bounded intersection of P, this lemma holds trivially if γ is a quasi-geodesic. However, the tight path γ above is a local quasi-geodesic only. Let γ be a (c, l)-tight path. Let  = (c) given by Convention 2.18 and K0 given by Lemma 5.4. For K > K0 , we consider all maximal connected segments βi in γ (1 ≤ i ≤ m) such that `(βi ) ≥ K and (βi )− , (βi )+ ∈ N (Xi ) for some Xi ∈ P. Consequently, Xi 6= Xj for i 6= j. These (βi , Xi ) shall be referred to as (, K)-components of γ. We stress that by the argument of Lemma 5.4 the segment βi belongs to N (Xi ) for a uniform  > 0 and unique Xi . We now introduce a modification of a tight path to make the obtained path a quasi-geodesic. Definition 5.5 (Truncation of a tight path). Let γ be a (c, l)-tight path for c ≥ 1, l > 0. Consider all (, K)-components (βi , Xi ) (1 ≤ i ≤ m) for a fixed K > 2K0 , where K0 > 0 is given by Lemma 5.4. Set y1 = (β1 )− , x2 = (β1 )+ . If βi ∩ βi−1 = ∅ for i ≥ 2, denote yi = (βi )− , xi+1 = (βi )+ ; otherwise, set yi = xi−1 , xi+1 = (βi )+ . Replace [yi , xi+1 ]γ by a geodesic segment [yi , xi+1 ] for each i ≥ 1. The path γ̄ obtained in this way is called a K-truncation of γ. Remark. The following observation is elementary and useful: every βi produces an (, K/2)-deep point in Xi in the truncation path γ̄. Consequently, if γ̄ does not contain an (, R)-deep point, then d((βi )− , (βi )+ ) ≤ 2R for all βi . The following lemma is the main result of this subsection. It provides a further generalization of Lemma 5.3 to the truncated tight paths. Lemma 5.6 (Truncation is quasi-geodesic). For any c ≥ 1, there exist l0 = l0 (c), K = K(c), c0 = c0 (c) > 0 with the following property. For any l ≥ l0 , the K-truncation of a (c, l)-tight path is a c0 -quasi-geodesic. Proof. Let K > 2K0 be a fixed integer, where K0 is given by Lemma 5.4. Let γ̄ be the K-truncation of a (c, l)-tight path γ. Keeping the notations as in Definition 5.5, we have by Lemma 5.4 that yi , xi+1 for 1 ≤ i ≤ m are (, R)-transitional points in γ. Furthermore since [xi , yi ]γ contains no (, K)-components for 1 ≤ i < m, we see that [xi , yi ]γ is an (, R, L)-transitional path for L := K/2. By Lemma 5.3, there exist l0 = l0 (L), c0 = c0 (c) ≥ 1 such that [xi , yi ]γ is a c0 -quasi-geodesic. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 31 The geodesic [yi , xi+1 ] belongs to the -neighbourhood N (Xi ) for some Xi ∈ P where we assume that yi is the entry point of γ ∩ N (X) and xi+1 is the exit point of it. We will now show that γ is a quasi-geodesic in a neighbourhood of yi . Since yi is (, R)-transitional, ρyi (xi , xi+1 ) ≥ κ where κ is given by Lemma 5.2. Hence, d(yi , [xi , xi+1 ]) ≤ D0 := φ(κ) where φ is the function given by Lemma 2.6. Connect the point xi with an arbitrary point z ∈ [yi , xi+1 ] by a geodesic β. By the triangle inequality we have d(xi , yi ) + d(yi , xi+1 ) ≤ d(xi , xi+1 ) + 2D0 . Since d(yi , z) + d(z, xi+1 ) = d(yi , xi+1 ) we obtain d(xi , yi ) + d(yi , z) ≤ d(xi , xi+1 ) − d(z, xi+1 ) + 2D0 ≤ d(xi , z) + 2D0 . Finally `([xi , z]γ̄ ) = `([xi , yi ]γ ) + `([yi , z]) ≤ c0 d(xi , yi ) + c0 + d(yi , z) ≤ c0 d(xi , z) + c0 + 2c0 D0 . So [xi , z]γ̄ is a c1 -quasi-geodesic for c1 := c0 (2D0 + 1). We have that any subpath γ̃ of the truncated path γ̄ is the union of three types of c1 -quasi-geodesic subpaths: a) γi = [xi , yi ]γ , b) βi = [yi , xi+1 ]γ and c) δ = [a, b]. Both vertices of the intervals of types a) and b) are transitional on the corresponding tight path γ, and every γi is (, R, L)-transitional whereas βi is an (, K)-component. The path γ̃ can contain at most two intervals δ of type c) such that one of the endpoints of δ coincides with an endpoint of γ̃ and is an interior point of a geodesic truncation of γ̄. Repeating the argument of Lemma 5.3 consider a maximal well-ordered subset V of the transitional vertices {vj ∈ γ̃} in the set W := γ̃ ∩ {yi , xi+1 : 1 ≤ i ≤ m} such that d(vj , vj+1 ) ≥ 2D0 . We connect the endpoints of γ̃ by a geodesic α. Then 0 0 for each vj ∈ V , there exists vj0 ∈ α such that d(vj , vj0 ) ≤ D0 and vj0 ∈ [vj−1 , vj+1 ]α . Since V is maximal in W , for any w ∈ W there exists v ∈ V such that d(v, w) ≤ 2D0 . If W = {w1 , w2 , · · · , wn }, there exists a well-ordered set W 0 = {w10 , w20 , · · · , wn0 } of vertices in α such that d(wi , wi0 ) ≤ 3D0 . Then [γ̃− , w1 ]γ̃ , [wi , wi+1 ]γ and [wn , γ̃+ ]γ̃ are all c1 -quasi-geodesics by the above argument. We have Pn−1 `(γ̃) ≤ c1 (d(γ̃− , w1 ) + i=1 d(wi , wi+1 ) + d(wn , γ̃+ )) + c1 Pn−1 0 ≤ c1 (3D0 + d(γ̃− , w10 ) + i=1 (d(wi0 , wi+1 ) + 3D0 ) + d(wn0 , γ̃+ ) + 3D0 ) + c1 0 0 ≤ c d(γ̃− , γ̃+ ) + c , where c0 := (1 + 3D0 )c1 . The Lemma is proved.  Convention 5.7. For any c ≥ 1, we will assume further on that l0 , K > 0 satisfy both Lemmas 5.2 and 5.4. 5.2. Shortcut metrics and generalized tight paths. Recall that a Floyd geodesic in the Floyd completion does not in general belongs to the Cayley graph and the shortening procedure described in subsection 2.3 allows one to approximate them by local geodesics in the graph. Furthermore the following lemma shows that this approximation can be done using the tight paths: Lemma 5.8. [14, Corollary 7.8] For any l > 0 there exists λ0 ∈]0, 1[ such that for every λ ∈]λ0 , 1[ if the Floyd geodesic γ ⊂ Gλ (with respect to the metric ρλ,o ) joining two distinct points x, y in Gλ does not belong to the Cayley graph G (G, S), then for ε > 0 there exists a tight path γ̃ ⊂ G (G, S) such that |lλ,o (γ̃) − lλ,o (γ)| < ε. 32 LEONID POTYAGAILO AND WEN-YUAN YANG The goal of this subsection is to extend this result to the geodesics with respect to the shortcut metrics {ρ̄λ,o }o∈G on ΛG (see Section 2.2). For this purpose we generalize the notion of a tight path as follows. Definition 5.9 (Generalized tight paths and truncations). Let γ be a finite sequence of (c, l)-tight paths γi in G (G, S) (1 ≤ i ≤ n) such that (γi )+ , (γi+1 )− ∈ N (Xi ) for some Xi ∈ P where Xi 6= Xj (1 ≤ i 6= j < n). We say that γ is a (c, l)-generalized tight path if for each pair of entry and exit points yi , xi+1 of γi and γi+1 respectively in N (Xi ) we have d(yi , xi+1 ) ≥ l (1 ≤ i < n). Fix K > 0. For n > 1, consider the K-truncation γ̄i of [xi , yi ]γi where 1 ≤ i ≤ n. The path γ̃ = γ̄1 · [y1 , x2 ] · γ̄2 · · · [yn−1 , xn ] · γ̄n is called the K-truncation of a generalized (c, l)-tight γ. Remark. Note that a generalized tight path is possibly not connected. If it is connected, then it is a tight path in Definition 5.1. Lemma 5.10 (Generalized truncation is quasi-geodesic). For any c ≥ 1, there exist l0 , K, c0 ≥ 1 such that for any l > l0 , the K-truncation of a (c, l)-generalized tight path is a c0 -quasi-geodesic. Proof. Let K = K(c) be given by Lemma 5.6. Let γ̃ be the K-truncation of a generalized (c, l)-tight path γ. We keep the notations of Definition 5.9. If n = 1, the proof is finished by Lemma 5.6. Assume that n ≥ 2. By Lemma 5.6, there exists c1 > 0 such that each γ̄i is a c1 -quasi-geodesic for each 1 ≤ i < n. We prove below that γ̄i and γ̄i+1 have bounded projection to N (Xi ) where Xi ∈ P. By Lemma 2.16, X ∈ P is c1 -contracting and there exist µc1 , Dc1 > 0 such that the (7) holds. By Convention 2.18, we have  ≥ µc1 . Let z be the entry point of γ̄i in N (Xi ). Claim. There exists a constant C > 0 such that d(z, yi ) ≤ C. Proof of Claim. Since yi is the entry point of γi in N (Xi ), there exists an (, K)component β of γi such that z ∈ β. Consider the tight subpath [β+ , yi ]γi and its K-truncation β1 . By the argument in Lemma 5.6, the path [z, β+ ] · β1 is a c2 -quasi-geodesic for some c2 > 0. Since Xi is quasi-convex, there exists ε = ε(, c2 ) > 0 such that any c2 -quasigeodesic with two endpoints in N (Xi ) lies in Nε (Xi ). This implies that β1 ⊂ Nε (Xi ). However, there exists no (, K)-components in [β+ , yi ]γi . Indeed, if not, 0 there exists an (, K)-component β 0 in [β+ , yi ]γi and Y ∈ P such that β± ∈ N (Y ) 0 0 and d(β− , β+ ) > K > l0 . Since yi is the entry point of γi in N (Xi ), we have 0 0 0 Y 6= Xi . Since β± ∈ Nε (Xi ), we get d(β− , β+ ) ≤ R := R(max{, ε}) by Lemma 2.16. This is a contradiction as l0 > R(max{, ε}). The same reasoning shows that d(z, β+ ) ≤ R. Let L = L(ε, 1) be given by Lemma 2.17. If d(z, yi ) > 2L + R, there exists an interior point in [β+ , yi ]γi which is (c , 1)-deep in Xi . This is a contradiction, since yi is the entry point of [β+ , yi ]γi in N (Xi ) and  ≥ c by Convention 2.18. Hence we proved that d(z, yi ) ≤ C := 2L + R. The claim is proved.  By the contracting property 2.16 we see that ProjXi (γ̄i ) ≤ τ := 2(Dc1 + ) + C. The same is true for ProjXi (γ̄i+1 ). Then γ̃ satisfies the following properties: HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 33 (1) Each γ̄i is a c1 -quasi-geodesic, (2) max{ProjXi (γ̄i ), ProjXi (γ̄i+1 )} ≤ τ , (3) d(xi , yi+1 ) > l. (These properties imply that γ̃ is (l, c1 , c1 , τ )-admissible in the sense of [28, Section 3]). Therefore by Corollary 3.3 in [28], there exist l0 , c0 > 0 such that for any l > l0 the truncation γ̃ is a c0 -quasi-geodesic. The lemma is proved.  Remark. An alternative way to prove the above Lemma is to use the arguments of Proposition 6.1.1 in [15] to prove that γ̃ is a curve whose distortion is a quadratic polynomial, then it follows from Proposition 7.2.2 in [15] that γ̃ is linearly distorted. Proposition 5.11 (Approximation by generalized tight paths). For any l ≥ 0, there exists 0 < λ0 < 1 such that the following property holds for any λ ∈ [λ0 , 1). For any ξ 6= η ∈ ΛG, there exists a sequence of generalized (1, l)-tight paths γn with (γn )− ∈ [o, ξ], (γn )+ ∈ [o, η] such that lim d(o, (γn )− ) = lim d(o, (γn )+ ) = ∞ n→∞ n→∞ and lim lλ,o (γn ) = ρ̄λ,o (ξ, η). n→∞ Proof. By definition of the shortcut metric (3), for any ε > 0, there are finitely many pairs (ηi , ξi+1 ) ∈ ω where 1 ≤ i < m such that X (32) ρ̄λ,o (ξ, η) ≥ ρλ,o (ξi , ηi ) − ε/3, 1≤i≤m where ξ1 := ξ, ηm := η. If m = 1, the proof is completed by Lemma 5.8. Assume that m ≥ 2. Let κ = min{ρo (ηi , ξi+1 ) : 1 ≤ i < m} > 0. For each 1 ≤ i < m, there exists Xi ∈ P such that ηi , ξi+1 ∈ ∂λ (Xi ) where ∂λ (Xi ) is the topological boundary of Xi in ∂λ G. First we claim that one can choose ξ˜1 , η̃m and η̃i , ξ˜i+1 ∈ Xi for each 1 ≤ i < m such that the following two conditions hold, ε (1) max{ρo (ξ˜i , ξi ), ρo (η̃i , ηi )} ≤ min{κ/4, 6m } for 1 ≤ i ≤ m. ˜ (2) If there exists a path α between η̃i , ξi+1 for 1 ≤ i < m such that `(α) ≤ 3l, then it has lo -length at most κ/4. Indeed, (1) is true for ξ˜i and η̃i sufficiently close to ξi and ηi respectively. To prove (2), let R = min{d(1, ξ˜i ), d(1, η̃i ) : 1 ≤ i ≤ m}. We have d(1, α) ≥ R − 3l. So for sufficiently large R the statement (2) follows from the visibility lemma 2.6. By Lemma 5.8, we can connect ξ˜i , η̃i by a (1, l)-tight path γi for 1 ≤ i ≤ m such that (γi )− = ξ˜i and (γi )+ = η̃i and ε (33) |ρλ,o (ξ˜i , η̃i ) − lλ,o (γi )| ≤ . 6m By the condition (1) above, (32) and (33) , the following holds X 5ε (34) ρ̄λ,o (ξ, η) ≥ lλ,o (γi ) − . 6 1≤i≤m Let yi , xi+1 be the entry and exit points of γi and γi+1 in N (Xi ) respectively. If d(yi , xi+1 ) ≥ l for all 1 ≤ i < m, then we are done: {γi } give the generalized tight path. Otherwise, assume that d(xj+1 , yj ) ≤ l for some 1 ≤ j < m. 34 LEONID POTYAGAILO AND WEN-YUAN YANG Observe that max{d(η̃j , yj ), d(ξ˜j+1 , xj+1 )} ≥ l + 1. Indeed, if not, it follows that η̃j , ξ˜j+1 are connected by a path of length at most 3l. By the above condition (2), we have ρo (η̃j , ξ˜j+1 ) ≤ κ/4. By the condition (1), we have ρo (ηj , ξj+1 ) ≤ 3κ/4. We arrive at a contradiction with the definition of κ. Thus, we proved that max{d(η̃j , yj ), d(ξ˜j+1 , xj+1 )} ≥ l + 1. By Lemma 2.7, we obtain the following lλ,o ([yj , η̃j ]γ ) + lλ,o ([ξ˜j+1 , xj+1 ]γ ) ≥ lλ,o ([yj , xj+1 ]). j j+1 which yields lλ,o (γj ) + lλ,o (γj+1 ) ≥ lλ,o ([ξ˜j , yj ]γj ) + lλ,o ([yj , xj+1 ]) + lλ,o ([xj+1 , η̃j+1 ]γj+1 ) ≥ ρλ,o (ξ˜j , η̃j+1 ). This implies that we can drop the pair (ηj , ξj+1 ) in (32) such that the corresponding inequality in (34) still holds. Precisely, choose a (1, l)-tight path αj between ξ˜j , η̃j+1 such that ε |lλ,o (αj ) − ρλ,o (ξ˜j , η̃j+1 )| ≤ . 6m ε . It follows by (34), So lλ,o (γj ) + lλ,o (γj+1 ) ≥ lλ,o (αj ) − 6m X ε 5ε − . ρ̄λ,o (ξ, η) ≥ lλ,o (γi ) + lλ,o (αj ) − 6 6m 1≤i≤m;i6=j,j+1 Consider the new set of (1, c)-tight paths γi (i 6= j, j + 1) and αj . Repeat the above argument for those j for which d(xj+1 , yj ) ≤ l. Since m is finite, for every ε > 0 we obtain a generalized tight path γ such that ρ̄λ,o (ξ, η) ≥ lλ,o (γ) − . The Proposition is proved.  5.3. Floyd and shortcut metrics on uniformly conical points. A priori, the shortcut metrics as quotient of the Floyd metrics might be distorted in a unexpected way. The main result of this subsection is to show that this distortion is not severe for uniformly conical points. Fix a basepoint o ∈ G. Recall that, in Section 2.4, Λuc L,o G denotes the set of uniformly conical points ξ ∈ ΛG for which there exists an (, R, L)-transitional uc geodesic ray between o and ξ. Similarly, denote by ∂L,o G the set of uniformly conical points in ∂λ G based at o. By Proposition 2.4, there exists one-to-one correspondence uc between Λuc L,o G and ∂L,o G. The following is a version of Proposition 2.20 for generalized tight paths. Proposition 5.12. There exist l0 , D > 0 such that for any L > 0, there exists M = M (L) > 0 with the following property. Denote α1 = [o, ξ] and α2 = [o, η] for ξ 6= η ∈ CL G. Let γ be a generalized (1, l)tight path for some l ≥ l0 with γ− ∈ α1 and γ+ ∈ α2 . If d(o, γ− ), d(o, γ+ )  0, then there exists z ∈ γ such that d(z, α1 ∪ α2 ) ≤ D and d(z, αi ) ≤ M for i = 1, 2. Moreover, |d(o, z) − d(o, [ξ, η])| ≤ M . Proof. Let l0 , c0 ≥ c, K > 0 given by Lemma 5.10 such that the K-truncation γ̃ of a generalized (c, l)-tight γ for l ≥ l0 is a c0 -quasi-geodesic. By Proposition 2.20, there exists an (c0 , Rc0 )-transitional point z in γ̃ such that the conclusion of this Proposition holds. If the point z lies on γ, then we are done. So below, we assume that z ∈ / γ, and then have two cases to consider as follows. Let L1 = L(c , Rc0 ) be given by Lemma 2.17, where c0 ≥ c ≥ 1 and they all satisfy Convention 2.18. Assume that l0 ≥ 2L1 . HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 35 Case 1. The point z lies in some (c , K)-component β of a (c, l)-tight path γi . Then max{d(β− , γ), d(β+ , γ)} ≤ L1 . Indeed, if not, then min{d(z, β− ), d(z, β+ )} ≥ L1 . By applying Lemma 2.17 for the geodesic β, we have z ∈ γ̃ is (1 , Rc0 )-deep in Xj . This is a contradiction, as z is an (c0 , Rc0 )-transitional point in γ̃. Case 2. The point z lies in some [yj , xj+1 ] for some j, where [yj , xj+1 ] is given in Definition 5.9 of a generalized tight path. By the same reasoning as above, we apply Lemma 2.17 for the geodesic [(β)− , (β)+ ]. Then min{d(z, yj ), d(z, xj+1 )} ≤ L1 . Thus, we proved that z has a distance at most 2L1 to a point in γ. The conclusion follows as a consequence of Proposition 2.20.  The main result of this subsection is the following. Proposition 5.13 (Visual Floyd/shortcut metric). There exists 0 < λ0 < 1 such that the following holds for any L > 0 and λ ∈ [λ0 , 1). We have uc ρλ,o (ξ, η) L λn , ∀ ξ 6= η ∈ ∂L,o G and ρ̄λ,o (ξ, η) L λn , ∀ ξ 6= η ∈ Λuc L,o G where n = d(o, [ξ, η]). Proof. Let us consider the shortcut metric case only. The Floyd metric case is similar and even easier. Let α1 , α2 be two (1 , R1 , L)-transitional geodesic rays originating at o and terminating at ξ, η respectively. Let l0 , D > 0 be given by Proposition 5.12, and we choose λ0 ∈]0, 1[ verifying Proposition 5.11 for l = l0 . Then by Propositions 5.12 and 5.11 there exists M = M (L) > 0 such that the following holds: (1) For each k > 0, there exists a sequence of generalized (1, l0 )-tight paths γk with (γk )− ∈ α1 , (γk )+ ∈ α2 and such that (γk )− → ξ, (γk )+ → η and |lλ,o (γk ) − ρ̄λ,o (ξ, η)| ≤ 1/k. (35) (2) There exists zk ∈ γk such that d(zk , α1 ∪ α2 ) ≤ D and d(zk , αi ) ≤ M for i = 1, 2. Moreover, |d(o, zk ) − d(o, [ξ, η])| ≤ M . Denote uk := (γk )− and vk := (γk )+ . Upper bound. Choose xk ∈ α1 and yk ∈ α2 such that max{d(zk , xk ), d(zk , yk )} ≤ M . Then for every point t ∈ [xk , zk ] ∪ [zk , yk ] we have d(o, t) ≥ d(o, zk ) − M ≥ n − 2M. Hence max{lλ,o ([xk , zk ]), lλ,o ([yk , zk ])} ≤ M · λn−2M . We also have min{d(o,xk ),d(o,yk )} ≤ max{lλ,o ([xk , ξ]α1 ), lλ,o ([yk , η]α2 )} ≤ λ 1−λ λn−2M 1−λ . It follows that ρ̄λ,o (ξ, η) ≤ lλ,o ([xk , ξ]α1 ) + lλ,o ([yk , η]α2 ) + lλ,o ([xk , zk ]) + lλ,o ([yk , zk ]) (36) 1 ≤ 2λn−2M ( 1−λ + M ). 1 Let C1 := 2λ−2M ( 1−λ + M ). Then ρ̄λ,o (ξ, η) ≤ C1 λn . 36 LEONID POTYAGAILO AND WEN-YUAN YANG Lower bound. Since d(zk , α1 ∪ α2 ) ≤ D, there exists wk ∈ α1 ∪ α2 such that d(zk , wk ) ≤ D. Assume that wk ∈ α2 for concreteness. By Lemma 2.8, any segment of α2 is a Floyd geodesic. Since vk → η and d(o, wk ) ≤ n + D, we can assume that wk ∈ [o, wk ]α2 for all k  0. So ρλ,o (vk , wk ) = lλ,o ([wk , vk ]α2 ) = λd(o,wk ) 1−λ ≥ λd(o,zk )+D 1−λ λd(o,vk ) 1−λ − − λd(o,vk ) 1−λ . We have ρλ,o (vk , wk ) ≤ lλ,o (γk ) + lλ,o ([wk , zk ]). Since d(zk , wk ) ≤ D we have lλ,o ([wk , zk ]) ≤ D · λd(o,zk )−D . Thus lλ,o (γk ) ≥ ρλ,o (vk , wk ) − lλ,o ([wk , zk ]) ≥ lλ,o ([vk , wk ]α2 ) − lλ,o ([wk , zk ]) (37) D D )λd(o,zk ) λD D D ) λD λ − ≥ ( 1−λ λ ≥ ( 1−λ − − λd(o,vk ) 1−λ · λM · λn − λd(o,vk ) 1−λ . Since D does not depend on L by Lemma 5.12, there exists 1 > λ0 > 0 such that (38) D λD λD D 0 − D ≥ − D > 0, 1−λ λ 1 − λ0 λ0 λD 0 − λDD ) · λM > 0. Note that d(o, vk ) → ∞ as for any λ ∈ [λ0 , 1). Let C2 := ( 1−λ 0 0 k → ∞. By (35) and (37), passing to the limit when k → ∞, we obtain ρ̄λ,o (ξ, η) ≥ C2 λn , for any ξ 6= η ∈ Λuc L,o G and any L > 0. The proof is then complete.  Remark. (1) The fact that the constant D does not depend on L is crucial for the choice of λ0 in (38). (2) This lemma gives an asymptotic formula for two uniformly conical points with respect to Floyd metric and shortcut metric. This could be used to give an alternative proof of Lemma 3.14, but cannot be derived from (the proof of) Lemma 3.14. 6. Appendix: Visual metrics and Floyd metrics are bilipschitz equivalent The aim of the Appendix is to give a short proof that the visual Gromov metric νa,o and the Floyd metric ρλ,o on the boundary ∂X of a δ-hyperbolic graph (X, d) are bilipschitz equivalent for some choice of parameters a and λ. This fact, mentioned in the Introduction, is often considered as a folklore, however we have not found a complete proof of it in the literature (see e.g. [18, Lemma 7.2.1] and the key inequality after it, or [6, Formula (1.3)], in both cases the fact is stated without proof). HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 37 Recall the definition of the Gromov visual metric ν on ∂X. For a real parameter a > 0 set δa,o (ξ, η) = e−a(ξ|η) , where (ξ|η) denotes the Gromov product for the basepoint o. Let (39) νa,o (ξ, η) = inf n nX o δa,o (ci−1 , ci ) : ci ∈ Cξ,η , i=0 where Cξ,η is the set of chains of points in ∂X such that c0 = ξ and cn = η. ln 2 then νa,o is a metric on ∂X satisfying the following inequality [17, If a < 6δ Proposition 7.10]: (3 − 2eaδ ) · δa,o (ξ, η) ≤ νa,o (ξ, η) ≤ δa,o (ξ, η) (40) Remark. We note that an inequality similar to (40) where the metric ν is replaced by the Floyd metric (which is our goal now) is formally stated in [23, page 5] but no justification is given. For the Gromov product the following inequality is true [7, Lemma 2.7]: e−4aδ · δa,o (ξ, η) ≤ e−ad(o,[ξ,η]) ≤ δa,o (ξ, η), (41) where d(o, [ξ, η]) is the distance in X from o to the union of all geodesics between ξ and η. The inequalities (40) and (41) imply: νa,o (ξ, η) C1 e−a·d(o,[ξ,η]) (42) for the constant C1 = max{e4aδ , 3 − 2eaδ }. The following proposition provides the bilipschitz equivalence between the visual metric and the Floyd metric on the boundary of X. Proposition 6.1. Let (X, d) be a δ-hyperbolic graph. There exist a constant a0 such that for any a ∈]0, a0 ] there exists a constant C for which ∀ξ, η ∈ ∂X : νa,o (ξ, η) C ρλ,o (ξ, η), (43) where λ = e−a . Proof. By (39) and (42) we have n n o X νa,o (ξ, η) = inf λd(o,[ci−1 ,ci ]) : ci ∈ Cξ,η ≤ C1 ρλ,o (ξ, η). Cξ,η i=0 Indeed ρλ,o is obtained by taking infimum of the expression (39) over the subset of Cξ,η given by the sets of vertices of paths between ξ and η (see Section 2.2). To prove the opposite inequality, we need to use the δ-thin triangle property. Consider a geodesic triangle with vertices o, x, y in X. There exists a δ-center c on [x, y] such that d(c, [o, x]) ≤ δ and d(c, [o, y]) ≤ δ. For notational simplicity we ignore a small uniform difference between different hyperbolicity constants (see e.g. [17, Proposition 2.21]), and denote all of them by δ > 0. Since |d(o, c)−d(o, [x, y])| is uniformly upper bounded to simplify the notations again we assume that d(o, c) = d(o, [x, y]). 38 LEONID POTYAGAILO AND WEN-YUAN YANG Choose x0 ∈ [o, x] and y 0 ∈ [o, y] so that max{d(c, x0 ), d(c, y 0 )} ≤ δ. We have min{d(o, [x0 , c]), d(o, [y 0 , c]) ≥ d(o, [x, y]) − δ. Hence the Floyd length lλ,o ([x0 , c]) of [x0 , c] is at most 0 δ · λd(o,[x ,c]) ≥ δ · λd(o,[x,y])−δ , and similarly for lλ,o ([y 0 , c]). Since [x0 , x] and [y 0 , y] are Floyd ρλ,o -geodesics (Lemma 2.8) we have 0 λd(o,x ) λd(o,[x,y])−δ 0 lλ,o ([x , x]) = ≤ , 1−λ 1−λ 0 and the same for lλ,o ([y , y]). Summing all up we obtain the following estimation for the Floyd length of [x, y]: ρλ,o (x, y) ≤ lλ,o ([x0 , x]) + lλ,o ([x0 , c]) + lλ,o ([y 0 , c]) + lλ,o ([y 0 , y]) d(o,[x,y]) ≤ 2 λ 1−λ + 2δ · λd(o,[x,y])−δ ≤ C2 · λd(o,[x,y]) , n 2 2δ o for the constant C2 = max , δ . Passing to the limits when x → ξ ∈ ∂X 1−λ λ and y → η ∈ ∂X, and using (42) we obtain (43) for the constant C = max{C1 , C2 }.  References 1. C. Bishop and P. Jones, Hausdorff dimension and kleinian groups, Acta Math. 3 (1995), no. 179, 1?39. 2. B. Bowditch, Convergence groups and configuration spaces, Geometric Group Theory Down Under (J. Cossey, C.F. Miller, W.D. Neumann, M. Shapiro, eds.), pp. 23–54, de Gruyter, 1999. 3. , Relatively hyperbolic groups, Int. J. Algebra Comput. (2012), no. 22, p1250016. 4. M. Burger and S. Mozes, CAT(-1)-spaces, divergence groups and their commensurators, Journal of the American Mathematical Society (1996), no. 1, 57–93. 5. J. Cannon, The combinatorial structure of cocompact discrete hyperbolic groups, Geom. Ded. (1984), no. 2, 123–148. 6. M. Coornaert, Mesures de Patterson-Sullivan sure le bord d’un espace hyperbolique au sens de Gromov, Pac. J. Math. (1993), no. 2, 241–270. 7. M. Coornaert, T. Delzant, and A. Papadopoulos, Géométrie et théorie des groupes. les groupes hyperboliques de Gromov, Lecture Notes in Mathematics, Springer-Verlag, 1990. 8. F. Dal’bo, M. Peigné, J.C. Picaud, and A. Sambusetti, On the growth of quotients of Kleinian groups, Ergodic Theory and Dynamical Systems 31 (2011), no. 3, 835–851. 9. W. Floyd, Group completions and limit sets of Kleinian groups, Inventiones Math. 57 (1980), 205–218. 10. D. Gaboriau and F. Paulin, Sur les immeubles hyperboliques, Geom. Dedicata (2001), 153–197. 11. V. Gerasimov, Expansive convergence groups are relatively hyperbolic, Geom. Funct. Anal. 19 (2009), 137–169. 12. , Floyd maps for relatively hyperbolic groups, Geom. Funct. Anal. (2012), no. 22, 1361 – 1399. 13. V. Gerasimov and L. Potyagailo, Quasi-isometries and Floyd boundaries of relatively hyperbolic groups, J. Eur. Math. Soc. 15 (2013), 2115 – 2137. 14. , Non-finitely generated relatively hyperbolic groups and floyd quasiconvexity, Groups, Geometry and Dynamics 91 (2015), 95–135. 15. , Quasiconvexity in the relatively hyperbolic groups, Journal für die reine und angewandte Mathematik (Crelle journal) 710 (2016), 95–135. 16. , Similar relatively hyperbolic actions of a group, International Mathematics Research Notices (2016), no. 7, 2068–2103. 17. E. Ghys and P. de la Harpe, Sur les groupes hyperboliques d’après Mikhael Gromov, Progress in Math., Birkaüser, 1990. HAUSDORFF DIMENSION OF BOUNDARIES OF RELATIVELY HYPERBOLIC GROUPS 39 18. M. Gromov, Hyperbolic groups, Essays in group theory (S Gersten, editor), vol. 1, pp. 75–263, Springer New York, 1987. 19. A. Karlsson, Free subgroups of groups with non-trivial Floyd boundary, Comm. Algebra. 31 (2003), 5361–5376. 20. P. Mattila, Geometry of sets and measures in Euclidean spaces: Fractals and rectifiability, Cambridge Studies in Advanced Mathematics, 44, Cambridge University Press, Cambridge, 1995. 21. S. Patterson, The limit set of a Fuchsian group, Acta Mathematica (1976), no. 1, 241–273. 22. F. Paulin, On the critical exponent of a discrete group of hyperbolic isometries, Differential Geom. Appl. (1997), 231236. 23. M. Puls, The first lp -cohomology of some groups with one end, arXiv:math/0509171, 2005. 24. B. Stratmann, The exponent of convergence of Kleinian groups; on a theorem of Bishop and Jones, Proceedings of the Conference ‘Fractal Geometry and Stochastics’ (Friedrichroda, Germany, 2003); Progress in Probability, vol. 57, p. 93?107, 2004. 25. D. Sullivan, The density at infinity of a discrete group of hyperbolic motions, Publ. Math. IHES (1979), 171–202. 26. P. Tukia, Conical limit points and uniform convergence groups, J. Reine. Angew. Math. 501 (1998), 71–98. 27. W. Yang, Patterson-Sullivan measures and growth of relatively hyperbolic groups, Preprint, 2013. 28. , Growth tightness for groups with contracting elements, Math. Proc. Cambridge Philos. Soc 157 (2014), 297 – 319. , Peripheral structures of relatively hyperbolic groups, Journal für reine und ange29. wandte Mathematik 689 (2014), 101–135. Leonid Potyagailo, UFR de Mathématiques, Université de Lille 1, 59655 Villeneuve d’Ascq cedex, France E-mail address: [email protected] Beijing International Center for Mathematical Research (BICMR), Beijing University, No. 5 Yiheyuan Road, Haidian District, Beijing, China E-mail address: [email protected]
4math.GR
arXiv:1711.02837v1 [stat.ML] 8 Nov 2017 Revealing structure components of the retina by deep learning networks Qi Yan, Zhaofei Yu, Feng Chen Center for Brain-Inspired Computing Research, Department of Automation, Tsinghua University {q-yan15,yuzf12}@mails.tsinghua.edu.cn [email protected] Jian K. Liu Institute for Theoretical Computer Science, Graz University of Technology [email protected] Abstract Deep convolutional neural networks (CNNs) have demonstrated impressive performance on visual object classification tasks. In addition, it is a useful model for predication of neuronal responses recorded in visual system. However, there is still no clear understanding of what CNNs learn in terms of visual neuronal circuits. Visualizing CNN’s features to obtain possible connections to neuronscience underpinnings is not easy due to highly complex circuits from the retina to higher visual cortex. Here we address this issue by focusing on single retinal ganglion cells with a simple model and electrophysiological recordings from salamanders. By training CNNs with white noise images to predicate neural responses, we found that convolutional filters learned in the end are resembling to biological components of the retinal circuit. Features represented by these filters tile the space of conventional receptive field of retinal ganglion cells. These results suggest that CNN could be used to reveal structure components of neuronal circuits. 1 Introduction Deep convolutional neural networks (CNNs) have been a powerful model for numerous tasks related to system identification [1]. By training a CNN with a large set of targeted images, it can achieve the human-level performance for visual object recognition. However it is still a challenge for understanding the relationship between computation and the underlying structure components learned within CNNs [2, 3]. Thus, visualizing and understanding CNNs are not trivial [4]. Inspired by neuroscience studies, a typical CNN model consists of a hierarchical structure of layers [5], where one of the most important properties for each convolutional (conv) layer is that one can use a conv filter as a feature detector to extract useful information from inputed images after the previous layer [6, 7]. Therefore, after learning, conv filters are meaningful. The features captured by these filters can be represented in the original natural images [4]. Often, one typical feature shares some similarities with part of natural images from the training set. These similarities are obtained by using a very large set of specific images. The benefit of this is that features are relative universal for one category of objects, which is good for recognition. However, it also causes the difficulty of visualization or interpretation due to the complex nature of natural images, i.e., the complex statistical structures of natural images [8]. As a result, the filters and features learned in CNNs are often not obvious to be interpreted [9]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. On the other hand, researchers begin to adapt CNNs for studying the target questions from neuroscience. For example, CNNs have been used to model the ventral visual pathway that has been suggested as a route for visual object recognition starting from the retina to visual cortex and reaching inferior temporal (IT) cortex [10–12]. The prediction of neuronal responses recorded in monkey in this case has a surprisingly good performance. However, the final output of this CNN model is representing dense computations conducted in many previous conv layers, which may or may not be related to the neuronscience underpinnings of information processing in the brain. Understanding these network components of CNN are difficult given the IT cortex part is sitting at a high level of our visual system with abstract information, if any, encoded [13]. In principle, CNN models can also be applied to early sensory systems where the organization of underlying neuronal circuitry is relatively more clear and simple. Thus one expect knowledge of these neuronal circuitry could provide useful and important validation for such models. For instance, a recent study employs CNNs to predict neural responses of the retinal ganglion cells to white noise and natural images [14]. Here we move a step further in this direction by relating CNNs with single RGCs. Specifically, we used CNNs to learn to predict the responses of single RGCs to white noise images. In contrast to the study by [14] where one single CNN model was used to model a population of RGCs, in the current study, our main focus is based on single RGCs to revealing the network structure components learned by CNNs. Our aim is to study what kind of possible biological structure components in the retina can be learned by CNNs. This concerns the research focus of understanding, visualizing and interpreting the CNN components out of its black box. To the end, by using a minimal model of RGC, we found the conv filters learned in CNN are essentially the subunit components of RGC model. The features represented by these filters are fallen into the receptive field of modeled RGC. Furthermore, we applied CNNs to analyze biological RGC data recorded in salamander. Surprisingly, the conv filters are resembling to the receptive fields of bipolar cells that sit in the previous layer of RGC and pool their computations to a downstream single RGC. 2 Methods 2.1 RGC model and data A simulated RGC is modeled in Fig. 1 as previously [15]. The model cell has five subunits that each filter, similar to a conv filter in DNN, convolves the incoming stimulus image and then applies an nonlinearity of threshold-quadratic rectification. The subunit signals are then polled together by the RGC. The polled signal is applied with a threshold-linear output nonlinearity with a positive threshold at unity to make spiking sparse. The biological data of RGCs were recorded in salamander as described in [15]. Briefly RGC spiking activity were obtained by multielectrode array recordings as in [16]. The retinas was optically stimulated with spatiotemporal white noise images, temporally updated at a rate of 30 Hz and spatially arranged in a checkerboard layout with stimulus pixels of 30x30 mµ. 2.2 CNN model We adopt a CNN model containing two convolution layers and a dense layer as in [14]. Several sets of parameters in convolution layers, including the number of layers, the number and size of convolution filters were explored. The predication performance is robust against these changes of parameters. Therefore we used a filter size as of 15 × 15 to compare our results with those in [14]. The major difference between our model with that in [14] is that our CNN is for studying of single RGCs. For the RGC model, we used a data set consisting of 600k training samples of white noise images, and additional set of samples for testing. The training labels are a train of binary spikes with 0 and 1 generated by the model. For the biological RGCs recorded in salamander, we used the same data sets as in [15]. Briefly there are about 40k training samples and labels with the number of spikes as in [0 5] for each image. The test data have 300 samples, which are repeatedly presented to the retina for about 200 trials. The average firing rate of this test data is compared to the CNN output for performance calculation. 2 A B Subunit model CNN model convolution convolution dense labels Bernoulli process # Spikes Images Output nonlinearity Subunits C Subunit model RF Spikes Subunit nonlinearity D Conv filters CNN model Features Figure 1: The CNN filters are resembling to the subunits in RGC model. (A) An illustration of RGC model structure. Note there are five subunits playing the role of conv filters. (B) An illustration of CNN model that trains the same set of images to predicate the labels, here spikes, of all images. (C) Receptive fields (RFs) of modeled RGC and predication by CNN model. (D) Visualizing of CNN model components of both conv filters and average features represented by each filter. 3 Results Here we focus on single RGC that has the benefit to clarify the network structure components of CNNs. Recently, a variation of non-negative matrix factorization was used to analyze the RGC’ responses to white noise images and identify a number of subunits, resembling to the biopolar cells, within the receptive field of each RGC [15]. With this picture in mind, here we address the question that what types of network structure components can be revealed by CNNs when they are used to model the single RGC response. A previous study [14] focused on predicating neural response of RGC at the population level with one CNN model, and claimed that the features represented by conv filters are resembling to the receptive fields of bipolar cells (BCs). However, a careful examination reveals that this connection between CNN feature map and BCs is weak since the number of conv filters in the CNN is much less than that of BCs in the RGC population from the retina. By using a CNN model, one expect to reveal a more clear picture of this connection between CNNs and the retina. Here, we set up a single RGC model with conv subunits as in Fig. 1(A), which is resembling to a 2-layer CNN with one conv layer of subunits and one dense layer of single RGC. By training a CNN as in Fig. 1(B) with a set of white noise images to predicate the target labels as the simulated spikes generated by this RGC model, we found that the CNN model can predicate the RGC model response well with Pearson correlation coefficient (CC) up to 0.70 similar to the study by [14]. Interestingly, we also found the CNN model can predicate the receptive field (RF) well as in Fig. 1(C). Furtherer more, the conv filters learned by CNN are the exact subunits employed in the RGC model as shown in Fig. 1(C). A subset of the conv filters, that can be termed as effective filters, start from random shapes and converge to the exact subunits. Although we set up the filter size as 15x15 pixels, the resulting effective filters are sparse represented with a 6x6 pixel size. The rest of the filters are still random and close to zero. Therefore, these results show that CNN parameters are highly redundant. Such a redundancy of parameters, including conv filters, units/neurons and connections of conv and dense layers, is widely observed for deep learning models [17–19]. All together, These results suggest that the CNN model can identify the underlying hidden network structure components within the RGC model by only looking at the input stimulus images and the output response in terms of the number of spikes. 3 A BConv filters Data RF 100 m Features CNN 100 m 100 m C Data Firing rate (Hz) CNN 40 20 0 0 2 4 6 8 10 Time (sec.) Figure 2: The CNN reveals subunit structures in biological RGC data. (A) Receptive fields of the sample cell and CNN predication. (B) Visualizing of CNN model components of both conv filters and average features represented by each filter. (C) Neural response predicated well by CNN model visualized by RGC data spike rasters (upper) and CNN spike rasters (middle) and their average firing rates. To further characterizing these structure components in details, we use a CNN to learn the biological RGC data with the similar images of white noise and the spiking responses. Similar to the results of the RGC model above, the outputs of CNN model can recover the receptive field of data very well as in Fig. 2(A). We also found that the learned conv filters converge to a set of localized subunits whereas the rest of filters are noisy and close to zero as in Fig. 2(B). The size of these localized filters is comparable to that in bipolar cells around 100 mµ [15]. In addition, the features represented by these localized conv filers are also localized. Given the example RGC is a OFF type cell that response to the dark part of images strongly, most features have similar OFF peaks resulted from the OFF BC-like filters. These OFF features tile the space of receptive field of RGC. Interestingly, there are some features with ON peaks, which play a role as inhibition in the retinal circuit. A few features have some complex structures mixed with OFF and ON peaks, which are mostly resulted from the less localized filters. However, if the filters are pure noise, the resulting features are pure noise without any structure embedded. Besides filters and features, the CNN model generates a good predication of RGC response as in Fig. 2(C) with the CC up to 0.75. These observations are similar across different RGCs recorded. 4 Discussion Here by focusing on single RGCs, we shown that CNN can learn their parameters in an interpretable fashion. Both filters and features are close to the biological underpinnings within the retinal circuit. With the benefits of relative well-understood neuronal circuit of the retina ganglion cells, our preliminary results give a strong evidence that the building-blocks of CNNs are meaningful when they are applied to neuroscience for revealing network structure components. Our results extend the previous studies [11, 14] that focus on predication of neural responses. Furtherer more, our approach is suitable to address other difficult issues of deep learning, such as transfer learning, since the domain 4 of images seen by single RGCs is local and less complicated than those global structures of entire natural images. 5 Acknowledgements Q.Y., Z.Y. and F.C. were supported in part by the National Natural Science Foundation of China under Grant 61671266, 61327902, in part by the Research Project of Tsinghua University under Grant 20161080084, in part by National High-tech Research and Development Plan under Grant 2015AA042306. J.K.L. was partially supported by the Human Brain Project of the European Union #604102 and #720270. References [1] Yann Lecun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [2] Leslie N. Smith and Nicholay Topin. arXiv:1611.00847v3, 2016. Deep convolutional neural network design patterns. [3] Adam H. Marblestone, Greg Wayne, and Konrad P. Kording. Toward an integration of deep learning and neuroscience. Frontiers in Computational Neuroscience, 10, sep 2016. [4] Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European Conference on Computer Vision, pages 818–833, 2014. [5] Y Lecun, K Kavukcuoglu, and C Farabet. Convolutional networks and applications in vision. In IEEE International Symposium on Circuits and Systems, pages 253–256, 2010. [6] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. Computer Science, 2014. [7] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In International Conference on Neural Information Processing Systems, pages 1097– 1105, 2012. [8] E. P. Simoncelli and B. A. Olshausen. Natural image statistics and neural representation. Annual Review of Neuroscience, 24(24):1193, 2001. [9] Matthew D. Zeiler, Graham W. Taylor, and Rob Fergus. Adaptive deconvolutional networks for mid and high level feature learning. In International Conference on Computer Vision, pages 2018–2025, 2011. [10] Daniel Yamins, Ha Hong, Charles Cadieu, and James J. Dicarlo. Hierarchical modular optimization of convolutional networks achieves representations similar to macaque it and human ventral stream. Advances in Neural Information Processing Systems, pages 3093–3101, 2013. [11] D. L. K. Yamins, H. Hong, C. F. Cadieu, E. A. Solomon, D. Seibert, and J. J. DiCarlo. Performanceoptimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, may 2014. [12] Charles F. Cadieu, Ha Hong, Daniel L. K. Yamins, Nicolas Pinto, Diego Ardila, Ethan A. Solomon, Najib J. Majaj, and James J. Dicarlo. Deep neural networks rival the representation of primate it cortex for core visual object recognition. Plos Computational Biology, 10(12):e1003963, 2014. [13] Daniel L K Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature Neuroscience, 19(3):356–365, feb 2016. [14] Lane McIntosh, Niru Maheswaranathan, Aran Nayebi, Surya Ganguli, and Stephen Baccus. Deep learning models of the retinal response to natural scenes. In Advances in Neural Information Processing Systems 29. 2016. [15] Jian K. Liu, Helene M. Schreyer, Arno Onken, Fernando Rozenblit, Mohammad H. Khani, Vidhyasankar Krishnamoorthy, Stefano Panzeri, and Tim Gollisch. Inference of neuronal functional circuitry with spiketriggered non-negative matrix factorization. Nature Communications, 8(1), jul 2017. [16] Jian K. Liu and Tim Gollisch. Spike-triggered covariance analysis reveals phenomenological diversity of contrast adaptation in the retina. PLOS Computational Biology, 11(7):e1004425, jul 2015. 5 [17] Misha Denil, Babak Shakibi, Laurent Dinh, MarcAurelio Ranzato, and Nando de Freitas. Predicting parameters in deep learning. In C. J. C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 2148–2156. Curran Associates, Inc., 2013. [18] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. Fiber, 56(4):3–7, 2015. [19] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 1135–1143. Curran Associates, Inc., 2015. 6
1cs.CV
arXiv:1711.04354v1 [math.AC] 12 Nov 2017 HYPERGRAPH ENCODINGS OF ARBITRARY TORIC IDEALS SONJA PETROVIĆ, APOSTOLOS THOMA, MARIUS VLADOIU Abstract. Relying on the combinatorial classification of toric ideals using their bouquet structure, we focus on toric ideals of hypergraphs and study how they relate to general toric ideals. We show that hypergraphs exhibit a surprisingly general behavior: the toric ideal associated to any general matrix can be encoded by that of a 0/1 matrix, while preserving the essential combinatorics of the original ideal. We provide two universality results about the unboundedness of degrees of various generating sets: minimal, Graver, universal Gröbner bases, and indispensable binomials. Finally, we provide a polarization-type operation for arbitrary positively graded toric ideals, which preserves all the combinatorial signatures and the homological properties of the original toric ideal. Introduction Toric ideals associated to 0/1 matrices occupy a special place in the world of toric ideals due to their applications to biology [23], algebraic statistics [21], integer programming [8], matroid theory [14], combinatorics [18]. They are, by definition, incidence matrices of hypergraphs, and in the special case when there are only two nonzero entries in each column they are the incidence matrices of graphs. There is an abundant literature for toric ideals of graphs, including [16, 20, 25, 26], and the book [27], while toric ideals of hypergraphs were recently studied in [11] and [18]. Over the last decades, the rich combinatorial structure of toric ideals has been an anchor for many investigations of their properties. With this literature in mind in [19] we defined and studied the bouquet ideal of an integer matrix A and its relationship to the combinatorial and algebraic structure of the toric ideal encoded by A. Bouquets of a matrix naturally arise from an oriented matroid that records the dependencies from the Gale transform of A. Specifically, in [19] we showed that the bouquets of a matrix capture the essential combinatorics of the corresponding toric ideal, leading to a classification of toric ideals with respect to the bouquet structure. In addition, the bouquet construction represented the key step for a combinatorial classification of strongly robust toric ideals and provides a technique for constructing infinitely many examples of the prominent classes of toric ideals with rich combinatorics, due to equality of various bases, that include unimodular ([2]), generic ([17]) and robust ideals ([3]). In light of these results, here we focus on toric ideals of 0/1 matrices and study their relationship to general toric ideals. Similarly to how the usual reference to 2010 Mathematics Subject Classification. 14M25, 13P10, 05C65, 13D02. Key words and phrases. Toric ideals, Graver basis, universal Gröbner basis, hypergraphs, minimal generating sets, resolutions. 1 (Markov, Gröbner, Graver) bases of matrices refers to bases of corresponding toric ideals, throughout the paper we refer to bases of hypergraphs when we think of bases of toric ideals of incidence matrices of those hypergraphs. We refer the reader to [22, 19] for general definitions of the above-mentioned bases together with the circuits and indispensable binomials, to [22, 6] for some equivalent algebraic descriptions, and to [22, 7] for the general hierarchy among them. As in [19], we will denote the Graver basis of the matrix A by Gr(A), its set of circuits by C(A), and we recall that since any element of KerZ (A) can be written as a (conformal) sum of elements from Gr(A) then one can say that the essential combinatorial information of the toric ideal of A is provided by Gr(A). For the remainder of the introduction, we summarize and put into perspective our two main results. The first main result says, roughly speaking, that the essential combinatorics of arbitrary toric ideals is encoded by almost 3-uniform hypergraphs, that is, hypergraphs with edges of cardinality at most 3 and having at least one such edge: Theorem 1 [Theorem 3.2: Hypergraph encodings of arbitrary toric ideals]. Given any integer matrix A, there exists an almost 3-uniform hypergraph H = (V, E) such that the toric ideal of the hypergraph IH is strongly robust and there is a bijective correspondence between the elements of KerZ (A), Gr(A), and C(A) and KerZ (H), Gr(H), and C(H), respectively. Thus toric ideals of almost 3-uniform hypergraphs, that is toric ideals of 0/1matrices with at most three 1’s on each column are “as complicated” as any arbitrary toric ideals with respect to its essential combinatorics, the Graver basis. Recall that if H is a 0/1 matrix, the toric ideal IH is positively graded, that is, KerZ (H) ∩ Nn = {0}. In interpreting this result, one has to take into account that by ‘arbitrary toric ideals’ we do not mean arbitrarily positively graded toric ideals, but arbitrary in the complete sense. In general, a non-positively graded toric ideal has infinitely many minimal generating sets of different cardinalities and no indispensable binomials, see [5, Theorems 4.18, 4.19], and its Graver basis represents the best combinatorial information one could have on such a toric ideal. However, the fact that Graver basis of any toric ideal is in a (precise defined way) one-to-one correspondence to the Graver basis of a hypergraph shouldn’t mislead the reader that the latter one is easy to describe. Here, it is important to note that while the Graver bases of toric ideals of graphs have very special form and support structure and are completely understood, see [20, 25], those of hypergraphs can be quite complicated ([18]) and not so many things are known. Under these circumstances, “controlling” the essential combinatorics of an arbitrary toric ideal by toric ideals of hypergraphs, Theorem 1 is the best one could hope for. Theorem 1 has some interesting consequences, two of which we single out as universality results for almost 3-uniform hypergraphs. These are also presented in Section 3 (Corollaries 3.3 and 3.4) along with comments relating them to [9]. The second main result provides a polarization-type operation, saying that if IA is positively graded then there exists a stable toric ideal of a hypergraph H of same combinatorial complexity as IA . Stable toric ideals, also introduced and extensively studied in [19], are those whose all of the bouquets are non-mixed, or in other words 2 for which passing to the bouquet ideal preserves all combinatorial information and, in the positively graded case, even the homological information. Theorem 2 [Theorem 4.2: Stable hypergraphs and positively graded toric ideals]. Let IA be an arbitrary positively graded nonzero toric ideal. Then there exists a hypergraph H such that there is a bijective correspondence between the Graver bases, all minimal Markov bases, all reduced Gröbner bases, circuits, and indispensable binomials of IA and IH . Moreover the minimal graded free resolution of IA can be obtained from the corresponding minimal graded free resolution of IH and viceversa, and thus all homological data of IA is inherited from IH . Note by comparison to Theorem 1 that since the toric ideal is positively graded all of the combinatorics, that is all the distinguished special sets, of the toric ideal is encoded by the toric ideal of hypergraph. The great bonus offered by this construction is that one can pass from an arbitrary matrix A with KerZ (A) ∩ Nn = {0} to a 0/1 matrix AH by preserving all the homological data, thus this theorem might be also regarded as a polarization-type operation, see Remark 4.3. Theorem 2 also has some interesting consequences: in particular, it implies that any classification problem about arbitrary positively graded toric ideals involving equality of bases can be reduced to a problem about a toric ideal of a hypergraph defined by a 0/1-matrix. For example, see the conjecture of Boocher et al. [4, Question 6.1] discussed at the end of Section 4 in Remark 4.4. The technical backbone of our results are special types of bouquets for 0/1 matrices, called bouquets with bases, that encode the basic building blocks of Graver bases elements for hypergraphs. Section 2 offers a more technical motivation for this construction and studies bouquets of 0/1 matrices in detail. Two main definitions are those of a bouquet with basis and a monomial walk (Definitions 2.1 and 2.7). We classify such bouquets in Theorem 2.3. There are two technical applications, which solve two problems for hypergraphs: Theorem 2.10 offers a structural result generalizing [18], while Proposition 2.13 generalizes a result from [10] and [25] from graphs to uniform hypergraphs. In particular, Theorem 2.10 and Corollary 2.5 represent the key ingredients in the construction of the hypergraph H from Theorem 1. For the convenience of the reader, we begin by revisiting the bouquet constructions and the basic terminology from [19] next. 1. Revisiting the bouquet construction Let K be a field and A = [a1 , . . . , an ] ∈ Zm×n be an integer matrix of rank r with the set of column vectors {a1 , . . . , an }. We recall that the toric ideal of A is the ideal IA ⊂ K[x1 , . . . , xn ] given by + − IA = (xu − xu : u ∈ KerZ (A)), where u = u+ − u− is the unique expression of an integral vector u as a difference of two non-negative integral vectors with disjoint support, see [22, Section 4]. To every integer matrix A one can associate its Gale transform G(A), which is the n × (n − r) matrix whose columns span the lattice KerZ (A). We will denote the set of ordered row vectors of the matrix G(A) by {G(a1 ), . . . , G(an )}. The vector ai is 3 called free if its Gale transform G(ai ) is equal to the zero vector, which means that i is not contained in the support of any minimal generator of the toric ideal IA , or any element in the Graver basis. A vector which is not free will be called non-free. Definition 1.1 ([19, Definition 1.1]). The bouquet graph GA of IA is the graph on vertices {a1 , . . . , an } whose edge set EA consists of those {ai , aj } for which G(ai ) is a rational multiple of G(aj ) and vice versa. The connected components of the graph GA are called bouquets. It follows from the definition that the free vectors of A form one bouquet, which we call the free bouquet of GA . A bouquet B which is not free is called non-free. The non-free bouquets are of two types: mixed and non-mixed. A non-free bouquet is mixed if contains an edge {ai , aj } such that G(ai ) = λG(aj ) for some λ < 0, and is non-mixed if it is either an isolated vertex or for all of its edges {ai , aj } we have G(ai ) = λG(aj ) with λ > 0, see [19, Lemma 1.2]. By slight abuse of notation, we identify vertices of GA with their labels; that is, ai will be used to denote vectors in the context of A and MA , and vertices in the context of GA . Example 1.2. Let A be the matrix  3 0  1 1   3 0   7 1 6 0 0 0 1 2 2 4 4 0 4 0 5 5 0 3 0 0 0 0 1 0 1 2 0 1 1    .   A basis for KerZ (A) is given by (1, 2, −3, 3, −3, −6, 0) and (1, 2, −3, −2, 1, 2, 0). Thus G(a1 ) = (1, 1), G(a2 ) = (2, 2), G(a3 ) = (−3, −3), G(a4 ) = (3, −2), G(a5 ) = (−3, 1), G(a6 ) = (−6, 2) and G(a7 ) = (0, 0). Therefore the bouquet graph GA with the vertex set {a1 , . . . , a7 } consists of the four bouquets B1 , . . . , B4 depicted below. − • a1 a3 • − + •a 2 B1 a6 • • a4 + • a5 B3 B2 • a7 B4 Here, B1 is mixed, B3 is non-mixed, B2 is non-mixed (since G(a4 ) 6= (0, 0)) and B4 is the free bouquet (since G(a7 ) = (0, 0)). For each bouquet B there exist some bouquet-index-encoding vectors cB and aB which record the bouquet’s types and linear dependencies. For the complete technical definition of cB we refer the reader to page 9 of [19]; here we simply summarize how to compute these vectors and offer an example below. If the bouquet B is free then we set cB ∈ Zn to be any nonzero vector such that supp(cB ) = {i : ai ∈ B} and with the property that the first nonzero coordinate is positive. For a non-free bouquet B of A, consider the Gale transforms of the elements in B. All the elements are nonzero and pairwise linearly dependent, therefore there exists a 4 nonzero coordinate j in all of them. Let gj = gcd(G(ai )j | ai ∈ B) and fix the smallest integer i0 such that ai0 ∈ B. Then cB is the vector in Zn whose i-th coordinate is 0 if ai ∈ / B, and is εi0 j G(ai )j /gj if ai ∈ B, where εi0 j represents the sign of the integer G(ai0 )jP . With cB introduced the vector aB (see [19, Definition 1.7]), is defined as aB = ni=1 (cB )i ai ∈ Zm , where (cB )i is the i-th component of the vector cB . Detecting the type of a non-free bouquet B is important for our further considerations and we can read this information from the corresponding cB . Indeed, if B is a non-free bouquet of A, then B is a mixed bouquet if and only if the vector cB has a negative and a positive coordinate, see [19, Lemma 1.6]. Hence the non-free bouquet is non-mixed if and only if the vector cB has all nonzero coordinates positive, taking into account that by definition the first nonzero coordinate of cB is positive. The matrix AB whose column vectors are the vectors aB corresponding to the bouquets of A is called the bouquet matrix of A. There is a surprising general connection between the matrix A and its bouquet matrix AB summarized in the following theorem. Theorem 1.3 ([19, Theorem A]). Let A = [a1 , . . . , an ] ∈ Zm×n and its bouquet matrix AB = [aB1 , . . . , aBs ]. There is a bijective correspondence between the elements of KerZ (A) in general, and Gr(A) and C(A) in particular, and the elements of KerZ (AB ), and Gr(AB ) and C(AB ), respectively. More precisely, this correspondence is defined as follows: for u = (u1 , . . . , us ) ∈ KerZ (AB ) then B(u) = cB1 u1 + · · · + cBs us ∈ KerZ (A). Example 1.4 (Example 1.2, continued). Let A be the matrix from Example 1.2. Let us compute the bouquet-index-encoding vectors aBi s and cBi s. For cB1 we can choose j to be either 1 or 2, while i0 = 1. Set j = 1, then g1 = gcd(G(a1 )1 , G(a2 )1 , G(a3 )1 ) and the nonzero coordinates of cB1 are G(a1 )1 G(a2 )1 G(a3 )1 (cB1 )1 = ε11 = 1, (cB1 )2 = ε11 = 2, (cB1 )3 = ε11 = −3. g1 g1 g1 Thus the corresponding bouquet vector is cB1 = (1, 2, −3, 0, 0, 0, 0) and consequently aB1 = 1a1 + 2a2 − 3a3 = (3, 3, 0, 3, 0). Similarly one obtains cB2 = (0, 0, 0, 1, 0, 0, 0), aB2 = a4 = (4, 4, 0, 4, 0), cB3 = (0, 0, 0, 0, 1, 2, 0), aB3 = 1a5 + 2a6 = (5, 5, 0, 5, 0), cB4 = (0, 0, 0, 0, 0, 0, 1) and aB4 = a7 . Therefore we obtain the bouquet matrix AB = [aB1 , aB2 , aB3 , aB4 ] ∈ Z5×4 . Now, the correspondence from Theorem 1.3 works as follows. For example, to the vector (2, 1, −2, 0) ∈ KerZ (AB ) corresponds the vector B((2, 1, −2, 0)) = 2cB1 + 1cB2 − 2cB3 + 0cB4 = (2, 4, −6, 1, −2, −4, 0) ∈ KerZ (A). Note that the bouquet ideal IAB is also defined by the matrix   3 4 5 0 , 0 0 0 1 and taking into account that aB4 is a free vector, IA is just the extension of the defining ideal of the monomial curve parametrized by (t3 , t4 , t5 ) in the polynomial ring in four indeterminates. 5 A subbouquet of GA is an induced subgraph of GA . One easily sees that subbouqets are cliques and maximal ones are the bouquets defined above. A is said to have a subbouquet decomposition if there exists a family of subbouquets B1 , . . . , Bt that is pairwise vertex-disjoint, the union of whose vertices equals {a1 , . . . , an }. A subbouquet decomposition always exists if we consider, for example, the subbouquet decomposition induced by all of the bouquets. We define vectors cB and aB for each subbouquet B as we did for the bouquets. The matrix associated to such a subbouquet decomposition is called a subbouquet matrix. Crucially, Theorem 1.3 is true even if we replace bouquets with proper subbouquets which form a subbouquet decomposition of A. Example 1.5 (Example 1.2, continued). The family of subbouquets B1′ , . . . , B5′ depicted below represents a subbouquet decomposition of A. Note that all of the non-free bouquets B1′ , . . . , B4′ are non-mixed. a6 • • a1 + •a 2 ′ B1 • a3 • a4 B′2 B′3 + • a5 B′4 • a7 B′5 There is a natural question of whether there is an inverse construction to the one described in Theorem 1.3: given a set of vectors a1 , . . . , as and c1 , . . . , cs that can act as bouquet-index-encoding vectors can we construct a toric ideal IA whose s (sub)bouquets are encoded by the given vectors? The answer is yes, comprised in the next theorem, and will be often exploited in the next sections. Theorem 1.6 ([19, Theorem B]). Let {a1 , . . . , as } ⊂ Zm be an arbitrary set of vectors. Let c1 , . . . , cs be any set of primitive vectors, with ci ∈ Zmi for some mi ≥ 1, each having full support and a positive first coordinate. Then, there exists a matrix A with the subbouquet decomposition B1 , . . . , Bs , such that the ith subbouquet is encoded by the following vectors: aBi = (ai , 0, . . . , 0) and cBi = (0, . . . , ci , . . . , 0), where the support of cBi is precisely in the ith block, of size mi . As a consequence of Definition 1.1 and the fact there are two types of non-free bouquets, one has the following straightforward combinatorial classification of toric ideals. A toric ideal may have: 1) all of its non-free bouquets non-mixed; 2) all of its non-free bouquets mixed, or 3) the non-free bouquets are either mixed or non-mixed. In the first case, the Theorem below says that all of the combinatorial information is preserved when passing from IA to IAB . In addition, homological properties are also preserved; see [19, Theorem 3.11]. Theorem 1.7 ([19, Theorem C]). Let IA be a stable toric ideal, that is all of the non-free bouquets of A are non-mixed. Then the bijective correspondence between the elements of KerZ (A) and KerZ (AB ) given by u 7→ B(u), is preserved when we restrict to any of the following sets: Graver basis, circuits, indispensable binomials, minimal Markov bases, reduced Gröbner bases (universal Gröbner basis). 6 This result holds in a more general setting, as explained in detail in [19, Section 3]. For example, even if IA is not stable, one cand find a (maximal) subbouquet decomposition such that all of its subbouquets are non-mixed, and whose subbouquet matrix AB has the property that the bijective correspondence between KerZ (A) and KerZ (AB ) from Theorem 1.7 is preserved. In particular, Example 1.5 gives such a maximal subbouquet decomposition of the matrix A from Example 1.2. The second class of toric ideals, described above, and whose bouquets are all mixed have the following nice property. Proposition 1.8 ([19, Corollary 4.4]). Suppose that every non-free bouquet of A is mixed. Then IA is strongly robust, i.e. the following sets coincide: • the Graver basis of A, • the universal Gröbner basis of A, • any reduced Gröbner basis of A, • any minimal Markov basis of A. However, despite the fact that almost all the examples of strongly robust ideals, previously known in the literature, had all of the bouquets mixed, there are examples of strongly robust ideals which have both types of non-free bouquets, see [19, Example 4.3. b)]. This lead us to raise the following question: Is it true that a strongly robust ideal has at least one mixed bouquet?, see [19, Question 4.6]. Sullivant answered this question in the affirmative in [24] for the particular case of codimension 2 strongly robust toric ideals. 2. Hypergraphs and bouquets with bases As this section consists of three parts, we begin with a ‘roadmap’ to point out the main definitions and results. As described in the Introduction, this section is concerned with toric ideals of 0/1 matrices, which are, by definition, incidence matrices of hypergraphs. To understand this class of toric ideals, we need two main definitions: a bouquet with basis in Definition 2.1, lacking in the previous literature and a monomial walk in Definition 2.7, recovering the meaning of monomial walks on graphs from [20], [27]. The first two subsections are motivated by [18, Problem 6.2], and they, essentially, partially solve its generalization. Theorem 2.3 classifies bouquets with bases, which are either free or mixed subbouquets, while the running example shows its implications on identifying and constructing elements in the Graver basis of a hypergraph. Proposition 2.10 shows that certain hypergraphs based on a sunflower are bouquets with bases and, in particular, recovers the main structural result of [18]. As another application of bouquets with bases, Proposition 2.13 generalizes a result by [10] and [25] for graphs to uniform hypergraphs and showing that the universal Gröbner and Graver bases differ for complete uniform hypergraphs with enough vertices. However, in general, there exist hypergraphs that do not admit such a subbouquet structure. In this case, we provide general constructions in Sections 3 and 4. Let H = (V, E) be a finite hypergraph on the set of vertices V = {x1 , . . . , xm } with edge set E = {E1 , . . . , En }, where each Ei is a subset of {x1 , . . . , xm }. When 7 |Ei | = 2 for all i and Ei 6= Ej for all i 6= j, we have a finite simple graph, and we will specialize to this case to recall results about graphs. We denote by α E the support (column) vector of an edge E, and thus the toric ideal IH is the toric ideal α E1 , . . . , α En ]. Hereafter, for ease of notation, various bases of IH of the matrix [α will be referred to as bases of H; the reader may simply keep in mind that the underlying toric matrix is the incidence matrix of the hypergraph H; for example, Gr(H) := Gr(AH ) where AH is the vertex-edge incidence matrix of H. 2.1. Bouquets with bases. Let H = (V, E) be a hypergraph and U ⊂ V . We define the multiset UE = {E ∩ U|E ∈ E, E ∩ U 6= ∅} and the set EU = {E ∈ E|E ∩ U 6= ∅}. Note that the multiset UE and the set EU have the same number of elements: EU is the set of edges of H that intersect the vertex set U, while UE consists of their restrictions to U. Definition 2.1. The set of edges EU of H is called a bouquet with basis U ⊂ V if the toric ideal of the multi-hypergraph (U, UE ) is principal, generated by an element + − ec −ec with supp(c) = EU , and such that the first nonzero coordinate of c = c+ −c− is positive. Here the toric ideal of (U, UE ) is contained in the polynomial ring with variables indexed by the non-empty subsets ei := Ei ∩ U. n Moreover, for a bouquet with basis EU , we define the vector cEU ∈ PZ such that (cEU )E = cE for any E ∈ EU and 0 otherwise, and the vector aEU = E∈EU cE α E ∈ Zm . Here cE denotes the coordinate of c corresponding to the edge E, and note from the definition of c that cE 6= 0 for all E ∈ EU . The following examples capture the subtleties of this definition and its similarity to Definition 1.1. Example 2.2. a) Consider the hypergraph H = (V, E) from Figure 1, with the set of vertices V = {x, v1 , . . . , v22 } and whose set of edges E consists of the following 20 edges: E1 = {x, v1 , v2 }, E2 = {x, v3 , v4 }, E3 = {x, v5 , v6 }, E4 = {v1 , v3 , v5 }, E5 = {v2 , v4 , v6 }, E6 = {x, v7 , v8 }, E7 = {x, v9 , v10 }, E8 = {x, v11 , v12 }, E9 = {x, v13 , v14 }, E10 = {v7 , v8 , v9 }, E11 = {v10 , v11 , v13 }, E12 = {v12 , v14 }, E13 = {x, v15 , v16 }, E14 = {x, v17 , v18 }, E15 = {x, v19 , v20 }, E16 = {x, v21 , v22 }, E17 = {v16 , v18 , v20 }, E18 = {v15 , v19 }, E19 = {v17 , v19 , v21 }, E20 = {v20 , v22 }. The first bouquet with basis EU1 has five edges, the basis U1 is the set {v1 , . . . , v6 }, the vector c1 corresponds to the binomial generator e1 e2 e3 − e4 e5 of the toric ideal of (U1 , U1E ), and thus cEU1 = (1, 1, 1, −1, −1, 0, . . . , 0) ∈ Z20 and aEU1 = α E1 + α E2 + α E3 − α E4 − α E5 = (3, 0, . . . , 0) ∈ Z23 . The second bouquet with basis EU2 has seven edges, the basis U2 is the set {v7 , . . . , v14 }, the vector c2 corresponds to the binomial generator e6 e7 e8 e9 −e10 e11 e12 of the toric ideal of (U2 , U2E ), and thus the encoding vectors are cEU2 = (0, 0, 0, 0, 0, 1, 1, 1, 1, −1, −1, −1, 0, . . . , 0) ∈ Z20 and aEU2 = 9 X i=6 α Ei − 12 X α Ej = (4, 0, . . . , 0) ∈ Z23 . j=10 8 The third bouquet with basis EU3 has eight edges, the basis U3 = {v15 , . . . , v22 }, the vector c3 corresponds to the binomial generator e13 e14 e215 e16 − e17 e18 e19 e20 of the toric ideal of (U3 , U3E ), and thus cEU3 = (0, . . . , 0, 1, 1, 2, 1, −1, −1, −1, −1) ∈ Z20 and 20 X αE15 + α E16 − aEU3 = α E13 + α E14 + 2α α Ej = (5, 0, . . . , 0) ∈ Z23 . j=17 On the other hand, if A = AH is the incidence matrix of the hypergraph H with columns α E1 , . . . , α E20 , then GA has three mixed non-free bouquets B1 , B2 , B3 . More precisely, the first bouquet B1 corresponds to the vectors α E1 , . . . , α E5 , the second bouquet B2 to the vectors α E6 , . . . , α E12 , and the third bouquet B3 to the vectors α E13 , . . . , α E20 . Moreover, it turns out that cBi = cEUi and aBi = aEUi for all i. v2 v4 • v1 v8 • • • • v7 • v3 v5 • x x • • • • • • v10 v13 v11 • v9 v16 v15 • v12 • v14 x • • • • • • v17 v19 v21 • • • v18 v20 v22 v6 Figure 1. Bouquets with bases EU1 , EU2 , EU3 . (b) The tetrahedron is an example of a bouquet with basis, and the basis can be chosen to be any facet. Let V = {v1 , v2 , v3 , v4 } and E = {E1 = {v2 , v3 , v4 }, E2 = {v1 , v3 , v4 }, E3 = {v1 , v2 , v4 }, E4 = {v1 , v2 , v3 }}. If we consider as basis the set U1 = {v1 , v2 , v3 } then U1E = {e1 = {v2 , v3 }, e2 = {v1 , v3 }, e3 = {v1 , v2 }, e4 = {v1 , v2 , v3 }} + − and the toric ideal of (U1 , U1E ) is generated by the element ec − ec = e1 e2 e3 − e24 , with c = (1, 1, 1, −2). Therefore, cEU1 = (1, 1, 1, −2) and aEU1 = α E1 + α E2 + αE4 = (0, 0, 0, 3). The same example has four different representations as a α E3 − 2α bouquet with basis U, each one of them having pairwise distinct vectors cEU and aEU , respectively. More precisely, if U2 = {v1 , v2 , v4 } then cEU2 = (1, 1, −2, 1) and aEU2 = (0, 0, 3, 0), if U3 = {v1 , v3 , v4 } then cEU3 = (1, −2, 1, 1) and aEU3 = (0, 3, 0, 0), and if U4 = {v2 , v3 , v4 } then cEU4 = (2, −1, −1, −1) and aEU4 = (−3, 0, 0, 0). Note αEi ) are zero vectors for all i. that IH is the zero ideal and the Gale transforms G(α Therefore, the bouquet graph of IH has only the free bouquet B consisting of all vertices α E1 , . . . , α E4 . In particular, by definition of cB and aB we observe that we can choose these vectors to be any of the 4 pairs of vectors obtained before as cEU and aEU . Given the apparent similarity with Definition 1.1 and in light of the two situations discussed in Example 2.2, one would expect a certain relationship between a bouquet with basis of a hypergraph H and a bouquet of its incidence matrix. Even more, one may ask whether cEU and aEU , the encoding vectors of a bouquet with basis, are analogous to cB and aB as defined in Section 1. The following result clarifies the ‘bouquet with basis’ terminology. As we will see, a bouquet with basis corresponds to a subbouquet of the incidence matrix of the hypergraph, where the 9 correspondence is the natural one associating to a set of edges of a hypergraph the set of corresponding support column vectors of its incidence matrix. Thus, from now on, by abuse of notation, we will identify the bouquet with basis EU with the corresponding subbouquet of the incidence matrix. Furthermore, we also note that cEU matches the definition of cB from Section 1, and the same holds for aEU . Theorem 2.3. A bouquet with basis of the hypergraph H = (V, E) is either a free subbouquet or a mixed subbouquet of the incidence matrix of H. Proof. Let EU be a bouquet with basis for some U ⊂ V , and set EU = {E1 , . . . , Es }. Furthermore, denote by M ∈ Zm×n the incidence matrix of the hypergraph (V, E). We may arrange M so that its rows are indexed first by vertices in U and then vertices in V \U, while its columns are indexed first by the edges E1 , . . . , Es and next by the remaining edges, if any. Note that the submatrix of M corresponding to the rows indexed by U and the first s columns, denoted by MU , is the incidence matrix of the multi-hypergraph (U, UE ), while the submatrix of M corresponding to the rows indexed by U and the rest of the columns is 0. Finally, denote by G = (gij ) ∈ Zn×r the Gale transform of M, and according to the labeling of the columns of M its first αE1 ), . . . , G(α α Es ). By definition of the Gale transform, column j of G s rows are G(α is in the kernel of M. Therefore (g1j , . . . , gsj ) ∈ Ker MU and since EU is a bouquet with basis then (g1j , . . . , gsj ) is a multiple of c = (cE1 , . . . , cEs ). Thus gij = λj cEi for αEi ) = cEi (λ1 , λ2 , . . . , λr ) for all i ∈ {1, . . . , s}. all i, j and implicitly we obtain G(α Then it follows at once that α E1 , . . . , α Es belong to the same subbouquet B of M. In addition, since supp(c) = EU then cEi 6= 0 for all i ∈ {1, . . . , s}. Thus there are α Ei ) = 0 for all i or G(α αEi ) 6= 0 for all i. In the first case we two possibilities: G(α obtain that B is a free subbouquet, while in the second B is a non-free subbouquet. Moreover, the toric ideal of (U, UE ) being positively graded implies that the vector cEU has at least one positive and one negative coordinate, and by the description of a non-free mixed bouquet B in terms of cB from Section 1, we obtain that B is mixed.  Let us point out that a bouquet with basis can be a proper subbouquet of a bouquet. Indeed, let A′ be the submatrix of the incidence matrix of the hypergraph H from Example 2.2(a) corresponding to the first twelve columns. As it was already noticed the first five edges form a bouquet with basis, and the other seven edges form another bouquet with basis. In contrast, one can easily see that the bouquet graph of A′ has one mixed bouquet - consisting of all column vectors of A′ , and thus the two bouquets with bases are proper subbouquets. The previous theorem shows that bouquets with bases are always subbouquets. The natural converse question arises: Can there exist (sub)bouquets of the incidence matrix of a hypergraph which are not bouquets with bases? The answer is yes, and as an example consider the complete graph K4 on four vertices, whose incidence matrix is the submatrix corresponding to the first 6 columns of A from [19, Example 1.4]. As it was shown there K4 has three non-mixed bouquets, each one being an edge. On the other hand, K4 does not have any bouquets with bases, since by 10 Theorem 2.3 this would imply the existence either of a mixed non-free subbouquet or a free subbouquet. The main consequence of Theorem 2.3 is that if the edge set of a hypergraph H can be partitioned into bouquets with bases, then the toric ideal IH is easier to describe, via Theorem 1.3. The following example captures this remark. Example 2.4 (Example 2.2(a), continued). The hypergraph H has three bouquets with bases EU1 , EU2 , EU3 which partition E. Therefore, the subbouquet ideal of AH is given by the toric ideal of the matrix whose columns are aEU1 = (3, 0, . . . , 0), aEU2 = (4, 0, . . . , 0), aEU3 = (5, 0, . . . , 0) ∈ Z23 , which is the same as the toric ideal of the monomial curve A = (3 4 5). Computing with [1] we obtain that the Graver basis of IA consists of seven elements (4, −3, 0), (1, −2, 1), (3, −1, −1), (2, 1, −2), (5, 0, −3), (1, 3, −3), (0, 5, −4). Therefore, by Theorem 1.3, the Graver basis of the toric ideal of the hypergraph consists of seven elements. For example, (1, −2, 1) corresponds to the following Graver basis element of IH : cEU1 −2cEU2 + cEU3 = (1, 1, 1, −1, −1, −2, −2, −2, −2, 2, 2, 2, 1, 1, 2, 1, −1, −1, −1, −1) and it encodes the binomial 2 2 2 2 E1 E2 E3 E10 E11 E12 E13 E14 E15 E16 − E4 E5 E62 E72 E82 E92 E17 E18 E19 E20 . This binomial corresponds to the primitive monomial walk (see Definition 2.7) depicted in Figure 2, where the three copies of the vertex x should be identified, but are shown separately for better visibility. • • • • • • x • • x • • • • • • • • • x • • • • • • • • Figure 2. A primitive monomial walk of H In particular, combining Theorem 2.3 with Proposition 1.8 we obtain the following: Corollary 2.5. If the set of edges of a hypergraph H can be partitioned into bouquets with bases then IH is strongly robust. Remark 2.6. As a second application of Proposition 1.8 we give a new class of hypergraphs which satisfy the conclusion of Corollary 2.5, and whose building blocks are not necessarily bouquets with bases. Let H = (V, E) be a hypergraph such that there exists U ⊂ V with the property that U ∩ E 6= ∅ for all E ∈ E and every vertex of U belongs to exactly two edges. Denote by U = {v1 , . . . , vt } ⊂ {v1 , . . . , vm } = V , E = {E1 , . . . , En } and let B be a non-free bouquet of AH (if such a B does not exist then IH = 0 and we are done). This implies that there exists an i ∈ [n] such that α Ei ∈ B. By definition of H there exists vj ∈ Ei ∩ Ek with j ≤ m and k 6= i. Then 11 the vector u ∈ Zm , whose only nonzero coordinate is 1 on the j-th position satisfies the following equalities u · α Ei = 1, u · α Ek = 1, u · α El = 0 for all l 6= i, k. α Ei ) + Therefore the vector cik := (u · α E1 , . . . , u · α En ) has support {i, k} and G(α α Ek ) = 0, see [19, Remark 1.3]. Since B is non-free, G(α α Ei ) = −G(α α Ek ) 6= 0, and G(α thus B is mixed. Therefore by Proposition 1.8 we obtain the desired conclusion, and in particular we recover [11, Proposition 4.5]. Imposing in the definition of H that U = V , thus making H a 2-regular hypergraph, we also recover [11, Proposition 4.2]. Of course, general hypergraphs do not admit a partition of their edge sets into bouquets with bases, let alone mixed subbouquets, as it was shown earlier for K4 . Infinitely many such examples can be constructed; see Section 4 for details. 2.2. Sunflowers. In this subsection we identify some interesting examples of bouquets with bases, namely, the so-called ‘sparse bouquets’ from [18] (of which there was no formal definition!). These hypergraphs are built on sunflowers. The sunflower is highly structured and useful in the hypergraph literature; for example, it is guaranteed to occur in hypergraphs with large enough edge sets, independently of the size of the vertex set (see e.g. [13].) General properties of bouquets with bases studied in the previous subsection allow us to not only recover the theorems about existence of Graver basis elements, but also to: 1) describe completely their Graver basis elements by identifying the bouquet ideal, thus the aB ’s, 2) show that these sunflowers are actually strongly robust, and 3) identify Graver basis elements of any hypergraphs which have sunflowers as subhypergraphs. In addition, unlike [18], we do not specialize to uniform hypergraphs. In Section 1 it was recalled in Theorem 1.3 that the bouquet graph of A encodes the Graver basis of IA . On the other hand, [18] showed that the Graver basis of IH is encoded by primitive monomial walks on the hypergraph. The two concepts are consolidated in the following definition. Definition 2.7. Let (Eblue , Ered ) be a multiset collection of edges of H = (V, E). We denote by degblue (v) and degred (v) the number of edges of Eblue and Ered containing the vertex v, respectively. We say that (Eblue , Ered ) are balanced on U ⊂ V if degblue (v) = degred (v) for each vertex v ∈ U. The vector aEblue ,Ered = (degblue (v) − degred (v))v∈V is called the vector of imbalances of (Eblue , Ered ) and its support is contained in the complement of U in V . If aEblue ,Ered = 0 then we say that (Eblue , Ered) is a monomial walk 1. Q Q Every monomial walk encodes a binomial fEB ,ER = E∈EB E − E∈ER E in IH . A monomial walk (EB , ER ) is said to be primitive if there do not exist proper submultisets E ′ B ⊂ EB and E ′ R ⊂ ER such that (E ′ B , E ′ R ) is also a monomial walk. The 1For completeness, note that the support of a monomial walk, considered as a multi-hypergraph, was called a monomial hypergraph in [18], but this definition does not make an appearance in our results. Instead, we focus on bouquets with bases and the corresponding UE and EU . 12 toric ideal IH is generated by binomials corresponding to primitive monomial walks, see [18, Theorem 2.8]. Remark 2.8. Let H = (V, E) be a hypergraph, U ⊂ V such that EU is a bouquet with basis. Since the toric ideal of the (multi)hypergraph (U, UE ) is principal gen+ − erated by ec − ec with supp(c) = EU the primitive monomial walk (UEblue , UEred ) encoded by (U, UE ) is the following: UEblue is the multiset consisting of the edges e1 , ei2 , . . . , eir with multiplicities c1 , ci2 , . . . , cir , respectively, while UEred is the multiset consisting of the edges eir+1 , . . . , eit with multiplicities −cir+1 , . . . , −cit , respectively. Here c1 , ci2 , . . . , cir are the positive coordinates of c, while cir+1 , . . . , cit are the remaining coordinates of c, all negative. If we consider Eblue to be the multiset collection of edges E1 , Ei2 , . . . , Eir with multiplicities c1 , ci2 , . . . , cir respectively, and Ered the multiset collection of edges Eir+1 , . . . , Eit with multiplicities −cir+1 , . . . , −cit respectively then (Eblue , Ered ) are balanced on U. Moreover, notice that the vector of imbalances aEblue ,Ered equals aEU , and as explained before cEU determines (Eblue , Ered). For example, considering the bouquet with basis EU3 from Example 2.2(a), the toric ideal of (U3 , U3E ) was generated by e13 e14 e215 e16 − e17 e18 e19 e20 , and thus the corresponding Eblue and Ered are depicted with the corresponding colors in the rightmost part of Figure 2. Recall that a matching on a hypergraph H = (V, E) is a subset M ⊂ E of pairwise disjoint edges. A matching is called perfect if it covers all the vertices of the hypergraph. A hypergraph is said to be connected if its primal graph is connected, where the primal graph has the same vertex set as the hypergraph and an edge between any two vertices contained in the same hyperedge. A hypergraph H = (V, E) is a sunflower if, for some vertex set C, Ei ∩ Ej = C for all edges Ei , Ej ∈ E, i 6= j and C ( E for all edges E ∈ E. The set of vertices of C is called the core of the sunflower, and each Ei is called a petal. A matched-petal sunflower2 is a hypergraph consisting of a sunflower and a perfect matching on the non-core vertices. Note that the set of edges of a matched-petal sunflower partitions into the edges of sunflower, i.e. petals, and the edges of the matching, while its set of vertices is just the set of the vertices of the sunflower. A matched-petal sunflower H is called connected if the (multi)hypergraph H − C is connected, where C represents the core vertices. Here, H − C is the (multi)hypergraph consisting of the restricted sunflower: (V \ C, E ′) where E ′ = {E \ C : E ∈ E}, and the edges of the perfect matching of H. A matched-petal partitioned-core sunflower is a hypergraph H consisting of a collection of vertex-disjoint sunflowers S1 , S2 , . . . , Sl and a perfect matching on the union of non-core vertices, that is ∪i (Si \ Ci ). A matched-petal partitioned-core sunflower is called connected if H − C is connected, where C = ∪i Ci . A matchedpetal relaxed-core sunflower is a hypergraph H consisting of a collection of sunflowers 2 Let us also relate this definition to [18], where the authors defined a monomial sunflower : the multi-hypergraph with aEblue ,Ered = 0 whose support is a matched-petal sunflower. However, there is an important distinction: not every matched-petal sunflower is the support of a monomial sunflower. (As a monomial sunflower is an example of a monomial hypergraph, this definition also isn’t used in this manuscript.) 13 S1 , S2 , . . . , Sl with cores C1 , . . . , Cl respectively, which may only intersect at their cores, and a perfect matching on the union of the non-core vertices of the sunflowers. A matched-petal relaxed-core sunflower is called connected if the (multi)hypergraph H − C is connected, where C = ∪i Ci . Remark 2.9. The definitions above resemble various monomial walks (based on various types of sunflowers) introduced in [18]. In contrast, here we allow hypergraphs to be non-uniform and consider the supporting sunflowers as sets instead of multisets. As far as the standard terminology is concerned, note that a matched-petal sunflower is a particular case of matched-petal partitioned-core sunflower, which in turn is a particular case of matched-petal relaxed-core sunflower. Each of the first two subhypergraphs from Figure 1 are connected matched-petal sunflowers, while the third one is not. If we identify the vertices x1 , x2 and x3 from Figure 3 then the hypergraph consisting of the three depicted connected matched-petal sunflowers is a non-connected matched-petal sunflower. Theorem 2.10. Every connected matched-petal relaxed-core sunflower is a bouquet with basis, where the basis consists of the non-core vertices. Proof. Let H be a connected matched-petal relaxed-core sunflower consisting of l sunflowers S1 , . . . , Sl with Ci being the core vertices of sunflower Si for all i, and let U = ∪li=1 Si \ Ci . Note that by definition the set of edges E of H partitions into the set of petals of the sunflowers S1 , . . . , Sl , labeled E1 , . . . , Et , and the edges of the matching, labeled Et+1 , . . . , Ek . In order to prove that EU is a bouquet with basis, we note first that the vector c = (1, 1, . . . , 1, −1, . . . , −1) ∈ Zk corresponds to a binomial in the toric ideal of (U, UE ), where the number of 1’s equals the number of petals, while the number of −1’s equals the number of edges of the matching. Assume that u = (u1 , . . . , ut , ut+1 , . . . , uk ) is an arbitrary vector corresponding to a binomial in the toric ideal of (U, UE ). It remains to prove that u1 = · · · = ut and ut+1 = · · · = uk = −u1 . Let E, E ′ ∈ UE be two different edges, restrictions of two petals and thus non-empty, and let v ∈ E, v ′ ∈ E ′ . Since H is connected, there exists a path in the primal graph of (U, UE ) from v to v ′ , that is v = v0 , v1 , . . . , vr = v ′ . We construct inductively a sequence of edges of UE : let s1 be the largest number such that vs1 ∈ E := E1 . Since E, E ′ are restrictions of petals then E ∩ E ′ = ∅, and thus s1 < r. By definition of s1 , there exists an edge of UE , say E2 , such that vs1 ∈ E1 ∩ E2 . Let s2 be the largest number such that vs2 ∈ E2 . If s2 = r then E ′ = E2 and we stop, otherwise we continue. In this way we obtain a sequence of edges E = E1 , . . . , Ep = E ′ of UE for some p ≥ 2. Denote by uij the coordinate of u corresponding to Ej for all j = 1, . . . , p (that is |uij | is the exponent of Ej in the binomial). Since the binomial corresponding to u is in the toric ideal of (U, UE ), every vertex of U is balanced. Moreover, since every vertex of U belongs to exactly two edges, vsj being balanced implies that uij+1 = −uij for all j < p. Thus we obtain uij = (−1)j+1 u1 for all j = 1, . . . , p, and in particular, if Ej is the restriction of a petal then Ej+1 is an edge of a matching. Therefore, we obtain that for any distinct edges E, E ′ of UE the corresponding coordinates of 14 u are either equal or negatives of each other, with equality holding if and only if E, E ′ are simultaneously either restrictions of petals or edges of the matching M. Hence we get that u = (u1 , . . . , u1 , −u1 , . . . , −u1 ), which implies that the toric ideal + − of (U, UE ) is principal, and generated by ec − ec . Thus EU is a bouquet with basis, as desired.  Since the connected components of a matched-petal relaxed-core sunflower are connected matched-petal relaxed-core sunflowers, then by Theorem 2.10 and Corollary 2.5 we obtain the following: Proposition 2.11. Let H be a matched-petal relaxed-core sunflower. Then IH is strongly robust. In particular, one recovers [18, Theorem 4.12] and implicitly [18, Proposition 4.5] and [18, Proposition 4.9]. To see this, we first identify the subbouquets of a matchedpetal relaxed-core sunflower H and their corresponding a-vectors. If H1 , . . . , Ht are the connected components of H, that is matched-petal relaxed-core sunflowers with the sets of core vertices C1 , . . . , Ct , then denote by C = {v1 , . . . , vs } the union ∪i Ci of core vertices of H. Moreover, we label the edges such that petals are labeled first, while the edges of the matching are labeled last. By Theorem 2.10, H1 , . . . , Ht are bouquets with bases, the bases are the sets of non-core vertices, and the vectors aHi can be computed as vectors of imbalances induced by cHi , as explained in Remark 2.8. Therefore, if we label the rows of the incidence matrix of H first according to the vertices from C, then it follows from Remark 2.8 that for each j the vector aHj has at most the first s components nonzero and for each i = 1, . . . , s the i-th coordinate of aHj is equal to dij , where dij is the number of petals of Hj containing the vertex vi . Now it is obvious via Theorem 1.3 that IH 6= 0 if and only if ID 6= 0, where D is the matrix (dij ) ∈ Zs×t , and their Graver basis are in bijective correspondence, and this is essentially the content of [18, Theorem 4.12]. Example 2.12. Consider H to be the matched-petal relaxed-core sunflower whose three connected components H1 , H2 , H3 are depicted below, and with cores Ci = {xi } for i = 1, 2, 3. Note that each Hi is a connected matched-petal sunflower, and thus a bouquet with basis by Theorem 2.10. If xi 6= xj for all i 6= j then the union of core vertices is C = {x1 , x2 , x3 } and the matrix (dij ) ∈ Z3×3 is the displayed matrix D1 . We recall from the previous paragraph that dij is the number of petals of Hj containing xi . Thus in this case IH = 0.     3 0 0  3 4 0   0 4 0 D1 = D2 = D3 = 3 4 5 0 0 5 0 0 5 If x1 = x2 6= x3 then the union of core vertices is C = {x1 , x3 } and we obtain the corresponding matrix D2 ∈ Z2×3 . Therefore in this case IH 6= 0 is principal. Finally, if x1 = x2 = x3 then C = {x1 } and the matrix D3 is given above. Specializing the previous discussions to a matched-petal sunflower H with t ≥ 1 connected components one obtains the following classification. The toric ideal IH = 0 if and only if t = 1, that is H is a connected matched-petal sunflower. The toric 15 • • • • • • x1 • • x2 • • • • • • • • • • x3 • • • • • • • • • Figure 3. Matched-petal sunflowers ideal IH 6= 0 if and only if t > 1, in which case the subbouquet ideal is just the toric ideal of the monomial curve (d1 . . . dt ), where di represents the number of petals of the i-th connected component, containing the core. 2.3. Graver basis elements of hypergraphs. In cases of interest, it may happen that all (or almost all) bouquets are singletons, seemingly implying that the bouquet construction does not offer anything. However, this is not the case since by [22, Proposition 4.13] if we restrict to a submatrix C of A obtained by deleting some of the columns of A then the Graver basis, universal Gröbner basis and circuits of C are included in the corresponding ones of A. Based on this and the bouquet techniques we construct in Proposition 2.13 an element in the Graver basis of the uniform complete hypergraph with large enough number of vertices, which is not in the universal Gröbner basis. In [10, 25] it was shown that the universal Gröbner basis and the Graver basis of the toric ideal of the complete graph Kn are identical for n ≤ 8 and differ for n ≥ 9. As one application of the bouquet technique, we show that the universal Gröbner basis and the Graver basis of the toric ideal of the complete d-uniform hypergraph Knd differ for n ≥ (d+1)2 , by giving a non trivial example of an element in the Graver basis which does not belong to the universal Gröbner basis. First note that all of the bouquets of the complete d-uniform hypergraph Knd , for large n, are singletons. Then, restricting to a subhypergraph H of Knd , as explained before, we can apply the bouquet techniques to find an element from the Graver basis of H that belongs also to the Graver basis of Knd . We consider a hypergraph Hd+1 = (V, E) with (d + 1)2 vertices V = {vij |1 ≤ i, j ≤ d + 1} and (d + 2)(d + 1) edges: let Ej = {vk1 |1 ≤ k ≤ d + 1, k 6= j} for 1 ≤ j ≤ d + 1 and Eij = {vik |1 ≤ k ≤ d + 1, k 6= j} for 1 ≤ i, j ≤ d + 1. The hypergraph H4 , for d = 3, is depicted in Figure 4. Note that Hd+1 is a subhypergraph of Knd for n ≥ (d + 1)2 . In addition the set of edges of Hd+1 partitions into d+1 bouquets with bases EU1 , . . . , EUd+1 and d+1 single edges E1 , . . . , Ed+1 . Here EUi = {Eij |1 ≤ j ≤ d + 1} and Ui = {vij |2 ≤ j ≤ d + 1} for all i = 1, . . . , d + 1, while the principal generator of the toric ideal of the hyQ pergraph (Ui , UiE ) is the binomial j6=1 eij − ed−1 i1 , see Definition 2.1. Moreover, the incidence matrix of Hd+1 has the rows indexed by the vertices in the following way: v11 , v21 , . . . , vd+1,1 , v12 , v22 , . . . , vd+1,d+1 and the columns indexed by the edges in the following way E11 , E12 , . . . , E1,d+1 , E21 , E22 , . . . , Ed+1,d+1 , E1 , . . . , Ed+1 . With 16 respect to this labeling of the edges and similarly to the computations from Example 2.2(b) we obtain that cEU1 = (d − 1, −1, . . . , −1, 0, . . . , 0), cEU2 = (0, d − 1, −1, . . . , −1, 0, . . . , 0), and so on cEUd+1 = (0, . . . , 0, d − 1, −1, . . . , −1, 0) are vectors of Z(d+2)(d+1) , where 0 ∈ Zd+1 represents the vector with all coordinates zero. 2 By Remark 2.8 the vector aEUi ∈ Z(d+1) has all coordinates zero except the one corresponding to the vertex vi1 , which equals −d. For the singleton subbouquets E1 , . . . , Ed+1 , the encoding vectors are: cE1 = (0, . . . , 0, 1, 0, . . . , 0), . . . , cEd+1 = (0, . . . , 0, 0, . . . , 0, 1), while aEi = α Ei for all i = 1, . . . , d + 1. v13 v14 v12 v24 v44 v11 v21 v43 v23 v41 v31 v22 v32 v42 v34 v33 Figure 4. H4 For the rest of this subsection we use for simplicity the binomial representation for an element in the toric ideal of a hypergraph instead of the vector representation. It is easy to see that the following three types of binomials belong to the toric ideal of the complete d-uniform hypergraph Knd : a) d + 1 binomials of the form Y Y d−1 gi := Eid−1 Eij − Ei1 Ej , j6=1 j6=i b) d + 1 binomials of the form YY hi := Eij − Eld i6=l j6=1 and c) one binomial of the form YY i Eij − j6=1 Y d−1 Ei1 , i6=l Y Ei i Y d−1 Ei1 . i Furthermore, it can be shown that they are all elements of the Graver basis of Knd , although we will prove next just for the last binomial. Proposition 2.13. The universal Gröbner basis of the toric ideal of the complete d-uniform hypergraph Knd differs from the Graver basis for n ≥ (d + 1)2 . Proof. First we prove that the binomial Y Y YY d−1 Eij − Ei Ei1 f= i j6=1 i 17 i does not belong to the universal Gröbner basis of the toric ideal of the complete d-uniform hypergraph Knd . We argue by contradiction. Assume that there exists a monomial order > such that the binomial f belongs to the reduced basis Q Gröbner Q d−1 d−1 Q with respect to the order >. Since Ei1 E divides properly E E j6=i j i i i i1 , it follows that Y Y d−1 (1) Eid−1 Eij > Ei1 Ej . j6=1 j6=i d−1 Q Indeed, if this is not the case then in< (gi ) = Ei1 E . From the previous Q Q d−1j6=i j divisibility it follows that: 1) if in< (f ) = Qi Q Ei i Ei1 then we contradict that f is in the Gröbner basis, or 2) if in< (f ) = i j6=1 Eij then we contradict that f is reduced.QThus (1). Q we obtain the inequality Q Q Also i6=l j6=1 Eij divides i j6=1 Eij , and similarly to the proof of (1) it can be shown that Y YY d−1 (2) Ei1 . Eij < Eld i6=l i6=l j6=1 Taking the product of inequalities (1) when i runs from 1 to d + 1 and canceling common terms we obtain YY Y Y d−1 Eij > Ei Ei1 . i j6=1 i i Similarly, taking the product of inequalities (2) we obtain Y Y YY d−1 d Eij )d < ( Ei Ei1 ) , ( i a contradiction. In order to prove that enough to prove via [22, its subhypergraph Hd+1 . with bases EU1 , . . . , EUd+1 2 AB ∈ Z(d+1) ×2(d+1) j6=1 i i the binomial f belongs to the Graver basis of Knd it is Proposition 4.13] that f belongs to the Graver basis of The partition of the edges of Hd+1 into d + 1 bouquets and d + 1 single edges E1 , . . . , Ed+1 induces the matrix  −d 0  0 −d  AB = [aEU1 , . . . , aEUd+1 , aE1 , . . . , aEd+1 ] =    0 0 0 0 ... 0 0 ... 0 1 .. . . . . −d 1 ... 0 0 1 ... 0 ... .. . 1 ... 0 ...  1 1    ,  0  0 where aEi = α Ei for all i, the first d + 1 rows are indexed after the vertices v11 , . . . , vd+1,1 and the last row represents block matrix 0 ∈ Zd(d+1)×2(d+1) . As it was noticed in the comments prior to this proposition the binomial f corresponds to the vector v = (1 − d, 1, . . . , 1, 1 − d, 1, . . . , 1, . . . , 1 − d, 1, . . . , 1, −1, −1, . . . , −1) ∈ Ker(AHd+1 ). 18 Applying Theorem 1.3 we have a bijective correspondence between Ker(AB ) and Ker(AHd+1 ) and given by B(u1 , . . . , u2d+2 ) = d+1 X cEUi ui + i=1 d+1 X cEi ud+1+i . i=1 Therefore replacing the formulas obtained before for cEUi and cEi , for all i = 1, . . . , d + 1, we obtain that v = B(u) where u = (1, . . . , 1, −1, . . . , −1) ∈ Z2d+2 with equally many 1’s and −1’s. By Theorem 1.3 it is enough to prove that u belongs to the Graver basis of AB to conclude that v (and thus f ) is in the Graver basis of Hd+1 . Assume by contradiction u = u+ − u− is not in the Graver basis of AB . Then there exists 0 6= w ∈ Ker(AB ) such that w+ ≤ u+ and w− ≤ u− , with at least one inequality strict. In terms of coordinates this can be restated: wi ∈ {0, 1} for all i = 1, . . . , d + 1 and wi ∈ {−1, 0} for all i = d + 2, . . . , 2d + 2, and with at least one coordinate zero. If w+ = u+ then since w ∈ Ker(AB ) we obtain w− = u− , a contradiction. Otherwise there exists i ∈ {1, . . . , d + 1} such that wi = 0, and without loss of generality we may assume that w1 = 0. Since w ∈ Ker(AB ) then wd+3 + · · · + w2d+2 = 0, and thus wd+3 = . . . = w2d+2 = 0. If wd+2 = 0 then w = 0, a contradiction, so we necessarily have wd+2 = −1. This leads to −dwi = 1 for all i = 1, . . . , d + 1 a contradiction to w ∈ Z2d+2 . Therefore u belongs to the Graver basis of AB , and we are done.  3. Complexity of hypergraphs It is well-known that the elements of the Graver basis of a toric ideal of a graph are of a rather special form: the exponents of each variable in an element of the Graver basis is either one or two, see, for example, [20] and references therein, and are completely determined by their support. In other words, one can not find two elements in the Graver basis of a toric ideal of a graph with the same support. In [18] it was shown that exponents in the elements of the Graver basis of a toric ideal of a hypergraph can be arbitrarily high, and are not uniquely determined by their supports, see Example 2.4. Thus the natural question is: how complicated are the Graver basis, the universal Gröbner basis or a Markov basis of a hypergraph? The bouquet ideal technique can be used to prove that toric ideals of hypergraphs are as complicated as toric ideals in general. Namely, for any toric ideal, there exists a toric ideal of a hypergraph with “worse” Graver basis, universal Gröbner basis and Markov bases, as well as circuits. “Worse” means that the corresponding set for the toric ideal of a hypergraph has at least the same cardinality and elements of higher degrees than the corresponding elements of the toric ideal. In [9, Theorem 2.1] the authors show that for a particular matrix A, namely the one corresponding to the no-three-way interaction model in statistics, elements in a minimal Markov basis can be arbitrarily complicated as two of the three dimensions of the underlying table grow to infinity. Such matrices are, in fact, incidence matrices of 3-uniform hypergraphs. In contrast, Theorem 3.2 implies that the complexity of the whole Graver basis (resp. minimal Markov or Universal Gröbner basis) of any matrix A can be captured by an almost 3-uniform hypergraph, that is a hypergraph whose 19 edges have cardinality at most 3. In Section 4 there will be a stronger connection but for matrices A defining positively graded toric ideals. We start first with an example, which shows the details of the general construction. Example 3.1. Let A=  −1 −1 2 2 −2 2 −1 0  , be the matrix whose columns are denoted by a1 , . . . , a4 . We construct a hypergraph H = (V, E) such that the bouquet graph of H has four bouquets with bases EU1 , . . . , EU4 , and with the property that the corresponding subbouquet ideal (associated to the vectors aEU1 , . . . , aEU4 ) is IA . The latter will follow since the vectors aEU1 , . . . , aEU4 are “essentially” the vectors a1 , . . . , a4 , in the sense that each aEUi ∈ Z|V | is just the natural embedding of ai in Z|V | with the other coordinates 0. The construction of H is carried out in three steps. Step 1. Every non-zero entry of the matrix A is used to construct a sunflower, which will be the building blocks of the desired hypergraph. Precisely, for a positive entry λ of the matrix A we consider a 3-uniform sunflower with one core vertex and |λ| petals, while for a negative entry λ we consider the sunflower with one core vertex and |λ| + 1 petals, which is almost 3-uniform, meaning that only one petal has two vertices, the other have three. In the particular case of our example the matrix A has three different nonzero entries −1, −2, 2, and thus we have two almost 3-uniform sunflowers and one 3-uniform sunflower pictured below, see Figure 5. • • • • • • • • • • • • • • • Figure 5. The sunflowers corresponding to matrix entries −1 (left), 2 (center), and −2 (right). Step 2. Next we construct for each column aj a connected matched-petal partitioned-core sunflower Hj . For this we use the sunflowers constructed in Step 1 in the following way: if aij > 0 we use the previously constructed sunflower, otherwise the sunflower obtained by deleting the petal with two vertices from the corresponding sunflower. Finally, Hj consists of these disjoint 3-uniform sunflowers, and a perfect matching on the union of non-core vertices. Then we add to Hj the deleted petals with two vertices to obtain Hj′ . For example, since a1 = (−1, −2) we take the sunflowers corresponding to −1 and −2 from Step 1 (see the leftmost picture of Figure 6), then delete the petals with two vertices to construct the connected matched-petal partition-core sunflower H1 (see the middle picture of Figure 6) and finally, add the two petals of cardinality 2 to obtain H1′ (the rightmost picture of Figure 6). 20 • • • • v2 (11) v1 (11) u(11) v1 v2 (11) v1 (11) u(11) • + v2 (21) • −→ v1 (21) • • v2 (21) • −→ v1 (21) • • • v2 • u(21) • • v3 (21) v4 (21) • • • u(21) v1 v1 (21) • • • v2 (21) • • • v2 (11) v1 (11) u(11) • • • v3 (21) v4 (21) • u(21) v2 v3 (21) v4 (21) Figure 6. The bouquet with basis H1′ v2 (12) v1 (12) u(12) • • • v1 v2 (13) • • • v1 (14) • • v1 • • v2 • v4 (22) • • v1 v1 (22) • • v2 (14) v1 (13) • v2 (22) v3 (22) v4 (13) • • v3 (13) • • • • v2 (23) v1 (23) u(23) • v3 (14) v4 (14) v2 Figure 7. The other 3 bouquets with basis corresponding to a2 , a3 , a4 . For sake of completeness, we have labeled the vertices of sunflowers from Figure 6 according to the general construction of Theorem 3.2, and we denote their edges by e0 (11) = {u(11), v1}, e1 (11) = {u(11), v1(11), v2 (11)}, e0 (21) = {u(21), v2}, e1 (21) = {u(21), v1(21), v2 (21)}, e2 (21) = {u(21), v3(21), v4(21)}, e1 = {v2 (11), v1 (21)}, e2 = {v2 (21), v3(21)}, e3 = {v4 (21), v1 (11)}. One should note that there is not a unique way to choose the blue edges (in the picture e2 , e3 , e4 ) such that they form a matching of the non-core vertices of the connected matched-petal partitioned-core sunflower H1 . Also, we see that the hypergraph H1′ constructed is a bouquet with basis the set U1 of all vertices except v1 , v2 . Similarly one repeats the construction for each one of the column vectors of A, that is a2 , a3 , a4 , obtaining the hypergraphs depicted in Figure 7. Note that all four hypergraphs H1′ , . . . , H4′ obtained through the previous construction are bouquets with basis U1 , . . . , U4 , where each Ui is just the set of vertices of Hi′ except v1 , v2 . Step 3 Finally, consider the hypergraph H = (V, E) with |V | = 28 and |E| = 26, obtained from H1′ , . . . , H4′ by taking the vertex set to be the union of the set of vertices of H1′ , . . . , H4′ , and the set of edges is the (disjoint) union of the set of edges of H1′ , . . . , H4′ . Furthermore, we compute the subbouquet vectors of H1′ , . . . , H4′ . For this, we analyze in detail only the first hypergraph H1′ which is a bouquet with basis U1 , constructed in Figure 6, the others being computed similarly. We assume that the column vectors of the incidence matrix of H are indexed such that the first eight correspond, in this order, to the edges e1 (11), e0 (11), e1(21), e2 (21), e0 (21), e1 , e2 , e3 , while the first two rows are indexed by the vertices v1 and v2 . Then cH′1 = 21 (1, −1, 1, 1, −2, −1, −1, −1, 0) ∈ Z26 and aH′1 = e1 (11) − e0 (11) + e1 (21) + e2 (21) − 2e0 (21) − e1 − e2 − e3 = (−1, −2, 0) ∈ Z28 . Analogously, with respect to a similar order for the rest of the edges of the other three bouquets, we obtain the following cH′2 = (0, 1, −1, 1, 1, −1, −1, −1, 0, 0), cH′3 = (0, 0, 1, 1, 1, −1, −1, −1, −1, 0) and cH′4 = (0, 0, 0, 1, 1, −1, −1) ∈ Z26 . Therefore the other three bouquet vectors are aH′2 = (−1, 2, 0), aH′3 = (2, −1, 0) and aH′4 = (2, 0, 0) ∈ Z28 . Since the set of edges of H can be partitioned into four bouquets with bases H1′ , . . . , H4′ , the ideal IH is strongly robust, by Corollary 2.5. By Theorem 1.3, the bijective correspondence between the Graver basis of IA and the Graver basis of IH applies in the following way: to the vector u = (1, 3, 4, −2) ∈ Gr(A) corresponds the vector B(u) (1, −1, 1, 1, −2, −1, −1, −1|3, −3, 3, 3, −3, −3, −3|4, 4, 4, −4, −4, −4, −4|2, 2, −2, −2). There are seven elements in Gr(H). For the next construction we may assume that the matrix A has no zero column or row. Indeed, if, say, a1 = 0, then IA = (IA′ , 1 − x1 ), where IA′ ⊂ K[x2 , . . . , xn ], and if, say, the first row is zero, then IA = IA′ , where A′ = [a′1 , . . . , a′n ], with a′j = (a2j , . . . , amj ) ⊂ Zm−1 for all j. Theorem 3.2. Given any integer matrix A without any zero row or zero column, there exists an almost 3-uniform hypergraph H = (V, E) such that: (1) There is a bijective correspondence, u 7→ B(u), between KerZ (A), Gr(A) and C(A) and KerZ (H), Gr(H) and C(A), respectively. P (2) For every u ∈ Gr(A) we have |u|1 ≤ |B(u)|1 , where |u|1 = ni=1 |ui | represents the 1-norm of the vector u. (3) The toric ideal IH is strongly robust. Proof. Let A = [a1 , . . . , an ] ∈ Zm×n . We will construct a hypergraph H whose subbouquet ideal is IA , and with the property that all its non-free subbouquets are mixed. This will imply at once conditions (1) and (3), by Theorem 1.3 and Corollary 2.5. To this end, let {v1 , . . . , vm } be a set of vertices, and for each nonzero entry of the matrix aij we introduce the following new vertices: (1) if aij > 0 the set {v1 (ij), v2 (ij), · · · , v2aij (ij)} of 2aij vertices, (2) if aij < 0 the set {u(ij), v1(ij), v2 (ij), · · · , v−2aij (ij)} of −2aij + 1 vertices, as well as the following edges: (3) if aij > 0 the aij edges es (ij) = {vi , v2s−1 (ij), v2s (ij)}, where 1 ≤ s ≤ aij , (4) if aij < 0 the −aij + 1 edges es (ij) = {u(ij), v2s−1 (ij), v2s (ij)}, where 1 ≤ s ≤ −aij and e0 (ij) = {vi , u(ij)}. Note that for each aij 6= 0 the hypergraph Sij , on the set of vertices defined in item (1) (item (2), respectively) with the set of edges defined in item (3) (item (4), respectively) is a sunflower with the core vi (u(ij), respectively). Furthermore, each sunflower Sij is either a 3-uniform sunflower if aij > 0 or an almost 3-uniform sunflower if aij < 0 (by almost we mean that all the edges have three vertices except e0 (ij), which has only two vertices). In addition, for any fixed j the 22 sunflowers S1j , . . . , Smj are vertex disjoint by definition. For each nonzero column aj = (a1j , . . . , amj ) we construct first a connected matched-petal partitioned-core sunflower Hj = (Vj , Ej ) on the set of vertices [ [ Vj = {v1 (ij), v2 (ij), . . . , v2aij (ij), vi }∪ {v1 (ij), v2 (ij), . . . , v−2aij (ij), u(ij)}, i:aij >0 i:aij <0 with the core vertices Cj = [ {vi } ∪ i:aij >0 [ {u(ij)}. i:aij <0 For this is enough to describe the construction of H1 = (V1 , E1 ), the others being similar. Consider all nonzero entries of the column a1 = (a11 , . . . , am1 ). To each nonzero ai1 we associate the sunflower Si1 if ai1 > 0, or the sunflower denoted by Si1 \ {e0 (i1)} obtained from Si1 by removing the edge e0 (i1), if ai1 < 0. Note that Si1 \ {e0 (i1)} is a 3-uniform sunflower with core the set {u(i1)}, and its vertex set is obtained from the vertex set of Si1 by removing vi . The matched-petal partitionedcore sunflower H1 with vertex set V1 , consists of the vertex-disjoint sunflowers Si1 (for those i with ai1 > 0) and Si1 \ {e0 (i1)} (for those i with ai1 < 0), and with the following perfect matching on the set Vj \ Cj , of non-core vertices: {v2 (11), v3(11)}, . . . , {v2|a11 |−2(11), v2|a11 |−1 (11)}, {v2|a11 | (11), v1 (21)}, {v2 (21), v3 (21)}, . . . , {v2|am1 |−2 (m1), v2|am1 |−1 (m1)}, {v2|am1 | (m1), v1 (11)}, where for convenience of notation we assumed that all ai1 6= 0 (see for an example the blue edges from Figures 6, 7). This perfect matching on the non-core vertices ensures that Hj = (Vj , Ej ) is a connected matched-petal partitioned-core sunflower. Then we “extend” the hypergraph Hj to the hypergraph Hj′ = (Vj′ , Ej′ ), where Vj′ = Vj ∪ {vi : aij < 0} and Ej′ = Ej ∪ {e0 (ij) : aij < 0}, which turns out to be a bouquet with basis the set Uj = Vj′ \ {vi : aij 6= 0}. Alternatively, we can write Hj′ = EUj for all j = 1, . . . , n. Finally, the hypergraph H = (V, E)Swe are looking for Sn ′ ′ ′ is obtained from H1 , . . . , Hn as follows V = j=1 Vj , and E = nj=1 Ej′ . Note that since A has no zero row, then {v1 , . . . , vm } ⊂ V . Since each Hj′ is a bouquet with basis, then it follows immediately from construction that H has n bouquets with bases. Moreover, the resulting bouquet vector of Hj′ = EUj is aEUj = (aj , 0) ∈ Z|V | and thus we obtain that the subbouquet ideal of IH is IA , as desired.  The following two results were inspired by the universality results of [9]. In some sense, the following two corollaries strengthen [9, Theorem 1.2] and [9, Corollaries 2.1,2.2]. There, the motivation from algebraic statistics was to show that, for a particular 0/1 matrix of a 3-uniform hypergraph encoding a model on three-dimensional contingency tables, as two of the dimensions of the table grow, there cannot be a universal upper bound on the degrees of minimal Markov bases. To show this, it is enough for [9] to construct one element of given arbitrarily high degree. The results below differ in three ways: 1) the underlying incidence matrices of the almost 3-uniform hypergraphs are 0 − 1 matrices with at most three ones on each column; 2) our statement holds true for all binomials in any minimal Markov basis, and not only for one binomial; 3) since the toric ideal constructed is strongly robust then the 23 statement is also valid for Graver basis, indispensable binomials, universal Gröbner basis respectively. The reader should note that the two classes of matrices considered in [9] and considered here have in common only the fact that they are 0 − 1 matrices with at most three ones on each column. Corollary 3.3. For any vectors d1 , . . . , dr ∈ Zm there exists an almost 3-uniform hypergraph H with its toric ideal strongly robust such that all of the elements of the minimal Markov basis of H restricted to some of its entries cover the whole set {d1 , . . . , dr }. α 1 , . . . , α r ] ∈ Zp×r be a unimodular matrix such that all of its Proof. Let D = [α bouquets are not free, and consider the vectors c′i = (1, di ) = (1, di1 , . . . , dim ) ∈ Zm+1 for all i = 1, . . . , r. By definition the vectors c′1 , . . . , c′r are primitive and thus we can apply Theorem 1.6 in order to obtain a generalized Lawrence matrix A = [a1 , . . . , an ] ∈ Zq×n such that its subbouquet ideal equals ID , and whose Graver basis equals the set of circuits and implicitly the universal Gröbner basis. In addition, α i , 0, . . . , 0) and we know that the subbouquet Bi is encoded by the vectors aBi = (α cBi = (0, . . . , c′i , . . . , 0), for all i = 1, . . . , r. Since D is unimodular applying [22, Proposition 8.11] we have that the Graver basis elements of D are vectors with coordinates only 0, 1, −1, which in turn implies via the one-to-one correspondence of Theorem 1.3 r X ′ ′ B((u1 , . . . , ur )) = cBi u′i = (u′1 , u′1d1 , . . . , u′r , u′r dr ) ∈ Zn i=1 that the Graver basis elements of A are vectors whose coordinate nonzero blocks are either c′i or −c′i . Finally, we apply for the matrix A the construction of Theorem 3.2 to obtain the hypergraph H which has n bouquets with bases H1′ , . . . , Hn′ , and whose toric ideal is strongly robust. Note from the proof of Theorem 3.2 that the nonzero coordinates of the vectors cH′i corresponding to the edges of the perfect matching on the non-core vertices are equal either to 1 or −1. Since the subbouquet ideal of IH is equal to IA it follows from the description of the Graver basis elements of A that via the one-to-one correspondence n X (u′1 , u′1d11 , . . . , u′1 d1m , . . . , u′r , u′r dr1 , . . . , u′r drm ) = (u1 , . . . , un ) 7→ cH′j uj j=1 the Graver basis elements of H contain as subvectors at least one of ±d1 , . . . , ±dr . Indeed, from the construction of A we have that u′i ∈ {−1, 0, 1} and we just substitute them in the previous displayed formula. Since IH is strongly robust then the Graver basis equals the minimal Markov basis and thus we have the desired conclusion. For the final part of statement, that is all of the vectors d1 , . . . , dr appear as a support of some elements from the minimal Markov basis of H we need to make a choice on the unimodular matrix D to ensure that in the Graver basis of ID appear all of the variables. For example, we may choose D to be the incidence matrix of a complete bipartite graph Kp,ℓ with p, ℓ ≥ 2 if r equals its number of 24 edges. Otherwise, we consider a complete bipartite graph Kp,ℓ with the number of edges q > r, let D ∈ Zp×q be its incidence matrix and consider the q vectors c′1 , . . . , c′r , c′r , . . . , c′r with the vector c′r being repeated q − r + 1 times.  Taking d1 = · · · = dr = d in the previous corollary and switching from the vector + − notation of an element v ∈ KerZ (H) to the binomial notation xv − xv ∈ IH we obtain the following Corollary 3.4. For any vector d ∈ Zn there exists an almost 3-uniform hypergraph H with its toric ideal strongly robust such that all binomials in the minimal generating set of IH satisfy the following: one of its monomials restricted to a suitable subset of variables has multi-degree d+ and its other monomial restricted to a suitable subset of variables has multi-degree d− . 4. Hypergraphs encode all positively graded toric ideals This section presents a correspondence between positively graded (general) toric ideals and stable toric ideals of hypergraphs. Namely, given a positively graded IA , Theorem 4.2 constructs a stable toric ideal of a hypergraph H = H(A) that has the same combinatorial complexity and whose homological properties are preserved. In particular, the Graver bases of the ideals IA and IH have the same number of elements, and the same holds for their universal Gröbner and Markov bases, as well as indispensable binomials and circuits. Even more is true: if IA has ℓ different minimal Markov bases then IH has also ℓ different minimal Markov bases, and the same holds for the reduced Gröbner bases. Contrast this with Section 3, where an arbitrary toric ideal may have infinitely many minimal Markov bases. For the remainder of this section, fix the following notation:   0 1 ... ... 1 1 0 1 . . . 1 . . . n×n . .  Σn :=   .. . . . . . . ..  ∈ Z 1 . . . 1 0 1 1 ... ... 1 0 and εk,n := (1| {z · · · 1} 0 · · · 0) ∈ Zn , where 1 ≤ k < n. k times The following example illustrates a general construction which is the basis for the proof of Theorem 4.2. Example 4.1. Given a non-negative integer matrix D, we seek a procedure to create a 0/1 matrix A such that there is a bijective correspondence between distinguished sets of binomials of ID and IA , namely, each of: Graver basis, circuits, indispensable binomials, minimal Markov bases, reduced Gröbner bases (universal Gröbner basis). Let   1 3 2 0 1 D = (dij ) =  3 2 1 3 2  ∈ N3×5 . 3 0 2 2 1 25 Let δi := maxl {dli } be the maximum entry in column i of D, and ji := min{l : dli = δi } be the index of the first row where δi appears. For the given matrix D, these values are as follows: δ1 = 3, δ2 = 3, δ3 = 2, δ4 = P 3 and δ5 = 2; and 5 j1 = 2, j2 = 1, j3 = 1, j4 = 2 and j5 = 2. Define δ := i=1 (δi + 1) = 18 and l = 3 − |{j1 , . . . , j5 }| = 1, the number of rows that do not contain any columnmaximum entry δi . We construct a 0-1 matrix A = MH of size 19 × 18, the incidence matrix of a hypergraph H, such that its subbouquet ideal will be ID . Here, 19 = δ+l and 18 = δ. The matrix A is constructed from D in two steps. Step 1. Every column-maximum entry δi defined above will determine a set of horizontal blocks of the matrix A as follows. For each row index k ∈ {ji }5i=1 , consider the set of all δi ’s appearing on the k-th row of D. For each such δi , construct a (δi + 1) × δ block matrix by concatenating (horizontally) the following 5 sub-blocks: block i shall consist of the matrix Σδi +1 , while for each l 6= i, block l shall consist of δi + 1 copies of εdkl ,δi +1 . For example, the first row of D contains two column-maximum entries, δ2 and δ3 . The first entry will generate a row-block of size (3 + 1) × 18 inside A, while the second entry will generate a row-block of size (2 + 1) × 18. First, the entry δ2 = 3 requires concatenating five sub-blocks: the first one consisting of 4 = δ2 + 1 copies of εd11 ,4 = (1 0 0 0); the second one, Σ4 ; the third one consisting of 4 copies of εd13 ,4 = (1 1 0 0); the fourth one, 4 copies of εd14 ,4 = (0 0 0 0); and the fifth, 4 copies of εd15 ,4 = (1 0 0 0). This resulting row-block of A is displayed below, with the distinguished sub-block corresponding to Σ4 colored in blue.   1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 0 0  1 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0     1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 0 . 1 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 0 Similarly, the second entry, δ3 = 2,  1 0 0 0 1 1 1  1 0 0 0 1 1 1 1 0 0 0 1 1 1 will generate the following 3 × 18 row-block:  0 0 1 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 . 0 1 1 0 0 0 0 0 1 0 0 The remaining row indices are j1 = j4 = j5 = 2, thus we consider the second row of D. It contains three δi values: δ1 , δ4 , δ5 , and thus gives rise to three row-blocks of similar structure. These are the third, fourth and fifth row-blocks of the matrix A in Equation (3). Step 2. For each row k of D containing none of the column-maxima δi ’s, that is, for all row indices k ∈ {1, 2, 3} \ {ji }5i=1 , we will create one additional row of A. This row will be obtained by concatenating (in this order) the following vectors εdk1 ,δ1 +1 , εdk2 ,δ2 +1 , εdk3 ,δ3 +1 , εdk4 ,δ4 +1 , εdk5 ,δ5 +1 . For example, the third row of D does not contain any δi and thus the row of A obtained from concatenating the vectors εd31 ,4 = (1 1 1 0), εd32 ,4 = (0 0 0 0), εd33 ,3 = (1 1 0), εd34 ,4 = (1 1 0 0) and εd35 ,3 = (1 0 0) is  1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 . 26 Finally, the matrix A = [a1 , . . . , a18 ] is obtained by concatenating (vertically) the two row-blocks generated by the first row of D, the three row-blocks generated by the second row of D, and the row generated by the third row of D; see Equation (3). Note that the submatrix of A generated by the first row of D has 4 + 3 = 7 rows, the one generated by the second row of D has 4 + 4 + 3 = 11 rows, and the one generated by the third row of D has 1 row. The matrix A has 5 non-mixed bouquets such that a1 , a2 , a3 , a4 belong to the first bouquet B1 , a5 , a6 , a7 , a8 to B2 , a9 , a10 , a11 to B3 , a12 , a13 , a14 , a15 to B4 , and a16 , a17 , a18 to B5 . Moreover all nonzero components of cB1 , . . . , cB5 ∈ Z18 are 1, and thus aB1 = a1 + · · · + a4 ∈ Z19 is the transposed vector of  1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3 , where the first block has 7 coordinates, the second one 11 coordinates, and the last one 1 coordinate. Similarly, aB2 = a5 + · · · + a8 is the transposed vector of  3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 0 , and so on. Thus IAB = ID , and since IA is a stable toric ideal the desired bijective correspondence follows from Theorem 1.7.                  (3) A = MH =                 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0                                  Theorem 4.2. Let ID be an arbitrary positively graded nonzero toric ideal. Then there exists a hypergraph H such that there is a bijective correspondence between the Graver bases, all minimal Markov bases, all reduced Gröbner bases, circuits, and indispensable binomials of ID and IH . Furthermore, all of the homological data of IH is inherited by ID and viceversa. 27 Proof. Since ID is a positively graded toric ideal, we may assume by [15, Corollary 7.23] that D = (dij ) ∈ Nm×n . Furthermore, every column of D is nonzero, since, otherwise, if the j-th column is 0, then xj − 1 ∈ ID , a contradiction to ID being positively graded. We will construct the incidence matrix A of a hypergraph H, such that its subbouquet ideal is equal to ID . For this define column-maximum entries P δi := max{dji : j = 1, . . . , m} for all i = 1, . . . , n and set δ = n + ni=1 δi . Note that δi > 0 for every i = 1, . . . , m. Moreover, denote by ji := min{k : dki = δi } for all i = 1, . . . , n and denote by l = m − #{ji : 1 ≤ i ≤ n}. Then the 0-1 matrix A ∈ N(δ+l)×δ consists of several blocks, concatenated vertically, of the following two types: 1) For each k ∈ {j1 , . . . , jn }, and for each columnmaximum entry δi located on the k-th row of D, construct δi + 1 rows of A by concatenating (horizontally) n block matrices. Here, the i-th block is Σδi +1 , while for each l 6= i the l-th block consists of δi + 1 copies of the row sub-vector εdkl ,δl +1 . 2) For each row index k ∈ [m] \ {j1 , . . . , jn } of D, that is, each row not containing any column-maximum entry δi , construct a row of A by by concatenating (in this order) the following vectors (εdk1 ,δ1 +1 |εdk2 ,δ2 +1 | . . . |εdkn ,δn +1 ). Assume now that the columns of A are labeled a1 , . . . , aδ . We prove that the first δ1 + 1 column vectors of A belong to the same subbouquet B1 , the next δ2 + 1 belong to the same subbouquet B2 , and so on, until the last δn + 1 column vectors belong to the same subbouquet Bn . We will prove this only for the first δ1 + 1 columns of A, the other cases being similar. By the definition of A we have that in the submatrix of A determined by the columns a1 , . . . , aδ1 +1 there exist integers i1 , . . . , i1 + δ1 = i2 such that the matrix corresponding to these rows and the columns a1 , . . . , aδ1 +1 is Σδ1 +1 . We consider the vectors ci,i+1 ∈ Zδ+l for every i = i1 , . . . , i1 + δ1 − 1, whose only nonzero coordinates are 1 on position i, and −1 on position i + 1. Then the covector (ci1 ,i1 +1 · a1 , . . . , ci1 ,i1 +1 · aδ ) = (−1, 1, 0, . . . , 0) has support of cardinality two and G(a1 ) = G(a2 ). Here, we used the fact that in the horizontal block containing Σδ1 +1 (and corresponding to the rows i1 , . . . , i2 ) all the entries corresponding to the rows i1 , i1 + 1 and columns 3, . . . , δ are identical, by definition. Similarly, using all the vectors ci,i+1 for i = i1 , . . . , i2 − 1, we obtain G(a1 ) = · · · = G(aδ1 +1 ), and thus they all belong to the same subbouquet B1 , which is either free or non-mixed. In any case, the vector cB1 = (1, 0, . . . , 0) ∈ Zδ with 1 = (1, . . . , 1) ∈ Zδ1 +1 and aB1 = a1 +· · ·+aδ1 +1 . Analogously, we have cB2 = (0, 1, . . . , 0) with 1 = (1, . . . , 1) ∈ Zδ2 +1 and aB2 = aδ1 +2 + · · · + aδ1 +δ2 +2 , and so on, until cB2 = (0, 0, . . . , 1) with 1 = (1, . . . , 1) ∈ Zδn +1 and aBn = aδ−δn + · · · + aδ . One can easily see from the construction of A that IAB = ID . In addition, since ID 6= 0 then at least one subbouquet is non-free, and therefore IH = IA is a stable toric ideal. Applying now Theorem 1.7 and [19, Theorem 3.11] we obtain the desired conclusions.  Remark 4.3. In conclusion, the previous theorem can be regarded as a polarizationtype operation for positively graded toric ideals by comparison to the properties of the classical polarization for monomial ideals, see [12, Corollary 1.6.3]. Indeed, if ID ⊂ S = K[x1 , . . . , xn ] and IH ⊂ T = K[y1 , . . . , yδ ] are the ideals from the above 28 construction since ID is the subbouquet ideal of IH then height(ID ) = height(IH ). Applying now [19, Theorem 3.11] we have pd(T /IH ) = pd(S/ID ), the ND-graded Betti numbers of ID are obtained from the NAH -graded Betti numbers of IH and viceversa, and thus S/ID is Cohen-Macaulay (respectively Gorenstein) if and only if T /IH is Cohen-Macaulay (respectively Gorenstein). Remark 4.4. Moreover, combinatorial classification problems of arbitrary positively graded toric ideals whose different sets of bases are equal can be reduced to problems about toric ideals of hypergraphs. For example, in [4] Boocher et. al proved that, for robust toric ideals of graphs, the Graver basis is a minimal generating set. In other words, robust toric ideals of graphs are strongly robust. They ask if this property is true in general for any robust ideal. To prove such a statement, it is enough to prove it only for toric ideals of hypergraphs. Indeed, if IA is any robust toric ideal then Theorem 4.2 shows that IH is robust. Then if one can prove that robust ideals of hypergraphs are strongly robust then it follows, again from Theorem 4.2, that IA is also strongly robust. References [1] 4ti2 team, 4ti2 - a software package for algebraic, geometric and combinatorial problems on linear spaces, available at www.4ti2.de (2007). [2] D. Bayer, S. Popescu, B. Sturmfels, Syzygies of unimodular Lawrence ideals, J. Reine Angew. Math. 534, 169–186 (2001). [3] A. Boocher, E. Robeva, Robust toric ideals, J. Symbolic Computation, 68(1), 254–264 (2015). [4] A. Boocher, B. C. Brown, T. Duff, L. Lyman, T. Murayama, A. Nesky and K. Schaefer, Robust graph ideals, Annals of Combinatorics 19(4), 641–660 (2015). [5] H. Charalambous, A. Thoma, M. Vladoiu, Minimal generating sets of lattice ideals, Collectanea Mathematica 68, 377–400 (2017). [6] H. Charalambous, A. Thoma, M. Vladoiu, Markov complexity of monomial curves, Journal of Algebra 417, 391–411 (2014). [7] H. Charalambous, A. Thoma, M. Vladoiu, Markov bases and generalized Lawrence liftings, Annals of Combinatorics 19(4), 661–669 (2015). [8] J. De Loera, R. Hemmecke, S. Onn, R. Weismantel, N-fold integer programming, Discrete Optimization 5, 231–241 (2008). [9] J. De Loera, S. Onn, Markov bases of three-way tables are arbitrarily complicated, J. Symbolic Computation 41, 173–181 (2006). [10] J. De Loera, B. Sturmfels, R. Thomas, Gröbner bases and triangulations of the second hypersimplex, Combinatorica 15(3), 409–424 (1995). [11] E. Gross, S. Petrović, Combinatorial degree bound for toric ideals of hypergraphs, Internat. J. Algebra Comput. 23(6), 1503–1520 (2013). [12] J. Herzog, T. Hibi, Monomial Ideals, GTM 260. Springer 2010. [13] S. Jukna, Extremal Combinatorics-with Applications in Computer Science, Texts in Theoretical Computer Science. Springer, New York (2001). [14] M. Lason, M. Michalek, On the toric ideal of a matroid, Adv. in Mathematics 259, 1–12 (2014). [15] E. Miller, B. Sturmfels, Combinatorial Commutative Algebra, Grad. Texts in Math., vol. 227, Springer-Verlag, New York, (2005). [16] H. Ohsugi, T. Hibi, Toric ideals generated by quadratic binomials, J. Algebra 218, 509–527 (1999). [17] I. Peeva, B. Sturmfels, Generic lattice ideals, J. Amer. Math. Soc., Vol. 11(2), 363–373 (1998). 29 [18] S. Petrović, D. Stasi, Toric algebra of hypergraphs, J. Algebraic Combinatorics, Volume 39, Issue 1, pp 187-208 (2014). [19] S. Petrović, A. Thoma, M. Vladoiu, Bouquet algebra of toric ideals, arXiv:1507.02740v3. [20] E. Reyes, Ch. Tatakis, A. Thoma, Minimal generators of toric ideals of graphs, Adv. Appl. Math. 48, 64–78 (2012). [21] F. Santos, B. Sturmfels, Higher Lawrence configurations, J. Combin. Theory Ser. A 103, 151–164 (2003). [22] B. Sturmfels, Gröbner Bases and Convex Polytopes, University Lecture Series, No 8, MAS, R.I. (1995). [23] B. Sturmfels, S. Sullivant, Toric ideals of phylogenetic invariants, Journal of Computational Biology 12, 204–228 (2005). [24] S. Sullivant, Strongly robust toric ideals in codimension 2, arXiv:1610.07476v1, 2016. [25] Ch. Tatakis, A. Thoma, On the universal Gröbner bases of toric ideals of graphs, J. Combin. Theory Ser. A 118, 1540–1548 (2011). [26] R. Villarreal, Rees algebras of edge ideals, Comm. Algebra 23, 3513–3524 (1995). [27] R. Villarreal, Monomial Algebras, Second Edition, Monographs and Research Notes in Mathematics, Chapman and Hall/CRC, 2015. Sonja Petrović, Department of Applied Mathematics, Illinois Institute of Technology, Chicago 60616, USA Apostolos Thoma, Department of Mathematics, University of Ioannina, Ioannina 45110, Greece E-mail address: [email protected] Marius Vladoiu, Faculty of Mathematics and Computer Science, University of Bucharest, Str. Academiei 14, Bucharest, RO-010014, Romania, and Simion Stoilow Institute of Mathematics of Romanian Academy, Research group of the project PN-II-RU-TE-2012-3-0161, P.O.Box 1–764, Bucharest 014700, Romania E-mail address: [email protected] 30
0math.AC
The Probability of Causation arXiv:1706.05566v1 [math.ST] 17 Jun 2017 Philip Dawid∗ Monica Musio† Rossella Murtas‡ Dedicated to the memory of Stephen Elliott Fienberg 27 November 1942–14 December 2016 June 20, 2017 Abstract Many legal cases require decisions about causality, responsibility or blame, and these may be based on statistical data. However, causal inferences from such data are beset by subtle conceptual and practical difficulties, and in general it is, at best, possible to identify the “probability of causation” as lying between certain empirically informed limits. These limits can be refined and improved if we can obtain additional information, from statistical or scientific data, relating to the internal workings of the causal processes. In this paper we review and extend recent work in this area, where additional information may be available on covariate and/or mediating variables. Key words: Balance of probabilities, Causes of effects, Counterfactual, Group to individual inference, Mediator, Potential response, Sufficient covariate 1 Introduction Many legal proceedings hinge on the assignment of blame or responsibility for some undesirable outcome. In a civil case a patient may sue a pharmaceutical company for damage caused as a side effect of one of its products; or a state health department may bring an action against a tobacco company for not disclosing information it had on the health risks of smoking, thus (it is claimed) leading to unnecessary deaths. In many such cases there will be no dispute about the facts at issue. The patient took the drug and suffered the side effect. The tobacco company admits to having withheld the information. What remains at issue is the causal relation between the established facts. But any attempt to understand this quickly throws us into the philosophical quagmire of counterfactual reasoning, where we have to consider what might have happened in circumstances known to be false. Whether or not the patient’s suit succeeds will depend on whether or not she can prove, to the appropriate legal standard (e.g., “on the balance of probabilities”) that she would not have developed the same outcome, had she not taken the pharmaceutical product. The damages that the tobacco company are liable for will depend on an assessment of how many lives could have been saved, had they made the information available. In this article we concentrate on cases of the first kind, where it is desired to assess whether or not the same outcome would have occurred had the putative causal event been absent. Typically, epidemiological evidence will be admitted as to the frequency of the adverse outcome, both in patients who have, and in patients who have not, been exposed to the product. Although such evidence is clearly of relevance, it is less clear exactly how. A common procedure is to compute ∗ University of Cambridge of Cagliari ‡ University of Cagliari † University 1 the relative risk (RR), obtained by dividing the frequency of the outcome among those exposed to the product by the corresponding frequency among those not so exposed. And it is frequently asserted that a relative risk exceeding 2 is enough to prove that the “probability of causation” (PC) exceeds 0.5, and thus to establish a causal link “on the balance of probabilities”. In this paper we consider such arguments in greater detail. We explain why it is difficult to establish a precise value for the probability of causation on the basis of epidemiological or other scientific evidence, which at best can only provide interval bounds for PC. We also show how it is possible to reduce the uncertainty about PC by collecting and taking account of additional data, so shedding some light on the internal workings of the causal black box. The work presented here builds on a long-standing interaction and collaboration with Stephen Fienberg, as represented in particular by the recent papers Dawid et al. (2014); Dawid et al. (2015); Dawid et al. (2016b). This formed a very small component part of Steve’s many highly significant contributions to the correct use of Statistics in the Law, which work, substantial as it was, itself constituted only a very small component of his numerous original and highly influential contributions over an enormous range of statistical topics. He was a delightful friend and a stimulating colleague and companion; he is sorely missed. 2 Group to individual analysis: The basic problem Epidemiology attempts to discover causal relationships, such as between a certain exposure, E and a certain response, R. Such a relationship can be intuitively represented by a diagram such as that of Figure 1. (There is a formal semantics underlying such diagrams, but we shall not delve into that here). E R Figure 1: Simple cause-effect relationship Epidemiological experts are frequently called on to testify in cases revolving around the assignment of individual responsibility. However, such testimony can only concern the behaviour of groups of individuals, and its relevance to any individual case is at best indirect. The general issue of “group-to-individual” (“G2i”) inference has recently become a centre of attention both within and outside the Law (Faigman et al. 2014). In our context, the important distinction to be made is between inference about “Effects of Causes” (“EoC”), and inference about “Causes of Effects” (“CoE”). The former, concerning the likely outcome of a contemplated intervention or exposure, in a specific or generic individual, is the focus of most scientific investigation and experimentation, including epidemiological studies. However, it is the latter, concerning the possible causes of an observed effect in an individual case, that is of most relevance for the Law. The distinction between EoC and CoE is crucial, but all too often goes unremarked and unappreciated. We illustrate the subtle relationship between these two forms of inference by means of an example (Dawid 2011; Dawid et al. 2014). Effects of Causes (EoC) Ann has a headache. She is wondering whether to take aspirin. Will that cause her headache to disappear? Causes of Effects (CoE) Ann had a headache and took aspirin. Her headache went away. Was that caused by the aspirin? To assist in addressing these questions, we assume that we have data from a very large, wellconducted, randomised trial of the success of aspirin in curing headaches, whose subjects can be assumed to be similar to Ann in the way they respond. This yields percentages as in the following table: 2 No aspirin Aspirin Recover 12 30 Not recover 88 70 Total 100 100 Table 1: Results of aspirin trial 3 A framework for analysis Effects of Causes (EoC) Ann can argue as follows “If I take the aspirin, I will be just like the subjects in the treatment group, so I can assess my probability of recovery in this case as 30%. Similarly, If I don’t take the aspirin, my probability of recovery in that case can be assessed to be 12%. Other things being equal, it would be better to take the aspirin.” While this argument does, not, perhaps address the question exactly as posed, it does give Ann fully adequate guidance to address and solve her EoC decision problem. What is at issue was the as yet unknown event of recovery, and the data are directly relevant for assessing uncertainty about that unknown outcome (for each of the two decisions that Ann might take). Causes of Effects (CoE) Things are very different for the CoE question. Indeed, there is now no unknown event: We know that Ann definitely took the aspirin, and she definitely recovered. What is at issue here is not uncertainty about an as yet unknown event, but uncertainty about a relationship between known events: the existence, or otherwise, of a causal relationship between taking the aspirin and recovering. 3.1 Counterfactuals and potential outcomes One way of thinking about whether a certain outcome was caused by a certain exposure is to ask the question: “Would the same outcome still have occurred, even if the exposure had been absent?”. Because this question is posited on a hypothesis that is known to be false, and thus counter to known facts, it is termed a counterfactual query. There is much discussion of counterfactuals in the philosophical literature (see e.g. Menzies (2014)), and they raise many perplexing problems. In particular, is it even meaningful to regard a counterfactual as having a definite (even if unknown) truth value? Supposing that we can talk of the truth value of counterfactual, we might reinterpret the assertion “The exposure caused the outcome” as: “Both the exposure and the outcome occurred; and had (counterfactually) the exposure not occurred, neither would the outcome have occurred.” With this interpretation, and taking account of the known facts, the truth value of the assertion “The exposure caused the outcome” becomes identified with the (typically unknown) truth value of the counterfactual proposition “In the counterfactual world where the exposure did not occur, the outcome did not occur”. Some comments (i). There is an implicit “ceteris paribus” condition in the above interpretation. In the counterfactual world being considered, we are changing the truth value of the exposure, but nothing else—or, at any rate, nothing else occurring before, or simultaneously with, the exposure. We must of course allow for the outcome to change, and we might possibly also allow changes to other, later, events (perhaps intermediate between the exposure and the outcome), in the light of the change to the exposure. Since there are various ways in which our counterfactual comparison world can be constructed, there is a resultant ambiguity in the truth value of the counterfactual assertion. Lewis (1973) argues that we should use the “closest possible 3 world” to the real world, subject to the counterfactual change in the exposure—but this still leaves a great element of vagueness. (ii). There may be some choice as to what the counterfactual value of the exposure would have been, if it had been other than it actually was. If Ann had not taken two aspirins, she might have taken none at all, or taken three aspirins, or taken two paracetamol tablets, or gone to bed with a wet towel around her head. The counterfactual query only becomes precise when we have fully specified the “counterfactual foil” for comparison with the factual exposure. (iii). There will typically be a variety of different exposures that we can consider. For example, Ted has been a smoker for 20 years, has lived by a busy main road which is subject to high air pollution, and has developed lung cancer. Then we could ask “Was Ted’s cancer caused by his smoking?”, “Was it caused by his air pollution exposure?”, “Was it caused by his smoking and the air pollution jointly?”, etc., etc. Each of these questions involves consideration of a different counterfactual world for comparison with the real world, and there is no reason why we could not regard all of them as true simultaneously—which leads to some difficulties in understanding what might be the “actual cause” of Ted’s cancer (see Halpern (2016) for a thoughtful analysis of the elusive concept of “actual cause”). In particular, we should not express “Ted’s smoking caused his cancer” as “The cause of Ted’s cancer was his smoking”—though we might say “A cause of Ted’s cancer was his smoking”. The former phrasing suggests, misleadingly, that there is a variable, “The cause of Ted’s cancer”, that can take different values (e.g., smoking, air pollution, natural causes). But as these putatuve causes are not mutually exclusive, there can be no such variable. And when we can assign probabilities to “Ted’s smoking caused his cancer”, “Air pollution caused Ted’s cancer”, etc., it is perfectly acceptable for these to sum to more than 1. (For a specific example of this, see Hutchinson et al. (1991)). The standard framework of probability theory does not easily admit argument about counterfactual worlds and uncertain relationships. To formulate such questions meaningfully, we need to expand the universe of discourse. The way this has traditionally been done in statistics is by the introduction of so-called “potential outcomes” (Neyman 1935; Rubin 1978). We consider a binary exposure, or cause, variable E, and a binary response, outcome, or effect, variable R. For each value e = 0 or 1 of E, we introduce a variable Re , conceived as the value that R would assume, were it the case that E = e. If in the actual world E = 1 (say), then the observed outcome will be R = R1 ; in this case we have no way of observing R0 , which thus becomes a (necessarily unobservable) counterfactual variable. Similarly, if in the actual world E = 0, then R = R0 , and R1 becomes counterfactual and unobservable. It is typically assumed, explicitly or implicitly, that the bivariate variable R := (R0 , R1 ) is determined before the value of E is, and does not depend on how that value of E came to be determined or known (for example, whether by external intervention, or by observation alone). The effect of setting or observing E = 1 (say) is just to uncover the pre-existing value of R1 , and identify R with R1 . In particular, although the pair (R0 , R1 ) is modelled probabilistically just like any other bivariate random variable, there is the epistemic problem that there are no circumstances in which it would be possible to observe both its constituent values. This has been termed “the fundamental problem of statistical causality” (Holland 1986). The framing and analysis of causal questions in terms of potential outcomes has become the industry standard in statistical causality. For the investigation of “effects of causes”, it has been strongly argued that this approach is both unnecessary and potentially misleading (Dawid 2000; Dawid 2015). However, for studying causes of effects there is currently no alternative to the use of potential outcomes to model counterfactual possibilities. Nevertheless, the logical difficulty that the bivariate quantity R can never be fully observed creates subtle problems that must not be ignored. 4 3.2 The probability of causation Armed with the above machinery and notation, we can now formulate an expression for the probability of causation. We interpret the expression “the exposure E = 1 causes the outcome R = 1” as the event “EC: R1 = 1, R0 = 0”. This encodes the property that the potential response to E = 1 is 1, while at the same time the potential response to E = 0 is 0. However, although we have thus expressed the causality relation as an event, in what appears to be a standard probabilistic framework, the fundamental problem of statistical causality implies that this is an event whose truth value can never be determined. Suppose now that (for Ann) we have observed E = 1 and R = 1 (or, equivalently, E = 1 and R1 = 1). Since we must condition on all known facts, the appropriate expression for the probability of causation (in Ann’s case) is PC = Pr(EC | E = 1, R = 1) = Pr(R0 = 0 | E = 1, R1 = 1). (1) However, merely establishing a notational expression for the probability of causation does not, of itself, solve the problem of how to evaluate this quantity, involving as it does the probability of an unobservable event. The approach we shall take is to regard the pair (R0 , R1 ) as having a joint distribution (jointly with all other variables in the problem), but to make no assumptions about that distribution, other than any constraints imposed by empirically observable information. Typically it will not then be possible to identify that joint distribution fully, but only to constrain it within limits—though those limits will depend on the precise form of the available information. There is a further point that needs to be taken into account. The variables in (1) are those pertaining specifically to Ann, and the joint distribution Pr appearing in it is thus a distribution over those specific variables. But who is the analyst assigning this distribution? It might be Ann herself, or some onlooker. These individuals will typically have different background information, and so different distributions. In particular, an onlooker might reasonably infer, merely from observing that Ann decided to take the aspirin (E = 1), that her headache is particularly bad, and consequently that her potential responses R0 and R1 are both likely to be poorer than if he did not have this information. For Ann, however, the severity of her headache is known background information that is already taken into account in her own distribution, and the mere fact that she is contemplating taking the aspirin gives her no additional information about her potential responses. That is to say, for Ann’s own probability distribution we can reasonably invoke the “no confounding” assumption, E ⊥⊥ R, (2) which expresses probabilistic independence between the fact of her exposure, E. and the pair R of her potential responses. In this case expression (1) simplifies to PC = Pr(R0 = 0 | R1 = 1). (3) However, for the onlooker who is not initially aware of the severity of Ann’s headache, it may be inappropriate to accept (2), and hence (3). In most of the sequel (with the exception of § 5) we shall assume that the analyst has sufficient background information about Ann for (2) to be true (to a good enough approximation), and hence use (3) as the expression for the probability of causation. Furthermore, because we shall wish to use external data from other individuals to assist in estimating the analyst’s probability distribution Pr for Ann, we shall also need to assume that the background information the analyst has on those individuals is essentially the same as what he1 has for Ann — a condition that can sometimes be met by restricting the set of external individuals considered. Even so, these assumptions, necessary for much of our analysis, are highly restrictive, and will often be inappropriate. Careful consideration must be given to their suitability before applying our results. 1 We refer to the analyst in the masculine, to distinguish him from the subject, Ann—while not precluding that they could be the same individual. 5 4 Basic analysis We start by considering the case that the only available empirical information is that presented in Table 1. Assuming the analyst can regard the individuals in the trial as similar to Ann, he might argue: “When Ann takes aspirin, she puts herself in the same position as those external individuals in the treatment group, of which Pr(R = 1 | E = 1) = 30% recovered. Because of the no confounding assumptions (both in the data and for Ann), this means that her potential response to taking aspirin, R1 , has a 30% probability of taking the value 1 (Recover). I can thus identify my marginal probability (for Ann), Pr(R1 = 1) = 0.3. Similarly, I can evaluate my marginal probability Pr(R0 = 1) = 0.12. However, because of the fundamental problem of statistical causality, there is no further empirical information available relating to my joint distribution of (R0 , R1 ).” Armed with this limited information, the analyst can attempt to fill in the entries in Table 2, specifying his bivariate probability distribution for (R0 , R1 ). The margins are fully determined by the above empirically informed probabilities, but since he has no empirical information directly relevant to the joint probability Pr(R0 = 0, R1 = 1), he simply enters an unknown (and unknowable) value x in the associated internal cell of the table. In combination with the known marginal probabilities, this allows completion of the body of the table, as shown. Table 2: Joint distribution of potential responses R0 and R1 . R0 0 1 R1 0 0.88 − x x − 0.18 0.70 1 x 0.30 − x 0.30 0.88 0.12 1 Now although the precise value of x remains unknown, from the table we can extract partial information about it, using the fact that any probability must be nonnegative. Applying this principle to the four entries in the body of the table, we obtain: x ≤ 0.88, x ≥ 0.18, x ≥ 0, x ≤ 0.30. Combining these and omitting redundancies gives the inequality: 0.18 ≤ x ≤ 0.30. This interval bound is the full information available about x on the basis of the empirical data. Now because of assumption (2), PC = Pr(R0 = 0 | R1 = 1) = x/0.30. Thus the analyst can assert: 0.6 ≤ PC ≤ 1. (4) Even under the restrictive assumptions that have been made, this wide interval bound is all that can be deduced, from the empirical data, about the probability of causation in this particular case. The above logic can be applied in the general case, leading to the following interval bound in terms of empirically estimable quantities (under our no-confounding assumptions):     1 Pr(R = 0 | E = 0) max 0, 1 − ≤ PC ≤ min 1, , (5) RR Pr(R = 1 | E = 1) where RR := Pr(R = 1 | E = 1) Pr(R = 1 | E = 0) (6) is the (causal) risk ratio. We note that RR > 2 implies PC > 0.5, which might be taken to prove causation “on the balance of prbabilities”. However, if RR < 2 we can not deduce from (5) that PC < 0.5 (to reject causation, on the balance of probabilities). 6 5 Allowing for unobserved confounding When we cannot assume (2) we cannot simply apply the above theory directly, since the very fact that Ann decided to take the aspirin gives the analyst some indirect information about Ann’s state of health—in the light of which it would no longer be appropriate to consider her as similar to the individuals in the experimental study, for which this information was not available. Tian and Pearl (2000) showed that in this situation we can still obtain bounds for PC, so long as, in addition to the experimental data, we also have observational data on individuals whose behaviour (in the opinion of the analyst) can be considered similar to that of Ann, in that they have the same dependence as she does between their decision E to take the aspirin and their pair R of potential responses. Tian and Pearl (2000) then derive the following interval bounds:     1 − Pr(R0 = 1) − Pr(E = 0, R = 0) Pr(R = 1) − Pr(R0 = 1) ≤ PC ≤ min 1, , (7) max 0, Pr(E = 1, R = 1) Pr(E = 1, R = 1) where Pr(R0 = 1) denotes the recovery probability in the experimental control group, who were externally assigned to have E set to 0; while the other probabilities are obtained from the observational data (interestingly, we do not require experimental data on those who were assigned treatment). For example, suppose that, in addition to the experimental data of Table 1, we have observational data in which Pr(E = 0, R = 1) = 0.12. We then find that the lower bound in (7) is 1—allowing us to establish causation with certainty. 6 Peeking into the box So far we have considered the relationship between exposure and response as a causal “black box”, without attempting to understand or model its hidden mechanisms in any further detail. If we are willing to make some assumptions about these mechanisms, or access external information about them, we can make better causal inferences from our data—even in the absence of any further information about Ann. 6.1 Monotonicity and beyond One assumption commonly made is monotonicity. In a context such as ours, this would say that, if recovery would have occurred without the treatment, it would certainly occur with the treatment. That is to say, R0 = 1 ⇒ R1 = 1. This implies in particular Pr(R0 = 1) ≤ Pr(R1 = 1), or equivalently RR ≥ 1. This is a constraint on the margins of a table such as Table 1, and so could be falsified; but even when this marginal constraint is satisfied, there is typically no further information to help us decide whether monotonicity holds or not. Nevertheless it is frequently taken as a reasonable requirement, and would add one further constraint on the entries in Table 1: Pr(R0 = 1, R1 = 0) = 0. Since in that table Pr(R0 = 1, R1 = 0) = x − 0.18, we can then compute the exact value x = 0.18, so that PC = 0.18/0.30 = 0.6. Here (as in general), monotonicity allows as to replace the interval given by (5) by its lower endpoint 1 − 1/RR. In this case, RR < 2 does imply PC < 0.5. Monitonicity, while appealing, is a strong, perhaps overstrong, assumption about the internal workings of the causal black box. Moreover, because it is a property of the pair of values (R0 , R1 ) considered jointly, the fundamental problem of statistical causality implies that we can never expect to obtain empirical evidence to let us decide whether or not monitonicity does in fact hold. For that reason we take a different approach in the rest of this paper, focusing on using additional, empirically observable, information to shed some light on internal causal mechanisms, and thus improve causal inferences. In such cases, although we typically cannot obtain an exact point value for the probability of causation, we may be able to narrow the interval bounds on it. We shall particularly consider cases in which we might have information on additional covariates and/or mediators that influence the causal pathway. 7 7 Covariate information Suppose that, in the experimental data, we can also observe an additional covariate, X — an individual characteristic that can vary from person to person, and can affect that person’s response. This situation is represented by the diagram of Figure 2. For simplicity, we suppose that X can E R X Figure 2: Covariate only take a discrete set of values. We can then estimate, from the data, the response probability, Pr(R = 1 | E = e, X = x), among those individuals having covariate value X = x and exposure level e (= 0 or 1). In those cases that we are also able to measure X for Ann, say X = x∗ , we can simply restrict the experimental subjects to those having the same covariate value (who are thus like Ann in all relevant respects), and apply the analysis of § 4. We can then use formula (5), after first replacing all the probabilities in (5) and (6) by their conditional versions, given X = x∗ . However, it turns out that we can make use of the additional covariate information in the experimental data, even when we cannot observe X for Ann. For this case, it is shown in Dawid (2011) that we have the interval bounds ∆ Γ ≤ PC ≤ 1 − Pr(R = 1 | E = 1) Pr(R = 1 | E = 1) (8) where ∆ = X Pr(X = x) × max {0, Pr(R = 1 | E = 1, X = x) − Pr(R = 1 | E = 0, X = x)} x Γ = X Pr(X = x) × max {0, Pr(R = 1 | E = 1, X = x) − Pr(R = 0 | E = 0, X = x)} , x and that this interval is always contained in that given by (5), which ignores the additional covariate information. Example 7.1 Suppose that the covariate X is binary, taking values 0 and 1 with equal probability. Suppose further that, from the experimental data, we obtain the following probabilities: Pr(R = 1 | E = 1, X = 0) = 0.12 Pr(R = 1 | E = 0, X = 0) = 0.24 Pr(R = 1 | E = 1, X = 1) = 0.60 Pr(R = 1 | E = 0, X = 1) = 0.12. These imply marginal recovery probabilities (not taking the value of X into account): Pr(R = 1 | E = 1) = 0.36 Pr(R = 1 | E = 0) = 0.18. (i). If we had not observed X, either in the data or in Ann, we would use the marginal values, to obtain a relative risk of 2, and interval bounds 0.5 ≤ PC ≤ 1. 8 (ii). If we observe X both in the data and in Ann, we obtain 0.8 ≤ PC ≤ 1 if Ann has X = 1, and 0 ≤ PC ≤ 1 if Ann has X = 0. (iii). Finally, if we have observed X in the data but not in Ann, the relevant interval becomes 0.67 ≤ PC ≤ 1, an improvement on that of (i) 2 8 Sufficient covariate In § 7 above it was assumed that the assignment of exposure E was unrelated to the covariate X. Here we relax this, and allow X to influence both the exposure E and the response R. But we assume that there are no further, unobserved, variables that might act to confound this relationship—X is a “sufficient covariate” (Guo and Dawid 2010; Dawid 2015) for assessing the causal effect of E on R. The relevant diagram is now that of Figure 3. We assume that the E R X Figure 3: Sufficient covariate identical same structure holds for the individuals in the data and for Ann. X is observed in the data, but possibly not for Ann. When X is observed for Ann, say X = x∗ , we can again apply the basic inequalities (5), after replacing the probabilities in (5) and (6) by their conditional versions, given X = x∗ . When X is not observed for Ann, the interval bounds for PC become: X 1 × max{0, {Pr(R = 1 | E = 1, X = x) − Pr(R = 1 | E = 0, X = x)} Pr(R = 1 | E = 1) x × Pr(X = x | E = 1) ≤ PC ≤ 1− X 1 × max{0, {Pr(R = 1 | E = 1, X = x) − Pr(R = 0 | E = 0, X = x)} Pr(R = 1 | E = 1) x × Pr(X = x | E = 1). Now in this case we can alternatively use the “back-door formula” (Pearl 2009): X Pr(R0 = 1) = Pr(R = 1 | E = 0, X = x) × Pr(X = x) x 9 (9) (10) to recreate the experimental response rate among the controls—and so compute the interval (7). However, this would be tantamount to ignoring the additional information on X in the data. It can be shown that the interval given by (9) is always contained in that given by (7). Example 8.1 Suppose X is binary, and from the data we obtain the following probabilities: Pr(X = 1) = 0.5 Pr(E = 1 | X = 0) = 0.8 Pr(E = 1 | X = 1) = 0.2 Pr(R = 1 | E = 1, X = 1) = 0.2 Pr(R = 1 | E = 0, X = 1) = 0.8 Pr(R = 1 | E = 1, X = 0) = 0.8 Pr(R = 1 | E = 0, X = 0) = 0.2. Then we obtain the following lower bounds for the probability of causation (the upper bound being 1 in all cases): When Ann is observed to have X = 1: When Ann is observed to have X = 0: When Ann’s value for X is not observed: PC ≥ 0 PC ≥ 0.75 PC ≥ 0.71 Ignoring X and using the Tian and Pearl (2000) bounds : PC ≥ 0.53. 2 9 Complete mediator We now turn to consider the case, represented by the diagram in Figure 4, that the causal effect of E on R is completely mediated by some variable M , assumed for simplicity to be binary. That is to say, E affects M and M effects R, and the combination of these two pathways constitutes the totality of the effect of E on R. We assume that there is no further confounding of either of these E M R Figure 4: Complete mediator relationships, either in the data or for Ann. We shall consider the case that all three variables (E, M, R) are observed in the data, but that we only observe E and R for Ann. Note that our assumptions imply the conditional independence property R ⊥⊥ E | M , so that X Pr(R = r | E = e) = Pr(R = r | M = m)Pr(M = m | E = e), (11) m which should hold, at least approximately, in the data. In any event, we should estimate Pr(R = r | E = e) using formula (11), rather than directly. (We could also have separate experimental data on the E → M and M → R relationships, and apply (11).) It is shown in Dawid et al. (2016a) that (with this understanding) the additional information on the mediator does not affect the lower bound in (5). However, we obtain the following improved 10 upper bound: 1 Pr(R = 1 | E = 1) × min{ Pr(M = 0 | E = 0) Pr(R = 0 | M = 0) + Pr(R = 0 | M = 1) Pr(M = 0 | E = 1), Pr(M = 1 | E = 1) Pr(R = 0 | M = 0) + Pr(R = 0 | M = 1) Pr(M = 1 | E = 0), Pr(M = 0 | E = 0) Pr(R = 1 | M = 1) + Pr(R = 1 | M = 0) Pr(M = 0 | E = 1), Pr(M = 1 | E = 1) Pr(R = 1 | M = 1) + Pr(R = 1 | M = 0) Pr(M = 1 | E = 0) }. (12) Example 9.1 Suppose we obtain the following values from the data: Pr(M = 1 | E = 1) = 0.25 Pr(M = 1 | E = 0) = 0.025 Pr(R = 1 | M = 1) = 0.9 Pr(R = 1 | M = 0) = 0.1. Marginalising over M using (11), we obtain the same values as in Table 1. On applying (12), we get 0.60 ≤ PC ≤ 0.76; whereas without taking account of the mediator M the bounds were 0.6 ≤ PC ≤ 1. 2 We can elaborate the above analysis by allowing for an additional sufficient covariate X, as represented by Figure 5, that can modify all the above marginal and conditional probabilities, and conditional on which M is a complete mediator. E M R X Figure 5: Complete mediator with covariate We assume that X is always observed in the data. If we observe X = x for Ann, we simply replace all probabilities by their versions further conditioned on X = x, yielding bounds l(x) ≤ PC ≤ u(x), say. If we do not observe X in Ann, the lower bound is E{l(X) | E = 1, R = 1)}, and the upper bound is E{u(X) | E = 1, R = 1)}. 10 Partial mediator In the case of a partial mediator, as represented by Figure 6, there us an additional “direct effect” of E on R, that is not mediated by M (again supposed binary, for simplicity). So now we have to consider the effect of E on M , and the joint effect of E and M on R. Again we suppose that there is no further confounding of these relationships, either in the data or for Ann, and consider the case that all three variables (E, M, R) are observed in the data, but that we only observe E and R for Ann. In Murtas et al. (2016) it is shown that, once again, the lower bound for PC is unaffected by 11 E M R Figure 6: Partial mediator the additional information on M . However, we are able to abtain a new upper bound u, where Pr(R = 1 | E = 1) × u = min {Pr(R = 0 | E = 0, M = 0), Pr(R = 1 | E = 1, M = 0)} × min {Pr(M = 0 | E = 0), Pr(M = 0 | E = 1)} + min {Pr(R = 0 | E = 0, M = 0), Pr(R = 1 | E = 1, M = 1)} × min {Pr(M = 0 | E = 0), Pr(M = 1 | E = 1)} + min {Pr(R = 0 | E = 0, M = 1), Pr(R = 1 | E = 1, M = 0)} × min {Pr(M = 1 | E = 0), Pr(M = 0 | E = 1)} + min {Pr(R = 0 | E = 0, M = 1), Pr(R = 1 | E = 1, M = 1)} × min {Pr(M = 1 | E = 0), Pr(M = 1 | E = 1)} . (13) Example 10.1 Suppose that, from the data, we estimate the following probabilities: Pr(M = 1 | E = 0) = 0.27 Pr(M = 1 | E = 1) = 0.019 Pr(R = 1 | E = 0, M = 0) = 0.02 Pr(R = 1 | E = 0, M = 1) = 0.835 Pr(R = 1 | E = 1, M = 0) = 0.685 Pr(R = 1 | E = 1, M = 1) = 0.857. Marginalising over M , these imply Pr(R = 1 | E = 0) = 0.24 Pr(R = 1 | E = 1) = 0.69. We then obtain 0.65 ≤ PC ≤ 0.81 when accounting for the mediator, compared with 0.65 ≤ PC ≤ 1 when ignoring it. 2 However, accounting for a partial mediator may not always yield improved bounds. Example 10.2 Suppose the probabilities estimated from the data are as follows: Pr(M = 1 | E = 0) = 0.96 Pr(M = 1 | E = 1) = 0.74 Pr(R = 1 | E = 0, M = 0) = 0.02 Pr(R = 1 | E = 0, M = 1) = 0.33 Pr(R = 1 | E = 1, M = 0) = 0.91 Pr(R = 1 | E = 1, M = 1) = 0.73. These imply Pr(R = 1 | E = 0) = 0.32 Pr(R = 1 | E = 1) = 0.78. The lower bound is PC ≥ 0.59. The upper bound obtained from (13) is PC ≤ 0.95. However, just ignoring M , and applying (5), we get upper bound PC ≤ 0.88, which should theregore be used in preference. 2 12 Again, we can elaborate the problem by including a sufficient covariate X, conditional on which we have the above structure, as represented by Figure 7. Let the appropriate lower and upper bounds, computed with all probabilities conditioned on X = x, be l(x) and u(x). Then in the absence of information about X for Ann, the relevant lower and upper bounds for PC are E{l(X) | E = 1, R = 1}, E{u(X) | E = 1, R = 1}. E M R X Figure 7: Partial mediator with covariate 11 Discussion We have assumed throughout that the available data are sufficiently extensive to allow essentially perfect estimates of the required probabilities. Of course this will never be the case. Dawid et al. (2016b) consider how to make suitable inferences about PC from limited data, using a Bayesian approach. We have presented some simple cases, involving covariates and mediators, where having additional information about the internal structure of the causal link between exposure and response enables us to refine our causal inferences. Other problems might involve a more complex collection of variables and pathways, perhaps expressed as a directed acyclic graph. It should be possible to extend our analysis to such more general cases. Information on different causal subsystems might be obtained from a variety of scientific investigations. But caution must be exercised in justifying the transfer of such information from generic scientific data to the individual case. Additional uncertainty over the correct representation of the problem must also be taken into account. To return, finally, to the issue facing a court of law that has to return a decision on causality: we hope we have shown that this is not a simple matter! We can only express our sympathy with a judge who has to make such a decision, on the “balance of probabilities,” when the best possible conclusion, based on available scientific evidence and the kind of analysis we have presented here, is that the probability of causation lies between 0.4 and 0.8. References Dawid, A. P. (2000). Causal inference without counterfactuals (with Discussion). Journal of the American Statistical Association, 95, 407–48. Dawid, A. P. (2011). The role of scientific and statistical evidence in assessing causality. In Perspectives on Causation, (ed. R. Goldberg), pp. 133–147. Hart Publishing, Oxford. Dawid, A. P. (2015). Statistical causality from a decision-theoretic perspective. Annual Review of Statistics and its Application, 2, 273–303. DOI:10.1146/annurev-statistics-010814-020105. Dawid, A. P., Faigman, D. L., and Fienberg, S. E. (2014). Fitting science into legal contexts: Assessing effects of causes or causes of effects? (with Discussion and authors’ rejoinder). Sociological Methods and Research, 43, 359–421. DOI:10.1177/0049124113515188. Dawid, A. P., Faigman, D. L., and Fienberg, S. E. (2015). On the causes of effects: Response to Pearl. Sociological Methods and Research, 44, 165–74. DOI:10.1177/0049124114562613. 13 Dawid, A. P., Murtas, R., and Musio, M. (2016a). Bounding the probability of causation in mediation analysis. In Topics on Methodological and Applied Statistical Inference, (ed. T. D. Battista, E. Moreno, and W. Racugno), pp. 75–84. Springer. Dawid, A. P., Musio, M., and Fienberg, S. E. (2016b). From statistical evidence to evidence of causality. Bayesian Analysis, 11, 725–52. Faigman, D. L., Monahan, J., and Slobogin, C. (2014). Group to individual (G2i) inference in scientific expert testimony. University of Chicago Law Review, 81, 417–80. Guo, H. and Dawid, A. P. (2010). Sufficient covariates and linear propensity analysis. Journal of Machine Learning Research Workshop and Conference Proceedings, 9, 281–8. Proceedings of the Thirteenth International Workshop on Artificial Intelligence and Statistics (AISTATS) 2010, Chia Laguna, Sardinia, Italy, May 13–15, 2010, edited by Y. W. Teh and D. M. Titterington. http://jmlr.csail.mit.edu/proceedings/papers/v9/guo10a/guo10a.pdf. Halpern, J. Y. (2016). Actual Causality. MIT Press. Holland, P. W. (1986). Statistics and causal inference (with Discussion). Journal of the American Statistical Association, 81, 945–970. Hutchinson, T. A., Dawid, A. P., Spiegelhalter, D. J., Cowell, R. G., and Roden, S. (1991). Computerized aids for the probabilistic assessment of drug safety II: An expert system. Drug Information Journal, 25, 41–8. Lewis, D. K. (1973). Counterfactuals. Blackwell, Oxford. Menzies, P. (2014). Counterfactual theories of causation. The Stanford Encyclopedia of Philosophy (Spring 2014 Edition), Edward N. Zalta (ed.). https://plato.stanford.edu/archives/ spr2014/entries/causation-counterfactual/. Murtas, R., Dawid, A. P., and Musio, M. (2016). New bounds for the probability of causation in mediation analysis. arXiv:1706.04857. Neyman, J. (1935). Statistical problems in agricultural experimentation (with Discussion). Journal of the Royal Statistical Society, Supplement, 2, 107–80. Pearl, J. (2009). Causality: Models, Reasoning and Inference, (second edn). Cambridge University Press, Cambridge. Rubin, D. B. (1978). Bayesian inference for causal effects: The rôle of randomization. Annals of Statistics, 6, 34–68. Tian, J. and Pearl, J. (2000). Probabilities of causation: Bounds and identification. Annals of Mathematics and Artificial Intelligence, 28, 287–313. 14
10math.ST
arXiv:1609.06418v1 [math.ST] 21 Sep 2016 Multiple Testing via Relative Belief Ratios Michael Evans and Jabed Tomal Department of Statistical Sciences University of Toronto Abstract: Some large scale inference problems are considered based on using the relative belief ratio as a measure of statistical evidence. This approach is applied to the multiple testing problem. A particular application of this is concerned with assessing sparsity. The approach taken to sparsity has several advantages as it is based on a measure of evidence and does not require that the prior be restricted in any way. Key words and phrases: multiple testing, sparsity, statistical evidence, relative belief ratios, priors, checking for prior-data conflict, testing for sparsity, relative belief multiple testing algorithm. 1 Introduction Suppose there is a statistical model {fθ : θ ∈ Θ} and the parameter of interest is given by Ψ : Θ → Ψ (we don’t distinguish between the function and its range to save notation) where Ψ is an open subset of Rk . Our concern here is with assessing individual hypotheses H0i = {θ : Ψi (θ) = ψ0i }, namely, H0i is the hypothesis that the i-th coordinate of ψ equals ψ0i . If it is known that ψi = Ψi (θ) = ψ0i , then the effective dimension of the parameter of interest is k − 1 which results in a simplification of the model. For example, the ψi may be linear regression coefficients and ψ0i = 0 is equivalent to saying that an individual term in the regression is dropped and so simplifies the relationship. Considering all these hypotheses separately is the multiple testing problem and the concern is to ensure that, while controlling the individual error rate, the overall error rate does not become too large especially when k is large. An error means either the acceptance of H0i when it is false (a false negative) or the rejection of H0i when it is true (a false positive). This problem is considered here from a Bayesian perspective. A first approach is to make an inference about the number of H0i that are true (or false) and then use this to control the number of H0i that are accepted (or rejected). Problems arise when k is large, however, due to an issue that arises with typical choices made for the prior. This paper considers these problems and proposes solutions. The problem of making inferences about sparsity is clearly related. For suppose that there is a belief that many of the hypotheses H0i are indeed true 1 but there is little prior knowledge about which of the H0i are true. This is effectively the sparsity problem. In this case it is not clear how to choose a prior that reflects this belief. A common approach in the regression problem is to use a prior that, together with a particular estimation procedure, forces many of the ψi to take the value ψ0i . A difficulty with such an approach is that it is possible that such an assignment is an artifact of the prior and the estimation procedure and not primarily data-based. For example, the use of a Laplace prior together with MAP estimation is known to accomplish this in certain problems. It would be preferable, however, to have a procedure that was not dependent on a specific form for the prior but rather worked with any prior and was based on the statistical evidence for such an assignment contained in the data. The methodology for multiple testing developed here accomplishes this goal. The prior π on θ clearly plays a key role in our developments. Suppose that π is decomposed as π(θ) = π(θ | ψ)πΨ (ψ) where π(θ | ψ) is the conditional prior on θ given Ψ(θ) = ψ and πΨ is the marginal prior on ψ. If πΨ is taken to be too concentrated about ψ0 , then there is the risk of encountering priordata conflict whenever some of the H0i are false. Prior-data conflict arises whenever the true value of the parameter lies in a region of low prior probability, such as the tails of the prior, and can lead to erroneous inferences. Consistent methods for addressing prior-data conflict are developed in Evans and Moshonov (2006), Evans and Jang (2011a) and a methodology for modifying the prior, when a conflict is detected, is presented in Evans and Jang (2011b). Generally, a check for prior-data conflict is made to ensure that the prior has been chosen reasonably, just as model checking is performed to ensure that the model is reasonable, given the observed data. The avoidance of prior-data conflict plays a key role in our developments. The assessment of the evidence for the truth of H0i is based on a measure of the evidence that H0i is true as given by the relative belief ratio for ψi . Relative belief ratios are similar to Bayes factors and, when compared to p-values, can be considered as more appropriate measures of statistical evidence. For example, evidence can be obtained either for or against a hypothesis. Moreover, there is a clear assessment of the strength of this evidence so that when weak evidence is obtained, either for or against a hypothesis, this does not entail acceptance or rejection, respectively. Relative belief ratios and the theory of inference based on these quantities, is discussed in Evans (2015) and a general outline is given in Section 2. Section 3 considers applying relative belief to the multiple testing problem. In Section 4 some practical applications are presented with special emphasis on regression problems including the situation where the number of predictors exceeds the number of observations. There have been a number of priors proposed for the sparsity problem in the literature. A common choice is the spike-and-slab prior due to George and McCulloch (1993). Other priors are available that are known to produce sparsity at least in connection with MAP estimation. For example, the Laplace prior has a close connection with sparsity via the LASSO, as discussed in Tibshirani (1996), Park and Casella (2008) and Hastie, Tibshirani and Wainwright (2015). The horseshoe prior of Carvalho, Polson and Scott (2009) will also produce 2 sparsity through estimation. Both the Laplace and the horseshoe prior can be checked for prior-data conflict but the check is not explicitly for sparsity, only that the location and scaling of the prior is appropriate. This reinforces a comment in Carvalho, Polson and Scott (2009) that the use of the spike-andslab prior represents a kind of ”gold standard” for sparsity. The problem with the spike-and-slab prior, and not possessed to the same degree by the Laplace or horseshoe prior, is the difficulty of the computations when implementing the posterior analysis. Basically there are 2k mixture components to the posterior and this becomes computationally intractable as k rises. Various approaches can be taken to try and deal with this issue such as those developed in Rockova and George (2014). Any of these priors can be used with the approach taken here but our methodology does not require that a prior induces sparsity in any sense. Indeed sparsity is induced only when the evidence, as measured by how the data changes beliefs, points to this. This is a strong point of the approach as sparsity arises only through an assessment of the evidence. 2 Inferences Based on Relative Belief Ratios Suppose now that, in addition to the statistical model {fθ : θ ∈ Θ} there is a prior π on Θ. After observing data x, the posterior distribution of θ is then given R by the density π(θ | x) = π(θ)fθ (x)/m(x) where m(x) = Θ π(θ)fθ (x) dθ is the prior predictive density of x. For a parameter of interest Ψ(θ) = ψ denote the prior and posterior densities of ψ by πΨ and πΨ (· | x), respectively. The relative belief ratio for a value ψ is then defined by RBΨ (ψ | x) = limδ→0 ΠΨ (Nδ (ψ )| x)/ ΠΨ (Nδ (ψ )) where Nδ (ψ ) is a sequence of neighborhoods of ψ converging (nicely) to {ψ} as δ → 0. Quite generally RBΨ (ψ | x) = πΨ (ψ | x)/πΨ (ψ), (1) the ratio of the posterior density to the prior density at ψ. So RBΨ (ψ | x) is measuring how beliefs have changed concerning ψ being the true value from a priori to a posteriori. When RBΨ (ψ | x) > 1 the data have lead to an increase in the probability that ψ is correct and so there is evidence in favor of ψ, when RBΨ (ψ | x) < 1 the data have lead to a decrease in the probability that ψ is correct and so there is evidence against ψ, and when RBΨ (ψ | x) = 1 there is no evidence either way. While there are numerous quantities that measure evidence through change in belief, the relative belief ratio is perhaps the simplest and it possesses many nice properties as discussed in Evans (2015). For example, RBΨ (ψ | x) is invariant under smooth changes of variable and also invariant to the choice of the support measure for the densities. As such all relative belief inferences possess this invariance which is not the case for many Bayesian inferences such as using a posterior mode (MAP) or expectation for estimation. The value RBΨ (ψ0 | x) measures the evidence for the hypothesis H0 = {θ : Ψ(θ) = ψ0 }. It is also necessary to calibrate whether this is strong or weak evidence for or against H0 . Certainly the bigger RBΨ (ψ0 | x) is than 1, the more evidence there is in favor of ψ0 while the smaller RBΨ (ψ0 | x) is than 1, the more 3 evidence there is against ψ0 . But what exactly does a value of RBΨ (ψ0 | x) = 20 mean? It would appear to be strong evidence in favor of ψ0 because beliefs have increased by a factor of 20 after seeing the data. But what if other values of ψ had even larger increases? A calibration of (1) is then given by the strength ΠΨ (RBΨ (ψ | x) ≤ RBΨ (ψ0 | x) | x), (2) namely, the posterior probability that the true value of ψ has a relative belief ratio no greater than that of the hypothesized value ψ0 . While (2) may look like a p-value, it has a very different interpretation. For when RBΨ (ψ0 | x) < 1, so there is evidence against ψ0 , then a small value for (2) indicates a large posterior probability that the true value has a relative belief ratio greater than RBΨ (ψ0 | x) and so there is strong evidence against ψ0 while only weak evidence against if (2) is big. If RBΨ (ψ0 | x) > 1, so there is evidence in favor of ψ0 , then a large value for (2) indicates a small posterior probability that the true value has a relative belief ratio greater than RBΨ (ψ0 | x)) and so there is strong evidence in favor of ψ0 , while a small value of (2) only indicates weak evidence in favor of ψ0 . Notice that in {ψ : RBΨ (ψ | x) ≤ RBΨ (ψ0 | x)}, the ‘best’ estimate of ψ is given by ψ0 because the evidence for this value is the largest in the set. Various results have been established in Baskurt and Evans (2013) and Evans (2015) supporting both (1), as the measure of the evidence, and (2) as a measure of the strength of that evidence. For example, the following simple inequalities, see Baskurt and Evans (2013), are useful in assessing the strength as computing (2) can be avoided, namely, ΠΨ ({ψ0 } | x) ≤ ΠΨ (RBΨ (ψ | x) ≤ RBΨ (ψ0 | x) | x) ≤ RBΨ (ψ0 | x). So if RBΨ (ψ0 | x) > 1 and ΠΨ ({ψ0 } | x) is large, there is strong evidence in favor of ψ0 while, if RBΨ (ψ0 | x) < 1 is very small, then there is immediately strong evidence against ψ0 . The use of RBΨ (ψ0 | x) to assess the hypothesis H0 also possesses optimality properties. For example, let A be a subset of the sample space such that whenever x ∈ A, the hypothesis is accepted. If M (A | H0 ) denotes the prior predictive probability of A given that H0 is true, then M (A | H0 ) is the prior probability of accepting H0 when it is true. The relative belief acceptance region is naturally given by Arb (ψ0 ) = {x : RBΨ (ψ0 | x) > 1}. Similarly, let R be a subset such that whenever x ∈ R, the hypothesis is rejected and let M (R | H0c ) denote the prior predictive probability of R given that H0 is false. The relative belief rejection region is then naturally given by Rrb (ψ0 ) = {x : RBΨ (ψ0 | x) < 1}. The following result is proved in Evans (2015) as Proposition 4.7.9. Theorem 1 (i) The acceptance region Arb (ψ0 ) minimizes M (A) among all acceptance regions A satisfying M (A | H0 ) ≥ M (Arb (ψ0 ) | H0 ). (ii) The rejection region Rrb (ψ0 ) maximizes M (R) among all rejection regions R satisfying M (R | H0 ) ≤ M (Rrb (ψ0 ) | H0 ). To see the meaning of this result note that M (A) = EΠΨ (M (A | ψ)) = EΠΨ (IH0c (ψ)M (A | ψ)) + ΠΨ (H0 )M (A | H0 ) ≥ M (Arb (ψ0 )) = EΠΨ (IH0c (ψ)M (Arb (ψ0 ) | ψ)) + ΠΨ (H0 )M (Arb (ψ0 ) | H0 ). 4 Therefore, if ΠΨ (H0 ) = 0, then Arb (ψ0 ) minimizes EΠΨ (I{ψ0 }c (ψ)M (A | ψ)), the prior probability that H0 is accepted given that it is false, among all acceptance regions A satisfying M (A | ψ0 ) ≥ M (Arb (ψ0 ) | ψ0 ) and when ΠΨ (H0 ) > 0, then Arb (ψ0 ) minimizes this probability among all acceptance regions A satisfying M (A | H0 ) = M (Arb (ψ0 ) | H0 ). Also, M (R) = EΠΨ (M (R | ψ)) = EΠΨ (IH0c (ψ)M (R | ψ)) + ΠΨ (H0 )M (R | H0 ) ≤ M (Rrb (ψ0 )) = EΠΨ (IH0c (ψ)M (Rrb (ψ0 ) | ψ)) + ΠΨ (H0 )M (Rrb (ψ0 ) | H0 ). Therefore, if ΠΨ ({ψ0 }) = 0, then Rrb (ψ0 ) maximizes EΠΨ (I{ψ0 }c (ψ)M (R | ψ)), the prior probability that H0 is rejected given that it is false, among all rejection regions R satisfying M (R | H0 ) ≤ M (Rrb (ψ0 ) | H0 ) and when ΠΨ (H0 }) > 0, then Rrb (ψ0 ) maximizes this probability among all rejection regions R satisfying M (R | ψ0 ) = M (Rrb (ψ0 ) | ψ0 ). Note that it does not make sense to accept or reject H0 when RBΨ (ψ0 | x) = 1. Also, under i.i.d. sampling, M (Arb (ψ0 ) | H0 ) → 1 and M (Rrb (ψ0 ) | H0 ) → 0 as sample size increases, so these quantities can be controlled by design. When ΠΨ ({ψ0 }) = 0, then M (Arb (ψ0 ) | H0 ) = 1 − M (Rrb (ψ0 ) | H0 ) and so controlling M (Arb (ψ0 ) | H0 ) is controlling the ”size” of the test. In general, EΠΨ (I{ψ0 }c (ψ)M (Rrb (ψ0 ) | ψ)) can be thought of as the Bayesian power of the relative belief test. Note that it is reasonable to set either the probability of a false positive or the probability of a true negative as part of design and so the theorem is an optimality result with practical import. It is easily seen that the proof of Theorem 1 can be generalized to obtain optimality results for the acceptance region Arb,q (ψ0 ) = {x : RBΨ (ψ0 | x) > q} and for the rejection region Rrb,q (ψ0 ) = {x : RBΨ (ψ0 | x) < q}. The following inequality is useful in Section 3 in controlling error rates. Theorem 2 M ( Rrb,q (ψ0 ) | ψ0 ) ≤ q. Proof: By the Savage-Dickey result, see Proposition 4.2.7 in Evans (2015), RBΨ (ψ0 | x) = m(x | ψ0 )/m(x). Now EM (· | ψ0 ) (m(x)/m(x | ψ0 )) = 1 and so by Markov’s inequality, M ( Rrb,q (ψ0 ) | ψ0 ) = M ( m(x)/m(x | ψ0 ) > 1/q | ψ0 ) ≤ q. There is another issue associated with using RBΨ (ψ0 | x) to assess the evidence that ψ0 is the true value. One of the key concerns with Bayesian inference methods is that the choice of the prior can bias the analysis in various ways. For example, in many problems Bayes factors and relative belief ratios can be made arbitrarily large by choosing the prior to be increasingly diffuse. This phenomenon is associated with the Jeffreys-Lindley paradox and clearly indicates that it is possible to bias results by the choice of the prior. An approach to dealing with this bias is discussed in Baskurt and Evans (2013). For, given a measure of evidence, it is possible to measure a priori whether or not the chosen prior induces bias either for or against ψ0 . The bias against ψ0 is given by M ( RBΨ (ψ0 | x) ≤ 1 | ψ0 ) = 1 − M (Arb (ψ0 ) | ψ0 ) 5 (3) as this is the prior probability that evidence will not be obtained in favor of ψ0 when ψ0 is true. If (3) is large, subsequently reporting, after seeing the data, that there is evidence against ψ0 is not convincing. To measure the bias in favor of ψ0 choose values ψ00 6= ψ0 such that the difference between ψ0 and ψ00 represents the smallest difference of practical importance. Then compute MT ( RBΨ (ψ0 | x) ≥ 1 | ψ00 ) = 1 − M (Rrb (ψ0 ) | ψ00 ) (4) as this is the prior probability that we will not obtain evidence against ψ0 when ψ0 is false. Note that (4) tends to decrease as ψ00 moves further away from ψ0 . When (4) is large, subsequently reporting, after seeing the data, that there is evidence in favor of ψ0 , is not convincing. For a fixed prior, both (3) and (4) decrease with sample size and so, in design situations, they can be used to set sample size and so control bias. Notice that M (Arb (ψ0 ) | ψ0 ) can be considered as the sensitivity and M (Rrb (ψ0 ) | ψ00 ) as the specificity of the relative belief hypothesis assessment. These issues are further discussed in Evans (2015). As RBΨ (ψ | x) measures the evidence that ψ is the true value, it can also be used to estimate ψ. For example, the best estimate of ψ is clearly the value for which the evidence is greatest, namely, ψ(x) = arg sup RBΨ (ψ | x). Associated with this is a γ-credible region CΨ,γ (x) = {ψ : RBΨ (ψ | x) ≥ cΨ,γ (x)} where cΨ,γ (x) = inf{k : ΠΨ (RBΨ (ψ | x) > k | x) ≤ γ}. Notice that ψ(x) ∈ CΨ,γ (x) for every γ ∈ [0, 1] and so, for selected γ, we can take the ”size” of CΨ,γ (x) as a measure of the accuracy of the estimate ψ(x). The interpretation of RBΨ (ψ | x) as the evidence for ψ forces the sets CΨ,γ (x) to be the credible regions. For if ψ1 is in such a region and RBΨ (ψ2 | x) ≥ RBΨ (ψ1 | x), then ψ2 must be in the region as well as there is at least as much evidence for ψ2 as for ψ1 . A variety of optimality results have been established for ψ(x) and CΨ,γ (x), see Evans (2015). The view is taken here that any time continuous probability is used, then this is an approximation to a finite, discrete context. For example, if ψ is a mean and the response measurements are to the nearest centimeter, then of course the true value of ψ cannot be known to an accuracy greater than 1/2 of a centimeter, no matter how large a sample we take. Furthermore, there are implicit bounds associated with any measurement process. As such the restriction is made here to discretized parameters that take only finitely many values. So when ψ is a continuous, real-valued parameter, it is discretized to the intervals . . . , (ψ0 − 3δ, ψ0 − δ], (ψ0 − δ, ψ0 + δ], (ψ0 + δ, ψ0 + 3δ], . . . for some choice of δ > 0, and there are only finitely may such intervals covering the range of possible values. It is of course possible to allow the intervals to vary in length as well. With this discretization, then we can take H0 = (ψ0 − δ, ψ0 + δ]. 3 Inferences for Multiple Tests Consider now Pk the multiple testing problem discussed in Section 1. Let ξ = Ξ(θ) = k1 i=1 IH0i (Ψi (θ)) be the proportion of the hypotheses H0i that are true and suppose that Ψi is finite for each i, perhaps arising via a discretization 6 as discussed in Section 2. Note that the discreteness is essential to realistically determine what proportion of the hypotheses are correct, otherwise, under a continuous prior on Ψ, the prior distribution of Ξ(θ) is degenerate at 0. In an application it is desirable to make inference about the true value of ξ ∈ Ξ = {0, 1/k, 2/k, . . . , 1}. This is based on the relative belief ratio RBΞ (ξ | x) = Π(Ξ(θ) = ξ | x)/Π(Ξ(θ) = ξ). The appropriate estimate of ξ is then the relative belief estimate of Ξ, namely, ξ(x) = arg supξ RBΞ (ξ | x). The accuracy of this estimate is assessed using the size of CΞ,γ (x) for some choice of γ ∈ [0, 1]. Also, hypotheses such as H0 = {θ : Ξ(θ) ∈ [ξ0 , ξ1 ]}, namely, the proportion true is at least ξ0 and no greater than ξ1 , can be assessed using the relative belief ratio RB(H0 | x) = Π(ξ0 ≤ Ξ(θ) ≤ ξ1 | x)/Π(ξ0 ≤ Ξ(θ) ≤ ξ1 ) which equals RBΞ (ξ0 | x) when ξ0 = ξ1 . The strength of this evidence can be assessed as previously discussed. The estimate ξ(x) can be used to control how many hypotheses are potentially accepted. For this select kξ(x) of the H0i as being true from among those for which RBΨi (ψ0i | x) > 1. Note that it does not make sense to accept H0i as being true when RBΨi (ψ0i | x) < 1 as there is evidence against this hypothesis. So, if there are fewer than kξ(x) satisfying RBΨi (ψ0i | x) > 1, then fewer than this number should be accepted. If there are more than kξ(x) of the relative belief ratios satisfying RBΨi (ψ0i | x) > 1, then some method will have to be used to select the kξ(x) which are potentially accepted. It is clear, however, that the logical way to do this is to order the H0i , for which RBΨi (ψ0i | x) > 1, based on their strengths ΠΨ (RBΨi (ψ0i | x) ≤ RBΨi (ψ0i | x) | x), from largest to smallest, and accept at most the kξ(x) for which the evidence is strongest. Note too that, if some of these strengths are indeed weak, there is no need to necessarily accept these hypotheses. The ultimate decision as to whether or not to accept a hypothesis is application dependent and is not statistical in nature. The role of statistics is to supply a clear statement of the evidence and its strength, while other criteria come into play when decisions are made. In any case, it is seen that inference about ξ is being used to help control the number of hypotheses accepted. If, as is more common, control is desired of the number of false positives, then the relevant parameter of interest is υ = Υ(θ) = 1−Ξ(θ), the proportion of false hypotheses. Note that Π(Υ(θ) = υ) = Π(Ξ(θ) = 1 − υ) and so the relative belief estimate of υ satisfies υ(x) = 1 − ξ(x). Following the same procedure, the H0i with RBΨi (ψ0i | x) < 1 are then ranked via their strengths and at most kυ(x) are rejected. The consistency of the procedure just described, for correctly identifying the H0i that are true and those that are false, follows from results proved in Section 4.7.1 of Evans (2015) under i.i.d. sampling. In other words, as the amount of data increases, ξ(x) converges to the proportion of H0i that are true, each RB(ψ0i | x) converges to the largest possible value (always bigger than 1) when H0i is true and converges to 0 when H0i is false, and the evidence in favor or against converges to the strongest possible, depending on whether the hypothesis in question is true or false. We refer to this procedure as the multiple testing algorithm. Consider first 7 a somewhat artificial example where many of the computations are easy but which fully demonstrates the relevant characteristics of the methodology. Example 1. Location normal. Suppose that there are k independent samples xij for 1 ≤ i ≤ k, 1 ≤ j ≤ n where the i-th sample is from a N (µi , σ 2 ) distribution with µi unknown and σ 2 known. It also assumed that prior knowledge about all the unknown µi is reflected in the statement that the µ1 , . . . , µk are i.i.d. from a N (µ0 , λ20 σ 2 ) distribution. It is easy to modify our development to allow the sample sizes to vary and to use a general multivariate normal prior, while the case where σ 2 is unknown is considered in Section 4. This context is relevant to the analysis of microarray data. The value of (µ0 , λ20 ) is determined via elicitation. For this it is supposed that it is known with virtual certainty that each µi ∈ (ml , mu ) for specified values ml ≤ mu . Here virtual certainty is interpreted to mean that the prior probability of this interval is at least 0.99 and other choices could be made. It is also supposed that µ0 = (ml + mu )/2. This implies that λ0 = (mu − ml )/(2σΦ−1 ((1 + 0.99)/2)). Following Evans and Jang (2011b), increasing the value of λ0 implies a more weakly informative prior in this context and, as such, decreases the possibility of prior-data conflict. The posterior distributions of the µi are then independent with µi | x ∼ N (µi (x), (nλ20 +1)−1 λ20 σ 2 ) where µi (x) = (n+1/λ20 )−1 (nx̄i +µ0 /λ20 ). Given that the measurements are taken to finite accuracy, it is not necessarily realistic to test µi = µ0 . As such, a value δ > 0 is specified so that H0i = (µ0 −δ/2, µ0 +δ/2] in a discretization of the parameter space into a finite number of intervals, each of length δ, as well as two tail intervals. Then for T ∈ N there are 2T +1 intervals of the form (µ0 + (t − 1/2)δ, µ0 + (t + 1/2)δ], for t ∈ {−T, −T + 1, . . . , T } that span (ml , mu ), together with two additional tail intervals (−∞, µ0 − (T + 1/2)δ] and (µ0 + (T + 1/2)δ, ∞) to cover the full range. The relative belief ratio for the t-th interval for µi is then given by RBi ((µ0 + (t − 1/2)δ, µ0 + (t + 1/2)δ] | x)   Φ((nλ20 + 1)1/2 (µ0 + (t + 1/2)δ − µi (x))/λ0 σ)− Φ((nλ20 + 1)1/2 (µ0 + (t − 1/2)δ − µi (x))/λ0 σ) = Φ((t + 1/2)δ/λ0 σ) − Φ((t − 1/2)δ/λ0 σ) (5) with a similar formula for the tail intervals. When δ is small this is approximated by the ratio of the posterior to prior densities of µi evaluated at µ0 + tδ. Then RB(H0i | x) = RBi ((µ0 − δ/2, µ0 + δ/2] | x) gives the evidence for or against H0i and the strength of this evidence is computed using the discretized posterior distribution. Notice that (5) converges to ∞ as λ0 → ∞ and this is characteristic of other measures of evidence such as Bayes factors. As discussed in Evans (2015), this is one of the reasons why calibrating (1) via (2) is necessary. As previously noted, it is important to take account of the bias in the prior. To simplify matters the continuous approximation is used here as this makes little difference for the discussion of bias concerning inference about µi (see 8 Tables 2 and 3). The bias against µi = µ0 equals M (RBi (µ0 | x) ≤ 1 | µ0 ) = 2(1 − Φ(an (1))) (6) where  an (q) = {(1 + 1/nλ20 ) log((nλ20 + 1)/q 2 )}1/2 , q 2 ≤ nλ20 + 1 0, q 2 > nλ20 + 1. Note that (6) converges to 2(1 − Φ(1)) = 0.32 as λ0 → 0 and to 0 as λ0 → ∞ and, for fixed λ0 , converges to 0 as n → ∞. So there is never strong bias against µi = µ0 and this is as expected since the prior is centered on µ0 . The bias in favor of µi = µ0 is measured by √ √ M (RBi (µ0 | x) ≥ 1 | µ0 ± δ/2) = Φ( nδ/2σ + an (1)) − Φ( nδ/2σ − an (1)). (7) As λ0 → ∞ then (7) converges to 1 so there is bias in favor of µi = µ0 and this reflects what was obtained for the limiting value of (5). Also this decreases with increasing δ and goes to 0 as n → ∞. So indeed bias of both types can be controlled by sample size. Perhaps the most important take away from this discussion, however, is that by using a supposedly noninformative prior with λ0 large, bias in favor of the H0i is being induced. Consider first a simulated data set x when k = 10, n = 5, σ = 1, δ = 1, µ0 = 0, (ml , mu ) = (−5, 5), so that λ0 = 10/2Φ−1 (0.995) = 1.94 and suppose µ1 = µ2 = · · · = µ7 = 0 with the remaining µi = 2. The relative belief ratio function RBΞ (· | x) is plotted in Figure 1. In this case the relative belief estimate ξ(x) = 0.70 is exactly correct. Table 1 gives the values of the RBi (0 | x) together with their strengths. It is clear that the multiple testing algorithm leads to 0 false positives and 0 false negatives. So the algorithm works perfectly on this data but of course it can’t be expected to do as well when the three nonzero means move closer to 0. Also, it is worth noting that the strength of the evidence in favor of µi = 0 is very strong for i = 1, 2, 3, 5, 6, 7 but only moderate when i = 4. The strength of the evidence against µi = 0 is very strong for i = 8, 9, 10. Note that the maximum possible value of RBi ((µ0 − δ/2, µ0 + δ/2] | x) here is (2Φ(δ/2λ0 σ) − 1)−1 = 4.92, so indeed some of the relative belief ratios are relatively large. Now consider basically the same context but where k = 1000 and µ1 = · · · = µ700 = 0 while the remaining 300 satisfy µi = 2. The relative belief ratio RBΞ (· | x) is plotted in Figure 2. In this case ξ(x) = 0.47 which is a serious underestimate. As such the multiple testing algorithm will not record enough acceptances and so will fail. This problem arises due to the independence assumption on the µi . For the prior distribution of kΞ(θ) is binomial(k, 2Φ(δ/2λ0 σ) − 1) and the prior distribution of kΥ(θ) is binomial(k, 2(1 − Φ(δ/2λ0 σ))). So the a priori expected proportion of true hypotheses is 2Φ(δ/2λ0 σ) − 1 and the expected proportion of false hypotheses is 2(1−Φ(δ/2λ0 σ)). When δ/2λ0 σ is small, as when the amount of sampling variability or the diffuseness of the prior are large, then the prior on 9 Figure 1: A plot of the relative belief ratio of Ξ when n = 5, k = 10 and 7 means equal 0 with the remaining means equal to 2 in Example 1. i µi RBi (0 | x) Strength i µi RBi (0 | x) Strength 1 0 3.27 1.00 6 0 3.00 1.00 2 0 3.65 1.00 7 0 3.43 1.00 3 0 2.98 1.00 8 2 2.09 × 10−4 4.25 × 10−5 4 0 1.67 0.37 9 2 3.99 × 10−4 8.11 × 10−5 5 0 3.57 1.00 10 2 8.80 × 10−3 1.83 × 10−3 Table 1: Relative belief ratios and strengths for the µi in Example 1 with k = 10. Figure 2: A plot of the relative belief ratio of Ξ when n = 5, k = 1000 and 700 means equal 0 with the remaining means equal to 2 in Example 1. 10 Ξ suggests a belief in many false hypotheses. When k is small, relatively small amounts of data can override this to produce accurate inferences about ξ or υ but otherwise large amounts of data are needed which may not be available.  Given that accurate inference about ξ and υ is often not feasible, we focus instead on protecting against too many false positives and false negatives. From the discussion in Example 1 it is seen that it is possible to produce bias in favor of the H0i being true simply by using a diffuse prior. If our primary goal is to guard against too many false positives, then this biasing will work as we can make the prior conditional probabilities of the events RB(ψ0i | x) < 1, given that H0i is true, as small as desirable by choosing such a prior. This could be seen as a way of creating a higher bar for a positive result. The price we pay for this, however, is too many false negatives. As such we consider another way of ”raising the bar”. Given that RB(ψ0i | x) is measuring evidence, a natural approach is to simply choose constants 0 < qR ≤ 1 ≤ qA and classify H0i as accepted when RB(ψ0i | x) > qA and rejected when RB(ψ0i | x) < qR . The strengths can also be quoted to assess the reliability of these inferences. Provided qR is greater than the minimum possible value of RB(ψ0i | x), and this is typically 0, and qA is chosen less than the maximum possible value of RB(ψ0i | x), and this is 1 over the prior probability of H0i , then this procedure is consistent as the amount of data increases. In fact, the related estimates of ξ and υ are also consistent. The price paid for this is that a hypothesis will not be classified whenever qR ≤ RB(ψ0i | x) ≤ qA . Not classifying a hypothesis implies that there is not enough evidence for this purpose and more data is required. This approach is referred to as the relative belief multiple testing algorithm. It remains to determine qA and qR . Consider first protecting against too many false positives. The a priori conditional prior probability, given that H0i is true, of finding evidence against H0i less than qR is M (RBi (ψ0i | X) < qR | ψ0i ) = M (m(X | ψ0i )/m(x) < qR | ψ0i ) ≤ qR where the final inequality follows from Theorem 2. Naturally, we want the probability of a false negative to be small and so choosing qR small accomplishes this. The a priori probability that a randomly selected hypothesis produces a false positive is k 1X M (RBi (ψ0i | X) < qR | ψ0i ) k i=1 (8) which by Theorem 2 is bounded above by qR and so converges to 0 as qR → 0. Also, for fixed qR , (8) converges to 0 as the amount of data increases. More generally qR can be allowed to depend on i but when the ψi are similar in nature this does not seem necessary. Furthermore, it is not necessary to weight the hypotheses equally so a randomly chosen hypothesis with unequal probabilities could be relevant in certain circumstances. In any case, controlling the value of (8), whether by sample size or by the choice of qR , is clearly controlling for false positives. Suppose there is proportion pF P of false positives that is just tolerable in a problem. Then qR can be chosen so that (8) is less than or equal to pF P and note that qR = pF P satisfies this. 11 0 0 Similarly, if ψ0i 6= ψ0i then M (RBi (ψ0i | X) > qA | ψ0i ) is the prior proba0 bility of finding evidence for H0i when ψ0i is the true value. For a given effect 0 size δ of practical importance it is natural to take ψ0i = ψ0i ± δ/2. In typical 0 applications this probability becomes smaller the ”further” ψ0i is from ψ0i and so choosing qA to make this probability small will make it small for all alternatives. Under these circumstances the a priori probability that a randomly selected hypothesis produces a false negative is bounded above by k 1X 0 M (RBi (ψ0i | X) > qA | ψ0i ). k i=1 (9) As qA → ∞, or as the amount of data increases with qA fixed, then (9) converges to 0 so the number of false negatives can be controlled. If there is proportion pF N of false negatives that is just tolerable in a problem, then qA can be chosen so that (9) is less than or equal to pF N . The following optimality result holds for relative belief multiple testing. Corollary 3 (i) Among all procedures where the prior probability of accepting H0i , when it is true, is at least M (RBi (ψ0i | X) > qA | ψ0i ) for i = 1, . . . , k, the relative belief multiple testing algorithm minimizes the prior probability that a randomly chosen hypothesis is accepted. (ii) Among all procedures where the prior probability of rejecting H0i , when it is true, is less than or equal to M (RBi (ψ0i | X) < qR | ψ0i ), then the relative belief multiple testing algorithm maximizes the prior probability that a randomly chosen hypothesis is rejected. Proof : For (i) consider a procedure for multiple testing and let Ai be the set of data values where H0i is accepted. Then by hypothesis M (RBi (ψ0i | X) > qA | ψ0i ) ≤ M (Ai | ψ0i ) and by the analog of Theorem 1 M (Ai ) ≥ M (RBi (ψ0i | X) > qA ). Applying this to a randomly chosen H0i gives the result. The proof of (ii) is basically the same. Applying the same discussion as after Theorem 1, it is seen that, under reasonable conditions, the relative belief multiple testing algorithm minimizes the prior probability of accepting a randomly chosen H0i when it is false and maximizes the prior probability of rejecting a randomly chosen H0i when it is false. Consider now the application of the relative belief multiple testing algorithm in the previous example. Example 2. (Example 1 continued) In this context (8) equals M (RBi (µ0 | x) < qR | µ0 ) = 2(1 − Φ(an (qR )) for all i and so this is the value of (8). Therefore, qR is chosen to make this number suitably small. Table 2 records values for (8). From this it is seen that for small n there can be some bias against H0i (qR = 1) and so the prior probability of obtaining false positives is perhaps too large. Table 2 demonstrates that choosing a smaller value of qR can adequately control the prior probability of false positives. 12 n 1 λ0 1 2 10 qR 1 1/2 1/10 1 1/2 1/10 1 1/2 1/10 (8) 0.239 (0.228) 0.041 (0.030) 0.001 (0.000 0.156 (0.146) 0.053 (0.045) 0.005 (0.004) 0.031 (0.026) 0.014 (0.011) 0.002 (0.002) n 5 λ0 1 2 10 qR 1 1/2 1/10 1 1/2 1/10 1 1/2 1/10 (8) 0.143 (0.097) 0.051 (0.022) 0.006 (0.001) 0.074 (0.041) 0.031 (0.013) 0.005 (0.001) 0.013 (0.004) 0.006 (0.002) 0.001 (0.001) Table 2: Prior probability a randomly chosen hypothesis produces a false positive, continuous and discretized ( ) versions, in Example 2. n 1 λ0 1 2 10 qA 1.0 1.2 1.4 1.0 2.0 2.2 1.0 5.0 10.0 (9) 0.704 (0.715) 0.527 (0.503) 0.141 (0.000) 0.793 (0.805) 0.359 (0.304) 0.141 (0.000) 0.948 (0.955) 0.708 (0.713) 0.070 (0.000) n 5 λ0 1 2 10 qA 1.0 2.0 2.4 1.0 3.0 4.5 1.0 10.0 22.0 (9) 0.631 (0.702) 0.302 (0.112) 0.095 (0.000) 0.747 (0.822) 0.411 (0.380) 0.084 (0.000) 0.916 (0.961) 0.552 (0.588) 0.080 (0.000) Table 3: Prior probability a randomly chosen hypothesis produces a false negative when δ/σ = 1, continuous and discretized ( ) versions, in Example 2. For false negatives consider (9) where  √  Φ( √nδ/2σ + an (qA ))− Φ( nδ/2σ − an (qA )), M (RBi (µ0 | x) > qA | µ0 ±δ/2) =  0, 2 ≤ 1 ≤ qA 2 nλ0 + 1 2 > nλ20 + 1. qA for all i. It is easy to show that this is monotone decreasing in δ and so it is an upper bound on the expected proportion of false negatives among those hypotheses that are actually false. The cutoff qA can be chosen to make this number as small as desired. When δ/σ → ∞, then (9) converges to 0 and increases to 2Φ(an (qA )) − 1 as δ/σ → 0. Table 3 records values for (9) when δ/σ = 1 so that the µi differ from µ0 by one half of a standard deviation. There is clearly some improvement but still the biasing in favor p of false negatives is readily apparent. It would seem that taking qA = nλ20 + 1 gives the best results but this could be considered as quite conservative. It is also worth remarking that all the entries in Table 3 can be considered as very conservative when large effect sizes are expected. Now consider the situation that led to Figure 2. For this k = 1000, n = 5 13 Decision Accept µ = 0 using qA = 1.0 Reject µ = 0 using qR = 1.0 Not classified Accept µ = 0 using qA = 3.0 Reject µ = 0 using qR = 0.5 Not classified µ=0 666 34 0 419 9 272 µ=2 3 297 0 0 287 13 Table 4: Confusion matrices for Example 2 with k = 1000 when 700 of the µi equal 0 and 300 equal 2. and λ0 = 1.94 is the elicited value. From Table 2 with qR = 1.0, about 8% false positives are expected a priori and from Table 3 with qA = 1.0, a worst case upper bound on the a priori expected percentage of false negatives is about 75%. The top part of Table 4 indicates that with qR = qA = 1.0, then 4.9% (34 of 700) false positives and 0.1% (3 of 300) false negatives were obtained. With these choices of the cutoffs all hypotheses are classified. Certainly the upper bound 75% seems far too pessimistic in light of the results, but recall that Table 3 is computed at the false values µ = ±0.5. The relevant a priori expected percentage of false negatives when µ = ±2.0 is about 3.5%. The bottom part of Table 4 gives the relevant values when qR = 0.5 and qA = 3.0. In this case there are 2.1% (9 of 428) false positives and 0% false negatives but 39.9% (272 out of 700) of the true hypotheses and 4.3% (13 out 300) of the false hypotheses were not classified as the relevant relative belief ratio lay between qR and qA . So in this case being more conservative has reduced the error rates with the price being a large proportion of the true hypotheses don’t get classified. The procedure has worked well in this example but of course the error rates can be expected to rise when the false values move towards the null and improve when they move away from the null.  What is implemented in an application depends on the goals. If the primary purpose is to protect against false positives, then Table 2 indicates that this is accomplished fairly easily. Protecting against false negatives is more difficult. Since the actual effect sizes are not known a decision has to be made. Note that choosing a cutoff is equivalent to saying that one will only accept H0i if the belief in the truth of H0i has increased by a factor at least as large as qA . Computations such as in Table 3 can be used to provide guidance but there is no avoiding the need to be clear about what effect sizes are deemed to be important or the need to obtain more data when this is necessary. One comforting aspect of the methodology is that error rates are effectively controlled but there may be many true hypotheses not classified. The idea of controlling the prior probability of a randomly chosen hypothesis yielding a false positive or a false negative via (8) or (9), respectively, can be extended. For example, consider the prior probability that a random sample of 14 l from k hypotheses yields at least one false positive   X 1 at least one of RBij (ψ0ij | X) < qR M .  k for j = 1, . . . , l | ψ0i1 , . . . , ψ0il l (10) {i1 ,...,il }⊂{1,...,k} In the context of the examples of this paper, and many others, the term in (10) corresponding to {i1 , . . . , il } equals M (at least one of RBij (ψ0ij | X) < qR for j = 1, . . . , l | ψ0 ). The following result, whose proof is given in the Appendix, then leads to an interesting property for (10). Lemma 4 For probability model (Ω, F, P ), the probability that at least one of l ≤ k randomly selected events from {A1 , . . . , Ak } ⊂ F occurs is an upper bound on the probability that at least one of l0 ≤ l randomly selected events from {A1 , . . . , Ak } ⊂ F occur. It then follows, by taking Ai = {x : RBi (ψ0i | x) < qR }, that (10) is an upper bound on the prior probability that a random sample of l0 hypotheses yields at least one false positive whenever l0 ≤ l. So (10) leads to a more rigorous control over the possibility false positives, if so desired. A similar result is obtained for false negatives. 4 Applications One application of the relative belief multiple testing algorithm is to the problem of inducing sparsity. Example 3. Testing for sparsity. The position taken here is that, rather than trying to induce sparsity through an estimation procedure, an assessment of sparsity is made through an explicit measure of the evidence as to whether or not a particular assignment is valid. Virtues of this approach are that it is based on a measure of evidence and it is not dependent on the form of the prior as any prior can be used. Also, it has some additional advantages when prior-data conflict is taken into account. Consider the context of Example 1. A natural approach to inducing sparsity is to estimate µi by µ0 whenever RBi (µ0 | x) > qA . From the simulation it is seen that this works extremely well when qA = 1 for both k = 10 and k = 1000. It also works when k = 1000 and qA = 3, in the sense that the error rate is low, but it is conservative in the amount of sparsity it induces in that case. Again the goals of the application will dictate what is appropriate. A common method for inducing sparsity is to use a penalized estimator as in the LASSO introduced in Tibshirani (1996). It is noted there that the LASSO is equivalent to MAP estimation when using a product of independent Laplace priors. This aspect was pursued further in Park and Casella (2006) which adopted a more formal Bayesian approach but still used MAP. Consider Laplace priors for the prior on µ, √ then a product√ of independent Pk namely, ( 2λ0 σ)−k exp{−( 2/λ0 σ) i=1 |µi − µ0 |} where σ is assumed known 15 Decision Accept µ = 0 using qA = 1.0 Reject µ = 0 using qA = 1.0 µ=0 227 473 µ=2 0 300 Table 5: Confusion matrices using LASSO with k = 1000 when 700 of the µi equal 0 and 300 equal 2 in Example 3 and µ0 , λ0 are hyperparameters. Note that each Laplace prior has mean µ0 and variance λ20 σ 2 . Using the elicitation algorithm provided in Example 1, but replacing the normal prior with a Laplace prior, leads to the assignment µ0 = (ml + mu )/2, λ0 = (mu − ml )/2σG−1 (0.995) where G−1 (p) = 2−1/2 log 2p when p ≤ 1/2, G−1 (p) = −2−1/2 log 2(1 − p) when p ≥ 1/2 and G−1 denotes the quantile function of a Laplace distribution with mean 0 and variance 1. With the specifications used in the simulations of Example 1, this leads to µ0 = 0 and λ0 = 1.54 which implies a smaller variance than the value λ0 = 1.94 used with the normal prior and so the Laplace prior is more concentrated about 0. The posteriors for the µi are √ independent with the density for µi proportional to exp{−n(x̄i − µi )2 /2σ 2 − 2|µi − µ0 |/λ0 σ} giving the MAP estimator √ √  x̄ < µ − 2σ/λ0 n√  x̄i + 2σ/λ0 n, i 0 √ µiMAP (x) = µ , µ0 − 2σ/λ0 n ≤ x̄√ 2σ/λ0 n i ≤ µ0 +  0 √ x̄i − 2σ/λ0 n, x̄i > µ0 + 2σ/λ0 n. The MAP estimate of √ µi is sometimes forced to equal µ0 although this effect is negligible whenever 2σ/λ0 n is small. The LASSO induces sparsity through estimation by taking λ0 to be small. By contrast the evidential approach, based on the normal prior and the relative belief ratio, induces sparsity through taking λ0 large. The advantage to this latter approach is that by taking λ0 large, prior-data conflict is avoided. When taking λ0 small, the potential for prior-data conflict rises as the true values can be deep√into the tails of the prior. For example, for the simulations of Example 1 2σ/λ0 n = 0.183 which is smaller than the δ/2 = 0.5 used in the relative belief approach with the normal prior. So it can be expected that the LASSO will do worse here and this is reflected in Table 5 where there are far too many false negatives. To improve this the value of λ0 needs to be reduced although note that this is determined by an elicitation and there is the risk of then encountering prior-data conflict. Another possibility is to implement the evidential approach with the elicited Laplace prior and the discretization as done with the normal prior and then we can expect results similar to those obtained in Example 1. It is also interesting to compare the MAP estimation approach and the relative belief approach with respect to the conditional prior probabilities of µi being assigned the value µ0 when the true value actually is µ0 . It √is easily √ seen that, based on the Laplace prior, M (µiMAP (x) = µ0 | µ0 ) = 2Φ( 2/λ0 n) − 1 and this converges to 0 as n → ∞ or λ0 → ∞. For the relative belief approach M (RBi (µ0 | x) > qA | µ0 ) is the relevant probability. With either the normal or 16 Laplace prior M (RBi (µ0 | x) > qA | µ0 ) converges to 1 both as n → ∞ and as λ0 → ∞. In particular, with enough data the correct assignment is always made using relative belief but not with MAP based on the Laplace prior. While the Laplace and normal priors work equally with the relative belief multiple testing algorithm, there don’t appear to be any advantages to using the Laplace prior. One could argue too that the singularity of the Laplace prior at its mode makes it an odd choice and there doesn’t seem to be a good justification for this. Furthermore, the computations are harder with the Laplace prior, particularly with more complex models. So using a normal prior seems preferable overall.  An example with considerable practical significance is now considered. Example 4. Full rank regression. Suppose the basic model is given by y = β0 + β1 x1 + · · · + βk xk + z = β0 + x0 β1:k + z where the xi are predictor variables, z ∼ N (0, σ 2 ) and the βi and σ 2 are unknown. The main issue in this problem is testing H0i : βi = 0 for i = 1, . . . , k to establish which variables have any effect on the response. The prior distribution of (β, σ 2 ) is taken to be β | σ 2 ∼ Nk+1 (0, σ 2 Σ0 ), 1/σ 2 ∼ gammarate (α1 , α2 ), (11) for some hyperparameters Σ0 and (α1 , α2 ). Note that this may entail subtracting a known, fixed constant from each y value so that the prior for β0 is centered at 0. Taking 0 as the central value for the priors on the remaining βi seems appropriate when the primary concern is whether or not each xi is having any effect. Also, it will be assumed that the observed values of the predictor variable have been standardized so that for observations (y, X) ∈ Rn × Rn×(k+1) , where X = (1, x1 , . . . , xk ), then 10 xi = 0 and ||xi ||2 = 1 for i = 1, . . . , k. The marginal 2 prior for βi is then {(α2 /α1 )σ0ii }1/2 t2α1 where t2α1 denotes the t distribution on 2α1 degrees of freedom, for i = 0, . . . , k. Hereafter, we will take Σ0 = λ20 Ik+1 although it is easy to generalize to more complicated choices. The elicitation of the hyperparameters is carried out via an extension of a method developed in Cao, Evans and Guttman (2014) for the multivariate normal distribution. Suppose that it is known with virtual certainty, based on our knowledge of the measurements being taken, that β0 + x0 β1:k will lie in the interval (−m0 , m0 ) for some m0 > 0 for all x ∈ R where R is a compact set centered at 0. On account of the standardization, R ⊂ [−1, 1]k . Again ‘virtual certainty’ is interpreted as probability greater than or equal to γ where γ is some large probability like 0.99. Therefore, the prior on β must satisfy 2Φ(m0 /σλ0 {1 + x0 x}1/2 ) − 1 ≥ γ for all x ∈ R and this implies that σ ≤ m0 /λ0 τ0 z(1+γ)/2 (12) where τ02 = 1 + maxx∈R ||x||2 ≤ 1 + k with equality when R = [−1, 1]k . An interval that will contain a response value y with virtual certainty, given predictor values x, is β0 + x0 β1:k ± σz(1+γ)/2 . Suppose that we have lower and upper bounds s1 and s2 on the half-length of this interval so that 17 s1 ≤ σz(1+γ)/2 ≤ s2 or, equivalently, s1 /z(1+γ)/2 ≤ σ ≤ s2 /z(1+γ)/2 (13) holds with virtual certainty. Combining (13) with (12) implies λ0 = m0 /s2 τ0 . To obtain the relevant values of α1 and α2 let G (α1 , α2 , ·) denote the cdf of the gammarate (α1 , α2 ) distribution and note that G (α1 , α2 , z) = G (α1 , 1, α2 z) . Therefore, the interval for 1/σ 2 implied by (13) contains 1/σ 2 with virtual cer2 −1 tainty, when α1 , α2 satisfy G−1 (α1 , α2 , (1+γ)/2) = s−2 (α1 , α2 , (1− 1 z(1+γ)/2 , G −2 2 γ)/2) = s2 z(1−γ)/2 , or equivalently 2 G(α1 , 1, α2 s−2 1 z(1+γ)/2 ) = (1 + γ)/2, (14) 2 G(α1 , 1, α2 s−2 2 z(1−γ)/2 ) (15) = (1 − γ)/2. It is a simple matter to solve these equations for (α1 , α2 ) . For this choose an initial value for α1 and, using (14), find z such that G(α1 , 1, z) = (1 + γ)/2, 2 which implies α2 = z/s−2 1 z(1+γ)/2 . If the left-side of (15) is less (greater) than (1 − γ)/2, then decrease (increase) the value of α1 and repeat step 1. Continue iterating this process until satisfactory convergence is attained. The methods discussed in Evans and Moshonov (2006) are available for checking the prior to see if it is contradicted by the data. Methods are specified there for checking each of the components in the hierarchy, namely, first check the prior on σ 2 and, if it passes, then check the prior on β. If conflict is found, then the methods discussed in Evans and Jang (2011b) are available to modify the prior appropriately. Assuming that X is of rank k + 1, the posterior of (β, σ 2 ) is given by β | y, σ 2 ∼ Nk+1 (β(X, y), σ 2 Σ(X)), 1/σ 2 | y ∼ gammarate ((n + 2α1 )/2, α2 (X, y)/2), (16) −1 where b = (X 0 X)−1 X 0 y, β(X, y) = Σ(X)X 0 Xb, Σ(X) = (X 0 X + Σ−1 and 0 ) 2 0 0 α2 (X, y) = ||y − Xb|| + (Xb) (In − XΣ(X)X )Xb + 2α2 . Then the marginal posterior for βi is given by βi (X, y) + {α2 (X, y)σii (X)/(n + 2α1 )}1/2 tn+2α1 and the relative belief ratio for βi at 0 equals   − n+2α2 1 +1 1 +1 Γ (α1 ) Γ n+2α βi2 (X, y) 2  1+ × RBi (0 | X, y) = 2α1 +1 1 α2 (X, y)σii (X) Γ Γ n+2α 2 2  − 21 α2 (X, y)σii (X) . (17) α22 λ20 Rather than using (17), however, the distributional results are used to compute the discretized relative belief ratios as in Example 1. For this δ > 0 is required to determine an appropriate discretization and it will be assumed here that this is the same for all the βi , although the procedure can be easily modified if this is not the case in practice. Note that such a δ is effectively determined 18 by the amount that xi βi will vary from 0 for x ∈ R. Since xi ∈ [−1, 1] then |xi βi | ≤ δ provided |βi | ≤ δ. When this variation is suitably small as to be immaterial, then such a δ is appropriate for saying βi is effectively 0. Note that determination of the hyperparameters and δ is dependent on the application. Again inference can be made concerning ξ = Ξ(β, σ 2 ), the proportion of the βi effectively equal to 0. As in Example 1, however, we can expect bias when the amount of variability in the data is large relative to δ or the prior is too diffuse. To implement the relative belief multiple testing algorithm the quantities (8) and (9) need to be computed to determine qR and qA , respectively. The conditional prior distribution of (b, ||y − Xb||2 ), given (β, σ 2 ), is b ∼ Nk+1 (β, σ 2 (X 0 X)−1 ) statistically independent of ||y − Xb||2 ∼ gamma((n − k − 1)/2, σ −2 /2). So computing (8) and (9) can be carried out by generating (β, σ 2 ) from the relevant conditional prior, generating (b, ||y − Xb||2 ) given (β, σ 2 ), and using (17). To illustrate these computations the diabetes data set discussed in Efron, Hastie, Johnstone and Tibshirani (2006) and Park and Casella (2008) is now analyzed. With γ = 0.99, the values m0 = 100, s1 = 75, s2 = 200 were used to determine the prior together with τ0 = 1.05 determined from the X matrix. This lead to the values λ0 = 0.48, α1 = 7.29, α2 = 13641.35 being chosen for the hyperparameters. Using the methods developed in Evans and Moshonov (2006), a first check was made on the prior on σ 2 against the data and a tail probability equal to 0.19 was obtained indicating there is no prior-data conflict with this prior. Given no prior-data conflict at the first stage, the prior on β was then checked and the relevant tail probability of 0.00 was obtained indicating a strong degree of conflict. Following the argument in Evans and Jang (2011) the value of λ0 was increased to choose a prior weakly informative with respect to our initial choice and this lead to choosing the value λ0 = 5.00 and then the relevant tail probability equals 0.32. Using this prior, the relative belief estimates, ratios and strengths are recorded in Table 6. From this it is seen that there is strong evidence against βi = 0 for the variables sex, bmi, map and ltg and no evidence against βi = 0 for any other variables. There is strong evidence of in favor of βi = 0 for age and ldl, moderate evidence in favor of βi = 0 for the constant, tc, tch and glu and perhaps only weak evidence in favor of βi = 0 for hdl. As previously discussed it is necessary to consider the issue of bias, namely, compute the prior probability of getting a false positive for different choices of qR and the prior probability of getting a false negative for different choices of qA . The value of (8) is 0.0003 when qR = 1 and so there is virtually no bias in favor of false positives and one can feel confident that the predictors identified as having an effect do so. The story is somewhat different, however, when considering the possibility of false negatives via (9). For example, with qA = 1, then (9) equals 0.9996 and when qA = 100 then (9) equals 0.7998. So there is substantial bias in favor of the null hypotheses and undoubtedly this is due to the diffuseness of the prior. The implication is that we cannot be entirely confident concerning those βi assigned to be equal to 0. Recall, that the first prior proposed lead to prior-data conflict and as such a much more diffuse prior was substituted. The bias in favor of false negatives could be mitigated by 19 Variable Constant age sex bmi map tc ldl hdl tch ltg glu Estimates 2 −4 −224 511 314 162 −20 167 114 496 77 RBi (0 | X, y) 2454.86 153.62 0.13 0.00 0.00 33.23 57.65 27.53 49.97 0.00 66.81 Strength 0.44 0.95 0.00 0.00 0.00 0.36 0.90 0.15 0.37 0.00 0.23 Table 6: Relative belief estimates, relative belief ratios and strengths for assessing no effect for the diabetes data in Example 4.. making the prior less diffuse. It is to be noted, however, that this is an exercise that should be conducted prior to collecting the data as there is a danger that the choice of the prior will be too heavily influenced by the observed data. The real cure for any bias in an application is to collect more data.  Next we consider the application to regression with k + 1 > n. Example 5. Non-full rank regression. In a number of applications k + 1 > n and so X is of rank l < n. In this situation, suppose {x1 , . . . , xl } forms a basis for L(x1 , . . . , xk ), perhaps after relabeling the predictors, and write X = (1 X1 X2 ) where X1 = (x1 . . . xl ). For given r = (X1 X2 )β1:k there will be many solutions β1:k . A particular solution is given by β1:k∗ = (X1 (X10 X1 )−1 0)0 r. The set of all solutions is then given by β1:k∗ + ker(X1 X2 ) where ker(X1 X2 ) = {(−B 0 Ik−l )0 η : η ∈ Rk−l }, B = (X10 X1 )−1 X10 X2 and the columns of C = (−B 0 Ik−l )0 give a basis for ker(X1 X2 ). Given that sparsity is expected for the true β1:k , it is natural to consider the solution which minimizes ||β1:k ||2 for β1:k ∈ β1:k∗ + L(C). Using β1:k∗ , and applying the Sherman-Morrison-Woodbury formula to C(C 0 C)−1 C 0 , this is given by the Moore-Penrose solution MP β1:k = (Ik − C(C 0 C)−1 C 0 )β1:k∗ = (Il B)0 ω1:l (18) 0 −1 where ω1:l = (Il + BB ) (β1:l + Bβl+1:k ). From (11) with Σ0 = λ20 Ik+1 , the conditional prior distribution of (β0 , ω1:l ) given σ 2 is β0 | σ 2 ∼ N (0, σ 2 λ20 ) independent of ω1:l | σ 2 ∼ Nl (0, σ 2 λ20 (Il + MP BB 0 )−1 ) which, using (18), implies β1:k | σ 2 ∼ Nk (0, σ 2 Σ0 (B)), conditionally independent of β0 , where   (Il + BB 0 )−1 (Il + BB 0 )−1 B 2 Σ0 (B) = λ0 . B 0 (Il + BB 0 )−1 B 0 (Il + BB 0 )−1 B With 1/σ 2 ∼ gammarate (α1 , α2 ), this implies that the unconditional prior of the 1/2 MP 2 i-th coordinate of β1:k is λ20 α2 σii (B)/α1 t2α1 . 20 Putting X∗ = (1 X1 + X2 B 0 ) gives the full rank model y | β0 , ω1:l , σ 2 ∼ 0 Nn (X∗ (β0 , ω1:l )0 , σ 2 In ). As in Example 4 then (β0 , ω1:l ) | y, σ 2 ∼ Nl (ω(X∗ , y), 2 2 σ Σ(X∗ )), 1/σ | y ∼ gammarate ((n + 2α1 )/2, α2 (X∗ , y)/2) where ω(X∗ , y) = Σ(X∗ )X∗0 X∗ b∗ , b∗ = (X∗0 X∗ )−1 X∗0 y and     n 0 1 0 −2 Σ−1 (X∗ ) = + λ , 0 0 (X1 + X2 B 0 )0 (X1 + X2 B 0 ) 0 (Il + BB 0 ) α2 (X∗ , y) = ||y − X∗ b∗ ||2 + (X∗ b∗ )0 (In − X∗ Σ(X∗ )X∗0 )X∗ b∗ + 2α2 . Now noting that (X1 + X2 B 0 )0 (X1 + X2 B 0 ) = (Il + BB 0 )X10 X1 (Il + BB 0 ), this implies b0∗ = (ȳ, (Il + BB 0 )−1 b1 ), where b1 = (X10 X1 )−1 X10 y is the least-squares estimate of β1:l , and  n + λ−2 0 0 0 Σ(X∗ ) = 0 (Il + BB 0 )X10 X1 (Il + BB 0 ) + λ−2 0 (Il + BB )   nȳ/(n + λ−2 0 ) ω(X∗ , y) = Σ(X∗ )X∗0 X∗ b∗ = . 0 0 −1 −1 (Il + BB + λ−2 (X ) b1 1 X1 ) 0 −1 , −1 −1 Using (18), then β0 | y, σ 2 ∼ N (n(n + λ−2 ȳ, σ 2 (n + λ−2 ) independent of 0 ) 0 ) MP 2 MP 2 MP β1:k | y, σ ∼ Nk (β (X, y), σ Σ (X)) where     Db1 E EB MP β M P (X, y) = , Σ (X) = B 0 Db1 B 0 E B 0 EB 0 −1 −1 with D = (Il + BB 0 + λ−2 ) and E = ((Il + BB 0 )(X10 X1 )(Il + 0 (X1 X1 ) 0 −1 BB 0 ) + λ−2 (I + BB )) . The marginal posterior for βiM P is then given by l 0 MP βiM P (X, y) + {α2 (X∗ , y)σii (X)/(n + 2α1 )}1/2 tn+2α1 . Relative belief inferences MP for the coordinates of β1:k can now be implemented just as in Example 4. We consider a numerical example where there is considerable sparsity. For this let X1 ∈ Rn×l be formed by taking the second through l-th columns of the (l + 1)-dimensional Helmert matrix, repeating each row m times and then normalizing. So n = m(l + 1) and the columns of X1 are orthonormal and orthogonal to 1. It is supposed that the first l1 ≤ l of the variables giving rise to the columns of X1 have βi 6= 0 whereas the last l − l1 have βi = 0 and that the variables corresponding to the first l2 ≤ k − l columns of X2 = X1 B ∈ Rn×(k−l) have βi 6= 0 whereas the last k − l − l2 have βi = 0. The matrix B is obtained by generating   B1 0 B= 0 B2 i.i.d. where B1 = (z1 /||z1 || · · · zl2 /||zl2 ||) with z1 , . . . , zl2 ∼ Nl1 (0, I) independent of B2 = (zl2 +1 /||zl2 +1 || · · · zk−l−l2 /||zlk−l−l2 ||) with zl2 +1 , . . . , zk−l−l2 i.i.d. Nl−l (0, I). Note that this ensures that the columns of X2 are all standardized. Furthermore, since it is assumed that the last l −l1 variables of X1 and the last k −l −l2 variables of X2 don’t have an effect, the form of B is necessarily of the diagonal form given. For, if it was allowed that the last k − l − l2 columns of X2 were 21 k = 10 True Positive True Negative Total k = 20 True Positive True Negative Total k = 50 True Positive True Negative Total k = 100 True Positive True Negative Total Classified Positive 5 1 6 Classified Positive 7 0 7 Classified Positive 7 0 7 Classified Positive 7 0 7 Classified Negative 0 4 4 Classified Negative 0 13 13 Classified Negative 0 43 43 Classified Negative 0 93 93 Total 5 5 10 Total 7 13 20 Total 7 43 50 Total 7 93 100 Table 7: Confusion matrices for the numerical example in Example 5. linearly dependent on the the first l1 columns of X1 , then this would induce a dependence on the corresponding variables and this is not the intention in the simulation. Similarly, if the first l2 columns of X2 were dependent on the last l − l1 columns of X1 , then this would imply that the variables associated with these columns of X1 have an effect and this is not the intention. The sampling model is then prescribed by setting l = 10, l1 = 5, l2 = 2, with βi = 4 for i = 1, . . . , 5, 11, 12 with the remaining βi = 0, σ 2 = 1, m = 2, so n = 22 and we consider various values of k ≥ l. It is is to be noted that a different data set was generated for each value of k. The prior is specified as in Example 4 where the values λ20 = 4, α1 = 11, α2 = 12 were chosen so that there will be no prior-data conflict arising with the generated data. Also, we considered several values for the discretization parameter δ. A hypothesis was classified as true if the relative belief ratio is greater than 1 and classified as false if it is less than 1. Table 7 gives the confusion matrices with δ = 0.1. The value δ = 0.5 was also considered but there was no change in the results. One fact stands out immediately, namely, in all of these example only one misclassification was made and this was in the full rank (k = 10) case where one hypothesis which was true was classified as a positive. The effect sizes that exist are reasonably large, and so it can’t be expected that the same performance will arise with much smaller effect sizes, but it is clear that the approach is robust to the number of hypotheses considered. It should also be noted, however, that the amount of data is relatively small and the success of the procedure will only improve as this increases. This result can, in part, be attributed to the fact that a logically sound measure of evidence is being used.  22 5 Conclusions An approach to the problem of multiple testing has been developed based on the relative belief ratio. It is argued in Evans (2015) that the relative belief ratio is a valid measure of evidence as it measures change in belief as opposed to belief and, among the many possible candidates for such a measure, it is the simplest with the best properties. One can expect that statistical procedures based on valid measures of evidence will perform better than procedures that aren’t as they possess a sounder logical basis. For the multiple testing problem this is reflected in the increased flexibility as well as in the results. It seems that an appropriate measure of evidence in a statistical problem requires the specification of a prior. While this may be controversial to some, it is to be noted that there are tools for dealing with the subjective nature of some of the ingredients to a statistical analysis such as the sampling model and prior. In particular, there is the process of checking for prior-data conflict after the data is obtained and possibly modifying the prior based upon the idea of weak informativity when such a conflict is encountered. Before the data is actually collected, one can measure to what extent a particular prior will bias the results based upon the particular measure of evidence used. If bias is encountered several mitigating steps can be taken but primarily this will require increasing the amount of data collected. These concepts play a key role in the multiple testing problem. Acknowledgements Thanks to Professor Lei Sun for making her notes on multiple testing available. Bibliography Baskurt, Z. and Evans, M. (2013) Hypothesis assessment and inequalities for Bayes factors and relative belief ratios. Bayesian Analysis, 8, 3, 569-590. Cao, Y., Evans, M. and Guttman, I. (2014) Bayesian factor analysis via concentration. Current Trends in Bayesian Methodology with Applications, edited by S. K. Upadhyay, U. Singh, D. K. Dey and A. Loganathan. CRC Press. Carvalho, C. M., Polson, N. G. and Scott, J. G. (2009) Handling sparsity via the horseshoe. Journal of Machine Learning Research W&CP 5: 73-80. Efron, B., Hastie, T, Johnstone, I., and Tibshirani, R. (2006) Least angle regression. The Annals of Statistics, 32, 407-499. Evans, M. (1997) Bayesian inference procedures derived via the concept of relative surprise. Communications in Statistics, 26, 1125-1143. Evans , M. (2015) Measuring Statistical Evidence Using Relative Belief. Monographs on Statistics and Applied Probability 144, CRC Press. Evans, M. and Jang, G. H. (2011a) A limit result for the prior predictive. Statistics and Probability Letters, 81, 1034-1038. 23 Evans, M. and Jang, G. H. (2011b) Weak informativity and the information in one prior relative to another. Statistical Science, 26, 3, 423-439. Evans, M. and Moshonov, H. (2006) Checking for prior-data conflict. Bayesian Analysis, 1, 4, 893-914. George, E. I. and McCulloch, R. E. (1993). Variable selection via Gibbs sampling. Journal of the American Statistical Association, 88,881-889. George, E. I. and McCulloch, R. E. (1997). Approaches for Bayesian variable selection. Statistica Sinica, 7(2), 339–373. Hastie, T., Tibshirani, R. and Martin Wainwright, M. (2015) Statistical Learning with Sparsity: The Lasso and Generalizations. Monographs on Statistics and Applied Probability 143, CRC Press. Park, R. and Casella, G. (2008) The Bayesian Lasso. Journal of the American Statistical Association, 103, 681-686. Rockova, V. and George, E. I. EMVS: The EM approach to Bayesian variable selection. Journal of the American Statistical Association, 109, 506, 828 - 846. Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society B., 58, 1, 267-288. Appendix Proof of Lemma 4: Let ∆(i) be the event that exactly i of A1 , . . . , Ak ∈ F occur, so that ∪ki=1 Ai = ∪ki=1 ∆(i) and note that the ∆(i) are mutually disjoint. When l < k, Sl,k = X IAi1 ∪···∪Ail {i1 ,...,il }⊂{1,...,k}  X l−1 k−1 X k  i k = I∆(k−i) + − I∆(k−i) l i=0 l l i=l   k−1 k−1 X i k X I∆(k−i) I∆(k−i) − = l l i=0 i=l and Sk,k = IA1 ∪···∪Ak . Now consider 1  k X l {i1 ,...,il }⊂{1,...,k} IAi1 ∪···∪Ail −  k −1 Sl,k l 1 −  k −1 Sl,k l−1 X which equals IAi1 ∪···∪Ail−1  k l−1 {i1 ,...,il−1 }⊂{1,...,k} (19) Pk−1 If l = k, then (19) equals IA1 ∪···∪Ak − i=0 I∆(k−i) + I∆(1) = IA1 ∪···∪Ak −  Pk−2 k −1 I∆(k−l+1) + i=0 I∆(k−i) which is nonnegative. If l < k, then (19) equals l−1   Pk−1 i  k −1 i k −1 − l l ]I∆(k−i) which is nonnegative since an easy calcui=l [ l−1 l−1 lation gives that each term in the second sum is nonnegative. The expectation of (19) is then nonnegative and this establishes the result. 24
10math.ST
1 Message passing-based joint CFO and channel estimation in millimeter wave systems with one-bit ADCs arXiv:1803.09012v1 [cs.IT] 23 Mar 2018 Nitin Jonathan Myers, Student Member, IEEE, and Robert W. Heath Jr., Fellow, IEEE. Abstract Channel estimation at millimeter wave (mmWave) is challenging when large antenna arrays are used. Prior work has leveraged the sparse nature of mmWave channels via compressed sensing based algorithms for channel estimation. Most of these algorithms, though, assume perfect synchronization and are vulnerable to phase errors that arise due to carrier frequency offset (CFO) and phase noise. Recently sparsity-aware, non-coherent beamforming algorithms that are robust to phase errors were proposed for narrowband phased array systems with full resolution analog-to-digital converters (ADCs). Such energy based algorithms, however, are not robust to heavy quantization at the receiver. In this paper, we develop a joint CFO and wideband channel estimation algorithm that is scalable across different mmWave architectures. Our method exploits the sparsity of mmWave MIMO channel in the angle-delay domain, in addition to compressibility of the phase error vector. We formulate the joint estimation as a sparse bilinear optimization problem and then use message passing for recovery. We also give an efficient implementation of a generalized bilinear message passing algorithm for the joint estimation in mmWave systems with one-bit ADCs. Simulation results show that our method is able to recover the CFO and the channel compressively, even in the presence of phase noise. Index Terms Millimeter wave communication, wideband channel estimation, synchronization, compressed sensing, message passing, one-bit receivers N. J. Myers ([email protected]) and R. W. Heath Jr. ([email protected]) are with the Wireless Networking and Communications Group, The University of Texas at Austin, Austin, TX 78712 USA. This material is based upon work supported in part by the National Science Foundation under Grant No. NSF-CCF-1527079, and by a gift from Huawei Technologies, Inc. 2 I. I NTRODUCTION Millimeter wave communication introduces new challenges in the design of MIMO communication systems [1]. For instance, large antenna arrays at the transmitter (TX) and the receiver (RX) are necessary to meet the link budget requirements [2]. As a result, the channel has a higher dimension compared to what is typical in lower frequency MIMO systems, and must be estimated more frequently thanks to the smaller coherence time [3]. Furthermore, cost and power consumption are major issues at the larger bandwidths that accompany mmWave, primarily due to high resolution ADCs [4]. Typical mmWave hardwares that limit power consumption at large bandwidths introduce compression in the channel measurements. For example, the one-bit ADC architecture [4] allows access to the output of every antenna at the expense of heavy quantization. The compression of channel measurements and the use of large antenna arrays complicate signal processing at mmWave. Compressed sensing (CS) [5] [6] is an efficient technique to recover sparse high-dimensional signals with few projections. As MIMO channel matrices at mmWave are sufficiently sparse when expressed in an appropriate dictionary, applying tools from CS to mmWave channel estimation can potentially reduce the training overhead. CS-based sparse channel estimation algorithms have been proposed for various hardware architectures [7]–[9]. Recent developments in approximate message passing [10] [11] have enabled channel estimation algorithms in low resolution receivers [12]. Most CS-based channel estimation algorithms, however, assume perfect synchronization and fail in practice because of the CFO and phase noise [13]. CFO and phase noise are hardware impairments that corrupt the phase of the channel measurements. The mismatch between the carrier frequencies of the local oscillators at the TX and the RX results in CFO. Phase noise in the system arises due to short-term random fluctuations in the frequency of the oscillators. Both these non-idealities are larger at mmWave due to the high carrier frequency and ignoring them can result in significant channel estimation error [14]. Correcting for the CFO and then performing channel estimation seems like a possible solution. The disadvantage, however, is that prior to beamforming or channel estimation, mmWave systems operate at very low SNR, which can result in significant error in the CFO estimate. Prior work has considered joint CFO and channel estimation [15] [16] in lower frequency systems. These joint estimation algorithms, however, cannot be applied to typical mmWave systems due to differences in the hardware architectures. Furthermore, they are not designed to incorporate the 3 sparse nature of mmWave channels. Therefore, there is a need to design either phase error robust channel estimation algorithms, or joint CFO and channel estimation algorithms that can exploit the sparsity of mmWave channel. Recent work on phase error robust channel estimation is limited to narrowband systems and has focussed on specific mmWave hardware. In [13], [17] and [18], phase error robust compressive beamforming algorithms were proposed for the analog beamforming architecture. In [13], phase tracking followed by phase error compensated compressive beamforming was proposed. The compensation, however, was done prior beamforming and therefore suffers from low SNR. The non-coherent algorithms in [17] and [18] are not robust to heavy quantization at the receiver. These algorithms cannot be used in one-bit receivers because the energy information of the channel measurements is completely lost due to one-bit quantization. Recent joint CFO and sparse narrowband channel estimation algorithms in [14] and [19] require high computational complexity when extended to wideband systems. In [14], we proposed a joint CFO and narrowband channel estimation algorithm using third-order tensors [20]. We also developed a sparsity-aware joint estimation algorithm for the one-bit ADC architecture in [19]. The main idea underlying our approach in [19] was to use the lifting technique [21] along with message passing for the joint estimation with one-bit channel measurements. Extending the narrowband solutions in [14] or [19] to typical wideband mmWave systems would require convex optimization over millions of variables, which may be prohibitive in a practical setting. In this paper, we propose a sparse bilinear formulation of the joint CFO and wideband channel estimation problem, and solve it using message passing. We assume that all the RF chains at the TX or the RX are driven by the same reference oscillator. Hence, there is a unique CFO and a phase noise process in our MIMO system model, that corrupt the channel measurements. We also assume that there is perfect frame timing synchronization between the TX and the RX. We summarize the main contributions of our work as follows. • We formulate the joint CFO and wideband channel estimation problem as a noisy quantized sparse bilinear optimization problem. Our framework leverages the sparse nature of the wideband channel in the angle and delay domains, and also exploits the compressibility of the phase error vector in the frequency domain. • To solve the non-convex problem at hand, we use the vector variance version of the Parametric Bilinear Generalized Approximate Message Passing (PBiGAMP) algorithm [22] and optimize 4 it for fast joint estimation. The parameters of the sparse priors corresponding to the wideband channel and the phase error vector are learned using an Expectation Maximization (EM) algorithm. • We provide insights into the design of training matrices for joint CFO and channel estimation using PBiGAMP. Specifically, we show that shifted Zadoff-Chu training proposed in [12] to accelerate message passing cannot be used for joint estimation as it results in a continuum of optimal solutions for the bilinear optimization problem. We explain the “CFO propagation effect” to highlight the trade-off between fast message passing and identifiability in the sparse bilinear problem. • We evaluate the performance of our joint estimation algorithm assuming a digital receiver architecture with one-bit ADCs and compare it with the hypothetical full resolution case. Simulation results show that the proposed approach is able to recover both the channel and the CFO compressively with IID Gaussian and IID QPSK training matrices, even in the presence of phase noise uncertainity. Our algorithm is advantageous over the existing sparsity-aware methods for joint estimation or phase error robust channel estimation in terms of the capability to efficiently handle frequency selective channels and scalability to other mmWave architectures. Notation: A is a matrix, a is a column vector and a, A denote scalars. Using this notation AT , A and A∗ represent the transpose, conjugate and conjugate transpose of A. The matrices |A| and |A|2 contain the element-wise magnitude and squared magnitude of the entries of A. We use A(i) and A(j) to denote the ith row and j th column of A. We use diag (a) to denote a diagonal matrix with entries of a on its diagonal. The scalar am denotes the mth element of a. The symbol ⊗ is used to denote the kronecker product. vec (A) is a vector obtained by stacking all the columns of A and vecm (A) denotes the mth element of vec (A). We define  Ai,j = veci A(j) . We use IN to denote the set {1, 2, 3, ..N }. The matrix UN ∈ CN ×N denotes the unitary discrete Fourier transform matrix. N (m, R) is the probability density function of complex Gaussian random vector with mean m and covariance R. We define e`,N ∈ RN ×1 as the N dimensional canonical basis vector with its `th coordinate as 1. 5 II. S YSTEM AND C HANNEL M ODELS In this section, we describe the underlying hardware architecture, CFO and phase noise model, and the wideband mmWave channel model used for our simulations. In particular, we focus on the digital receiver architecture with one-bit ADCs, to highlight the differences with the existing noncoherent algorithms. Nevertheless, our algorithm can be extended to other mmWave architectures as the underlying joint estimation problem is bilinear in nature. A. System Model RF Re() Im() Transmitter Ntx RF Block H ADC Digital Baseband Processing Nrx RF Re() Im() f1 q bit q bit ADC f2 Fig. 1. A MIMO system with local oscillators operating at f1 and f2 , and q-bit ADCs at the receiver. Each antenna is associated with an RF chain and a pair of q-bit ADCs. In this work, we consider the extreme cases of q = 1 and q = ∞. We consider a MIMO system with uniform linear array of Ntx antennas at the TX and Nrx antennas at the RX, as shown in Fig. 1. We use linear arrays for a concise representation of the simplifications involved in PBiGAMP; our framework can be extended to other array geometries using appropriate array response vectors in the formulation. We do not impose constraints on the number of RF chains or the resolution of the digital-to-analog converters (DACs) at the TX. The resolution of the Nrx ADCs at the RX, however, is assumed to be limited. The baseband signal at the TX is upconverted to the mmWave band, using a local oscillator at a carrier frequency f1 . The transmitted RF signal propagates through the wireless channel and is downconverted at the RX using a carrier frequency f2 , that slightly differs from f1 . Although the MIMO system can have multiple RF chains, we assume that all the RF chains at a given end are driven by the same reference oscillator. Even if the RF chains at a given end were driven by different 6 oscillators, achieving carrier synchronization locally is feasible [23]. After downconversion at the RX, the output at each antenna is sampled using a pair of q bit ADCs, one each for the in-phase and the quadrature phase components. We use Qq (.) to represent the q bit quantization function corresponding to the ADCs. In this work, we consider the extreme case of q = 1 and provide a performance comparison relative to q = ∞. The quantization functions for the two cases are Q1 (x) = sign (real (x)) + j sign (imag (x)) and Q∞ (x) = x. Note that the functions sign (·) , real (·) and imag (·) are applied element-wise on the vector. The impact of CFO on channel estimation algorithms is more significant in one-bit receivers than the full resolution ones. The mismatch in the carrier frequencies, i.e., |f2 − f1 | is typically in the order of several parts per millions (ppms) of f1 or f2 . Due to the high carrier frequencies at mmWave, even such small differences can significantly perturb the channel estimate when ignored [13]. For a symbol duration of T seconds, we define the digital domain CFO as  = 2π (f1 − f2 ) T . CFO results in unknown phase errors in the received samples that linearly increase with time. Hence, the impact of CFO on standard channel estimation algorithms is determined by the length of training. As one-bit receivers relatively need a longer training for channel estimation when compared to the full resolution ones, channel estimation algorithms that ignore phase errors are more vulnerable to the CFO in one-bit systems than the full resolution ones. Phase noise in wireless systems arises due to jitter in the frequency of the oscillators. For 2 2 a phase noise variance of βtx at the TX and βrx at the RX, the phase noise variance in the 2 2 received samples can be approximated as β 2 = βrx + βtx . The approximation is valid when the 3 dB bandwidth of the phase noise power spectral density is significantly smaller than the channel coherence bandwidth [24]. Let φk denote the phase error introduced in the k th received sample, due to phase noise at the TX and the RX. As is common in prior work, we model the phase errors using a Wiener process [25] in which the increments, i.e., φk − φk−1 , are IID Gaussian random variables with zero mean and variance β 2 . As β 2 is proportional to f12 [13], phase noise is higher at mmWave carrier frequencies for a given quality of oscillator. Now, we describe the received signal model in the digital receiver architecture. Let t [n] ∈ CNtx ×1 be the nth transmit symbol satisfying the power constraint E [t∗ [n] t [n]] = P . The discrete time baseband representation of the MIMO channel is assumed to be limited to L taps. Let H [`] ∈ CNrx ×Ntx be the `th tap of the equivalent baseband channel, where ` ∈ {0, 1, 2, ..., L − 1}. We assume that perfect frame timing synchronization can be achieved using the control channel. Our assumption can be justified in situations where the mmWave system 7 co-exists with a lower frequency system [26] that can perform timing synchronization. Frequency synchronization, however, may not be achieved due to different offsets and phase noise processes for each of these systems. With the timing synchronization assumption, the sampled baseband vector in the nth symbol duration can be given by Y(n) = Qq ej(n+φn ) L−1 X ! H [`] t [n − `] + V(n) , (1) `=0 2 where V(n) ∼ N (0, σ INrx ) is additive white Gaussian noise. In this work, we develop an algorithm to estimate  and {H [`]}L−1 `=0 from the series of observations Y(n) . Our joint estimation algorithm can be extended to any q-bit ADC architecture by defining appropriate output likelihood functions in message passing. B. Channel Model We consider a clustered channel model for the frequency selective mmWave MIMO channel. The channel consists of Ncs clusters with Mn rays in the nth cluster. Let γn,m , τn,m , θr,n,m and θt,n,m denote the complex gain, delay, angle-of-arrival (AoA) and angle-of-departure (AoD) of the mth ray in the nth cluster. We assume that the transmitted signal is bandlimited to 1/T Hz. With ωr,n,m = π sin θr,n,m , ωt,n,m = π sin θt,n,m and the Vandermonde vector  T aN (∆) = 1 , ej∆ , ej2∆ , · · · , ej(N −1)∆ , (2) the `th tap of the wideband MIMO channel for a half wavelength spaced uniform linear array is given by Ncs X Mn X τn,m  . H [`] = γn,m aNrx (ωr,n,m ) aNtx (ωt,n,m ) sinc ` − T n=1 m=1 ∗  (3) The wideband channel can be represented using Nrx Ntx L complex entries, and the matrix in (3) is large in typical mmWave systems. The channel impulse response in (3) is represented using a linear combination of bandlimited sinc(·) functions. Notice that each of these sinc(·) functions is delayed by the normalized delay spread, i.e, τn,m /T and evaluated at periodic time instants to obtain the discrete time representation in (3). Other filtering functions could also be used to incorporate the effect of pulse shaping at the TX or filtering at the RX [27]. The mmWave MIMO channel is aproximately sparse in an appropriate dictionary due to the propagation characteristics of the environment at mmWave frequencies. Compared to the lower frequency channels, mmWave channels comprise of fewer clusters [4]. Each of the channel taps 8 H [`], is approximately sparse in the spatial Fourier basis at mmWave [12]. Furthermore, the channel is approximately sparse along the time dimension as the delays of the propagation rays are heavily clustered within the delay spread. As the delays τn,m may not necessarily be an integer multiple of T , there is a leakage effect along the time dimension. Let C [`] ∈ CNrx ×Ntx be the 2-D Fourier transform of H [`], such that H [`] = UNrx C [`] U∗Ntx , ∀` ∈ {0, 1, 2, ..., L − 1} . (4) The approximate sparsity of the mmWave MIMO channel along the angle and delay domains [28] is directly reflected in the matrices {C [`]}L−1 `=0 . A higher resolution dictionary can be used for the angle and delay dimensions to increase sparsity of the mmWave channel at the expense of higher dimensionality and higher frame coherence [29]. Our GAMP based approach will be robust to leakage effects that arise due to approximate sparsity. III. D EMYSTIFYING JOINT CFO AND CHANNEL ESTIMATION AT MM WAVE In this section, we propose a sparse bilinear formulation for the joint estimation problem. We also identify existing techniques to solve the problem and describe their limitations in terms of scalability to other mmWave architectures and computational complexity. A. Bilinear formulation We derive a compact form for the received signal model in (1) for a SC-FDE system [3]. Let T ∈ CNtx ×Np be a training block of length Np such that T(k) = t [k]. The TX transmits a training   sequence with a cyclic prefix of length L − 1, i.e., T(Np −L+2) , T(Np −L+3) , ..., T(Np ) , T . The cyclic prefix padded transmission gets convolved with the frequency selective MIMO channel before sampling at the receiver. As usual, the first L − 1 samples of the received block that experience interference from the previous transmit block are discarded [3]. Let Y ∈ CNrx ×Np be the received block obtained after discarding the first L − 1 received vectors. We define an ` circulant delay matrix J` ∈ CNp ×Np , such that its first column is the canonical basis vector e1+`,Np . We define a vector d (, β) ∈ CNp ×1 such that its nth entry has the phase error corresponding to the received vector Y(n) , i.e., dn (, β) = ej(n+φn ) . Note that β is the standard deviation of the incremental phase errors in the Wiener phase noise process. The received samples corresponding to the transmit block defined by T can be expressed using (1) as ! L−1 X Y = Qq H [`] TJ` diag (d (, β)) + V . `=0 (5) 9 The phase errors in (5) are invariant along any column of the unquantized received block as there is a unique CFO and a phase noise process in the system. The representation in (5) can be further simplified to capture the structure in the phase errors and the channel. We exploit the structure in the joint estimation problem using sparsity of the channel and the phase error vector in appropriate dictionaries. A compact representation of (5) can be obtained by following the same steps in [12], except for the diagonal matrix containing the phase errors. We use b to denote the DFT of the phase error vector d (, β). With Z used to denote the noiseless unquantized version of Y in (5) such that Y = Qq (Z + V), we have Z= L−1 X H [`] TJ` diag (d (, β)) `=0 = L−1 X UNrx C [`] U∗Ntx TJ` diag   U∗Np b `=0  U∗Ntx TJ0   U∗ TJ 1  Ntx = UNrx [C [0] C [1] C [2] . . . C [L − 1]]  . .. {z } |  ∆ =C U∗Ntx TJL−1 | {z ∆        diag U∗Np b .   (6) } =F Nrx ×Ntx L The matrix C ∈ C is just a concatenation of the angle domain representation in (4) corresponding to each tap of the MIMO channel and is approximately sparse. Furthermore, the vector b, i.e., the DFT of d (, β) can be considered to be approximately sparse. The sparse representation of the phase error vector is valid in practice as the spread of the oscillator’s spectrum about the center frequency is relatively small compared to the bandwidth of the signal. Now, we derive a sparse bilinear formulation for the joint estimation problem. Using (6), the quantized received block Y in (5) can be expressed as     Y = Qq UNrx CFdiag U∗Np b + V . (7) We define the Np Nrx ×1 vectors y = vec (Y), z = vec (Z) and v = vec (V), and the Nrx Ntx L×1 vector c = vec (C). In vector notation, (6) can be written as   z = diag U∗Np b ⊗ aNrx (0) vec (UNrx CF) . (8) 10 Notice that aNrx (0) is just the all ones vector in Nrx dimension. Using the property vec (PQR) =  RT ⊗ P vec (Q), the received vector y is expressed as      (9) y = Qq diag U∗Np b ⊗ aNrx (0) FT ⊗ UNrx c + v . We define the matrices G = U∗Np ⊗ aNrx (0) and A = (F ⊗ UNrx )T to rewrite (9) as y = Qq (diag (Gb) Ac + v) . (10) Estimating the phase errors and the channel is equivalent to estimating b and c from y in (10). The joint estimation problem in (10) can be observed to be a noisy quantized bilinear problem in b and c, subject to the sparsity of b and c. B. Limitations of existing techniques 1) CFO robust methods: Existing sparse channel estimation methods that are robust to CFO discard the phase of the channel measurements. A hashing technique based non-coherent beam alignment algorithm was proposed in [17] for analog beamforming systems. This method, however, assumes fine control over the phase shifters, which is not necessarily the case with mmWave systems. The received signal strength (RSS) based method in [18] accounts for the limited phase control and uses pseudo-random phase shifts for compressive beam-training. The solutions in [17] and [18] assume a narrowband mmWave system and perform beam-alignment with just the magnitude of the channel measurements. These methods, however, cannot be used in one-bit receivers as energy detection with undithered one-bit ADCs is not feasible unless additional circuit components are used. For example, Q1 (r) and Q1 (α r) are the same for any α > 0. As the only information provided by undithered one-bit ADCs is phase quantized to 4 levels, discarding it due to phase errors leaves no information. 2) Joint estimation using lifting: Lifting [21] [30] is a convex relaxation technique that transforms a bilinear problem to a higher dimensional one and then recovers the original vectors by solving the higher dimensional problem. We describe the lifting technique applied to the joint estimation problem in (10). With M denoting the number of entries in y or z, i.e., M = Nrx Np , the mth entry of z can be given as zm = vecm (diag (Gb) Ac) = G(m) bA(m) c (11) (12) 11 T = G(m) bcT A(m) (13)   ∀m ∈ IM . (14) = A(m) ⊗ G(m) vec bcT ,  We define a lifted variable x = vec bcT and a measurement matrix Φ ∈ CM ×Np Nrx Ntx L , such that Φ(m) = A(m) ⊗ G(m) . Hence, the quantized measurements in (10) can be expressed as y = Qq (Φx + n) . (15) The lifted vector x in (15) is sparse as it is just an outer product [20] of the sparse vectors b and c. Several CS-based algorithms [6] [31] can be used to recover x from the possibly underdetermined noisy quantized system in (15). Using the SVD of the higher dimensional matrix estimate, the vectors in the bilinear problem can be estimated upto a scale factor. Lifting followed by the SVD was applied to joint CFO and narrowband channel estimation for one-bit receivers in our previous work [19]. The main issue in extending our method in [19] to wideband systems arises due to the large dimensionality of the lifted problem. For instance, the dimension of x to perform joint CFO and channel estimation in wideband systems would be Nrx Ntx Np L. Using lifting necessarily implies solving for millions of variables for typical wideband mmWave systems, due to the large number of antennas and the need for additional pilots to compensate for the heavy quantization in low resolution systems. The limitations of the existing phase error robust and joint estimation solutions in terms of architectural scalability and computational complexity, motivate the need to develop new low complexity joint estimation algorithms that can be applied to wideband systems and low resolution receivers. IV. M ESSAGE PASSING BASED JOINT CFO AND CHANNEL ESTIMATION In this section, we give a brief introduction to PBiGAMP [22] and discuss its application to the joint estimation in (10). We exploit the inherent structure in our problem to derive a low complexity and memory efficient implementation of PBiGAMP for the joint estimation. Furthermore, we explain the CFO propagation effect induced by special training matrices that prevents further reduction in the computational complexity. A. Introduction to PBiGAMP The joint estimation problem in (10) can be solved using PBiGAMP [22] by considering b, c, z and y of (8) and (10) as realizations of random vectors, say b, c, z and y. Let bi , ck , zm and 12 ym be the elements of these random vectors. In general, deriving the closed form Minimum Mean-Squared Error (MMSE) estimates [32] of b and c is difficult as it requires marginalizing the joint PDF of b and c conditioned on y = y. Using ideas from message passing, PBiGAMP can obtain the MMSE estimates of both the vectors in the bilinear problem. We explain message passing using the factor graph [33] in Fig. 2, that shows the dependency between y, the random variables (b, c) and their prior distributions. The circular nodes in the factor graph are called as variable nodes as they represent the random variables. The rectangular nodes in the factor graph are called as factor nodes and they contain the prior distribution of a random variable or the likelihood function associated with an observation. The messages in message passing are essentially probability distributions, also called as beliefs. The idea underlying message passing is to perform belief flows iteratively between the factors and the variables until all the variable nodes reach a consensus on their marginal probability distributions. As the factor graph for joint estimation is strongly connected, standard message passing can be computationally intractable. Using ideas from Approximate Message Passing [10], PBiGAMP simplifies the messages by assuming a large number of variable nodes. Simulation results in [22] that show that PBiGAMP outperforms lifting techniques in Section III-B2, for IID Gaussian measurement matrices, motivate applying it to our problem. Furthermore, PBiGAMP performs optimization over the same number of variables in the problem, unlike lifting [21] that solves the problem in a higher dimensional space. For the joint estimation problem in typical wideband mmWave systems, PBiGAMP is memory efficient over lifting by several orders of magnitude. B. PBiGAMP for joint estimation In this section, we explicitly state PBiGAMP [22] for joint estimation in (10) and describe the information contained in the factor nodes of Fig. 2. To be consistent with the notation used in [22], we rewrite the random variable dependency corresponding to (11) in the tensor notation as zm = Nb X Nc X (i,k) zm bi ck , (16) i=1 k=1 (i,k) where Nb = Np , Nc = Nrx Ntx L, and zm is an element of a third order tensor given by (i,k) zm = Gm,i Am,k . (17) 13 Messages Likelihood functions Messages Channel variables Priors Priors Synchronization variables Fig. 2. The factor graph of bilinear message passing for joint CFO and channel estimation. The rectangular nodes, called as factors, contain the likelihood functions corresponding to the received samples or the sparse priors. Messages are sent between the factor nodes and the variable nodes until the marginal probability distributions of the variables converge. The output likelihood function in Fig. 2, denoted by pym |zm (ym | z) is given by  √  √   2sign(Re{ym })Re{z} 2sign(Im{ym })Im{z} F F q=1 σ σ pym |zm (ym | z) = , ky −zk2   1 2 e− mσ2 q=∞ πσ (18) where F (·) is the cumulative distribution function of the standard normal distribution. The sparsity of the vectors b and c is incorporated by assuming parametrized Bernoulli-Gaussian distributions for their priors pb (b) and pc (c). For simplicity, it is assumed that each entry of b is independent of the other and identically distributed as pb . Similarly, the entries of c are assumed to be IID, with pc as the distribution. Furthermore, the vectors b and c are assumed to be independent of each other. Let λb and λc denote the sparsity fraction of b and c. Let σb2 and σc2 be the variances of the coefficients corresponding to the non-zero support of the vectors b and c. With δ (x) used to represent the Dirac-delta function, the Bernoulli-Gaussian distributions pb and pc can be given as pb (x) = λb δ (x) + (1 − λb ) N (0, σb2 ), (19) pc (x) = λc δ (x) + (1 − λc ) N (0, σc2 ). (20) 14 Definitions:  pzm |pm z | pb; ν p , pck |rk(c | rb; ν r ) , (b | qb; ν q ) , pbi |qi pym |zm(ym | z) N (z;b p,ν p ) pym |zm(ym | z 0 ) N (z 0 ;b p,ν p ) r ,ν r ) R pc(c) N (c;b 0 0 r ,ν r ) c0 pc(c ) N (c ;b q ,ν q ) R pb(b) N (b;b 0 0 q ,ν q ) b0 pb(b ) N (b ;b (D1) R z0 (D2) (D3) Initializations: ∀m : sbm (0) = 0 ∀i, k : choose b bi (1), ν b (1), b ck (1), ν c (1) i (I1) (I2) k for t = 1, . . . Tmax (i,∗) ∀m, i : zbm (i,k) b ck (t) k=1 zm P Nb b (i,k) = i=1 bi (t)zm P Nb b (i,∗) bi (t)b zm (t) = i=1 (t) = ∀m, k : (∗,k) zbm (t) ∀m : (∗,∗) zbm (t) ∀m : ν pm (t) = P Nc (R1) (R2) or (∗,k) ck (t)b zm (t) k=1 b P Nc c (∗,k) zm (t)|2 k=1 νk (t)|b P Nc (i,∗) P Nb b zm (t)|2 + i=1 νi (t)|b P Nb b P Nc c (i,k) p p ∀m : νm (t) = ν m (t) + i=1 νi (t) k=1 νk (t)|zm |2 ∀m : (∗,∗) pbm (t) = zbm (t) ∀m : z (t) = var{z νm m − sbm (t−1)ν pm (t) (R4) (R5) (R6) p | pm = pbm (t); νm (t)} (R7) p ∀m : zbm (t) = E{zm | pm = pbm (t); νm (t)} (R8) s (t) = (1 − ν z (t)/ν p (t))/ν p (t) ∀m : νm m m m (R9) p pbm (t))/νm (t) ∀m : sbm (t) = (b zm (t) − P −1 (∗,k) M s r zm (t)|2 ∀k : νk (t) = m=1 νm (t)|b P (∗,k) ∀k : rbk (t) = b ck (t) + νkr (t) M bm (t)b zm (t)∗ m=1 s P P Nb b (i,k) 2 M s (t) − νkr (t)b ck (t) m=1 νm | i=1 νi (t)|zm P −1 (i,∗) q M s ∀i : νi (t) = zm (t)|2 m=1 νm (t)|b P (i,∗) q M ∀i : qbi (t) = b bi (t) + νi (t) m=1 sbm (t)b zm (t)∗ P P (i,k) − ν q (t)b bi (t) M ν s (t) Nc ν c (t)|zm |2 m=1 i m k=1 k ∀k : νkc (t+1) = var{ck | rk = rbk (t); νkr (t)} if (R3) ∀k : b ck (t+1) = E{ck | rk = rbk (t); νkr (t)} ∀i : νib (t+1) = var{bi | qi = qbi (t); νiq (t)} ∀i : b bi (t+1) = E{bi | qi = qbi (t); νiq (t)} PM P (∗,∗) (∗,∗) (∗,∗) zm (t) − zbm (t−1)|2 ≤ τstop M zm (t)|2 , m=1 |b m=1 |b (R10) (R11) (R12) (R13) (R14) (R15) (R16) (R17) (R18) stop (R19) end b=b b (t) , b Output: b c=b c (t) . TABLE I T HE PB I GAMP A LGORITHM FROM [22] The parameters governing pb and pc , however, are not known apriori and can be learned by embedding PBiGAMP within the Expectation Maximization (EM) algorithm [11]. For a given set of likelihood functions and prior distributions, the vector variance PBiGAMP algorithm [22] to obtain the MMSE estimates of b and c in (10) is summarized in Table I. The channel and the phase error vector can be derived using appropriate transformations over the PBiGAMP estimates. The vector b c obtained from PBiGAMP is just an estimate of 15 the vectorized version of C, the angle-delay domain representation of the wideband channel in b ∈ CNrx ×Ntx L denote the angle-delay domain estimate of the wideband channel, such (7). Let C   b =b that vec C c. It can be seen from (6) that C is just a concatenation of the angle domain representation of all the L taps of the MIMO channel. Therefore, the `th tap of the antenna domain MIMO channel can be derived as h i b b b b H [`] = UNrx C(`Ntx +1) , C(`Ntx +2) , . . ., C(`Ntx +Ntx ) U∗ Ntx . (21) b derived from PBiGAMP is an estimate of the DFT of the phase error vector The vector b b is just a single tone frequency estimation problem. As the d (, β). Estimating the CFO from b phase noise is modelled as a Wiener process, we apply the Extended Kalman Filter (EKF) [34] b to estimate . over the time domain samples, i.e., U∗ b, Np In this work, we exploit the compressibility of the phase error vector in the DFT basis for joint estimation. It is possible, however, to incorporate the statistics of the phase noise by replacing the nodes corresponding to b in Fig. 2 with the phase error variables and adding factors corresponding to the phase noise process. In such case, the message passing algorithm must handle the non-linear dependence of z on the phase errors. C. PBiGAMP: From theory to practice As seen from Table I, the generic implementation of PBiGAMP is memory and computationally intensive, as it involves repeated operations over a third order tensor in (17). In this section, we provide insights into the key equations of Table I and describe our low complexity implementation for joint estimation. The equations in PBiGAMP are essentially determined by the belief flows from the factor nodes to the variable nodes, and vice versa. Without loss of generality, we describe the message flow between the variable node b1 and the factor node y1 in Fig. 2. In standard message passing, the message sent from a factor node to b1 essentially represents the PDF of b1 presumed by that factor node. In a fully connected factor graph, the node b1 receives messages from all the M factor nodes ({yi }M i=1 ) in addition to its prior distribution pb . As b1 receives several beliefs from different factors, the belief sent by b1 to y1 is just a normalized product of all the beliefs received by b1 except the one from y1 . For generic priors and likelihood functions in the factor graph, performing standard message passing can be difficult as the belief flows are flows of PDFs that are functions. 16 PBiGAMP simplifies standard message passing using the central limit theorem (CLT) and the Taylor series approximation. Notice that y1 receives beliefs from all its neighbouring variable nodes and contains the likelihood function in itself. The belief sent from y1 to b1 is computed by multiplying the likelihood function, with all the incoming beliefs to y1 except the one from b1 , and then integrating over all the random variables except b1 . The multiplication followed by integration essentially yields the PDF of b1 presumed by the factor node y1 . The integration is often multidimensional and can be difficult to compute. If y1 depends on a large number of independent variable nodes through a linear function, then the linear combination can be approximated as a Gaussian random variable using the CLT [10]. In such case, the variable nodes can send just the mean and variances of the PDFs to the factors and this information is sufficient to compute the mean and variance of the Gaussian random variable, as seen in (R3) and (R5) of Table I. The message sent from y1 to b1 can now be computed by multiplying the likelihood at y1 with the compound Gaussian PDF, and marginalizing the product with respect to b1 . In general, the likelihood function can be non-linear in nature and can yield a complicated PDF of b1 . Using a second order Taylor series expansion for the log PDF, PBiGAMP [10] simplifies the belief sent from y1 to b1 to a Gaussian whose mean and variance can be computed from (R7)-(R9) of Table I. For q-bit ADCs, the closed form expressions for the conditional mean and variance in (R7) and (R8) can be found in [35, Appendix A]. Unlike standard message passing, PBiGAMP is computationally tractable as the messages contain just the mean and variances of the PDFs. After several approximate message flows between the factor nodes and the variable nodes, PBiGAMP is expected to converge. The MMSE of b1 is computed as the expectation of the effective marginal, i.e., the normalized product of all the M Gaussian PDFs received by b1 from the factor nodes and the prior distribution on b1 . Notice that the normalization has to be done to ensure that the PDF integrates to 1. The expectation step for the MMSE of b1 is given in (R18) using (R11) and (R12) as the intermediate steps. Similarly, the expectation for the MMSE of c1 is given in (R16) using (R13) and (R14) as the intermediate steps. Thus, PBiGAMP provides estimates of the vectorized sparse channel and the DFT of the phase error vector. The generic implementation of PBiGAMP is computationally expensive primarily due to (R1), (R2), (R5), (R12) and (R14) in Table I. It can be verified that each of these operations have a  2 complexity of O Nrx Np2 Ntx L for a single PBiGAMP iteration to perform joint estimation. For (i,∗) instance, (R1) requires computing the scalar zbm (t) for every m ∈ IM and i ∈ INb , Therefore, 17 (R1) demands O(M Nb Nc ) computations, as each scalar computation requires Nc multiplications. As M = Nrx Np , Nb = Np and Nc = Nrx Ntx L for the joint estimation, (R1) has a complexity of  2 O Nrx Np2 Ntx L for every PBiGAMP iteration. By exploiting the structure in the joint estimation problem, the complexity of PBiGAMP can be significantly reduced. We describe our fast implementation of PBiGAMP for the joint estimation in the following b (t) ∈ CNp ×1 , C b (t) ∈ sub-sections. The tth iteration variables of PBiGAMP are defined as b b (t) ∈ CNrx ×Np , such that bbi (t) , b CNrx ×Ntx L and Z ck (t) and zbm (t) are the ith , k th and mth entries b (t) , vec(C(t)) b b of b and vec(Z(t)). 1) Operations (R1)-(R3): For an io ∈ INp , we have (io ,∗) zbm (t) = Nc X (io ,k) zm b ck (t) (22) k=1 = Nb X Nc X i ,Np (i,k) o zm ei b ck (t) (23) i=1 k=1   ∗ io ,Np b = vecm UNrx C(t)Fdiag(U e ) Np   ∗ b = vecm UNrx C(t)Fdiag(U ) , Np (i ) o (24) (25) where the compact form in (25) is obtained by going back from the tensor formulation to the original bilinear model in (6). Likewise, for a ko ∈ INc , we have (∗,ko ) zbm (t) = Nb X Nc X (i,k)b zm bi (t)ekko ,Nc (26) i=1 k=1   b = vecm UNrx ero ,Nrx (eco ,Ntx L )T Fdiag(U∗Np b(t))   b = vecm UNrx (ro ) F(co ) diag(U∗Np b(t)) , (27) (28) where (ro , co ) correspond to the row and column of the Nrx × Ntx L matrix version of eko ,Nc , with ko = (co − 1)Nrx + ro . (29)   (∗,∗) ∗ b b zbm (t) = vecm UNrx C(t)Fdiag(U b(t)) . Np (30) Similarly, (R3) can be computed as b To evaluate (30), the product C(t)F can be found using Nrx Ntx LNp computations. Using the b FFT over the resultant product, UNrx C(t)F can be computed with an additional complexity 18 of O(Np Nrx logNrx ). Finally, the complexity to multiply the resultant Nrx × Np matrix with b the IFFT of b(t) is O(Np logNp ) + Nrx Np . Therefore, the computational complexity of (30) is 2 O(Nrx Ntx Np L), unlike O(Nrx Np2 Ntx L) of the generic implementation using (R1)-(R3). (i,∗) 2) Operations (R4) , (R5): It can be noticed from (25) that zbm (t) is invariant with respect to i and is given by (i,∗) (t) zbm   1 b p vecm UNrx C(t)F . = Np (31) Using the invariance property in (31), a compact version of the first summand in (R4) can be expressed as Np X vib 2 (i,∗) zbm (t) PNp i=1 = Np i=1 vib  vecm 2 b UNrx C(t)F  . (32) For the second summand in (R4), it can be shown from (28) that     1 (∗,ko ) b zbm (t) = √ ⊗ aNrx (0) . vecm F(co ) diag U∗Np b(t) Nrx (33) (∗,k) Furthermore, as co denotes the column number corresponding to ko (see (29)), zbm (t) is invariant ∀k ∈ IaNrx \I(a−1)Nrx , where a ∈ INtx L . To use this invariance for efficient computation of the second summand in (R4), we define a row vector µc (t) ∈ R1×Ntx L containing the columnwise mean corresponding to Nrx × Ntx L matrix version of {vkc (t)}k∈INc as X 1 µcn (t) = vkc (t) . Nrx (34) k∈InNrx \I(n−1)Nrx With some algebraic manipulation, the second summand in (R4) can be simplified as    Nc X 2 2 c (∗,k) ∗ b c vk (t) zbm (t) = vecm µ (t) Fdiag(UNp b(t)) ⊗ aNrx (0) . (35) k=1 To simplify the computations involved in (R5), we expand the summand using (17) as Nb X Nc X vib (t)vkc (t) (i,k) 2 zm = Nb X Nc X i=1 k=1 (36) i=1 k=1 PNp = where (37) follows from (36) as |Gm,i | = vib (t)vkc (t) |Gm,i Am,k |2 √1 , Np i=1 N c vib (t) X Np 2 vkc (t) ATk,m , (37) k=1 ∀m, i. Besides, as AT = F⊗UNrx , the entries of AT are invariant within blocks of size Nrx ×Nrx . With arguments similar to the simplifications involved in the second summand of (R4), (R5) can be efficiently evaluated as PNp b Nb X Nc X    v (t) c (i,k) 2 b vi (t)vk (t) zm = i=1 i vecm µc (t) |F|2 ⊗ aNrx (0) . Np i=1 k=1 (38) 19 (∗,k) 2 3) Operations (R11) , (R13): From (33), it can be observed that zbm (t) is fixed for m ∈ IaNrx \ I(a−1)Nrx and k ∈ IbNrx \ I(b−1)Nrx , where a ∈ INp and b ∈ INtx L . The invariance of (∗,k) zbm (t) 2 with respect to m and k arise because of the kronecker product with aNrx (0) and the column invariance in (29). To exploit this property in computing vkr (t) of (R11), we construct a vector µz (t) ∈ RNp ×1 to contain the column-wise mean corresponding to the Nrx × Np matrix s version of {vm (t)}m∈INp Nrx , i.e., µzk (t) = 1 Nrx X s vm (t) . (39) m∈IkNrx \I(k−1)Nrx −1 With the above definitions, a simplified version of vjr (t) in (R11) can be given as    M X 2 s (∗,k) 2 ∗ b z vm (t) zbm Fdiag(UNp b) µ (t) ⊗ aNrx (0) . = veck (40) m=1 From (31), we rewrite (viq (t))−1 in (R13) as (viq (t))−1 = M X s vm vecm  2  b UNrx C(t)F m=1 s  = v vec 2 b UNrx C(t)F  , ∀i ∈ INp .   b b = Fdiag U∗ b(t) and consider the term in 4) Operations (R12) , (R14): We define F(t) Np the second summand of (R12) for k = ko . From (28) and (29), we have   M M X X (co ) (∗,ko ) ∗ b sbm (t)vecm UNrx (ro ) F(t) sbm (t)b zm (t) = . (41) m=1 m=1   b b ∈ CNrx ×Np defined such that sbm (t) = vecm S(t) , (41) can be expressed as, With S(t) M X (∗,ko ) sbm (t)b zm (t)∗ D E (co ) b b = S(t), UNrx (ro ) F(t) (42) m=1  ∗ ∗ b b (co ) = UNrx (ro ) S(t) F(t)   d∗ . b F(t) = vecko U∗Nrx S(t) The term in the third summand of (R12) can be given by PNp b Np M M X X X v (t) |Am,k |2 s b (i,k) 2 s vm (t) vi (t) zm = vm (t) i=1 i Np m=1 m=1 i=1 ! PNp b   i=1 vi (t) T 2 s veck A v . = Np (43) (44) 20 Once again exploiting invariance within AT , we efficiently compute the third summand in (R12) as M X s vm (t) m=1 Np X vib (t) (i,k) 2 zm PNp b i=1 vi (t) Np = i=1 ! veck    |F|2 µz (t) ⊗ aNrx (0) . (45) The term in the second summand of (R14) can be rewritten using (25) as M X D E (i,∗)∗ ∗ b b = S(t), ) . sbm (t)b zm UNrx C(t)Fdiag(U Np (i) (46) m=1 b For fast implementation of (46), we first compute the column wise inner product between S(t) b then perform a Fast Fourier Transform (FFT). We construct g ∈ CNp ×1 , and UNrx C(t)F and      b b . Hence, the second summand in (R14) simplifies such that gk = S(t) , UNrx C(t)F (k) (k) to M X  (i,∗)∗ sbm (t)b zm = veci UNp g . (47) m=1 The term in the third summand of (R14) can be expressed as M X Nc X s (i,k) vm (t)vkc (t) zm 2 = m=1 k=1 M X Nc X s vm (t)vkc (t) |Gm,i Am,k |2 m=1 k=1 Nc M X 1 X s 2 = vkc (t) ATk,m . vm (t) Np m=1 k=1 Using the compact form of M X Nc X (48) PNc k=1 vkc (t) ATk,m s (i,k) vm (t)vkc (t) zm m=1 k=1 2 = 2 (49) from (38), we rewrite (49) as M    1 X s vm (t)vecm µc (t) |F|2 ⊗ aNrx (0) . Np m=1 (50) Furthermore, exploiting the kroenecker product with aNrx (0), we have M X Nc X m=1 k=1 (i,k) s vm (t)vkc (t) zm 2 = Nrx c µ (t) |F|2 µz (t). Np (51) 5) Complexity of the simplified operations: Using the complexity of matrix multiplications and FFTs, the complexity of our simplifications is summarized in Table II. It can be noticed that the overall complexity of PBiGAMP using our implementation is O (Nrx Np Ntx L), thereby achieving a speedup factor of Np Nrx compared to the generic implementation. After all possible simplifications of PBiGAMP for joint estimation, training design is possibly the only frontier that can be exploited to further reduce the computational complexity. 21 Operation Complexity b (t) F UNrx C O (Nrx Ntx LNp ) b (t) U∗Np b O (Np logNp ) (R3), (R13) O (Nrx Np ) (R4), (R5), (R11) O (Ntx LNp ) (R12), (R14) O (Nrx Ntx LNp ) TABLE II C OMPLEXITY OF A SINGLE PB I GAMP ITERATION USING A FAST IMPLEMENTATION . D. Insights into training design In this section, we explain how a reasonable training solution that allows a low complexity implementation does not permit joint estimation. Structured training blocks that aid fast transforms can reduce the complexity of PBiGAMP operations involving multiplications with the training matrix. Furthermore, such blocks also occupy a lower memory footprint relative to unstructured ones of the same dimension. For example, training blocks that contain circulantly shifted rows of a fixed Zadoff-Chu (ZC) sequence were proposed in [12] for fast channel estimation using EM-GAMP. Similar to EM-GAMP algorithm, circulant training matrices also b aid fast matrix multiplications in PBiGAMP. For instance, the computation of C(t)F in Table II can be accelerated in every PBiGAMP iteration for the joint estimation. Shifted ZC training blocks, however, result in a continuum of optimal solutions for bilinear optimization problem. We illustrate the “CFO propagation effect” to show the trade-off between fast message passing and identifiability in the joint estimation problem. To explain the CFO propagation effect, we consider Np = Ntx L pilots and a circulant training matrix T as per [12], for a narrowband system, i.e., L = 1. Because T∗ is also circulant, the eigenvectors of T∗ are the columns of the DFT matrix UNtx . Let ΛT be a diagonal matrix containing the conjugated eigenvalues of T∗ , such that T∗ UNtx = UNtx Λ∗T . With Λ defined as diag (d (, β)), the noiseless unquantized received block in (6) can be given as Z = UNrx CU∗ Ntx TΛ = UNrx CΛT U∗ Ntx Λ . (52) (53) For our analysis, we assume that there is no phase noise, i.e., β = 0 and choose the CFO () to be an integer multiple of 2π/Np . We define the integer d = Np /2π and interpret Λ as a matrix 22 containing the eigenvalues of the d circulant delay matrix Jd ∈ CNp ×Np , i.e., Jd UNtx = UNtx Λ . As Λ∗ = Λ− , it can be shown that JNtx −d UNtx = UNtx Λ∗ . Furthermore, as JNtx −d is a real matrix and UNtx = U∗Ntx , we have U∗Ntx Λ = JNtx −d U∗Ntx . It follows from (53) that Z = UNrx CΛT JNtx −d U∗ Ntx . (54) Comparing (54) with (53), it can be observed that the beamspace matrix C and a CFO of 2πd/Np , result in the same received samples as the beamspace matrix CΛT JNtx −d and zero CFO. We call this as the CFO propagation effect and study its impact on the identifiability of the channel and the CFO in joint estimation. Now, we show that training blocks consisting of circulantly shifted ZC sequences propagate the CFO into the channel in an inseparable manner. From the perfect autocorrelation property of ZC sequences, it can be concluded that the diagonal entries of ΛT have constant modulus. In such case, Λ−1 T is well defined and (54) can be rewritten as ∗ Z = UNrx CΛT JNtx −d Λ−1 T ΛT U Ntx (55) ∗ = UNrx CΛT JNtx −d Λ−1 T U Ntx T | {z } (56) ∆ =C() = UNrx C()U∗ Ntx TΛ0 . (57) Notice that Λ0 in (57) is just an identity matrix, also interpreted as a zero CFO perturbation. We compare (57) with (53) and define a beamspace matrix matrix C() = CΛT JNtx −d Λ−1 T . It can be noticed that C() has the same sparsity as that of C, as permutation and scaling operations determined by JNtx −d and ΛT preserve sparsity. Therefore, if (C, ) is a solution to the joint estimation problem, (C(), 0) is also a solution. In fact, any frequency that is an integer multiple of 2π/Np can be propagated into the channel matrix so that (C(2πk/Np ),  − 2πk/Np ) is a solution for every k ∈ INp . Therefore, the circulantly shifted ZC training that aids fast message passing results in a continuum of optimal solutions for the joint estimation problem. V. S IMULATIONS In this section, we provide simulation results for the proposed bilinear message passing based joint CFO and channel estimation algorithm. We consider a hardware architecture in Fig. 1 that uses a uniform linear array of antennas and choose Ntx = Nrx = 32. In this work, we assume that the receiver is equipped with one-bit ADCs, i.e., q = 1. To obtain a performance benchmark for 23 one-bit receivers, we evaluate our algorithm for full resolution receivers, i.e., q = ∞, although they may not be practical at large bandwidths due to high power consumption. We consider a mmWave carrier frequency of 38 GHz and an operating bandwidth of W = 100 MHz [36], which corresponds to a symbol duration of T = 10 ns. We describe the simulation parameters of the clustered mmWave channel model in (3). We consider L = 16 taps to model the mmWave channel in the 100 MHz bandwidth. Such model is good enough for RMS delay spreads upto 33 ns, assuming L = 5W τrms . Our assumption is reasonable as 95% of the measured RMS delay spreads at 38 GHz were found to be less than 37.8 ns [37]. The measurements in [37] were made in a UMi-LoS environment using a resolution of 2 ns. We assume Ncs = 4 clusters, each comprising of 10 rays and the complex ray gains as IID standard normal random variables. Furthermore, the AoAs and AoDs of the rays within a cluster are chosen from a laplacian distribution corresponding to an angle spread of  P 2 2 15◦ . The wideband channel is scaled so that E ` kH [`]kF = E kCkF = Nrx Ntx , where the expectation is taken across several channel realizations. The channel matrix generated with the aforementioned parameters is practical at mmWave and the angle-delay domain representation, i.e., C, can be verified to be approximately sparse. Our joint estimation algorithm does not require any knowledge about the sparsity order of C and learns it using the EM algorithm. Our PBiGAMP based approach exploits compressibility of the phase error vector in the Fourier basis. To evaluate the worst case performance of our algorithm, we choose a CFO that is maximally off grid and within the practical limits. As the resolution of the DFT grid is 2π/Np , we choose  = 45π/1024 for a training block of Np = 1024 pilots. The corresponding analog domain CFO can be verified to be 2.2 MHz, which is about 58 ppm of the carrier frequency. We set βtx = βrx = 0.047 rad so that the standard deviation of the effective Wiener phase noise process is β = 0.067 rad. These parameters translate to a phase noise level of about −85 dBc/Hz at 1 MHz offset for each of the TX and RX oscillators [25], and meet the specifications of a 38 GHz oscillator [38]. The performance of our joint estimation algorithm is evaluated using the Normalised Mean Square Error (NMSE) of the channel estimate and the mean square error (MSE) of the CFO estimate . For a given SNR, the variance of the IID Gaussian noise, i.e., σ 2 in (1), is chosen such that SNR = 10log10 kTk2F Np σ 2 ! . (58) 24 For our simulations, we consider training blocks comprising of IID QPSK entries, IID Gaussian entries, and shifted ZC sequences proposed in [12]. For mmWave systems, the IID QPSK training is more practical than the IID Gaussian one, as it can be generated using a TX architecture that is as simple as analog-beamforming with 2-bit phase shifters. A. NMSE of the channel estimate Due to the bilinear nature of the problem, we can only estimate the wideband channel or equivalently C upto a scale factor. Furthermore, any positive amplification of C results in the same received block in one-bit receivers at high SNR. Therefore, the NMSE of the channel estimate is defined as   NMSE = E  2 b C − γC kCk2F b where γ is a scalar such that γ = arg min C − aC a F  F , (59) b The matrix γ C b for a given C and C. can be considered as the normalized angle-delay domain estimate of the wideband channel. The function E[.] denotes the empirical expectation and is taken across several channel and training realizations. For a given realization of the channel and its estimate, we define the Normalized 2 b /kCk2 . Squared Error (NSE) as C − γ C F F For a sequence of Np = 1024 pilots, our joint estimation algorithm recovered the channel within acceptable limits with a probability greater than 0.95, at a SNR of 0 dB using IID QPSK training. The number of outliers in this case is determined by the phase-transition region of PBiGAMP [22]. It can be observed from Fig. 3 that the probability of successful recovery monotonically increases as a function of the training length and quickly approaches 1. To ignore the effect of outliers, the channel NMSE and CFO MSE results we report are averages over 95% of the realizations for Np = 1024. In practice, the failure probability can be lowered by increasing the training length or by designing a retransmission protocol that accounts for the failure. As seen in Fig. 4, the NMSE monotonically decreases with the number of pilots. In practical wireless systems, the choice of the number of pilots is determined by the channel coherence time [3]. In Fig. 5, we plot the NMSE as a function of the SNR for various training sequences. It can be observed that the reconstruction error is approximately the same for IID QPSK training and IID Gaussian training matrices. For the one-bit case, the NMSE saturates at high SNR because 25 1 0.9 0.8 Pr(NSE 5 x) 0.7 0.6 0.5 0.4 0.3 Np Np Np Np 0.2 0.1 = 512 = 1024 = 2048 = 4096 0 -15 -12.5 -10 -7.5 -5 -2.5 0 x(dB) Fig. 3. The empirical CDF of the Normalized Squared Error of the channel estimate obtained using an IID QPSK training, at a SNR of 0 dB in a one-bit receiver. The reconstruction performance in terms of the recovery probability and the mean monotonically improve with the number of pilots. -5 IID QPSK, 1-bit IID QPSK, 1-bit -6 -7 NMSE (dB) -8 -9 -10 -11 -12 -13 -14 -15 512 1024 2048 3072 4096 5120 Number of pilots (Np ) Fig. 4. The NMSE of the channel estimate as a function of the training length, for an IID QPSK training at a SNR of 0 dB. The NMSE monotonically decreases with the training length for one-bit and full resolution receivers. Due to the quantization noise in one-bit receivers, NMSE in the one-bit case is higher than the full resolution one. the recovery performance is limited by the quantization noise. As shown in Fig. 4, the channel reconstruction error in one-bit receivers can be further decreased by using a higher number of pilots for the training. It can be noticed from Fig. 5 that joint estimation with circulantly shifted ZC sequences proposed in [12] performs poorly. The failure due to such structured matrices can be attributed to the CFO propagation effect and confirms with our analysis in Section IV-D. 26 0 NMSE (dB) -5 -10 -15 -20 -25 -10 IID QPSK, 1-bit IID Gaussian , 1-bit Shifted ZC, 1-bit IID QPSK , 1-bit IID Gaussian , 1-bit Shifted ZC, 1-bit -5 0 5 10 15 20 SNR(dB) Fig. 5. NMSE of the channel estimate obtained with one-bit and full resolution channel measurements for Np = 1024. Joint estimation is possible with IID Gaussian and IID QPSK training, but not with shifted ZC training due to the CFO propagation effect discussed in Section IV-D. It can be observed that the NMSE for the one-bit case saturates at high SNR due to quantization noise. B. MSE of the CFO estimate The CFO in our algorithm is obtained using an Extended Kalman Filter [34] on the inverse b If b DFT of b.  is the estimate of the CFO in the digital domain, the MSE of the CFO estimate   is given by E ( − b )2 . For a sequence of 1024 pilots, the MSE of b  is shown as a function of the SNR in Fig. 6, for IID QPSK and IID Gaussian training matrices. It can be noticed from Fig. 6 that the MSE of the CFO estimate saturates even for the full resolution case because the performance of the EKF is limited by the phase noise at high SNR [39]. Similar to the NMSE of the channel estimate, the MSE of b  is expected to saturate at high SNR for one-bit receivers due to quantization noise. The CFO estimation error, however, is determined by the phase noise [39] because the CFO MSE for the one-bit case approaches that of the full resolution one. As expected, the CFO MSE decreases with the number of pilots and is shown in Fig. 7. C. Performance invariance with the CFO In this section, we show that the performance of our joint estimation approach is invariant to the CFO within practical limits. As an example, we evaluate our algorithm for different values of the CFO in the range [−40 ppm, 40 ppm] of f1 . These limits were chosen according to the IEEE 802.11ad specifications. From Fig. 8, we see that the reconstruction errors in the 27 10-1 IID IID IID IID MSE of CFO estimate 10-2 QPSK , 1-bit Gaussian , 1-bit QPSK , 1-bit Gaussian , 1-bit 10-3 10-4 10-5 10-6 -10 -8 -6 -4 -2 0 5 10 SNR(dB) Fig. 6. MSE of the CFO estimate as a function of SNR for a training length of 1024. A maximally off-grid CFO of  = 45π/1024 was chosen to evaluate the performance. At high SNR, the MSE saturates for both the one-bit case and the infinite resolution case due to phase noise [39]. MSE of the CFO estimate 10-2 IID QPSK, 1-bit IID QPSK, 1-bit 10-3 10 -4 10-5 10-6 512 1024 2048 3072 4096 Number of pilots (Np ) Fig. 7. MSE of the CFO estimate as a function of the training length for a SNR of 0 dB. Here, the CFO in the system was fixed to  = 45π/1024, and the phase noise standard deviation to β = 0.067 rad. The MSE decreases with the number of pilots and the performance gap between the one-bit case and the full-resolution case is negligible. The sharp decrease in the CFO MSE can be attributed to the phase-transition effect of PBiGAMP [22]. channel is constant across the practical range of the CFO. The invariance arises due to the use of Bernoulli-Gaussian prior for the synchronization variables, that achieves robustness against off-grid leakage effects. 28 -6 IID QPSK, 1-bit IID QPSK, 1-bit -7 NMSE (dB) -8 -9 -10 -11 -12 -40 -30 -20 -10 0 10 20 30 40 CFO in ppm of f1 Fig. 8. For a SNR of 0 dB, the plot shows the invariance of the channel NMSE over the practical range of the CFO. The phase noise standard deviation was set to 0.067 rad, and 1024 pilots were used for the joint estimation. It can be observed from the plot that our joint estimation algorithm is robust to leakage effects that arise due to an off-grid CFO. VI. C ONCLUSIONS Most sparsity-aware channel estimation algorithms for mmWave systems assume perfect synchronization and perform poorly in the presence of such errors. In this work, we propose a message passing based algorithm that can leverage the sparsity of the wideband mmWave channel in addition to the compressibility of the phase error vector. We exploit the structure in the joint estimation problem to provide a low complexity implementation of a bilinear message passing algorithm. Unlike the existing methods that are specific to certain hardware architectures or use non-coherent techniques, our technique can be adapted to perform joint estimation with other mmWave architectures. Simulation results show that it is possible to perform joint CFO and channel estimation using IID QPSK and IID Gaussian training matrices. The CFO propagation effect proposed in this work shows that there is a trade-off between fast message passing using structured training and identifiability in joint estimation. In our future work, we will also consider frame synchronization while ensuring low complexity and scalability of our algorithm to different mmWave architectures. ACKNOWLEDGMENT The authors would like to thank Jianhua Mo and Philip Schniter for helping them in getting started with the GAMP algorithm. 29 R EFERENCES [1] S. Rangan, T. S. Rappaport, and E. Erkip, “Millimeter-wave cellular wireless networks: Potentials and challenges,” in Proc. of the IEEE, vol. 102, no. 3, pp. 366–385, 2014. [2] A. Alkhateeb, J. Mo, N. Gonzalez Prelcic, and R. W. Heath Jr., “MIMO precoding and combining solutions for millimeter wave systems,” IEEE Commun. Mag., vol. 52, no. 12, pp. 122–131, 2014. [3] R. W. Heath, Introduction to Wireless Digital Communication: A Signal Processing Perspective. Pearson Education, 2017. [4] R. W. Heath, N. Gonzalez-Prelcic, S. Rangan, W. Roh, and A. M. Sayeed, “An overview of signal processing techniques for millimeter wave MIMO systems,” IEEE J. Sel. Topics Signal Process., vol. 10, no. 3, pp. 436–453, 2016. [5] E. J. Candès and M. B. Wakin, “An introduction to compressive sampling,” IEEE Signal Process. Mag., vol. 25, no. 2, pp. 21–30, 2008. [6] P. T. Boufounos and R. G. Baraniuk, “One bit compressive sensing,” in Proc. of the IEEE 42nd Annual Conf. on Inform. Sciences and Systems, 2008., 2008, pp. 16–21. [7] Z. Marzi, D. Ramasamy, and U. Madhow, “Compressive channel estimation and tracking for large arrays in mm-wave picocells,” IEEE J. Sel. Topics Signal Process., vol. 10, no. 3, pp. 514–527, 2016. [8] A. Alkhateeb, O. El Ayach, G. Leus, and R. W. Heath, “Channel estimation and hybrid precoding for millimeter wave cellular systems,” IEEE J. Sel. Topics Signal Process., vol. 8, no. 5, pp. 831–846, 2014. [9] J. Mo, P. Schniter, N. G. Prelcic, and R. W. Heath, “Channel estimation in millimeter wave MIMO systems with one-bit quantization,” in Proc. of the Asilomar Conf. on Signals, Systems and Computers, 2014, pp. 957–961. [10] D. L. Donoho, A. Maleki, and A. Montanari, “Message-passing algorithms for compressed sensing,” Proc. of the National Academy of Sciences, vol. 106, no. 45, pp. 18 914–18 919, 2009. [11] J. P. Vila and P. Schniter, “Expectation-maximization Gaussian-mixture approximate message passing,” IEEE Trans. on Signal Process., vol. 61, no. 19, pp. 4658–4672, 2013. [12] J. Mo, P. Schniter, and R. W. Heath Jr., “Channel estimation in broadband millimeter wave MIMO systems with few-bit ADCs,” IEEE Trans. on Signal Process., 2017. [13] H. Yan and D. Cabric, “Compressive sensing based initial beamforming training for massive MIMO millimeter-wave systems,” in Proc. of the IEEE Global Conf. on Signal and Info. Process. (GlobalSIP), 2016, pp. 620–624. [14] N. J. Myers and R. W. Heath Jr., “A compressive channel estimation technique robust to synchronization impairments,” in Proc. of the 18th IEEE Intl. Workshop on Signal Process. Adv. in Wireless Commun. (SPAWC), 2017, pp. 1–5. [15] J. Chen, Y.-C. Wu, S. Ma, and T.-S. Ng, “Joint CFO and channel estimation for multiuser MIMO-OFDM systems with optimal training sequences,” IEEE Trans. on Signal Process., vol. 56, no. 8, pp. 4008–4019, 2008. [16] W. Zhang, Q. Yin, W. Wang, and F. Gao, “One-shot blind CFO and channel estimation for OFDM with multi-antenna receiver,” IEEE Trans. on Signal Process., vol. 62, no. 15, pp. 3799–3808, 2014. [17] O. Abari, H. Hassanieh, M. Rodreguez, and D. Katabi, “Millimeter wave communications: From point-to-point links to agile network connections,” in Proc. of the ACM Workshop on Hot Topics in Networks, 2016, pp. 169–175. [18] M. E. Rasekh, Z. Marzi, Y. Zhu, U. Madhow, and H. Zheng, “Noncoherent mmwave path tracking,” in Proc. of the 18th ACM Intl. Workshop on Mobile Computing Systems and Applications, 2017, pp. 13–18. [19] N. J. Myers and R. W. Heath Jr., “Joint CFO and channel estimation in millimeter wave systems with one-bit ADCs,” in Proc. of the 7th IEEE Intl. Workshop on Comput. Adv. in Multi-Sensor Adapt. Process. (CAMSAP), 2017, pp. 1–5. [20] N. D. Sidiropoulos, L. De Lathauwer, X. Fu, K. Huang, E. E. Papalexakis, and C. Faloutsos, “Tensor decomposition for signal processing and machine learning,” IEEE Trans. on Signal Process., vol. 65, no. 13, pp. 3551–3582. 30 [21] E. J. Candes, T. Strohmer, and V. Voroninski, “Phaselift: Exact and stable signal recovery from magnitude measurements via convex programming,” Commun. on Pure and Applied Mathematics, vol. 66, no. 8, pp. 1241–1274, 2013. [22] J. T. Parker and P. Schniter, “Parametric bilinear generalized approximate message passing,” IEEE J. Sel. Topics Signal Process., vol. 10, no. 4, pp. 795–808, 2016. [23] Y. Fu, C. Tellambura, and W. A. Krzymien, “Limited-feedback precoding for closed-loop multiuser MIMO OFDM systems with frequency offsets,” IEEE Trans. on Wireless Commun., vol. 7, no. 11, 2008. [24] V. Syrjala and M. Valkama, “Receiver DSP for OFDM systems impaired by transmitter and receiver phase noise,” in Proc. of the IEEE Intl. Conf. on Commun. (ICC), 2011, pp. 1–6. [25] A. Demir, A. Mehrotra, and J. Roychowdhury, “Phase noise in oscillators: A unifying theory and numerical methods for characterization,” IEEE Trans. on Circuits and Systems I: Fundamental Theory and Applications, vol. 47, no. 5, pp. 655–674, 2000. [26] N. G. Prelcic, A. Ali, V. Va, and R. W. Heath Jr., “Millimeter-wave communication with out-of-band information,” IEEE Commun. Magazine, vol. 55, no. 12, pp. 140–146, 2017. [27] K. Venugopal, A. Alkhateeb, N. G. Prelcic, and R. W. Heath, “Channel estimation for hybrid architecture-based wideband millimeter wave systems,” IEEE Journal on Selected Areas in Commun., vol. 35, no. 9, pp. 1996–2009, 2017. [28] J. Wang, “Beam codebook based beamforming protocol for multi-Gbps millimeter-wave WPAN systems,” IEEE Journal on Selected Areas in Commun., vol. 27, no. 8, 2009. [29] M. F. Duarte and R. G. Baraniuk, “Spectral compressive sensing,” Applied and Computational Harmonic Analysis, vol. 35, no. 1, pp. 111–129, 2013. [30] S. Ling and T. Strohmer, “Self-calibration and biconvex compressive sensing,” Inverse Problems, vol. 31, no. 11, p. 115002, 2015. [31] S. Rangan, “Generalized approximate message passing for estimation with random linear mixing,” in Proc. of the IEEE Intl. Symposium on Inform. Theory, 2011, pp. 2168–2172. [32] S. M. Kay, Fundamentals of statistical signal processing. Prentice Hall PTR, 1993. [33] F. R. Kschischang, B. J. Frey, and H.-A. Loeliger, “Factor graphs and the sum-product algorithm,” IEEE Trans. on Inform. Theory, vol. 47, no. 2, pp. 498–519, 2001. [34] P. Zhao, L. Kuang, and J. Lu, “Carrier frequency offset estimation using extended Kalman filter in uplink OFDMA systems,” in Proc. of the IEEE Intl. Conf. on Commun., 2006., vol. 6, pp. 2870–2874. [35] C.-K. Wen, C.-J. Wang, S. Jin, K.-K. Wong, and P. Ting, “Bayes-optimal joint channel-and-data estimation for massive MIMO with low-precision ADCs,” IEEE Trans. on Signal Process., vol. 64, no. 10, pp. 2541–2556. [36] F. B. Mismar and B. L. Evans, “Machine learning approach to estimating mmWave signal measurements during handover,” arXiv preprint arXiv:1710.01879, 2017. [37] Aalto Univ., AT & T, BUPT, CMCC, Ericsson, Huawei, Intel, KT Corporation, Nokia, NTT DOCOMO, New York Univ., Qualcomm, Samsung, Univ. of Bristol, and Univ. of Southern California, “5G channel model for bands up to 100 GHz (v2.3), Tech. Rep.” http://www.5gworkshops.com/5gcm.html, 2016, [Online]. [38] “MMIC Voltage Controlled Oscillator,” http://www.tlcprecision.com/Data%20Sheets/TLCO01981.pdf, 2013, [Online]. [39] O. H. Salim, A. A. Nasir, H. Mehrpouyan, W. Xiang, S. Durrani, and R. A. Kennedy, “Channel, phase noise, and frequency offset in OFDM systems: Joint estimation, data detection, and hybrid Cramer-Rao lower bound,” IEEE Trans. on Commun., vol. 62, no. 9, pp. 3311–3325, 2014.
7cs.IT
FEAST: An Automated Feature Selection Framework for Compilation Tasks Pai-Shun Ting arXiv:1610.09543v1 [cs.PL] 29 Oct 2016 Department of Electrical Engineering and Computer Science University of Michigan Ann Arbor, Michigan 48109, USA Email: [email protected] Chun-Chen Tu Department of Statistics University of Michigan Ann Arbor, Michigan 48109, USA Email: [email protected] Pin-Yu Chen IBM T. J. Watson Research Center Yorktown Heights, New York 10598, USA Email: [email protected] Ya-Yun Lo Adobe Systems San Francisco, California 94103, USA Email: [email protected] Shin-Ming Cheng Department of Computer Science and Information Engineering National Taiwan University of Sciecne and Technology Taipei 106, Taiwan Email: [email protected] Abstract—Modern machine-learning techniques greatly reduce the efforts required to conduct high-quality program compilation, which, without the aid of machine learning, would otherwise heavily rely on human manipulation as well as expert intervention. The success of the application of machine-learning techniques to compilation tasks can be largely attributed to the recent development and advancement of program characterization, a process that numerically or structurally quantifies a target program. While great achievements have been made in identifying key features to characterize programs, choosing a correct set of features for a specific compiler task remains an ad hoc procedure. In order to guarantee a comprehensive coverage of features, compiler engineers usually need to select excessive number of features. This, unfortunately, would potentially lead to a selection of multiple similar features, which in turn could create a new problem of bias that emphasizes certain aspects of a program’s characteristics, hence reducing the accuracy and performance of the target compiler task. In this paper, we propose FEAture Selection for compilation Tasks (FEAST), an efficient and automated framework for determining the most relevant and representative features from a feature pool. Specifically, FEAST utilizes widely used statistics and machine-learning tools, including LASSO, sequential forward and backward selection, for automatic feature selection, and can in general be applied to any numerical feature set. This paper further proposes an automated approach to compiler parameter assignment for assessing the performance of FEAST. Intensive experimental results demonstrate that, under the compiler parameter assignment task, FEAST can achieve comparable results with about 18% of features that are automatically selected from the entire feature pool. We also inspect these selected features and discuss their roles in program execution. Index Terms—Compiler optimization, feature selection, LASSO, machine learning, program characterization I. I NTRODUCTION Program characterization, a process to numerically or structurally quantify a target program, allows modern machinelearning techniques to be applied to compiler tasks, since most machine-learning methods assume numerical inputs for both training and testing data. Program characterization is usually achieved by extracting from the target program a set of static features and/or a set of dyanamic features. Static features can be obtained directly from the source code or intermediate TABLE I: List of all original 56 static features from cTuning Compiler Collection [1]. ft1 ft2 ft3 ft4 ft5 ft6 ft7 ft8 ft9 ft10 ft11 # basic blocks in the method # basic blocks with a single successor # basic blocks with two successors ft29 # basic blocks with more then two successors # basic blocks with a single predecessor # basic blocks with two predecessors # basic blocks with more then two predecessors # basic blocks with a single predecessor and a single successor # basic blocks with a single predecessor and two successors # basic blocks with a two predecessors and one successor # basic blocks with two successors and two predecessors ft32 ft30 ft31 ft33 ft34 ft35 ft36 ft37 ft38 ft39 ft12 # basic blocks with more then two successors and more then two ft40 ft13 # basic blocks with # instructions less then 15 ft41 ft14 ft15 ft16 ft17 ft18 ft19 ft20 ft21 ft22 ft23 ft24 ft25 ft26 ft27 ft28 # basic blocks with # instructions in the interval [15, 500] # basic blocks with # instructions greater then 500 # edges in the control flow graph # critical edges in the control flow graph # abnormal edges in the control flow graph # direct calls in the method # conditional branches in the method # assignment instructions in the method # binary integer operations in the method # binary floating point operations in the method #instructions in the method Average of # instructions in basic blocks Average of # phi-nodes at the beginning of a basic block Average of arguments for a phi-node predecessors # basic blocks with no phi nodes ft42 ft43 ft44 ft45 ft46 ft47 ft48 ft49 ft50 ft51 ft52 ft53 ft54 ft55 ft56 # basic blocks with phi nodes in the interval [0, 3] # basic blocks with more then 3 phi nodes # basic block where total # arguments for all phi-nodes is in greater then 5 # basic block where total # arguments for all phi-nodes is in the interval [1, 5] # switch instructions in the method # unary operations in the method # instruction that do pointer arithmetic in the method # indirect references via pointers (”*” in C) # times the address of a variables is taken (”&” in C) # times the address of a function is taken (”&” in C) # indirect calls (i.e. done via pointers) in the method # assignment instructions with the left operand an integer constant in the method # binary operations with one of the operands an integer constant in the method # calls with pointers as arguments # calls with the # arguments is greater then 4 # calls that return a pointer # calls that return an integer # occurrences of integer constant zero # occurrences of 32-bit integer constants # occurrences of integer constant one # occurrences of 64-bit integer constants # references of a local variables in the method # references (def/use) of static/extern variables in the method # local variables referred in the method # static/extern variables referred in the method # local variables that are pointers in the method # static/extern variables that are pointers in the method # unconditional branches in the method representation of the target program, while the procurement of dynamic features usually requires actually executing the target program to capture certain run-time behavior. With current intensive research on program characterization, new features, both static and dynamic, are continuously being proposed. An example of a static feature set is shown in Table I, which lists all the 56 original static features extracted by Milpost GCC from cTuning Compiler Collection [1], with many of them being different yet non-independent features. For example. ft. 8 implies ft. 2 and ft. 5, meaning that these features are correlated. In a compiler task, determining which features to use or to include for program characterization is of considerable importance, since different features can have different effects, and hence different resulting performance on a specific compiler task. Intuitively, including as many features as possible for program characterization seems to be a reasonable approach when considering feature selection. This, however, essentially increases the dimensionality of the feature space, and thus potentially introduces extra computational overhead. Also, some features may not be relevant to the target compiler task, and therefore behave equivalently as noise in program characterization, harming the resulting performance. Furthermore, many features, though different, capture very similar characteristics of a program. The similarities among features can produce bias that overemphasizes certain aspects of a program’s characteristics, and consequently lead to an inaccurate result for a target compiler task. Due to the aforementioned reasons, many machine-learning-aided compiler tasks still heavily rely on expert knowledge for determining an appropriate set of features to use. This, unfortunately, hinders the full automation of compiler tasks using machine learning, which is originally deemed as a tool to lower the involvement of field expertise and engineer intervention. This paper proposes FEAture Selection for compiler Tasks (FEAST), an automated framework of feature selection for a target compiler task. FEAST incorporates into its framework a variety of feature selection methods, including the well-known LASSO [2], sequential forward and backward selection. Given a compiler task and a list of feature candidates, FEAST first samples a small set of available programs as training data, and then uses the integrated feature selection methods to choose M most appropriate or relevant features for this specific compiler tasks. The remaining programs can then be handled using only the chosen features. To demonstrate the feasibility and practicality of FEAST, we assess its performance on a proposed method to assignment of compiler parameters. Modern compilers usually embed a rich set of tuning parameters to provide hints and guidance for their optimization processes. To obtain an optimal compiled executable program, exhaustive trials over all combinations of tuning parameters of the utilized compiler is required. This is, in general, excessively time consuming and hence infeasible due to its combinatorial nature. As many other compiler tasks, in practice, expert intervention is frequently triggered and heuristics based on expertise and experience are adopted as a general guideline for tuning parameters [3]. Unfortunately, fine tuning compiler’s parameters may require multiple compilation processes, and can take up to weeks or months to complete for a moderate program size, entailing a huge burden and software engineering. In this work, as a test case for FEAST, we develop an automated method to assigning “good” parameters to a pool of programs using machine-learning techniques. We then show that using FEAST, the dimension of the feature space can be greatly reduced to pertaining relevant features, while maintaining comparable resulting performance.  !"##$ %& ' ("%% !"##$ %& '                                         )                                                                                     *              Fig. 1: Flow diagrams of the proposed methods. This paper is organized as follows. Sec. II details the proposed FEAST framework as well as the automatic compiler parameter assignment process. Sec. III presents experimental results with detailed analysis. Related work is discussed in Sec. IV. Finally, Sec. V draws some conclusions and provides envisions for future work. II. FEAST AND C OMPILER PARAMETER A SSIGNMENT This section details the mechanisms of FEAST, and presents the proposed compiler parameter assignment method. A. FEAST Given K training programs and a set of p numerical features, FEAST assumes a linear model for resulting performance and feature values: y = Xβ + β0 1 (1) where y ∈ RK×1 is the compiled programs’ performance vector, whose i-th entry denotes the performance (measured in some pre-defined metrics) of the i-th program in the set of total K training programs. X ∈ RK×p is a matrix whose (i, j)-th entry denotes the value of the j-th extracted feature of the i-th program. β ∈ Rp×1 and β0 ∈ R are the coefficients describing the linear relationship between the features and the resulting performance. 1 is a K × 1 vector with its elements being all 1s. FEAST utilizes three widely used feature selection methods, namely LASSO, sequential forward selection (SFS) and sequential backward selection (SBS), all of which pick M most influential features out of the total p features. Specifically, the elastic net approach for LASSO adopted in FEAST selects features by first solving optimization problem [2]: minβ̃ 1 y − X̃ β̃ K 2 + λ β̃ 2 (2) 1   where X̃ = X 1 . The first p elements of the solution β̃ are the coefficient estimates whose magnitudes directly reflect the influence of the corresponding features. M selected features are chosen as those with coefficients of largest magnitudes. SFS and SBS are other well-known feature selection methods. For SFS, we sequentially or greedily select the most relevant feature from the training programs until we have selected M features. For SBS, we sequentially exclude the most irrelevant feature until there are M features left. We omit algorithmic descriptions of SFS and SBS, and refer interested readers to [4] for implementation details. B. Compiler Parameter Assignment Algorithms This section discusses the proposed method for compiler parameter assignment algorithm and the application of FEAST to this task. Given a compiler with many parameters to set, finding an optimal assignment of parameters that can best compile a target program is a vexing problem. This paper proposes a machine-learning algorithm that automatically assigns “good” parameters to target programs based on the known optimal assignment to the training programs. The proposed method works in two schemes: active training scheme and passive training scheme (see Fig. 1). In active training scheme, the users can actively acquire the optimal compiler parameters for a subset of programs, while in passive training scheme, the users are given as prior knowledge a set of programs whose optimal compiler parameters are known. A practical example of active training scheme is that a company has no prior knowledge about compiler parameter assignment, and it has a very limited budget which only allows it to select a small set of programs for full tuning. Remaining large set of programs, however, has to be quickly and efficiently compiled. For passive training scheme, a company has a small set of programs with well-tuned compiler parameters, and it would like to quickly find good compiler parameters for other programs. Note that, in the active training scheme, our proposed method can also automatically choose a good set of candidate programs for full tuning. The remaining section is dedicated to detailing the two preceding schemes with FEAST application to them respectively. Active training scheme. Since acquirement of dynamic features can be very expensive due to the potential need for multiple compilations and iterative tuning, we opt to use Algorithm 1 Active Training Scheme Input: n programs with p static features, number K of training programs for optimization Output: compiler parameter assignment for each untrained program Procedures: 1) Partition n programs into K clusters by K-means clustering 2) For each cluster select one program having the least sum of distances to other programs in the same cluster as a training program. 3) Find the set of optimal compiler parameters of the selected K programs. 4) Use FEAST to perform feature selection on the selected K programs by regressing their optimal execution time with respect to their static features. 5) Repartition the untrained programs based on the similarities computed by the selected features. 6) For each untrained program, assign the compiler parameters of the closest trained program to it based on the selected features. numerical static features in the proposed compiler parameter assignment task. Also, we use the execution time of a compiled program as the measure of performance for that program. Given n programs with p static features, we are granted to choose K ≤ n programs as training samples and acquire the optimal compiler parameters for each training program that optimize the execution time. In order to choose the K programs, we first compute the similarity of each program pair based on the Euclidean distance between the corresponding static feature vectors, and partition the programs into K clusters using K-means clustering. For each cluster, we select one program that has the least average distance to other programs in the same cluster as a training program. Exhaustive trials are then conducted for the training programs to obtain their optimal compiler parameters and the associated execution time. Given the K training programs as well as their execution time, FEAST can then select M features that are most influential to the training programs’ performance (execution time in this case) . We then leverage the selected features to recompute similarities and repartition the programs. Lastly, each untrained program is assigned by the optimal parameters of the most similar training program. See Alg. 1 for detailed algorithm. Passive training scheme. Different from the active training scheme, in addition to n programs with p static features, we are also given K pre-selected training programs. Therefore, the methodology of the passive training scheme is similar to that of the active training scheme, except that the clustering procedures described in active training scheme are no longer required. See Alg. 2 for detailed algorithm. Algorithm 2 Passive Training Scheme Input: n programs with p static features, K given training programs Output: compiler parameter assignment for each untrained program Procedures: 1) Find the set of optimal compiler parameters of the K given training programs. 2) Use FEAST to perform feature selection on the selected K programs by regressing their optimal execution time with respect to their static features. 3) Compute distances between programs based on the selected features. 4) For each untrained program, assign the compiler parameters of the closest trained program based on the selected features. III. P ERFORMANCE E VALUATION OF C OMPLIER PARAMETER A SSIGNMENT We test our implementations using the PolyBench benchmark suite [5] that consists of n = 30 programs. The programs are characterized using p = 56 static features from cTuning Compiler Collection [1]. For the two proposed training schemes, K trained programs are used for feature selection and compiler parameter assignment, and for each feature selection method (LASSO, SFS, SBS), we select the M = 10 most relevant features. A. Performance Comparison of the Active and Passive Training Schemes Fig. 2 shows the program execution time of active and passive training schemes. The minimal execution time refers to the optimal performance over 192 possible combinations of compiler parameters of every program. We also show the results for the case where no tunable compiler parameters are enabled. The results of minimal-time and no-tuning-parameter are regarded as baselines for comparing the proposed FEAST methods, as their execution time does not depend on the number K of training programs. Furthermore, to validate the utility of FEAST, we also calculate the execution time using all features, i.e., the case where FEAST is disabled. For the three feature selection methods introduced in Sec. II-A (LASSO, SFS, and SBS), we select the top M = 10 important features and use these selected features to compute program similarities and assign compiler parameters. In this setting, we only compare the execution time of the untrained programs, and we omit the computation time required to obtain the optimal compiler parameters associated with the training programs. We will consider the overall execution time of the trained and untrained programs shortly. In Fig. 2, each untrained program is executed once and we sum up the execution time to get the overall execution time under various values of K of trained programs. It is observed that the execution time of both training schemes converge to 38 34 32 34 Executation time (s) Executation time (s) 36 32 No feature selection Lasso Forward selection Backward selection Minimal time No tuning parameter 30 28 26 24 30 28 26 24 22 22 20 No feature selection Lasso Forward selection Backward selection Minimal time No tuning parameter 0 5 10 15 20 25 20 30 0 5 K: number of trained program 10 15 20 25 30 K: number of trained program (a) Active training scheme. (b) Passive training scheme. Fig. 2: Program execution time of the active and passive training schemes. Minimal time refers to exhaustive parameter optimization on every program. It can be observed that the execution time of the three feature selection algorithms integrated in FEAST are comparable to that of using all features, which strongly suggests that important features affecting program execution are indeed identified by FEAST. Lasso 38 36 Passive training Active training 36 34 Execution time (sec) 34 Execution time (sec) SFS 38 Passive training Active training 32 30 28 26 32 30 28 26 24 24 22 22 20 20 0 5 10 15 20 25 30 K: # trained program 0 5 10 15 20 25 30 K: # trained program Fig. 3: Comparison of active and passive training schemes. Error bars represent standard deviation. The average execution time of active training is smaller that that of passive training. The variations in active training scheme are caused by random initialization in K-means clustering procedure, whereas the variations in passive training scheme are caused by randomness in the selection of training programs. the minimal execution time as K increases. The curve of the passive training scheme is smoother than that of the active training scheme due to the fact that the former is an averaged result over 1000 trials of randomly selected training programs. The trends in Fig. 2 can be explained as follows: when adopting passive training, every program has an equal chance to be selected as a training program. As K grows, the set of available optimal compiler parameters for training programs increases as well, resulting in the decrease in average total execution time. Active training, on the other hand, adopts K-means clustering when selecting the training programs. Given a fixed K, only K programs can be selected for training and compiler parameter optimization. Therefore, for small K (e.g.,. K = 1 or 2), we might select the programs whose optimal compiler parameters do not fully benefit other untrained programs. The execution time of cases with FEAST enabled are shown to be comparable to that of using all features, which strongly suggests that FEAST can successfully select important features affecting program execution, leading to dimensionality reduc- -5000 00 5 20 200 400 50 00 600 800 0 -2000 300 0 -3000 00 0 4000 1000 00 -1 0 Program execution times (Nexec) (a) Active training scheme. 0 -2000 200 0 0 10 -3000 4000 -40 0 0 00 -2 200 400 600 800 -4000 -5000 3000 2000 5 -6000 1000 2000 -1000 -3 00 -4000 3000 1000 10 0 -3000 40 00 100 -2 0 3000 -1 00 0 10 0 00 -2000 15 0 00 -1 00 0 4000 3000 -1000 K: number of trained program 0 -10 00 0 00 -40 -30 0 20 3000 15 1000 4000 0 00 2000 5000 20 25 200 -20 100 00 -50 3000 2000 K: number of trained program 00 4000 5000 5000 25 Passive with lasso feature selection 30 5000 -5 0 Active with lasso feature selection 30 -6000 1000 Program execution times (Nexec) (b) Passive training scheme. Fig. 4: Time reduction for active and passive training schemes using LASSO feature selection. The parameter Nexec specifies the number of times a program is executed. The contour indicates a phase transition in time reduction. The figure suggests that with Nexec large enough, the proposed compiler parameter assignment method can provide time saving when considering overall execution time. tion while still attaining satisfactory execution time reduction. To gain more insights on the performance of active and passive training schemes, we compare the execution time of LASSO and SFS in Fig. 3. The comparison of SBS is omitted since in practice SBS is computationally inefficient due to its sequential feature removal nature, especially for high-dimensional data. It is observed in Fig. 3 that the average execution time of active training is smaller than that of passive training, since for active training, we are able to select representative programs as training samples for optimization. These results indicate that the execution time can be further reduced when we have the freedom to select K representative programs from clustering as training samples for compiler parameter assignment. B. Overall Execution Time Comparison In this section, we consider the overall execution time, including time overhead imposed by the proposed algorithms as well as the execution time of every untrained program. To this end, we introduce a parameter Nexec, the number of executions per program. The motivation behind introducing Nexec is as follows: for programs such as matrix operations, users may execute these core programs multiple times (i.e., Nexec times). Therefore, as will be demonstrated by the analysis detailed in this section, the time overhead introduced by the proposed algorithms will be compensated as Nexec increases, since the time spent in optimizing the training programs comprises relatively small portion of the overall time cost with large Nexec. Time Reduction (TR) can therefore be computed using the following formula: K TR = Nexec · Tnull − Nexec · Tauto − Texhaustive , where Nexec denotes the number of executions for each program, Tnull represents the total time to run every program with all tunable compiler parameters disabled, Tauto denotes the total time to run every program compiled by using the proK posed compiler parameter assignment method, and Texhaustive denotes the computation time for finding the optimal compiler parameters for K training programs. Fig. 4 shows the contour plot of the overall time reduction metric for both training schemes with LASSO. Results using SFS and SBS are similar, and are omitted in this paper. If TR is positive, it indicates the overall execution time is smaller than that with all tunable compiler parameters disabled. It can be observed that for each K, TR becomes positive when Nexec exceeds certain threshold value, implying that if a user uses the compiled programs repeatedly, the proposed method could potentially provide great time saving. Also for each K, the preceding threshold of active training is lower than that of passive training, since programs to exhaustively optimize are actively chosen by the proposed method. C. Features Selected by FEAST To investigate the key features affecting compiler execution time, we inspect the selected features from FEAST. Table II lists the top 10 selected features using various feature selection methods integrated in FEAST. The features are selected with 3-fold cross validation method for regressing the optimal execution time of all 30 programs with respect to their static program features. Based on the selected features, we can categorize the selected features into three groups: 1) Control Flow Graph (CFG), 2) assignments/operations, and 3) phi node. CFG features describe a programs’ control flow, which can be largely influenced by instruction branches, such as “if-else”, “if- if” and “for loop” statements. The selected CFG features are reasonable as in our program testing dataset, for loop contributes to the major part of programs’ control flow. In addition, assignment operations are essential to matrix operations, and hence possess discriminative power for distinguishing programs. Lastly, Phi node is a special operation of Intermediate Representation (IR). It is designed for Static Single Assignment form (SSA) which enables a compiler to perform further optimization, and hence it is an important factor for program execution. IV. R ELATED W ORK Recent rapid development of program characterization, a process to quantify programs, allows the application of modern machine-learning techniques to the field fo code compilation and optimization. These machine-learning techniques provide powerful tools that are widely used in various aspects of compilation procedures. For example, Buse and Weimer use static features to identify ”hot paths” (executional paths that are most frequently invoked) of a target program by applying logistic regression [6] without ever profiling the program, Kulkarni et al. build an evolving neural-network model that uses static features to help guide the inlining heuristics in compilation process [7], and Wang and O’Boyle exploit the use of artificial neural networks (ANNs) as well as support vector machine (SVM) for automatic code parallelization on multicore systems [8], among others. Many existing applications of machine-learning-enabled compiler tasks use features, either static or dynamic, selected by the designers, and hence heavily rely on field expertise. This work provides a comprehensive solution to this problem by using modern statistical methods to select appropriate features for a specific case. There has also been a vast amount of research dedicated to designing suitable features for target applications. For example, it is shown in [9] that, for compiler tasks that cannot afford the time cost for procurement of dynamic features, carefully designed graph-based static features can achieve accuracy and performance comparable to dynamic features in some applications, regardless the fact that it is prevailingly believed dynamic features are preferred due to insightful information they provide. Another example is the compiler parameters assignment task by Park et al. [12]. In their work, an SVM-based supervised training algorithm is used to train a set of support vectors that can help estimate the performance or reaction of an unknown program to a set of compiler parameters. They use newly-defined graph-based static features for training, which achieves high performance comparable to that using dynamic features, but without the need to invoke multiple compilations and profiling. While in general, it is possible to design dedicated features for specific tasks, the applicability of these dedicated features to other applications remain questionable. In the scenario where there are excessive number of numerical features that may or may not fit a target task, FEAST can help in selecting the most meaningful and influential features. As to the task of compiler parameter tuning, recent work has been focused on automation of parameter assignment process. Compiler parameter tuning has long been a crucial problem which attracts a vast amount of attention. Recent trends and efforts on exploiting the power of modern machine-learning techniques have achieved tremendous success in compiler parameter tuning. Stephenson and Amarasinghe demonstrate the potential of machine learning on automatic compiler parameter tuning by applying ANNs and SVM to predict a suitable loop-unrolling factor for a target program [10]. This work is relatively restricted, since it deals with a single compiler parameter. Agakov et al. propose a computeraided compiler parameter tuning method by identifying similar programs using static features [3], where certain level of expert intervention is still required. Cavazos et al. characterize programs with dynamic features, and use logistic regression, a classic example of conventional machine-learning algorithm, to predict good compiler parameter assignment [11]. While providing state-of-the-art performance, [11] requires dynamic features, which can be expensive to acquire. In [12], graphbased features are used along with SVM for performance prediction given a compilation sequence. This work uses dedicated features for the machine-learning task, and further implicitly utilizes excessive number of candidate assignments of compiler parameters in order to find a good assignment, resulting in a non-scalable algorithm. On the other hand, the proposed compiler parameter assignment algorithm is a comprehensive assignment algorithm that does not require dynamic features or dedicated static features. Furthermore, the training data that need full optimization can be set fixed. The good assignment for an unseen target program is directly derived from that of trained programs, implying its scalability with the number of potential assignments. V. C ONCLUSIONS AND F UTURE W ORK In this work, we propose FEAST, an automated framework for feature selection in compiler tasks that incorporates with well-known feature selection methods including LASSO, sequential forward and backward selection. We demonstrate the feasibility and applicability of FEAST by testing it on a proposed method for the task of compiler parameter assignment. The experimental results show that the three feature selection methods integrated in FEAST can select a representative small subset of static features that, when used in the compiler parameter assignment task, can achieve non-compromised performance. We also validate the effectiveness of the proposed methods by experimentally demonstrating significant overall execution time reduction of our method in a practical scenario where each program is required to run multiple times. Lastly, we discussed the roles of the features selected by FEAST, which provides deep insights into compilation procedures. In summary, our contributions are two-fold: 1) We integrate into FEAST with various modern machinelearning and optimization techniques for feature selection for compilation tasks. 2) We demonstrate the applicability of FEAST by experimentally showing that it can achieve comparable performance in compiler parameter assignment tasks with a very small set of selected static features. For future work, we are interested in exploring the inherent structural dependencies of codes in each program as additional features for compiler parameter assignment. We are also interested in integrating the proposed compiler parameter assignment algorithm with recently developed automated community detection algorithms, such as AMOS [13], to automatically cluster similar programs for the proposed passive and active training schemes. R EFERENCES [1] “cTuning Compiler Collection.” [Online]. Available: http://ctuning.org/wiki/index.php?title=CTools:CTuningCC [2] H. Zou and T. Hastie, “Regularization and variable selection via the elastic net,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), vol. 67, no. 2, pp. 301–320, 2005. [3] F. Agakov, E. Bonilla, J. Cavazos, B. Franke, G. Fursin, M. F. O’Boyle, J. Thomson, M. Toussaint, and C. K. Williams, “Using machine learning to focus iterative optimization,” in Proceedings of the International Symposium on Code Generation and Optimization. IEEE Computer Society, 2006, pp. 295–305. [4] M. Dash and H. Liu, “Feature selection for classification,” Intelligent data analysis, vol. 1, no. 1, pp. 131–156, 1997. [5] “Polybench benchmark suite.” [Online]. Available: http://web.cse.ohiostate.edu/∼ pouchet/software/polybench/ [6] R. P. Buse and W. Weimer, “The road not taken: Estimating path execution frequency statically,” in Proceedings of the 31st International Conference on Software Engineering. IEEE Computer Society, 2009, pp. 144–154. [7] S. Kulkarni, J. Cavazos, C. Wimmer, and D. Simon, “Automatic construction of inlining heuristics using machine learning,” in Code Generation and Optimization (CGO), 2013 IEEE/ACM International Symposium on. IEEE, 2013, pp. 1–12. [8] Z. Wang and M. F. O’Boyle, “Mapping parallelism to multi-cores: a machine learning based approach,” in ACM Sigplan notices, vol. 44, no. 4. ACM, 2009, pp. 75–84. [9] J. Demme and S. Sethumadhavan, “Approximate graph clustering for program characterization,” ACM Transactions on Architecture and Code Optimization (TACO), vol. 8, no. 4, p. 21, 2012. [10] M. Stephenson and S. Amarasinghe, “Predicting unroll factors using supervised classification,” in International symposium on code generation and optimization. IEEE, 2005, pp. 123–134. [11] J. Cavazos, G. Fursin, F. Agakov, E. Bonilla, M. F. O’Boyle, and O. Temam, “Rapidly selecting good compiler optimizations using performance counters,” in International Symposium on Code Generation and Optimization (CGO’07). IEEE, 2007, pp. 185–197. [12] E. Park, J. Cavazos, and M. A. Alvarez, “Using graph-based program characterization for predictive modeling,” in Proceedings of the Tenth International Symposium on Code Generation and Optimization. ACM, 2012, pp. 196–206. [13] P.-Y. Chen, T. Gensollen, and A. O. Hero III, “Amos: An automated model order selection algorithm for spectral graph clustering,” arXiv preprint arXiv:1609.06457, 2016. TABLE II: Top 10 selected features from various methods integrated in FEAST. The number in the bracket indicates the feature ranking for each method. LASSO Number of basic blocks with a single predecessor and a single successor (6) Number of basic blocks with a single predecessor and two successors (7) Number of basic blocks with more then two successors and more than two predecessors (8) Number of basic blocks with number of instructions in the interval [15, 500] (5) Number of assignment instructions in the method (9) SFS Number of binary integer operations in the method (1) Number of direct calls in the method (9) Number of binary floating point operations in the method (2) Number of basic blocks with phi nodes in the interval [0,3] (4) Number of basic block where total number of arguments for all phi-nodes is greater than 5 (10) Number of assignment instructions in the method (10) Average of number of phi-nodes at the beginning of a basic block (10) Number of basic blocks with more than 3 phi nodes (4) Number of basic block where total number of arguments for all phi-nodes is greater than 5 (7) Number of switch instructions in the method (3) Number of binary integer operations in the method (1) Number of unary operations in the method (2) Number of unary operations in the method (3) Number of basic blocks in the method (3) SBS Number of basic blocks with a two predecessors and one successor (8) Number of basic blocks with a two predecessors and one successor (7) Number of conditional branches in the method (5) Number of basic blocks with two successors and two predecessors (2) Number of instructions in the method (9) Number of basic blocks with more then two successors and more than two predecessors (6) Number of basic blocks with number of instructions greater then 500 (4) Number of basic blocks with more than 3 phi nodes (5) Number of basic block where total number of arguments for all phi-nodes is in greater than 5 (8) Number of assignment instructions with the left operand an integer constant in the method (6) Number of binary operations with one of the operands an integer constant in the method (1)
2cs.AI
Published as a conference paper at ICLR 2018 O N THE E XPRESSIVE P OWER OF OVERLAPPING A RCHITECTURES OF D EEP L EARNING Or Sharir & Amnon Shashua The Hebrew University of Jerusalem {or.sharir,shashua}@cs.huji.ac.il arXiv:1703.02065v4 [cs.LG] 24 Feb 2018 A BSTRACT Expressive efficiency refers to the relation between two architectures A and B, whereby any function realized by B could be replicated by A, but there exists functions realized by A, which cannot be replicated by B unless its size grows significantly larger. For example, it is known that deep networks are exponentially efficient with respect to shallow networks, in the sense that a shallow network must grow exponentially large in order to approximate the functions represented by a deep network of polynomial size. In this work, we extend the study of expressive efficiency to the attribute of network connectivity and in particular to the effect of ”overlaps” in the convolutional process, i.e., when the stride of the convolution is smaller than its filter size (receptive field). To theoretically analyze this aspect of network’s design, we focus on a well-established surrogate for ConvNets called Convolutional Arithmetic Circuits (ConvACs), and then demonstrate empirically that our results hold for standard ConvNets as well. Specifically, our analysis shows that having overlapping local receptive fields, and more broadly denser connectivity, results in an exponential increase in the expressive capacity of neural networks. Moreover, while denser connectivity can increase the expressive capacity, we show that the most common types of modern architectures already exhibit exponential increase in expressivity, without relying on fully-connected layers. 1 I NTRODUCTION One of the most fundamental attributes of deep networks, and the reason for driving its empirical success, is the “Depth Efficiency” result which states that deeper models are exponentially more expressive than shallower models of similar size. Formal studies of Depth Efficiency include the early work on boolean or thresholded circuits (Sipser, 1983; Yao, 1989; Håstad and Goldmann, 1991; Hajnal et al., 1993), and the more recent studies covering the types of networks used in practice (Pascanu et al., 2013; Montúfar et al., 2014; Eldan and Shamir, 2016; Cohen et al., 2016a; Cohen and Shashua, 2016; Telgarsky, 2016; Safran and Shamir, 2016; Raghu et al., 2016; Poole et al., 2016). What makes the Depth Efficiency attribute so desirable, is that it brings exponential increase in expressive power through merely a polynomial change in the model, i.e. the addition of more layers. Nevertheless, depth is merely one among many architectural attributes that define modern networks. The deep networks used in practice consist of architectural features defined by various schemes of connectivity, convolution filter defined by size and stride, pooling geometry and activation functions. Whether or not those relate to expressive efficiency, as depth has proven to be, remains an open question. In order to study the effect of network design on expressive efficiency we should first define ”efficiency” in broader terms. Given two network architectures A and B, we say that architecture A is expressively efficient with respect to architecture B, if the following two conditions hold: (i) any function h realized by B of size rB can be realized (or approximated) by A with size rA ∈ O(rB ); (ii) there exist a function h realized by A with size rA , that cannot be realized (or approximated) by B, unless rB ∈ Ω(f (rA )) for some super-linear function f . The exact definition of the sizes rA and rB depends on the measurement we care about, e.g. the number of parameters, or the number of “neurons”. The nature of the function f in condition (ii) determines the type of efficiency taking place – if f is exponential then architecture A is said to be exponentially efficient with respect to 1 Published as a conference paper at ICLR 2018 architecture B, and if f is polynomial so is the expressive efficiency. Additionally, we say A is completely efficient with respect to B, if condition (ii) holds not just for some specific functions (realizable by A), but for all functions other than a negligible set. In this paper we study the efficiency associated with the architectural attribute of convolutions, namely the size of convolutional filters (receptive fields) and more importantly its proportion to their stride. We say that a network architecture is of the non-overlapping type when the size of the local receptive field in each layer is equal to the stride. In that case, the sets of pixels participating in the computation of each two neurons in the same layer are completely separated. When the stride is smaller than the receptive field we say that the network architecture is of the overlapping type. In the latter case, the overlapping degree is determined by the total receptive field and stride projected back to the input layer – the implication being that for the overlapping architecture the total receptive field and stride can grow much faster than with the non-overlapping case. As several studies have shown, non-overlapping convolutional networks do have some theoretical merits. Namely, non-overlapping networks are universal (Cohen et al., 2016a; Cohen and Shashua, 2016), i.e. they can approximate any function given sufficient resources, and in terms of optimization, under some conditions they actually possess better convergence guaranties than overlapping networks. Despite the above, there are only few instances of strictly non-overlapping networks used in practice (e.g. Sharir et al. (2016); van den Oord et al. (2016)), which raises the question of why are non-overlapping architectures so uncommon? Additionally, when examining the kinds of architectures typically used in recent years, which employ a mixture of both overlapping and nonoverlapping layers, there is a trend of using ever smaller receptive fields, as well as non-overlapping layers having an ever increasing role (Lin et al., 2014; Springenberg et al., 2015; Szegedy et al., 2015). Hence, the most common networks used practice, though not strictly non-overlapping, are increasingly approaching the non-overlapping regime, which raises the question of why having just slightly overlapping architectures seems sufficient for most tasks? In the following sections, we will shed some light on these questions by analyzing the role of overlaps through a surrogate class of convolutional networks called Convolutional Arithmetic Circuits (ConvACs) (Cohen et al., 2016a) – instead of non-linear activations and average/max pooling layers, they employ linear activations and product pooling. ConvACs, as a theoretical framework to study ConvNets, have been the focused of several works, showing, amongst other things, that many of the results proven on this class are typically transferable to standard ConvNets as well (Cohen and Shashua, 2016; 2017). Though prior works on ConvACs have only considered non-overlapping architectures, we suggest a natural extension to the overlapping case that we call Overlapping ConvACs. In our analysis, which builds on the known relation between ConvACs and tensor decompositions, we prove that overlapping architectures are in fact completely and exponentially more efficient than non-overlapping ones, and that their expressive capacity is directly related to their overlapping degree. Moreover, we prove that having even a limited amount of overlapping is sufficient for attaining this exponential separation. To further ground our theoretical results, we demonstrate our findings through experiments with standard ConvNets on the CIFAR10 image classification dataset. 2 OVERLAPPING C ONVOLUTIONAL A RITHMETIC C IRCUITS In this section, we introduce a class of convolutional networks referred to as Overlapping Convolutional Arithmetic Circuits, or Overlapping ConvACs for short. This class shares the same architectural features as standard ConvNets, including some that have previously been overlooked by similar attempts to model ConvNets through ConvACs, namely, having any number of layers and unrestricted receptive fields and strides, which are crucial for studying overlapping architectures. For simplicity, we will describe this model only for the case of inputs with two spatial dimensions, e.g. color images, and limiting the convolutional filters to the shape of a square. We begin by presenting a broad definition of a Generalized Convolutional (GC) layer as a fusion of a 1×1 linear operation with a pooling function – this view of convolutional layers is motivated by the all-convolutional architecture (Springenberg et al., 2015), which replaces all pooling layers with convolutions with stride previous layer H(in) R H(out) (R) x(1) · · · x .. . . . . .. . x(R R H(in) 2 GC layer 2 D(out) H (out) = H (in) S ) D(in) 2 2 2 y = g(W (1) x(1) + b(1) , . . . , W (R ) x(R ) + b(R ) ) Figure 1: An illustration of a GC Layer. Published as a conference paper at ICLR 2018 input representa(on hidden layer 1 GC hidden layer L-2 hidden layer L-1 GC R(1),S(1) xi GC (output) GC R(L-2),S(L-2) rep(i, d) = f✓d (xi ) M D(1) D(L-2) D(L-1) D(L) hy (x1 , . . . , xN ) Figure 2: An illustration of a Generalized Convolutional Network. greater than 1. The input to a GC layer is a 3order tensor (multi-dimensional array), having width and height equal to H (in) ∈ N and depth D(in) ∈ N, also referred to as channels, e.g. the input could be a 2D image with RGB color channels. Similarly, the output of the layer has width (in) and height equal to H (out) ∈ N and D(out) ∈ N channels, where H (out) = HS for S ∈ N that is referred to as the stride, and has the role of a sub-sampling operation. Each spatial location (i, j) at the output of the layer corresponds to a 2D window slice of the input tensor of size R × R × D(in) , extended through all the input channels, whose top-left corner is located exactly at (i·S, j ·S), where R ∈ N is referred to as its local receptive field, or filter size. For simplicity, the parts of window ((out) slices extending beyond the boundaries have zero value. Let y ∈ RD be a vector representing (in) (1) (R2 ) the channels at some location of the output, and similarly, let x , . . . , x ∈ RD be the set of vectors representing the slice, where each vector represents the channels at its respective location inside the R × R window, then the operation of a GC layer is defined as follows: 2 2 2 y = g(W (1) x(1) + b(1) , . . . , W (R ) x(R ) + b(R ) ), 2 (out) (in) 2 (out) ×D where W (1) , . . . , W (R ) ∈ RD and b(1) , . . . , b(R ) ∈ RD are referred to as the (out) (out) (out) weights and biases of the layer, respectively, and g : RD × · · · × RD → RD is some point-wise pooling function. See fig. 1 for an illustration of the operation a GC layer performs. With the above definitions, a GC network is simply a sequence of L GC layers, where for l ∈ [L] ≡ {1, . . . , L}, the l’th layer is specified by a local receptive field R(l) , a stride S (i) , D(l) output channels, parameters θ(l) , and a pooling function g (l) . For classification tasks, the output of the last layer of the network typically has 1×1 spatial dimensions, i.e. a vector, where each output channel y ∈ [Y ] ≡ [D(L) ] represents the score function of the y’th class, denoted by hy , and inference is perform by y ∗ = arg maxy hy (X). Oftentimes, it is common to consider the output of the very first layer of a network as a low-level feature representation of the input, which is motivated by the observation that these learned features are typically shared across different tasks and datasets over the same domain (e.g. edge and Gabor filters for natural images). Hence, we treat this layer as a separate fixed “zeroth” convolutional layer referred to as the representation layer, where the operation of the layer can be depicted as applying a set of fixed functions {fd : Rs → R}M d=1 to the window slices denoted by x1 , . . . , xN ∈ Rs , i.e. the entries of the output tensor of this layer are given by {fd (xi )}d∈[M ],i∈[N ] . With these notations, the output of a GC network can be viewed as a function hy (x1 , . . . , xN ). The entire GC network is illustrated in fig. 2. Given a non-linear point-wise activation function σ(·) (e.g. ReLU), then settingall poolingfunctions PR2 (i) 2 for c ∈ to average pooling followed by the activation, i.e. g(x(1) , . . . , x(R ) )c = σ i=1 xc [D(out) ], give rise to the common all-convolutional network with σ(·) activations, which served as the initial motivation for our formulation. Alternatively, choosing instead a product pooling QR2 (i) 2 function, i.e. g(x(1) , . . . , x(R ) )c = i=1 xc for c ∈ [D(out) ], results in an Arithmetic Circuit, i.e. a circuit containing just product and sum operations, hence it is referred to as a Convolutional Arithmetic Circuit, or ConvAC. It is important to emphasize that ConvACs, as originally introduced by Cohen et al. (2016a), are typically described in a very different manner, through the language of tensor decompositions (see app. A for background). Since vanilla ConvACs can be seen as an alternating sequence of 1×1 convolutions and non-overlapping product pooling layers, then the two formulations coincide when all GC layers are non-overlapping, i.e. for all l ∈ [L], R(l) = S (l) . If, however, some of the layers are overlapping, i.e. there exists l ∈ [L] such that R(l) > S (l) , then our formulation through GC layers diverges, and give rise to what we call Overlapping ConvACs. 3 Published as a conference paper at ICLR 2018 Given that our model is an extension of the ConvACs framework, it inherits many of its desirable attributes. First, it shares most of the same traits as modern ConvNets, i.e. locality, sharing and pooling. Second, it can be shown to form a universal hypotheses space (Cohen et al., 2016a). Third, its underlying operations lend themselves to mathematical analysis based on measure theory and tensor analysis (Cohen et al., 2016a). Forth, through the concept of generalized tensor decompositions (Cohen and Shashua, 2016), many of the theoretical results proven on ConvACs could be transferred to standard ConvNets with ReLU activations. Finally, from an empirical perspective, they tend to work well in many practical settings, e.g. for optimal classification with missing data (Sharir et al., 2016), and for compressed networks (Cohen et al., 2016b). While we have just established that the non-overlapping GC Network with a product pooling function is equivalent to vanilla ConvACs, one might wonder if using overlapping layers instead could diminish what these overlapping networks can represent. We show that not only is it not the case, but prove the more general claim that a network of a given architecture can realize exactly the same functions as networks using smaller local receptive fields, which includes the non-overlapping case. Proposition 1. Let A and B be two GC Networks with a product pooling function. If the architecture of B can be derived from A through the removal of layers with 1×1 stride, or by decreasing the local receptive field of some of its layers, then for any choice of parameters for B, there exists a matching set of parameters for A, such that the function realized by B is exactly equivalent to A. Specifically, A can realize any non-overlapping network with the same order of strides (excluding 1×1 strides). Proof sketch. This follows from two simple claims: (i) a GC layer can produce an output equivalent to that of a GC layer with a smaller local receptive field, by “zeroing” its weights beyond the smaller local receptive field; and (ii) GC layers with 1×1 receptive fields can be set such that their output is equal to their input, i.e. realize the identity function. With these claims, the local receptive fields of A can be effectively shrank to match the local receptive fields of B, and any additional layers of A with stride 1×1 could be set such that they are realizing the identity mapping, effectively “removing” them from A. See app. C.2 for a complete proof. Proposition 1 essentially means that overlapping architectures are just as expressive as nonoverlapping ones of similar structure, i.e. same order of non-unit strides. As we recall, this satisfies the first condition of the efficiency property introduced in sec. 1, and does so regardless if we measure the size of a network as the number of parameters, or the number of “neurons”1 . In the following section we will cover the preliminaries required to show that overlapping networks actually lead to an increase in expressive capacity, which under some settings results in an exponential gain, proving that the second condition of expressive efficiency holds as well. 3 A NALYZING E XPRESSIVE E FFICIENCY T HROUGH G RID T ENSORS In this section we describe our methods for analyzing the expressive efficiency of overlapping ConvACs that lay the foundation for stating our theorems. A minimal background on tensor analysis required to follow our work can be found in sec. 3.1, followed by presenting our methods in sec. 3.2. 3.1 P RELIMINARIES In this sub-section we cover the minimal background on tensors analysis required to understand our analysis. A tensor A ∈ RM1 ⊗···⊗MN of order N and dimension Mi in each mode i ∈ [N ] ≡ {1, . . . , N }, is a multi-dimensional array with entries Ad1 ,...,dN ∈ R for all i ∈ [N ] and di ∈ [Mi ]. For simplicity, henceforth we assume that all dimensions are equal, i.e. M ≡ M1 = . . . = MN . One of the central concepts in tensor analysis is that of tensor matricization, i.e. rearranging its entries to the shape of a matrix. Let P ∪· Q = [N ] be a disjoint partition of its indices, such that P = {p1 , . . . , p|P | } with p1 < . . . < p|P | , and Q = {q1 , . . . , q|Q| } with q1 < . . . < q|Q| . The matricization of A with respect to the partition P ∪· Q, denoted by JAKP,Q , is the M |P | -by-M |Q| matrix holding the entries of A, such that for all i ∈ [N ] and di ∈ [M ] the entry Ad1 ,...,dN is placed 1 We take here the broader definition of a “neuron”, as any one of the scalar values comprising the output array of an arbitrary layer in a network. In the case the output array is of width and height equal to H and C channels, then the number of such “neurons” for that layer is H 2 · C. 4 Published as a conference paper at ICLR 2018 P|P | P|Q| in row index 1 + t=1 (dpt − 1)M |P |−t and column index 1 + t=1 (dqt − 1)M |Q|−t . Lastly, the tensors we study in this article originate by examining the values of some given function at a set of predefined points and arranging them in a tensor referred to as the grid tensor of the function. Formally, let f : Rs ×. . .×Rs → R be a function, and let {x(1) , . . . , x(M ) ∈ Rs } be a set of vectors called template vectors, then the grid tensor of f is denoted by A(f ) ∈ RM ⊗...⊗M and defined by A(f )d1 ,...,dN = f (x(d1 ) , . . . , x(dN ) ) for all d1 , . . . , dN ∈ [M ]. 3.2 B OUNDING THE S IZE OF N ETWORKS VIA G RID T ENSORS We begin with a discussion on how to have a well-defined measure of efficiency. We wish to compare the efficiency of non-overlapping ConvACs to overlapping ConvACs, for a fixed set of M representation functions (see sec. 2 for definitions). While all functions realizable by non-overlapping ConvACs with shared representation functions lay in the same function subspace (see Cohen et al. (2016a)), this is not the case for overlapping ConvACs, which can realize additional functions outside the sub-space induced by non-overlapping ConvACs. We cannot therefore compare both architectures directly, and need to compare them through an auxiliary objective. Following the work of Cohen and Shashua (2016), we instead compare architectures through the concept of grid tensors, and specifically, the grid tensor defined by the output of a ConvAC, i.e. the tensor A(h) for h(x1 , . . . , xN ). Unlike with the ill-defined nature of directly comparing the functions of realized by ConvACs, Cohen and Shashua (2016) proved that assuming the fixed representation functions are linearly independent, then there exists template vectors x(1) , . . . , x(M ) , for which any nonoverlapping ConvAC architecture could represent all possible grid tensors over these templates, given sufficient number of channels at each layer. More specifically, if Fij = fi (x(j) ), then these template vector are chosen such that F is non-singular. Thus, once we fix a set of linearly independent representation functions, we can compare different ConvACs, whether overlapping or not, on the minimal size required for them to induce the same grid tensor, while knowing such a finite number always exists. One straightforward direction for separating between the expressive efficiency of two network architectures A and B is by examining the ranks of their respective matricized grid tensors. Specifically, Let A(h(A) ) and A(h(B) ) denote the grid tensors of A and B, respectively, and let (P, Q) be a partition of [N ], then we wish to find an upper-bound on the rank of JA(h(A) )KP,Q  as a function of its size on one hand, while showing on the other hand that rank JA(h(B) )KP,Q can be significantly greater. One benefit of studying efficiency through a matrix rank is that not only we attain separation bounds for exact realization, but also immediately gain access to approximation bounds by examining the singular values of the matricized grid tensors. This brings us to the following lemma, which connects upper-bounds that were previously found for non-overlapping ConvACs (Cohen and Shashua, 2017), with the grid tensors induced by them (see app. C.1 for proof): Lemma 1. Let hy (x1 , . . . , xN ) be a score function of a non-overlapping ConvAC with a fixed set of M linearly independent and continuous representation functions, and L GC layers. Let (P, Q) be a partition dividing the spatial dimensions of the output of the representation layer into two equal parts, either along the horizontal or vertical axis, referred to as the “left-right” and “top-bottom” partitions, respectively. Then, for any template vectors such that F is non-singular and for any choice of the parameters of the network, it holds that rank (JA(hy )KP,Q ) ≤ D(L−1) . Lemma 1 essentially means that it is sufficient to show that overlapping ConvACs can attain ranks super-polynomial in their size to prove they are exponentially efficient with respect to nonoverlapping ConvACs. In the next section we analyze how the overlapping degree is related to the rank, and under what cases it leads to an exponentially large rank. 4 T HE E XPRESSIVE E FFICIENCY OF OVERLAPPING A RCHITECTURES In this section we analyze the expressive efficiency of overlapping architectures. We begin by defining our measures of the overlapping degree that will used in our claims, followed by presenting our main results in sec. 4.2. For the sake of brevity, an additional set of results, in light of the recent work by Cohen and Shashua (2017) on “Pooling Geometry”, is deferred to app. B. 5 Published as a conference paper at ICLR 2018 4.1 T HE OVERLAPPING D EGREE OF A N ETWORK To analyze the efficiency of overlapping archiInput Layer tectures, we will first formulate more rigorously the measurement of the overlapping degree of Total a given architecture. As mentioned in sec. 1, Layer L-1 Stride we do so by defining the concepts of the total receptive field and total stride of a given (l) (l) Layer L layer l ∈ [L], denoted by TR and TS , reTotal spectively. Both measurements could simply be Receptive Field thought of as projecting the accumulated local receptive fields (or strides) to the the first layer, as illustrated in fig. 3, which represent a type of Figure 3: Illustrating the total receptive field and global statistics of the architecture. However, total stride attributes for the L’th layer, which note that proposition 1 entails that a given ar- could be seen as the projected receptive field and chitecture could have a smaller effective total stride with respect to the input layer. Together, receptive field, for some settings of its parame- they capture the overlapping degree of a network. ters. This leads us to define the α-minimal total receptive field, for any α ∈ R+ , as the smallest effective total receptive field still larger than α, (l,α) which we denote by TR . The exact definitions of the above concepts are formulated as follows: (Q l (i) l≥1 (l) (l) (1) (l) i=1 S TS ≡ TS (S , . . . , S ) ≡ (1) 1 l=0  Xl−1  (l) (l) (l−1) (k−1) TR ≡ TR (R(1) , S (1) , . . . , R(l) , S (l) ) ≡ R(l) · TS + R(k) − S (k) · TS (2) (l,α) TR ≡ (l,α) TR (R(1) , S (1) , . . . , R(l) , S (l) ) (l−1) where we omitted the arguments of TS ≡ argmin k=1 (l) TR (t1 , S (1) , . . . , tl , S (l) ) (3) ∀i∈[l],S (i) ≤ti ≤R(i) (l) TR (t1 ,S (1) ,...,tl ,S (l) )>α (k−1) and TS for the sake of visual compactness. Notice that for non-overlapping networks the total receptive field always equals the total stride, and that only at the end of the network, after the spatial dimension collapses to 1×1, does the the total receptive field grow to encompass the entire size of the representation layer. For overlapping networks this is not the case, and the total receptive field could grow much faster. Intuitively, this means that values in regions of the input layer that are far apart would be combined by non-overlapping networks only near the last layers of such networks, and thus non-overlapping networks are effectively shallow in comparison to overlapping networks. Base on this intuition, in the next section we analyze networks with respect to the point at which their total receptive field is large enough. 4.2 M AIN R ESULTS With all the preliminaries in place, we are ready to present our main result: Theorem 1. Assume a ConvAC with a fixed representation layer having M output channels and both width and height equal to H, followed by L GC layers, where the l’th layer has a local receptive field R(l) , a stride S (l) , and D(l) output channels. Let K ∈ [L] be a layer with a total receptive (K) (K) (K) field TR ≡ TR (R(1) , S (1) , . . . , R(K) , S (K) ), such that TR > H2 . Then, for any choice of parameters, except a null set (with respect to the Lebesgue measure), and for any template vectors such that F is non-singular, the following equality holds: rank (JA(hy )KP,Q ) ≥ D  & H    H−T (K,b /2c)  R  +1· T where (P, Q) is either the “left-right” D ≡ min{M, D(K) , 12 min1≤l≤K D(l) }. (K) S or the ' H (K) T S “top-bottom” (4) partitions and Proof sketch. Because the entries of the matricized grid tensors are polynomials in the parameters, then according to a lemma by Sharir et al. (2016), if there is a single example that attains the above 6 Published as a conference paper at ICLR 2018 input H representa+on > H 2 Arbitrary Layers Conv Conv stride 1x1 > H Conv H 2 M Output M Figure 4: A network architectures beginning with large local receptive fields greater than N/2 and at least M output channels. According to theorem 1, for almost all choice of parameters we obtain a function that cannot be approximated by a non-overlapping architecture, if the number of channels H2 in its next to last layer is less than M 2 . lower-bound on the rank, then it occurs almost everywhere with respect to the Lebesgue measure on the Euclidean space of the parameters. Given the last remark, the central part of our proof is simply the construction of such an example. First we find a set of parameters for the simpler case where the first GC layer is greater than a quarter of the input, satisfying the conditions of the theorem. The motivation behind the specific construction is the pairing of indices from each side of the partition, such that they are both in the same local receptive field, and designing the filters such that the output of each local application of them defines a mostly diagonal matrix of rank D, with respect to these two indices. The rest of the parameters are chosen such that the output of the entire network results in a product of the entries of these matrices. Under matricization, this results in a matrix who is equivalent2 to a Kronecker product of mostly diagonal matrices. Thus, the matricization rank is equal to the product of the ranks of these matrices, which results in the exponential form of eq. 4. Finally, we extend the above example to the general case, by realizing the operation of the first layer of the above example through multiple layers with small local receptive fields. See app. C.1 for the definitions and lemmas we rely on, and see app. C.3 for a complete proof. Combined with Lemma 1, it results in the following corollary: Corollary 1. Under the same setting as theorem 1, and for all choices of parameters of an overlapping ConvAC, except a negligible set, any non-overlapping ConvAC that realizes (or approximates) the same grid tensor must be of size at least: D  & H    H−T (K,b /2c)  R  +1· T (K) S ' H (K) T S . While the complexity of the generic lower-bound above might seem incomprehensible at first, its generality gives us the tools to analyze practically any kind of feed-forward architecture. As an example, we can analyze the lower bound for the well known GoogLeNet architecture (Szegedy et al., 2015), for which the lower bound equals 3298 , making it clear that using a non-overlapping architecture for this case is infeasible. Next, we will focus on specific cases for which we can derive more intelligible lower bounds. According to theorem 1, the lower bound depends on the first layer for which its total receptive field is greater than a quarter of the input. As mentioned in the previous section, for non-overlapping networks this only happens after the spatial dimension collapses to 1×1, which entails that both the total receptive field and total stride would be equal to the width H of the representation layer, and substituting this values in eq. 4 results simply in D – trivially meaning that to realize one nonoverlapping network by another non-overlapping network, the next to last layer must have at least half the channels of the target network. On the other extreme, we can examine the case where the first GC layer has a local receptive field R greater than a quarter of its input, i.e. R > H/2. Since the layers following the first GC layer do not affect the lower bound in this case, it applies to any arbitrary sequence of layers as illustrated in fig. 4. For simplicity we will also assume that the stride S is less than H/2, and that H2 is evenly divided 2 Two matrices are equivalent if one could be converted to the other by elementary row or column operations. 7 Published as a conference paper at ICLR 2018 input representa.on Block 0 BxB Conv Block L-1 2x2 Conv BxB Conv R: BxB S: 1x1 H 2x2 Conv output R: 2x2 S: 2x2 D(1) M H D(1) D(L-1) D(L-1) Figure 5: The common network architecture of alternating B×B “conv” and 2×2 “pooling” layers. If B ≤ H/5+1 and D(l) ≥ 2M for all 1 ≤ l < L, then the lower bound of theorem 1 for this (2B−1)2 4 network results in M by S. In this case the H2 2S . H 2 -minimal receptive field equals to H 2 + 1, and thus the lower bound results in D . Consider the case of D = M and S = 1, then a non-overlapping architecture that satisfies this lower bound is of the order of magnitude at which it could already represent any possible grid tensor. This demonstrate our point from the introduction, that through a a polynomial change in the architecture, i.e. increasing the receptive field, we get an exponential increase in expressivity. Though the last example already demonstrates that a polynomially sized overlapping architecture could lead to an exponential separation, in practice, employing such large convolutions is very resource intensive. The common best practice is to use multiple small local receptive fields of size B × B, where the typical values are B = 3 or B = 5, separated by a 2 × 2 “pooling” layers, i.e. layers with both stride and local receptive field equal to 2 × 2. For simplicity, we assume that H = 2L for some L ∈ N. See fig. 5 for an illustration of such a network. Analyzing the above network with theorem 1 results in the following proposition: Proposition 2. Consider a network comprising a sequence of GC blocks, each block begins with a layer whose local receptive field is B×B and its stride 1×1, followed by a layer with local receptive field 2×2 and stride 2×2, where the output channels of all layers are at least 2M , and the spatial dimension of the representation layer is H×H for H=2L . Then, the lower bound describe by eq. 4 for the above network is greater than or equal to: τ (B, H) ≡ M (2B−1)2 2 whose limits are limB→∞ τ (B, H) = M ing B ≤ H 5 + 1, then τ (B, H) ≥ M ·(1+ 2B−2 H ) H2 2 (2B−1)2 4 −2 =M H2 2 −2 H−1 ·(1+ 2B−1 ) and limH→∞ τ (B, H) = M , (2B−1)2 2 . Finally, assum- . Proof sketch. We first find a closed-form expression for the total receptive field and stride of each of the B×B layers in the given network. We then show that for layers whose total receptive field H H is greater than H 2 , its α-minimal total receptive field, for α= 2 , is equal to 2 +1. We then use the above to find the first layer who satisfies the conditions of theorem 1, and then use our closed-forms expressions to simplify the general lower bound for this case. See app. C.4 for a complete proof. In particular, for the typical values of M = 64, B = 5, and H ≥ 20, the lower bound is at least 6420 , which demonstrates that even having a small amount of overlapping already leads to an exponential separation from the non-overlapping case. When B grows in size, this bound approaches the earlier result we have shown for large local receptive fields encompassing more than a quarter of the image. When H grows in size, the lower bound is dominated strictly by the local receptive fields. Also notice that based on proposition 2, we could also derive a respective lower bound for a network following VGG style architecture (Simonyan and Zisserman, 2014), where instead of a single convolutional layer before every “pooling” layer, we have K layers, each with a local receptive field of C × C. Under this case, it is trivial to show that the bound from proposition 2 holds for B = K · (C − 1) + 1, and under the typical values of C = 3 and K = 2 it once again results in a lower bound of at least 6420 . 8 100.00 93.33 86.67 80.00 73.33 66.67 60.00 53.33 46.67 40.00 B=1 B=2 B=3 B=4 B=5 16 32 64 128 256 Number of Channels 512 1024 32 64 128 256 Number of Channels 512 1024 100.00 93.33 86.67 80.00 73.33 B=1 66.67 B=2 60.00 B=3 53.33 B=4 46.67 B=5 40.00 1.0e+03 4.1e+03 1.6e+04 6.6e+04 2.6e+05 1.0e+06 4.2e+06 1.7e+07 100.00 93.33 86.67 80.00 73.33 B=1 66.67 B=2 60.00 B=3 53.33 B=4 46.67 B=5 40.00 1.0e+03 4.1e+03 1.6e+04 6.6e+04 2.6e+05 1.0e+06 4.2e+06 1.7e+07 6.7e+07 2048 B=1 B=2 B=3 B=4 B=5 16 Train Accuracy (%) 100.00 93.33 86.67 80.00 73.33 66.67 60.00 53.33 46.67 40.00 Train Accuracy (%) Train Accuracy (%) Train Accuracy (%) Published as a conference paper at ICLR 2018 Number of Parameters 2048 Number of Parameters Figure 6: Training accuracies of standard ConvNets on CIFAR-10 with data augmentations, where the results of spatial augmentations presented at the top row, and color augmentations at the bottom row. Each network follows the architecture of proposition 2, with with receptive field B and using the same number of channels across all layers, as specified by the horizontal axis of left plot. We plot the same results with respect to the total number of parameters in the right plot. 5 E XPERIMENTS In this section we show that the theoretical results of sec. 4.2 indeed hold in practice. In other words, there exists tasks that require the highly expressive power of overlapping architectures, on which non-overlapping architectures would have to grow by an exponential factor to achieve the same level of performance. We demonstrate this phenomenon on standard ConvNets with ReLU activations that follow the same architecture that was outlined in proposition 2, while varying the number of channels and the size of the receptive field of the B×B “conv” layers. The only change we made, was to replace the 2×2-“pooling” layers of the convolutional type, with the standard 2×2max-pooling layers, and using the same number of channels across all layers. This was done for the purpose of having all the learned parameters located only at the (possibly) overlapping layers. More specifically, the network has 5 blocks, each starting with a B×B convolution with C channels, stride 1×1, and ReLU activation, and then followed by 2×2 max-pooling layer. After the fifth “conv-pool”, there is a final dense layer with 10 outputs and softmax activations. We train each of these networks for classification over the CIFAR-10 dataset, with two types of data augmentation schemes: (i) spatial augmentations, i.e. randomly translating (up to 3 pixels in each direction) and horizontally flipping each image, and (ii) color augmentations following Dosovitskiy et al. (2014), i.e. randomly adding a constant shift (at most ±0.3) to the hue, saturation, and luminance, for each attribute separately, and in addition randomly sampling a multiplier (in the range [0.5, 1.5]) just to the saturation and luminance. Though typically data augmentation is only used for the purpose of regularization, we employ it for the sole purpose of raising the hardness of the regular CIFAR-10 dataset, as even small networks can already overfit and effectively memorize its small dataset. We separately test both the spatial and color augmentation schemes to emphasize that our empirical results cannot be explained simply by spatial-invariance type arguments. Finally, the training itself is carried out for 300 epochs with ADAM (Kingma and Ba, 2015) using its standard hyper-parameters, at which point the loss of the considered networks have stopped decreasing. We report the training accuracy over the augmented dataset in fig. 6, where for each value of the receptive field B, we plot its respective training accuracies for variable number of channels C. The source code for reproducing the above experiments and plots can be found at https://github.com/HUJI-Deep/OverlapsAndExpressiveness. It is quite apparent that the greater B is chosen, the less channels are required to achieve the same accuracy. Moreover, for the non-overlapping case of B=1, more than 2048 channels are required to reach the same performance of networks with B>2 and just 64 channels under the spatial aug9 Published as a conference paper at ICLR 2018 mentations – which means effectively exponentially more channels were required. Even more so, under the color augmentations, we were not able to train non-overlapping networks to reach even the smallest overlapping network (B = 2 and C = 16). In terms of total number of parameters, there is a clear separation between the overlapping and the non-overlapping types, and we once again see more than an order of magnitude increase in the number of parameters between an overlapping and non-overlapping architectures that achieve similar training accuracy. As a somewhat surprising result, though based only on our limited experiments, it appears that for the same number of parameters, all overlapping networks attain about the same training accuracy, suggesting perhaps that having the smallest amount of overlapping already attain all the benefits overlapping provides, and that increasing it further does not affect the performance in terms of expressivity. As final remark, we also wish to acknowledge the limitations of drawing conclusions strictly from empirical experiments, as there could be alternative explanations to these observations, e.g. the effects overlapping has on the optimization process. Nevertheless, our theoretical results suggests this is less likely the case. 6 D ISCUSSION The common belief amongst deep learning researchers has been that depth is one of the key factors in the success of deep networks – a belief formalized through the depth efficiency conjecture. Nevertheless, depth is one of many attributes specifying the architecture of deep networks, and each could potentially be just as important. In this paper, we studied the effect overlapping receptive fields have on the expressivity of the network, and found that having them, and more broadly denser connectivity, results in an exponential gain in the expressivity that is orthogonal to the depth. Our analysis sheds light on many trends and practices in contemporary design of neural networks. Previous studies have shown that non-overlapping architectures are already universal (Cohen et al., 2016a), and even have certain advantages in terms of optimization (Brutzkus and Globerson, 2017), and yet, real-world usage of non-overlapping networks is scarce. Though there could be multiple factors involved, our results clearly suggest that the main culprit is that non-overlapping networks are significantly handicapped in terms of expressivity compared to overlapping ones, explaining why the former are so rarely used. Additionally, when examining the networks that are commonly used in practice, where the majority of the layers are of the convolutional type with very small receptive field, and only few if any fully-connected layers (Simonyan and Zisserman, 2014; Springenberg et al., 2015; He et al., 2016), we find that though they are obviously overlapping, their overlapping degree is rather low. We showed that while denser connectivity can increase the expressive capacity, even in the most common types of modern architectures already exhibit exponential increase in expressivity, without relying on fully-connected layers. This could partly explain that somewhat surprising observation, as it is probable that such networks are sufficiently expressive for most practical needs simply because they are already in the exponential regime of expressivity. Indeed, our experiments seems to suggests the same, in which we saw that further increases in the overlapping degree beyond the most limited overlapping case seems to have insignificant effects on performance – a conjecture not quite proven by our current work, but one we wish to investigate in the future. There are relatively few other works which have studied the role of receptive fields in neural networks. Several empirical works (Li and Perona, 2005; Coates et al., 2011; Krizhevsky et al., 2012) have demonstrated similar behavior, showing that the classification accuracy of networks can sharply decline as the degree of overlaps is decreased, while also showing that gains from using very large local receptive fields are insignificant compared to the increase in computational resources. Other works studying the receptive fields of neural networks have mainly focused on how to learn them from the data (Coates and Ng, 2011; Jia et al., 2012). While our analysis has no direct implications to those specific works, it does lay the ground work for potentially guiding architecture design, through quantifying the expressivity of any given architecture. Lastly, Luo et al. (2016) studied the effective total receptive field of different layers, a property of a similar nature to our total receptive field, where they measure the the degree to which each input pixel is affecting the output of each activation. They show that under common random initialization of the weights, the effective total receptive field has a gaussian shape and is much smaller than the maximal total receptive field. They additionally demonstrate that during training the effective total receptive field grows in size, and suggests that weights should be initialized such that the initial effective receptive field is 10 Published as a conference paper at ICLR 2018 large. Their results strengthen our theory, by showing that trained networks tend to maximize their effective receptive field, taking full potential of their expressive capacity. To conclude, we have shown both theoretically and empirically that overlapping architectures have an expressive advantage compared to non-overlapping ones. Our theoretical analysis is grounded on the framework of ConvACs, which we extend to overlapping configurations. Though are proofs are limited to this specific case, previous studies (Cohen and Shashua, 2016) have already shown that such results could be transferred to standard ConvNets as well, using most of the same mathematical machinery. While adapting our analysis accordingly is left for future work, our experiments on standard ConvNets (see sec. 5) already suggest that the core of our results should hold in this case as well. Finally, an interesting outcome of moving from non-overlapping architectures to overlapping ones is that the depth of a network is no longer capped at log2 (input size), as has been the case in the models investigated by Cohen et al. (2016a) – a property we will examine in future works ACKNOWLEDGMENTS This work is supported by Intel grant ICRI-CI #9-2012-6133, by ISF Center grant 1790/12 and by the European Research Council (TheoryDL project). R EFERENCES Alon Brutzkus and Amir Globerson. Globally Optimal Gradient Descent for a ConvNet with Gaussian Inputs. In International Conference on Machine Learning ICML, February 2017. Adam Coates and Andrew Y Ng. Selecting Receptive Fields in Deep Networks. Advances in Neural Information Processing Systems, 2011. Adam Coates, Andrew Y Ng, and Honglak Lee. An Analysis of Single-Layer Networks in Unsupervised Feature Learning. International Conference on Artificial Intelligence and Statistics, pages 215–223, 2011. Nadav Cohen and Amnon Shashua. Convolutional Rectifier Networks as Generalized Tensor Decompositions. In International Conference on Machine Learning, May 2016. Nadav Cohen and Amnon Shashua. Inductive Bias of Deep Convolutional Networks through Pooling Geometry. In International Conference on Learning Representations ICLR, April 2017. Nadav Cohen, Or Sharir, and Amnon Shashua. On the Expressive Power of Deep Learning: A Tensor Analysis. In Conference on Learning Theory COLT, May 2016a. Nadav Cohen, Or Sharir, and Amnon Shashua. Deep SimNets. In Computer Vision and Pattern Recognition CVPR, May 2016b. Alexey Dosovitskiy, Jost Tobias Springenberg, Martin A Riedmiller, and Thomas Brox. Discriminative Unsupervised Feature Learning with Convolutional Neural Networks. In Advances in Neural Information Processing Systems NIPS, Deep Learning Workshop, 2014. Ronen Eldan and Ohad Shamir. The Power of Depth for Feedforward Neural Networks. In Conference on Learning Theory COLT, May 2016. Wolfgang Hackbusch. Tensor Spaces and Numerical Tensor Calculus, volume 42 of Springer Series in Computational Mathematics. Springer Science & Business Media, Berlin, Heidelberg, February 2012. András Hajnal, Wolfgang Maass, Pavel Pudlák, Mario Szegedy, and György Turán. Threshold Circuits of Bounded Depth. J. Comput. Syst. Sci. (), 46(2):129–154, 1993. Johan Håstad and Mikael Goldmann. On the Power of Small-Depth Threshold Circuits. Computational Complexity (), 1(2):113–129, 1991. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. Computer Vision and Pattern Recognition, pages 770–778, 2016. Yangqing Jia, Chang Huang, and Trevor Darrell. Beyond spatial pyramids - Receptive field learning for pooled image features. Computer Vision and Pattern Recognition, 2012. Diederik Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In International Conference on Learning Representations, 2015. 11 Published as a conference paper at ICLR 2018 Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet Classification with Deep Convolutional Neural Networks. Advances in Neural Information Processing Systems, pages 1106–1114, 2012. Fei-Fei Li and Pietro Perona. A Bayesian Hierarchical Model for Learning Natural Scene Categories. Computer Vision and Pattern Recognition, 2:524–531, 2005. Min Lin, Qiang Chen, and Shuicheng Yan. Network In Network. In International Conference on Learning Representations ICLR, 2014. Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard S Zemel. Understanding the Effective Receptive Field in Deep Convolutional Neural Networks. Advances in Neural Information Processing Systems, pages 4898– 4906, 2016. Guido F Montúfar, Razvan Pascanu, Kyunghyun Cho, and Yoshua Bengio. On the Number of Linear Regions of Deep Neural Networks. CoRR abs/1202.2745, stat.ML:2924–2932, 2014. Razvan Pascanu, Guido Montufar, and Yoshua Bengio. On the number of response regions of deep feed forward networks with piece-wise linear activations. arXiv.org, December 2013. Ben Poole, Subhaneil Lahiri, Maithreyi Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances in Neural Information Processing Systems NIPS, Deep Learning Workshop, 2016. Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli, and Jascha Sohl-Dickstein. On the expressive power of deep neural networks. arXiv.org, June 2016. Itay Safran and Ohad Shamir. Depth Separation in ReLU Networks for Approximating Smooth Non-Linear Functions. CoRR abs/1202.2745, cs.LG, 2016. Or Sharir, Ronen Tamari, Nadav Cohen, and Amnon Shashua. Tensorial Mixture Models. arXiv.org, October 2016. Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. CoRR abs/1202.2745, cs.CV, 2014. Michael Sipser. Borel sets and circuit complexity. ACM, New York, New York, USA, December 1983. Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for Simplicity: The All Convolutional Net. In Workshop track of International Conference on Learning Representations, 2015. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going Deeper with Convolutions. In Computer Vision and Pattern Recognition CVPR, 2015. Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. DeepFace: Closing the Gap to HumanLevel Performance in Face Verification. In Computer Vision and Pattern Recognition CVPR. IEEE Computer Society, June 2014. Matus Telgarsky. Benefits of depth in neural networks. In Conference on Learning Theory COLT, May 2016. Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. CoRR abs/1609.03499, 2016. Andrew Chi-Chih Yao. Circuits and Local Computation. STOC, pages 186–196, 1989. 12 Published as a conference paper at ICLR 2018 input X hidden layer 0 representa.on 1x1 conv hidden layer L-1 pooling 1x1 conv pooling dense (output) rL-1 Y xi r0 M rep(i, d) = f✓d (xi ) pool0 (j, ) = ⌦ ↵ conv(j, ) = a0,j, , rep(j, :) Y rL-1 r0 conv0 (j 0 , ) poolL 1 ( )= Y convL 0 1 (j , ) j 0 covers space j 0 2window ⌦ out(y) = aL,y , poolL 1 (:) ↵ Figure 7: The original Convolutional Arithmetic Circuits as presented by Cohen et al. (2016a). A BACKGROUND ON C ONVOLUTIONAL A RITHMETIC C IRCUITS We base our analysis on the convolutional arithmetic circuit (ConvAC) architecture introduced by Cohen et al. (2016a), which is illustrated by fig. 7, and can be simply thought of as a regular ConvNet, but with linear activations and product pooling layers, instead of the more common non-linear activations (e.g. ReLU) and average/max pooling. More specifically, each point in the input space of the network, denoted by X = (x1 , . . . , xN ), is represented as an N -length sequence of s-dimensional vectors x1 , . . . , xN ∈ Rs . X is typically thought of as an image, where each xi corresponds to a local patches from that image. The first layer of the network is referred to as the representation layer, consisting of applying M representation functions fθ1 , . . . , fθM : Rs → R on each local patch xi , giving rise to M feature maps. Under the common setting, where the representation functions are selected to be fθd (x) = σ(wdT x + bd ) for some point-wise activation σ(·) and parameterized by θd = (wd , bd ) ∈ Rs × R, the representation layer reduces to the standard convolutional layer. Other possibilities, e.g. gaussian functions with diagonal covariances, have also been considered in Cohen et al. (2016a). Following the representation layer, are hidden layers indexed by l = 0, . . . , L − 1, each begins with a 1 × 1 conv operator, which is just an rl−1 × 1 × 1 convolutional layer with rl−1 input channels and rl output channels, with the sole exception that parameters of each kernel could be spatially unshared (known as locally-connected layer (Taigman et al., 2014)). Following each conv layer is a spatial pooling, that takes products of non-overlapping two-dimensional windows covering the output of the previous layer, where for l = L − 1 the pooling window is the size of the entire spatial dimension (i.e. global pooling), reducing its output’s shape to a rL−1 × 1 × 1, i.e. an rL−1 -dimensional vector. The final L layer maps this vector with a dense linear layer into the Y network outputs, denoted by hy (x1 , . . . , xN ), representing score functions classifying each X to one of the classes through: y ∗ = argmaxy hy (x1 , . . . , xN ). As shown in Cohen et al. (2016a), these functions have the following form: hy (x1 , . . . , xN ) = M X Ayd1 ,...,dN d1 ,...,dN =1 N Y fθdi (xi ) (5) i=1 where Ay , called the coefficients tensor, is a tensor of order N and dimension M in each mode, which for the sake of discussion can simply be seen as a multi-dimensional array, specified by N indices d1 , . . . , dN each ranging in {1, . . . , M }, with entries given by polynomials in the network’s conv weights. A byproduct of eq. 5 is that for a fixed set of M representation functions, all functions represented by ConvACs lay in the same subspace of functions. B C OMPARISON TO P OOLING G EOMETRY From theorem 1 we learn that overlaps give rise to networks which almost always cannot be efficiently implemented by non-overlapping ConvAC with standard pooling geometry. However, as proven by Cohen and Shashua (2017), a ConvAC that uses a different pooling geometry – i.e. the input to the pooling layers are not strictly contiguous windows from the previous layer – also cannot be efficiently implemented by the standard ConvAC with standard pooling geometry. This raises the question of whether overlapping operations are simply equivalent to a ConvAC with a different pooling geometry and nothing more. We answer this question in two parts. First, a ConvAC with a different pooling geometry might be able to implement some function more efficiently than ConvAC with standard pooling geometry, however, the reverse is also true, that a ConvAC with standard pooling can implement some functions more efficiently than ConvAC with alternative pooling. In contrast, a ConvAC that uses overlaps is still capable to implement efficiently any function that a non-overlapping ConvAC with standard pooling can. Second, we can also show that some overlapping architectures are exponentially efficient than any non-overlapping ConvAC regardless of its pooling geometry. This is accomplished by first extending lemma 1 to this case: 13 Published as a conference paper at ICLR 2018 Lemma 2. Under the same conditions as lemma 1, if for all partitions P ∪· Q such that |P | = |Q| = N/2 it holds that rank (JA(hy )KP,Q ) ≥ T , then any non-overlapping ConvAC regardless of its pooling geometry must have at least T channels in its next to last layer to induce the same grid tensor. Next, in theorem 2 below show that some overlapping architectures can induce grid tensors whose matricized rank is exponential for any equal partition of its indices, proving they are indeed exponentially more efficient: Theorem 2. Under the same settings as theorem 1, consider a GC network whose representation layer is followed by a GC layer with local receptive field H × H, stride 1 × 1, and D ≥ M output channels, whose parameters are “unshared”, i.e. unique to each spatial location in the output of the layer as opposed to shared across them, followed by (L − 1) arbitrary GC layers, whose final output is a scalar. For any choice of the parameters, except a null set (with respect to the Lebesgue measure) and for any template vectors such that F H2 is non-singular, then the matricized rank of the induced grid tensor is equal to M 2 , for any equal partition of the indices. The exact same result holds if the parameters of the first GC layers are “shared” and D ≥ M · H 2 . Proof sketch. We follow the same steps of our proof of theorem 1, however, we do not construct just one specific overlapping network that attains a rank of D ≥ M · H 2 , for all possible matricizations of the induced grid tensor. Instead, we construct a separate network for each possible matricization. This proves that with respect to the Lebesgue measure over the network’s parameters space, separately for each pooling geometry, the set of parameters for which the lower bound does not hold is of measure zero. Since a finite union of zero measured sets is also of measure zero, then the lower bound with respect to all possible pooling geometries holds almost everywhere, which concludes the proof sketch. See app. C.5 for a complete proof. It is important to note that though the above theorem shows that pooling geometry on its own is less expressive than overlapping networks with standard pooling, it does not mean that pooling geometry is irrelevant. Specifically, we do not yet know the effect of combining both overlaps and alternative pooling geometries together. Additionally, many times sufficient expressivity is not the main obstacle for solving a specific task, and the inductive bias induced by a carefully chosen pooling geometry could help reduce overfitting. C D EFERRED P ROOFS In this section we present our proofs for the theorems and claims stated in the body of the article. C.1 P RELIMINARIES In this section we lay out the preliminaries required to understand the proofs in the following sections. We begin with a limited introduction to tensor analysis, followed by quoting a few relevant known results relating tensors to ConvACs. We begin with basic definitions and operations relating to tensors. Let A ∈ RM1 ⊗···⊗MN be a tensor of order N and dimension Mi in each mode i ∈ [N ] (where [N ] = {1, . . . , N }), i.e. Ad1 ,...,dN ∈ R for all i ∈ [N ] (2) (1) and di ∈ [Mi ]. For tensors A(1) and A(2) of orders N (1) and N (2) , and dimensions Mi1 and Mi2 in each of (1) (2) (1) (2) the modes i1 ∈ [N ] and i2 ∈ [N ], respectively, we define their tensor product A ⊗ A as the order N (1) + N (2) tensor, where   (1) (2) A(1) ⊗ A(2) = Ad1 ,...,d (1) · Ad (1) ,...,d (1) (2) d1 ,...,d (1) N +N (2) N N +1 N +N For a set of vectors v(1) ∈ RM1 , . . . , v(N ) ∈ RMN , the N ordered tensor A = v(1) ⊗· · ·⊗v(N ) is called an elementary tensor, or rank-1 tensor. More generally, any tensor can be represented as a linear combination of P (Z,1) rank-1 tensors, i.e. A = Z ⊗· · ·⊗v(Z,1) , known as rank-1 decomposition, or CP decomposition, z=1 v where the minimal Z for which this equality holds is knows as the tensor rank of A. Given a set of matrices 0 0 F (1) ∈RM1 ×M1 , . . . , F (N ) ∈RMN ×MN , we denote by F = (F (1) ⊗· · ·⊗F (N ) ) the linear transformation from 0 0 RM1 ⊗···⊗MN to RM1 ⊗···⊗MN , such that for any elementary tensor A, with notations as above, it holds that: F(A) = F (1) (v(1) ) ⊗ · · · ⊗ F (N ) (v(N ) ) F(A) is defined for a general tensor A through its rank-1 decomposition comprising elementary tensors and applying F on each of them, which can be shown to be equivalent to F(A)k1 ,...,kN = M1 X d1 =1 MN ··· X dN =1 14 Ad1 ,...,dN N Y i=1 (i) Fki ,di (6) Published as a conference paper at ICLR 2018 · = [N ] be a disjoint partition of its A central concept in tensor analysis is that of tensor matricization. Let P ∪Q indices, such that P = {p1 , . . . , p|P | } with p1 < . . . < p|P | , and Q = {q1 , . . . , q|Q| } withq1 < . . . <q|Q| . Q|P | The matricization of A with respect to the partition P ∪· Q, denoted by JAKP,Q , is the t=1 Mpt -by Q |Q| matrix holding the entries of A, such that for all i ∈ [N ] and di ∈ [Mi ] the entry Ad1 ,...,dN is t=1 Mqt Q|Q| P|Q| Q|P | P | placed in row index 1 + |P t=1 (dqt − 1) t=1 (dpt − 1) t0 =t+1 Mqt0 . t0 =t+1 Mpt0 and column index 1 + Applying the matricization operator J·KP,Q on the tensor product operator results in the Kronecker Product, i.e. for an N -ordered tensor A, a K-ordered tensor B, and the partition P ∪· Q = [N + K], it holds that JA ⊗ BKP,Q = JAKP ∩[N ],Q∩[N ] JBK(P −N )∩[K],(Q−N )∩[K] where P − N and Q − N are simply the sets obtained by subtracting the number N from every element of P or Q, respectively. In concrete terms, the Kronecker product for the matrices A ∈ RM1 ×M2 and B ∈ RN1 ×N2 results in the matrix A B ∈ RM1 N1 ×M2 N2 holding Aij Bkl in row index (i − 1)N1 + k and column index (j − 1)N2 + l. An important property of the Kronecker product is that rank (A B) = rank (A) · rank (B). Typically, when wish to compute rank (JAKP,Q ), we will first decompose it to a Kronecker product of matrices. For a linear transform F, as defined above in eq.6, and a partition P ∪· Q, if F (1) , . . . , F (N ) are non-singular matrices, then F is invertible and the matrix rank of JAKP,Q equals to the matrix rank of JF(A)KP,Q (see proof in Hackbusch (2012)). Finally, we define the concept of grid tensors: for a function f : Rs × · · · × Rs → R and a set of template vectors x(1) , . . . , x(M ) ∈ Rs , the N -order grid tensor A(f ) is defined by (A(f ))d1 ,...,dN = f (x(d1 ) , . . . , x(dN ) ). In the context of ConvACs, circuits and the functions they can realize are typically examined through the matricization of the grid tensors they induce. The following is a succinct summary of the relevant known results used in our proofs – for a more detailed discussion, see previous works (Cohen et al., 2016a; Cohen and Shashua, 2016; 2017). Using the same notations from eq. 5 describing a general ConvAC, let Ay be the coefficients tensor of order N and dimension M in each mode, and let fθ1 , . . . , fθM :Rs →R be a set of M representation functions (see app. A). Under the above definitions, a non-overlapping ConvAC can be said to decompose the coefficients tensor Ay . Different network architectures correspond to known tensor decompositions: shallow networks corresponds to rank-1 decompositions, and deep networks corresponds to Hierarchical Tucker decompositions. In Cohen and Shashua (2017), it was found that the matrix rank of the matricization of the coefficients tensors Ay could serve as a bound for the size of networks decomposing Ay . For the conventional non-overlapping ConvAC and the contiguous “low-high” partition P = {1, . . . , N/2}, Q = {N/2 + 1, . . . , N } of [N ], the rank of the matricization JAy KP,Q serves as a lower-bound on the number of channels of the next to last layer of any network which decomposes the coefficients tensor A. In the common case of square inputs, i.e. the input is of shape H × H and N = H 2 , it is more natural to represent indices by pairs (j, i) denoting the spatial location of each “patch” x(j,i) , where the first argument denotes the vertical location and the second denotes the horizontal location. Under such setting the equivalent “low-high” partitions are either the “left-right” partition, i.e. P = {(j, i)|j ≤ H }, Q = {(j, i)|j > H }, or the “top-bottom” partition, i.e. P = {(j, i)|i ≤ H }, Q = 2 2 2 H {(j, i)|i > 2 }. More generally, when considering networks using other pooling geometries, i.e. not strictly contiguous pooling windows, then for each pooling geometry there exists a corresponding partition P ∪· Q such that rank (JAy KP,Q ) serves as its respective lower-bound. Though the results in Cohen and Shashua (2017) are strictly based on the matricization rank of the coefficients tensors, they can be transferred to the matricization rank of grid tensors as well. Grid tensors were first considered for analyzing ConvACs in Cohen and Shashua (2016). For a set of M template vectors x(1) , . . . , x(M ) ∈ Rs , we define the matrix F ∈ RM ×M by Fij = fθj (x(i) ). With the above notations in place, we can write the the grid tensor A(hy ) for the function hy (x1 , . . . , xN ) as: A(hy )k1 ,...,kN = hy (x(k1 ) , . . . , x(kN ) ) = M X Ayd1 ,...,dN = fθdi (x(ki ) ) i=1 d1 ,...,dN =1 M X N Y Ayd1 ,...,dN d1 ,...,dN =1 N Y Fki ,di i=1 ⇒ A(hy ) = (F ⊗ · · · ⊗ F )(Ay ) If the representation functions are linearly independent and continuous, then we can choose the template vectors such that F is non-singular (see Cohen and Shashua (2016)), which according to the previous discussion on tensor matricization, means that for any partition P ∪· Q and any coefficients tensor Ay , it holds that rank (JAy KP,Q ) = rank (JA(hy )KP,Q ). Thus, any lower bound on the matricization rank of the grid tensor 15 Published as a conference paper at ICLR 2018 translates to a lower bound on the matricization rank of the coefficients tensors, which in turn serves as lower bound on the size of non-overlapping ConvACs. The above discussion leads to the proof of lemma 1 and lemma 2 that were previously stated: Proof of lemma 1 and lemma 2. For the proofs of the base results with respect to the coefficients tensor, see Cohen and Shashua (2017). To prove it is possible to choose the template vectors such that F is non-singular, see Cohen and Shashua (2016). To prove that if F is non-singular, then the grid tensor and the coefficients tensor have the same matricization rank, see lemma 5.6 in Hackbusch (2012). We additionally quote the following lemma regarding the prevalence of the maximal matrix rank for matrices whose entries are polynomial functions: Lemma 3. Let M, N, K ∈ N, 1 ≤ r ≤ min{M, N } and a polynomial mapping A : RK → RM ×N , i.e. for every i ∈ [M ] and j ∈ [N ] it holds that Aij : Rk → R is a polynomial function. If there exists a point x ∈ RK such that rank (A(x)) ≥ r, then the set {x ∈ RK |rankA(x) < r} has zero measure (with respect to the Lebesgue measure over RK ). Proof. See Sharir et al. (2016). Finally, we simplify the notations of the GC layer with product pooling function for the benefit of following our (l−1) ×R(l) ×R(l) proofs below. We will represent the parameters of the l’th GC layer by {(w(l,c) ∈ RD , b(l,c) ∈ (l) (l) (in) (in) (in) RR ×R )}c∈[D(l) ] , where w(l,c) represents the weights and b(l,c) the biases. Let X ∈ RH ×H ×D be the input to the layer and Y ∈ RD Yc,u,v (out) ×H (out) ×H (out) be the output, then the following equality holds:   (in) (l) (l) D R X (l,c) YR Y (l,c) bji + wdji Xd,uS (l) +j,vS (l) +i  (7) = j=1 i=1 d=1 The above treats the common case where the parameters are shared across all spatial locations, but sometimes we wish to consider the “unshared” case, in which there is are different weights (l−1) ×R(l) ×R(l) and biases for each location, which we denote by {(w(l,c,u,v) ∈ RD , b(l,c,u,v) ∈ R(l) ×R(l) R )}c∈[D(l) ],u∈[H (out) ],v∈[H (out) ] . With the above definitions and lemmas in place, we are ready to prove the propositions and theorems from the body of the article. C.2 P ROOF OF P ROPOSITION 1 Proposition 1 is a direct corollary of the following two claims: (in) (in) (in) (out) (out) (out) ×H ×H be a function realized by a single GC → RD Claim 1. Let f :RD ×H ×H layer with R × R local receptive field, S × S stride, and D(out) output channels, that is parameterized by (out) {(w(c) , b(c) )}D . For all R̃ ≥ R, a GC layer with R̃×R̃ local receptive field, S×S stride, and C output c=1 (out) channels, parameterized by {(w̃(c) , b̃(c) )}D , could also realize f . The same is true for the unshared case c=1 of both layers. Proof. The claim is trivially satisfied by setting w̃(c) such that it is equal to w(c) in all matching coordinates, while using zeros for all other coordinates. Similarly, we set b̃(c) to be equal to b(c) in all matching coordinates, while using ones for all other coordinates. (in) (in) (in) (out) (out) (out) ×H ×H Claim 2. Let f :RD ×H ×H → RD be a function realized by a GC layer with (out) R×R local receptive field and 1×1 stride, parameterized by {(w(c) , b(c) )}D . Then there exists an asc=1 signment to (w, b) such that f is the identity function f (X) = X. The same is true for the unshared case of both layers. Proof. From claim 1 it is sufficient to show the above holds for R = 1. Indeed, setting ( 1 d=c (c) wd =1[d=c] = 0 d 6= c and b(c) ≡ 0 satisfies the claim. 16 Published as a conference paper at ICLR 2018 C.3 P ROOF OF T HEOREM 1 We wish to show that for all choices of parameters, except a null set (with respect to Lebesgue measure) the grid tensor induced by the given GC network has rank satisfying eq. 4. Since the entries of the matricized grid tensor are polynomial function of its parameters, then according to lemma 3, it is sufficient to find a single example that achieves this bound. Hence, our proof is simply the construction of such an example. Recall that the template vectors must hold that for the matrix F , defined by Fij = fj (x(i) ), where {fj }M j=1 are the representation matrices, is a non-singular matrix. We additionally assume in the following claims that the output of the representation layer is of width and height equal to H ∈ N, where H is an even number – the claims and proofs can however be easily adapted to the more general case. Assume a ConvAC as described in the theorem, with representation layer defined according to above, followed by L GC layers, where the l’th layer has a local receptive field of R(l) , a stride of S (l) , and D(l) output channels. We first construct our example, that achieves the desired matricization rank, for the simpler case where the first layer following the representation layer has a local receptive field large enough, i.e. when it is larger than H . Recall that for the first layer the total receptive field is equal to its local receptive field. In the context of 2 theorem 1, this first layer satisfies the conditions necessary to produce the lower bound given in the theorem. The specific construction is presented in the following claim, which relies on utilizing the large local receptive field to match each spatial location in the left side of the input with one from the right side, such that for each such pair, the respective output of the first layer will represent a mostly diagonal matrix. We then set the rest of the parameters such that the output of the entire network is defined by a tensor product of mostly diagonal matrices. Since the matricization rank of the tensor product of matrices is equal to the product of the individual ranks, it results in an exponential form of the rank as is given in the theorem. Claim 3. Assume a ConvAC as defined above, ending with a single scalar output. For all l ∈ [L], the param(l−1) (l) (l) ×R(l) ×R(l) eters of the l-th GC layer are denoted by {(w(l,c) ∈ RD , b(l,c) ∈ RR ×R )}c∈[D(l) ] . Let h(x1 , . . . , xN ) be the function realized the output of network. Additionally define R ≡ R(1) , S ≡ S (1) and D ≡ min{D(1) , M }. If R > H , and the weights w(1,c) and biases b(1,c) of the first GC layer layer are set 2 to: (  −α F −1 m,c c ≤ D and (j, i) ∈ {(1, 1), (ρ, τ )} (1,c) wmji = 0 Otherwise   β c ≤ D and (j, i) ∈ {(1, 1), (ρ, τ )} (1,c) bji = 1 c ≤ D and (j, i) 6∈ {(1, 1), (ρ, τ )}  0 Otherwise where β = 2α , D then there exists an assignment to α and the parameters of the other GC layers such that H−R H rank (JA(h)KP,Q ) = Db S +1c·d S e , where P ∪· Q is either the “left-right” or “top-bottom” partition, and (ρ, τ ) equals to (1, R) or (R, 1), respectively. Proof. The proof for either the “left-right” or “top-bottom” partition is completely symmetric, thus it is enough to prove the claim for the “left-right” case, where (ρ, τ ) = (1, R). We wish to compute the entry A(h)d(1,1) ,...,d(H,H) of the induced grid tensor for arbitrary indices d(1,1) , . . . , d(H,H) . Let O ∈ RM ×H×H be the 3-order tensor output of the representation layer, where Om,j,i = Fd(j,i) ,m for the aforementioned indices and for all 1 ≤ i, j ≤ H and m ∈ [M ]. We begin by setting the parameters of all layers following the first GC layer, such that they are equal to computing the sum along the channels axis of the output of the first GC layer, followed by a global product of all of the resulting sums. To achieve this, we can first assume w.l.o.g. that these layers are non-overlapping through proposition 1. We then set the parameters of the second GC layer to w(2,c) = 1 and b(2,c) ≡ 0, i.e. all ones and all zeros, respectively, which is equivalent to taking the sum along the channels axis for each spatial location, followed by taking the products over non-overlapping local receptive fields of size R(2) . For the other layers, we simply set them as to take just the output of(the first channel of the output of the preceding layer, 1 d=1 (l,c) which is equal to setting their parameters to wdji = and b(l,c) ≡ 0. Setting the parameters as 0 d 6= 1 described above results in: ! (1) R M Y D X Y X (1,c) (1,c) (A(h))d(1,1) ,...,d(H,H) = (8) bji + wmji Om,uS+j,vS+i 0≤uS<H c=1 j,i=1 | 0≤vS<H 17 m=1 {z g(u,v,c,j,i) } Published as a conference paper at ICLR 2018 where we extended O with zero-padding for the cases where uS + j > H or vS + i > H, as mentioned in sec. 2. Next, we go through the technical process of reducing eq. 8 to a product of matrices. (1,c) (1,c) Substituting the values of wdji and bji with those defined in the claim, and computing the value of g(u, v, c, j, i) results in:   P −1 β−α M F c ≤ D and vS + R ≤ H and (j, i) ∈ {(1, 1), (1, R)}  m=1 F m,c d(uS+j,vS+i) ,m   PM   −1  β − α F F c ≤ D and vS + R > H and (j, i) = (1, 1)  m=1 m,c d(uS+j,vS+i) ,m g(u, v, c, j, i) = β c ≤ D and vS + R > H and (j, i) = (1, R)    c ≤ D and (j, i) 6∈ {(1, 1), (1, R)} 1   0 c>D   −1 β − α FF c ≤ D and vS + R ≤ D and (j, i) ∈ {(1, 1), (1, R)}    d(uS+1,vS+i) ,c   −1  β − α F F c ≤ D and vS + R > H and (j, i) = (1, 1)  d(uS+1,vS+i) ,c = β c ≤ D and vS + R > H and (j, i) = (1, R)    1 c ≤ D and (j, i) 6∈ {(1, 1), (1, R)}    0 c>D from which we derive:  2   Dβ − αβ(1[d(uS+1,vS+1) ≤D] + 1[d(uS+1,vS+R) ≤D] ) vS + R ≤ H + α2 1[d(uS+1,vS+1) =d(uS+1,vS+R) ≤D] f (u, v) ≡ g(u, v, c, j, i) =  Dβ 2 − αβ1 c=1 j,i=1 vS + R > H [d(uS+1,vS+1) ≤D] Q where (A(h))d(1,1) ,...,d(H,H) = 0≤uS<H f (u, v). (1) D X R Y 0≤vS<H At this point we branch into two cases. If S divides R − 1, then for all u, v ∈ N such that vS + R ≤ H and ) depends only on the indices d(uS+1,vS+1) and uS < H, the above expression for f (u, v) and f (u, v + R−1 S d(uS+1,vS+R) , while these two indices affect only the aforementioned expressions. By denoting (u,v) Ad(uS+1,vS+1) ,d(uS+1,vS+R) = f (u, v) · f (u, v + R−1 ), we can write it as: S    Dβ 2 − 2αβ + α2 1[i=j] Dβ 2 − αβ i, j ≤ D       Dβ 2 − αβ Dβ 2 i ≤ D and j > D (u,v) 2 Aij = 2  Dβ − αβ i > D and j ≤ D   2  i, j > D Dβ 2 where i, j ∈ [M ] stand for the possible values of d(uS+1,vS+1) and d(uS+1,vS+R) , respectively. Substituting 1/4 2α , results in: , as stated in the claim, and setting α = D D 2   1[i=j] i, j ≤ D   4 i ≤ D and j > D (u,v) = D Aij 2  i > D and j ≤ D D  8 i, j > D D   which means rank A(u,v) = D. Since (A(h))d(1,1) ,...,d(H,H) equals to the product Q (u,v) , then JA(h)KP,Q equals to the Kronecker product of the matrices 0≤uS<H Ad (uS+1,vS+1) ,d(uS+1,vS+R) β= 0≤vS≤H−R in {A(u,v) |0 ≤ uS < H, 0 ≤ vS ≤ H − R}, up to permutation of its rows and columns, which do not affect its matrix rank. Thus, the matricization rank of A(h) satisfies: H−R (u,v) H |0≤uS<H,0≤vS≤H−R}| rank (JA(h)K ) = D|{A = Db S +1c·d S e P,Q which proves the claim for this case. If S does not divide R − 1, then for all u, v ∈ N, such that vS + R ≤ H and uS < H, it holds that f (u, v) depends only on the indices d(uS+1,vS+1) and d(uS+1,vS+R) , and they affect only f (u, v). Additionally, for all u, v ∈ N, such that H < vS + R, vS < H and uS < H, it holds that f (u, v) depends only on the index (u,v) d(uS+1,vS+1) , and this index affects only f (u, v). Let us denote Ad(uS+1,vS+1) ,d(uS+1,vS+R) = f (u, v) for vS + R ≤ H:    Dβ 2 − 2αβ + α2 1[i=j] i, j ≤ D     Dβ 2 − αβ i ≤ D and j > D (u,v)  Aij = 2  Dβ − αβ i > D and j ≤ D    Dβ 2  i, j > D 18 Published as a conference paper at ICLR 2018 which by setting β = 2α D and α = 1 results in:   1[i=j]  2 (u,v) Aij = D 2   D  4 D i, j ≤ D i ≤ D and j > D i > D and j ≤ D i, j > D   (u,v) which means rank A(u,v) = D. For vS + R > H, and we can define the vector ad(uS+1,vS+1) = f (u, v), which by using the same values of α and β results in: ( 2 i≤D (u,v) ai = D 4 i>D D By viewing a(u,v) as either a column or row vector, depending on whether d(uS+1,vS+1) ∈ P or d(uS+1,vS+1) ∈ Q, respectively, it holds that JA(h)KP,Q equals to the Kronecker product of the matrices in {A(u,v) } 0≤uS<H ∪ {a(u,v) } 0≤uS<H , up to permutations of its rows and columns, which do not affect H−R<vS<H 0≤vS≤H−R   the rank. Since a(u,v) 6= 0 then rank a(u,v) = 1, which means the matricization rank of A(h) once again holds: rank (JA(h)KP,Q ) = D|{A (u,v) |0≤uS<H,0≤vS≤H−R}| = Db H−R +1 S c·d H S e In the preceding claim we have describe an example for the case where the total receptive of the first GC layer is already large enough for satisfying the conditions of the theorem. In the following claim we extend this result for the general case. This is accomplished by showing that a network comprised of just L GC layers with local receptive fields {R(l) × R(l) }l∈[L] , strides {S (l) × S (l) }l∈[L] , and output channels {D(l) }l∈[L] , can effectively compute the same output as the first GC layer from claim 3, for all inputs 3 . Recall that the layer from claim 3 performs an identical transformation on each M × 1 × 1 patch from its input, followed by taking the point-wise product of far-away pairs of transformed patches. Thus, the motivation behind the specific construction we use, is to use the first of the L layers to perform this transformation, while using half of its output channels for storing the transformed patch from the same location, and the other half for storing a transformed patch, but from a location farthest to the right, constrained by its local receptive field. This is equal to having one set of transformed patches sitting still, while another “shifted” set of transformed patches. The other layers simply pass the the first half of the channels as is, using an identity operation as defined in claim 2, while continuously shifting the other half of the channels more and more to the left, bringing faraway patches closer together. Finally, at the last layer we take both halves and multiple them together. Claim 4. Assume Φ is a ConvAC comprised of just L GC layers as described above, where the output of the network is not limited to a scalar value. Assume the total stride of the L-th GC layer is greater than H/2, and (L) (L,α) let TS and TR be the total stride and the α-minimal total receptive field, respectively, for α = bH/2c + 1. (L,α) (L) Let Ψ be a ConvAC comprised of a single GC layer with local receptive field R ≡ TR , stride S ≡ TS , output channels D ≡ min{ 21 min1≤l<L D(l) , D(L) }, where its weights and biases are set to the following: ( Am,c (j, i) ∈ {(1, 1) , (ρ, τ )} (c) wmji = 0 Otherwise ( βc (j, i) ∈ {(1, 1) , (ρ, τ )} (c) bji = 1 Otherwise for β ∈ RD , A ∈ RM ×D and (ρ, τ ) ∈ {(1, R), (R, 1)}. Then, there exists a set of weights to the layers of Φ such that for every input X, the output of Φ is equivalent to the output of Ψ for channels ≤ D, and zero otherwise. Proof. The two possible cases for (ρ, τ ) are completely symmetric, thus it is enough to prove the claim just for (ρ, τ ) = (1, R). Additionally, we can assume w.l.o.g. that ∀l, R(l) > 1, by setting any 1 × 1 layer to act as pass-through according to claim 2, and also assume that the α-minimal total receptive field is exactly equal to the total receptive field of the L-th layer, by applying claim 1 to realize an equivalent network with smaller windows. Finally, the case for L = 1 is trivial, and thus we assume L > 1. 3 Notice that in this context, there is no representation layer, and the input can be any 3-order tensor. 19 Published as a conference paper at ICLR 2018 n o Let us set the parameters w(l,k) , b(l,k) of the layers of Φ as follows: (l,k) wdji (l,k) bji  −Ad,k (l = 1) and (1 ≤ k ≤ D) and (j, i) = (1, 1)      −A (l = 1) and (D < k ≤ 2D) and (j, i) = (1, R(l) ) d,k−D     (1 < l < L) and (1 ≤ k ≤ D) and (j, i) = (1, 1) 1[d=k] = 1[d=k] (1 < l < L) and (D < k ≤ 2D) and (j, i) = (1, R(l) )   1[d=k] (l = L) and (1 ≤ k ≤ D) and (j, i) = (1, 1)     1 (l = L) and (1 ≤ k ≤ D) and (j, i) = (1, R(l) )  [d=M +k]   0 Otherwise  βk (l = 1) and (1 ≤ k ≤ D) and (j, i) = (1, 1)      β (l = 1) and (D < k ≤ 2D) and (j, i) = (1, R(l) ) k−D     (1 < l < L) and (1 ≤ k ≤ D) and (j, i) = (1, 1) 0 = 0 (1 < l < L) and (D < k ≤ 2D) and (j, i) = (1, R(l) )   0 (l = L) and (1 ≤ k ≤ D) and (j, i) = (1, 1)     0 (l = L) and (1 ≤ k ≤ D) and (j, i) = (1, R(l) )    1 Otherwise (l) (l) (l) It is left to prove the above satisfies the claim. Let O(l) ∈ RD ×H ×H be the output of the l-th layer, for l ∈ [0, . . . , L], where H (l) is the width and height of the output. We additionally assume that for indices beyond the bounds of [D(l) ] × [H (l) ] × [H (l) ] the value of O(l) is zero, i.e. we assume zero padding when applying the convolutional operation of the GC layer. We extend the definition for l = 0, by setting D(0) ≡ M and H (0) ≡ H, where we identify O(0) with the input to the network Φ. Given the above, the output of the first layer for k ∈ [D(1) ] and 0 ≤ u, v < H (1) , is as follows: (1) Ok,u+1,v+1 = (1) R Y  b(1,k) ji j,i=1 + (0) D X  (1,k) (0) wdji Od,uSh +j,vSw +i  d=1  PM (0)  Ad,k · Od,uSh +1,vSw +1 βk + d=1 PM (0) = βk−D + d=1 Ad,k−D · Od,uS (1) h +1,vSw +R   1 1≤k≤D D < k ≤ 2D Otherwise We will show by induction that for 1 < l < L, k ∈ [D(l) ] and 0 ≤ u, v < H (l) the output of the l-th layer (l) Ok,u+1,v+1 always equals to: (l) Ok,u+1,v+1  1  Ok,uη(l) +1,vη(l) +1 1 = Ok,uη(l) +1,vη(l) +ξ(l)   1 k≤D D < k ≤ 2D Otherwise Q P (k) where η (l) = li=2 S (i) and ξ (l) = R(l) · η (l−1) + l−1 − S (l) ) · η (k−1) . It is trivial to verify that for k=2 (R l = 2 it indeed holds, since: (2) Ok,u+1,v+1  (1)  Ok,uS (2) +1,vS (2) +1 = O(1) (2) (2) (2)   k,uS +1,vS +R 1 20 k≤D D < k ≤ 2D Otherwise Published as a conference paper at ICLR 2018 where η (2) = S (2) and ξ (2) = R(2) . Assume the claim holds up to l − 1, and we will show it also holds for l:   (l) (l−1) R DX Y (l) (l,k) (l,k) l−1 bji +  Ok,u+1,v+1 = wdji O (l) (l) d,uS j,i=1 +j,vS +i d=1  (l−1) k≤D  Ok,uS (l) +1,vS (l) +1 = O(l−1)(l) D < k ≤ 2D (l) (l)   k,uS +1,vS +R 1 Otherwise  (1)  Ok,(uS (l) )η(l−1) +1,(vS (l) )η(l−1) +1  Induction Hypothesis ⇒ = O(1) (l) (l−1) +1,(vS (l) +R(l) −1)η (l−1) +ξ(l−1) k,(uS )η    1  1  k≤D Ok,uη(l) +1,vη(l) +1 1 = Ok,uη(l) +1,vη(l) +ξ(l) D < k ≤ 2D   1 Otherwise k≤D D < k ≤ 2D Otherwise Were we used the fact that η (l) = S (l) η (l−1) and ξ (l) = R(l) η (l−1) + ξ (l−1) − η (l−1) . (L) Finally, we show that Ok,u+1,v+1 for k ≤ D and 0 ≤ u, v < H (L) equals to the output of the single GC layer specified in the claim:   (L−1) (L) DX R Y (L,k) (L−1) (L,k) (L) bji wdji Od,uS (L) +j,vS (L) +i  + Ok,u+1,v+1 = j,i=1 d=1 (L−1) (L−1) (1) (1) = Ok,uS (L) +1,vS (L) +1 · Ok,uS (L) +1,vS (L) +R(L) = Ok,uη(L) +1,vη(L) +1 · Ok,uη(L) +1,vη(L) +ξ(L)   (0) D X (0) = βk + Ad,k Od,uη(L) S (1) +1,vη(L) S (1) +1  d=1  · βk + (0) D X  (0) Ad,k Od,uη(L) S (1) +1, vη(L) +ξ(L) −1 S (1) +R(1) )  ( )    (0) (0) D D X X (0) (0)   = βk + Ad,k O Ad,k O β + k (L) (L) d=1 d=1 d,uTS +1,vTS +1 d=1  (L) d,uTS (L) +1,vTS (L) +TR  which is indeed equal to the single GC layer. For k > D, both the bias and the weights for the last layer are (L) zero, and thus Ok,u+1,v+1 = 1. Finally, with the above two claims set in place, we can prove our main theorem: Proof. (of theorem 1) Using claim 4 we can realize the networks from claim 3, for which the matricization rank for either partition equals to:   H  l m   H−T (K,b /2c) R  +1· H D TS TS Since for any matricization [A (Ψ)]P,Q the entries of the matricization are polynomial functions with respect to the parameters of the network, then, according to lemma 3, the set of parameters of Φ, that does not attain the above rank, has zero measure. Since the union of zero measured sets is also of measure zero, then all parameters except a set of zero measure attain this matricization rank for both partitions at once, concluding the proof. C.4 P ROOF OF P ROPOSITION 2 Following theorem 1, to compute the lower bound for the network described in proposition 2, we need to find the first layer for which its total receptive field is greater than H/2, and then estimate its total stride and its 21 Published as a conference paper at ICLR 2018 α-minimal total receptive field, for α = bH/2c. In the following claims we analyze the above properties of the given network: Claim 5. The total stride and total receptive field of the l-th B × B layer in the given network, i.e. the (2l − 1)-th GC layer after the representation layer, are given by the following equations: (2l−1) TS (2l−1) TR (S (1) , . . . , S (2l−1) ) = 2l−1 (R(1) , S (1) , . . . , R(2l−1) , S (2l−1) ) = (2B − 1)2l−1 − B + 1 (2l−1) Proof. From eq. 1 it immediately follows that TS (S (1) , . . . , S (2l−1) ) = 2l−1 . From eq. 2, the 2 × 2 stride (2l) 2 layers do not contribute to the receptive field as R − S (2l) = 0, which results in the following equation: (2l−1) TR (R(1) , S (1) , . . . , R(2l−1) , S (2l−1) ) = B · 2l−1 + l−1 X (B − 1)2i−1 i=1 = B · 2l−1 + (B − 1)(2l−1 − 1) = (2B − 1)2l−1 − B + 1 Claim 6. The α-minimal total receptive field for the l-th B × B layer in the given network, for α ∈ N and 2l−1 ≤ α < 2l − 1, always equals (α + 1). Proof. From eq. 3, the following holds: (2l−1,α) TR = (2l−1) argmin TR ∀i∈[l],1≤t2i−1 ≤B (t1 , 1, 2, 2, t3 , 1, . . . , t2l−1 , 1) (2l−1) TR (t1 ,1,2,2,t3 ,1,...,t2l−1 ,1)>α = t2l−1 · 2l−1 + argmin ∀i∈[l],1≤t2i−1 ≤B P i−1 >α t2l−1 ·2l−1 + l−1 i=1 (t2i−1 −1)2 l−1 X (t2i−1 − 1)2i−1 i=1 Notice that the right term in the equation resembles a binary representation. If we limit t2i−1 to the set {1, 2}, this term can represent any number in the set {0, . . . , 2l−1 − 1}, and by choosing t2l−1 = 1, the complete term can represent any number in the set {2l−1 , . . . , 2l − 1}, and specifically, for 2l−1 ≤ α < 2l − 1, there exists an (2l−1,α) = α+1. assignment for t2i−1 ∈ {1, 2} for i ∈ [l−1] such that this terms equal (α+1), and thus TR With the above general properties for the given network, we can simplify the expression for the lower bound given in theorem 1: Claim 7. If the l-th B × B layer in the given network satisfies (2l−1) TR (R(1) , S (1) , . . . , R(2l−1) , S (2l−1) ) > H/2, then the lower bound given in theorem 1 equals to 2L−2l+1 M2 Proof. From the description of the network and the previous claims it holds that D = M , H = 2L , (2l−1) (2l−1,bH/2c) TS = 2l−1 , and TR = 2L−1 + 1. Substituting all the above in eq. 4 results in:  (Eq. 4) = M j =M = M2   L · 2 l−1 2L −2L−1 −1 +1 2l−1 2 k 1 2L−l +1− l−1 ·2L−l+1 2 2L−2l+1 With all of the above claims in place, we our ready to prove proposition 2: 22 Published as a conference paper at ICLR 2018 Proof. (of proposition 2) From claim 5, we can infer which is the first B × B layer such that its receptive field is greater than H/2: (2B − 1) · 2l−1 − B + 1 > 2L−1 2L + 2B − 2 2B − 1   2L + 2B − 2 ⇒ l = 1 + log2 2B − 1 ⇒ l > log2 Combining the above with claim 7, results in: M 22L−2l+1 =M 2 ≥ M2 (2L ≡ H) ⇒ = M =M The limits and the special case for B ≤ C.5 H 5   L 2L−1−2 log2 2 +2B−2 2B−1 L 2L−1−2 log2 2 +2B−2 2B−1 H2 2 H−1 −2 (1+ 2B−1 ) (2B−1)2 2 −2 ·(1+ 2B−2 H ) + 1 are both direct corollaries of the above expressions. P ROOF OF THEOREM 2 We begin by proving an analogue of claim 3, where we show that for any given matricization of the grid tensor A(h), induced by the overlapping network realizing the function h, the matricization rank is exponential. The motivation behind the construction, for when parameters are “unshared”, is that we can utilized the fact that there are separate sets of kernels, with local receptive fields the size of the input, for each spatial location. Thus, each kernel can “connect” the index (of the grid tensor) matching its spatial location, with almost any other index, and specifically such that the two indices come from different sets of the matricization I ∪· J of A(h). For the “shared” case, we simply use polynomially more output channels to simulate the “unshared” case. 2 Claim 8. For an arbitrary even partition (I, J) of {(1, 1), . . . , (H, H)}, such that |I| = |J| = H2 , there exists an assignment to the parameters of the network given in theorem 2, for either the “unshared” or “shared” settings, such that rank (JA(h)K) = M H2 2 . 2 Proof. Let (I, J) be an arbitrary even partition of {(1, 1), . . . , (H, H)}, such that |I| = |J| = H2 , I = 2 {i1 , . . . , i|I| }, and J = {j1 , . . . , j|J| }, where for k ∈ [ H2 ] it holds that ik < ik+1 and jk < jk+1 (using H2 2 such that qk = ik lexical ordering), and we assume w.l.o.g. that i1 = (1, 1). We define the set {(qk , pk )}k=1 and pk = jk if ik < jk , and otherwise qk = jk and pk = ik . We prove the t“unshared” case first, where the parameters of the first GC layers are given by {(w(c,u,v) , b(c,u,v) )}D,H,H c=1,u=1,v=1 , for which we choose the following assignment: (c,u,v) wm,j,i (c,u,v) bj,i = = ( (F −1 )m,c c ≤ M and ∃k ∈ 0 ( 0 Otherwise 1[c≤M ] c ≤ M and ∃k ∈ h h H2 2 H2 2 i i , qk = (u, v) and (j, i) ∈ {(1, 1), pk − qk + (1, 1)} , qk = (u, v) and (j, i) ∈ {(1, 1), pk − qk + (1, 1)} Otherwise where for u, v ∈ [H] such that qk = (u, v) it holds that pk − qk + (1, 1) ∈ {(1, 1), . . . , (H, H)} because qk ≤ pk . Similar to the proof of claim 3, we set all layers following the first GC layer such that the following equality holds: (A(h))d(1,1) ,...,d(H,H) = H X D Y H Y (c,u,v) bji u,s=1 c=1 j,i=1 + M X m=1 23 ! (c,u,v) wmji Om,u+j−1,v+i−1 Published as a conference paper at ICLR 2018 Which under the assignment to parameters we chose earlier, it results in: ! H 2/2 D M YX X −1 (A(h))d(1,1) ,...,d(H,H) = (F )m,c Fdqk ,m k=1 c=1 m=1 M X ! (F −1 )m,c Fdpk ,m m=1 H 2/2 = D YX (F · F −1 )dqk ,c · (F · F −1 )dpk ,c k=1 c=1 H 2/2 = D YX 1[dqk =c] · 1[dpk =c] k=1 c=1 H 2/2 = Y 1[dqk =dpk ] k=1 which means JA(h)K(I,J) equals to the Kronecker product of H2 2 M ×M -identity matrices, up to permutations of its rows and columns which do not affect its matrix rank. Thus, rank (JA(h)K) = M H2 2 . For the “shared” setting, we denote the parameters of the first GC layer by {(w(d) , b(d) )}D c=1 , and set them as:   −1 2 ∃c ∈[M ]∃u,  (F )m,c h v2∈ i [H], d = cH + uH + v  (d) H and ∃k ∈ 2 , qk = (u, v) and (j, i) ∈ {(1, 1), pk − qk + (1, 1)} wm,j,i =   0 Otherwise   2 ∃c ∈[M ]∃u,  0 h v2∈ i [H], d = cH + uH + v  (d) and ∃k ∈ H2 , qk = (u, v) and (j, i) ∈ {(1, 1), pk − qk + (1, 1)} bj,i =   1[d≤M H 2 ] Otherwise the parameters of the other layers are set as in the “unshared” case, and the proof follows similarly. In the preceding claim, we have found a separate example for each matricization, such that the matricization rank is exponential. In the following proof of the theorem 2, we leverage basic properties from measure theory to show that almost everywhere the induced grid tensor has an exponential matricization rank, under every possible even matricization – without explicitly constructing such an example. Proof. (of theorem 2) For any even partition (I, J) of {(1, 1), . . . , (H, H)}, according to claim 8 there exist parameters for which rank (JA(h)K)(I,J) = M H2 2 , and thus according to lemma 3 the set of parameters for H2 2 which rank (JA(h)K) < M is of measure zero. Since the finite union of sets of measure zero is also of measure zero, then almost everywhere (with respect to the Lebesgue measure) the parameters results in networks such that for all even partitions rank (JA(h)K)(I,J) = M 24 H2 2 .
9cs.NE
A systematic study of the class imbalance problem in convolutional neural networks arXiv:1710.05381v1 [cs.CV] 15 Oct 2017 Mateusz Buda1, 2 Atsuto Maki2 Maciej A. Mazurowski1, 3 1 Department of Radiology, Duke University School of Medicine, Durham, NC, USA 2 Royal Institute of Technology (KTH), Stockholm, Sweden 3 Department of Electrical and Computer Engineering, Duke University, Durham, NC, USA {buda, atsuto}@kth.se, [email protected] Abstract In this study, we systematically investigate the impact of class imbalance on classification performance of convolutional neural networks (CNNs) and compare frequently used methods to address the issue. Class imbalance is a common problem that has been comprehensively studied in classical machine learning, yet very limited systematic research is available in the context of deep learning. In our study, we use three benchmark datasets of increasing complexity, MNIST, CIFAR-10 and ImageNet, to investigate the effects of imbalance on classification and perform an extensive comparison of several methods to address the issue: oversampling, undersampling, two-phase training, and thresholding that compensates for prior class probabilities. Our main evaluation metric is area under the receiver operating characteristic curve (ROC AUC) adjusted to multi-class tasks since overall accuracy metric is associated with notable difficulties in the context of imbalanced data. Based on results from our experiments we conclude that (i) the effect of class imbalance on classification performance is detrimental; (ii) the method of addressing class imbalance that emerged as dominant in almost all analyzed scenarios was oversampling; (iii) oversampling should be applied to the level that totally eliminates the imbalance, whereas undersampling can perform better when the imbalance is only removed to some extent; (iv) as opposed to some classical machine learning models, oversampling does not necessarily cause overfitting of CNNs; (v) thresholding should be applied to compensate for prior class probabilities when overall number of properly classified cases is of interest. Keywords: Class Imbalance, Convolutional Neural Networks, Deep Learning, Image Classification 1 Introduction Convolutional neural networks (CNNs) are gaining significance in a number of machine learning application domains and are currently contributing to the state of the art in the field of computer vision, which includes tasks such as object detection, image classification, and segmentation. They are also widely used in natural language processing or speech 1 recognition where they are replacing or improving classical machine learning models [1]. CNNs integrate automatic feature extraction and discriminative classifier in one model, which is the main difference between them and traditional machine learning techniques. This property allows CNNs to learn hierarchical representations [2]. The standard CNN is built with fully connected layers and a number of blocks consisting of convolutions, activation function layer and max pooling [3, 4, 5]. The complex nature of CNNs requires a significant computational power for training and evaluation of the networks, which is addressed with the help of modern graphical processing units (GPUs). A common problem in real life applications of deep learning based classifiers is that some classes have a significantly higher number of examples in the training set than other classes. This difference is referred to as class imbalance. There are plenty of examples in domains like computer vision [6, 7, 8, 9, 10], medical diagnosis [11, 12], fraud detection [13] and others [14, 15, 16] where this issue is highly significant and the frequency of one class (e.g., cancer) can be 1000 times less than another class (e.g., healthy patient). It has been established that class imbalance can have significant detrimental effect on training of traditional classifiers [17] including multi-layer perceptrons [18]. It affects both convergence during the training phase and generalization of a model on the test set. While the issue very likely also affects deep learning, no systematic study on the topic is available. Methods of dealing with imbalance are well studied for classical machine learning models [19, 17, 20, 18]. The most straightforward and common approach is the use of sampling methods. Those methods operate on the data itself (rather than the model) to increase its balance. Widely used and proven to be robust is oversampling [21]. Another option is undersampling. Naı̈ve version, called random majority undersampling, simply removes a random portion of examples from majority classes [17]. The issue of class imbalance can be also tackled on the level of the classifier. In such case, the learning algorithms are modified, e.g. by introducing different weights to misclassification of examples from different classes [22] or explicitly adjusting prior class probabilities [23]. Some previous studies showed results on cost sensitive learning of deep neural networks [24, 25, 26]. New kinds of loss function for neural networks training were also developed [27]. Recently, a new method for CNNs was introduced that trains the network in two-phases in which the network is trained on the balanced data first and then the output layers are fine-tuned [28]. While little systematic analysis of imbalance and methods to deal with it is available for deep learning, researchers employ some methods that might be addressing the problem likely based on intuition, some internal tests, and systematic results available for traditional machine learning. Based on our review of literature, the method most commonly applied in deep learning is oversampling. The rest of this paper is organized as follows. Section 2 gives an overview of methods to address the problem of imbalance. In Section 3 we describe the experimental setup. It provides details about compared methods, datasets and models used for evaluation. Then, in Section 4 we present the results from our experiments and compare methods. Finally, Section 5 concludes the paper. 2 2 Methods for addressing imbalance Methods for addressing class imbalance can be divided into two main categories [29]. The first category is data level methods that operate on training set and change its class distribution. They aim to alter dataset in order to make standard training algorithms work. The other category covers classifier (algorithmic) level methods. These methods keep the training dataset unchanged and adjust training or inference algorithms. Moreover, methods that combine the two categories are available. In this section we give an overview of commonly used approaches in both classical machine learning models and deep neural networks. 2.1 Data level methods Oversampling. One of the most commonly used method in deep learning [16, 30, 31, 32]. The basic version of it is called random minority oversampling, which simply replicates randomly selected samples from minority classes. It has been shown that oversampling is effective, yet it can lead to overfitting [33, 34]. More advanced sampling method that aims to overcome this issue is SMOTE [33]. It augments artificial examples created by interpolating neighboring data points. Some extensions of this technique were proposed, for example focusing only on examples near the boundary between classes [35]. Another type of oversampling approach uses data preprocessing to perform more informed oversampling. Cluster-based oversampling first clusters the dataset and then oversamples each cluster separately [36]. This way it reduces both between-class and within-class imbalance. DataBoost-IM, on the other hand, identifies difficult examples with boosting preprocessing and uses them to generate synthetic data [37]. An oversampling approach specific to neural networks optimized with stochastic gradient descent is class-aware sampling [38]. The main idea is to ensure uniform class distribution of each mini-batch and control the selection of examples from each class. Undersampling. Another popular method [16] that results in having the same number of examples in each class. However, as opposed to oversampling, examples are removed randomly from majority classes until all classes have the same number of examples. While it might not appear intuitive, there is some evidence that in some situations undersampling can be preferable to oversampling [39]. A significant disadvantage of this method is that it discards a portion of available data. To overcome this shortcoming, some modifications were introduced that more carefully select examples to be removed. E.g. one-sided selection identifies redundant examples close to the boundary between classes [40]. More general approach than undersampling is data decontamination that can involve relabeling of some examples [41, 42]. 2.2 Classifier level methods Thresholding. Also known as threshold moving or post scaling, adjusts the decision threshold of a classifier. It is applied in the test phase and involves changing the output class probabilities. There are many ways in which the network outputs can be adjusted. 3 In general, the threshold can be set to minimize arbitrary criterion using an optimization algorithm [23]. However, the most basic version simply compensates for prior class probabilities [43]. These are estimated for each class by its frequency in the imbalanced dataset before sampling is applied. It was shown that neural networks estimate Bayesian a posteriori probabilities [43]. That is, for a given datapoint x, their output for class i implicitly corresponds to yi (x) = p(i|x) = p(i) · p(x|i) . p(x) Therefore, correct class probabilities can be obtainedPby dividing the network output for k |k| each class by its estimated prior probability p(i) = |i| , where |i| denotes the number of unique examples in class i. Cost sensitive learning. This method assigns different cost to misclassification of examples from different classes [44]. With respect to neural networks it can be implemented in various ways. One approach is threshold moving [22] or post scaling [23] that are applied in the inference phase after the classifier is already trained. Similar strategy is to adapt the output of the network and also use it in the backward pass of backpropagation algorithm [45]. Another adaptation of neural network to be cost sensitive is to modify the learning rate such that higher cost examples contribute more to the update of weights. And finally we can train the network by minimizing the misclassification cost instead of standard loss function [45]. The results of this approach are equivalent to oversampling [22, 26] described above and therefore this method will not be implemented in our study. One-class classification. In the context of neural networks it is usually called novelty detection. This is a concept learning technique that recognizes positive instances rather than discriminating between two classes. Autoencoders used for this purpose are trained to perform autoassociative mapping, i.e. identity function. Then, the classification of a new example is made based on a reconstruction error between the input and output patterns, e.g. absolute error, squared sum of errors, Euclidean or Mahalanobis distance [46, 47, 48]. This method has proved to work well for extremely high imbalance when classification problem turns info anomaly detection [49]. Hybrid of methods. This is an approach that combines multiple techniques from one or both abovementioned categories. Widely used example is ensembling. It can be viewed as a wrapper to other methods. EasyEnsemble and BalanceCascade are methods that train a committee of classifiers on undersampled subsets [50]. SMOTEBoost, on the other hand, is a combination of boosting and SMOTE oversampling [51]. Recently introduced and successfully applied to CNN training for brain tumor segmentation, is two-phase training [28]. Even though the task was image segmentation, it was approached as a pixel level classification. The method involves network pre-training on balanced dataset and then fine-tuning the last output layer before softmax on the original, imbalanced data. 4 3 3.1 Experiments Forms of imbalance Class imbalance can take many forms particularly in the context of multiclass classification, which is typical in CNNs. In some problems only one class might be underrepresented or overrepresented and in other every class will have a different number of examples. In this study we define and investigate two types of imbalance that we believe are representative of most of the real-world cases. The first type is step imbalance. In step imbalance, the number of examples is equal within minority classes and equal within majority classes but differs between the majority and minority classes. This type of imbalance is characterized by two parameters. One is the fraction of minority classes defined by µ= |{i ∈ {1, . . . , N } : Ci is minority}| , N (1) where Ci is a set of examples in class i and N is the total number of classes. The other parameter is a ratio between the number of examples in majority classes and the number of examples in minority classes defined as follows. ρ= maxi {|Ci |} mini {|Ci |} (2) An example of this type of imbalance is the situation when among the total of 10 classes, 5 of them have 500 training examples and another 5 have 5 000. In this case ρ = 10 and µ = 0.5, as shown in Figure 1a. A dataset with the same number of examples in total that has smaller imbalance ratio, corresponding to parameter ρ = 2, but more classes being minority, µ = 0.9, is presented in Figure 1b. (a) ρ = 10, µ = 0.5 (b) ρ = 2, µ = 0.9 (c) ρ = 10 Figure 1: Example distributions of imbalanced set together with corresponding values of parameters ρ and µ for step imbalance (a - b) and ρ for linear imbalance (c). The second type of imbalance we call linear imbalance. We define it with one parameter that is a ratio between the maximum and minimum number of examples among all classes, as in Equation 2 for imbalance ratio in step imbalance. However, the number of examples in the remaining classes is interpolated linearly such that the difference between consecutive pairs of classes is constant. An example of linear imbalance distribution with ρ = 10 is shown in Figure 1c. 5 3.2 Methods of addressing imbalance compared in this study In total, we examine seven methods to handle CNN training on a dataset with class imbalance which cover most of the commonly used approaches in the context of deep learning: 1. Random minority oversampling 2. Random majority undersampling 3. Two-phase training with pre-training on randomly oversampled dataset 4. Two-phase training with pre-training on randomly undersampled dataset 5. Thresholding with prior class probabilities 6. Oversampling with thresholding 7. Undersampling with thresholding We examine two variants of two-phase training method. One on oversampled and the other on undersampled dataset. For the second phase, we keep the same hyperparameters and learning rate decay policy as in the first phase. Only the base learning rate from the first phase is multiplied by the factor of 10−1 . Regarding thresholding, this method originally uses the imbalanced training set to train a neural network. We, in addition, combine it with oversampling and undersampling. Selected methods are representative of the available approaches. Sampling can be used to explicitly incorporate cost of the examples by their appearance. It makes them one of many implementations of cost-sensitive learning [22]. Thresholding is another way of applying cost-sensitiveness by moving the output threshold such that higher cost examples are harder to misclassify. Ensemble methods require training of multiple classifiers. Because of considerable time needed to train deep models, it is often not practical and may be even infeasible to train multiple deep neural networks. One-class methods have a very limited application to datasets with extremely high imbalance. Moreover, they are applied to anomaly detection problem that is beyond the scope of our study. Importantly, we focused on methods that are widely used and relatively straightforward to implement as our aim is to draw conclusions that will be practical and serve as a guidance to a large number of deep learning researchers and engineers. 3.3 Datasets and models In our study, we used three benchmark datasets: MNIST [52], CIFAR-10 [53] and ImageNet Large Scale Visual Recognition Challenge (ILSVRC) 2012 [54]. All of them are provided with a split on training and test set that are both labelled. For each dataset we choose different model with a set of hyperparameters used for its training that is known to perform well based on the literature. Datasets together with their corresponding models are of increasing complexity. This allows us to draw some conclusions on simple task and then verify how they scale to more complex ones. All networks for the same dataset were trained with equal number of iterations. It means that the number of epochs differs between the imbalanced versions of dataset. This 6 way we keep the number of weights’ updates constant. Also, all networks were trained from a random initialization of weights and no pretraining was applied. An overview of some information about the datasets and their corresponding models is given in Table 1. All experiments were implemented in the deep learning framework Caffe [55]. Image dimensions Images per class Dataset Width Height Depth No. classes Training Test CNN model MNIST CIFAR-10 ILSVRC-2012 28 32 ≥ 256 28 32 ≥ 256 1 3 3 10 10 1 000 5 000 5 000 1 000 1 000 1 000 50 LeNet-5 All-CNN ResNet-10 Table 1: Summary of the used datasets. The number of images per class refers to the perfectly balanced subsets used for experiments. Provided image dimensions for ImageNet are given after rescaling. 3.3.1 MNIST MNIST is considered simple and solved problem that involves digits’ images classification. The dataset consists of grayscale images of size 28 × 28. There are ten classes corresponding to digits from 0 to 9. The number of examples per class in the original training dataset ranges from 5421 in class 5 to 6742 in class 1. In artificially imbalanced versions we uniformly at random subsample each class to contain no more than 5 000 examples. Data dimensions Layer Width Height Depth Kernel size Stride Input Convolution Max Pooling Convolution Max Pooling Fully Connected ReLU Fully Connected Softmax 28 24 12 8 4 1 1 1 1 28 24 12 8 4 1 1 1 1 1 20 20 50 50 500 500 10 10 5 2 5 2 - 1 2 1 2 - Table 2: Architecture of LeNet-5 CNN used in MNIST experiments. The CNN model that we use for MNIST is the modern version of LeNet-5 [52]. The network architecture is presented in Table 2. All networks for this dataset were trained for 10 000 iterations. Optimization algorithm is stochastic gradient descent (SGD) with momentum value of µ = 0.9 [56]. The learning rate decay policy is defined as 7 ηt = η0 · (1 + γ · t)−α , where η0 = 0.01 is a base learning rate, γ = 0.0001 and α = 0.75 are decay parameters and t is the current iteration. Furthermore, we used a batch size of 64 and a weight decay value of λ = 0.0005. Network weights were initialized randomly with uniform distribution and Xavier variance [57] whereas the biases were initialized with zero. No data augmentation was used. Test error of the model trained as described above on the original MNIST dataset was below 1%. Experiments on MNIST dataset are performed on the following imbalance parameters space. For linear imbalance we test values of ρ ∈ {10, 25, 50, 100, 250, 500, 1 000, 2 500, 5 000}. For step imbalance the set of ρ values is the same and for each we use all possible number of minority classes from 1 to 9, which corresponds to µ ∈ {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}. The experiment for each combination of parameters is repeated 50 times. Every time the subset of minority classes is randomized. This way, we have created 4 050 artificially imbalanced training sets for step imbalance and 450 for linear imbalance. As we have evaluated four methods that require training a model, the total number of trained networks, including baseline, is 22 500. 3.3.2 CIFAR-10 CIFAR-10 is a significantly more complex image classification problem than MNIST. It contains 32 × 32 color images with ten classes of natural objects. It does not have any natural imbalance at all. There are exactly 5 000 training and 1 000 test examples in each class. We do not use any data augmentation but follow standard preprocessing comprising global contrast normalization and ZCA whitening [58]. Data dimensions Layer Width Height Depth Kernel size Stride Padding Input Dropout (0.2) 2×(Convolution + ReLU) Convolution + ReLU Dropout (0.5) 2×(Convolution + ReLU) Convolution + ReLU Dropout (0.5) Convolution + ReLU Convolution + ReLU Convolution + ReLU Average Pooling Softmax 32 32 32 16 16 16 8 8 6 6 6 1 1 32 32 32 16 16 16 8 8 6 6 6 1 1 3 3 96 96 96 192 192 192 192 192 10 10 10 3 3 3 3 3 1 1 6 - 1 2 1 2 1 1 1 - 1 1 1 1 0 0 0 - Table 3: Architecture of All-CNN used in CIFAR-10 experiments. For CIFAR-10 experiments we use one of the best performing type of CNN model on this dataset, i.e. All-CNN [59]. The network architecture is presented in Table 3. The 8 networks were trained for 70 000 iterations using SGD with momentum µ = 0.9. The base learning rate was multiplied by a fixed multiplier of 0.1 after 40 000, 50 000 and 60 000 iterations. The number of examples in a batch was 256 and a weight decay value was λ = 0.001. Network weights were initialized with Xavier procedure and the biases set to zero. Test error of the model trained as described above on the original CIFAR-10 dataset was 9.75%. We have found the network training to be quite sensitive to initialization and the choice of base learning rate. Sometimes the network gets stuck in a very poor local minimum. Also, for more imbalanced datasets the training required lower base learning rate to train at all. Therefore, for each case we were searching for the best one from the fixed set η0 ∈ {0.05, 0.005, 0.0005, 0.00005}. Similar procedure was used by the authors of the model architecture [59]. Moreover, each training was repeated twice on the same dataset. For a particular method and imbalanced dataset, we pick the model with the best score on the test set over all eight runs. The network architecture does not have any fully connected layers. Therefore, during the fine-tuning in two-phase training method we update the weights of two last convolutional layers with kernels of size 1. The imbalance parameters space used in CIFAR-10 experiments is considerably sparser than the one used for MNIST due to the significantly longer time required to train one network. The set of tested values was narrowed to make the experiment run in a reasonable time. For linear and step imbalance, we test values of ρ ∈ {2, 10, 20, 50}. In step imbalance, for each value of ρ, the set of values of parameter µ was µ ∈ {0.2, 0.5, 0.8}, which corresponds to having two, five and eight minority classes respectively. And for all the cases, the classes chosen to be minority were the ones with the lowest label value. It means that for a fixed number of minority classes the same classes were always picked as minority. Also, all of them were included in a larger set of minority classes. In total we trained 480 networks on this dataset. 3.3.3 ImageNet For evaluation we use a ILSVRC-2012 competition subset of ImageNet, widely used as a benchmark to compare classifiers’ performance. The number of examples in majority classes was reduced from 1 200 to 1 000. Classes with less than 1 000 cases were always chosen as a minority ones for imbalanced subsets. The only data preprocessing applied is resizing such that the smaller dimension is 256 pixels long and the aspect ratio is preserved. During training, as input we use a randomly cropped 224 × 224 pixel square patch and a single centered crop in a test phase. Moreover, during training we randomly mirror images, but there is no color, scale or aspect ratio augmentation. A model architecture employed for this dataset is ResNet-10 [60], i.e. a residual network [61] with batch normalization layers that are known to accelerate deep networks training [62]. It consists of four residual blocks that give us nine convolutional layers and one fully connected. The first residual block outputs data tensor of depth 64 and then each one increases it by a factor of two. Fully connected layer outputs 1 000 values to softmax that transforms them to class probabilities. The architecture of one residual block is presented in Figure 2. 9 Figure 2: Architecture of a single residual block in ResNet used in ILSVRC-2012 experiments. The networks were trained for 320 000 iterations using SGD with momentum µ = 0.9. The base learning rate is set to η0 = 0.1 and decays linearly to 0 in the last iteration. The number of examples in a batch was 256 and a weight decay λ = 0.0001. Network weights were initialized with Kaiming (also known as MSRA) initialization procedure [63]. Top-1 test error of the model trained as described above on the original ILSVRC-2012 dataset was 62.56% and 99.50 multi-class ROC AUC for a single centered crop. We have chosen relatively small ResNet for the sake of faster training but without loss of generality 1 . We test only one case of small and two cases of large step imbalance and run it on the baseline, undersampling and oversampling methods. Specifically, all three step imbalanced subsets are defined with µ = 0.1, ρ = 10, µ = 0.8, ρ = 50 and µ = 0.9, ρ = 100. They correspond to 100 minority classes with imbalance ratio of 10, 800 minority classes with imbalance of 50, and 900 minority classes with imbalance ratio of 100 respectively. Moreover, for the highest imbalance, we train three networks for each method with randomized selection of minority classes and subsampled set of examples in each class. This is done in order to estimate variability in performance of methods. In total, this gives us 15 ResNet-10 networks trained on five artificially imbalanced subsets of ILSVRC-2012. 3.4 Evaluation metrics and testing The metric that is most widely used to evaluate a classifier performance in the context of multiclass classification with CNNs is overall accuracy which is the proportion of test examples that were correctly classified. However, it has some significant and long acknowledged limitations, particularly in the context of imbalanced datasets [19]. Specifically, when the test set is imbalanced, accuracy will favor classes that are overrepresented in some cases leading to highly misleading assessment. An example of this is a situation when the majority class represents 99% of all cases and the classifier assigns the label of the majority class to all test cases. A misleading accuracy of 99% will be assigned to a classifier that has a very limited use. Another issue might arise when the test set is balanced and a training set is imbalanced. This might result in a situation when a decision threshold is moved to reflect the estimated class prior probabilities and cause a low accuracy measure in the test set while the true discriminative power of the classifier does not change. A measure that addresses these issues is area under the receiver operating characteristic curve (ROC AUC) [64]. It is a well-studied and sound measure of discrimination [65] 1 It takes five days to train one ResNet-10 network on Nvidia GTX 1070 GPU. 10 and has been widely used as an evaluation metric for classifiers. ROC has also been used to compare performance of classifiers trained on imbalanced datasets[20, 18]. Since the basic version of ROC is only suitable for binary classification, we use a multi-class modification of it by averaging ROC AUCs for the binary classification task of distinguishing a given class vs. all the other classes [66]. Test set of all used datasets has equal number of examples in each class. Usually, it is assumed that the class distribution of a test set follows the one of a training set. We do not change a test set to match artificially imbalanced training set. The reason is that the score achieved by each classifier on the same test set is more comparable and the largest number of cases in each of the classes provides the most accurate performance estimation. 4 4.1 Results Effects of class imbalance on classification performance and comparison of methods to address imbalance The results showing the impact of class imbalance on classification performance and comparison of methods for addressing imbalance are shown in Figures 3 and 4. Figure 3 shows the results with respect to multi-class ROC AUC for a fixed number of minority classes on MNIST and CIFAR-10. Figure 4 presents the result from the perspective of fixed ratio of imbalance, i.e. parameter ρ, for the same two datasets. (a) 2 minority classes (b) 5 minority classes (c) 8 minority classes (d) 2 minority classes (e) 5 minority classes (f) 8 minority classes Figure 3: Comparison of methods with respect to multi-class ROC AUC on MNIST (a - c) and CIFAR-10 (d - f) for step imbalance with fixed number of minority classes. 11 Regarding the effect of class imbalance on classification performance, we observed the following. First, the deterioration of performance due to class imbalance is substantial. As expected, the increasing ratio of examples between majority and minority classes as well as the number of minority classes had a negative effect on performance of the resulting classifiers. Furthermore, by comparing the results from MNIST and CIFAR-10 we observed that the effect of imbalance is significantly stronger for the task with higher complexity. A similar drop in performance for MNIST and CIFAR-10 corresponded to approximately 100 times stronger level of imbalance in the MNIST dataset. Regarding performance of different methods for addressing imbalance, in almost all of the situations oversampling emerged as the best method. It also showed notable improvement of performance over the baseline (i.e. do-nothing strategy) in majority of the situations and never showed a considerable decrease in performance for the two datasets analyzed in this section making it a clear recommendation for tasks similar to MNIST and CIFAR-10. Undersampling showed a generally poor performance. In a large number of analyzed scenarios undersampling showed decrease in performance as compared to the baseline. In scenarios with a large proportion of minority classes undersampling showed some improvement over the baseline but never a notable advantage over oversampling (Figure 3). (a) Imbalance ratio of 100 (b) Imbalance ratio of 500 (c) Imbalance ratio of 1 000 (d) Imbalance ratio of 10 (e) Imbalance ratio of 20 (f) Imbalance ratio of 50 Figure 4: Comparison of methods with respect to multi-class ROC AUC on MNIST (a - c) and CIFAR-10 (d - f) for step imbalance with fixed imbalance ratio. For a fixed imbalance ratio undersampling is always trained on the subset of equal size. As a result, its performance does not change with the number of minority classes. 12 For both datasets and each case of imbalance ratio, the gap between undersampling and oversampling is the biggest for smaller number of minority classes and decreases with the number of minority classes, as shown in Figure 4. This is expected since with all classes being minority these two methods become equivalent. Two-phase training methods with both undersampling and oversampling tend to perform between the baseline and their corresponding method (undersampling or oversampling). If the baseline is better than one of these methods, fine-tuning improves the original method. Otherwise, performance deteriorates. However, if the baseline is better, there is still no gain from using two-phase training method. As oversampling is almost always better than the baseline, fine-tuning always gives lower score. (a) MNIST (b) CIFAR-10 Figure 5: Comparison of methods with respect to multi-class ROC AUC for linear imbalance. In Figure 5 we show the results for linear imbalance on MNIST and CIFAR-10 datasets. The highest possible linear imbalance ratio for MNIST dataset is 5 000, which means only one example in the most underrepresented class. However, even in this case the decrease in performance according to multi-class ROC AUC score for the baseline model is not significant, as shown in Figure 5a. Nevertheless, oversampling improves the score on both datasets and for all tested values of ρ, whereas the score for undersampling decreases approximately linearly with imbalance ratio. 4.2 Results on ImageNet dataset The results from experiments performed on ImageNet (ILSVRC-2012) dataset confirm the impact of imbalance on classifier’s performance. Table 4 compares methods with respect to multi-class ROC AUC. The drop in performance for the largest tested imbalance was from 99 to 90, in terms of multi-class ROC AUC. The results confirm that the oversampling approach performs consistently better than undersampling approach across all scenarios. A small decrease in performance as compared to baseline was observed for oversampling for extreme imbalances. Please note, however, that these results should be treated with caution and not as strong evidence that oversampling is inferior for highly complex tasks with extreme imbalance. The absolute difference in performance between three runs with respect to multi-class ROC AUC was even higher than 4 (for undersampling). Therefore, differences of 1 - 2 might be due to variability of results between different runs of neural networks. Moreover, the highest tested imbalanced training set 13 was only about 10% of the original ILSVRC-2012 introducing confounding issues such as the optimal training hyperparameters for this significantly changed dataset. Therefore, while these results indicate that caution should be taken when any sampling technique is applied to highly complex tasks with extreme imbalances, it needs a more extensive study devoted to this specific issue. Method µ = 0.1, ρ = 10 µ = 0.8, ρ = 50 Baseline Oversampling Undersampling 99.41 99.35 96.85 96.31 95.06 94.98 µ = 0.9, ρ = 100 90.74 88.38 88.35 90.46 88.39 84.08 90.05 88.17 83.74 Table 4: Comparison of results on ImageNet with respect to multi-class ROC AUC. 4.3 Separation of effects from reduced number of examples and class imbalance An important question that needs to be considered in the context of our study is whether the decrease in performance for imbalanced datasets is merely caused by the fact that our imbalanced datasets simply had fewer training examples or is it truly caused by the fact that the datasets are imbalanced. First, we notice that oversampling method uses the same amount of data as the baseline. It only eliminates the imbalance which is enough to improve the performance in almost all the cases. Still, it does not reach the performance of a classifier trained on the original dataset. This is an indication that the effect of imbalance is not trivial. Second, for some cases undersampling, which reduces the total number of cases performs better than the baseline (see Figures 3c and 3f). Moreover, there are even cases when undersampling can perform on a par with oversampling. It means that, between two sampling methods that eliminate imbalance, even using fewer data can be comparable. In addition, for the same value of parameter ρ we have equal number of examples in the training set for linear imbalance and step imbalance with µ = 0.5, which corresponds to half of the classes being minority. The drop in performance is much higher for step imbalance. This additionally demonstrates that not only the total number of examples matters but also its distribution between classes. 4.4 Improving accuracy score with multi-class thresholding While our focus is on ROC AUC, we also provide the evaluation of the methods based on overall accuracy measure with results on step imbalance shown in Figure 6. As explained in Section 3.4, accuracy has some known limitations and in some scenarios does not reflect the discriminative power of a classifier but rather the prevalence of classes in the training or test set. Nevertheless, it is still commonly used evaluation score [16] and therefore we provide some results according to this metric. Our results show that thresholding is an appropriate approach to take to offset the prior probabilities of different classes learned by a network based on imbalanced datasets 14 and provided an improvement in overall accuracy. In general, thresholding worked particularly well when applied jointly with oversampling. (a) 2 minority classes (b) 5 minority classes (c) 8 minority classes (d) 2 minority classes (e) 5 minority classes (f) 8 minority classes Figure 6: Comparison of methods with respect to accuracy on MNIST (a - c) and CIFAR-10 (d - f) for step imbalance with fixed number of minority classes. Please note that thresholding does not have an actual effect on the ability of the classifier to discriminate between a given class from another but rather helps to find a threshold on the network output that guarantees a large number of correctly classified cases. In terms of ROC, multiplying a decision variable by any positive number does not change the area under the ROC curve. However, finding an optimal operating point on the ROC curve is important when the overall number of correctly classified cases is of interest. 4.5 Undersampling and oversampling to smaller imbalance ratio The default version of oversampling is to increase the number of cases in the minority classes so that the number matches the majority classes. Similarly, the default of undersampling is to decrease the number of cases in the majority classes to match the minority classes. However, a more moderate version of these algorithms could be applied. For the case of MNIST with imbalance ratio of 1 000 we have tried to gradually decrease the imbalance with oversampling and undersampling. The results are shown in Figure 7. The results show that the default version of oversampling was always the best. Any reduction of imbalance improves the score regardless of the number of minority classes, 15 as shown in Figure 7a. For undersampling, in some cases of moderate number of minority classes, intermediate levels of undersampling performed better than both full undersampling and the baseline. (a) Oversampling (b) Undersampling Figure 7: Comparison of oversampling and undersampling to reduced imbalance ratios on MNIST with original imbalance of 1 000. Moreover, comparing undersampling and oversampling to reduced level of imbalance, we can notice that for each case of oversampling there is a level to which we can apply undersampling and achieve equivalent performance. However, that level is not known a priori rendering oversampling still the method of choice. 4.6 Generalization of sampling methods In some cases undersampling and oversampling perform similarly. In those cases, one would probably prefer the model that generalizes better. For classical machine learning models it was shown that oversampling can cause overfitting, especially for minority classes [33]. As we repeat small number of examples multiple times, the trained model fits them too well. Thus, according to this prior knowledge undersampling would be a better choice. The results from our experiments do not confirm this conclusion for convolutional neural networks. (a) Baseline (b) Oversampling (c) Undersampling Figure 8: Comparison of networks convergence between baseline and sampling methods. Training on CIFAR-10 step imbalanced with 5 minority classes and imbalance ratio of 50. 16 In Figure 8 we compare the convergence of baseline and sampling methods for CIFAR-10 experiments with respect to accuracy. Both methods helped to train a better classifier in terms of performance and generalization. They also made training more stable. However, in this case it is not true that oversampling leads to overfitting. Accuracy does not decrease as the training progresses and the gap between accuracy on the training and test sets is smaller for oversampling, Figure 8b, than undersampling, Figure 8c. This observation also holds for MNIST and ImageNet datasets and other cases of imbalance. 5 Conclusions In this study, we examined the impact of class imbalance on classification performance of convolutional neural networks and investigated the effectiveness of different methods of addressing the issue. We defined and parametrized two representative types of imbalance, i.e. step and linear. Then we subsampled MNIST, CIFAR-10 and ImageNet (ILSVRC-2012) datasets to make them artificially imbalanced. We have compared common sampling methods, basic thresholding, and two-phase training. The conclusions from our experiments related to the class imbalance are as follows. • The effect of class imbalance on classification performance is detrimental. • The influence of imbalance on classification performance increases with the scale of a task. • The impact of imbalance cannot be explained simply by the lower total number of training cases and depends on the distribution of examples among classes. Regarding the choice of a method to handle CNN training on imbalanced dataset we conclude the following. • The method that in most of the cases outperforms all others with respect to multiclass ROC AUC was oversampling. • For extreme ratio of imbalance and large portion of classes being minority, undersampling performs on a par with oversampling. • To achieve the best accuracy, one should apply thresholding to compensate for prior class probabilities. A combination of thresholding with baseline and oversampling is the most preferable, whereas it should not be combined with undersampling. • Oversampling should be applied to the level that totally eliminates the imbalance, whereas undersampling can perform better when the imbalance is only removed to some extent. • As opposed to some classical machine learning models, oversampling does not necessarily cause overfitting of convolutional neural networks. 17 References [1] Jiuxiang Gu, Zhenhua Wang, Jason Kuen, Lianyang Ma, Amir Shahroudy, Bing Shuai, Ting Liu, Xingxing Wang, and Gang Wang. Recent advances in convolutional neural networks. arXiv preprint arXiv:1512.07108, 2015. [2] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pages 818–833. Springer, 2014. [3] Yann LeCun, Bernhard Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne Hubbard, and Lawrence D Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989. [4] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [5] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for largescale image recognition. arXiv preprint arXiv:1409.1556, 2014. [6] Grant Van Horn, Oisin Mac Aodha, Yang Song, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The inaturalist challenge 2017 dataset. arXiv preprint arXiv:1707.06642, 2017. [7] Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Large-scale scene recognition from abbey to zoo. In Computer vision and pattern recognition (CVPR), 2010 IEEE conference on, pages 3485–3492. IEEE, 2010. [8] Brian Alan Johnson, Ryutaro Tateishi, and Nguyen Thanh Hoan. A hybrid pansharpening approach and multiscale object-based image analysis for mapping diseased pine and oak trees. International journal of remote sensing, 34(20):6969–6982, 2013. [9] Miroslav Kubat, Robert C Holte, and Stan Matwin. Machine learning for the detection of oil spills in satellite radar images. Machine learning, 30(2-3):195–215, 1998. [10] Oscar Beijbom, Peter J Edmunds, David I Kline, B Greg Mitchell, and David Kriegman. Automated annotation of coral reef survey images. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 1170–1177. IEEE, 2012. [11] Jerzy W Grzymala-Busse, Linda K Goodwin, Witold J Grzymala-Busse, and Xinqun Zheng. An approach to imbalanced data sets based on changing rule strength. In Rough-Neural Computing, pages 543–553. Springer, 2004. 18 [12] Brian Mac Namee, Padraig Cunningham, Stephen Byrne, and Owen I Corrigan. The problem of bias in training data in regression problems in medical decision support. Artificial intelligence in medicine, 24(1):51–70, 2002. [13] Philip K Chan and Salvatore J Stolfo. Toward scalable learning with non-uniform class and cost distributions: A case study in credit card fraud detection. In KDD, volume 1998, pages 164–168, 1998. [14] Predrag Radivojac, Nitesh V Chawla, A Keith Dunker, and Zoran Obradovic. Classification and knowledge discovery in protein databases. Journal of Biomedical Informatics, 37(4):224–239, 2004. [15] Claire Cardie and Nicholas Howe. Improving minority class prediction using casespecific feature weights. In ICML, pages 57–65, 1997. [16] Guo Haixiang, Li Yijing, Jennifer Shang, Gu Mingyun, Huang Yuanyue, and Gong Bing. Learning from class-imbalanced data: Review of methods and applications. Expert Systems with Applications, 2016. [17] Nathalie Japkowicz and Shaju Stephen. The class imbalance problem: A systematic study. Intelligent data analysis, 6(5):429–449, 2002. [18] Maciej A Mazurowski, Piotr A Habas, Jacek M Zurada, Joseph Y Lo, Jay A Baker, and Georgia D Tourassi. Training neural network classifiers for medical decision making: The effects of imbalanced datasets on classification performance. Neural networks, 21(2):427–436, 2008. [19] Nitesh V Chawla. Data mining for imbalanced datasets: An overview. In Data mining and knowledge discovery handbook, pages 853–867. Springer, 2005. [20] Marcus A Maloof. Learning when data sets are imbalanced and when costs are unequal and unknown. In ICML-2003 workshop on learning from imbalanced data sets II, volume 2, pages 2–1, 2003. [21] Charles X Ling and Chenghui Li. Data mining for direct marketing: Problems and solutions. In KDD, volume 98, pages 73–79, 1998. [22] Zhi-Hua Zhou and Xu-Ying Liu. Training cost-sensitive neural networks with methods addressing the class imbalance problem. IEEE Transactions on Knowledge and Data Engineering, 18(1):63–77, 2006. [23] Steve Lawrence, Ian Burns, Andrew Back, Ah Chung Tsoi, and C Lee Giles. Neural network classification and prior class probabilities. In Neural networks: tricks of the trade, pages 299–313. Springer, 1998. [24] Salman H Khan, Mohammed Bennamoun, Ferdous Sohel, and Roberto Togneri. Cost sensitive learning of deep feature representations from imbalanced data. arXiv preprint arXiv:1508.03422, 2015. 19 [25] Vidwath Raj, Sven Magg, and Stefan Wermter. Towards effective classification of imbalanced data with convolutional neural networks. In IAPR Workshop on Artificial Neural Networks in Pattern Recognition, pages 150–162. Springer, 2016. [26] Yu-An Chung, Hsuan-Tien Lin, and Shao-Wen Yang. Cost-aware pre-training for multiclass cost-sensitive deep learning. arXiv preprint arXiv:1511.09337, 2015. [27] Shoujin Wang, Wei Liu, Jia Wu, Longbing Cao, Qinxue Meng, and Paul J Kennedy. Training deep neural networks on imbalanced data sets. In Neural Networks (IJCNN), 2016 International Joint Conference on, pages 4368–4374. IEEE, 2016. [28] Mohammad Havaei, Axel Davy, David Warde-Farley, Antoine Biard, Aaron Courville, Yoshua Bengio, Chris Pal, Pierre-Marc Jodoin, and Hugo Larochelle. Brain tumor segmentation with deep neural networks. Medical image analysis, 35:18–31, 2017. [29] Haibo He and Edwardo A Garcia. Learning from imbalanced data. IEEE Transactions on knowledge and data engineering, 21(9):1263–1284, 2009. [30] Gil Levi and Tal Hassner. Age and gender classification using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 34–42, 2015. [31] Andrew Janowczyk and Anant Madabhushi. Deep learning for digital pathology image analysis: A comprehensive tutorial with selected use cases. Journal of pathology informatics, 7, 2016. [32] Nicolas Jaccard, Thomas W Rogers, Edward J Morton, and Lewis D Griffin. Detection of concealed cars in complex cargo x-ray imagery using deep learning. Journal of X-Ray Science and Technology, pages 1–17, 2016. [33] Nitesh V Chawla, Kevin W Bowyer, Lawrence O Hall, and W Philip Kegelmeyer. Smote: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16:321–357, 2002. [34] Kung-Jeng Wang, Bunjira Makond, Kun-Huang Chen, and Kung-Min Wang. A hybrid classifier combining smote with pso to estimate 5-year survivability of breast cancer patients. Applied Soft Computing, 20:15–24, 2014. [35] Hui Han, Wen-Yuan Wang, and Bing-Huan Mao. Borderline-smote: a new oversampling method in imbalanced data sets learning. Advances in intelligent computing, pages 878–887, 2005. [36] Taeho Jo and Nathalie Japkowicz. Class imbalances versus small disjuncts. ACM Sigkdd Explorations Newsletter, 6(1):40–49, 2004. [37] Hongyu Guo and Herna L Viktor. Learning from imbalanced data sets with boosting and data generation: the databoost-im approach. ACM Sigkdd Explorations Newsletter, 6(1):30–39, 2004. 20 [38] Li Shen, Zhouchen Lin, and Qingming Huang. Relay backpropagation for effective learning of deep convolutional neural networks. In European Conference on Computer Vision, pages 467–482. Springer, 2016. [39] Chris Drummond, Robert C Holte, et al. C4.5, class imbalance, and cost sensitivity: why under-sampling beats over-sampling. In Workshop on learning from imbalanced datasets II, volume 11, pages 1–8, 2003. [40] Miroslav Kubat, Stan Matwin, et al. Addressing the curse of imbalanced training sets: one-sided selection. In ICML, volume 97, pages 179–186. Nashville, USA, 1997. [41] Jack Koplowitz and Thomas A Brown. On the relation of performance to editing in nearest neighbor rules. Pattern Recognition, 13(3):251–255, 1981. [42] Ricardo Barandela, E Rangel, José Salvador Sánchez, and Francesc J Ferri. Restricted decontamination for the imbalanced training sample problem. In Iberoamerican Congress on Pattern Recognition, pages 424–431. Springer, 2003. [43] Michael D Richard and Richard P Lippmann. Neural network classifiers estimate bayesian a posteriori probabilities. Neural computation, 3(4):461–483, 1991. [44] Charles Elkan. The foundations of cost-sensitive learning. In International joint conference on artificial intelligence, volume 17, pages 973–978. Lawrence Erlbaum Associates Ltd, 2001. [45] Matjaz Kukar, Igor Kononenko, et al. Cost-sensitive learning with neural networks. In ECAI, pages 445–449, 1998. [46] Nathalie Japkowicz, Catherine Myers, Mark Gluck, et al. A novelty detection approach to classification. In IJCAI, volume 1, pages 518–523, 1995. [47] Nathalie Japkowicz, Stephen Jose Hanson, and Mark A Gluck. Nonlinear autoassociation is not equivalent to pca. Neural computation, 12(3):531–545, 2000. [48] Hoon Sohn, Keith Worden, and Charles R Farrar. Novelty detection using autoassociative neural network. In Symposium on Identification of Mechanical Systems: international mechanical engineering congress and exposition, New York, NY, pages 573–580, 2001. [49] Hyoung-joo Lee and Sungzoon Cho. The novelty detection approach for different degrees of class imbalance. In Neural Information Processing, pages 21–30. Springer, 2006. [50] Xu-Ying Liu, Jianxin Wu, and Zhi-Hua Zhou. Exploratory undersampling for classimbalance learning. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 39(2):539–550, 2009. 21 [51] Nitesh V Chawla, Aleksandar Lazarevic, Lawrence O Hall, and Kevin W Bowyer. Smoteboost: Improving prediction of the minority class in boosting. In European Conference on Principles of Data Mining and Knowledge Discovery, pages 107–119. Springer, 2003. [52] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [53] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. [54] 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. [55] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the 22nd ACM international conference on Multimedia, pages 675–678. ACM, 2014. [56] Ning Qian. On the momentum term in gradient descent learning algorithms. Neural networks, 12(1):145–151, 1999. [57] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256, 2010. [58] Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron C Courville, and Yoshua Bengio. Maxout networks. ICML (3), 28:1319–1327, 2013. [59] Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arXiv preprint arXiv:1412.6806, 2014. [60] Marcel Simon, Erik Rodner, and Joachim Denzler. Imagenet pre-trained models with batch normalization. arXiv preprint arXiv:1612.01452, 2016. [61] 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. [62] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [63] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026–1034, 2015. 22 [64] Andrew P Bradley. The use of the area under the roc curve in the evaluation of machine learning algorithms. Pattern recognition, 30(7):1145–1159, 1997. [65] Charles X Ling, Jin Huang, and Harry Zhang. Auc: a statistically consistent and more discriminating measure than accuracy. In IJCAI, volume 3, pages 519–524, 2003. [66] Foster Provost and Pedro Domingos. Tree induction for probability-based ranking. Machine learning, 52(3):199–215, 2003. 23
9cs.NE
A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR AND LOG TERMINAL SINGULARITIES arXiv:1603.08422v2 [math.AC] 4 Sep 2016 ANURAG K. SINGH, SHUNSUKE TAKAGI, AND MATTEO VARBARO Dedicated to Professor Craig Huneke on the occasion of his sixty-fifth birthday. Abstract. A conjecture of Hirose, Watanabe, and Yoshida offers a characterization of when a standard graded strongly F -regular ring is Gorenstein, in terms of an F -pure threshold. We prove this conjecture under the additional hypothesis that the anti-canonical cover of the ring is Noetherian. Moreover, under this hypothesis on the anti-canonical cover, we give a similar criterion for when a normal F -pure (resp. log canonical) singularity is quasiGorenstein, in terms of an F -pure (resp. log canonical) threshold. 1. Introduction Let R be an F -pure domain of positive characteristic, and a a nonzero proper ideal. The F -pure threshold fpt(a) was defined by Watanabe and the second author of this paper [37]; it may be viewed as a positive characteristic analogue of the log canonical threshold, and is an important measure of the singularities of the pair (Spec R, V (a)). For example, a local ring (R, m) is regular if and only if fpt(m) > dim R − 1. We say that R is strongly F -regular if fpt(a) > 0 for each nonzero proper ideal a of R. It is well-known that each strongly F -regular ring is Cohen-Macaulay and normal; it is then natural to ask: when is a strongly F -regular ring Gorenstein? Toward answering this in the graded context, Hirose, Watanabe, and Yoshida proposed the following: Conjecture 1.1. [20, Conjecture 1.1 (2)] Let R be a standard graded strongly F -regular ring, with R0 an F -finite field of characteristic p > 0. Let m be the unique homogeneous maximal ideal of R. Then fpt(m) = −a(R) if and only if R is Gorenstein. We prove that the conjecture holds for many classes of (not necessarily strongly F -regular) F -pure normal standard graded rings: Theorem A (Corollaries 3.17, 4.12). Let R be an F -pure, normal, standard graded ring, with R0 an F -finite field of characteristic p > 0. Let m denote the homogeneous maximal L ideal of R. Set X = Spec R, and suppose that the anti-canonical cover O (−nK X) n>0 X of X is a Noetherian ring. Then fpt(m) = −a(R) if and only if R is quasi-Gorenstein. Note that a ring is Gorenstein if and only if it is Cohen-Macaulay and quasi-Gorenstein. L Under the hypotheses of Theorem A, the anti-canonical cover n>0 OX (−nKX ) is known to be Noetherian in each of the following cases: (1) R is Q-Gorenstein, A.K.S. was partially supported by NSF grants DMS 1162585 and DMS 1500613, S.T. by JSPS KAKENHI 26400039, and M.V. by Geometria delle Varietà Algebriche PRIN 2010S47ARA 003. The third author worked on part of this project while he was visiting the Max Planck Institute for Mathematics of Bonn. The authors are grateful to Yoshinori Gongyo, Alessandro De Stefani, Kei-ichi Watanabe, Ken-ichi Yoshida, and the referees for helpful comments. 1 2 A. K. SINGH, S. TAKAGI and M. VARBARO (2) R is a semigroup ring, (3) R is a determinantal ring, (4) R is a strongly F -regular ring of dimension at most three, (5) R is a four-dimensional strongly F -regular ring, of characteristic p > 5. We give two proofs of Theorem A: the first has the advantage that it can be adapted to obtain results in the local setting, e.g., Theorem 3.14. The second proof, while limited to the graded context, provides a technique for computing the numerical invariants at hand; see Proposition 4.3 for the case of determinantal rings. We describe the two techniques, after recalling some definitions: Recall that a ring R of prime characteristic p is called F -finite if the Frobenius map F : R −→ F∗ R is a finite map. Let R be a local or standard graded F -finite domain of characteristic p > 0, and suppose that R is F -pure, i.e., the e-th iterated Frobenius map e F e : R −→ F∗e R with x 7−→ F∗e xp splits as an R-linear map for each e > 1. Given a nonzero ideal a ( R, and an integer e > 1, set νe (a) to be the largest integer r > 0 such that there exists a nonzero element c in ar for which the composite map Fe ×F e c R −−→ F∗e R −−−∗→ F∗e R, where e e x 7−→ F∗e xp 7−→ F∗e (cxp ), splits as an R-module homomorphism. Then, fpt(a) is defined to be lime−→∞ νe (a)/pe . The first proof of Theorem A uses an invariant c(a) that was originally introduced in [32]: Given a nonzero ideal a ( R, this invariant is defined in terms of the Grothendieck trace of the iterated Frobenius map Tre : F∗e ωR −→ ωR , where ωR is the canonical module of R. For an F -pure normal graded ring (R, m), one has fpt(m) 6 c(m) 6 −a(R), with equality holding when R is a quasi-Gorenstein standard graded ring; see Propositions 3.5 and 3.6. Thus, it suffices to show that if fpt(m) = c(m), then R is quasi-Gorenstein. Generalizing the argument of [37, Theorem 2.7], we are indeed able to prove this when the anti-canonical cover of R is Noetherian. We also use the invariant c(m) in answering another question of Hirose, Watanabe, and Yoshida, [20, Question 6.7]; see Corollary 3.18. Our second proof uses the so-called Fedder-type criterion: Writing the standard graded ring R as S/I, for S a polynomial ring and I a homogeneous ideal, we characterize νe (m) in e terms of the ideal I [p ] :S I, and use this to show that −νe (m) equals the degree of a minimal generator of the (1 − pe )-th symbolic power of ωR , see Theorem 4.1. Using this, we give explicit computations of fpt(m) in many situations, e.g., for determinant rings and for QGorenstein rings, see Propositions 4.3 and 4.5. We also prove that if (R, m) is a Q-Gorenstein normal domain, with index coprime to p, then the pair (R, mfpt(m) ) is sharply F -pure; see Proposition 4.13. Thus far we have discussed singularities in positive characteristic; we also prove an analogous result in characteristic zero. de Fernex-Hacon [10] extended the definition of log terminal and log canonical singularities to the non-Q-Gorenstein setting, which can be regarded as the characteristic zero counterparts of strongly F -regular and F -pure rings. Using their definition, we formulate a characteristic zero analogue of Theorem A as follows: Theorem B (Corollary 5.13). Let R be a standard graded normal ring, with R0 an algebraically closed field of characteristic zero. Set m to be the homogeneous maximal ideal of R. Assume that X := Spec R has log canonical singularities in the sense of de Fernex-Hacon; set lct(m) = sup{t > 0 | (X, mt ) is log canonical in the sense of de Fernex-Hacon}. A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 3 (1) Then lct(m) 6 −a(R). L (2) Suppose, in addition, that the anti-canonical cover n>0 OX (−nKX ) is Noetherian. Then lct(m) = −a(R) if and only if R is quasi-Gorenstein. We remark that in the situation of Theorem B, the anti-canonical cover is Noetherian whenever X has log terminal singularities in the sense of de Fernex-Hacon, or if R is QGorenstein. Thus, Theorem B gives an affirmative answer to a conjecture of De StefaniNúñez-Betancourt [11, Conjecture 6.9]. In order to prove Theorem B, we introduce a new invariant d(a) for an ideal a of a normal variety X with Du Bois singularities, in terms of a variant of multiplier modules, see Definition 5.4. We are then able to employ the same strategy as in the first proof of Theorem A, using d(a) in place of c(a). Throughout this paper, all rings are assumed to be Noetherian (except possibly for anticanonical covers), commutative, with unity. By a standard graded ring, we mean an N-graded L ring R = n>0 Rn , with R0 a field, such that R is generated as an R0 -algebra by finitely many elements of R1 . 2. Preliminaries on F -singularities In this section, we briefly review the theory of F -singularities. In order to state the definitions, we first introduce the following notation: Let R be a ring of prime characteristic p > 0. We denote by R◦ the set of elements of R that are not in any minimal prime ideal. Given an R-module M and e ∈ N, the R-module F∗e M is defined by the following two conditions: (i) F∗e M = M as an abelian group, and e (ii) the R-module structure of F∗e M is given by r · x := r p x for r ∈ R and x ∈ F∗e M . We e e write elements of F∗ M in the form F∗ x with x ∈ M . The e-th iterated Frobenius map is the e R-linear map F e : R −→ F∗e R sending x to F∗e xp . We say that R is F -finite if the Frobenius map is finite, that is, F∗1 R is a finitely generated R-module. When (R, m) is local, the e-th iterated Frobenius map F e : R −→ F∗e R induces a map FHe i (R) : Hmi (R) −→ Hmi (R) for each i. m We recall the definition of classical F -singularities: Definition 2.1. Let R be an F -finite reduced ring of prime characteristic p > 0. (1) We say that R is F -pure if the Frobenius map R −→ F∗ R splits as an R-linear map. (2) We say that R is strongly F -regular if for every c ∈ R◦ , there exists a power q = pe of p such that the R-linear map R −→ F∗e R sending 1 to F∗e c splits. (3) When (R, m) is local, we say that R is F -injective if FHmi (R) : Hmi (R) −→ Hmi (R) is injective for each i. In general, we say that R is F -injective if the localization Rm is F -injective for each maximal ideal m of R. (4) When (R, m) is local, we say that R is F -rational if R is Cohen-Macaulay and if for every c ∈ R◦ , there exists e ∈ N such that cFHe d (R) : Hmd (R) −→ Hmd (R) sending z to m cFHe d (R) (z) is injective. In general, we say that R is F -rational if the localization Rm m is F -rational for each maximal ideal m of R. Next we generalize these to the pair setting, see [17, 30, 37]: Definition 2.2. Let a be an ideal of an F -finite reduced ring R of prime characteristic p such that a ∩ R◦ 6= ∅. (1) Suppose that R is local. For a real number t > 0, the pair (R, at ) is sharply F -pure if there exist q = pe and c ∈ a⌈t(q−1)⌉ such that the R-linear map R −→ F∗e R sending 1 4 A. K. SINGH, S. TAKAGI and M. VARBARO to F∗e c splits. The pair (R, at ) is weakly F -pure if there exist infinitely many e ∈ N and e associated elements ce ∈ a⌊t(p −1)⌋ such that each R-linear map R −→ F∗e R sending 1 to F∗e ce splits. When R is not local, (R, at ) is said to be sharply F -pure (resp. weakly F -pure) if the localization (Rm , atm ) at m is sharply F -pure (resp. weakly F -pure) for every maximal ideal m of R. (2) Suppose that R is F -pure. Then the F -pure threshold fpt(a) of a is defined as fpt(a) = sup{t ∈ R>0 | (R, at ) is weakly F -pure}. (3) Suppose that R is a normal local domain and ∆ is an effective Q-divisor on X := Spec R. For a real number t > 0, the pair ((R, ∆); at ) is sharply F -pure if there exists q = pe and c ∈ a⌈t(q−1)⌉ such that the R-linear map R −→ F∗e OX (⌈(q − 1)∆⌉) with 1 7−→ F∗e c splits. The pair ((R, ∆); at ) is weakly F -pure if there exist infinitely many e ∈ N and e associated elements ce ∈ a⌊t(p −1)⌋ such that each R-linear map R −→ F∗e OX (⌊(pe − 1)∆⌋) with 1 7−→ F∗e ce splits. If, in addition, a = OX , then we simply say that (X, ∆) is F -pure. If (R, ∆) is F -pure, then the F -pure threshold fpt(∆; a) of a with respect to the pair (R, ∆) is defined by fpt(∆; a) = sup{t ∈ R>0 | ((R, ∆); at ) is weakly F -pure}. Remark 2.3. (1) Sharp F -purity implies weak F -purity. When a = R, the sharp F -purity and the weak F -purity of (R, at ) are equivalent to the F -purity of R. Suppose that R is F -pure. It is easy to check that if (R, at ) is weakly F -pure with t > 0, then (R, at−ε ) is sharply F -pure for every t > ε > 0 (cf. [30, Lemma 5.2]). Thus, fpt(a) = sup{t ∈ R>0 | (R, at ) is sharply F -pure}. (2) Our definition of the F -purity of (R, ∆) coincides with the one in [17, Definition 2.1]. The following is a standard application of Matlis duality, which we will use in Section 3. Lemma 2.4 (cf. [17, Proposition 2.4]). Let (R, m) be a d-dimensional F -finite normal local ring of characteristic p > 0, ∆ be an effective Q-divisor on X = Spec R and a be a nonzero ideal of R. For any real number t > 0, the pair ((R, ∆); at ) is weakly F -pure if and only if e there exist infinitely many e ∈ N and associated elements ce ∈ a⌊t(p −1)⌋ such that e FX,∆ ×c e e ce FX,∆ : Hmd (ωX ) −−−→ Hmd (OX (⌊pe KX + (pe − 1)∆⌋)) −−→ Hmd (OX (⌊pe KX + (pe − 1)∆⌋)) e is injective, where FX,∆ is the map induced by the R-linear map R −→ F∗e OX (⌊(pe − 1)∆⌋) sending 1 to F∗e 1. The following is a reformulation of the so-called “Fedder-type criterion,” that we will use in Section 4. Proposition 2.5. Let S = k[x1 , . . . , xn ] be a polynomial ring over an F -finite field k of characteristic p > 0 and I be a homogeneous ideal of S. Suppose that R := S/I is F -pure. Given an e ∈ N and a homogeneous ideal a ⊂ S containing I such that aR ∩ R◦ 6= ∅, we define the integer νe (a) by e e e νe (a) := max{r > 0 | ar (I [p ] : I) 6⊂ (xp1 , . . . , xpn )}. A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 5 (1) For a real number t > 0, the pair (R, (aR)t ) is sharply (resp. weakly) F -pure if and only if νe (a) > ⌈(pe − 1)t⌉ for some e (resp. νe (a) > ⌊(pe − 1)t⌋ for infinitely many e). (2) fpt(aR) = lime−→∞ νe (a)/pe . Proof. It follows from [36, Lemma 3.9] (where the criterion for F -purity is stated in the local setting, but the same argument works in the graded setting).  In order to generalize the definition of F -rational and F -injective rings to the pair setting, we use the notion of at -tight closure and at -sharp Frobenius closure. Definition 2.6. Let a be an ideal of a reduced ring R of prime characteristic p > 0 such that a ∩ R◦ 6= ∅, and t > 0 be a real number. t (1) ([18, Definition 6.1]) For an ideal I ⊆ R, the at -tight closure I ∗a of I is defined to be the ideal of R consisting of all elements x ∈ R for which there exists c ∈ R◦ such that ca⌈t(q−1)⌉ xq ⊆ I [q] for all large q = pe . t (2) ([30, Definition 3.10]) For an ideal I ⊂ R, the at -sharp Frobenius closure I F ♯a of I is defined to be the ideal of R consisting of all elements x ∈ R such that a⌈t(q−1)⌉ xq ⊆ I [q] for all large q = pe . t (3) Suppose that (R, m) is local. The at -sharp Frobenius closure 0FH♯a i (R) of the zero subm module in Hmi (R) is defined to be the submodule of Hmi (R) consisting of all elements z ∈ Hmi (R) such that a⌈t(q−1)⌉ FHe i (R) (z) = 0 in Hmi (R) for all large q = pe . m The following technical remark is useful for the study of the invariant c(a), which will be introduced in Section 3. Remark 2.7. Let (R, m) be an F -finite reduced local ring of characteristic p > 0. Let Tre : F∗e ωR −→ ωR be the e-th iteration of the trace map on R, that is, the ωR -dual of the e-th iterated Frobenius map F e : R −→ F∗e R. It then follows from an argument similar t to the proof of [16, Lemma 2.1] that 0FH♯a d (R) = 0 if and only if m X e e Tr (F∗e (a⌈t(p −1)⌉ ωR )) = ωR e>e0 for every integer e0 > 0. Definition 2.8. Let R be an F -finite Cohen-Macaulay reduced ring of prime characteristic p > 0, a be an ideal of R such that a ∩ R◦ 6= ∅, and t > 0 be a real number. t (1) ([32, Definition 6.1]) When R is local, (R, at ) is said to be F -rational if J ∗a = J for every ideal J generated by a full system of parameters for R. t (2) When R is local, (R, at ) is said to be sharply F -injective if J F ♯a = J for every ideal J generated by a full system of parameters for R. When R is not local, the pair (R, at ) is said to be F -rational (resp. sharply F -injective) if the localization (Rm , atm ) at m is F -rational (resp. sharply F -injective) for every maximal ideal m of R. When a = R, this definition coincides with the one in Definition 2.1. We review basic properties of sharply F -injective pairs and F -rational pairs. Lemma 2.9. Let R be an F -finite reduced ring of prime characteristic p > 0, a be an ideal of R such that a ∩ R◦ 6= ∅, and t > 0 be a real number. Set d := dim R. (1) Suppose that (R, m) is Cohen-Macaulay. Then the following are equivalent: (a) (R, at ) is sharply F -injective (resp. F -rational). 6 A. K. SINGH, S. TAKAGI and M. VARBARO t t (b) J F ♯a = J (resp. J ∗a = J) for an ideal J generated by a full system of parameters. t t (c) 0FH♯a = 0 (resp. 0∗a d (R) = 0). d Hm m (R) (2) Suppose that R is F -rational. (a) There exists a rational number t0 > 0 such that (R, at0 ) is sharply F -injective. (b) If (R, at ) is sharply F -injective with t > 0, then (R, at−ε ) is F -rational for every t > ε > 0. F ♯at (3) Suppose that (R, m) is local. If (R, at ) is sharply F -pure, then 0H i (R) = 0 for every i. m t F ♯a When R is quasi-Gorenstein, is sharply F -pure if and only if 0H = 0. d m (R) (4) Let (R, m) ֒−→ (S, n) be a flat local homomorphism of F -finite reduced local rings of characteristic p > 0. Suppose that S/mS is a field which is a separable algebraic extension t F ♯(aS)t of R/m. Then 0FH♯a d (R) = 0 if and only if 0H d (S) = 0. (R, at ) n m Proof. We may assume throughout that (R, m) is local. Let J be an ideal generated by a full system of parameters for R. (1) The F -rational case follows from [32, Lemma 6.3] and the sharp F -injective case follows from an analogous argument. (2) First we will show (a). Fix a nonzero element f ∈ a. Since R is F -rational, there exists e0 ∈ N such that f FHe0d (R) : Hmd (R) −→ Hmd (R) is injective. Then for each n ∈ N, the map m f 1+p e0 +···+p(n−1)e0 FHned0(R) : Hmd (R) −→ Hmd (R) m t0 F ♯a is also injective. Set t0 = 1/(pe0 − 1) and let z ∈ 0H d (R) . Since m f 1+pe0 +···+p(n−1)e0 FHned0(R) (z) m ∈ at0 (p ne0 −1) FHned0(R) (z) = 0 m for sufficiently large n, one has z = 0 by the injectivity of f 1+p e0 +···+p(n−1)e0 FHned0(R) . It follows m t0 F ♯a that 0H d (R) = 0. m t−ε Next we will show (b). Let x ∈ J ∗a . Since 1 is a parameter at−ε -test element by [32, Lemma 6.8] (see [32, Definition 6.6] for the definition of parameter at−ε -test elements), a⌈t(q−1)⌉ xq ⊆ a⌈(t−ε)q⌉ xq ⊆ J [q] for all sufficiently large q = pe . Then the sharp F -injectivity t−ε of (R, at ) implies that x ∈ J, that is, J ∗a = J. t t e (3) Let z ∈ 0FH♯a i (R) . Since (R, a ) is sharply F -pure, there exist a sufficiently large q = p e m and c ∈ a⌈t(p −1)⌉ such that the R-linear map R −→ F∗e R sending 1 to F∗e c splits, and in particular, cFHe i (R) : Hmi (R) −→ Hmi (R) is injective. Then z has to be zero, because m e t = 0. cFHe i (R) (z) ∈ a⌈t(p −1)⌉ FHe i (R) (z) = 0. That is, 0FH♯a i m m m (R) For the latter assertion, suppose that R is quasi-Gorenstein. Then by [30, Theorem 4.1], (R, at ) is sharply F -pure if and only if for infinitely many q = pe , there exists c ∈ a⌈t(q−1)⌉ such that cFHe d (R) : Hmd (R) −→ Hmd (R) is injective. Looking at the socle of Hmd (R), we see m t that this condition is equivalent to saying that 0FH♯a d (R) = 0. m (4) Since Hnd (S) does not change by passing to the completion of S, we may assume that S is complete. Let TreR : F∗e ωR −→ ωR (resp. TreS : F∗e ωS −→ ωS ) denote the e-th iteration of the trace map on R (resp. S). It then follows from the proof of [35, Lemma 1.5 (2)] that TreR ⊗R S : F∗e ωR ⊗R S −→ ωR ⊗R S is isomorphic to TreS for each e ∈ N. By Remark 2.7, A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 7 t 0FH♯a d (R) = 0 if and only if m M e>e0 TreR : M F∗e (a⌈t(p e −1)⌉ ωR ) −→ ωR e>e0 is surjective for every integer e0 > 0. Tensoring with S, we see that this condition is equivalent to the surjectivity of M M e TreS : F∗e (a⌈t(p −1)⌉ ωS ) −→ ωS e>0 e>e0 F ♯(aS)t for every e0 > 0, which holds by Remark 2.7 again if and only if 0H d (S) = 0.  n 3. Positive characteristic case I We introduce a new invariant of singularities in positive characteristic, and study its basic properties. Using this, we give a partial answer to Conjecture 1.1. Definition 3.1. Let (R, m) be a d-dimensional F -finite F -injective local ring of characteristic p > 0, a be an ideal of R such that a ∩ R◦ 6= ∅. For each integer i, the threshold ci (a) is defined by t ci (a) = sup{t ∈ R>0 0FH♯a i (R) = 0}. m Note that ci (a) = ∞ when Hmi (R) = 0. Also, we simply denote cd (a) by c(a). Remark 3.2. Let R be an N-graded ring with R0 an F -finite field of characteristic p > 0, and m the homogeneous maximal ideal of R. Then we can define ci (m) similarly, that is, t F ♯m ci (m) = sup{t ∈ R>0 0H i (R) = 0}. m Since Hmi (R) i ∼ (Rm ), we have the equality ci (m) = ci (mRm ). = HmR m Lemma 3.3. Let the notation be the same as in Definition 3.1. (1) If R is Cohen-Macaulay, then c(a) = sup{t ∈ R>0 | (R, at ) is sharply F -injective}. (2) If R is F -rational, then c(a) = sup{t ∈ R>0 | (R, at ) is F -rational}. (3) Suppose that R is F -pure. Then ci (a) > fpt(a) for each i. In addition, if R is quasiGorenstein, then c(a) = fpt(a). (4) c(a) is less than or equal to the height ht a of a. (5) Suppose that R is Cohen-Macaulay and the residue field R/m is infinite. If J ⊂ R is a minimal reduction of m, then md+1−⌈c(m)⌉ ⊆ J. (6) Suppose that R is Cohen-Macaulay. If c(m) > d− 1, then R is regular and in particular c(m) = d. Proof. (1) (resp. (2), (3)) follows from Lemma 2.9 (1) (resp. (2), (3)). (4) Since the trace map commutes with localization, by Remark 2.7, c(a) 6 c(aRp ) for every prime ideal p containing a. Localizing at a minimal prime of a, we may assume that ht a = d. We can also assume by Lemma 2.9 (4) that the residue field R/m is infinite. Let t J be a minimal reduction of a, and we will show that 0FH♯a d (R) 6= 0 for every d (R) ⊇ (0 : J)Hm m 8 A. K. SINGH, S. TAKAGI and M. VARBARO t > d. Let z ∈ (0 : J)Hmd (R) . Note that if t > d, then J [q] ⊇ a⌈t(q−1)⌉ for all large q = pe ′ (because a⌈t(q−1)⌉ = J ⌈tq (q−1)⌉ an for some fixed n ∈ N, where t′q = t − n/(q − 1)). Then a⌈t(q−1)⌉ FHe d (R) (z) ⊆ J [q] FHe d (R) (z) = FHe d (R) (Jz) = 0 m m m F ♯at for such q = pe , which implies that z ∈ 0H d (R) . Pm e (5) It follows from Remark 2.7 that e>e0 Tre (F∗e (m⌈(c(m)−ε)(p −1)⌉ ωR )) = ωR for all e0 ∈ Z>0 and for all c(m) > ε > 0 (when c(m) = 0, we put ε = 0). Multiplying by md+1−⌈c(m)⌉ on both sides, one has   X e md+1−⌈c(m)⌉ ωR = md+1−⌈c(m)⌉ Tre F∗e (m⌈(c(m)−ε)(p −1)⌉ ωR ) ⊆ X e>e0 ⊆ X e>e0 ⊆ X e>e0 e>e0   e e Tre F∗e (m⌈(c(m)−ε)(p −1)⌉+(d+1−⌈c(m)⌉)p ωR )   e Tre F∗e (mdp ωR )   e Tre F∗e (J [p ] ωR ) ⊆ JωR for sufficiently large e0 and for sufficiently small ε > 0. Since R/J is the Matlis dual of ωR /JωR , this means that md+1−⌈c(m)⌉ ⊆ J. (6) Let J be a minimal reduction of m; we may assume by Lemma 2.9 (4) that the residue field R/m is infinite. It then follows from (5) that m = J, which means that m is generated by at most d elements, that is, R is regular. If R is regular, then c(m) = fpt(m) = d by (3) and [37, Theorem 2.7 (1)].  Example 3.4. Let S be the n-dimensional polynomial ring k[x1 , . . . , xn ] over an F -finite field k. Let R = S (r) be the r-th Veronese subring of S and mR be the homogeneous maximal ideal of R. Then fpt(mR ) = n/r and c(mR ) = ⌈n/r⌉. When R is an N-graded ring, the i-th a-invariant ai (R) is defined by ai (R) = max{n ∈ Z | [Hmi (R)]n 6= 0} for each i. The following proposition can be viewed as an extension of [11, Theorem 4.3]. Proposition 3.5. Let R be an F -injective N-graded ring, with R0 an F -finite field of characteristic p > 0. Let m be the homogeneous maximal ideal of R. Then ci (m) 6 −ai (R) for each i. In particular, if R is F -pure, then by Lemma 3.3 (3), one has the inequality fpt(m) 6 −ai (R) for every integer i. Proof. We may assume that Hmi (R) 6= 0. We will then show that ci (m) 6 −ai (R) + ε, that F ♯m−ai (R)+ε 6= 0, for every ε > 0. Note that ai (R) 6 0, because R is F -injective. Let is, 0H i (R) m z ∈ [Hmi (R)]ai (R) be a nonzero element. Since ⌈(−ai (R) + ε)(q − 1)⌉ + ai (R)q > 0 for all sufficiently large q = pe , one has m⌈(−ai (R)+ε)(q−1)⌉ FHe i (R) (z) ⊆ [Hmi (R)]>0 = 0 m F ♯m−ai (R)+ε for such q, which means that z ∈ 0H i (R) m .  A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 9 We record two cases in which the above result can be strengthened to an equality: Proposition 3.6. Let R be an F -injective standard graded ring with R0 an F -finite field of characteristic p > 0. Let m denote the homogeneous maximal ideal of R. Suppose that one of the following conditions is satisfied: (1) R is Cohen-Macaulay, (2) R is normal and quasi-Gorenstein. Then c(m) = −a(R). Proof. Let d be the dimension of R. First, we assume that the condition (1) holds and we will prove that c(m) > −a(R)−ε for every ε > 0. We may assume by Lemma 2.9 (4) that R0 is an infinite field. Let J be a minimal reduction of m. As R is a Cohen-Macaulay standard graded ring, J is generated by a homogeneous regular sequence of degree one. Then md+a(R)+1 is contained in J but md+a(R) is not. −a(R)−ε = J by Lemma 2.9 (1) and Lemma 3.3 (1). Let It is enough to show that J F ♯m −a(R)−ε F ♯m , and we may assume that the degree of x is less than or equal to d + a(R). x∈J By definition, m⌈(−a(R)−ε)(q−1)⌉ xq ⊆ J [q] for all sufficiently large q = pe . Thus, xq ∈ (J [q] : J ⌈(−a(R)−ε)(q−1)⌉ ) ⊆ J [q] + J dq−⌈(−a(R)−ε)(q−1)⌉−d+1 . The degree of xq is less than or equal to (d + a(R))q, but dq − ⌈(−a(R) − ε)(q − 1)⌉ − d + 1 is greater than (d + a(R))q for sufficiently large q, so xq has to lie in J [q] for such q. It then −a(R)−ε = J. follows from the F -injectivity of R that x ∈ J, that is, J F ♯m Next, we assume that the condition (2) holds and we will show that c(m) > −a(R). It is enough to show by Lemma 3.3 (3) that fpt(m) > −a(R). Let X = Proj R. Since R is a quasi-Gorenstein normal standard graded ring, there exists a very ample divisor H on X such L 0 (X, O (nH)) and K that R = H X X ∼ a(R)H. Note that X is globally F -split and n>0 a(R) 6 0, because R is F -pure. It then follows from an argument similar to the proof of [31, Theorem 4.3] that there exists an effective Cartier divisor D on X such that D ∼ (1−p)a(R)H and that the composite map OX −→ F∗ OX −→ F∗ OX (D) x 7−→ F∗ xp 7−→ F∗ (sxp ) splits as an OX -module homomorphism, where s is a defining section for D. This map induces the R-linear map R −→ F∗ R with 1 7−→ F∗ s, which also splits. Since s belongs to m(1−p)a(R) by the definition of D, the pair (R, m−a(R) ) is sharply F -pure. Thus, fpt(m) > −a(R).  Motivated by Conjecture 1.1, we propose the following conjecture. Conjecture 3.7. Let (R, m) be an F -finite F -pure normal local ring of characteristic p > 0. Then R is quasi-Gorenstein if and only if fpt(m) = c(m). Remark 3.8. Conjecture 3.7 can fail if R is not normal. Indeed, [11, Example 5.3] and Proposition 3.6 give a counterexample. Conjecture 3.7 implies an extension of Conjecture 1.1. Proposition 3.9. Let R be an F -pure normal standard graded ring, with R0 an F -finite field of characteristic p > 0. Let m denote the homogeneous maximal ideal of R. Suppose that Conjecture 3.7 holds for the localization Rm of R at m. Then R is quasi-Gorenstein if and only if fpt(m) = −a(R). 10 A. K. SINGH, S. TAKAGI and M. VARBARO Proof. The “only if” part immediately follows from Lemma 3.3 (3) and Proposition 3.6. We will show the “if” part. Suppose that fpt(m) = −a(R). Then by Remark 3.2, Lemma 3.3 (3) and Proposition 3.6, −a(R) = fpt(m) 6 fpt(mRm ) 6 c(mRm ) = c(m) = −a(R), which implies that fpt(mRm ) = c(mRm ). It then follows from Conjecture 3.7 that Rm is quasi-Gorenstein, which is equivalent to saying that R is quasi-Gorenstein.  Theorem 3.10. Let (R, m) be an F -finite normal local ring of characteristic p > 0 and ∆ be an effective Q-divisor on X := Spec R such that (X, ∆) is F -pure and KX + ∆ is Q-Cartier of index r. If R is not quasi-Gorenstein, then 1 fpt(∆; m) + 6 c(m). r Proof. Let d be the dimension of R. For every fpt(∆; m) > ε > 0 (when fpt(∆; m) = 0, put ε = 0), by the definition of fpt(∆; m) and Lemma 2.4, there exist q0 = pe0 and c in m⌊(fpt(∆;m)−ε)(q0 −1)⌋ such that e0 cFX,∆ : Hmd (ωX ) −→ Hmd (OX (⌊q0 KX + (q0 − 1)∆⌋)) is injective. We consider the following commutative diagram: / H d (ωX ) m ωX × Hmd (R) e 0 cFX,∆   / H d (OX (⌊q0 KX + (q0 − 1)∆⌋)), m OX (⌊q0 KX + (q0 − 1)∆⌋) × Hmd (R) where the left vertical map sends (x, z) to (cxq0 , FHe0d (R) (z)). m For each 1/r > ′ ε′ > 0, we will show that ′ F ♯mfpt(∆;m)+1/r−ε−ε assertion. Let ξ ∈ 0H d (R) m F ♯mfpt(∆;m)+1/r−ε−ε 0H d m (R) = 0, which implies the , that is, there exists q1 ∈ N such that ′ m⌈(fpt(∆;m)+1/r−ε−ε )(q−1)⌉ FHe d (R) (ξ) = 0 m for all q = pe > q1 . By the definition of weak F -purity, we may assume that q0 is sufficiently large so that q0 > q1 and ε′ (q0 −1) > 2. Since R is not quasi-Gorenstein, r > 2 or ∆ is strictly r = O (K )r is contained in the fractional effective. In either case, the fractional ideal ωX X X ideal mOX (r(KX + ∆)). Therefore, for all x ∈ ωX , one has q0 cxq0 ∈ m⌊(fpt(∆;m)−ε)(q0 −1)⌋ ωX ⊆ m⌊(fpt(∆;m)−ε)(q0 −1)⌋+⌊(q0 −1)/r⌋ OX (⌊q0 KX + (q0 − 1)∆⌋) ′ ⊆ m⌈(fpt(∆;m)+1/r−ε−ε )(q0 −1)⌉ OX (⌊q0 KX + (q0 − 1)∆⌋) by the choice of q0 . Since q0 > q1 , cxq0 FHe0d (R) (ξ) ∈ m⌈(fpt(∆;m)+1/r−ε−ε )(q0 −1)⌉ OX (⌊q0 KX + (q0 − 1)∆⌋)FHe0d (R) (ξ) ′ m m = 0 in Hmd (OX (⌊q0 KX + (q0 − 1)∆⌋)), e0 and it then follows from the commutativity of the above diagram that cFX,∆ (xξ) = 0. The e0 injectivity of the map cFX,∆ implies that xξ = 0 for all x ∈ ωX . This forces ξ to be zero, fpt(∆;m)+1/r−ε−ε′ F ♯m because ωX × Hmd (R) −→ Hmd (ωX ) is the duality pairing. Thus, 0H d (R) m = 0.  A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 11 We give an example of a standard graded Cohen-Macaulay ring R that is F -pure, with a(R) = −1 and fpt(m) = 0; this is based on [34]. The ring R is Q-Gorenstein, with index 2. Example 3.11. Let k be a field of characteristic p ≡ 1 mod 4, and set S = k[w, x, y, z]/(w4 + x4 + y 4 + z 4 ) . By the characteristic assumption, the ring S is F -pure. Set R to be the k-subalgebra generated by the monomials w4 , w3 x, w2 x2 , wx3 , x4 , y 4 , y 3 z, y 2 z 2 , yz 3 , z 4 . Then R is a direct summand of S as an R-module: one way to see this is to use the Z/4×Z/4grading on S under which deg w = (1, 0) = deg x, and deg y = (0, 1) = deg z, in which case R is the subring of S generated by elements of degree (0, 0). It follows that R is F -pure, normal, as well as Cohen-Macaulay. The ring R has a standard grading under which each of the monomials displayed is assigned degree one. Computing the socle modulo the system of parameters x4 , y 4 , z 4 , it follows that a(R) = −1. By Proposition 3.6, we have c(m) = 1. The fractional ideal 1 ωR = 2 2 (w3 x, w2 x2 , wx3 )(y 3 z, y 2 z 2 , yz 3 ) w x is, up to isomorphism, the graded canonical module of R; its second symbolic power is y2z2 R, w 2 x2 so the ring R is Q-Gorenstein. Using Theorem 4.1, one checks that that νe (m) = 0 for each e > 1. It follows that fpt(m) = 0. (2) ωR = Corollary 3.12. Let (R, m) be an F -finite F -pure normal local ring of characteristic p > 0. (1) Suppose that there exists an effective Q-divisor ∆ on X = Spec R such that KX + ∆ is Q-Cartier, (X, ∆) is F -pure and fpt(∆; m) = fpt(m). Then Conjecture 3.7 holds for this R. (2) If c(m) = 0, then R is quasi-Gorenstein. Proof. (1) immediately follows from Theorem 3.10. We will show (2). Since R is F -pure, then by [31, Theorem 4.3 (ii)], there exists an effective Q-divisor ∆ on X such that (R, ∆) is sharply F -pure with KX + ∆ Q-Cartier. Then 0 6 fpt(∆; m) 6 fpt(m) 6 c(m) = 0, and the assertion follows from (1).  When is the assumption of Corollary 3.12 (1) satisfied? If the pair (R, mfpt(m) ) is sharply F -pure, then by a similar argument to the proof of [31, Theorem 4.3 (ii)], there exists an effective Q-divisor ∆ on X such that ((R, ∆); mfpt(m) ) is sharply F -pure with KX + ∆ QCartier. Then fpt(∆; m) = fpt(m), that is, the assumption of Corollary 3.12 (1) is satisfied. Question 3.13 (cf. [20, Question 3.6]). Let (R, m) be an F -finite F -pure normal local ring of characteristic p > 0. When is the pair (R, mfpt(m) ) sharply or weakly F -pure? We will show in Proposition 4.13 that if (R, m) is an F -pure Q-Gorenstein normal standard graded ring over an F -finite field of characteristic p > 0 with Gorenstein index not divisible by p, then (R, mfpt(m) ) is sharply F -pure. We now prove the main result of this section: 12 A. K. SINGH, S. TAKAGI and M. VARBARO Theorem 3.14. Let (R, m) be an F -finite F -pure normal local ring of characteristic p > 0. L Suppose that the anti-canonical cover n>0 OX (−nKX ) of X := Spec R is Noetherian. Then fpt(m) = c(m) if and only if R is quasi-Gorenstein. L Proof. Since n>0 OX (−nKX ) is Noetherian, one can find an integer r > 1 satisfying the following: for every q = pe , if we write q − 1 = rne + je with ne > 0 and r − 1 > je > 0, then OX ((1 − q)KX ) = OX (−rKX )ne OX (−je KX ). Suppose that R is not quasi-Gorenstein, and we will show that fpt(m) + 1r 6 c(m). Let ϕ1 , . . . , ϕl be a system of generators for OX (−rKX ). For every fpt(m) > ε > 0, there exist a sufficiently large q = pe and c ∈ m⌊(fpt(m)−ε)(q−1)⌋ such that the R-linear map R −→ F∗e R sending 1 to F∗e c splits (when fpt(m) = 0, put ε = 0 and c = 1). That is, there exists an R-linear map ϕ : F∗e R −→ R sending F∗e c to 1. It follows from Grothendieck duality that there exists an isomorphism Φ : HomR (F∗e R, R) ∼ = F∗e OX ((1 − q)KX ) = F∗e (OX (−rKX )ne OX (−je KX )) . P ml 1 We write Φ(ϕ) = m F∗e (ϕm 1 · · · ϕl ψm ) with ψm ∈ OX (−je KX ), where m runs through all elements of {(m1 , . . . , ml ) ∈ Zl>0 | m1 + · · · + ml = ne }. Then ! X m e l 1 F∗e (ϕm 1 = ϕ(F∗e c) = Φ−1 1 · · · ϕl ψm ) (F∗ c) = X m Φ m −1  e ml 1 F∗e (ϕm 1 · · · ϕl ψm ) (F∗ c). Pl Therefore, there exists m = (m1 , . . . , ml ) ∈ Zl>0 with i=1 mi = ne such that ml e c) is a unit. Replacing c by a unit multiple, we may assume 1 ψ · · · ϕ Φ−1 (F∗e (ϕm ))(F m ∗ 1 l ml 1 that Φ(ϕ) = F∗e (ϕm 1 · · · ϕl ψm ). Since each ϕi determines an effective divisor Di which is linearly equivalent to −rKX , the ml e 1 section F∗e (ϕm 1 · · · ϕl ψm ) lies in F∗ OX ((1 − q)KX − m1 D1 − · · · − ml Dl ) and we have the following commutative diagram: F∗e OX ((1 − q)KX − m1 D1 − · · · − ml Dl ) O / F e OX ((1 − q)KX ) ∗ O Φ HomR (F∗e OX (m1 D1 + · · · + ml Dl ), R) / HomR (F e R, R), ∗ where the vertical maps are isomorphisms. Therefore, ϕ induces an R-linear map F∗e OX (m1 D1 + · · · + ml Dl ) −→ R sending F∗e c to 1. Then its Matlis dual cF e : Hmd (ωR ) −→ Hmd (OX (qKX + m1 D1 + · · · + ml Dl )) is injective. On the other hand, since R is not quasi-Gorenstein and rKX + Di ∼ 0, the r = O (K )r is contained in mO (rK + D ) for each i = 1, . . . , l. Hence, fractional ideal ωX X X X X i q ωX is contained in m⌊(q−1)/r⌋ OX (qKX +m1 D1 +· · ·+ml Dl ). It then follows from an analogous  argument to the proof of Theorem 3.10 that fpt(m) + 1r 6 c(m). L Remark 3.15. In the setting of Theorem 3.14, it is well-known that n>0 OX (−nKX ) is Noetherian if R is Q-Gorenstein, RL is a normal semigroup ring or R is a determinantal ring. We briefly explain the reason why n>0 OX (−nKX ) is Noetherian in the latter case. A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 13 Let R be the determinantal ring k[T ]/I, where T is an m × n matrix of indeterminates with m 6 n, and I is the ideal generated by the size t minors of T where 1 6 t 6 m. Then the anti-canonical class of R is the class of the (n − m)-th symbolic power of the prime ideal p generated by the size t − 1 minors of the first t − 1 rows of T by [7, Theorem 8.8]. Moreover, the symbolic powers of p coincide with its ordinary powers by [7, Corollary 7.10], so the anti-canonical cover is the Rees algebra of pn−m . In particular, it is Noetherian. L Another case where n>0 OX (−nKX ) is Noetherian is the following: Corollary 3.16. Let X be a three-dimensional strongly F -regular variety over an algebraically closed field of characteristic p > 5 and x be a closed point of X. Then fpt(mx ) = c(mx ) if and only if X is Gorenstein at x. Proof. We may assume that X is affine. By [31, Theorem 4.3] and [17, Theorem 3.3], there exists an effective Q-divisor ∆ on X such that KX + ∆ is Q-Cartier and (X, ∆) is strongly F regular and in particular is klt. Since the minimal model program holds for three-dimensional L klt pairs in characteristic p > 5, the anti-canonical cover n>0 OX (−nKX ) is Noetherian  (see for example [9, Theorem 2.28]). Thus, the assertion follows from Theorem 3.14. A combination of Proposition 3.9, Theorem 3.14, Remark 3.15 and Corollary 3.16 gives an extension of [20, Theorem 1.2 (2)]: Corollary 3.17. Let R be an F -pure normal standard graded ring, with R0 an F -finite field of characteristic p >L 0. Let m be the homogeneous maximal ideal of R. Suppose that the anti-canonical cover n>0 OX (−nKX ) of X := Spec R is Noetherian. This assumption is satisfied, for example, in each of the following cases: (1) R is Q-Gorenstein, (2) R is a semigroup ring, (3) R is a determinantal ring, (4) R is a strongly F -regular ring of dimension at most three, (5) R is a four-dimensional strongly F -regular ring and p > 5. Then fpt(m) = −a(R) if and only if R is quasi-Gorenstein. L Proof. If then the assertion follows from Proposition 3.9 n>0 OX (−nKX ) is Noetherian, L and Theorem 3.14. By Remark 3.15, O n>0 X (−nKX ) is Noetherian in the case of (1), (2) L and (3). We will explain why n>0 OX (−nKX ) is Noetherian in the case of (4) and (5). Since two-dimensional strongly F -regular rings are Q-Gorenstein, we may assume that dim X > 3. Also, since strong F -regularity is preserved under flat base change by [1, Theorem 3.6], we may assume that R0L is an algebraically closed field. Let D be a very ample divisor on Y := Proj R so that R = m>0 H 0 (Y, OY (mD)). It follows from [31, Theorem 1.1] that Y is a normal projective variety of Fano type of dimension at most three. It is known that the minimal model program holds for klt surfaces and also for three-dimensional klt pairs in characteristic p > 5 (see [15, 2, 4]). Thus, applying essentially the same argument as the proof of [3, Corollary 1.1.9], we can see that M MM OX (−nKX ) ∼ H 0 (Y, OY (mD − nKY )) = n>0 is Noetherian. m∈Z n>0  We also give an answer to [20, Question 6.7]. Before stating the result, we fix some notation. Let M = Zd , N = HomZ (M, Z), and denote the duality pairing between MR := M ⊗Z R 14 A. K. SINGH, S. TAKAGI and M. VARBARO and NR := N ⊗Z R by h−, −i : MR × NR −→ R. Let σ ⊂ NR be a strongly convex rational polyhedral cone and denote its dual cone by σ ∨ . Let R = k[σ ∨ ∩ M ] be the affine semigroup ring over a field k defined by σ and m be the unique monomial maximal ideal of R. The Newton Polyhedron P (m) ⊆ MR of m is defined as the convex hull of the set of exponents m ∈ M of monomials xm ∈ m. We define the function λm by λm : σ ∨ −→ R u 7−→ sup{λ ∈ R>0 | u ∈ λP (m)}, where we set λP (m) = σ ∨ if λ = 0, and denote aσ (R) := − min{λm (u) | u ∈ Int(σ ∨ ) ∩ M }. Note that aσ (R) coincides with the a-invariant a(R) if R is standard graded. Corollary 3.18. We use the above notation. Let R = k[σ ∨ ∩ M ] be a (not necessarily standard graded) affine semigroup ring over an F -finite field k of characteristic p > 0 defined by σ. (1) Then c(m) = −aσ (R). (2) fpt(m) = −aσ (R) if and only if R is Gorenstein. Proof. Since (2) follows from (1) and Theorem 3.14, we will show only (1). Let v1 , . . . , vs be the primitive generators for σ, that is, the first lattice points on the edges of σ. Note that the graded canonical module ωR consists of the monomials xm such that hm, vi i > 1 for all i = 1, . . . , s. Hence, its k-dual Hmd (R) is written as M Hmd (R) = kxm , m∈S where S = {m ∈ M | hm, vi i 6 −1 for all i = 1, . . . , s}. It follows from the fact that 1 is an mt -test element by [18, Theorem 6.4] (see [18, Definition 6.3] for the definition of mt test elements) that the pair (R, mt ) is F -rational if and only if for each m ∈ S, one has e e m⌈tp ⌉ xp m 6= 0 in Hmd (R), or equivalently, (pe m + ⌈tpe ⌉P (m)) ∩ S 6= ∅, for infinitely many e. We can rephrase this condition as saying that −m ∈ Int(tP (m)), using an argument similar to the proof of [5, Theorem 3]. By Lemma 3.3 (2), c(m) = sup{t ∈ R>0 | (R, mt ) is F -rational} = sup{t ∈ R>0 | −m ∈ Int(tP (m)) for all m ∈ S} = min λm (u). u∈−S Since −S = Int(σ ∨ ) ∩ M , one has the equality c(m) = −aσ (R).  4. Positive characteristic case II In this section we give a different interpretation of the function νe (m), where m is the homogeneous maximal ideal of an F -pure normal standard graded domain R over an F -finite field (Theorem 4.1). Combining it with the Fedder-type criteria (Proposition 2.5), we give explicit computations of fpt(m) in many situations (e.g. Propositions 4.3 and 4.5), eventually yielding Corollary 3.17 as a consequence (see Corollary 4.12). A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 15 Theorem 4.1. Let S be an n-dimensional standard graded polynomial ring over an F -finite field of characteristic p > 0. Let I be a homogeneous ideal such that R := S/I is an F -pure normal domain. Let ωR denote the graded canonical module of R. Then, for each q = pe , one has a graded isomorphism I [q] :S I ∼ (1−q) . = (ωR (n)) [q] I In particular, if m is the homogeneous maximal ideal of R, then −νe (m) equals the degree of (1−q) (See Proposition 2.5 for the definition of νe (m)). a minimal generator of ωR Proof. After taking a flat base change, we may assume that S = k[x1 , . . . , xn ], where k is a perfect field. It then follows that S is a free S q -module with basis xi11 · · · xinn where 0 6 ij 6 q − 1 for each j. Consider the homomorphism ϕ ∈ HomS q (S, S q ) that maps the basis element (x1 · · · xn )q−1 to 1, and every other basis element to 0. It is readily seen that ϕ generates HomS q (S, S q ) as an S-module. Let J be the ideal of S q consisting of q-th powers of elements of I; note that JS = I [q] . Then [q] ∼ I :S I ϕ, HomS q (S/I, S q /J) = I [q] see [12, page 465]. Next, note that one has graded isomorphisms HomS q (S/I, S q /J) ∼ = HomRq (R, Rq ) ∼ = HomRq (R, HomRq (ωRq , ωRq )) ∼ = HomRq (R ⊗Rq ωRq , ωRq ) (q) ∼ = HomRq (ωR , ωRq ) (q) ∼ = HomRq (ωR ⊗R R, ωRq ) (q) ∼ = HomR (ωR , HomRq (R, ωRq )) (q) ∼ = HomR (ωR , ωR ) (1−q) ∼ = ωR . Since the homomorphism ϕ has degree n − nq, the desired isomorphism follows. (1−q) is generated in degrees −d1 < · · · < −dr , then (I [q] :S I)/I [q] is generated Suppose ωR in degrees n(q − 1) − d1 < · · · < n(q − 1) − dr . Hence the least degree of a homogeneous element of I [q] :S I that is not in m[q] belongs to the set {n(q − 1) − d1 , . . . , n(q − 1) − dr }, and I [q] :S I ⊆ mn(q−1)−d1 . Since the definition of νe (m) translates as νe (m) = max{r ∈ N | (I [q] :S I) 6⊆ m[q] + mn(q−1)+1−r }, it follows that νe (m) ∈ {d1 , . . . , dr }.  As an immediate consequence we get: Corollary 4.2. If R is an F -pure quasi-Gorenstein standard graded normal domain, over an F -finite field, with homogeneous maximal ideal m, then fpt(m) = −a(R). In particular, by Proposition 3.5, in this case a(R) > ai (R) for all i = 0, . . . , dim R. 16 A. K. SINGH, S. TAKAGI and M. VARBARO Proposition 4.3. Let R be the determinantal ring k[T ]/I, where k is an F -finite field, the matrix of indeterminates T has size m × n with m 6 n, and I is the ideal generated by the size t minors of T where 1 6 t 6 m. Let m be the homogeneous maximal ideal of R. Then fpt(m) = m(t − 1). Remark 4.4. In the notation of the proposition, the ring R has a-invariant −n(t−1). It follows that fpt(m) = −a(R) precisely when m = n or t = 1, i.e., if and only if R is Gorenstein. In the case t = 2, the F -pure threshold has been calculated previously, see [8, Corollary 1] or [20, Example 6.2]. Since I is a homogeneous ideal of k[T ], which is F -pure, one can also ask for fpt(I). This threshold has been computed in [28] (see [19] for various generalizations):   (m − l)(n − l) fpt(I) = min l = 0, . . . , t − 1 . t−l Proof of Proposition 4.3. The graded canonical module of R is computed in [6, Corollary 1.6], namely, it equals qn−m (m − mt), where q is the prime ideal generated by the size t − 1 minors of the first t − 1 columns of the matrix T . The divisor class group of R is described by (1−q) is generated by elements of degree [7, Corollary 7.10], from which it follows that ωR −m(q − 1)(t − 1). Theorem 4.1 now gives νe (m) = m(q − 1)(t − 1), from which the result follows.  Proposition 4.5. Let R be an F -pure Q-Gorenstein standard graded normal domain, over an F -finite field, with homogeneous maximal ideal m. If c is the order of ωR in the divisor class group and ω (c) is generated in degree D, then: fpt(m) = D/c. In particular, fpt(m) = −a(R) if and only if R is quasi-Gorenstein. Proof. For q = pe let us write 1 − q = a(q)c + b(q), with 0 6 b(q) < c. By the assumptions we have: a(q)  (b(q)) (1−q) = ω (c) ωR . ωR (1−q) In particular, ωR is generated in degrees d satisfying: a(q)D + A 6 d 6 a(q)D + B, (b(q)) where the minimal generators of ωR have degrees between A and B. Therefore −a(q)D − B 6 νe (m) 6 −a(q)D − A, and fpt(m) = limq−→∞ νe (m)/q = D/c. (c) For the last part of the statement, simply notice that, if ωR is principal but ωR is not, (c) (c) c.  then the generator of ωR must have degree less than −a(R)c, since ωR ⊆ ωR Remark 4.6. In the above notation, if c = p notice that a(q) = −q/p and b(q) = 1. Furthermore A can be chosen to be the negative of the a-invariant of R, so: νe (m) 6 (q/p)D + a(R) = (q − 1)D/p + D/p + a(R) = (q − 1)fpt(m) + fpt(m) + a(R). Given a finitely generated graded R-module M , we denote by δ(M ) the least integer d such that Md 6= 0. In the case in which R is a normal domain, the canonical module ωR is isomorphic (as a graded module) to a divisorial ideal of R. A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 17 Lemma 4.7. If R is a normal standard graded domain, and a a graded divisorial ideal, then: (1) δ(a(−1) ) > −δ(a). (2) δ(a(−1) ) = −δ(a) if and only if a is principal. Proof. Let a = (a1 , . . . , ar ), where the ai are homogeneous elements of the quotient field of R of degree di ∈ Z, where δ(a) = d1 6 d2 6 . . . 6 dr . If b ∈ a(−1) is a homogeneous nonzero element of degree l, then l + d1 > 0 since a1 b is a homogeneous nonzero element of R. This shows (1). Concerning point (2), if b is a homogeneous nonzero element of a(−1) of degree −d1 , then ba1 = u is a unit of R. Because bai = fi ∈ R for all i = 1, . . . , r, we have ai = u−1 fi a1 for all i = 1, . . . , r, so that a1 generates a as an R-module.  Proposition 4.8. Let R be an F -pure standard graded normal domain, over an F -finite field, with homogeneous maximal ideal m. Then: νe (m) 6 a(R)(1 − q) ∀ q = pe . In particular fpt(m) 6 −a(R). Further, if R is not quasi-Gorenstein, then: ∀ q = pe .     (q−1) q−1 = δ(ωR )(q−1) = 6 δ ωR Proof. For the first part of the statement, notice that δ ωR   (1−q) > a(R)(q − 1) by Lemma 4.7, and νe (m) 6 a(R)(1 − q) by −a(R)(q − 1), so δ ωR Theorem 4.1.   (q−1) 6 For the second part, assume that νe (m) = a(R)(1 − q) for some q = pe . Since δ ωR νe (m) < a(R)(1 − q) (q−1) a(R)(1 − q), by putting together Theorem 4.1 and Lemma 4.7, ωR generated Therefore mustbe principal and q−1 = a(R)(1 − q). ωR (q−1) q−1 in degree −a(R)(q − 1). Notice that ωR ⊇ ωR and δ (q−1) q−1 = ωR , so that ωR must the only possibility is that ωR be principal itself.  Proposition 4.9. Let R be an F -pure standard graded normal domain, over an F -finite L (−k) of R is field, with homogeneous maximal ideal m. If the anti-canonical cover k>0 ωR Noetherian, then fpt(m) = −a(R) if and only if R is quasi-Gorenstein. Proof. If the anti-canonical cover of R is Noetherian, then there exists a positive integer c such that, if we write 1 − q = −a(q)c − b(q) with a(q) positive and 0 6 b(q) < c: a(q)  (−b(q)) (1−q) . ωR = ω (−c) ωR Let us say that ω (−c) is generated in degrees −d1 < · · · < −dr . Furthermore, let −e1 < · · · < −es be the degrees of the minimal generators of R, ω (−1) , . . . , ω (−c+1) . We have that νe (m) ∈ {a(q)di + ej | i = 1, . . . , r and j = 1, . . . , s} ∀ q = pe . By choosing i ∈ {1, . . . , r} such that νe (m) = a(q)di + ej (for some j) for infinitely many q, then fpt(m) = lim νe (m)/q = di /c. q−→∞ For the second part of the statement, simply note that if R is not quasi-Gorenstein, with the above notation we have −di > −d1 > a(R)c by (the same argument of) Proposition 4.8.  Remark 4.10. The above argument shows also that fpt(m) is a rational number whenever the assumptions of the corollary are satisfied; this was already known by [9]. 18 A. K. SINGH, S. TAKAGI and M. VARBARO Proposition 4.11. Let R be an F -pure standard graded normal domain, over an F -finite field, with homogeneous maximal ideal m. If there exists a positive integer c such that  δ ω (c) < −a(R)c, then fpt(m) < −a(R).  Proof. Let δ ω (c) = D. With the same notation of the proof above q − 1 = a(q)c + b(q), so:   (b(q)) (q−1) . δ(ωR ) 6 a(q)D + δ ωR Then, using Theorem 4.1 together with Lemma 4.7, for such q: νe (m) 6 a(q)D. Thus, fpt(m) = limq−→∞ νe (m)/q 6 D/c < −a(R).  The following provides strong evidence for the conjecture of Hirose-Watanabe-Yoshida 1.1 and, more generally, for the standard graded case of Conjecture 3.7. Corollary 4.12. Let R be an F -pure standard graded normal domain, over an F -finite field, with homogeneous maximal ideal m. Suppose that one of the following is satisfied: L (−k) (1) The anti-canonical cover k>0 ωR of R is noetherian. (c) (2) For some positive integer c, there is a nonzero element of ωR of degree < −a(R)c. Then fpt(m) = −a(R) if and only if R is quasi-Gorenstein. The following gives an extension of [20, Proposition 3.4]. Proposition 4.13. Let R be an F -pure standard graded normal domain, over an F -finite field, with homogeneous maximal ideal m. Suppose that the c-th Veronese subring of the anti-canonical cover of R is standard graded and c is not a multiple of p. Then νe (m) = (pe − 1)fpt(m) for infinitely many positive integers e. In particular, (R, mfpt(m) ) is sharply F -pure. Proof. Since p does not divide c, there is an infinite subset A ⊆ {pe | e ∈ N} such that q − 1 = a(q)c for all q ∈ A, with a(q) ∈ N. For such q a(q)  (1−q) = ω (−c) . ωR So if ω (−c) is generated in degrees −d1 < · · · < −dr , then νe (m) ∈ {a(q)di | i = 1, . . . , r} ∀ q ∈ A. So there exists i such that fpt(m) = di /c, and for all but finitely many q ∈ A νe (m) = (q − 1)fpt(m).  5. Characteristic zero case Throughout this section, let X be a normal variety over an algebraically closed field of characteristic zero and a be a nonzero coherent ideal sheaf on X. We prove a characteristic zero analogue of Conjecture 1.1. First, we define a variant of multiplier submodules: A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 19 Definition 5.1. Let π : Y −→ X be a log resolution of (X, a), that is, π is a proper birational morphism from a smooth variety Y such that aOY = OY (−F ) is invertible and Exc(π) ∪ Supp(F ) is a simple normal crossing divisor. Let E be the reduced divisor supported on Exc(π). For a real number t > 0, the multiplier submodule J (ωX , at ) is defined by J (ωX , at ) := π∗ ωY (⌈−tF ⌉) ⊆ ωX . This submodule of ωX is independent of the choice of π, see, for example, the proof of [32, Proposition 3.4]. When a = OX or t = 0, we simply denote J (ωX , at ) by J (ωX ). As a variant of J (ωX , at ), we define the submodule I(ωX , at ) of ωX by  π∗ ωY (⌈εE − (t − ε)F ⌉) if t > 0 I(ωX , at ) := π∗ ωY (E) if t = 0 for sufficiently small ε > 0. It is easy to see that I(ωX , at ) is independent of the choice of ε if ε > 0 is sufficiently small. When a = OX or t = 0, we simply denote I(ωX , at ) by I(ωX ). Lemma 5.2. I(ωX , at ) is independent of the choice of the resolution. Proof. Although it immediately follows from [14, Lemma 13.3 and Corollary 13.7], we give a more direct proof here. We consider the case where t > 0; the case t = 0 follows from a similar argument. Let f : Y −→ X be a log resolution of (X, a) such that aOX = OX (−F ) is invertible, and let EY be the reduced divisor supported on Exc(f ). Let g : Z −→ Y be a log resolution of (Y, EY + F ), and let EZ be the reduced divisor supported on Exc(g). Then it is enough to show that ωY (⌈εEY − (t − ε)F ⌉) = g∗ ωZ (⌈ε′ (g∗−1 EY + EZ ) − (t − ε′ )g∗ F ⌉) for sufficiently small real numbers ε,Sε′ > 0, since two log resolutions of (X, a) can be dominated by a third log resolution. Let i Ei be the irreducible decomposition of Supp(EY + F ). For sufficiently small ε > 0, we can write X ⌈KY + εEY − (t − ε)F ⌉ = KY − tF + ai Ei , i P where 1 > a > 0 for all i. Since i i Ei is a simple normal crossing divisor on Y , the pair P (Y, i ai Ei ) is log canonical. By the definition of log canonical pairs, we have G :=⌈KZ + ε′ (g∗−1 EY + EZ ) − (t − ε′ )g ∗ F ⌉ − g∗ ⌈KY + εEY − (t − ε)F ⌉ ' & X  ′ −1 ∗ ∗ ai Ei > 0. = KZ/Y + ε g∗ EY + EZ + g F − g i Note that G is a g-exceptional divisor for sufficiently small ε′ > 0. Therefore, g∗ ωZ (⌈ε′ (g∗−1 EY + EZ ) − (t − ε′ )g∗ F ⌉) =g∗ (g∗ (ωY (⌈εEY − (t − ε)F ⌉)) ⊗ OZ (G)) =ωY (⌈εEY − (t − ε)F ⌉) ⊗ g∗ OZ (G) =ωY (⌈εEY − (t − ε)F ⌉).  Remark 5.3. (1) X has only rational singularities if and only if X is Cohen-Macaulay and J (ωX ) = ωX , see [25, Theorem 5.10]. (2) If X has only Du Bois singularities, then I(ωX ) = ωX , see [26]. In case X is CohenMacaulay, the converse holds as well. The reader is referred to [29] for the definition and a simple characterization of Du Bois singularities. 20 A. K. SINGH, S. TAKAGI and M. VARBARO Using I(ωX , at ), we define a new invariant of singularities in characteristic zero: Definition 5.4. Suppose that X has only Du Bois singularities. Then the threshold d(a) is defined by d(a) := sup{t > 0 | I(ωX , at ) = ωX }. If x is a closed point of X, then the threshold dx (a) is defined by dx (a) := sup{t > 0 | I(ωX , at )x = ωX,x }. Remark 5.5. Let R be an N-graded ring with R0 an algebraically closed field k of characteristic zero, and let m be the homogeneous maximal ideal of R. Let X = Spec R and x ∈ X be the closed point corresponding to m. By considering a k∗ -equivariant log resolution of (X, m), we see that I(ωX , mt ) is a graded submodule of the graded canonical module ωR . This implies that d(m) = dx (m). In [10] de Fernex-Hacon extended the notion of log canonical thresholds to the non-QGorenstein setting; we recall their definition: Definition 5.6 ([10, Proposition 7.2]). Suppose that t > 0 is a real number. (1) The pair (X, at ) is said to be klt (resp. log canonical) in the sense of de Fernex-Hacon if there exists an effective Q-divisor ∆ on X such that KX + ∆ is Q-Cartier and ((X, ∆); at ) is klt (resp. log canonical) in the classical sense. That is, if π : Y −→ X is a log resolution of (X, ∆, a) such that aOY = OY (−F ) is invertible and if we write X KY − π ∗ (KX + ∆) − tF = ai Ei , i where the Ei are prime divisors on Y and the ai are real numbers, then ai > −1 (resp. ai > −1) for all i. The log canonical threshold lct(a) of a is defined by lct(a) := sup{t > 0 | (X, at ) is log canonical in the sense of de Fernex-Hacon}. (2) Let x be a closed point of X. Then (X, at ) is klt (resp. log canonical) at x in the sense of de Fernex-Hacon if there exists a open neighborhood U of x such that (U, (a|U )t ) is klt (resp. log canonical) in the sense of de Fernex-Hacon. If, in addition, a = OX , then we say that (X, x) is a log terminal (resp. log canonical) singularity in the sense of de Fernex-Hacon. The log canonical threshold lctx (a) of a at x is defined by lctx (a) := sup{t > 0 | (X, at ) is log canonical at x in the sense of de Fernex-Hacon}. If ∆ is an effective Q-divisor on X such that KX + ∆ is Q-Cartier and (X, ∆) is log canonical at x (in the classical sense), then the log canonical threshold lctx (∆; a) is defined by lctx (∆; a) := sup{t > 0 | ((X, ∆); at ) is log canonical at x (in the classical sense)}. We prove some basic properties of dx (a). Lemma 5.7. Let (X, x) be a d-dimensional normal singularity. (1) If (X, x) is a rational singularity, then dx (a) = sup{t > 0 | J (ωX , at )x = ωX,x }. (2) Suppose that (X, x) is a log canonical singularity in the sense of de Fernex-Hacon. Then lctx (a) 6 dx (a). In addition, if X is quasi-Gorenstein at x, then lctx (a) = dx (a). (3) Suppose that (X, x) is a Cohen-Macaulay Du Bois singularity. Then dx (mx ) 6 d. If d+1−⌈dx (mx )⌉ J ⊆ OX,x is a minimal reduction of the maximal ideal mx , then mx ⊆ J. A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 21 (4) Suppose that X is Cohen-Macaulay at x. If dx (mx ) > d − 1, then X is nonsingular at x and in particular dx (mx ) = d. Proof. (1) Shrinking X if necessary, we may assume that X has only rational singularities. First we will check that dx (a) > 0. Let π : Y −→ X be a log resolution of (X, a) such that aOY = OY (−F ) is invertible and let E be the reduced divisor supported on Exc(π). For sufficiently small t > ε > 0, KY + E > ⌈KY + εE − (t − ε)F ⌉ > KY . Taking the pushforward π∗ , we obtain inclusions ωX ⊃ I(ωX , at ) ⊃ J (ωX ) = ωX by Remark 5.3 (1). That is, dx (a) > t > 0. Now we will show the assertion. Since J (ωX , at ) ⊆ I(ωX , at ), the inequality dx (a) > sup{t > 0 | J (ωX , at )x = ωX,x } is obvious. We will prove the reverse inequality. It is enough to show that if I(ωX , at )x = ωX,x with t > 0, then J (ωX , at−ε )x = ωX,x for all t > ε > 0. Fix a real number t > ε > 0. Shrinking X again if necessary, we may assume that X is affine and that I(ωX , at ) = ωX . This means that for sufficiently small (1/2)ε > ε′ > 0, ordEi (KY + divY (f ) + ε′ E − (t − ε′ )F ) > −1 for every prime divisor Ei on Y and for every f ∈ ωX . If Ei is an irreducible component of Supp F , then ordEi (KY + divY (f ) − (t − ε)F ) > ordEi (KY + divY (f ) + ε′ E − (t − ε′ )F ) > −1. On the other hand, since X has only rational singularities, KY + divY (f ) > 0 by Remark 5.3 (1). Therefore, if Ei is not a component of Supp F , then ordEi (KY + divY (f ) − (t − ε)F ) = ordEi (KY + divY (f )) > 0. Summing up above, we conclude that ⌈KY + divY (f ) − (t − ε)F ⌉ > 0 for every f ∈ ωX , that is, J (ωX , at−ε ) = ωX . (2) For the former assertion, it is enough to show that if (X, at ) is log canonical at x in the sense of de Fernex-Hacon, then I(ωX , at )x = ωX,x . Shrinking X if necessary, we may assume that X is affine and there exists an effective Q-divisor ∆ on X such that ((X, ∆); at ) is log canonical with KX + ∆ Q-Cartier of index r. Let π : Y −→ X be a log resolution of (X, ∆, a) such that aOY = OY (−F ) is invertible and let E be the reduced divisor supported on Exc(π). By the definition of log canonical pairs, ⌈KY − π ∗ (KX + ∆) + ε1 E − (t − ε2 )F ⌉ > 0 for every ε1 > 0 and t > ε2 > 0 (when t = 0, put ε2 = 0). Let f ∈ ωX . Since the fractional r is contained in O (r(K + ∆)), one has div (f ) + π ∗ (K + ∆) > 0. It follows from ideal ωX X X Y X these two inequalities that ⌈KY + ε1 E − (t − ε2 )F ⌉ + divY (f ) > 0, which implies that f ∈ I(ωX , at ). Now we will show the latter assertion. Shrinking X again if necessary, we may assume that ωX ∼ = OX . Then I(ωX , at ) can be identified with the maximal non-lc ideal J ′ (X, at ) under this isomorphism (see [14, Definition 7.4] for the definition of J ′ (X, at )). Since J ′ (X, at ) = OX if and only if (X, at ) is log canonical by the definition of J ′ (X, at ), one has the equality that lctx (a) = dx (a). 22 A. K. SINGH, S. TAKAGI and M. VARBARO (3) The proof is essentially the same as that of [33, Theorem 5.2.5]. Let f : Y −→ Spec OX,x e −→ Spec OX,x be the blow-up at mx with exceptional divisor Fx . Take a log resolution π : X P e of mx . Then there exists a morphism g : X −→ Y such that π = f ◦ g. Let E = si=1 Ei be the reduced divisor supported on Exc(π). We may assume that E1 , . . . , E r are all the P ′ components of E dominating an irreducible component of Fx , and put E := si=r+1 Ei . If t > d, then I(ωX , mtx )x = π∗ OXe (⌈KXe + εE − (t − ε)g ∗ Fx ⌉) ⊆ π∗ OXe (KXe + E ′ − dg ∗ Fx )  = f∗ g∗ OXe (KXe + E ′ ) ⊗ OY (−dFx ) ⊆ f∗ ωY (−dFx ) = f∗ mdx ωY for sufficiently small ε > 0. It follows from [21, Theorem 3.7] and [22, Lemma 5.1.6] that I(ωX , mtx )x :OX,x ωX,x ⊆ f∗ mdx ωY :OX,x ωX,x = core(m), where core(m) is the intersection of all reductions of m. In particular, I(ωX , mtx )x ( ωX,x , that is, dx (mx ) < t. Thus, dx (mx ) 6 d. d (m )−ε Since I(ωX , mxx x )x = ωX,x for every ε > 0 (we put ε = 0 when dx (mx ) = 0), by the same argument as above, mxd+1−⌈dx (mx )⌉ ωX,x = mxd+1−⌈dx (mx )⌉ I(ωX , mdxx (mx )−ε )x ⊆ f∗ mdx ωY for sufficiently small ε > 0. It then follows from [21, Theorem 3.7] and [22, Lemma 5.1.6] again that mxd+1−⌈dx (mx )⌉ ⊆ f∗ mdx ωY :OX,x ωX,x = core(m) ⊆ J. (4) Let J be a minimal reduction of mx . It then follows from (3) that mx = J, which means that mx is generated by at most d elements, that is, X is nonsingular at x. If X is nonsingular at x, then by (2), we see that dx (mx ) = lctx (mx ) = d.  We can compute the log canonical threshold of the maximal ideal of an affine determinantal variety using F -pure thresholds: Proposition 5.8. Let D := Spec k[T ]/I be the affine determinantal variety over an algebraically closed field k of characteristic zero, where T is an m × n matrix of indeterminates with m 6 n, and I is the ideal generated by the size t minors of T where 1 6 t 6 m. Let m be the homogeneous maximal ideal of k[T ]/I, corresponding to the origin 0 in D. Then lct(m) = m(t − 1). Proof. For each prime integer p, let Rp := Fp [T ]/Ip be the modulo p reduction of k[T ]/I, and mp the homogeneous maximal ideal of Rp . It then follows from [9, Theorem 6.4] and Proposition 4.3 that lct(m) = lim fpt(mp ) = m(t − 1).  p−→∞ Proposition 5.9. Let x be a closed point of X and ∆ be an effective Q-divisor on X such that (X, ∆) is log canonical at x with KX + ∆ being Q-Cartier of index r. If X is not quasi-Gorenstein at x, then 1 lctx (∆; mx ) + 6 dx (mx ). r In particular, if dx (mx ) = 0, then X is quasi-Gorenstein at x. A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 23 Proof. Shrinking X if necessary, we may assume that X is affine, OX (r(KX + ∆)) ∼ = OX and lct (∆;mx ) ((X, ∆); mx x ) is log canonical. Let π : Y −→ X be a log resolution of (X, ∆, mx ) such that mx OX = OX (−Fx ) is invertible, and let E be the reduced divisor supported on Exc(π). Putting t = lctx (∆; mx ), one has the inequality ⌈KY − π ∗ (KX + ∆) − (t − ε)Fx + εE⌉ > 0 for every ε > 0. On the other hand, since X is not quasi-Gorenstein at x, the fractional ideal r is contained in m O (r(K + ∆)). Hence, for each f ∈ ω , one has the inequality ωX x X X X rdivY (f ) + rπ ∗ (KX + ∆) − Fx > 0. It follows from these two inequalities that 0 6⌈KY − π ∗ (KX + ∆) − (t − ε)Fx + εE⌉     1 1 = KY + εE − t + − ε Fx − π ∗ (KX + ∆) + Fx r r     1 6KY + εE − t + − ε Fx + divY (f ) r lctx (∆;mx )+1/r for all ε > 0 and all f ∈ ωX . This means that I(ωX , mx lctx (∆; mx ) + 1/r. ) = ωX , that is, dx (mx ) >  The following theorem is the main result of this section; this is a characteristic zero analogue of Theorem 3.14. Theorem 5.10. Suppose that (X, x) is a log canonical singularity in the sense of de FernexL Hacon. Assume in addition that the anti-canonical cover n>0 OX (−nKX )x is Noetherian. Then lctx (mx ) = dx (mx ) if and only if (X, x) is quasi-Gorenstein. Proof. Since the “if” part immediately follows from Lemma 5.7 (2), we will show the “only if” part. Shrinking X if necessary, we may assume that X is log canonical in the sense of L de Fernex-Hacon and that O n>0 X (−nKX ) is Noetherian. Then one can find an integer r > 1 such that OX (−rmKX ) = OX (−rKX )m for every integer m > 1. Fix a real number lct(m )−ε ε with min{lct(mx ), 1/r} > ε > 0; when lct(mx ) = 0, put ε = 0. Since (X, mx x ) is log canonical in the sense of de Fernex-Hacon, there exists an integer m0 > 1 such that the m-th lct(m )−ε limiting log discrepancy am,F (X, mx x ) is nonnegative for every prime divisor F over X and for every positive multiple m of m0 by [10, Definition 7.1] (see loc. cit. for the definition of the m-th limiting log discrepancy of a pair). By the choice of r, one has ar,F (X, mxlct(mx )−ε ) = arm0 ,F (X, mxlct(mx )−ε ) > 0. It follows from an argument similar to the proof of [10, Proposition 7.2] that there exists an lct(m )−ε effective Q-divisor ∆ on X such that KX + ∆ is Q-Cartier of index r and ((X, ∆); mx x ) is log canonical. If X is not quasi-Gorenstein at x, then by Proposition 5.9, 1 1 6 lctx (∆; mx ) + 6 dx (mx ). r r This contradicts the assumption that lctx (mx ) = dx (mx ). lctx (mx ) < lctx (mx ) − ε +  Corollary 5.11. Suppose that (X, x) is a log terminal singularity in the sense of de FernexHacon. Then lctx (mx ) = dx (mx ) if and only if (X, x) is Gorenstein. 24 A. K. SINGH, S. TAKAGI and M. VARBARO Proof. Since (X, x) is log terminal,L using the minimal model program for klt pairs, one can show that the anti-canonical cover n>0 OX (−nKX )x is Noetherian (see [24, Theorem 92]).  Thus, the assertion follows from Theorem 5.10. Proposition 5.12. Let R be a normal standard graded ring, with R0 an algebraically closed field of characteristic zero, and let m denote the homogeneous maximal ideal of R. Suppose that Spec R has only Du Bois singularities. Then d(m) 6 −a(R). Proof. Put X = Spec R. Since X has only Du Bois singularities, a(R) 6 0 by [27, Theorem 4.4]. Suppose that I(ωX , mt ) = ωX with t > 0. Let ϕ : Y −→ X be the blow-up of X e −→ Y of (Y, E) at m and E = Proj R be its exceptional divisor. Take a log resolution ψ : X e such that e be the strict transform of E on X. e We fix a canonical divisor K e on X and let E X t ψ∗ KXe = KY . Since I(ωX , m ) = ωX , e − (t − ε)ψ ∗ E⌉) > 0 ordEe (⌈KXe + divXe (f ) + εE for all f ∈ ωX and all sufficiently small ε > 0. Taking the direct image by ψ, we see that ordE (⌈KY + divY (f ) + εE − (t − ε)E⌉) > 0, that is, ϕ∗ ωY (⌈ε − t⌉E) = ωX for sufficiently small ε > 0. On the other hand, it is easy to see by the definition of ϕ (see, for example, [22, Proposition 6.2.1]) that ϕ∗ ωY (⌈ε − t⌉E) = [ωX ]>⌊t−ε⌋+1 . Thus, t 6 −a(R), that is, d(m) 6 −a(R).  As a consequence, we can prove a characteristic zero analogue of Conjecture 1.1, which gives an affirmative answer to [11, Conjecture 6.9]. Corollary 5.13. Let R be a normal standard graded ring, with R0 an algebraically closed field of characteristic zero. Let m denote the homogeneous maximal ideal of R. Assume that X := Spec R has log canonical singularities in the sense of de Fernex-Hacon. (1) Then lct(m) 6 −a(R). L (2) Suppose in addition that the anti-canonical cover n>0 OX (−nKX ) is Noetherian (this assumption is satisfied, for example, if X has log terminal singularities in the sense of de Fernex-Hacon or if R is Q-Gorenstein). Then lct(m) = −a(R) if and only if R is quasi-Gorenstein. Proof. Since (1) follows from Remark 5.5, Lemma 5.7 (2) and Proposition 5.12, we will show (2). Let x ∈ X be the closed point corresponding to m. If lct(m) = −a(R), then lctx (m) has to be equal to dx (m) by Remark 5.5, Lemma 5.7 (2) and Proposition 5.12 again. It follows from Theorem 5.10 that X is quasi-Gorenstein at x, which is equivalent to saying that R is quasi-Gorenstein. Next we will show the “if” part of (2). Suppose that R is quasi-Gorenstein. Let ϕ : Y −→ X be the blow-up of X = Spec R at m and E = Proj R be its exceptional divisor. Note that Y is normal and quasi-Gorenstein. It is easy to see that KY /X = −(1 + a(R))E, see, for e −→ Y of (Y, E), and example, the proof of [31, Proposition 5.4]. Take a log resolution ψ : X then − ψ ∗ E. + ψ ∗ (KY /X + a(R)E) = KX/Y + a(R)ψ ∗ E = KX/Y KX/X e e e Since X has only log canonical singularities, E has also only log canonical singularities. It follows from inversion of adjunction for log canonical pairs [23] that (Y, E) is log canonical, − ψ ∗ E are greater than or equal which implies that all the coefficients of the divisor KX/Y e to −1. Thus, (X, m−a(R) ) is log canonical, that is, lct(m) > −a(R).  A GORENSTEIN CRITERION FOR STRONGLY F -REGULAR RINGS 25 Remark 5.14. Let (R, m) be the same as in Corollary 5.13. If X = Spec R is Q-Gorenstein, then we can show that lct(m) 6 −ai (R) for all i (see the paragraph preceding Proposition 3.5 for the definition of ai (R)). The proof is as follows. We may assume that i > 2. Let ϕ : Y −→ X be the blow-up of X at m and Z = Proj R be its exceptional divisor. Since R isLa normal standard graded ring, there exists a very ample divisor H on Z such that R = n>0 H 0 (Z, OZ (nH)) and rKZ ∼ aH for some a ∈ Z, where r is the Gorenstein index of R. We see by the same argument as the proof of [31, Proposition 5.4] that KY /X = −(1 + a/r)Z, which implies that lct(m) has to be less than or equal to −a/r. Therefore, in order to prove the inequality lct(m) 6 −ai (R), it suffices to show that −a/r 6 −ai (R). This condition is equivalent to saying that if ℓ is an integer greater than a/r, then H i−1 (Z, OZ (ℓH)) = 0, because ai (R) = max{ℓ ∈ Z | H i−1 (Z, OZ (ℓH)) 6= 0}. However, since ℓH − KZ ∼Q (ℓ − a/r)H is ample, this is immediate from [13, Theorem 1.7]. When the ring is toric, we have a similar characterization in the non-standard graded case: Corollary 5.15. Let the notation be the same as in Corollary 3.18. Let R = k[σ ∨ ∩ M ] be an affine semigroup ring over a field k of characteristic zero, defined by a strongly convex rational polyhedral cone σ. Let m be the unique monomial maximal ideal of R. (1) Then d(m) = −aσ (R). (2) lct(m) = −aσ (R) if and only if R is Gorenstein. Proof. It follows from the existence of a toric log resolution of m that J ′ (mt ) and I(ωX , mt ) are torus-invariant, and so lct(m) and d(m) are preserved under base field extension. Thus, we may assume that k is algebraically closed. Since (2) follows from (1), Remark 5.5, and Corollary 5.11, it remains to justify (1). For this, use the same strategy as the proof of Corollary 3.18, in which case the assertion follows  from [5, Theorem 2] and Lemma 5.7 (1). References [1] I. M. Aberbach, Extension of weakly and strongly F -regular rings by flat maps, J. Algebra 241 (2001), 799–807. [2] C. Birkar, Existence of flips and minimal models for 3-folds in char p, Ann. Sci. Éc. Norm. Supér. (4) 49 (2016), 169–212. [3] C. Birkar, P. Cascini, C. D. Hacon, and J. Mc Kernan, Existence of minimal models for varieties of log general type, J. Amer. Math. Soc. 23 (2010), 405–468. [4] C. Birkar and J. Waldron, Existence of Mori fibre spaces for 3-folds in char p, arXiv:1410.4511, preprint. [5] M. Blickle, Multiplier ideals and modules on toric varieties, Math. Z. 248 (2004), 113–121. [6] W. Bruns and J. Herzog, On the computation of a-invariants, Manuscripta Math. 77 (1992), 201–213. [7] W. Bruns and U. Vetter, Determinantal rings, Lecture Notes in Math. 1327, Springer-Verlag, Berlin, 1988. [8] T. Chiba and K. Matsuda, Diagonal F -thresholds and F -pure thresholds of Hibi rings, Comm. Algebra 43 (2015), 2830–2851. [9] A. Chiecchio, F. Enescu, L. E. Miller, and K. Schwede, Test ideals in rings with finitely generated anticanonical algebras, arXiv:1412.6453, preprint. [10] T. de Fernex and C. Hacon, Singularities on normal varieties, Compos. Math. 145 (2009), 393–414. [11] A. De Stefani and L. Núñez-Betancourt, F -thresholds of graded rings, arXiv:1507.05459, preprint. [12] R. Fedder, F -purity and rational singularity, Trans. Amer. Math. Soc. 278 (1983), 461–480. [13] O. Fujino, Fundamental theorems for semi log canonical pairs, Algebr. Geom. 1 (2014), 194–228. [14] O. Fujino, K. Schwede, and S. Takagi, Supplements to non-lc ideal sheaves, in: Higher dimensional algebraic geometry, RIMS Kôkyûroku Bessatsu B24, pp. 1–46, Res. Inst. Math. Sci. (RIMS), Kyoto, 2011. 26 A. K. SINGH, S. TAKAGI and M. VARBARO [15] C. D. Hacon and C. Xu, On the three dimensional minimal model program in positive characteristic, J. Amer. Math. Soc. 28 (2015), 711–744. [16] N. Hara and S. Takagi, On a generalization of test ideals, Nagoya Math. J. 175 (2004), 59–74. [17] N. Hara and K.-i. Watanabe, F -regular and F -pure rings vs. log terminal and log canonical singularities, J. Algebraic Geom. 11 (2002), 363–392. [18] N. Hara and K. Yoshida, A generalization of tight closure and multiplier ideals, Trans. Amer. Math. Soc. 355 (2003), 3143–3174. [19] I. B. Henriques and M. Varbaro, Test, multiplier and invariant ideals, Adv. Math. 287 (2016), 704–732. [20] D. Hirose, K.-i. Watanabe, and K. Yoshida, F -thresholds versus a-invariants for standard graded toric rings, Comm. Algebra 42 (2014), 2704–2720. [21] C. Huneke and N. V. Trung, On the core of ideals, Compositio Math. 141 (2005), 1–18. [22] E. Hyry and K. E. Smith, On a non-vanishing conjecture of Kawamata and the core of an ideal, Amer. J. Math. 125 (2003), 1349–1410. [23] M. Kawakita, Inversion of adjunction on log canonicity, Invent. Math. 167 (2007), 129–133. [24] J. Kollár, Exercises in the birational geometry of algebraic varieties, arXiv:0809.2579, preprint. [25] J. Kollár and S. Mori, Birational geometry of algebraic varieties, Cambridge Tracts in Mathematics 134, Cambridge University Press, Cambridge, 1998. [26] S. J. Kovács, K. Schwede, and K. E. Smith, The canonical sheaf of Du Bois singularities, Adv. Math. 224 (2010), 1618–1640. [27] L. Ma, F -injectivity and Buchsbaum singularities, Math. Ann 362 (2015), 25–42. [28] L. E. Miller, A. K. Singh, and M. Varbaro, The F -pure threshold of a determinantal ideal, Bull. Braz. Math. Soc. 45 (2014), 767–775. [29] K. Schwede, A simple characterization of Du Bois singularities. Compos. Math. 143 (2007), 813–828. [30] K. Schwede, Generalized test ideals, sharp F -purity, and sharp test elements, Math. Res. Lett. 15 (2008), 1251–1261. [31] K. Schwede and K. E. Smith, Globally F -regular and log Fano varieties, Adv. Math. 224 (2010), 863–894. [32] K. Schwede and S. Takagi, Rational singularities associated to pairs, Michigan Math. J. 57 (2008), 625– 658. [33] K. Shibata, Rational singularities, ω-multiplier ideals and cores of ideals, Ph.D. thesis, University of Tokyo, 2016. [34] Q. Song, Questions in local cohomology and tight closure, Ph.D. thesis, University of Utah, 2007. [35] V. Srinivas and S. Takagi, Nilpotence of Frobenius action and the Hodge filtration on local cohomology, arXiv:1503.08772, preprint. [36] S. Takagi, F -singularities of pairs and inversion of adjunction of arbitrary codimension, Invent. Math. 157 (2004), 123–146. [37] S. Takagi and K.-i. Watanabe, On F -pure thresholds, J. Algebra 282 (2004), 278–297. Department of Mathematics, University of Utah, 155 South 1400 East, Salt Lake City, UT 84112, USA E-mail address: [email protected] Graduate School of Mathematical Sciences, University of Tokyo, 3-8-1 Komaba, Meguro-ku, Tokyo 153-8914, Japan E-mail address: [email protected] Dipartimento di Matematica, Università di Genova, Via Dodecaneso 35, I-16146 Genova, Italy E-mail address: [email protected]
0math.AC
Unified Statistical Theory of Spectral Graph Analysis Subhadeep Mukhopadhyay Department of Statistical Science, Temple University Philadelphia, Pennsylvania, 19122, U.S.A. Dedicated to the beloved memory of Emanuel (Manny) Parzen. arXiv:1602.03861v4 [math.ST] 20 Sep 2016 Abstract The goal of this paper is to show that there exists a simple, yet universal1 statistical logic of spectral graph analysis by recasting it into a nonparametric function estimation problem. The prescribed viewpoint appears to be good enough to accommodate most of the existing spectral graph techniques as a consequence of just one single formalism and algorithm. Keywords and phrases: Nonparametric spectral graph analysis; Graph correlation density field (GraField); Empirical and smoothed spectral graph analysis; High-dimensional discrete data smoothing. Contents 1 Introduction 1.1 Spectral Graph Analysis: A Practitioner’s Guide 1.2 Previous Theoretical Treatments . . . . . . . . . 1.3 A Set of Questions . . . . . . . . . . . . . . . . . 1.4 Unified Construction Principle . . . . . . . . . . . . . . 2 2 3 3 4 2 Fundamentals of Statistical Spectral Graph Analysis 2.1 Graph Correlation Density Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Karhunen-Loéve Representation of Graph . . . . . . . . . . . . . . . . . . . . . . . 2.3 Nonparametric Spectral Approximation Theory . . . . . . . . . . . . . . . . . . . . 5 5 7 9 3 Empirical Spectral Graph Analysis 3.1 Laplacian Spectral Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Diffusion Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Modularity Spectral Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 13 14 4 Smoothed Spectral Graph Analysis 4.1 High-dimensional Undersampled Regime 4.2 Spectral Smoothing . . . . . . . . . . . . 4.3 Type-I Regularized Graph Laplacian . . 4.4 Type-II Regularized Graph Laplacian . 4.5 Google’s PageRank Method . . . . . . . 4.6 Other Generalizations . . . . . . . . . . 15 15 15 16 17 17 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Application to Graph Regression 19 6 Concluding Remarks 22 1 By universal, I mean the theory should not be specific to any particular spectral graph analysis technique but be meaningfully applicable to a class of models. 1 1 Introduction Spectral graph data analysis is undoubtedly the most favored technique for graph data analysis, both in theory and practice. It has been extraordinarily successful in many applications including data mining, web search, quantum computing, computer vision, image segmentation, and others. Over the last several decades, extensive efforts have been made by researchers and practitioners to develop a suit of spectral graph analysis techniques (e.g., Laplacian, Modularity, Diffusion map, regularized Laplacian, Google PageRank model etc.) with increasing sophistication and specialization. However, no single algorithm can be regarded as a panacea for dealing with the evolving complexities of modern graphs. Therefore, the most important and pressing question for the field today appears to be whether we can develop a unifying language to establish “bridges” between a wide variety of spectral graph analysis techniques, and thus providing logically connected means for reaching different ends. Undoubtedly, any such formulation would be of great theoretical significance and practical value, that will ultimately provide the applied data scientists clear guidance and a systematic strategy for selecting the proper spectral tools to arrive at a confident conclusion. To that end, this work attempts to unify the theories of spectral graph analysis by purely statistical means. That is, we seek a constructive (rather than confirmatory) theoretical framework integrating classical and modern spectral graph analysis algorithms, which to date have been viewed as distinct methods. 1.1 Spectral Graph Analysis: A Practitioner’s Guide The way spectral graph analysis is currently taught and practiced can be summarized as follows (also known as spectral heuristics): 1. Let G = (V, E) denotes a (possibly weighted) undirected graph with a finite set of vertices |V | = n, and a set of edges E. Represent the graph using weighted adjacency matrix A where A(x, y; G) = wxy if the nodes x and y are connected by an edge and 0 otherwise; weights are non-negative and symmetric. 2. Define “suitable” spectral graph matrix (also known as graph “shift” operator). Most popular and successful ones are listed below: • L = D−1/2 AD−1/2 ; Chung (1997) • B = A − N −1 ddT ; Newman (2006) • T = D−1 A; Coifman and Lafon (2006) −1/2 • Type-I Reg. Lτ = Dτ −1/2 • Type-II Reg. Lτ = Dτ −1/2 A Dτ ; Chaudhuri et al. (2012) −1/2 Aτ Dτ ; Amini et al. (2013) • Google’s PageRank Tα = αD−1 A + (1 − α)F ; (Brin and Page, 1999) D = diag(d1 , . . . , dn ) ∈ Rn×n , di denotes the degree of a node, τ > 0 regularization P parameter, F ∈ Rn×n with all entries 1/n, and N = 2|E| = x,y A(x, y). 2 3. Perform spectral decomposition of the matrix selected at step 2, whose eigenvectors form an orthogonal basis of Rn . Spectral graph theory seeks to understand the interesting properties and structure of a graph by using leading nontrivial eigenvectors and eigenvalues, first recognized by Fiedler (1973), which provide the basis for performing harmonic analysis on graphs. 4. Compute graph Fourier transform (GFT) by expanding functions (or signals) defined over the vertices of a graph as a linear combination of the selected eigenbasis (from step 3) and carry out learning tasks such as regression, clustering, classification, smoothing, kriging, etc. 1.2 Previous Theoretical Treatments There has been a flood of publications on statistical spectral graph theory, most of which have focused on asymptotic justifications of different techniques (mentioned in the previous section). See, in particular, those based on Laplacian (Von Luxburg et al., 2008, Belkin and Niyogi, 2001), modularity (Davis and Sethuraman, 2016), diffusion map (Coifman and Lafon, 2006, Coifman et al., 2005), and regularized Laplacian (Chaudhuri et al., 2012, Le et al., 2015) methods. More refined theoretical results in the context of a specific parametric graph model (such as stochastic block model or its variants) are discussed in Joseph and Yu (2016), Rohe et al. (2011), Sarkar et al. (2015) and Qin and Rohe (2013). What is this paper not about? It is important to draw a distinction between the theory that purports to provide the constructions of different spectral graph techniques and, the theory that does not. This article focuses on the former. Instead of statistical confirmation, here our main interest lies in understanding the statistical origins of various spectral graph techniques. This is mostly ill-understood and neglected territory. The current theoretical treatments do not give us any clues on this issue. 1.3 A Set of Questions Despite many advances, the theory and practice of spectral graph analysis are still very much compartmentalized and unsystematic. The graph signal processing engineers are often left bewildered by the vastness of the existing literature and huge diversity of methods (developed by the machine learning community, applied harmonic analysts, physicists, and statisticians). This has led to a need to develop a broader perspective on this topic, lest we be guilty of not seeing the forest for the trees. The question how different spectral graph techniques can naturally originate from some underlying basic principle, plays the key role in this regard by clarifying the mystery of why and when to use them. The reality is we still lack general tools and techniques to attack this question in a statistical way. Given the very different character of the existing spectral models, it seems that new kinds of abstractions need to be formulated to address this fundamental challenge. What would these abstractions look like? How can we discover a statistical path that naturally leads to these different spectral methods? One such promising theory is discussed in this paper, 3 taking inspiration from celebrated history on nonparametric spectral analysis of time series. The prescribed modern viewpoint shows an exciting confluence of nonparametric function estimation, quantile domain methods, and Fourier harmonic analysis to unveil a more simple conceptual structure of this subject, avoiding undue complexities. 1.4 Unified Construction Principle We start by giving a glance to the unified spectral representation scheme, whose (nonparametric) statistical interpretation and justification is deferred until the next section, as it requires a more technical background. It turns out that all known spectral graph techniques are just different manifestations of this single general algorithm in some way. Probability Notations and Definitions. We will stick to the following probabilistic notations. P Define network probability mass function by P (x, y; G) = A(x, y; G)/ x,y A(x, y; G); Vertex P P probability mass function by p(x; G) = y P (x, y; G) and p(y; G) = x P (x, y; G) with the associated quantile functions Q(u; X, G) and Q(v; Y, G). Finally, define the important Graph Interaction Function by GIF(x, y; G) = P (x, y; G)/p(x; G)p(y; G), x, y ∈ V (G). Algorithm 1. Nonparametric Spectral Graph Analysis: A Unified Algorithm Step 1. For given discrete graph G of size n, construct GraField kernel function C : [0, 1]2 → R+ ∪ {0} defined a.e by    P Q(u; X), Q(v; Y ); G  , (1.1) C (u, v; G) = GIF Q(u; X), Q(v; Y ); G = p Q(u; X) p Q(v; Y ) where u = F (x; G), v = F (y; G) for x, y ∈ {1, 2, . . . , n}. Step 2. Let {ξj }j≥0 be a complete orthonormal system on [0, 1]. Construct discrete transform basis ξj (x; F (X; G)) := ξj (F (x; G)), evaluated at the vertex-rank-transforms. They satisfy the following orthonormality conditions (degree-weighted): X ξj (x; F (X)) ξk (x; F (X)) p(x; G) = δjk , x thus constitutes an orthonormal basis for L2 (F ; G). Step 3. Transform coding of graphs. Construct generalized spectral graph matrix M(G, ξ) ∈ Rn×n with respect to ηj (u) := ξj (Q(u; X); F ): D Z1 M[j, k; G, ξ] = ηj , (C − 1)ηk E L2 [0,1] 0 = X ξj (`; F )ξk (m; F )P (`, m; G). (1.2) `,m Mξ can be viewed as a transform coefficient matrix of the orthogonal series expansion of C (u, v; G) with respect to the product bases {ηj ηk }1≤j,k≤n . 4 P Step 4. Perform the singular value decomposition (SVD) of Mξ = U ΛU T = k uk µk uTk , where where uij are the elements of the singular vector of moment matrix U = (u1 , . . . , un ), and Λ = diag(µ1 , . . . , µn ), µ1 ≥ · · · µn ≥ 0. Step 5. Obtain approximate Karhunen-Loéve (KL) representation basis (which acts as a graph Fourier basis) of the graph G by φek = n X ujk ξj , for k = 1, . . . , n − 1, j=1 which can be directly used for subsequent signal processing on graphs. Organization. The next section is devoted to the fundamental principles that underlie this algorithm. The unifying power will be shown in Sections 3 and 4. By doing so, we will introduce empirical and smooth spectral graph analysis techniques. We also address the open problem of obtaining a formal interpretation of “spectral regularization”. A deep connection between high-dimensional discrete data smoothing and spectral regularization is discovered. This new perspective provides, for the first time, the theoretical motivation and fundamental justification for using regularized spectral methods, which were previously considered to be empirical guesswork-based ad hoc solutions. Important application towards spatial graph regression is discussed in Section 5. In Section 6, we end with concluding remarks. Additional applications are available as supplementary materials. 2 2.1 Fundamentals of Statistical Spectral Graph Analysis Graph Correlation Density Field Wiener’s generalized harmonic analysis formulation on spectral representation theory of time series starts by defining the autocorrelation function (ACF) of a signal. In particular, Wiener–Khintchine theorem asserts ACF and the spectral density are Fourier duals of each other. Analogous to Wiener’s correlation technique, we describe a new promising starting point, from which we can develop the whole spectral graph theory systematically by bringing nonparametric function estimation and harmonic analysis perspectives. Both statistical and probabilistic motivations will be given. Definition 1. For given discrete graph G of size n, the piecewise-constant bivariate kernel function C : [0, 1]2 → R+ ∪ {0} is defined almost everywhere through    p Q(u; X), Q(v; Y ); Gn   , 0 < u, v < 1. (2.1) C (u, v; Gn ) = GIF Q(u; X), Q(v; Y ); Gn = p Q(u; X) p Q(v; Y ) Theorem 1. GraField defined in Eq. (2.1) is a positive piecewise-constant kernel satisfying ZZ ZZ X C (u, v; Gn ) du dv = C (u, v; Gn ) du dv = 1, [0,1]2 (i,j)∈{1,...,n}2 I ij 5 where ( Iij (u, v) = 1, 0, if (u, v) ∈ (F (i; X), F (i + 1; X)] × (F (j; Y ), F (j + 1; Y )] elsewhere. Note 1. The bivariate step-like shape of the GraField kernel is governed by the (piecewiseconstant left continuous) quantile functions Q(u; X, Gn ) and Q(v; Y, Gn ) of the discrete vertex probability measures. As a result, in the continuum limit (let (Gn )n≥0 be a sequence of graphs whose number of vertices tends to infinity n → ∞), the shape of the piecewise-constant discrete Cn approaches a “continuous field” over unit interval – a self-adjoint compact operator on square integrable functions (defined on the graph) with respect to vertex probability measure p(x; G) (see Section 2.2 for more details). Motivation 1. We start with a diffusion based probabilistic interpretation of the GraField kernel. The crucial point to note is that the “slices” of the C (2.1) can be expressed as p(y|x; G)/p(y; G) in the vertex domain. This alternative conditional probability-based viewpoint suggests a connection with the random walk on the graph. Interpret p(y|x; G) as transition probability from vertex x to vertex y in one time step. Also note that p(y; G) is the stationary probability distribution on the graph, as we have limt→∞ p(t, y|x; G) = p(y; G) regardless of the initial starting point x (moreover, for connected graphs the stationary distribution is unique). Here p(t, y|x; G) denotes the probability distribution of a random walk landing at location y at time t, starting at the vertex x. See Lovász (1993) for an excellent survey on the theory of random walks on graphs. The graph affinity function measures how the transition probability p(y|x; G) is different from the “baseline” stationary distribution (long-run stable behavior) p(y; G). That comparison ratio is the fundamental interaction function for graphs which we denote by GIF(x, y; G). This probabilistic interpretation along with Theorem 2 and 5 will allow us to integrate the diffusion map (Coifman and Lafon, 2006) technique into our general statistical framework in Section 3.2. Motivation 2. GraField compactly represents the affinity or strength of ties (or interactions) between every pair of vertices in the graph. To make this clear, let us consider the following adjacency matrix of a social network representing 4 employees of an organization   A= 0 2 0 0 2 0 3 3 0 3 0 3 0 3 , 3 0 where the weights reflect numbers of communication (say email messages or coappearances in social events etc.). Our interest lies in understanding the strength of association between the employees i.e., Strength(x, y) for all pairs of vertices. Looking at the matrix A (or equivalently based on the histogram network estimator p(x, y; G) = A/N P with N = x,y A(x, y) = 22) one might be tempted to conclude that the link between 6 employee 1 and 2 is the weakest, as they have communicated only twice, whereas employees 2, 3, and 4 constitute strong ties, as they have interacted more frequently. Now, the surprising fact is that (i) Strength(1, 2) is twice that of Strength(2, 3) and Strength(2, 4); also (ii) Strength(1, 2) is 1.5 times of Strength(3, 4)! To understand this paradox, compute the vertex-domain empirical GraField kernel matrix (Definition 1) with (x, y)th entry N ·A(x, y; G)/d(x)d(y)   0 22/8 0 0  22/8 0 22/16 22/16  . Cn =   0 22/16 0 22/12  0 22/16 22/12 0 This toy example is in fact a small portion (with members 1, 9, 31 and 33) of the famous Zachary’s karate club data, where the first two members were from Mr. Hi’s group and the remaining two were from John’s group. The purpose of this illustrative example is not to completely dismiss the adjacency or empirical graphon (Lovász and Szegedy, 2006) based analysis but to caution the practitioners so as not to confuse the terminology “strength of association” with “weights” of the adjacency matrix – the two are very different objects. Existing literature uses them interchangeably without paying much attention. The crux of the matter is: association does not depend on the raw edge-density, it is a “comparison edge-density” that is captured by the GraField; see Section 3.2 for its intriguing connection with diffusion based graph-distance. Motivation 3. GraField can also be viewed as properly “renormalized Graphon,” which is reminiscent of Wassily Hoeffding’s “standardized distributions” idea (Hoeffding, 1940). Thus, it can be interpreted as a discrete analogue of copula (the Latin word copula means “a link, tie, bond”) density for random graphs that captures the underlying correlation field. We study the structure of graphs in the spectral domain via this fundamental graph kernel C that characterizes the implicit connectedness or tie-strength between pairs of vertices. Fourier-type spectral expansion results of the density matrix C are discussed in the ensuing section, which is at the heart of our approach. We will demonstrate that this correlation density operator-based formalism provides a useful perspective for spectral analysis of graphs that allows unification. 2.2 Karhunen-Loéve Representation of Graph We define the Karhunen-Loéve (KL) representation of a graph G based on the spectral expansion of its GraField function C (u, v; G). Schmidt decomposition (Schmidt, 1907) of C yields the following spectral representation theorem of the graph. Theorem 2. The square integrable graph correlation density kernel C : [0, 1]2 → R+ ∪ {0} of two-variables admits the following canonical representation C (u, v; Gn ) = 1 + n−1 X k=1 7 λk φk (u)φk (v), (2.2) where the non-negative λ1 ≥ λ2 ≥ · · · λn−1 ≥ 0 are singular values and {φk }k≥1 are the orthonormal singular functions hφj , φk iL 2 [0,1] = δjk , for j, k = 1, . . . , n − 1, which can be evaluated as the solution of the following integral equation relation Z [C (u, v; G) − 1] φk (v) dv = λk φk (u), k = 1, 2, . . . , n − 1. (2.3) [0,1] Remark 1. By virtue of the properties of Karhunen-Loéve (KL) expansion (Loève, 1955), the eigenfunction basis φk satisfying (2.3) provides the optimal low-rank representation of a graph in the mean square error sense. In other words, {φk } bases capture the graph topology in the smallest embedding dimension and thus carries practical significance for graph compression. Hence, we can call those functions the optimal coordinate functions or Fourier representation bases. Accordingly, the fundamental statistical modeling problem hinges on finding approximate solutions to the optimal graph coordinate system {φ1 , . . . , φn−1 } satisfying the integral equation (2.3). Definition 2. Any function or signal y ∈ Rn defined on the vertices of the graph y : V 7→ R P such that kyk2 = x∈V (G) |y(x)|2 p(x; G) < ∞, can be represented as a linear combination of the Schmidt bases of the GraField density matrix C . Define the generalized graph Fourier transform of y n X yb(λk ) := hy, φk i = y(x)φk [F (x; G)]. x=1 This spectral or frequency domain representation of a signal, belonging to the square integrable Hilbert space L 2 (F, G) equipped with the inner product hy, ziL 2 (F ;G) = X y(x)z(x)p(x; G), x∈V (G) allows us to construct efficient graph learning algorithms. As {φk }’s are KL spectral bases, the vector of projections onto this basis function decay rapidly, and hence may be truncated aggressively to capture the structure in a small number of bits. Definition 3. The entropy (or energy) of a discrete graph G, is defined using the Parseval relation of the canonical representation ZZ X Entropy(G) = (C − 1)2 du dv = |λk |2 . k [0,1]2 This quantity, which captures the departure of uniformity of the C , can be interpreted as a measure of ‘structure’ or the ‘compressibility’ of the graph. Entropy measure can also be used to (i) define graph homogeneity and (ii) design fast algorithms for graph isomorphism. For homogeneous graphs, the shape of the correlation density field is uniform over the unit square. The power at each harmonic components, as a function of frequency, is called the power spectrum of the graph. Flat spectrum is equivalent to the analogous notion of white-noise process. 8 2.3 Nonparametric Spectral Approximation Theory We view the spectral graph learning algorithm as a method of approximating (λk , φk )k≥1 that satisfies the integral equation (2.3), corresponding to the graph kernel C (u, v; G). In practice, often the most important features of a graph can be well characterized and approximated by a few top (dominating) singular-pairs. The statistical estimation problem can be summarized as follows: n  o b1 , φb1 , . . . , λ bn−1 , φbn−1 An×n 7→ C 7→ λ that satisfies Eq. (2.3). 2.3.1 From Continuous to Discrete Basis and Back The Fourier-type nonparametric spectral approximation method starts by choosing an expansion basis. Let ξj denote an orthonormal basis of L 2 [0, 1]. Construct the discrete transform basis of Rn by evaluating ξj at the vertex-rank-transforms ξj (F (x; G)) := ξj (x; F, G). Verify that ξj (x; F, G) are orthogonal with respect to the measure p(x; G) satisfying X ξj (x; F, G) ξk (x; F, G) p(x; G) = 0, for j 6= k. x Thus form an orthogonal basis of the Hilbert space L 2 (F ; G). Define η-functions (quantile domain unit bases), generated from mother ξj by   ηj (u; G) = ξj Q(u; X); F, G , 0 < u < 1, as piecewise-constant (left-continuous) functions over the irregular grid {0, p(1), p(1)+p(2), . . . , Pn j=1 p(j) = 1} satisfying hηj , ηk iL 2 [0,1] = 0, if j 6= k. They will provide a useful tool to recast conventional matrix calculus-based approaches as a functional statistical problem. One unique aspect of our construction is that in the continuum limit (as the size of the graph n → ∞) the discrete η-basis of Rn approaches the mother ξ-function, a basis of L 2 [0, 1]. We call it asymptotic “reproducing” property. 2.3.2 Projection Methods for Eigenvector Approximation We are interested in the nonparametric estimation of eigenpairs {λk , φk }k≥0 . Approximate the unknown eigenvectors by the projection, Pn φk , on the span{ηj , j = 1, . . . , n} defined by φk (u) ≈ Pn φk = n X θjk ηj (u), 0<u<1 (2.4) j=1 where θjk are the unknown coefficients to be estimated. Definition 4 (Orthogonal Discrete Graph Transform). We introduce a generalized concept of matrices associated with graphs called the G-matrix. Define discrete graph transform with respect to an orthonormal system η as M[j, k; η, G] = D Z1 (C − 1)ηk ηj , 0 9 E L 2 [0,1] for j, k = 1, . . . , n. (2.5) Equivalently, we can define the discrete graph transform to be the coefficient matrix of the orthogonal series expansion of the GraField kernel C (u, v; G) with respect to the product bases {ηj ηk }1≤j,k≤n . As a practical significance, this generalization provides a systematic recipe for converting the graph problem into a “suitable” matrix problem: Gn (V, E) −→ An×n C (u, v; Gn ) −→ {η1 ,...,ηn } −−−−−→ Eq. (2.5) M(η, G) ∈ Rn×n . Theorem 3. The G-matrix (2.5) can also be interpreted as a “covariance” operator for a discrete graph by recognizing the following equivalent representation for x, y ∈ {1, 2, . . . . , n} X      M[j, k; ξ, G] = EP ξj F (X; G) ξk F (Y ; G) = P (x, y; G) ξj F (x; G) ξj F (y; G) , x,y This can be proved using the basic quantile mechanics fact that Q(F (X)) = X holds with probability 1 (see Parzen (1979)). Next, we present a general approximation scheme that provides an effective method of discrete graph analysis in the frequency domain. Theorem 4 (Nonparametric spectral approximation). The Fourier coefficients {θjk } of the projection estimators (2.4) of the GraField eigenfunctions (eigenvalues and eigenvectors), satisfying the integral equation (2.3), can be obtained by solving the following generalized matrix eigenvalue problem MΘ = SΘ∆, (2.6) R1 where Mjk = ηj , 0 (Cn − 1)ηk L 2 [0,1] , and Sjk = ηj , ηj L 2 [0,1] . To prove define the residual of the governing equation (2.3) by expanding φk as series expansion (2.4), R(u) ≡ X j θjk h Z1 i  C (u, v; G) − 1 ηj (v) dv − λk ηj (u) = 0. (2.7) 0 Now for complete and orthonormal {ηj } requiring the error R(u) to be zero is equivalent to the statement that R(u) is orthogonal to each of the basis functions R(u), ηk (u) L 2 [0,1] = 0, k = 1, . . . , n. (2.8) This leads to the following set of equations: X j θjk h ZZ 1 i X Z   C (u, v; Gn )−1 ηj (v)ηk (u) dv du − λk θjk ηj (u)ηk (u) du = 0. (2.9) j [0,1]2 0 Theorem 4 plays a key role in our statistical reformulation. In particular, we will show how the fundamental equation (2.6) provides the desired unity among different spectral graph techniques by systematically constructing a “suitable” class of coordinate functions. 10 Note 2. The fundamental idea behind the Rietz-Galerkin (Galerkin, 1915) style approximation scheme for solving variational problems in Hilbert space played a pivotal inspiring role to formalize the statistical basis of the proposed computational approach. Note 3. Our nonparametric spectral approximation theory based on eigenanalysis of G-Matrix, remains unchanged for any choice η-function (following the recipe for construction given in Sec 2.3.1), which paves the way for the generalized harmonic analysis of graphs. The next two sections investigate this general scheme under various choices of η-functions, and nonparametric estimation methods of Cn . By doing so, many “mysterious similarities” among different spectral graph algorithms are discovered which were not known before. 3 Empirical Spectral Graph Analysis Three popular traditional spectral graph analysis models will be synthesized in this section. 3.1 Laplacian Spectral Analysis Laplacian is probably the most heavily used spectral graph technique in practice. Here we will demonstrate for the first time how the Laplacian of a graph naturally originates by purely statistical reasoning, totally free from the classical combinatorial based logic. Degree-Adaptive Block-pulse Basis Functions. One of the fundamental, yet universally valid (for any graph) choice for {ηj }1≤j≤n is the indicator top hat functions (also known as block-pulse basis functions, or in short BPFs). However, instead of defining the BPFs on a uniform grid (which is the usual practice) here (following Sec 2.3.1) we define them on P the non-uniform mesh 0 = u0 < u1 · · · < un = 1 over [0,1], where uj = x≤j p(x; X) with local support ( p−1/2 (j) for uj−1 < u ≤ uj ; (3.1) ηj (u) = 0 elsewhere. They are disjoint, orthogonal, and a complete set of functions satisfying Z1 0 Z1 Z1 p 2 ηj (u) du = 1, and ηj (u)ηk (u) du = δjk . ηj (u) du = p(j), 0 0 Note 4. The shape (amplitudes and block lengths) of our specially designed BPFs depend on the specific graph structure via p(x; G) as shown in Fig 1. In order to obtain the spectral domain representation of the graph, it is required to estimate the spectra of GraField kernel φk , by representing them as block pulse series. The next result describes the required computational scheme for estimating the unknown expansion coefficients {θjk }. Theorem 5. Let φ1 , . . . , φn the canonical Schmidt bases of L 2 graph kernel C (u, v; G), satisfying the integral equation (2.3). Then the empirical solution of (2.3) for block-pulse 11 2 2 1 3 1 4 3 0.0 0.0 0.6 1.0 1.2 2.0 4 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.0 0.0 0.0 1.0 1.0 2.0 2.0 0.0 1.0 1.0 2.0 2.0 0.0 1.0 1.0 2.0 2.0 0.0 Figure 1: Two graphs and their corresponding degree-adaptive block-pulse functions. The amplitudes and the block length of the indicator basis functions (3.1) depends on the degree distribution of that graph. orthogonal series approximated (3.1) Fourier coefficients {θjk } can equivalently be written down in closed form as the following matrix eigen-value problem L∗ [θ] = λθ, (3.2) 1/2 where L∗ = L − uuT , L is the Laplacian matrix, u = Dp 1n , and Dp = diag(p1 , . . . , pn ). Note that the discrete GraField kernel takes value GIF(j, k; Gn ) = P (j, k; Gn )/p(j; Gn )p(k; Gn ) and the tensor–product bases ηj (u)ηk (v) take value p−1/2 (j; Gn )p−1/2 (k; Gn ) over the rectangle Ijk (u, v) for 0 < u, v < 1. This observation reduces the master equation (2.9) to the following system of linear algebraic equations expressed in the vertex domain: # " X p p p(j, k) θjk p − p(j) p(k) − λk δjk = 0. (3.3) p(j)p(k) j 12 Empirical plugin nonparametric estimator. The estimating equation (3.3) contains unknown network and vertex probability mass functions which need to be estimated from the data. The most basic nonparametric estimates are Pe(j, k; Gn ) = A[j, k; Gn ]/N and pe(j; Gn ) = d(j; Gn )/N . By plugging these empirical estimators into Eq. (3.3), said equation can be rewritten as the following compact matrix form: h √ √ Ti (3.4) L − N −1 d d θ̃ = λ̃θ̃, where L = D−1/2 AD−1/2 is the graph Laplacian matrix. Significance 1. Theorem 5 allows us to interpret the graph Laplacian as the empirical f Gn ) under degree-adaptive indicator basis choice for the η shape function. G-matrix M(η, Our technique provides a completely nonparametric statistical derivation of an algorithek versus k can be considered as a “raw mic spectral graph analysis tool. The plot of λ periodogram” analogue for graph data analysis. 3.2 Diffusion Map We provide a statistical derivation of Coifman’s diffusion map (Coifman and Lafon, 2006) algorithm, which hinges upon the following key result. Theorem 6. The empirical GraField admits the following vertex-domain spectral diffusion decomposition at any finite time t X pe(t, y|x; Gn ) λ̃tk φ̃k (x; F )φ̃k (y; F ), = 1+ pe(y; Gn ) k (3.5) −1/2 where φek = Dp̃ uk , (uk is the kth eigenvector of the Laplacian matrix L), (φk ◦ F )(·) is abbreviated as φk (·; F ), pe(y|x; G) = T (x, y), and T = D−1 A is the transition matrix of a random walk on G with stationary distribution p̃(y; Gn ) = d(y; Gn )/N . −1/2 Replacing the estimated coefficients from Theorem 5 into (2.4) yields φek = Dp uk , where uk is the kth eigenvector of the Laplacian matrix L, immediately leads to the following vertex-domain spectral decomposition result of the empirical GraField: X pe(y|x; G) = 1+ λ̃k φ̃k (x)φ̃k (y), pe(y; G) k (3.6) For an alternative proof of the expansion (3.6) see Appendix section of Coifman and Lafon (2006) by noting φek are the right eigenvectors of random walk Laplacian T . Significance 2. In light of Theorem 6, define diffusion map coordinates at time t as the mapping from x to the vector   x 7−→ λt1 φ1 (x; F ), . . . , λtk φk (x; F ) , x ∈ {1, 2, . . . , n}, 13 which can be viewed as an approximate ‘optimal’ Karhunen-Loéve representation basis and thus can be used for non-linear embedding of graphs. Define diffusion distance, a measure of similarity between two nodes of a graph, as the Euclidean distance in the diffusion map space X  2 0 (3.7) λ2t Dt2 (x, x0 ) = j φj (x; F ) − φj (x ; F ) . j≥1 This procedure is known as diffusion map, which has been extremely successful tool for manifold learning2 . Our approach provides an additional insight and justification for the diffusion coordinates by interpreting it as the strength of connectivity profile for each vertex, thus establishing a close connection with empirical GraField. 3.3 Modularity Spectral Analysis Theorem 7. To approximate the KL graph basis φk = u ≤ uj ) to be the characteristic function satisfying Z1 Z1 ηj (u) du = 0 P j θjk ηj , choose ηj (u) = I(uj−1 < ηj2 (u) du = p(j; G). 0 Then the corresponding empirically estimated spectral graph equation (2.9) can equivalently be reduced to the following generalized eigenvalue equation in terms of the matrix B = A − N −1 ddT Bα = λDα. (3.8) Significance 3. The matrix B, known as modularity matrix, was introduced by Newman (2006) from an entirely different motivation. Our analysis reveals that the Laplacian and Modularity based spectral graph analyses are equivalent in the sense that they inherently use the same underlying basis expansion (one is a rescaled version of the other) to approximate the optimal graph bases. Remark 2. Solutions (eigenfunctions) of the GraField estimating equation based on the G-matrix under the proposed specialized nonparametric approximation scheme provides a systematic and unified framework for spectral graph analysis. As an application of this general formulation, we have shown how one can synthesize the well-known Laplacian, diffusion map, and modularity spectral algorithms and view them as “empirical” spectral graph analysis methods. It is one of those rare occasions where one can witness the convergence of statistical, algorithmic and geometry-motivated computational models. 2 Manifold learning: Data-driven learning of the “appropriate” coordinates to identify the intrinsic nonlinear structure of high-dimensional data. We claim the concept of GraField allows decoupling of the geometrical aspect from the probability distribution on the manifold. 14 4 Smoothed Spectral Graph Analysis Smoothness is a universal requirement for constructing credible nonparametric estimators. Spectral graph analysis is also no exception. An improved smooth version of raw-empirical spectral graph techniques will be discussed, revealing a simple and straightforward statistical explanation of the origin of regularized Laplacian techniques. 4.1 High-dimensional Undersampled Regime Recall from Theorem 4 that the generalized matrix eigenvalue equation (2.6) depends on the unknown network and vertex probability mass functions. This leads us to the question of estimating the unknown distribution P = (p1 , p2 , . . . , pn ) (support size = size of the graph P = n) based on N sample, where N = ni=1 di = 2|E|. Previously (Theorems 5-7) we have used the unsmoothed maximum likelihood estimate (MLE) pe(x; G) to construct our empirical spectral approximation algorithms, which is the unique minimum variance unbiased estimator. Under standard asymptotic setup, where the dimension of the parameter space n is fixed and the sample size N tends to infinity, the law of large numbers ensures optimality of pe. As a consequence, empirical spectral analysis techniques are expected to work quite well for dense graphs. Estimation of probabilities from sparse data. However, the raw pe is known to be strictly suboptimal (Witten and Bell, 1991) and unreliable in the high-dimensional sparse-regime where N/n = O(1) (i.e., when parameter dimension and the sample size are comparably large). This situation can easily arise for modern day large sparse graphs where the ratio N/n is small and there are many nodes with low degree, as is the case of degree sparsity. The naive MLE estimator can become unacceptably noisy (high variability) due to the huge size and sparse nature of the distribution. In order to reduce the fluctuations of “spiky” empirical estimates, some form of “smoothing” is necessary. The question remains: How to tackle this high-dimensional discrete probability estimation problem, as this directly impacts the quality of our nonparametric spectral approximation. My main purpose in the next section is to describe one such promising technique for smoothing raw-empirical probability estimates, which is flexible and in principle can be applied to any sparse data. 4.2 Spectral Smoothing We seek a practical solution for circumventing this problem that lends itself to fast computation. The solution, that is both the simplest and remarkably serviceable, is the Laplace/Additive smoothing (Laplace, 1951) and its variants, which excel in sparse regimes (Fienberg and Holland, 1973, Witten and Bell, 1991). The MLE and Laplace estimates of the discrete distribution p(j; Gn ) are respectively given by Raw-empirical MLE estimates: pe(j; Gn ) = 15 dj ; N Smooth Laplace estimates: pbτ (j; Gn ) = dj + τ N + nτ (j = 1, . . . , n). Note that the smoothed distribution pbτ can be expressed as a convex combination of the empirical distribution pe and the discrete uninform distribution 1/n   N nτ 1 pbτ (j; Gn ) = pe(j; Gn ) + , (4.1) N + nτ N + nτ n which provides a Stein-type shrinkage estimator of the unknown probability mass function p. The shrinkage significantly reduces the variance, at the expense of slightly increasing the bias. Choice of τ . The next issue is how to select the “flattening constant” τ . The following choices of τ are most popular in the literature3 :  1 Laplace estimator;     1/2 Krichevsky–Trofimov estimator; τ=  1/n Perks estimator;    √ N /n Minimax estimator (under L2 loss). Note 5. Under increasing-dimension asymptotics, this class of estimator is often difficult to improve without imposing additional smoothness constraints on the vertex probabilities; see Bishop et al. (2007, Chapter 12). The latter may not be a valid assumption as nodes of a graph offer no natural order in general. With this understanding, smooth generalizations of empirical spectral graph techniques will be discussed, which have a close connection with recently proposed spectral regularized techniques. 4.3 Type-I Regularized Graph Laplacian Construct τ -regularized smoothed empirical ηj;τ basis function by replacing the amplitude −1/2 p−1/2 (j) by p̂τ (j) following (4.1). Incorporating this regularized trial basis, we have the following modified G-matrix based linear algebraic estimating equation (2.6): " # X p p pe(j, k) θjk p (4.2) − p̂τ (j) p̂τ (k) − λk δjk = 0. p̂ (j)p̂ (k) τ τ j Theorem 8. The τ -regularized block-pulse series based spectral approximation scheme is equivalent to representing or embedding discrete graphs in the continuous eigenspace of Type-I Regularized Laplacian = Dτ−1/2 A Dτ−1/2 , (4.3) where Dτ is a diagonal matrix with i-th entry di + τ . Note 6. It is interesting to note that this exact regularized Laplacian formula was proposed by Chaudhuri et al. (2012) and Qin and Rohe (2013), albeit from a very different motivation. 3 For more details on selection of τ see Fienberg and Holland (1973) and references therein. 16 4.4 Type-II Regularized Graph Laplacian Theorem 9. Estimate the joint probability p(j, k; G) by extending the formula given in (4.1) for the two-dimensional case as follows:   nτ 1 N pe(j, k; G) + , (4.4) pbτ (j, k; G) = N + nτ N + nτ n2 which is equivalent to replacing the original adjacency matrix by Aτ = A + (τ /n)11T . This modification via smoothing in the estimating equation (4.2) leads to the following spectral graph matrix Type-II Regularized Laplacian = Dτ−1/2 Aτ Dτ−1/2 . (4.5) Note 7. Exactly the same form of regularization of Laplacian graph matrix (4.5) was proposed by Amini et al. (2013) as a fine-tuned empirical solution. Significance 4. Recently there has been a lot of discussion on how to choose the spectral regularization parameter τ . Using Davis–Kahan’s theorem, Joseph and Yu (2016) have proposed a data-driven technique called DKest. Their method involves repeated eigendecomposition of regularized Laplacian matrix (which is a dense matrix) over a grid of values of τ . There are two major concerns for DKest: heavy computational burden and theoretical validity (which only holds for stochastic block models and its extensions). In contrast, our analysis provides a strikingly simple recommendation without any additional computational overhead (by connecting it to large sparse distribution smoothing), and thus is much easier to construct, implement, and use in practice. Similar to Joseph and Yu (2016), the critical parameter of our theory is the ratio N/n–the average degree of the nodes, contrary to the previous results (Chaudhuri et al., 2012, Qin and Rohe, 2013) that relied on the minimum degree. 4.5 Google’s PageRank Method Smoothing of network and vertex probability distributions appearing in generalized matrix equation (2.6) resulted in Type-I and Type-II regularized Laplacian methods. The third possibility is to directly smooth the conditional or transitional probability matrix to develop a regularized version of random walk Laplacian (which we call Type-III regularized Laplacian) method for large sparse graphs. Smoothing conditional probability function. Consider a random walk on G with transition probability T (i, j; G) = Pr(Xt+1 = j|Xt = i) ≥ 0. Note that the smoothing (4.4) can equivalently be represented as   A(i, j; G) + τ /n 1 Tτ (i, j; G) = = (1 − ατ )T (i, j; G) + ατ , (4.6) di + τ n 17 where the degree-adaptive regularization parameter ατ = τ (di + τ )−1 . One can construct an equivalent and more simplified (non-adaptive) estimator by directly smoothing each row of T (as it is a row-stochastic or row-Markov matrix) via Stein-like shrinkage   1/n 1/n . . . 1/n  . .. ..  .. Tα = (1 − α)T + α  .. (4.7) . . .  , 0 < α < 1. 1/n 1/n . . . 1/n Spectral analysis can now proceed on this regularized transition probability matrix (either (4.6) or (4.7)) by substituting empirical transition matrix Te = D−1 A. Significance 5. The non-adaptive regularized random-walk Laplacian (transition matrix) Tα was introduced by Larry Page and Sergey Brin in 1996 (Brin and Page, 1999) and is called the Google’s PageRank matrix. What seems natural enough from our nonparametric smoothing perspective, is in fact known to be highly surprising adjustment–the “Teleportation trick”. ‘Teleporting is the essential distinguishing feature of the PageRank random walk that had not appeared in the literature before’ – Vigna (2005). Note 8. The Google’s PageRank matrix (which is different from the empirical random walk Laplacian in an important way) is probably the most famous, earliest, and spectacular example of spectral regularization that was originally introduced to counter the problem of dangling nodes (nodes with no outgoing edges) by “connecting” the graph4 . Web is a huge heterogeneous sparse graph where dangling nodes (dead-ends) and disconnected components are quite common. As a result random walk can get stuck, and may cycle around an isolated set of pages. Smoothing allows the random walk to teleport to a web page uniformly at random (or adaptively based on degree-weights) whenever it hits a dead end. The steady state vector describes the long term visit rate–the PageRank score, computed via eigen-decomposition of Tα . 4.6 Other Generalizations The beauty of our statistical argument is that it immediately opens up several possibilities to construct new types of spectral regularization schemes, which are otherwise hard to guess using previous understanding. Two such promising techniques are discussed here. The first one deals with Stein smoothing with data-driven shrinkage parameter. Theorem 10. Under the sparse asymptotic setup where the domain size n → ∞ at the same rate as the sample size N , the risk (expected squared-error loss) of smooth add-b τ probability estimate pbτb (4.1) with the following data-driven choice P N 2 − ni=1 d2i (4.8) τb = Pn 2 n i=1 di − N 2 4 From a statistical estimation viewpoint, this can be thought of as a way to escape from the “zerofrequency problem” for discrete probability estimation. 18 is uniformly smaller than the risk of the unsmoothed MLE estimator pe = N −1 (d1 , . . . , dn ). In addition, the risk of pbτb is uniformly smaller than the risk of the estimator formed by choosing τ = 1/2. For proof one can use the technique described in Fienberg and Holland (1973). As a consequence of this result, we can further improve the spectral regularization algorithm by selecting τ in a data-driven way, with no extra computation. While the Laplace or additive smoothing performs well in general, there are situations where they perform poorly (Gale and Church, 1994). The Good-Turing estimator (Good, 1953) is often the next best choice which is given by pbGT (i; G) = $di +1 di + 1 , · $di N (4.9) where $k denotes the number of nodes with degree k. An excellent discussion on this topic can be found in Orlitsky et al. (2003). One can plug in the estimate (4.9) into the equation (4.2) to generate new spectral graph regularization technique. Significance 6. We wish to emphasize that our novelty lies in addressing the open problem of obtaining a rigorous interpretation and extension of spectral regularization. To the best of our knowledge this is the first work that provides a more formal and intuitive understanding of the origin of spectral regularization. We have shown how the regularization naturally arises as a consequence of high-dimensional discrete data smoothing. In addition, this point of view allows us to select appropriate regularization parameter τ with no additional computation. 5 Application to Graph Regression We study the problem of graph regression as an interesting application of the proposed nonparametric spectral analysis algorithm. Unlike traditional regression settings, here, one is given n observations of the response and predictor variables over the graph. The goal is to estimate the regression function by properly taking into account the underlying graphstructured information along with the set of covariates. Meuse Data Modeling. We apply our frequency domain graph analysis to address the spatial prediction problem. Fig 2 describes the Meuse data set, a well known geostatistical dataset. There is a considerable spatial pattern one can see from Fig 2. We seek to estimate a smooth regression function of the dependent variable Y (zinc concentration in the soil) via generalized spectral regression that can exploit this spatial dependency. The graph was formed according to the geographic distance between points based on the spatial locations of the observations. We convert spatial data into signal supported on the graph by connecting two vertices if the distance between two stations is smaller than a given coverage radius. The maximum of the first nearest neighbor distances is used as a coverage radius to ensure at least 19 Zinc concentrations (ppm) Flooding frequency classes Distance to river Soil type classes 1000 ● ● ● 1800 ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 1600 1400 1200 1000 800 600 400 ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● 200 ● ● ● ● ● ● ● ● ● ● ● 1 2 3 ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 800 600 400 200 ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Figure 2: The Meuse dataset consists of n = 155 observations taken on a support of 15 × 15 m from the top 0−20 cm of alluvial soils in a 5×2 km part of the right bank of the floodplain of the the river Meuse, near Stein in Limburg Province (NL). The dependent variable Y is the zinc concentration in the soil (in mg kg−1 ), shown in the leftmost figure. The other three variables, flooding frequency class (1 = once in two years; 2 = once in ten years; 3 = one in 50 years), distance to river Meuse (in metres), and soil type (1= light sandy clay; 2 = heavy sandy clay; 3 =silty light clay), are explanatory variables. one neighbor for each node. Fig 3(C) shows the sizes of neighbours for each node ranging from 1 to 22. Three nodes (# 82, 148, and 155) have only 1 neighbour; additionally one can see a very weakly connected small cluster of three nodes, which is completely detached from the bulk of the other nodes. The reason behind this heterogeneous degree distribution (as shown in Fig 3) is the irregular spatial pattern of the Meuse data. We model the relationship between Y and spatial graph topology by incorporating nonparametrically learned spectral representation basis. Thus, we expand Y in the eigenbasis of C and the covariates for the purpose of smoothing, which effortlessly integrates the tools from harmonic analysis on graphs and conventional regression analysis. The model (5.1) described in the following algorithm simultaneously promotes spatial smoothness and sparsity. Algorithm 2. Nonparametric Spectral Graph Regression Step 1. Input: We observe {yi ; xi1 , . . . , xip } at vertex i of the graph G = (V, A) with size |V | = n. The regularization parameters τ . −1/2 Step 2. Construct τ -regularized block-pulse shape functions ηj;τ = p̂j;τ I(uj−1 < u ≤ uj ) for j = 1, . . . , n. Step 3. Compute the smoothed G-Matrix with respect to trial bases {ηk;τ }1≤k≤n Z1 D E Mτ [j, k; η, G] = ηj;τ , (Cn − 1)ηk;τ for j, k = 1, . . . , n. L2 [0,1] 0 20 1 2 3 ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●●● ● ● ●●● ●●● ●● ●● ●●●●● ● ● ● ●● ● ● ● ● ●● ●● ●●● ● ● ● ● ●●● ● ● ●● ●● ● ● ●● ● ● ● ● ● 102 101 69 103 108 137 94 154 111 68 136 112 113 104 67131 85 114 135 86 115 107 65 116 64 63 97 142 143 96 100 98 99 74 76138 140 71 77 91 152 70 72 87 88 75 139 81 73 80 89 153 79 78 90 83 66 95 144 141 145 151 149 150 146 15 110 147 93 92 148 105 106 51 61 Frequency 62 117 50 12260 121 49 128 134 11948 127 132 126 47 44 125 12358 55 54 59 53 46 124 43 42 52 45 40 41 20 13 16 14 8 17 9 129 18 15 84 130 12 133 11 10 29 24 28 27 26 30 25 19 21 22 23 33 32 155 1 2 39 38 37 36 35 34 3 7 4 5 0 57 56 5 120 10 109 6 5 31 118 10 15 20 degree of the spatial Meuse data graph 82 Figure 3: From spatial to graph representation of the Meuse river data set. For each node we observe {yi ; x1i , x2i , x3i }ni=1 . We address the problem of approximating the regression function by simultaneously incorporating the effect of explanatory variables X and the underlying spatial graph dependency. Step 4. Construct smooth graph Fourier basis φbk;τ (u) = n X ujk ηj;τ , for k = 1, . . . , n − 1, j=1 P T where M = U ΛU T = k uk µk uk , and uij are the elements of the singular vector U =   (u1 , . . . , un ). Construct spectral basis matrix Φ = φb1;τ , . . . , φbk;τ ∈ Rn×k for the graph G.   Step 5. Construct combined graph regressor matrix XG = Φ; X , where X = [X1 , . . . Xp ] ∈ Rn×p is the matrix of predictor variables. Step 6. Solve for βG = (βΦ , βX )T βbG = argmin ky − XG βG k22 + λkβG k1 . (5.1) βG ∈Rk+p Algorithm 2 extends traditional regression to data sets represented over a graph. The proposed frequency domain smoothing algorithm efficiently captures the spatial graph topology via the spectral coefficients βbΦ ∈ Rk and can be interpreted as covariate-adjusted discrete graph Fourier transform of the response variable Y . The `1 sparsity penalty automatically selects the coefficients with largest magnitudes thus provides compression. The following table shows that incorporating the spatial correlation in the baseline unstructured regression model using spectral orthogonal basis functions (which are estimated from the spatial graph with k = 25) boosts the model fitting from 62.78% to 80.47%, which is an improvement of approximately 18%. 21 X e0 + X Φ e Iτ =1 + X Φ e Iτ =.5 + X Φ e Iτ =.28 + X Φ e II Φ τ =1 + X e II Φ τ =.5 + X e II Φ τ =.28 + X 62.78 74.80 78.16 80.47 80.43 80.37 80.45 80.43 e 0, Φ e I and Φ e II are the graph-adaptive piecewise constant orthogonal basis functions Here Φ τ τ derived respectively from the ordinary, Type-I regularized, and Type-II regularized Laplacian matrix. Using other forms of regularization the performance does not change much, and thus we do not show it here. Our spectral method can also be interpreted as a kernel smoother, where the spatial dependency is captured by the discrete GraField C . We finally conclude that extension from traditional regression to graph-structured spectral regression significantly improves the model accuracy. 6 Concluding Remarks What is the “common core” behind all existing spectral graph techniques? Despite half a century of research, it remains one of the most formidable open issues, if not the core problem in modern spectral graph theory. The need for a unified theory become particularly urgent and pressing in the era of “algorithm deluge” in order to systematize the practice of graph data analysis. As an attempt to shed some light on this previously unasked question, I have introduced a framework for statistical reasoning that appears to offer a complete and autonomous description (totally free from the classical combinatorial or algorithmic linear algebra-based languages) with the intention of leading the reader to a broad understanding of how different techniques interrelate. The prescribed approach brings a fresh perspective by appropriately transforming the spectral problem into a nonparametric approximation and smoothing problem to arrive at new algorithms, as well as both practical and theoretical results. It was a great surprise for me to be able to deduce existing techniques from some underlying basic principles in a self-consistent way. At the end, there is always the hope that a comprehensive understanding gained through unification will inspire new tools, to attack some of the important open problems in this area. Acknowledgments: The author benefited greatly from many fruitful discussions and exchanges of ideas he had at the John W. Tukey 100th Birthday Celebration meeting, Princeton University September 18, 2015. The author is particularly grateful to Professor Ronald Coifman for suggesting the potential connection between our formulation and Diffusion map (random walk on graph). We also thank Isaac Pesenson for helpful questions and discussions. References Amini, A. A., Chen, A., Bickel, P. J., Levina, E. (2013). Pseudo-likelihood methods for community detection in large sparse networks. The Annals of Statistics, 41 2097–2122. 22 Belkin, M. and Niyogi, P. (2001). Laplacian eigenmaps and spectral techniques for embedding and clustering. NIPS, 14 585–591. Bishop, Y. M., Fienberg, S. E. and Holland, P. W. (2007). Discrete multivariate analysis: theory and practice. Springer Science & Business Media. Brin, S. and Page, L. (1999). Reprint of: The anatomy of a large-scale hypertextual web search engine. Computer networks, 56 3825–3833. Chaudhuri, K., Graham, F. C. and Tsiatas, A. (2012). Spectral clustering of graphs with general degrees in the extended planted partition model. Journal of Machine Learning Research Workshop and Conference Proceedings, 35 1–23. Chung, F. R. (1997). Spectral graph theory, vol. 92. American Mathematical Soc. Coifman, R. R. and Lafon, S. (2006). Diffusion maps. Applied and computational harmonic analysis, 21 5–30. Coifman, R. R., Lafon, S., Lee, A. B., Maggioni, M., Nadler, B., Warner, F. and Zucker, S. W. (2005). Geometric diffusions as a tool for harmonic analysis and structure definition of data: Diffusion maps. Proceedings of the National Academy of Sciences of the United States of America, 102 7426–7431. Davis, E. and Sethuraman, S. (2016). Consistency of modularity clustering on random geometric graphs. arXiv preprint arXiv:1604.03993. Fiedler, M. (1973). Algebraic connectivity of graphs. Czechoslovak Mathematical Journal, 23 298–305. Fienberg, S. E. and Holland, P. W. (1973). Simultaneous estimation of multinomial cell probabilities. Journal of the American Statistical Association, 68 683–691. Gale, W. and Church, K. (1994). What is wrong with adding one. Corpus-based research into language, 1 189–198. Galerkin, B. (1915). Series development for some cases of equilibrium of plates and beams (in Russian). Wjestnik Ingenerow Petrograd, 19 897–908. Good, I. J. (1953). The population frequencies of species and the estimation of population parameters. Biometrika, 40 237–264. Hoeffding, W. (1940). Massstabinvariante korrelationstheorie. Schriften des Mathematischen Seminars und des Instituts für Angewandte Mathematik der Universität Berlin, 5 179–233. Joseph, A. and Yu, B. (2016). Impact of regularization on spectral clustering. Ann. Statist., 44 1765–1791. 23 Laplace, P. S. (1951). A philosophical essay on probabilities, translated from the 6th French edition by Frederick Wilson Truscott and Frederick Lincoln Emory. Dover Publications (New York, 1951). Le, C. M., Levina, E. and Vershynin, R. (2015). Sparse random graphs: regularization and concentration of the laplacian. arXiv:1502.03049. Loève, M. (1955). Probability Theory; Foundations, Random Sequences. New York: D. Van Nostrand Company. Lovász, L. (1993). Random walks on graphs. Combinatorics, Paul erdos is eighty, 2 1–46. Lovász, L. and Szegedy, B. (2006). Limits of dense graph sequences. Journal of Combinatorial Theory, Series B, 96 933–957. Newman, M. E. (2006). Finding community structure in networks using the eigenvectors of matrices. Physical review E, 74 036104. Orlitsky, A., Santhanam, N. P. and Zhang, J. (2003). Always good turing: Asymptotically optimal probability estimation. Science, 302 427–431. Parzen, E. (1979). Nonparametric statistical data modeling (with discussion). Journal of the American Statistical Association, 74 105–131. Perks, W. (1947). Some observations on inverse probability including a new indifference rule. Journal of the Institute of Actuaries, 73 285–334. Qin, T. and Rohe, K. (2013). Regularized spectral clustering under the degree-corrected stochastic blockmodel. In Advances in Neural Information Processing Systems. 3120–3128. Rohe, K., Chatterjee, S. and Yu, B. (2011). Spectral clustering and the highdimensional stochastic blockmodel. The Annals of Statistics 1878–1915. Sarkar, P., Bickel, P. J. (2015). Role of normalization in spectral clustering for stochastic blockmodels. The Annals of Statistics, 43 962–990. Schmidt, E. (1907). Zur Theorie der linearen und nicht linearen Integralgleichungen Zweite Abhandlung. Mathematische Annalen, 64 433–476. Vigna, S. (2005). Trurank: taking pagerank to the limit. 14th international conference on World Wide Web 976–977. Von Luxburg, U., Belkin, M. and Bousquet, O. (2008). Consistency of spectral clustering. The Annals of Statistics 555–586. Witten, I. H. and Bell, T. (1991). The zero-frequency problem: estimating the probabilities of novel events in adaptive text compression. Information Theory, IEEE Transactions on, 37 1085–1094. 24 Supporting Online Material Unified Statistical Theory of Spectral Graph Analysis Subhadeep Mukhopadhyay Department of Statistical Science, Temple University Philadelphia, Pennsylvania, 19122, U.S.A. [email protected] To further demonstrate the potential application of smooth spectral graph algorithms, in this supplementary section we discuss the community detection problem that seeks to divides nodes into into k groups (clusters), with larger proportion of edges inside the group (homogeneous) and comparatively sparser connections between groups to understand the large-scale structure of network. Discovering community structure is of great importance in many fields such as LSI design, parallel computing, computer vision, social networks, and image segmentation. Graph Clustering In mathematical terms, the goal is to recover the graph signals (class labels) y : V 7→ {1, 2, . . . , k} based on the connectivity pattern or the relationship between the nodes. Representation of graph in the spectral or frequency domain via the nonlinear mapping Φ : G(V, E) 7→ Rm using discrete KL basis of density matrix C as the co-ordinate is the most important learning step in the community detection. This automatically generates spectral features {φ1i , . . . , φmi }1≤i≤n for each vertex that can be used for building the distance or similarity matrix to apply k-means or hierarchical clustering methods. In our examples, we will apply k-means algorithm in the spectral domain, which seeks to minimizing the withincluster sum of squares. In practice, often the most stable spectral clustering algorithms determine k by spectral gap: k = argmaxj |λj − λj+1 | + 1. Algorithm 3. Nonparametric Spectral Graph Partitioning 1. Input: The adjacency matrix A ∈ Rn×n . Number of clusters k. The regularization parameter τ . 2. Estimate the top k − 1 spectral connectivity profile for each node {φe1i;τ , . . . , φe(k−1)i;τ } using Algorithm 2. Store it in Φ ∈ Rn×k−1 . 3. Apply k-means clustering by treating each row of Φ as a point in Rk−1 . 4. Output: The cluster assignments of n vertices of the graph C1 , . . . , Ck . S–1 In addition to graph partitioning, the spectral ensemble {λk , φk }1≤k≤m of C contain a wealth e1 (G; η) for the choice of information on the graph structure. For example, the quantity 1 − λ of {ηk } to be normalized top hat basis (3.1), is referred to as the algebraic connectivity, whose magnitude reflects how well connected the overall graph is. The kmeans clustering after spectral embedding {φej (G; η)}1≤j≤k−1 finds approximate solution to the NP-hard combinatorial optimization problem based on the normalized cut (Shi and Malik, 2000) by relaxing the discreteness constraints into one that is continuous (sometimes known as spectral relaxation). Data and Results. We investigate four well-studied real-world networks for community structure detection based on 7 variants of spectral clustering methods. Example A [Political Blog data, Adamic and Glance (2005)] The data, which contains 1222 nodes and 16, 714 edges, were collected over a period of two months preceding the U.S. Presidential Election of 2004 to study how often the political blogs refer to one another. The linking structure of the political blogosphere was constructed by identifying whether a URL present on the page of one blog references another political blog (extracted from blogrolls). Each blog was manually labeled as liberal or conservative by Adamic and Glance (2005), which we take as ground truth. The goal is to discover the community structure based on these blog citations, which will shed light on the polarization in political blogs. Table 1 shows the result of applying the spectral graph clustering algorithm on this political web-blog data. The un-regularized Laplacian performs very poorly, whereas as both typeI/II regularized versions give significantly better results. The misclassification error drops from 47.95% to 4.7% because of regularization. To better understand why regularization plays a vital role, consider the degree distribution of the web-blog network as shown in the bottom panel of Figure 2. It clearly shows the presence of a large number of lowdegree nodes, which necessitates the smoothing of high-dimensional discrete probability p1 , . . . , p1222 . Thus, we perform the kmeans clustering after projecting the graph in the Euclidean space spanned by Laplace smooth KL spectral basis {φek;τ }. Regularized spectral methods correctly identify two dense clusters: liberal and conservative blogs, which rarely links to a blog of a different political leaning, as shown in the middle panel of Fig 5. Example B [US College Football, Grivan and Newman (2002)] The American football network (with 115 vertices, 615 edges) depicts the schedule of football games between NCAA Division IA colleges during the regular season of Fall 2000. Each node represents a college team (identified by their college names) in the division, and two teams are linked if they have played each other that season. The teams were divided into 11 “conferences” containing around 8 to 12 teams each, which formed actual communities. The teams in the same conference played more often compared to the other conferences, as shown in the middle panel of Fig 5. A team played on average 7 intra- and 4 inter-conference games in the season. Inter-conference play is not uniformly distributed; teams that are geographically close to one another but belong to different conferences are more likely to play one another than teams S–2 Table 1: We report % of misclassification error. We compare following seven different Laplacian variants. K denotes the number of communities. Type-I Reg. Laplacian τ = 1/2 τ = √ N /n Type-II Reg. Laplacian τ =1 τ = 1/2 τ = √ Data K Laplacian τ =1 N /n PolBlogs 2 47.95% 4.9% 4.8% 5.4% 4.8% 4.7% 5.4% Football 11 11.3% 7.83% 6.96% 6.96% 6.96% 7.83% 7.83% MexicoPol 2 17.14% 14.2% 14.2% 14.2% 14.2% 14.2% 14.2% Adjnoun 2 13.4% 12.5% 12.5% 12.5% 12.5% 12.5% 12.5% separated by large geographic distances. As the communities are well defined, the American football network provides an excellent real-world benchmark for testing community detection algorithms. Table 1 shows the performance of spectral community detection algorithms to identify the 11 clusters in the American football network data. The regularization boosts the performance √ by 3-4%. In particular, τ = 1/2 and N /n produces the best result for Type-I regularized Laplacian, while τ = 1 exhibits the best performance for Type-II regularized Laplacian. Example C [The Political Network in Mexico, Gil-Mendieta and Schmidt (1996)] The data (with 35 vertices and 117 edges) represents the complex relationship between politicians in Mexico (including presidents and their close associates). The edge between two politicians indicates a significant tie, which can either be political, business, or friendship. A classification of the politicians according to their professional background (1 - military force, 2 civilians: they fought each other for power) is given. We use this information to compare our 7 spectral community detection algorithms. Although this is a “small” network, challenges arise from the fact that the two communities cannot be separated easily due to the presence of a substantial number of betweencommunity edges, as depicted in Figs 4 and 5. The degree-sparsity is also evident from Fig 5 (bottom-panel). Table 1 compares seven spectral graph clustering methods. Regularization yields 3% fewer misclassified nodes. Both the type-I and II regularized Laplacian methods for all the choices of τ produce the same result. Example D [Word Adjacencies, Newman (2006)] This is a adjacency network (with 112 vertices and 425 edges) of common adjectives and nouns in the novel David Copperfield by English 19th century writer Charles Dickens. The graph was constructed by Newman S–3 ● 5 13 24 ● 1 ● 2 14 30 22 ● 3 ● 6 ● 18 4 ● 7 ● 21 9 ● 23 19 10 ● 8 ● 12 17 27 34 31 28 25 35 33 20 15 26 32 16 ● 11 29 Figure 4: Mexican political network. Two different colors (golden and blue) denotes the two communities (military and civilians). (2006). Nodes represent the 60 most commonly occurring adjectives and nouns, and an edge connects any two words that appear adjacent to one another at any point in the book. Eight of the words never appear adjacent to any of the others and are excluded from the network, leaving a total of 112 vertices. The goal is to identify which words are adjectives and nouns from the given adjacency network. Note that typically adjectives occur next to nouns in English. Although it is possible for adjectives to occur next to other adjectives (e.g., “united nonparametric statistics”) or for nouns to occur next to other nouns (e.g., “machine learning”), these juxtapositions are less common. As expected, Fig 5 (middle panel) shows an approximately bipartite connection pattern among the nouns and adjectives. A degree-sparse (skewed) distribution is evident from the bottom right of Fig 5. We apply the seven spectral methods and the result is shown in Table 1. The traditional Laplacian yields a 13.4% misclassification error for this dataset. We get better performance (although the margin is not that significant) after spectral regularization via Laplace smoothing. References Adamic, L. A. and Glance, N. (2005). The political blogosphere and the 2004 us election: divided they blog. In Proceedings of the 3rd international workshop on Link discovery. ACM, 36–43. Gil-Mendieta, J. and Schmidt, S. (1996). The political network in mexico. Social Networks, 18 355–381. S–4 Frequency 20 30 10 8 6 Frequency 10 4 20 30 Frequency 40 50 40 12 60 500 400 50 100 150 200 250 degree of the web−blog network 300 350 0 0 2 10 0 Frequency 300 200 100 0 0 7 8 9 10 11 12 13 degree of the US college football network 5 10 15 degree of the political network in Mexico 0 10 20 30 40 50 degree of the word adjacencies network Figure 5: The columns denote the 4 datasets corresponding to the political blog, US college football, politicians in Mexico, and word adjacencies networks. The first two rows display the un-ordered and ordered adjacency matrix, and the final row depicts the degree distributions. Grivan, M. and Newman, M. E. J. (2002). Community structure in social and biological networks. Proc. Natl. Acad. Sci 7821–7826. Newman, M. E. (2006). Finding community structure in networks using the eigenvectors of matrices. Physical review E, 74 036104. Shi, J. and Malik, J. (2000). Normalized cuts and image segmentation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22 888–905. S–5
10math.ST
Beyond Good and Evil Formalizing the Security Guarantees of Compartmentalizing Compilation Yannis Juglaret1,2 arXiv:1602.04503v6 [cs.CR] 15 Apr 2017 1 Inria Paris 2 Cătălin Hriţcu1 Arthur Azevedo de Amorim4 Université Paris Diderot (Paris 7) Abstract—Compartmentalization is good security-engineering practice. By breaking a large software system into mutually distrustful components that run with minimal privileges, restricting their interactions to conform to well-defined interfaces, we can limit the damage caused by low-level attacks such as control-flow hijacking. When used to defend against such attacks, compartmentalization is often implemented cooperatively by a compiler and a low-level compartmentalization mechanism. However, the formal guarantees provided by such compartmentalizing compilation have seen surprisingly little investigation. We propose a new security property, secure compartmentalizing compilation (SCC), that formally characterizes the guarantees provided by compartmentalizing compilation and clarifies its attacker model. We reconstruct our property by starting from the well-established notion of fully abstract compilation, then identifying and lifting three important limitations that make standard full abstraction unsuitable for compartmentalization. The connection to full abstraction allows us to prove SCC by adapting established proof techniques; we illustrate this with a compiler from a simple unsafe imperative language with procedures to a compartmentalized abstract machine. 1 Introduction Computer systems are distressingly insecure. Visiting a website, opening an email, or serving a client request is often all it takes to be subjected to a control-hijacking attack. These devastating low-level attacks typically exploit memory-safety vulnerabilities such as buffer overflows, use-after-frees, or double frees, which are abundant in large software systems. Various techniques have been proposed for guaranteeing memory safety [12], [20], [25], [44], [51]–[55], but the challenges of efficiency [54], [55], precision [62], scalability [74], backwards compatibility [16], and effective deployment [12], [20], [24], [25], [44], [51]–[53] have hampered their widespread adoption. Meanwhile, new mitigation techniques have been proposed to deal with the most onerous consequences of memory unsafety—for instance, techniques aimed at preventing control-flow hijacking even in unsafe settings [2], [3], [15], [26], [68]. Unfortunately, these defenses often underestimate the power of the attackers they may face [18], [26], [28], [29], [32], [67]—if, indeed, they have any clear model at all of what they are protecting against. Clarifying the precise security properties and attacker models of practical mitigation techniques is thus an important research problem—and a challenging one, since a good model has to capture not only the defense mechanism itself but also the essential features of the complex world in which low-level attacks occur. 3 Boris Eng1,3 Université Paris 8 4 Benjamin C. Pierce4 University of Pennsylvania In this paper we focus on the use of compartmentalization [13], [33], [70] as a strong, practical defense mechanism against low-level attacks exploiting memory unsafety. The key idea is to break up a large software system into mutually distrustful components that run with minimal privileges and can interact only via well-defined interfaces. This is not only good software engineering; it also gives strong security benefits. In particular, control-hijacking attacks can compromise only specific components with exploitable vulnerabilities, and thus only give the attacker direct control over the privileges held by these components. Also, because compartmentalization can be enforced by more coarse-grained mechanisms, acceptable efficiency and backwards compatibility are generally easier to achieve than for techniques enforcing full-blown memory safety. When used as a defense mechanism against memory unsafety, compartmentalization is often achieved via cooperation between a compiler and a low-level compartmentalization mechanism [16], [33], [39], [42], [61], [70], [72]. In this paper we use compartmentalizing compilation to refer to cooperative implementations of this sort. The compiler might, for instance, insert dynamic checks and cleanup code when switching components and provide information about components and their interfaces to the low-level compartmentalizing mechanism, which generally provides at least basic isolation. Two such low-level compartmentalization technologies are already widely deployed: process-level privilege separation [13], [33], [40] (used, e.g., by OpenSSH [63] and for sandboxing plugins and tabs in modern web browsers [64]) and software fault isolation [69] (provided, e.g., by Google Native Client [71]); many more are on the drawing boards [12], [16], [34], [61], [70]. So what security guarantees does compartmentalizing compilation provide, and what, exactly, is its attacker model? A good starting point for addressing these questions is the familiar notion of fully abstract compilation [1], [4]–[6], [8], [10], [11], [31], [35], [56], [58]. A fully abstract compiler toolchain (compiler, linker, loader, and underlying architecture with its security mechanisms) protects the interactions between a compiled program and its low-level environment, allowing programmers to reason soundly about the behavior of their code when it is placed in an arbitrary target-language context, by considering only its behavior in arbitrary source-language contexts. In particular, if we link the code produced by such a compiler against arbitrary low-level libraries—perhaps compiled from an unsafe language or even written directly in assembly—the resulting execution will not be any less secure than if we had restricted ourselves to library code written in the same high-level language as the calling program. (Why is it useful to restrict attention to attackers written in a high-level language? First, because reasoning about what attackers might do—in particular, what privileges they might exercise—is easier in a high-level language. And second, because by phrasing the property in terms of low- and high-level programs rather than directly in terms of attacker behaviors, specific notions of privilege, etc., we can re-use the same property for many different languages.) Since full abstraction works by partitioning the world into a program and its context, one might expect it to apply to compartmentalized programs as well: some set of components that are assumed to be subject to control-hijacking attacks could be grouped into the “low-level context,” while some others that are assumed to be immune to such attacks would constitute the “high-level program.” Full abstraction would then allow us to reason about the possible behaviors of the whole system using the simplifying assumption that the attacker’s injected behavior for the compromised components can be expressed in the same high-level language as the good components. Sadly, this intuition does not withstand closer examination. Full abstraction, as previously formulated in the literature, suffers from three important limitations that make it unsuitable for characterizing the security guarantees of compartmentalizing compilation. First, fully abstract compilation assumes that the source language itself is secure, so that it makes sense to define target-level security with respect to the semantics of the source language. However, compartmentalization is often applied to languages like C and C++, which do not have a secure semantics—the C and C++ standards leave most of the security burden to the programmer by calling out a large number of undefined behaviors, including memory-safety violations, that are assumed never to occur. Valid compilers for these languages are allowed to generate code that does literally anything—in particular, anything a remote attacker may want—when applied to inputs that lead to undefined behavior. There is no way to tell, statically, whether or not a program may have undefined behavior, and compilers do not check for this situation. (Indeed, not only do they not check: they aggressively exploit the assumption of no undefined behaviors to produce the fastest possible code for well-defined programs, often leading to easily exploitable behaviors when this assumption is broken.) The point of compartmentalizing compilation is to ensure that the potential effects of undefined behavior are limited to the compromise of the component in which it occurs: other components can only be influenced by compromised ones via controlled interactions respecting specified interfaces. To characterize the security of compartmentalizing compilation, we therefore need a formal property that can meaningfully accommodate source languages in which components can be compromised via undefined behavior. Full abstraction as conventionally formulated does not fit the bill, because, in order to preserve equivalences of programs with undefined behavior, compilers must abandon the aggressive optimizations that are the reason for allowing undefined behaviors in the first place. To see this, consider C expressions buf[42] and buf[43] that read at different positions outside the bounds of a buffer buf. These two programs are equivalent at the source level: they both lead to arbitrary behavior. However, a real C compiler would never compile these expressions to equivalent code, since this would require runtime checks that many C programmers would deem too expensive. Second, fully abstract compilation makes an open world assumption about the attacker context. While the context is normally required to be compatible with the protected program, for instance by respecting the program’s typed interface, the structure and privilege of the context are unrestricted (the full abstraction definition quantifies over arbitrary low-level contexts). This comes in direct contradiction with the idea of least privilege, which is crucial to compartmentalization, and which relies on the fact that even if a component is compromised, it does not immediately get more privilege. Compromised components cannot change the basic rules of the compartmentalization game. For instance, in this paper we consider a static compartmentalization setting, in which the breakup of the application into components is fixed in advance, as are the privileges of each component. A security property suitable for this setting needs to be restricted to contexts that conform to a fixed breakup into components with static privileges.1 Third, because the definition of full abstraction involves applying the compiler only to a program and not to the untrusted context in which it runs, a fully abstract compiler may choose to achieve its protection goals by introducing just a single barrier around the trusted part to protect it from the untrusted part [8], [45], [57], [58], [60]. Such compilation schemes force the programmer to commit in advance to a single compromise scenario, i.e., to a single static split of their application into a “good” trusted program and an “evil” untrusted context from which this program has to be protected. This is not realistic in the setting of compartmentalizing compilation, where we generally cannot predict which components may be vulnerable to compromise by control hijacking attacks, and instead must simultaneously guard against multiple compromise scenarios. Compartmentalizing compilers allow us to build more secure applications that go beyond the blunt trusted/untrusted distinction made by some fully abstract compilers. To describe their guarantees accurately, we thus need a new property that captures the protection obtained by breaking up applications into multiple mutually distrustful components, each running with least privilege, and that permits reasoning about multiple scenarios in which different subsets of these components are 1 In a setting where new components can be dynamically created and privileges can be exchanged dynamically between components, the details of this story will be more complicated; still, we expect any secure compartmentalizing compilation property to limit the ability of low-level attacker contexts to “forge” the privileges of existing components. 2 compromised. Our main contribution is the definition of such a property, which we call secure compartmentalizing compilation (SCC) (§2). While similar in many respects to full abstraction, our property escapes the three limitations discussed above. First, it applies to unsafe source languages with undefined behaviors by introducing a new notion of fully defined sets of components. While undefined behavior is a property of whole programs, full definedness is compositional. Intuitively, a set of components is fully defined if they cannot be blamed [30] for undefined behavior in any context satisfying fixed interfaces. Second, SCC makes a closed-world assumption about compromised components, enforcing the basic rules of the compartmentalization game like the fixed division into components and the fixed privileges of each component, including for instance with which other components it is allowed to interact. Third, SCC ensures protection for multiple, mutually distrustful components; it does not assume we know in advance which components are going to be compromised (i.e., in the C setting, which components may contain exploitable undefined behaviors), but instead explicitly quantifies over all possible compromise scenarios. Our second contribution is relating SCC to standard formulations of full abstraction both intuitively and formally (§3). We start from full abstraction and show how the three limitations that make it unsuitable in our setting can be lifted one by one. This results in two properties we call structured full abstraction and separate compilation, which can be combined and instantiated to obtain SCC. While our property directly captures the intuition of our attacker model, reducing it to structured full abstraction is a useful technical step, since the latter is easier to establish for specific examples using a variant of existing proof techniques. Moreover, arriving at the same property by two different paths increases our confidence that we found the right property. Our third contribution is establishing the SCC property for a simple unsafe imperative language with components interacting via procedure calls and returns, compiling to an abstract machine with protected compartments (§4). Despite the simplicity of the setting, this result gives useful insights. First, the source language and compilation strategy enable interesting attacks on components with potential buffer overflows, similar to those found in C. Second, we illustrate how SCC can be achieved by the cooperation of a compiler (cleaning and restoring registers) and a low-level protection mechanism (totally isolating compartments and providing a secure interaction mechanism using calls and returns). Third, our SCC proof adapts a standard technique called trace semantics [37], [59], via the reduction to structured full abstraction. The closed-world assumption about the context made by structured full abstraction requires some nontrivial changes to the trace semantics proof technique. The remainder of the paper describes each of our three contributions in detail (§2–§4) and closes by discussing related work (§5) and future directions (§6). The supplemental materials associated with this paper includes: (a) a Coq proof for Theorem 3.4; (b) technical details and proofs for the SCC instance from §4 (while most of these proofs are done only on paper, the main structured full abstraction result, Theorem 4.7, is also proved in Coq); and (c) a trace mapping algorithm in OCaml using property-based testing to support Assumption 4.9. These materials can be found at: https://github.com/secure-compilation/beyond-good-and-evil 2 Secure Compartmentalizing Compilation We start with an intuitive explanation of compartmentalizing compilation, its attacker model, and its security benefits, and then introduce secure compartmentalizing compilation (SCC). We consider compartmentalization mechanisms provided by the compiler and runtime system for an unsafe programming language with some notion of components.2 In §4 we will present a simple example in detail, but for the present discussion it suffices to think informally of C or C++ enriched with some compartmentalization mechanism. This mechanism allows security-conscious developers to break large applications into mutually distrustful components running with least privilege and interacting only via well-defined interfaces. We assume that the interface of each component also gives a precise description of its privilege. Our notion of interface here is quite generic: interfaces might include any information that can be dynamically enforced on components, including module signatures, lists of allowed system calls, or more detailed access control specifications describing legal parameters to inter-component calls (e.g., ACLs for files). We assume that the division of the application into components and the interfaces of those components are statically determined and fixed throughout execution. In §4, we instantiate this picture with a rather simple and rigid notion of components and interfaces, where components don’t directly share any state and where the only thing one component can do to another one is to call the procedures allowed by the interfaces of both components. We do not fix a specific compartmentalizing compilation mechanism; we just assume that whatever mechanism is chosen can guarantee that, even if one component is compromised (e.g., by a control-hijacking attack), it will still be forced to adhere to its specified interface in its interactions with other components. What a compromised component can do in this model is use its access to other components, as allowed by its interface, to trick them into misusing their own privileges (confused deputy attacks) and/or attempt to mount further control-hijacking attacks on other components by communicating with them via defined interfaces. We do not assume we know in advance which components will be compromised: the compartmentalizing compilation mechanism has to protect each component from all the others. This allows developers to reason informally about various compromise scenarios and their impact on the security of 2 We use the term “runtime system” loosely to include operating system mechanisms [13], [33], [40], [63], [64] and/or hardware protections [12], [34], [61], [70] that may be used by the compiler. 3 the whole application [33], relying on conditional reasoning of the form: “If these components get taken over and these do not, then this might happen (while that cannot), whereas if these other components get taken over, then this other thing might happen...” If the practical consequences of some plausible compromise scenario are too serious, developers can further reduce or separate privilege by narrowing interfaces or splitting components, or they can make components more defensive by dynamically validating the inputs they receive from other components. For instance, developers of a compartmentalized web browser [64] might reason about situations in which some subset of plugins and tabs gets compromised and how this might impact the browser kernel and the remaining plugins and tabs. A possible outcome of this exercise might be noticing that, if the browser kernel itself is compromised, then all bets are off for all the components and the application as a whole, so the developers should put extra energy in defending the kernel against attacks from compromised plugins or tabs. On the other hand, if interfaces between tabs and plugins are appropriately limited, then compromise of one should not disrupt the rest. Our goal is to articulate a security property that supports reasoning about multiple compromise scenarios and clarifies the associated attacker model. At the same time, our property is intended to serve as a benchmark for developers of compartmentalizing compilation mechanisms who want to argue formally that their mechanisms are secure. In the rest of this section we explain the technical ideas behind the SCC property and then give its formal definition. An application is a set Cs of components, with corresponding interfaces CIs. These components are separately compiled (individually compiling each component in the set Cs is written Cs↓) and linked together (written ./(Cs↓)) to form an executable binary for the application. SCC quantifies over all compromise scenarios—i.e., over all ways of partitioning the components into a set of compromised ones and a set of uncompromised ones. In order to ensure that the set of compromised components doesn’t expand during evaluation, we require that the uncompromised components be fully defined with respect to the interfaces of the compromised components. That is, the uncompromised components must not exhibit undefined behaviors even if we replace the compromised components with arbitrary code (obeying the same interfaces). The full definedness condition is a necessary part of the static compromise model considered in this paper. Intuitively, if an uncompromised component can be tricked into an undefined behavior by interface-respecting communication with other components, then we need to conservatively assume that the already compromised components will succeed in compromising this component dynamically, so it belongs in the set of compromised components from the start. This static model is much simpler to reason about than a model of dynamic compromise, in which one could perhaps provide guarantees to not-fully-defined components up to the point at which they exhibit undefined behavior, but which could, however, invalidate standard compiler optimizations that involve code motion. Moreover, it seems highly nontrivial to define our property for such a more complex model. Figure 1 illustrates one way to partition five components C1 , . . . , C5 with interfaces i1 , . . . , i5 , representing the scenario where C2 , C4 , and C5 are compromised and C1 and C3 are not. In order for this compromise scenario to be considered by our property, C1 and C3 need to be fully defined with respect to interfaces i2 , i4 , and i5 , which means C1 and C3 cannot cause undefined behaviors when linked with any components B2 , B4 , B5 satisfying interfaces i2 , i4 , i5 . Formally, full definedness is a language-specific parameter to our definition of SCC, just as the program equivalence relations are language-specific parameters to both SCC and vanilla full abstraction. For instance, in the simple imperative language in §4, we will say that components Cs are fully defined with respect to a set of adversary interfaces BIs if, for all components Bs satisfying BIs, the complete program ./(Cs ↓∪ Bs ↓) cannot reduce to a stuck non-final state (corresponding to undefined behavior) where the currently executing component is one of the ones in Cs (i.e., no component in Cs can be “blamed” [30] for undefined behavior). Full definedness might well be defined differently for another language; for instance, in a concurrent language undefined behaviors cannot be as easily modeled by stuckness since normally other threads can proceed even if one of the threads is stuck. One last thing to note is that full definedness of a set of components is generally a much weaker property than the full definedness of each individual component in the set. Since the interfaces of the adversary components BIs can (and in §4 do) restrict not only the operations they export but also the operations they import from Cs, the components in the set can export dangerous operations just to other components in the set; the components actually in the set might then all use these operations properly, whereas arbitrary components with the same interfaces could abuse them to trigger undefined behaviors. SCC states that, in all such compromise scenarios, the compiled compromised components must not be able to cause more harm to the compiled uncompromised components via low-level attacks than can be caused by some high-level components written in the source language. Basically this means that any low-level attack can be mapped back to a highlevel attack by compromised components satisfying the given interfaces. The property additionally ensures that the high-level components produced by this “mapping back” are fully defined with respect to the interfaces of the uncompromised components. So with SCC, instead of having to reason about the lowlevel consequences of undefined behavior in the compromised components, we can reason in the source language and simply replace the compromised components by equivalent ones that are guaranteed to cause no undefined behavior. Formally, SCC is stated by quantifying over multiple distinguishability games, one for each compromise scenario, where the individual games are reminiscent of full abstraction. The 4 produce different observable outcomes when executed. For this compromise scenario, SCC specifies that, if compiled compromised components C2↓, C4↓, C5↓ can distinguish the C1 ↓, C3 ↓ and D1 ↓, D3 ↓ variants at the low level, then there must exist some (fully defined) components A2 , A4 , A5 that distinguish C1 , C3 and D1 , D3 at the high level. With all this in mind, the SCC property is formally expressed as follows: Compartmentalized application i1 i2 i3 i4 i5 C1 C2 C3 C4 C5 i4 i5 Any partition i1 C1 i2 i3 C2 C3 ↯ C4 ↯ Definition 2.1 (SCC). • For any complete compartmentalized program and for all ways of partitioning this program into a set of uncompromised components Cs and their interfaces CIs, and a set of compromised components Bs and their interfaces BIs, so that Cs is fully defined with respect to BIs, and • for all ways of replacing the uncompromised components with components Ds that satisfy the same interfaces CIs and are fully defined with respect to BIs, • if ./(Cs↓∪ Bs↓) 6∼L ./(Ds↓∪ Bs↓), • then there exist components As satisfying interfaces BIs and fully defined with respect to CIs such that ./(Cs ∪ As) 6∼H ./(Ds ∪ As). C5 ↯ With one condition: C1 and C3 fully defined i.e. no B2, B4, and B5 can compromise C1 and C3 by tricking them into triggering undefined behavior i1 C1 i2 i3 B2 C3 ↯ i4 B4 ↯ Figure 1. Compromise scenarios i5 B5 ↯ i1 i2 i3 i4 i5 C1 A2 C3 A4 A5 i3 i4 i5 D3 A4 A5 ≁ As suggested before, our property applies to any fully defined sets of components Cs and Ds (which cannot be dynamically compromised by some components with interfaces BIs). We conjecture that this full definedness precondition is strictly required in the static corruption model we are assuming. It is worth noting that we are not proposing any method for proving that programs are fully defined; this comes with the territory when dealing with C-like languages. What we are after is bringing formal foundations to conditional reasoning of the form “if these Cs are fully defined and the remaining components Bs get compromised, then...” Note that the Bs in our SCC definition need not be fully defined—i.e., the property allows the compromised components to contain undefined behaviors (this may well be why they are compromised!) and promises that, even if they do, we can find some other components As that are able to distinguish between Cs and Ds in the source language without causing any undefined behaviors. Indeed, for those compromise scenarios in which Bs are already fully defined, our SCC property trivially follows from correct compilation (Assumption 4.2) since in that case we can always pick As = Bs. This generic property is parameterized over a source and a target language with a notion of component for each, sourceand target-level notions of linking sets of components (./), source- and target-level notions of distinguishability (6∼), a compiler mapping source components to target components (↓), a source-level notion of interface and an interface satisfaction relation (lifted to sets of components and interfaces), and a notion of a set of components Cs being fully defined with respect to a set of adversary interfaces BIs. H i1 i2 D1 A2 ∀ low-level attack from compromised C2↓, C4↓, C5↓ ∃ high-level attack from some fully defined A2, A4, A5 i1 C1↓ i1 D1↓ i2 i3 C2↓ C3↓ ↯ i2 C2↓ ↯ i4 ≁ L i3 D3↓ C4↓ i5 C5↓ ↯ ↯ ↯ ↯ i4 C4↓ i5 C5↓ Figure 2. SCC distinguishability game, for one of the compromise scenarios goal of the attacker in each game is to distinguish between two variants of the uncompromised components. Figure 2 illustrates these two variants as C1 , C3 and D1 , D3 , where we use 6∼H and 6∼L to indicate that the behaviors of two (highor low-level) complete programs are distinguishable, i.e., they 3 From Full Abstraction to SCC §2 presented SCC by directly characterizing the attacker model against which it defends. In this section we step back and show 5 how SCC can instead be obtained by starting from the wellestablished notion of full abstraction and removing each of the three limitations that make it unsuitable in our setting. This results in two properties, structured full abstraction and separate compilation, which we then combine and instantiate to obtain SCC. This reduction is not only theoretically interesting, but also practically useful, since structured full abstraction can more easily be proved by adapting existing proof techniques, as we will see in §4. To adapt full abstraction to a source language with undefined behaviors, we need to restrict attention only to defined complete programs in the source language. And even with this restriction, defining full abstraction still requires a little care. For instance, the following variant is wrong (formally, defined is another parameter to this property): (∀A. A[P ] and A[Q] defined ⇒ A[P ] ∼H A[Q]) (∀a. a[P↓] ∼L a[Q↓]) ⇒ Any P and Q that both trigger undefined behavior as soon as they get control would be considered equivalent in the highlevel language because there is no context that can make these programs defined while observing some difference between them. All such programs would thus need to be equivalent at the low level, which is clearly not the case (since their nondeterminism can be resolved in different ways by the compiler). The problem here is that if P and Q trigger undefined behavior then the context often cannot make up for that and make the program defined in order be able to cause an observation that distinguishes P and Q. Full abstraction A fully abstract compiler protects compiled programs from their interaction with unsafe low-level code and thus allows sound reasoning about security (and other aspects of program behavior) in terms of the source language. Fully abstract compilation [1] intuitively states that no lowlevel attacker can do more harm to a compiled program than some program in the source language already could. This strong property requires enforcing all high-level language abstractions against arbitrary low-level attackers. Formally, full abstraction is phrased as a distinguishability game requiring that low-level attackers have no more distinguishing power than high-level ones. Solution 1: Full abstraction for unsafe languages The responsibility of keeping A[P ] defined should be thus shared between A and P . For this we assume a compositional notion of fully defined behavior for programs and contexts as two parameters to Definition 3.2 below. We require that these parameters satisfy the following properties: (1) a program is fully defined if it does not cause undefined behavior in any fully defined context, and (2) a context is fully defined if it does not cause undefined behavior when we plug any fully defined program into it. Note that properties (1) and (2) are circular and therefore cannot be used as the definition of full definedness. For specific languages (e.g., the one in §4) we can break this circularity and define full definedness using blame [30]: intuitively we call a partial program fully defined when it cannot be blamed for undefined behavior in any context whatsoever. Similarly, we call a context fully defined when it cannot be blamed for undefined behavior for any program that we plug into it. We expect such a blamebased definition to satisfy the properties (1) and (2) above. Full definedness allows us to introduce a new variant of full abstraction that applies to unsafe source languages with undefined behavior: Definition 3.1. We call a compilation function (written ↓) fully abstract if, for all P and Q, (∀A. A[P ] ∼H A[Q]) ⇒ (∀a. a[P↓] ∼L a[Q↓]). Here, P and Q are partial programs, A is a high-level context whose job is to try to distinguish P from Q, and a is a lowlevel “attacker context” that tries to distinguish P↓ from Q↓. The relations ∼L and ∼H are parameters to the definition, representing behavioral equivalence at the two levels. To be useful, they should allow the context to produce an observable action every time it has control, letting it convert its knowledge into observable behaviors. For instance, a common choice for behavioral equivalence is based on termination: two deterministic programs are behaviorally equivalent if they both terminate or both diverge. When stated this way (as an implication rather than an equivalence), full abstraction is largely orthogonal to compiler correctness [43], [46]. While compiler correctness is about preserving behaviors when compiling from the source to the target, proving full abstraction requires some way to map each distinguishing context target to a sourge-level one, which goes in the opposite direction. This is easiest to see by looking at the contrapositive: Definition 3.2 (Full abstraction for unsafe languages). We call a compiler ↓ for an unsafe language fully abstract if for all fully defined partial programs P and Q ∀a. a[P↓] 6∼L a[Q↓] ⇒ ∃A. A[P ] 6∼H A[Q] (∀A. A fully defined ⇒ A[P ] ∼H A[Q]) ⇒ (∀a. a[P↓] ∼L a[Q↓]). Problem 1: Undefined behavior The first limitation of full abstraction is that it cannot realistically be applied to compiling from an unsafe language with undefined behaviors. Undefined behaviors are (arbitrarily!) nondeterministic, and no realistic compiler can preserve this nondeterminism in the target as required by full abstraction. (Removing it from the source language would negate the performance and optimization benefits that are the reason for allowing undefined behaviors in the first place.) Requiring that P , Q, and A are fully defined means that we can safely apply ∼H to A[P ] and A[Q], because neither the programs nor the context can cause undefined behavior. This property is incomparable with the original definition of full abstraction. Looking at the contrapositive, ∀P, Q fully defined. (∃a. a[P↓] 6∼L a[Q↓]) ⇒ (∃A. A fully defined ∧ A[P ] 6∼H A[Q]), 6 fully defined with respect to contexts of shape ◦s,   ∀A ∈◦ s. A fully defined wrt. programs of shape •s ⇒ A[P ] ∼H A[Q] the P, Q fully defined pre-condition makes this weaker than full abstraction, while the A fully defined post-condition makes it stronger. The post-condition greatly simplifies reasoning about programs by allowing us to replace reasoning about low-level contexts with reasoning about high-level contexts that cannot cause undefined behavior. ⇒ (∀a ∈◦ s. a[P↓] ∼L a[Q↓]). This property universally quantifies over any complete program shape s and requires that P ∈• s (read “program P has shape s”), Q ∈• s, and A ∈◦ s (“context A matches programs of shape s”). Moreover, the property only requires programs that are fully defined with respect to contexts of the right shape, and dually it only considers contexts that are fully defined with respect to programs of the right shape. One might wonder whether the P, Q fully defined precondition is too restrictive, since full definedness is a rather strong property, requiring each component to be very defensive about validating inputs it receives from others. In the static compromise model inherent to full abstraction and without additional restrictions on the program’s context, we must be conservative and assume that, if any context can cause undefined behavior in a program, it can compromise it in a way that the compiler can provide no guarantees for this program. The structured full abstraction definition below will in fact restrict the context and thus use a weaker notion of full definedness. Moreover, separate compilation will allow us to quantify over all splits of a program into a fully defined partial program and a compromised context, which also makes the presence of the full definedness pre-condition more palatable. Recovering secure compartmentalizing compilation SCC can be recovered in a natural way as an instance of structured full abstraction (Definition 3.3). For both source and target languages, we take partial programs and contexts be sets of components and context application be set union. Compilation of sets of components works pointwise. To obtain an instance of structured full abstraction we additionally take shapes to be sets of component interfaces, where each interface is marked as either compromised or uncompromised. Theorem 3.4. For any deterministic target language and any source language that is deterministic for defined programs, structured full abstraction instantiated to components as described above implies SCC. Problem 2: Open-world assumption about contexts While full abstraction normally requires the contexts to be compatible with the partial program, for instance by respecting the partial program’s typed interface, these restrictions are minimal and do not restrict the shape, size, exported interface, or privilege of the contexts in any way. This open world assumption about contexts does not fit with our compartmentalization setting, in which the breakup of the application into components is fixed in advance, as are the interfaces (and thus privileges) of all the components. In our setting, the definition of full abstraction needs to be refined to track and respect such structural constraints; otherwise a low-level context with 2 components might be mapped back to a high-level context with, say, 3 components that have completely different interfaces, and thus privileges. In particular, the high-level components’ interfaces could give them more privileges than the low-level components had, increasing their distinguishing power. Proof. Straightforward, though tedious. A machine-checked Coq proof can be found in the auxiliary materials. Problem 3: Statically known trusted/untrusted split While SCC can deal with multiple compromise scenarios, not all instances of structured full abstraction can. In general, if a compiler satisfies (structured) full abstraction, how can we know whether it can deal with multiple compromise scenarios, and what does that even mean? While we can instantiate full abstraction to a particular compromise scenario by letting the partial program P contain the uncompromised components and the low-level context a contain the compromised ones, a fully abstract compiler (together with its linker, loader, runtime etc.) might exploit this static split and introduce only one single barrier protecting the uncompromised components from the compromised ones. When presented with a different compromise scenario for the same program, the compiler could adapt and produce a different output. The source of confusion here is that a fully abstract compiler does not need to compile contexts—only programs. In fact, even the types of contexts and of partial programs might well be completely different (e.g., the types of lambda calculus contexts and terms are different; a compiler for one cannot compile the other). Even when the types do match so that we can apply the same compiler to the context, the low-level context-application operation A↓[P ↓] can freely exploit the fact that its first argument is a compiled untrusted context and its second argument is a compiled trusted program that should be protected from the context. So if we start with a complete high-level program C and look at two different compromise Solution 2: Structured full abstraction We therefore introduce a structured variant of full abstraction, in which partial programs (indicated by • below) and contexts (◦) are assigned dual parts of predefined complete program shapes. A shape might be anything, from a division into components with their interfaces (as in Theorem 3.4 below), to, e.g., the maximum size of a component’s code after compilation (which might expose component sizes in a setting where it’s too costly to hide them by padding to a fixed maximum size [61]). Definition 3.3 (Structured full abstraction). We say that a compiler ↓ for an unsafe language satisfies structured full abstraction if, for all program shapes s and partial programs P ∈• s and Q ∈• s so that P and Q are 7 scenarios C = A1 [P1 ] and C = A2 [P2 ], compiling each of the parts and combining the results using context application does not necessarily yield the same result (i.e., it could well be that A1↓[P1↓] 6= A2↓[P2↓]) or indeed even behaviorally equivalent results (i.e., it could well be that A1↓[P1↓] 6∼L A2↓[P2↓]). This means that the user of a fully abstract compiler may need to commit in advance to a single compromise scenario. This weakness significantly limits the applicability of full abstraction. After all, uncertainty about sources of vulnerability is precisely the motivation for compartmentalizing compilation: if we knew which components were safe and which were not, there would be no reason to distinguish more than two levels of privilege, and we could merge each group into a single mega-component. Even in rare cases where we are certain that some code cannot be compromised—for instance because we have proved it safe—protecting only the verified code from all the rest using a fully abstract compiler [7] is still suboptimal in terms of protection, since it provides no guarantees for all the code that is not verified. Moreover, this weakness is not hypothetical: several fully abstract compilers proposed in the literature are only capable of protecting a single trusted module from its untrusted context [8], [45], [57], [58], [60] (recently proposed extensions [61] do aim at lifting this restriction in some cases). While this setup is appropriate when all one wants to achieve is protecting trusted (e.g., verified) code from its untrusted context [7], it is not suitable for our compartmentalizing compilation setting where we do not know in advance which components will be dynamically compromised and which ones not, and thus we want to simultaneously protect against all possible compromise scenarios. can distinguish P from Q when compiled to low-level code, then there exists a fully defined context A that can distinguish them at the high-level. In a language without undefined behavior, this property would trivially follow just from (whole program) correct compilation (see Assumption 4.2 below) by picking A = B. However, it is nontrivial for a language in which context B might cause undefined behavior, since then correct compilation does not apply for B[P ] and B[Q]. In our setting, this property allows us to avoid reasoning about the implications of undefined behavior in a low-level context and instead consider just fully defined high-level contexts. It is trivial to check that our instance of structured full abstraction from Theorem 3.4 does satisfy separate compilation. It should also be easy to show that many previous fully abstract compilers [8], [45], [57], [58], [60] do not satisfy separate compilation, since they were not designed to support a setting of mutual distrust. 4 A Simple Instance of SCC In this section, we illustrate the main ideas behind SCC with a proof-of-concept compiler from an unsafe language with components to an abstract machine with compartments. We discuss key design decisions for providing secure compartmentalization, such as cleaning register values to prevent unintended communication between compartments. We also explain how a compiler optimization for component-local calls makes unwary compiled components vulnerable to realistic control-flow hijacking attacks. Finally, we show how to adapt a standard full abstraction proof technique called trace semantics [58] to prove SCC. The results in this section have been proved on paper under the assumptions explicitly mentioned in the text. In the following, an assumption denotes a property that we believe is true and rely on, but that we haven’t proved. Lemmas, theorems and corollaries denote properties that we have proved on paper, possibly relying on some of the stated assumptions. The proof of the structured full abstraction theorem (Theorem 4.7) has also been formalized in Coq assuming most other results in this section as axioms, with the exception of Theorem 4.1 and Corollary 4.3 which are also mechanized. While not constituting a complete machine-checked proof, this mechanization further validates the high-level proof structure described in this section. Solution 3: Separate compilation We can address this by requiring that the compiler toolchain have one additional property: Definition 3.5. We say that the compiler toolchain (i.e., the compiler −↓, the linker −[−], and the runtime system embodied in the low-level behavioral equivalence) satisfies separate compilation if 1) the type of contexts and programs is the same (so that the compiler can also compile contexts), and 2) (A[P ])↓ ∼L A↓[P↓] for all A and P . Requiring that context application and compilation commute (condition 2) implies that, if some complete program C can be written as both C = A1 [P1 ] and C = A2 [P2 ], then separately compiling each of these splits yields behaviorally equivalent results: (A1 [P1 ])↓ ∼L (A2 [P2 ])↓. With separate compilation, full abstraction for an unsafe language (Definition 3.2) can be instantiated as follows: ∀B. ∀P, Q fully defined. ((B[P ])↓ 6∼L (B[Q])↓) ⇒ (∃A. A fully defined ∧ A[P ] 6∼H A[Q]) Source Language We work with an unsafe source language with components, procedures, and buffers. A program in this language is a set of components communicating via procedure calls. Buffer overflows have undefined behavior and may open the door to low-level attacks after compilation. However, thanks to the cooperation between the low-level compartmentalization mechanism and the compiler, the effects of these attacks will be limited to the offending component. Components have statically checked interfaces that specify which procedures they import and export. To satisfy an interface, a component can only call external procedures One compelling reading of this is that, for all compromise scenarios (ways to break a complete program into a compromised context B and an uncompromised program P ), and for all programs Q that we can substitute for P , if the context B 8 that it imports explicitly, and it must define all procedures exported by its interface. Thus, interfaces define privileges by preventing components from calling non-imported procedures, and enable components to define private procedures (that are not exported in their interfaces). We will use the same notion of interfaces in our target abstract machine. The syntax of expressions, given below, is that of a standard imperative language with mutable buffers and mutually recursive procedures. Each component C has local procedures “C.P ” and private local buffers b. Loops are encoded using recursive calls, sequencing is encoded as a binary operation, and variables are encoded using buffers. Procedures take a single argument, which by convention is always passed in the first cell of the first buffer of the callee component. The only first class values are integers i; these can be passed across component boundaries using procedure calls and returns. Buffers and procedures are second class. e callee compartment is updated with the call argument, while information about the caller’s state when performing the call gets pushed on the call stack σ. A call completes once an empty continuation is reached and the current expression is a value, as is the case in the left-hand side of the second rule. In this case, the caller’s state is restored from the call stack, and execution resumes with the call result i as the current expression. The intermediate steps between the start and the end of a call reduce the procedure body to a value, as the last rule illustrates: Whenever e is not a value, reduction deconstructs e into a subexpression e0 and a flat evaluation context E such that e = E[e0 ], where E[e0 ] means filling the hole  in E with e0 . This expression e0 becomes the new currently reduced expression, while E gets appended on top of the current continuation K. Finally, when e is a value i and the call has not completed (K 6= []), the next step is chosen based on the flat evaluation context found on top of K, which gets removed from K. In the left-hand side of the first rule, for example, this flat evaluation context is C 0 .P 0 (), for which the next chosen step, as shown on the right-hand side, is to start a procedure call to C 0 .P 0 , using i as the call argument. Since undefined behaviors are allowed to take the machine to an arbitrary low-level state, it wouldn’t make much sense to try to make the source-language semantics describe what can happen if an undefined point is reached. We therefore model them at the source level simply as stuckness (as done for instance in CompCert [47]). In particular, reduction gets stuck when trying to access or update a buffer out of bounds, and the type safety theorem says that well-formed programs can only go wrong (get stuck) by reducing to an out-ofbounds operation on a buffer. A program is well-formed if all the used buffers are defined, all imported components are defined, all imported external procedures are public, and if the names of all components are unique. Well-formedness extends straightforwardly to configurations. ::= i | e1 ⊗ e2 | if e then e1 else e2 | b[e] | b[e1 ] := e2 | C.P (e) | exit where ⊗ ∈ {; , +, −, ×, =, ≤, . . .}. We define a standard continuation-based small-step semantics that reduces configurations cfg. It is deterministic for programs that don’t cause undefined behavior. cfg ::= (C, s, σ, K, e) E K ::= [] | E::K ::=  ⊗ e2 | i1 ⊗  | if  then e1 else e2 | b[] := e2 | b[i1 ] :=  | C.P () A configuration (C, s, σ, K, e) represents a call in progress within component C, in which e is the expression being reduced and K is the continuation for this expression, up to the latest procedure call. Continuations are evaluation contexts, here represented as lists of flat evaluation contexts E. We denote by s a global state recording the values of the local buffers for each component. Continuations for pending calls are stored on a call stack σ, together with their call arguments’ values and the names of the compartments they execute in. We omit the obvious definitions for call stacks σ and states s. Evaluation starts as a call to a fixed procedure of a fixed main component, and completes once this call completes, or whenever the current expression e is exit. We illustrate the small-step semantics with the three rules that deal with procedure call evaluation. In these rules, ∆ is a mapping from procedure identifiers to procedure bodies. Theorem 4.1 (Partial type safety). For any well-formed configuration cfg = (C, s, σ, K, e), one of the following holds: (1) cfg is a final configuration (either e is exit or else it is a value and K and σ are both empty); (2) cfg reduces in one step to a well-formed configuration; (3) cfg is stuck and has one of the following forms: (a) (C, s, σ, b[] :: K, i) where s[C, b, i] is undefined; (b) (C, s, σ, b[i]:=::K, i0 ) where s[C, b, i] is undefined. s0 = s[C 0 , 0, 0 7→ i] σ 0 = (C, s[C, 0, 0], K)::σ ∆ ` (C, s, σ, C 0 .P 0 ()::K, i) → (C 0 , s0 , σ 0 , [], ∆[C 0 , P 0 ]) In the following, we use the term undefined behavior configurations for the configurations described in (3), and we say that a well-formed program is defined if reducing it never reaches an undefined behavior configuration. s0 = s[C 0 , 0, 0 7→ i0 ] ∆ ` (C, s, (C 0 , i0 , K)::σ, [], i) → (C 0 , s0 , σ, K, i) Target Our compiler targets a RISC-based abstract machine extended with a compartmentalization mechanism, inspired by a similar design featured in previous work [12]. Each compartment in this target has its own private memory, which cannot be directly accessed by others via loads, stores, or jumps. Instead, compartments must communicate using special ∆ ` (C, s, σ, K, C 0 .P 0 (e)) → (C, s, σ, C 0 .P 0 ()::K, e) As shown on the right-hand side of the first rule, a call starts with an empty continuation and the procedure body ∆[C 0 , P 0 ] as the current expression. The first cell in the first buffer of the 9 The Call rule checks that the call is valid with respect to the current compartment’s interface—i.e., the target procedure is imported by the current compartment—which ensures that even if a compiled component is compromised it cannot exceed its static privilege level. Then it puts the calling compartment’s name and program counter on the global protected call stack σ. Finally, it redirects control to the entry point of the called procedure. The Return instruction retrieves the caller’s compartment and return address from the protected call stack and resumes execution there. call and return instructions, which, as explained below, include checks to ensure that the communication respects compartment interfaces. (Note that this scheme requires a protected call stack, which, in a real system, could be implemented e.g., using a shadow call stack [3], [27] or return capabilities [39].) Because resource exhaustion and integer overflow issues are orthogonal to our present concerns, we assume that words are unbounded and memory is infinite. The instruction set for our machine is mostly standard. instr ::= Nop | Const i → rd | Mov rs → rd | Load ∗ rp → rd | Store ∗ rp ← rs | Jump r | Jal r | Call C P | Return | Binop r1 ⊗ r2 → rd | Bnz r i | Halt Compiler We next define a simple compiler that produces one low-level memory compartment for each high-level component. Each compartment is internally split into buffers, the code of procedures, and a local stack that can grow infinitely. The local stack is used to store both intermediate results and return addresses. In standard calling conventions, the callee is generally expected to restore the register values of the caller, if it has modified them, before returning from a call. Here, however, compiled components cannot assume that other components will necessarily follow an agreed calling convention, so they must save any register that may be needed later. This means, for instance, that we save the value of the current call argument on the local stack and write the local stack pointer to a fixed location in the current compartment’s memory before any cross-compartment call instruction is performed, so that the compartment can restore them when it gets control back. The compiler must also prevent a compromised compartment from reading intermediate states from code in other compartments that may be in the middle of a call to this one. Intuitively, a secure compiler must prevent compromised compartments from distinguishing compiled components based on low-level information that (fully defined) high-level attackers don’t get. In the source language, only a single argument or return value is communicated at call and return points. Hence, besides preserving their values for later, the compiler ensures that all3 registers are cleaned before transferring control to other compartments. The compiler implements a simple optimization for local calls. Since all procedures of a component live in the same address space and local calls don’t need instrumentation, these calls can be implemented more efficiently using Jal and Jump instructions. We therefore use different procedure entry points for component-local and cross-component calls, and we skip, Const i → rd puts an immediate value i into register rd . Mov rs → rd copies the value in rs into rd . Load ∗ rp → rd and Store ∗ rp ← rs operate on the memory location whose address is stored in rp (the ∗ in the syntax of Load and Store indicates that a pointer dereference is taking place), either copying the value found at this location to rd or overwriting the location with the content of rs . Jump r redirects control flow to the address stored in r. Jal r (jump-and-link) does the same but also communicates a return address in a dedicated register rra , so that the target code can later resume execution at the location that followed the Jal instruction. Call C P transfers control to compartment C at the entry point for procedure “C.P ”. Return C P transfers control back to the compartment that called the current compartment. Binop r1 ⊗ r2 → rd performs the mathematical operation ⊗ on the values in r1 and r2 and writes the result to rd . Finally, Bnz r i (branch-nonzero) is a conditional branch to an offset i, which is relative to the current program counter. If r holds anything but value zero, the branching happens, otherwise execution simply flows to the next instruciton. While Jal is traditionally used for procedure calls and Jump for returns, in this machine they can only target the current compartment’s memory. They are nonetheless useful for optimizing compartment-local calls, which need no instrumentation; in a realistic setting, the instrumented primitives Call and Return would likely come with monitoring overhead. In the low-level semantics, we represent machine states state as (C, σ, mem, reg, pc) where C is the currently executing compartment, mem is a partitioned memory, reg is a register file, pc is the program counter, and σ is a global protected call stack. We assume a partial function decode from words to instructions. We write ψ; E ` state → state’ to mean that state reduces to state’ in an environment where component interfaces are given by ψ and component entry points by E. Here are the reduction rules for Call and Return: mem[C, pc] = i decode i = Call C 0 P 0 pc0 = E[C 0 ][P 0 ] 0 0 0 0 C = C ∨ C .P ∈ ψ[C].import σ = (C, pc+1) :: σ ψ; E ` (C, σ, mem, reg, pc) → (C 0 , σ 0 , mem, reg, pc0 ) mem[C, pc] = i decode i = Return σ = (C 0 , pc0 ) :: σ 0 0 0 ψ; E ` (C, σ, mem, reg, pc) → (C , σ , mem, reg, pc0 ) 10 3 Technically speaking, we believe that, in our very simple setting, the compiler could choose not to clean unused registers and still be secure. However, our proof relies on compiled components cleaning all registers except the one that holds the call argument or return value. Indeed, not cleaning unused registers makes things harder because it can provide a covert channel for two compromised compartments between which interfaces would forbid any direct communication. These compartments could now exchange values through uncleared registers by interacting with the same unsuspecting uncompromised component. We conjecture that this possible cooperation between compromised components doesn’t yield more attacker power in our case. However, in a setting where registers could be used to transmit capabilities, this would give more power to the attacker, so our compiler clears all registers but one, which also simplifies our proof. for local calls, the steps that store and restore register values and clean registers. Because we do not check bounds when compiling buffer read and write operations, buffer overflows can corrupt a compartment’s memory in arbitrary ways. Consequently, many buffer overflow attacks can be reproduced even in our simple setting, including, due to the local-call optimization, returnoriented programming attacks [14], [66]. In return-oriented programming, an attacker overwrites return addresses on the local stack to produce an unexpected sequence of instructions of his choice by reusing parts of the code of componentlocal procedures. In our setting, buffer overflow attacks thus enable compiled components to shoot themselves in the foot by storing beyond the end of a buffer and into the local call stack. We assume compiler correctness as stated below for our compiler. Note that, in the presence of partial type safety, (Theorem 4.1), proving either (1) or (2) below is enough to get the other. conditions, adapted for compromised components instead of uncompromised ones. We say that a high-level partial program P ∈• s is fully defined with respect to contexts of shape ◦s when it cannot be blamed for undefined behavior when interacting with such contexts: for every A ∈◦ s, either reducing A[P ] never reaches an undefined behavior configuration, or else the current component in this undefined behavior configuration belongs to A. Similarly, a high-level context A ∈• s is fully defined with respect to programs of shape ◦s when it cannot be blamed for undefined behavior when interacting with such programs. Because we perform a point-wise compilation of highlevel programs, separate compilation (Definition 3.5) trivially holds for our compiler. Combining it with whole-program compiler correctness (Assumption 4.2) immediately leads to the following corollary: Corollary 4.3 (Separate compilation correctness). ∀P. P defined ⇒ (1) P terminates ⇐⇒ P↓ terminates ∧ (2) P diverges ⇐⇒ P↓ diverges ∀s, A ∈◦ s, P ∈• s. P fully defined wrt. contexts of shape ◦s ⇒ A fully defined wrt. programs of shape •s ⇒ (1) A[P ] terminates ⇐⇒ A↓ [P↓] terminates ∧ (2) A[P ] diverges ⇐⇒ A↓ [P↓] diverges Instantiating structured full abstraction We define program shapes, partial programs, and contexts in a similar way to Theorem 3.4, as detailed below. More precisely, we use isomorphic definitions so that we can later apply this theorem. A program shape s is the pairing of a mapping from component names to component interfaces and a set that indicates uncompromised components. In the rest of the paper, we implicitly restrict our attention to well-formed shapes. A shape is well-formed when (1) all component interfaces in the shape only import procedures from components that are part of the shape, and (2) these procedures are exported according to the shape. High-level partial programs P and contexts A are defined as mappings from component names to component definitions. A high-level partial program P has shape •s when it defines exactly the components that are marked as uncompromised in s, with definitions that satisfy the corresponding interfaces, and when it moreover satisfies the simple well-formedness condition that all the local buffers it uses are defined. A high-level context A has shape ◦s under the same conditions, adapted for compromised components instead of uncompromised ones. A low-level partial program p or context a is formed by pairing a partitioned memory with a mapping from procedure identifiers to entry points. This choice is isomorphic to having sets of named compartment memories with entry point annotations. A low-level partial program p has shape •s when the partitioned memory has partitions under exactly the component names that are marked as uncompromised in s, and the entry point mapping provides addresses for exactly the procedures that are exported by these components according to s. A low-level context a has shape ◦s under the same Proof technique for structured full abstraction Trace semantics were initially proposed by Jeffrey and Rathke [36], [37] to define fully abstract models for high-level languages. Patrignani et al. later showed how to use trace semantics [59] to prove full abstraction for a compiler targeting machine code [58]. This proof technique is well suited for deterministic target languages such as machine code and proceeds in two steps. First, we devise a trace semantics for low-level partial programs and contexts and relate it to the target machine’s operational semantics (e.g., by proving it fully abstract [59]). This trace semantics will provide a set of traces for every partial program, describing all the execution paths that this program can reach by interacting with an arbitrary context. Second, we use the trace semantics to characterize the interaction between an arbitrary low-level context and, separately, two compiled programs that this context distinguishes, resulting in two traces with a common prefix followed by different actions. We can then use these traces to construct a high-level attacker, proving that this attacker distinguishes between the two source programs. As our proof demonstrates, proving the trace semantics fully abstract is not a mandatory first step in the technique. Instead, we relate our trace semantics to the operational one using two weaker trace composition and decomposition conditions (Lemma 4.5 and Lemma 4.6), adapted from the key lemmas that Jeffrey and Rathke used to prove their trace semantics fully abstract [36], [37]. This reduces proof effort, since proving a trace semantics fully abstract typically requires proving a third lemma with a trace-mapping argument of its own [36], [37], [59]. Assumption 4.2 (Whole-program compiler correctness). 11 Adapting the technique to undefined behavior is straightforward, essentially amounting to proving standard full abstraction for the safe subset of the language. Then one simply proves that the context produced by the mapping is fully defined, thus safe. Adapting to a closed world, however, takes more work. The trace semantics that have been used previously to prove full abstraction characterize the interaction between a partial program and arbitrary contexts. The context’s shape is typically constructed as reduction goes, based on the steps that the context takes in the generated trace. For instance, if the trace said that the context performs a call, then the target procedure would be appended to the context’s interface so that this call becomes possible. For structured full abstraction, we want a finer-grained trace semantics that enables reasoning about the interaction with contexts of a specific shape. We achieve this by making the shape a parameter to the reduction relation underlying our trace semantics. To make sure that traces are compatible with this shape, we also keep track of the current compartment during reduction. This allows us to generate only context steps that adhere to the current compartment’s interface, and hence to the context’s shape. In particular, the context will only be able to call program procedures for which (1) there is a context compartment whose interface explicitly imports the target procedure, thus granting the privilege to call that procedure, and (2) this other context compartment is reachable from the current compartment via a chain of cross-compartment calls or returns within the context. Moving to a closed world also makes the trace mapping argument harder. The one from Patrignani et al. [58], for instance, relies on changes in the context’s shape, e.g., adding a helper component to the context that is not present in the low level. This is no longer possible for structured full abstraction, where the context shape is fixed. game). It corresponds to the use of an instruction that makes execution stuck, such as Halt. At any point where it has control, a player can take internal actions (any instruction that neither terminates execution nor transfers control to the opponent); these are not reflected in the trace. In particular, cross-compartment communication is considered an internal action when it transfers control to a compartment that belongs to the current player. Besides halting, a player can also end the game by triggering an infinite sequence of internal actions, making execution diverge. In the trace, this will correspond to not making any move: the trace observed thus far will be a maximal trace for the interaction between the program and context involved, i.e., any extension of this trace will not be shared by both the program and the context. Intuitively, a program p ∈• s has trace t if it answers with the program actions described in t when facing a context a ∈◦ s that produces the context actions described in t. Similarly, a program a ∈◦ s has trace t if it answers with the context actions described in t when facing a program p ∈• s that produces the program actions described in t. We define Tr◦s (p) to be the set of traces of a partial program p with respect to contexts of shape ◦s, and Tr•s (a) to be the set of traces of a context a with respect to programs of shape •s. The player that starts the game is the one that owns the main component according to s. For each player, the trace semantics is deterministic with respect to its own actions and nondeterministic with respect to the opponent’s actions. All possible actions an actual opponent could take have a corresponding nondeterministic choice, which is formalized by a property we call trace extensibility. Lemma 4.4 (Trace extensibility). ∀t, s, p ∈• s, a ∈◦ s. (t ∈ Tr◦s (p) ∧ t.γ? ∈ Tr•s (a) ⇒ t.γ? ∈ Tr◦s (p)) ∧ (t ∈ Tr•s (a) ∧ t.γ! ∈ Tr◦s (p) ⇒ t.γ! ∈ Tr•s (a)) Trace semantics for the low-level language We define a trace semantics in which traces are finite words over an alphabet Eα of external actions, alternating between program external actions “γ!” and context external actions “γ?”. We treat external actions as moves in a two-player game, viewing the context and the partial program as the players. The trace semantics is parameterized by a shape s, which the two players have. External actions either transfer control to the other player or end the game. Eα ::= γ! | γ? Nondeterminism disappears once we choose a particular opponent for a player, as the two key lemmas below illustrate. Lemma 4.5 (Trace decomposition). ∀s, p ∈• s, a ∈◦ s. a[p] terminates ⇒ ∃t. t ends with X ∧ t ∈ Tr◦s (p) ∩ Tr•s (a) Trace decomposition is stated for terminating programs. It extracts the interaction between a program p and a context a with dual shapes by looking at how a[p] reduces, synthesizing that interaction into a trace t. Because execution terminates, this trace ends with a termination marker. γ ::= Callreg C P | Returnreg | X Traces (Eα∗ ) track the external actions (γ) performed by the context and the program. The first kind of external action is cross-boundary communication, which corresponds to the use of instrumented call instructions Call C P and Return when they transfer control to a compartment that belongs to the opponent. For these external actions, traces keep track of the instruction used together with reg, the values held by all registers when the instruction is issued. The second kind of external action is program termination, which we denote with a tick X and which the opponent cannot answer (X ends the Lemma 4.6 (Trace composition). ∀t, s, p ∈• s, a ∈◦ s. t ∈ Tr◦s (p) ∩ Tr•s (a) ⇒ (∀Eα. (t.Eα) 6∈ Tr◦s (p) ∩ Tr•s (a)) ⇒ (a[p] terminates ⇐⇒ t ends with X) Trace composition is the opposite of trace decomposition, reconstructing a sequence of reductions based on synthesized interaction information. It considers a program and a context 12 with dual shapes, that share a common trace t. The condition on the second line states that the game has ended: trace t cannot be extended by any action Eα such that the two players share trace “t.Eα”. Under these assumptions, trace composition tells us that one of the following holds: either (1) the trace ends with a termination marker X and putting p in context a will produce a terminating program, or (2) the trace does not end in X and putting p in context a will produce a diverging program. Intuitively, if the game has ended but there is no termination marker, it must be because one of the players went into an infinite sequence of internal actions and will neither give control back nor terminate. While the statement of these lemmas is quite close to that used in an open world setting [36], [37], the trace semantics itself has to be adapted in order to prove them in the presence of our closed world assumption. To this end, we incorporate internal actions within the trace semantics, thus adding more options to the nondeterministic choice of the next context action, which allows us to track at any point the currently executing compartment. When in control, a player can only perform communicating actions allowed by the interface of the current compartment. This restricts external actions as required, while also making it possible to internally switch the current compartment through allowed internal actions. Using our semantics, we thus end up with finer-grained traces that include internal communication, which can be directly mapped to high-level attackers (Assumption 4.9). The traces we use otherwise are obtained by erasing internal actions from the finer-grained traces. traces gives enough distinguishing power to the high-level context. The reason is that, because they can’t trust other compartments, compiled fully defined components never read values transmitted in registers with the exception of the one used for communication. As a consequence, these components cannot distinguish context external actions based on the content of these unread registers, which are exactly the ones a compiled fully defined context cleans. Fully defined programs thus perform the exact same actions when facing a trace t or its canonicalization ζ◦ (t), as formalized by Lemma 4.8. This means that having the high-level attacker reproduce canonical traces instead of the original traces of the low-level context will be enough to lead compiled programs into reproducing the actions they took when facing the low-level context. Lemma 4.8 (Canonicalization). ∀t, s, P ∈• s. P fully defined wrt. contexts of shape ◦s ⇒ t ∈ Tr◦s (P↓) ⇐⇒ ζ◦ (t) ∈ Tr◦s (P↓) The definability assumption below gives a characterization of our mapping from a canonical trace t and an action γ1 to a compiled fully defined context A↓ that reproduces the context actions in t and, depending on the next action γ the program takes, ends the game with either termination (if ζ(γ) = ζ(γ1 )) or divergence (if ζ(γ) 6= ζ(γ1 )). The context A ↓ will thus distinguish a program p producing trace “t.γ1 !” from any program producing “t.γ!” with ζ(γ) 6= ζ(γ1 ). Assumption 4.9 (Definability). ∀t, γ1 , s. t = ζ◦ (t) ∧ (∃p ∈• s. (t.γ1 !) ∈ Tr◦s (p)) ⇒ ∃A ∈◦ s. A fully defined wrt. programs of shape •s ∧ (1) t ∈ Tr•s (A↓) ∧ (2) (γ1 6= X ⇒ (t.γ1 !.X?) ∈ Tr•s (A↓)) ∧ (3) ∀γ. if ζ(γ) 6= ζ(γ1 ) then ∀γ 0 . (t.γ!.γ 0 ?) 6∈ Tr•s (A↓) Proof of SCC We prove our instance of structured full abstraction, which implies SCC by Theorem 3.4 since we have isomorphic definitions to the ones in §3. Theorem 4.7 (Structured full abstraction). Our compiler satisfies structured full abstraction. The definability assumption gives us a fully defined context that follows trace t (part 1) and that, if given control afterwards via action “γ!” such that γ 6= X, acts as follows: if γ = γ1 the context terminates (2) and if the context can distinguish γ from γ1 , it will make execution diverge by not issuing any action γ 0 (3). Since it is a compiled fully defined context, A↓ can only access values transmitted using register rcom , the register that holds the call argument or return value. So A↓ can only distinguish between γ and γ1 when they differ in rcom , which is captured formally by the ζ(γ) 6= ζ(γ1 ) condition. Proving this assumption (even on paper) would be quite tedious, so we settled for testing its correctness using QuickCheck [17]. We built an algorithm (in OCaml) that constructs A out of t. More precisely, the algorithm inputs a trace with internal actions (the finer-grained trace that erases to t) and builds a context A that reproduces context internal and external actions as prescribed by that trace. Execution will afterwards resume at a different point in A depending on the next action taken by the program. At each such point, A will either terminate execution or make it diverge depending on whether the program action is distinguishable Recall that the basic idea behind the proof technique is to extract two traces that characterize the interaction between a low-level context and two compiled fully defined high-level programs, and then to map these two traces to a fully defined high-level context. The high-level context should reproduce the context actions described in the traces when facing the same programs as the low-level context. Unfortunately, a compiled fully defined context cannot reproduce any arbitrary low-level trace, because the values transmitted in registers are part of external communication actions in low-level traces: As enforced by the compiler, these contexts always clear all registers but the one used for communication before giving control to the program. They can thus only produce traces in which registers are cleared in all context actions, which we call canonical traces. We denote by ζ(γ) the operation that rewrites action γ so that all registers but one are clear. A canonical trace ζ◦ (t) can be obtained from an arbitrary trace t by replacing all context actions “γ?” by “ζ(γ)?”. We call this operation trace canonicalization. As we will see, being able to reproduce arbitrary canonical 13 from action γ1 . Because the trace taken as input already includes internal actions, we do not have to reconstruct them, hence our algorithm is not more difficult to devise than in an open-world setting [58]. In the following, we assume that the algorithm is correct, i.e., that Assumption 4.9 holds. We can now turn to the main theorem. After following trace tc , which Q↓ has from (a), Q↓ cannot perform a terminating action: otherwise using (b) and trace extensibility for a and tp , we could apply trace composition to trace “tp .X” and get that a[Q ↓] terminates, which is a contradiction. Q↓ cannot perform action γ1 either, since (c) would then violate the fact that tp is the longest prefix of ti in Tr◦s (Q↓). So Q↓ only has two options left. The first is to perform no external action by going into an infinite sequence of internal transitions. In this case, using (1), we can apply trace composition to get that A↓ [Q↓] diverges. The second option is to give control back to the context using an external action γ so that X 6= γ 6= γ1 . Because fully defined compiled programs clean registers, they only yield canonical actions, i.e. γ = ζ(γ) ∧ γ1 = ζ(γ1 ). Combined with (3), this entails that if A↓ produced an action γ 0 , we would have γ = γ1 , which is false. Hence, A↓ doesn’t produce any action: it goes into an infinite sequence of local transitions. We can again apply trace composition to get that A↓ [Q↓] diverges. We finally apply separate compiler correctness (Corollary 4.3) to conclude the proof. Detailed proof of structured full abstraction. Consider a lowlevel attacker a ∈◦ s distinguishing two fully defined partial programs P, Q ∈• s after compilation. Suppose without loss of generality that a[P ↓] terminates and a[Q↓] diverges. We build a high-level attacker A ∈◦ s that is fully defined with respect to programs of shape •s and can distinguish between P and Q. We can first apply trace decomposition (Lemma 4.5) to a and P ↓ to get a trace ti ∈ Tr◦s (P ↓) that ends with X, such that ti ∈ Tr•s (a). Call tp the longest prefix of ti such that tp ∈ Tr◦s (Q↓). Because trace sets are prefix-closed by construction, we know that tp ∈ Tr◦s (P↓) ∩ Tr•s (a). Moreover, tp is necessarily a strict prefix of ti : otherwise, we could apply trace composition (Lemma 4.6) and get that a[Q↓] terminates, a contradiction. So there exists an external action Eα such that trace “tp .Eα” is a prefix of ti . Now Eα cannot be a context action, or else trace extensibility (Lemma 4.4) would imply that “tp .Eα” is a trace of Tr◦s (Q↓), which is incompatible with tp being the longest prefix of ti in Tr◦s (Q↓). Therefore, Eα is a program action, i.e., there exists γ1 such that “Eα = γ1 !”. Intuitively, P↓ and Q↓ take the same external actions until the end of tp , where P ↓ takes external action “γ1 !” and Q↓ does not (it takes either a different action γ 6= γ1 or no external action at all). Now, let tc be the canonicalization of trace tp , i.e., tc = ζ◦ (tp ). By canonicalization (Lemma 4.8), “tc .γ1 !” = ζ◦ (tp .γ1 !) is a trace of P↓. We can thus use apply definability (Assumption 4.9) to trace tc and action γ1 , using P ↓∈• s as a witness having trace “tc .γ1 !”. This yields a fully defined context A ∈◦ s such that: 5 Related Work Fully abstract compilation Fully abstract compilation was introduced in the seminal work of Martı́n Abadi [1] and later investigated by the academic community. (Much before this, the concept of full abstraction was coined by Milner [48].) For instance, Ahmed et al. [9]–[11], [56] proved the full abstraction of type-preserving compiler passes for functional languages and devised proof techniques for typed target languages. Abadi and Plotkin [6] and Jagadeesan et al. [35] expressed the protection provided by a mitigation technique called address space layout randomization as a probabilistic variant of full abstraction. Fournet et al. [31] devised a fully abstract compiler from a subset of ML to JavaScript. Patrignani et al. [45], [58] were recently the first to study fully abstract compilation to machine code, starting from single modules written in simple, idealized object-oriented and functional languages and targeting hardware architectures featuring a new coarse-grained isolation mechanism. Until recently, they studied fully abstract compilers that by design violate our separate compilation property, so they cannot be applied to our compartmentalizing compilation setting. In recent parallel work, Patrignani et al. [61] proposed an extension of their compilation scheme to protecting multiple components from each other. The attacker model they consider is different, especially since their source language does not have undefined behavior. Still, if their source language were extended with unsafe features, our SCC property could possibly hold for their compiler. Patrignani, Devriese et al. [21], [59] also proposed proof techniques for full abstraction that work for untyped target languages, and more recently proved full abstraction by approximate back-translation for a compiler between the simply typed and the untyped lambda calculus and fully formalized this proof in Coq [22]. As opposed to our Coq proof for the instance from §4, which is done under well-specified (1) tc ∈ Tr•s (A↓), (2) γ1 = 6 X ⇒ (tc .γ1 !.X?) ∈ Tr•s (A↓), (3) ∀γ, γ 0 . (tc .γ!.γ 0 ?) ∈ Tr•s (A↓) ⇒ ζ(γ) = ζ(γ1 ). We now show that these conditions imply that A ↓ [P ↓] terminates while A↓ [Q↓] diverges. First, we look at P↓. Consider the case where γ1 = X. In this case, by applying trace extensibility to A↓ in (1), we get that “tc .X!” is a trace of A↓, so trace composition allows us to conclude that A↓ [P↓] terminates. Now if γ1 6= X then this action gives back control to the context, which, given (2), will perform action “X?”. Applying trace extensibility to P↓, P↓ has trace “tc .γ1 !.X?”, so we can apply trace composition and deduce that A↓ [P↓] terminates in this case as well. Now, regarding Q ↓, we first obtain the following by applying canonicalization to tp , “tp .X!”, and “tp .γ1 !”: (a) tc = ζ◦ (tp ) ∈ Tr◦s (Q↓), (b) (tc .X!) = ζ◦ (tp .X!) ∈ Tr◦s (Q↓) ⇒ (tp .X!) ∈ Tr◦s (Q↓), (c) (tc .γ1 !) = ζ◦ (tp .γ1 !) ∈ Tr◦s (Q↓) ⇒ (tp .γ1 !) ∈ Tr◦s (Q↓). 14 assumptions but not complete, the proof of Devriese et al. is assumption free. including: process-level sandboxing [13], [33], [40], [63], software fault isolation (SFI) [71], capability machines [70], and multi-PMA systems [61]. As we target lower-level machines, new problems will appear: for instance we need to deal with the fact that memory is finite and resource exhaustion errors cannot be hidden from the attacker, which will require slightly weakening the security property. Finally, we would like to study more interesting compartmentalization models including dynamic component creation and nested components, and the way these extensions influence the security property. Formal reasoning about compartmentalized code SCC is orthogonal to formal techniques for reasoning about compartmentalized software: SCC allows transferring security guarantees for compartmentalized code written in a source language to machine code via compartmentalizing compilation, but SCC itself does not provide effective reasoning principles to obtain those security guarantees in the first place. The literature contains interesting work on formally characterizing the security benefits of compartmentalization. Promising approaches include Jia et al.’s work on System M [38], and Devriese et al.’s work on logical relations for a core calculus based on JavaScript [23], both of which allow bounding the behavior of a program fragment based on the interface or capabilities it has access to. One significant challenge we attack in this paper is languages with undefined behaviors, while in these other works illegal actions such as accessing a buffer out of bounds must be detected and make the program halt. Acknowledgments We thank André DeHon, Deepak Garg, and Andrew Tolmach for helpful discussions and thoughtful feedback on earlier drafts. Yannis Juglaret is supported by a PhD grant from the French Department of Defense (DGA) and Inria. Arthur Azevedo de Amorim and Benjamin C. Pierce are supported by NSF award 1513854, Micro-Policies: A Framework for Tag-Based Security Monitors. References [1] M. Abadi. Protection in programming-language translations. Research Report 154, SRC, 1998. [2] M. Abadi, M. Budiu, Ú. Erlingsson, and J. Ligatti. Control-flow integrity. ACM CCS. 2005. [3] M. Abadi, M. Budiu, Ú. Erlingsson, and J. Ligatti. Control-flow integrity principles, implementations, and applications. TISSEC, 13(1), 2009. [4] M. Abadi and J. Planul. On layout randomization for arrays and functions. POST. 2013. [5] M. Abadi, J. Planul, and G. D. Plotkin. Layout randomization and nondeterminism. MFPS, 298:29–50, 2013. [6] M. Abadi and G. D. Plotkin. On protection by layout randomization. TISSEC, 15(2):8, 2012. [7] P. Agten, B. Jacobs, and F. Piessens. Sound modular verification of C code executing in an unverified context. POPL. 2015. [8] P. Agten, R. Strackx, B. Jacobs, and F. Piessens. Secure compilation to modern processors. CSF. 2012. Verifying correct low-level compartmentalization Recent work focused on formally verifying the correctness of lowlevel compartmentalization mechanisms based on software fault isolation [42], [49], [73] or tagged hardware [12]. That work, however, only considers the correctness of the lowlevel compartmentalization mechanism, not the compiler and not high-level security properties and reasoning principles for code written in a programming language with components. Communication between low-level compartments is generally done by jumping to a specified set of entry points, while the model we consider in §4 is more structured and enforces correct calls and returns. Finally, seL4 is a verified operating system microkernel [41], that uses a capability system to separate user level threads and for which correct access control [65] and noninterference properties [50] were proved formally. 6 [9] A. Ahmed. Verified compilers for a multi-language world. SNAPL. 2015. [10] A. Ahmed and M. Blume. Typed closure conversion preserves observational equivalence. ICFP. 2008. [11] A. Ahmed and M. Blume. An equivalence-preserving CPS translation via multi-language semantics. ICFP. 2011. [12] A. Azevedo de Amorim, M. Dénès, N. Giannarakis, C. Hriţcu, B. C. Pierce, A. Spector-Zabusky, and A. Tolmach. Micro-policies: Formally verified, tag-based security monitors. In 36th IEEE Symposium on Security and Privacy (Oakland S&P). 2015. [13] A. Bittau, P. Marchenko, M. Handley, and B. Karp. Wedge: Splitting applications into reduced-privilege compartments. USENIX NSDI, 2008. Conclusion and Future Work We have introduced a new secure compartmentalizing compilation property, related it to the established notion of full abstraction, and applied our property in a carefully simplified setting: a small imperative language with procedures compiling to a compartmentalized abstract machine. This lays the formal foundations for studying the secure compilation of mutually distrustful components written in unsafe languages. In the future we plan to build on this groundwork to study more realistic source and target languages, compilers, and enforcement mechanisms. In the long run, we would like to apply this to the C language by devising a secure compartmentalizing variant of CompCert that targets a tag-based reference monitor [12] running on a real RISC processor [19]. We have in fact started working towards this long term goal [39], but this will take time to achieve. Beyond tagged hardware, we would also like to implement the abstract compartmentalization machine from §4 in terms of various enforcement other mechanisms, [14] E. Buchanan, R. Roemer, H. Shacham, and S. Savage. When Good Instructions Go Bad: Generalizing Return-Oriented Programming to RISC. In Proc. ACM CCS, 2008. [15] N. Burow, S. A. Carr, S. Brunthaler, M. Payer, J. Nash, P. Larsen, and M. Franz. Control-flow integrity: Precision, security, and performance. CoRR, abs/1602.04056, 2016. [16] D. Chisnall, C. Rothwell, R. N. M. Watson, J. Woodruff, M. Vadera, S. W. Moore, M. Roe, B. Davis, and P. G. Neumann. Beyond the PDP-11: Architectural support for a memory-safe C abstract machine. ASPLOS. 2015. [17] K. Claessen and J. Hughes. QuickCheck: a lightweight tool for random testing of Haskell programs. ICFP. 2000. [18] L. Davi, A. Sadeghi, D. Lehmann, and F. Monrose. Stitching the gadgets: On the ineffectiveness of coarse-grained control-flow integrity protection. USENIX Security, 2014. 15 [19] A. DeHon, E. Boling, R. Nikhil, D. Rad, J. Schwarz, N. Sharma, J. Stoy, G. Sullivan, and A. Sutherland. DOVER: A Metadata-Extended RISCV. In RISC-V Workshop, 2016. Accompanying talk at http://youtu.be/ r5dIS1kDars. Low-fat pointers: compact encoding and efficient gate-level implementation of fat pointers for spatial safety and capability-based security. CCS. 2013. [45] A. Larmuseau, M. Patrignani, and D. Clarke. A secure compiler for ML modules. APLAS, 2015. [46] X. Leroy. Formal verification of a realistic compiler. CACM, 52(7):107– 115, 2009. [47] X. Leroy. A formally verified compiler back-end. JAR, 43(4):363–446, 2009. [48] R. Milner. Processes: a mathematical model of computing agents, pages 157–174. North-Holland, 1975. [49] G. Morrisett, G. Tan, J. Tassarotti, J.-B. Tristan, and E. Gan. RockSalt: better, faster, stronger SFI for the x86. PLDI. 2012. [50] T. C. Murray, D. Matichuk, M. Brassil, P. Gammie, T. Bourke, S. Seefried, C. Lewis, X. Gao, and G. Klein. seL4: from general purpose to a proof of information flow enforcement. IEEE S&P. 2013. [51] S. Nagarakatte, M. M. K. Martin, and S. Zdancewic. Hardware-Enforced Comprehensive Memory Safety. IEEE Micro, 33(3):38–47, 2013. [52] S. Nagarakatte, M. M. K. Martin, and S. Zdancewic. WatchdogLite: Hardware-accelerated compiler-based pointer checking. CGO. 2014. [53] S. Nagarakatte, M. M. K. Martin, and S. Zdancewic. Everything you want to know about pointer-based checking. SNAPL. 2015. [20] J. Devietti, C. Blundell, M. M. K. Martin, and S. Zdancewic. HardBound: Architectural support for spatial safety of the C programming language. ASPLOS, 2008. [21] D. Devriese, M. Patrignani, and F. Piessens. Fully-abstract compilation by approximate back-translation. POPL, 2016. [22] D. Devriese, M. Patrignani, F. Piessens, and S. Keuchel. Modular, fullyabstract compilation by approximate back-translation. arXiv:1703.09988, 2017. [23] D. Devriese, F. Piessens, and L. Birkedal. Reasoning about object capabilities with logical relations and effect parametricity. EuroS&P, 2016. [24] U. Dhawan, C. Hriţcu, R. Rubin, N. Vasilakis, S. Chiricescu, J. M. Smith, T. F. Knight, Jr., B. C. Pierce, and A. DeHon. Architectural support for software-defined metadata processing. ASPLOS, 2015. [25] U. Dhawan, A. Kwon, E. Kadric, C. Hriţcu, B. C. Pierce, J. M. Smith, A. DeHon, G. Malecha, G. Morrisett, T. F. Knight, Jr., A. Sutherland, T. Hawkins, A. Zyxnfryx, D. Wittenberg, P. Trei, S. Ray, and G. Sullivan. Hardware support for safety interlocks and introspection. AHNS, 2012. [26] Ú. Erlingsson. Low-level software security: Attacks and defenses. In Foundations of Security Analysis and Design IV, FOSAD 2006/2007 Tutorial Lectures, 2007. [27] Ú. Erlingsson, M. Abadi, M. Vrable, M. Budiu, and G. C. Necula. XFI: Software guards for system address spaces. OSDI. 2006. [54] S. Nagarakatte, J. Zhao, M. M. K. Martin, and S. Zdancewic. SoftBound: highly compatible and complete spatial memory safety for C. PLDI. 2009. [55] S. Nagarakatte, J. Zhao, M. M. K. Martin, and S. Zdancewic. CETS: compiler enforced temporal safety for C. ISMM. 2010. [28] I. Evans, S. Fingeret, J. Gonzalez, U. Otgonbaatar, T. Tang, H. Shrobe, S. Sidiroglou-Douskos, M. Rinard, and H. Okhravi. Missing the point(er): On the effectiveness of code pointer integrity. IEEE S&P, 2015. [56] M. New, W. J. Bowman, and A. Ahmed. Fully abstract compilation via universal embedding. To appear in 21st International Conference on Functional Programming (ICFP 2016). [29] I. Evans, F. Long, U. Otgonbaatar, H. Shrobe, M. C. Rinard, H. Okhravi, and S. Sidiroglou-Douskos. Control jujutsu: On the weaknesses of finegrained control flow integrity. CCS. 2015. [30] R. B. Findler and M. Felleisen. Contracts for higher-order functions. ICFP. 2002. [31] C. Fournet, N. Swamy, J. Chen, P.-É. Dagand, P.-Y. Strub, and B. Livshits. Fully abstract compilation to JavaScript. POPL. 2013. [57] M. Patrignani. The Tome of Secure Compilation: Fully Abstract Compilation to Protected Modules Architectures. PhD thesis, KU Leuven, Leuven, Belgium, 2015. [58] M. Patrignani, P. Agten, R. Strackx, B. Jacobs, D. Clarke, and F. Piessens. Secure compilation to protected module architectures. TOPLAS, 2015. [59] M. Patrignani and D. Clarke. Fully abstract trace semantics for protected module architectures. Computer Languages, Systems & Structures, 42:22– 45, 2015. [60] M. Patrignani, D. Clarke, and F. Piessens. Secure compilation of objectoriented components to protected module architectures. APLAS. 2013. [61] M. Patrignani, D. Devriese, and F. Piessens. On modular and fullyabstract compilation. CSF, 2016. [62] R. Prakash. Using Silicon Secured Memory to detect memory access errors at hardware speeds. Oracle Community blog, 2016. [63] N. Provos, M. Friedl, and P. Honeyman. Preventing privilege escalation. In 12th USENIX Security Symposium. 2003. [64] C. Reis and S. D. Gribble. Isolating web programs in modern browser architectures. EuroSys. 2009. [65] T. Sewell, S. Winwood, P. Gammie, T. C. Murray, J. Andronick, and G. Klein. seL4 enforces integrity. ITP. 2011. [32] E. Göktaş, E. Athanasopoulos, H. Bos, and G. Portokalidis. Out of control: Overcoming control-flow integrity. IEEE S&P, 2014. [33] K. Gudka, R. N. M. Watson, J. Anderson, D. Chisnall, B. Davis, B. Laurie, I. Marinos, P. G. Neumann, and A. Richardson. Clean application compartmentalization with SOAAP. CCS. 2015. [34] Intel software guard extensions (Intel SGX) programming reference, 2014. [35] R. Jagadeesan, C. Pitcher, J. Rathke, and J. Riely. Local memory via layout randomization. CSF. 2011. [36] A. Jeffrey and J. Rathke. A fully abstract may testing semantics for concurrent objects. Theor. Comput. Sci., 338(1-3):17–63, 2005. [37] A. Jeffrey and J. Rathke. Java Jr: Fully abstract trace semantics for a core Java language. ESOP. 2005. [38] L. Jia, S. Sen, D. Garg, and A. Datta. A logic of programs with interfaceconfined code. CSF. 2015. [39] Y. Juglaret, C. Hritcu, A. A. de Amorim, B. C. Pierce, A. SpectorZabusky, and A. Tolmach. Towards a fully abstract compiler using micropolicies: Secure compilation for mutually distrustful components. CoRR, abs/1510.00697, 2015. [40] D. Kilpatrick. Privman: A library for partitioning applications. USENIX FREENIX. 2003. [66] H. Shacham. The geometry of innocent flesh on the bone: return-intolibc without function calls (on the x86). ACM CCS. 2007. [67] K. Z. Snow, F. Monrose, L. Davi, A. Dmitrienko, C. Liebchen, and A.R. Sadeghi. Just-in-time code reuse: On the effectiveness of fine-grained address space layout randomization. IEEE S&P. 2013. [68] C. Tice, T. Roeder, P. Collingbourne, S. Checkoway, Ú. Erlingsson, L. Lozano, and G. Pike. Enforcing forward-edge control-flow integrity in GCC & LLVM. USENIX Security. 2014. [69] R. Wahbe, S. Lucco, T. E. Anderson, and S. L. Graham. Efficient software-based fault isolation. SOSP, 1993. [70] R. N. M. Watson, J. Woodruff, P. G. Neumann, S. W. Moore, J. Anderson, D. Chisnall, N. H. Dave, B. Davis, K. Gudka, B. Laurie, S. J. Murdoch, R. Norton, M. Roe, S. Son, and M. Vadera. CHERI: A hybrid capability-system architecture for scalable software compartmentalization. IEEE S&P, 2015. [41] G. Klein, K. Elphinstone, G. Heiser, J. Andronick, D. Cock, P. Derrin, D. Elkaduwe, K. Engelhardt, R. Kolanski, M. Norrish, T. Sewell, H. Tuch, and S. Winwood. seL4: Formal verification of an OS kernel. SOSP. 2009. [42] J. Kroll, G. Stewart, and A. Appel. Portable software fault isolation. CSF. 2014. [43] R. Kumar, M. O. Myreen, M. Norrish, and S. Owens. CakeML: a verified implementation of ML. POPL. 2014. [44] A. Kwon, U. Dhawan, J. M. Smith, T. F. Knight, Jr., and A. DeHon. 16 [71] B. Yee, D. Sehr, G. Dardyk, J. B. Chen, R. Muth, T. Ormandy, S. Okasaka, N. Narula, and N. Fullagar. Native Client: a sandbox for portable, untrusted x86 native code. CACM, 53(1):91–99, 2010. [72] B. Zeng, G. Tan, and Ú. Erlingsson. Strato: A retargetable framework for low-level inlined-reference monitors. USENIX Security. 2013. [73] L. Zhao, G. Li, B. D. Sutter, and J. Regehr. ARMor: fully verified software fault isolation. EMSOFT. 2011. [74] M. Zitser, R. Lippmann, and T. Leek. Testing static analysis tools using exploitable buffer overflows from open source code. FSE. 2004. 17
6cs.PL
BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS arXiv:1405.0472v5 [cs.SC] 2 Feb 2017 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS Abstract. The theory of border bases for zero-dimensional ideals has attracted several researchers in symbolic computation due to their numerical stability and mathematical elegance. As shown in (Francis & Dukkipati, J. Symb. Comp., 2014), one can extend the concept of border bases over Noetherian rings whenever the corresponding residue class ring is finitely generated and free. In this paper we address the following problem: Can the concept of border basis over Noetherian rings exists for ideals when the corresponding residue class rings are finitely generated but need not necessarily be free modules? We present a border division algorithm and prove the termination of the algorithm for a special class of border bases. We show the existence of such border bases over Noetherian rings and present some characterizations in this regard. We also show that certain reduced Gröbner bases over Noetherian rings are contained in this class of border bases. 1. Introduction Gröbner bases theory for polynomial rings over fields gives an algorithmic technique to determine a vector space basis of the residue class ring modulo a zero dimensional ideal (Buchberger, 1965). The theory of Gröbner bases was extended to polynomial rings over Noetherian commutative rings with unity a few decades ago (e.g. Trinks, 1978; Möller, 1988; Zacharias, 1978). For a good exposition on Gröbner bases over rings one can refer to (Adams & Loustaunau, 1994). Certain recent developments in cryptography and other fields have led to renewed interest in polynomial rings over rings (Greuel et al., 2011). For instance, free residue class rings over Z[x] called ideal lattices (Lyubashevsky & Micciancio, 2006) have been shown to be isomorphic to integer lattices, an important cryptographic primitive (Ajtai, 1996) and certain cyclic lattices in Z[x] have been used in NTRU cryptographic schemes (Hoffstein et al., 1998). Boolean polynomial rings over a boolean ring is another important example of a polynomial ring over a ring since it can be used to solve combinatorial puzzles like Sudoku (Sato et al., 2011). Another example is the polynomial rings over Z/2k . They are used to prove the correctness of data paths in system-on-chip design (Greuel et al., 2011). Border bases, an alternative to Gröbner bases, are well studied for polynomial rings over fields (Kehrein et al., 2005; Kehrein & Kreuzer, 2005). Though border bases are restricted to zero dimensional ideals, the motivation for border bases comes from the numerical stability of border bases over Gröbner bases (Stetter, 2004). There has been considerable interest in the theory of border bases, from characterization (Kehrein & Kreuzer, 2005) to methods of computation (Kehrein & Kreuzer, 1 2 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS 2006) to computational hardness (Ananth & Dukkipati, 2012). The concept of border bases can be easily extended to polynomial rings over rings if the corresponding residue class ring has a free A-module representation w.r.t. some monomial order and is finitely generated as an A-module (Francis & Dukkipati, 2014). In this paper, we study border bases for ideals in polynomial rings over Noetherian commutative rings in a more general set up. 2. Background & Preliminaries 2.1. Notations. A polynomial ring in indeterminates x1 , . . . , xn over a Noetherian, commutative ring A is denoted by A[x1 , . . . , xn ]. Throughout this paper, the rings we study are rings with unity. The set of all ideals of A is denoted by Id(A). When A = k, where k is a field, we write it as k[x1 , . . . , xn ]. A monomial in indeterminates x1 , . . . , xn is denoted by xα , where α ∈ Nn , and the set of all monomials is denoted by Mn . By ‘term’ we mean cxα , where c ∈ A and c 6= 0. We will denote all the terms in A[x1 , . . . , xn ] by Tn . Let T ⊆ Tn be a set of terms, possibly infinite. We define the monomial part of T , denoted by Mon(T ), as Mon(T ) = {xα ∈ Mn : axα ∈ T, for some nonzero a ∈ A}. P A polynomial f is denoted by f = α∈Λ aα xα , where aα ∈ A, α ∈ Nn and Λ ⊆ Nn is a finite set. Λ is called the support of the polynomial f , denoted by supp(f ). The set of monomials appearing with nonzero coefficients in f is denoted by Mon(f ). α The set of all terms appearing in f is denoted by Ter(f ), S i.e. Ter(f ) = {aα x | α ∈ Λ}. If F is a set of polynomials then Mon(F ) = f ∈F Mon(f ). Similarly, S Ter(F ) = f ∈F Ter(f ). Given a set of terms T and an ideal a in A[x1 , . . . , xn ], the set of residue class elements of T modulo a is denoted by T + a. That is T + a = {axα + a : axαP ∈ T }. Given a set of polynomials F the span of F over A is given by SpanA (F ) = { si=1 ai fi : ai ∈ A, fi ∈ F, s ∈ N}. With respect to a monomial order ≺, the leading monomial, leading coefficient and leading term of a polynomial f ∈ A[x1 , . . . , xn ] are denoted by Lm(f ), Lc(f ) and Lt(f ) respectively. That is, we have Lt(f ) = Lc(f ) Lm(f ). Given a set of polynomials S, possibly infinite, Lt(S) denotes the set of all leading terms of polynomials in S. The leading term ideal (or initial ideal) of S is denoted by hLt(S)i and is given by hLt(S)i = h{Lt≺ (f ) | f ∈ S}i. Similarly, the leading monomial ideal and the leading coefficient ideal of S are denoted by hLm(S)i and hLc(S)i respectively. Note that the leading coefficient ideal is an ideal in the coefficient ring, A. The ideal generated by the polynomials f1 , . . . , fs is denoted by hf1 , . . . , fs i. Also a set of polynomials S is said to be monic w.r.t. a monomial order if the leading coefficient of each polynomial in S is 1. 2.2. Border bases over a field. Here we briefly recall definitions related to border bases. Definition 2.1. A finite set of monomials O ⊆ Mn is said to be an order ideal if it is closed under forming divisors i.e., for xα ∈ Mn , if xβ ∈ O and xα |xβ , then xα ∈ O. BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 3 Definition 2.2. Let O be an order ideal. The border of O is the set ∂O = (x1 O ∪ . . . ∪ xn O) \ O. The first border closure of O is defined as the set O ∪ ∂O and it is denoted by ∂O. Note that ∂O is also an order ideal. By convention, if O = ∅, then we set ∂O = {1}. Definition 2.3. Let O = {xα1 , . . . , xαs } be an order ideal, and let ∂O = {xβ1 , . . . , xβt } be its border. A set of polynomials B = {b1 , . . . , bt } ⊆ k[x1 , . . . , xn ] is called an Oborder prebasis if the polynomials have the form s X βj bj = x − cij xαi , i=1 where cij ∈ k for 1 ≤ i ≤ s and 1 ≤ j ≤ t. Definition 2.4. Let O = {xα1 , . . . , xαs } be an order ideal and B = {b1 , . . . , bt } be an O-border prebasis consisting of polynomials in a ⊆ k[x1 , . . . , xn ]. We say that the set B is an O-border basis of a if the residue classes of xα1 , . . . , xαs form a k-vector space basis of k[x1 , . . . , xn ]/a. The existence and uniqueness of border bases are established in (Kehrein & Kreuzer, 2005). Given an ideal one can show that there exists a border bases that do not correspond to Gröbner bases for any term ordering. An example of such a border basis is given in (Kehrein & Kreuzer, 2006). 2.3. The A-module A[x1 , . . . , xn ]/a. From now on, unless otherwise specified we deal with polynomials over a Noetherian, commutative ring A. Given an ideal a in A[x1 , . . . , xn ], using Gröbner basis methods one can give an A-module representation of residue class ring A[x1 , . . . , xn ]/a if it is finitely generated (Francis & Dukkipati, 2014). We describe this briefly below and for more details one can refer to (Francis & Dukkipati, 2014). The notation is mostly borrowed from (Adams & Loustaunau, 1994). Let G = {gi : i = 1, . . . , t} be a Gröbner basis for a. For each monomial, xα , let Jxα = {i : lm(gi ) | xα , gi ∈ G} and IJxα = h{lc(gi ) : i ∈ Jxα }i. Note that IJxα is an ideal in A. We refer to IJxα as the leading coefficient ideal w.r.t. G. Let CJxα represent a set of coset representatives of the equivalence classes in A/IJxα . Given a m P polynomial, f ∈ A[x1 , . . . , xn ], let f = ai xαi mod hGi, where ai ∈ A, i = 1, . . . , m. i=1 If A[x1 , . . . , xn ]/hGi is an A-module generated by m elements, then corresponding to the coset representatives, CJxα1 , . . . , CJxαm , there exists an A-module isomorphism, φ : A[x1 , . . . , xn ]/hGi −→ A/IJxα1 × · · · × A/IJxαm m X ai xαi + hGi 7−→ (c1 + IJxα1 , · · · , cm + IJxαm ), (1) i=1 where ci = ai mod IJxαi and ci ∈ CJxαi . We refer to A/IJxα1 ×· · ·×A/IJxαm as the Amodule representation of A[x1 , . . . , xn ]/a w.r.t. G. If IJxαi = {0}, we have CJxαi = A, for all i = 1, . . . , m. This implies A[x1 , . . . , xn ]/a ∼ = Am , i.e. A[x1 , . . . , xn ]/a has an 4 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS A-module basis and it is free. In this case, we define A[x1 , . . . , xn ]/a to have a “free A-module representation w.r.t. G”. The necessary and sufficient condition for an A-module A[x1 , . . . , xn ]/a to have a free A-module representation is given in (Francis & Dukkipati, 2014). It makes use of the the concept of ‘short reduced Gröbner basis’ introduced in (Francis & Dukkipati, 2014) which we briefly describe below. Definition 2.5. Let a be an ideal in A[x1 , . . . , xn ] and let G be its reduced Gröbner basis as described in (Pauer, 2007). Consider the isomorphism in (1). G is called a short reduced Gröbner basis if the size of the generating set of the leading coefficient ideal, IJxα , of each leading monomial, xα in G, is minimal. One can define reduced Gröbner bases over rings exactly as that of fields but it may not exist in all the cases. The definition of reduced Gröbner basis given by (Pauer, 2007) is a generalization of the concept over fields to rings that also ensures the existence of such a basis for every ideal in the polynomial ring. The short reduced Gröbner basis of an ideal is not to be confused with strong Gröbner basis (Adams & Loustaunau, 1994, Definition 4.5.6.). Strong Gröbner basis exists only if the coefficient ring is a PID. In a PID, strong Gröbner basis coincides with the short reduced Gröbner basis. Proposition 2.6. (Francis & Dukkipati, 2014, Proposition 3.12) Let a ⊆ A[x1 , . . . , xn ] be a nonzero ideal such that A[x1 , . . . , xn ]/a is finitely generated. Let G be a short reduced Gröbner basis for a w.r.t. some monomial ordering, ≺. Then, A[x1 , . . . , xn ]/a has a free A-module representation w.r.t. G if and only if G is monic. Example 2.7. Let G = {3x, 5x, y} be the Gröbner basis of an ideal a in Z[x, y]. The short reduced Gröbner basis of a is given by Gred = {x, y}. It is monic and a Z-module basis of Z[x, y]/a is given by {1 + a}. With the above result the concept of border bases can be extended to ideals in polynomial rings over rings, in the cases where the corresponding residue class rings are finitely generated and have a free A-module representation w.r.t. some monomial order (Francis & Dukkipati, 2014, Section 6). One can show that all the characterizations in (Kehrein & Kreuzer, 2005) hold true when the residue class ring is free. For the sake of completeness, we state the definition of border bases in this case below. Definition 2.8. Let O = {xα1 , . . . , xαs } be an order ideal and B = {b1 , . . . , bt } ⊆ A[x1 , . . . , xn ] be an O-border prebasis. Let a ⊆ A[x1 , . . . , xn ] be an ideal such that A[x1 , . . . , xn ]/a is finitely generated and is a free A-module. Then B is said to be an O-border basis if B ⊆ a and O forms an A-module basis for A[x1 , . . . , xn ]/a. 3. Order Functions and Border Prebasis Division Algorithm The following notion that we introduce in this paper is crucial to the theory of border bases that we develop here. Definition 3.1 (Order Function). Let Id(A) be the set of all ideals in the ring, A. A mapping I : Mn → Id(A) is said to be an order function if xβ | xα implies I(xβ ) ⊆ I(xα ), for all xα , xβ ∈ Mn . From now on we denote I(xα ) by Ixα . BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 5 Clearly, the Gröbner basis of an ideal ‘fixes’ an order function. Consider the leading coefficient ideal, IJxα that we constructed in Section 2.3 w.r.t. G. Since Jxα is a saturated set, the mapping xα 7→ IJxα is an order function, which is denoted by I (G) . Definition 3.2. An order function I : Mn → Id(A) is said to be proper if it maps only finitely many monomials to proper ideals in A. Example 3.3. Consider the mapping I : N2 −→ Id(Z). Let I(1) = {0}, I(x1 ) = h3i and every other monomial be mapped to h1i. We see that for any xα ∈ N2 such that x1 | xα , h3i ⊆ I(xα ). Therefore, I is a proper order function. We define order ideal with respect to a proper order function I. Definition 3.4. For each xα ∈ Mn and a proper order function I, fix Cxα ⊆ A, a set of coset representatives of A/Ixα . A set of terms OI ⊆ Tn is said to be an order ideal w.r.t. I if for all xα ∈ Mn , cxα ∈ OI if and only if c ∈ Cxα . Note that for each monomial xα , one can choose any set of coset representatives of A/Ixα and with each choice we have a different order ideal. Example 3.5. Consider the polynomial ring Z[x, y] and let the mapping I be such that I1 = {0}, Ix = h4i, Iy = h3i, Ix2 = h2i and the rest of the monomials map to h1i. I is clearly a proper order function. Let the set of coset representatives be the following, C1 = Z, Cx = {0, 1, 2, 3}, Cy = {0, 1, 2}, Cx2 = {0, 1} and for all the other monomials, xα , Cxα = {0}. Then, OI = {a1 , a2 x, a3 y, a4 x2 | a1 ∈ C1 , a2 ∈ Cx , a3 ∈ Cy , a4 ∈ Cx2 } is an order ideal corresponding to I. Example 3.6. Now consider a polynomial ring k[u1 , u2 ][x, y, z] and let I be an order function defined by I1 = {0}, Ix = {0}, Iy = hu21 i, Iz = hu22 −3u1 i, Ix2 = h0i, Ixy = hu21 , u22 −1i, Ixz = hu1 , u2 i and rest of the monomials mapping to h1i. I is a proper order function. Let C1 , Cx , Cy , Cz , Cx2 , Cxy , Cxz represent the nonzero set of coset representatives. Then O0 I = {a1 , a2 x, a3 y, a4 z, a5 x2 , a6 xy, a7 xz | a1 ∈ C1 , a2 ∈ Cx , a3 ∈ Cy , a4 ∈ Cz , a5 ∈ Cx2 , a6 ∈ Cxy , a7 ∈ Cxz } is an order ideal corresponding to I. In sequel, we write order ideal OI as O and its dependence on the order function is implicitly assumed. It is important to note that unlike in the case of fields, the order ideal in the case of polynomial rings over rings have both monic and nonmonic monomials. Given an order ideal O we introduce two types of borders: a monomial border ∂Om and a scalar border ∂Os . Definition 3.7. Given an order ideal O the monomial border of O is defined as ∂Om = {x1 · Mon(O) ∪ . . . ∪ xn · Mon(O)} \ Mon(O). Definition 3.8. Let O be an order ideal with respect to a proper order function I. For each xα such that Ixα 6= h1i define ∂Oxα = {c1 xα , . . . , cs xα }, where Ixα = hc1 , . . . , cs i 6 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS for some c1 , . . . , cs ∈ A. The scalar border of an order ideal is defined as [ ∂Os = ∂Oxα . xα ∈Mn Ixα 6=h1i Definition 3.9. The border of the order ideal O, denoted as ∂O, is defined as ∂O = ∂Om ∪ ∂Os . Example 3.10. Consider Example 3.5. The set of monic border terms that form the monomial border is ∂Om = {xy, y 2 , x3 , x2 y} and the scalar border is ∂Os = {4x, 3y, 2x2 }. Hence, the border of the order ideal is ∂O = {xy, y 2 , x3 , x2 y, 4x, 3y, 2x2 }. Example 3.11. Consider Example 3.6. The monomials that form the monomial border is ∂O0 m = {x3 , x2 y, x2 z, xy 2 , xyz, xz 2 , y 2 , yz, z 2 } and the scalar border is the set ∂O0 s = {u21 y, (u22 − 3u1 )z, u21 xy, (u22 − 1)xy, u1 xz, u2 xz}. Hence border of the order ideal is ∂O0 = {x3 , x2 y, x2 z, xy 2 , xyz, xz 2 , y 2 , yz, z 2 , u21 y, (u22 −3u1 )z, u21 xy, (u22 − 1)xy, u1 xz, u2 xz}. We define ∂ 0 O = O and 0th border closure as ∂ 0 O = {axα | cxα ∈ O, for some c ∈ Cxα , c 6= 0 and a ∈ c+Ixα }. Note that in the case of fields these quantities are defined as ∂ 0 O = ∂ 0 O = O (Kehrein & Kreuzer, 2006). The definitions of first and higher order border closures are given below. Definition 3.12. The first border closure ∂O of an order ideal O is defined as ∂O ={axα | ∃c ∈ A such that cxα ∈ O ∪ ∂Os , a ∈ A or xα ∈ ∂Om }. Proposition 3.13. The first border closure, ∂O, of an order ideal, O is an order ideal. Proof. We fix Ixα = {0} for all xα ∈ ∂O. By Definition 3.12 three cases arises: xα ∈ ∂Om or there exists c ∈ A such that cxα ∈ O or cxα ∈ ∂Os . Let xα ∈ ∂Om . Suppose xβ |xα for some xβ ∈ Mn , then clearly, xβ ∈ Mon(O)∪∂Om . If xβ ∈ Mon(O), then there exists some d ∈ Cxβ such that dxβ ∈ O. Therefore, in either case xβ ∈ ∂O. In the second case, let cxα ∈ O. Suppose xβ |xα for some xβ ∈ Mn . By the closure property of O, dxβ ∈ O for some d ∈ Cxβ . Therefore, xβ ∈ ∂O. In the third case, let cxα ∈ ∂Os . Suppose xβ |xα for some xβ ∈ Mn . This implies that xβ ∈ Mon(O). Thus, xβ ∈ ∂O.  The monomial part of the first border closure defined as the set of monomials in ∂O, is a finite set and it is represented as Mon(∂O). It is interesting to see that since Ixα = {0} for all xα ∈ Mon(∂O), the scalar border for k ≥ 2 is an empty set and one needs to consider only the monomial border. Definition 3.14. The k th border of an order ideal O for k 1 is defined as ∂ k O = {x1 · Mon(∂ k−1 O) ∪ . . . ∪ xn · Mon(∂ k−1 O)} \ Mon(∂ k−1 O), where Mon(∂ k−1 O) is the monomial part of the (k − 1)th border closure. BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 7 Definition 3.15. For k ≥ 2, the k th border closure of an order ideal is defined as ∂ k O = {axα | a ∈ A, xα ∈ ∂ k O ∪ ∂ k−1 Om }. Example 3.16. Consider Example 3.5. The set of monic border terms that form the monomial border is ∂Om = {xy, y 2 , x3 , x2 y} and the scalar border is ∂Os = {4x, 3y, 2x2 }. The second border of the order ideal, O, is the set, ∂ 2 O = {xy 2 , y 3 , x4 , x3 y, x2 y 2 }. Example 3.17. Consider Example 3.6. The second border of the order ideal, O0 is the set, ∂ 2 O0 = {y 3 , y 2 z, yz 2 , z 3 , x4 , x3 y, x3 z, x2 y 2 , x2 yz, x2 z 2 , xy 3 , xyz 2 , xy 2 z, xz 3 }. Remark 3.18. The k th border closure is an infinite set of terms for k ≥ 0. Further, for k ≥ 1, ∂ k O is closed under division and hence the set of monomials corresponding to it, Mon(∂ k O), mimics the case of fields. The following example explains the borders and border closures of an order ideal. Example 3.19. Let the order function I : M2 → Id(Z) be defined as follows: I1 = 0, Ix = 0, Iy = h4i, Ixy = h2i and for other monomials I is mapped to h1i. The order ideal corresponding to I, OI = {a, bx, cy, dxy : a, b ∈ Z, c ∈ {0, 1, 2, 3}, d ∈ {0, 1}}. The 0th border closure is given by {a, bx, cy, dxy : a, b ∈ Z\{0}, c ∈ Z\h4i, d ∈ Z\h2i}. Figure 1 shows a few terms from the 0th border closure. Figure 1. 0th border closure The first border is hx2 , 2xy, y 2 , x2 y, xy 2 , 4yi. The first border closure is given by hax2 , bxy, cy 2 , dx2 y, exy 2 , f y : a, c, d, e ∈ Z, b ∈ h2i, f ∈ h4i. Figure 2 is an illustration of the same. For k ≥ 2 the k th borders are exactly as that of fields. Figure 3 shows the borders for k = 2, 3. Note that the figure depicts the borders and not the border closures. We give below certain properties of order ideals, their borders and border closures. These properties are analogous to the case of polynomial rings over fields. Proposition 3.20. Let O be an order ideal and ∂Om be its monomial border. Then (1) For k ≥ 1, the k th monomial border closure of O, Mon(∂ k O) is the following disjoint union, Mon(O) ∪ ∂Om ∪ (∪ki=2 ∂ k O). 8 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS Figure 2. First border closure Figure 3. 2nd , 3rd border closure (2) For k ≥ 1, ∂ k Om = Mnk · Mon(O) \ Mn<k . Mon(O), where ∂ k Om = ∂ k O for k ≥ 2. (3) A monomial, xα ∈ Mn is divisible by xβ ∈ ∂Om if and only if xα ∈ Mn \ Mon(O). Proof. (1) The proof is by induction on k. For k = 1, clearly the monomials in the first border closure are elements of the set Om ∪ ∂Om . From the definition of monomial border of O we have that Om and ∂Om are disjoint. Suppose that the claim is true for the k th monomial border closure. For k + 1, ∂ k+1 Om = ∂ k Om ∪ ∂ k+1 O. It is easy to verify that the sets ∂ k Om and ∂ k+1 O are disjoint. (2) The claim follows from the observation that ∂ k O = ∂ k Om \ ∂ k−1 Om . (3) We have xβ ∈ ∂Om . This implies that there exists xγ ∈ Om and an indeterminate xi0 such that xβ = xi0 xγ . We have xi0 xγ |xα . If xα ∈ Om then xi0 xγ ∈ Om which is a contradiction. Now consider a monomial xα ∈ Tn \ O. Then, xα ∈ ∂Om or xα ∈ ∂ k O for some k ≥ 2. If xα ∈ ∂ k O then it implies that there exists a monomial xγ of degree k − 1 and a xβ ∈ ∂Om such that xα = xγ xβ . The claim follows.  Now we introduce some concepts that are essential for the division algorithm. Definition 3.21. The index of a term cxα w.r.t. an order ideal, O is defined as indO (cxα ) = min{k ∈ N | cxα ∈ ∂ k O}. BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 9 Definition 3.22. Let f ∈ A[x1 , . . . , xn ] be any nonzero polynomial with support, supp(f ), then the index of f w.r.t. an order ideal, O is defined as indO (f ) = max indO (cα xα ). α∈supp(f ) Example 3.23. Consider Example 3.5. The set of monic border terms that form the monomial border is ∂Om = {xy, y 2 , x3 , x2 y} and the scalar border is ∂Os = {4x, 3y, 2x2 }. Then indO (3x) = 0, indO (xy) = 1 and indO (xy 2 + 8x + 7y) = 2. Example 3.24. Consider Example 3.6. The monomials that form the monomial border is ∂O0 m = {x3 , x2 y, x2 z, xy 2 , xyz, xz 2 , y 2 , yz, z 2 } and the scalar border is the set ∂O0 s = {u21 y, (u22 − 3u1 )z, u21 xy, (u22 − 1)xy, u1 xz, u2 xz}. Then indO0 ((3u2 + u2 )x) = 0, indO0 (u1 x2 y) = indO0 ((u21 + u2 )xz) = 1 and indO0 (xy 3 + 8x) = 2. For any polynomial, the terms of highest index are grouped together to form a border form analogous to the leading term in Gröbner bases theory. We define this below. Definition 3.25. Let f ∈ A[x1 , . . . , xn ] be a nonzero polynomial such that the indO (f ) = i0 . The border form of f w.r.t. O is defined as X BFO (f ) = cα x α , α∈supp(f ),cα ∈A indO (cα xα )=i0 a polynomial in A[x1 , . . . , xn ]. Note that unlike leading term of a polynomial in Gröbner bases theory that is always a monomial, border form can be a polynomial. The concept of leading term ideal has an analogous form in border bases theory called the border form ideal. Definition 3.26. The border form ideal of an ideal a in A[x1 , . . . , xn ] w.r.t. an order ideal O is defined as BFO (a) = hBFO (f ) | f ∈ ai. Example 3.27. Consider Example 3.5. Let f = xy 2 + 2x2 y 2 + xy + 3x + 2. Then the index of f w.r.t. the order ideal O is equal to 2. The border form of f is the polynomial, BFO (f ) = xy 2 + 2x2 y 2 . Example 3.28. Consider Example 3.6. Let f = 2xy 2 + (u1 − u2 )xz + 3x + 2. Then the index of f w.r.t. the order ideal O0 is equal to 2. The border form of f is the polynomial, BFO0 (f ) = 2xy 2 + (u1 − u2 )xz. We now give the definition of border prebasis for an order ideal, O. Definition 3.29. Let O be an order ideal, and ∂O = {c1 xα1 , . . . , cs xαs } be its border. Let Cxαi be the set of coset representatives of A/Ixαi . A finite set of polynomials G = {g1 , . . . , gs } ⊆ A[x1 , . . . , xn ] is said to be an O-border prebasis if gi = ci xαi − hi , where hi ∈ A[x1 , . . . , xn ] satisfying Ter(hi ) ⊆ O \ {axαi | a ∈ Cxαi }, i = 1, . . . , s. 10 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS Example 3.30. We consider Example 3.5. The set G = {g1 , . . . , g7 }, where g1 = xy − x, g2 = y 2 − y, g3 = x3 − 2y, g4 = x2 y − x2 + 10, g5 = 4x − 2y, g6 = 3y − 3x and g7 = 2x2 − x + 5 is an O-border prebasis but it is not acyclic. Let G0 = {g10 , . . . , g70 } where g10 = xy − x, g20 = y 2 − y, g30 = x3 − x2 + 6, g40 = x2 y − y + 5, g50 = 4x − 7, g60 = 3y − x and g70 = 2x2 − 2y − 3x which is also a O-border prebasis but it is acyclic since the permutation of G0 , {g10 , g20 , g30 , g40 , g70 , g60 , g50 } satisfies the acyclicity condition. Example 3.31. Consider Example 3.6. The set G = {g1 , . . . , g15 }, where g1 = x3 − 3, g2 = x2 y − 3u1 y, g3 = x2 z − 2z, g4 = xy 2 − x + 10, g5 = xyz − 11xy, g6 = xz 2 − u2 u21 x2 , g7 = y 2 − x + u1 u2 , g8 = yz − 3y + 2, g9 = z 2 + 5xz + 11u1 x, g10 = u21 y + u2 x + 3, g11 = (u22 − 3u1 )z − u22 y, g12 = u21 xy + 3u1 x − 2z, g13 = (u22 − 1)xy + 2x2 , g14 = u1 xz + 3u1 x2 , g15 = u2 xz + 2u1 xy + 4x2 − 4z − 10u1 y + 14 is an acyclic O-border prebasis since the following permutation of G, {g1 , g2 , g3 , g4 , g5 , g6 , g7 , g8 , g9 , g14 , g15 , g13 , g12 , g11 , g10 } satisfies the acyclicity condition. Note that unlike in fields, for a monomial in the border of O, we can have more than one polynomial in the O-border prebasis but only one polynomial corresponding to a term in the border. With the definition of O-border prebasis, we now give a procedure for division of any polynomial in A[x1 , . . . , xn ] with the O-border prebasis. Algorithm 3.32. Let O be an order ideal. Let Mon(O) = {xα1 , . . . , xαt } be its monomial part. Let ∂Om = {xβ1 , . . . , xβs0 } and ∂Os = {cs0 +1 xβs0 +1 , . . . , cs xβs } be its monomial border and scalar border respectively. Let G = {g1 , . . . , gs } ⊆ A[x1 , . . . , xn ] be an O-border prebasis. For f ∈ A[x1 , . . . , xn ] we perform the following steps. (1) Initialize f1 = . . . = fs = 0, a1 = . . . = at = 0 and h = f . (2) If h = 0 return (f1 , . . . , fs , a1 , . . . , at ). (3) If indO (h) = 0 then find b1 , . . . , bt ∈ A such that h = b1 xα1 + . . . + bt xαt . Set ai = bi for each 1 ≤ i ≤ t. Return (f1 , . . . , fs , a1 , . . . , at ). (4) If indO (h) = 1 and h contains a term dxβ such that xβ ∈ ∂Om then goto Step 5. Else, let h = d1 xγ1 + . . . + dj xγj such that indO (h) = indO (d1 xγ1 ) and indO (d1 xγ1 ) ≥ . . . ≥ indO (dj xγj ). Find bµ+1 , . . . , bs ∈ A such that d1 xγ1 = bs0 +1 (cs0 +1 xβs0 +1 ) + . . . + bs (cs xβs ). Subtract bs0 +1 gs0 +1 + . . . + bs gs from h, add bi to fi for s0 + 1 ≤ i ≤ s and return to Step 2. (5) Else, let h = d1 xγ1 +. . .+dj xγj such that indO (h) = indO (xγ1 ) and indO (d1 xγ1 ) ≥ . . . ≥ indO (dj xγj ). Determine xβi ∈ ∂Om with the smallest i such that xγi = xµ xβi and deg(xµ ) = indO (h) − 1. Subtract d1 xµ gi from h, add d1 xµ to fi and return to Step 2. This procedure over rings differs from the case of fields only in Step 4. The termination of the above method is not assured because of the possibility that for a given polynomial, f , a monomial in its support identified with index 0 in Step 3 may again have an index 1 after Step 4. Therefore, we cannot assume the reduction in index values at every step of the procedure. BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 11 4. Acyclic Border Prebases and Termination of Border Division Algorithm Here, we identify a special class of O-border prebases called acyclic O-border prebases for which the termination of the border division algorithm can be established. Definition 4.1. A O-border prebasis G = {g1 , . . . , gs } is said to be acyclic if there k, exists a permutation of G, {gi1 , . . . , gis } such that for any gij , gik , where j exactly one of the following conditions are satisfied (1) cj BFO (gij ) = ck BFO (gik ) for any cj , ck ∈ A or (2) dj xαj ∈ ∂O and dj xαj ∈ supp(gij ) implies ck xαj ∈ / supp(gik ) for some ck , dj ∈ A. The ordered set of acyclic O-border prebasis that satisfies the permutation given above is called a ‘well ordered’ acyclic O-border prebasis. We now show the correctness and termination of Algorithm 3.32 when the O-border prebasis is acyclic. Proposition 4.2. (Border Division Algorithm) Consider a polynomial f ∈ A[x1 , . . . , xn ]. If the O-border prebasis G = {g1 , . . . , gs } is acyclic, then Algorithm 3.32 terminates for f and returns a tuple, (f1 , . . . , fs , a1 , . . . , at ) ∈ (A[x1 , . . . , xn ])s × At such that f = f1 g1 + . . . + fs gs + a1 xα1 + . . . + at xαt , and deg(fi ) ≤ indO (f ), for i = 1, . . . , s with fi gi 6= 0. Proof. We first describe the execution of the algorithm. In Step 4, indO (d1 xγ1 ) = 1 and d1 xγ1 ∈ SpanA (h∂OiA ). This implies that d1 ∈ Ixγ1 , where Ixγ1 is an ideal generated by hu1 , . . . , uk i, ui xγ1 ∈ ∂Os , 1 ≤ i ≤ k. Thus, there exists l1 , . . . , lk ∈ A P P such that d1 = ki=1 li ui . Hence, d1 xγ1 = ss0 +1 bi (ci xβi ), where ci xβi ∈ ∂Os and bi = lj when ci xβi = uj xγ1 for some j ∈ {1, . . . , k}, and bi = 0, otherwise. The other steps, due to the absence of scalar border terms, mimics the border basis division in fields (Kehrein & Kreuzer, 2005, Proposition 3). We prove that the representation, f = f1 g1 + . . . + fs gs + a1 xα1 + . . . + at xαt + h, computed by the algorithm is valid in every step. Clearly, it is satisfied in Step 1. In Step 4 we subtract (bs0 +1 gs0 +1 + . . . + bs gs ) from h. These bi s are then added to fi s, i.e. fi = fi + bi , s0 + 1 ≤ i ≤ s. Similarly in Step 5, from h we subtract d1 xµ gi and we add d1 xµ to fi . The constants a1 , . . . , at are modified only in Step 3. The representation of f is valid because indO (h) = 0. If the algorithm terminates, h = 0 and we have a valid representation. Now we prove that deg(fi ) ≤ indO (f ) for all i = 1, . . . , s. In Step 5 of the algorithm, where we divide using the monomial border, our choice of the term d1 xµ is such that deg(dxµ ) = indO (h) − 1. In Step 4, where we divide using the scalar border, the index of the intermediate polynomial, h is 1. The bi , i = 1, . . . , s are constants and the degree of fi , i = 1, . . . , s are therefore zero. All the other steps in the 12 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS algorithm do not affect fi , i = 1, . . . , s. Also, in the algorithm the index of the intermediate polynomial, h never increases. From the above steps, the inequality deg(fi ) ≤ indO (f ) − 1 for all i = 1, . . . , s follows. Next, we prove that the algorithm terminates on all inputs. In Step 4, indO (h) = 1 and Ter(h) ⊆ SpanA (Mon(O))∪SpanA (∂Os ) = SpanA (Mon(O)). We claim that Step 4 terminates after a finite number of steps for an acyclic O-border prebasis. Let h = d1 xα1 +. . .+dt xαt . For simplicity, let us assume that the acyclic O-border prebasis, G is well ordered. It can easily be seen that g1 will be used atmost once in Step 4, while g2 G\{g1 ,g2 } g1 G\{g1 ,g2 } g2 g2 will be used at most twice (h − → h1 −−−−−→+ h2 − → h3 −−−−−→+ h4 − → h5 ). 2 Similarly, any gi will be used atmost O i ) times. For the set G, therefore Step 4 is executed at most O s3 ) times. All the other steps of the division correspond to either order ideal, monomial border or the k th order border, k 1 and therefore mimic the border division in fields. Hence, the termination is guaranteed by (Kehrein & Kreuzer, 2005, Proposition 3).  The border division algorithm gives us the remainder upon division by an acyclic O-border prebasis as a part of its output. We now give a formal definition for remainder. Definition 4.3. Let O be an order ideal and Mon(O) = {xα1 , . . . , xαt }, its monomial part. Let G = {g1 , . . . , gs } be the O-border prebasis. The O-remainder of a polynomial f w.r.t. G, if it exists, is given as remO,G (f ) = a1 xα1 + . . . + at xαt , where f = f1 g1 + . . . + fs gs + a1 xα1 + . . . + at xαt and ai ∈ A for all i = 1, . . . , t is a representation computed by the border division algorithm whenever the algorithm terminates. 5. Order Span and Acyclic Border Bases Consider the case when A[x1 , . . . , xn ]/a is finitely generated. Using the order function we define a generating set for A[x1 , . . . , xn ]/a that also satisfies a weaker form of the linear independence property. Definition 5.1 (Order span). Let a be an ideal and let I be a proper order function and B = {xα1 , . . . , xαm } be a finite set of monomials of size m such that xα ∈ / B if α n and only if Ixα = h1i, where x ∈ M . Let CIxα be the coset representatives of the equivalence classes of A/Ixα . Then we say the set of residue classes of B forms an order span for A[x1 , . . . , xn ]/a w.r.t. I if it satisfies the following properties. (i) B + a generates A[x1 , . . . , xn ]/a as an A-module and A[x1 , . . . , xn ]/a = { m X ai xαi + a | ai ∈ CIxαi , xαi ∈ B}. i=1 Pm αi (ii) If i=1 ai x + a = 0, where m ∈ N, xαi ∈ B and ai 6= 0 for all i = 1, . . . , m, then for some j ∈ {1, . . . , m}, aj ∈ Ixαj . BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 0 13 0 (iii) If there exists an order function I such that Ixα ⊆ Ixα for some xα ∈ Mn and 0 0 0 0 B = {xα : Ixα 6= h1i} satisfies (i) and (ii) w.r.t. I , then I = I. P Remark 5.2. The linear independence property requires that if ki=1 ai xαi + a = 0 then for all i ∈ {1, . . . , k}, ai ∈ Ixαi . Therefore, the second condition in Definition 5.1 is a weaker form of the linear independence property. In fact, in the case of fields and residue class rings with a free A-module representation, the second condition automatically implies the linear independence property. Remark 5.3. The third condition in Definition 5.1 can be interpreted as a minimality condition on the spanning set. Over fields, linear independence of the spanning set ensures minimality but over rings it has to be specified separately. Consider the 0 ideal a = h4x1 , x1 2 , x2 i in Z[x1 , x2 ]. Let I and I be two order functions. Define 0 I1 = 0, Ix1 = h2i and for all the other monomials xα , Ixα = h1i. Similarly define I1 = 0 0 0 0, Ix1 = h4i and for all the other xα ∈ M2 , Ixα = h1i. Both I and I satisfy the first 0 two conditions of the order span. However, since Ix1 (= h4i) ( Ix1 (= h2i), it is w.r.t. 0 the second order function, I that we define the order span of Z[x1 , x2 ]/h4x1 , x1 2 , x2 i. Corollary 5.4. Let a be an ideal such that A[x1 , . . . , xn ]/a is finitely generated. Let G = {g1 , . . . , gt } be a Gröbner basis of an ideal a and I (G) the order function fixed by G. Then, (1) The order function I (G) is proper, (2) The finite order span of A[x1 , . . . , xn ]/a w.r.t. I (G) is given by B = {xα : lt(gi ) - axα , for some nonzero a ∈ A, gi ∈ G} We now provide a better interpretation of the mapping described by (1) in terms of order span. Proposition 5.5. Let a be an ideal in A[x1 , . . . , xn ]. Let I be a proper order function / B, and B = {xα1 , . . . , xαm } be a finite set of monomials of size m such that if xα ∈ α n Ixα = h1i, where x ∈ M . Consider a mapping, φ : A[x1 , . . . , xn ]/a −→ A/Ixα1 × · · · × A/Ixαm f + a 7−→ (c1 + Ixα1 , · · · , cm + Ixαm ), where ci ∈ CIxαi for all i ∈ {1, . . . , m}. Then, φ is an isomorphism if B forms an order span for A[x1 , . . . , xn ]/a. Proof. Let B form an order span for A[x1 , . . . , xn ]/a. We first show that the mapping φ is well defined. Consider a polynomial f ∈ A[x1 , . . . , xn ]. Suppose φ(f + a) = (c1 + Ixα1 , · · · , cm + Ixαm ) and φ(f + a) = (c01 + Ixα1 , · · · , c0m + Ixαm ), where ci , c0i ∈ CIxαi , for all i = 1, . . . , m. This implies (ci − c0i ) ∈ Ixαi , i = 1, . . . , m. Since the difference of two different coset representatives cannot give the zero coset, we have ci = c0i for all i = 1, . . . , m. Thus φ is well defined. 14 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS Clearly, φ is a surjective map by construction. We now have to prove that φ is an injective mapping. Consider a polynomial f ∈ A[x1 , . . . , xn ] such that φ(f + a) = (0, . . . , 0). Let us assume that f ∈ / a. Since B forms an order span for A[x1 , . . . , xn ]/a, m P we can obtain ci ∈ CIxαi , i = 1, . . . , m such that f = ci xαi mod a. Further, atleast i=1 one of the ci , i ∈ {1, . . . , m}, is nonzero. This implies that φ(f + a) also maps to (c1 , . . . , cm ). Therefore φ is not a well defined mapping. This is a contradiction and f ∈ a. Thus, the kernel of φ, ker(φ) = {0 + a}. This implies that φ is an injective mapping. Hence, it follows that φ is an isomorphism.  Definition 5.6. Let a be an ideal such that A[x1 , . . . , xn ]/a is a finitely generated Amodule. Let O be an order ideal and G = {g1 , . . . , gs } be an acyclic O-border prebasis consisting of polynomials in a. G is an acyclic O-border basis of a if Mon(O) is an order span of A[x1 , . . . , xn ]/a. The next proposition shows that these polynomials indeed generate the ideal in a. Proposition 5.7. Let a be an ideal such that A[x1 , . . . , xn ]/a is finitely generated as an A-module. Let O be an order ideal and let G = {g1 , . . . , gs } be an acyclic O-border basis for a. Then a is generated by G. Proof. Let Mon(O) = {xα1 , . . . , xαt } be the monomial part of O and G = {g1 , . . . , gs } be an acyclic O-border basis of a. Consider, f ∈ a. By Algorithm 4.2, we have f1 , . . . , fs ∈ A[x1 , . . . , xn ] and a1 , . . . , at ∈ A such that f = f1 g1 + . . . + fs gs + a1 xα1 + . . . + at xαt . (2) P Pt Ps t Now, f − i=1 fi gi ∈ a. This implies, i=1 ai xαi ∈ a. Let h = i=1 ai xαi . Suppose h 6= 0, then ai ∈ / Ixαi \ {0}, for all i = 1, . . . , t. If ai ∈ Ixαi , for all i = 1, . . . , t, then indO (h) = 1. Then, (2) is not a valid output of Algorithm 4.2. But we are also given that G is P an acyclic border basis of a. The order span property of border basis implies that if ti=1 ai xαi ∈ a for ai 6= 0 for all i = 1, . . . , t, then ai ∈PIxαi for some i ∈ {1, . . . , t}. This is a contradiction. Hence, h = 0. We have, f = si=1 fi gi . The other inclusion follows from the fact that G ⊆ a.  We need to verify if an acyclic O-border basis exists for every ideal, a in A[x1 , . . . , xn ]. We first address, below, whether an acylic O-border basis for a given an order ideal, O, exists. We also prove the uniqueness of the acyclic O-border basis. Theorem 5.8. Let O be an order ideal, and let a be an ideal such that A[x1 , . . . , xn ]/a is a finitely generated A-module. If Mon(O) is an order span then there exists a unique acyclic O-border basis for a. Proof. Let Mon(O) = {xα1 , . . . , xαt } be the monomial part of O, and let ∂O = {c1 xβ1 , . . . , cs xβs } be the border of O. We now prove that an O-border basis exists for a. Since Mon(O) is an order span basis, for each ci xβi ∈ ∂O one can find P (i) (i) aj xαi s ∈ O such that ci xβi = tj=1 aj xαj mod a. We define G as βi G = {ci x − t X j=1 (i) aj xαj | 1 ≤ i ≤ s}. BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 15 Clearly, G is an acyclic O-border prebasis. Now, G ⊆ a and A[x1 , . . . , xn ]/a = P { ai xαi + a | xαi ∈ Mon(O) and ai ∈ A}. Hence, G is an O-border basis of a. To prove the uniqueness of O-border basis, consider two acyclic O-border bases for a. Let G = {g1 , . . . , gt } and G = {g10 , . . . , gt0 } such that βi gi = ci x − t X (i) (i) 0(i) 0(i) aj xαj , where each aj xαj ∈ O and, j=1 gi0 = ci xβi − t X aj xαj , where each aj xαj ∈ O. j=1 We have, gi − gi0 = t X (i) aj x α j j=1 − t X 0(i) aj xαj ∈ a. j=1 This implies, t X 0(i) (i) (aj − aj )xαj ∈ a. j=1 (i) 0(i) Since aj and aj are coset representatives of A/Ixαj and the difference of two dif0(i) (i) ferent cosets cannot be a zero coset, we have aj = aj . Therefore, gi = gi0 . Hence, the acyclic O-border basis of a is unique.  Thus, the question of existence of a border basis for an ideal reduces to the following questions. Given an ideal a, (i) does there always exist a proper order function, I such that the monomial part of the order ideal, Mon(O) constructed from I forms an order span for A[x1 , . . . , xn ]/a and (ii) will the corresponding O-border basis be acyclic. We use the theory of Gröbner bases to establish the result. Theorem 5.9. Given an ideal a such that A[x1 , . . . , xn ]/a is finitely generated as an A-module, there always exists an acyclic border basis of a corresponding to some order ideal, O. Proof. Let ≺ be a monomial order on A[x1 , . . . , xn ]. Let G0 = {g10 , . . . , gt0 } be a Gröbner basis of a. Consider the order function fixed by G, I (G) . Since A[x1 , . . . , xn ]/a is finitely generated, the mapping is proper. Let O≺ be the order ideal corresponding to I (G) . It follows from Corollary 5.4 that Mon(O≺ ) forms an order span. Let ∂O≺ = {c1 xβ1 , . . . , cs xβs } be the border of O≺ . Let G be the O≺ -border prebasis constructed along the same lines as in the proof of Theorem 5.8. Therefore, each polynomial gi in G is of the form, gi = ci xβi − t X j=1 (i) where ci xβi ∈ ∂O and each aj xαj ∈ O. (i) aj xαj , i = 1, . . . , s, 16 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS (i) For any gi ∈ G, monomial ordering imposes that for every nonzero aj xαj , xαj ≺ xβi . Also, for two distinct border terms ci xβi and cj xβj such that xβi 6= xβj , either xβi ≺ xβj or xβj ≺ xβi . The acyclic property of G follows from these two observations. Theorem 5.8 implies that G forms a unique acyclic O≺ -border basis for a.  For any polynomial f ∈ A[x1 , . . . , xn ], given an acylic O-border prebasis, G and an order ideal, O, O-remainder of f is denoted by remO,G (f ) (Definition 4.3). Proposition 5.10. Let a ⊆ A[x1 , . . . , xn ] be an ideal such that A[x1 , . . . , xn ]/a is finitely generated as an A-module and G ⊆ a be an acyclic O-border basis of a. For any f ∈ A[x1 , . . . , xn ], f ∈ a if and only if remO,G (f ) = 0. Proof. Let Mon(O) = {xα1 , . . . , xαt } be the monomial part of O and G = {g1 , . . . , gs } be an acyclic O-border basis of a. By Algorithm 4.2, we have f1 , . . . , fs ∈ A[x1 , . . . , xn ] and a1 , . . . , at ∈ A such that f= s X fi gi + remO,G (f ), (3) i=1 P aj x . If remO,G (f ) = 0 then f = si=1 fi gi . Hence f ∈ a. P Now let f ∈ a. Then f − si=1 fi gi ∈ a. This implies, remO,G (f ) ∈ a. Suppose remO,G (f ) is not equal to zero. The proof proceeds along the same lines as the proof of Proposition 5.7, where we take h = remO,G (f ) and arrive at a contradiction. Hence, when f ∈ a the remainder of f w.r.t. G is zero.  where remO,G (f ) = Pt j=1 αj The above proposition enables us to solve the ideal membership problem provided the acyclic border basis of the ideal is known. However, it must be noted that the remainder on division by an acyclic O-border basis for any f ∈ A[x1 , . . . , xn ] is not unique. Below we define the normal form of a polynomial w.r.t. an acyclic border basis. Definition 5.11. Let a be an ideal such that A[x1 , . . . , xn ]/a is finitely generated as an A-module. Let G ⊆ a be an acyclic O-border basis for a. Let Mon(O) = {xα1 , . . . , xαt } be the monomial part of O, CIxαi be the set of coset representatives of the equivalence classes A/Ixαi and f be any polynomial in A[x1 , . . . , xn ]. Let r be a polynomial given by r = a1 xα1 + · · · + at xαt , where ai ∈ CIxαi , 1 ≤ i ≤ t. Then r is said to be the normal form of f if f = r mod a. The normal form of a polynomial is denoted by NFO,G (f ). We now prove that every polynomial f in A[x1 , . . . , xn ] has a unique normal form. Proposition 5.12. Let a ⊆ A[x1 , . . . , xn ] be an ideal such that A[x1 , . . . , xn ]/a is finitely generated as an A-module. Let G ⊆ a be an acyclic O-border basis for a. For any polynomial f in A[x1 , . . . , xn ], the normal form of f is unique. Proof. Let Mon(O) = {xα1 , . . . , xαt } be the monomial part of O. Let s0 ≤ t be the number of monomials in the scalar border, ∂Os and G = {g1 , . . . , gs } be an acyclic BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 17 O-border basis of a. The existence of a normal form, NFO,G (f ) for any polynomial f ∈ A[x1 , . . . , xn ] is a consequence of the following equality, A[x1 , . . . , xn ]/a = { k X ai xαi + a | ai ∈ CIxαi }. i=1 Now, we prove the uniqueness of the normal form of f . Let r1 and r2 be two different normal forms for f . Then f = r1 mod a and P f = r2 mod a. This P implies, r1 = r2 mod a. Therefore, r1 − r2 ∈ a. Let r1 = ti=1 bi xαi and r2 = ti=1 b0i xαi , where P bi and b0i are coset representatives in CIxαi . Then, r1 − r2 = ti=1 (bi − b0i )xαi . If r1 6= r2 , then there is atleast one i such that bi 6= b0i . This implies that bi − b0i 6= 0. Since bi and b0i are coset representatives of distinct cosets, bi − b0i ∈ / Ixαi . Therefore, (r1 − r2 ) ∈ / a. Hence a contradiction. Thus r1 = r2 and the normal form of a polynomial is unique.  The below result states that if we can associate a monomial order to an order ideal O, then the reduced Gröbner basis of a w.r.t. to that monomial order is a subset of the acyclic border basis associated with O. Proposition 5.13. Let a be an ideal. Let ≺ be a monomial order. Let O≺ be an order ideal corresponding to ≺ such that Mon(O) forms an order span for A[x1 , . . . , xn ]/a. Then Pauer reduced Gröbner basis (Pauer, 2007) of a w.r.t. ≺ is a subset of the acyclic O-border basis of a. Proof. Let Mon(O≺ ) = {xα1 , . . . , xαt } be the monomial part of O≺ and ∂O≺ = {c1 xβ1 , . . . , cs xβs } be the border of O≺ . Let G = {g1 , . . . , gs } be the acyclic O≺ -border basis for a. The acyclic O≺ -border basis is constructed as in the proof of Theorem 5.9. Since G is an acyclic O≺ -border basis we have from Proposition 5.10 that for any f ∈ a, f reduces to zero. This implies that G is a Gröbner basis of a. Further, hLt(a)i is generated by ∂O≺ . Recall that, hLc(α, a)i = hLc(f ) : f ∈ a, Lm(f ) = xα i and hLc(< α, a)i = hLc(f ) : f ∈ a, α ∈ deg(f ) + Mn , Lm(f ) 6= xα i. Clearly, for each monomial xα , in the monomial part, Mon(O≺ ), hLc(α, a)i = Ixα . From the definition of order ideal hLc(α, a)i 6= h1i. For each monomial xα in the monomial border, ∂O≺m , hLc(α, a)i = h1i. Also, for each monomial xα ∈ Lm(G), we have Gen(α, a) = {η(a, hLc(< α, a)i) : a ∈ Gen(hLc(α, a)i)} \ {0}, where η(a, hLc(< α, a)i) maps to an element in the coset a + hLc(< α, a)i. Consider the set, ∂O≺red = {cxα ∈ ∂O≺ : c ∈ / hLc(< α, a)i}. This set contains all the terms of α the form cx in the border ∂O≺ such that c cannot be expressed as a combination of leading coefficients of those monomials that properly divide xα . Clearly, ∂O≺red ⊆ ∂O≺ . Let Gred ⊆ G consist of polynomials in G with the border term in ∂O≺red . It can easily be seen that hLt(a)i = h∂O≺red i. Therefore, Gred is a Gröbner basis for a. Also, it is clear from the construction of ∂O≺red that Gen(α, a) = {c : cxα ∈ ∂O≺red }. We now prove that G satisfies the two properties of Pauer’s reduced Gröbner basis. 18 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS The bijectivity of the map, φ : {g ∈ Gred : deg(g) = α} −→ Gen(α, a) φ(g) 7−→ Lc(g) follows from the observation that corresponding to each border term cxβ ∈ ∂O≺ , there is exactly one polynomial g ∈ G such that the border term in g is cxβ . If we had not considered the reduced border ∂O≺red , then for all g ∈ G \ Gred , φ(g) will map to zero. Also, each polynomial gi ∈ Gred is of the form, ci x β i − t X (i) (i) aj xαj where ci xβi ∈ ∂O≺ and aj xαj ∈ O≺ . j=1 (i) (i) Since for each aj xαj , aj ∈ A/Ixαj we have that (i) (i) η(aj , hLc(αj , a)i) = aj . Hence Gred satisfies the second condition of Pauer’s reduced Gröbner basis. Therefore, Gred is a reduced Gröbner basis for a.  Theorem 5.14. Let a be a nonzero ideal in A[x1 , . . . , xn ], O be an order ideal and ∂O = {c1 xβ1 , . . . , cs xβs } be its border. Let Mon(O) = {xα1 , . . . , xαt } be the monomial part of O and G = {g1 , . . . , gs } be an acyclic O-border prebasis. Then the following statements are equivalent. G is an acyclic O-border basis for a. G f ∈ a if and only if f − →+ 0. fP∈ a if and only if there exists f1 , . . . , fs ∈ A[x1 , , . . . , xn ] such that f = s i=1 fi gi and max{deg(fi ) | fi gi 6= 0, i = 1, . . . , s} = indO (f ) − 1. (iv) The border form of a, BFO (a) = hc1 xβ1 , . . . , cs xβs i. (i) (ii) (iii) Proof. (i) ⇒ (ii). The claim follows from the proof of Proposition 5.10. (ii) ⇒ (iii). Let f ∈ a. By the border division algorithm, there exists Ps f 1 , . . . , f s ∈ A[x1 , , . . . , xn ], deg(fi ) ≤ indO (f ) − 1, 1 ≤ i ≤ s such that f = i=1 fi gi . Assume that max{deg(fi )} indO (f ) − 1. It can easily be verified that indO (fi gi ) ≤ indO (gi ) + deg(fi ). The definition of O-border prebasis implies that indO (gi ) = 1. Thus indO (fi gi ) ≤ deg(fi ) + 1 indO (f ) − 1 + 1. Thus indO (fi gi ) indO (f ). Also it can be seen that, indO (f + g) ≤ max{indO (f ), indO (g)}, when either indO (f ) ≥ 1 or indP O (g) ≥ 1. Thus, indO ( si=1 fi gi ) indO (f ). This is a contradiction. Hence max{deg(fi )} = indO (f )− 1. (iii) ⇒ (iv) Since each gi ∈ a and BFO (gi ) = ci xβi , we have hc1 xβ1 , . . . , cs xβs i ⊆ BFO (a). Consider a polynomial f ∈ a. Suppose indO (f ) ≥ 1, then by Definitions 3.22 and 3.25 each term in BFO (f ) is divisible by cxβ ∈ ∂O. Hence, it follows that BFO (f ) ∈ hc1 xβ1 , . . . , cs xβs i. Let I be the proper order function associated with the order ideal O. Now let us assume there exists a polynomial f ∈ a \ {0} such that indO (f ) = 0 i.e., Pt that αthe i f = i=1P ci x where ci ∈ / Ixαi . Then by hypothesis, there exist fi s, 1 ≤ i ≤ s, such s that f = i=1 fi gi and max{deg(fi ) | fi gi 6= 0, i = 1, . . . , s} = 0 − 1 = −1. This is BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 19 not possible since deg(f ) ≥ 0 for all f ∈ A[x1 , . . . , xn ]. This implies that f = 0 which is a contradiction. Therefore, indO (f ) ≥ 1. Thus, BFO (a) ⊆ hc1 xβ1 , . . . , cs xβs i. The claim follows. (iv) ⇒ (i). Consider a polynomial f ∈ A[x1 , . . . , xn ]. By the border division algorithm, we have f1 , . . . , fs ∈ A[x1 , . . . , xn ] and a1 , . . . , at ∈ A such that f = f1 g1 + · · · + fs gs + a1 xα1 + · · · + at xαt . P P Since si=1 fi gi ∈ a, f = h mod a, where h = tj=1 aj xαj . We are given that the O-border prebasis, G is acyclic. Without loss of generality, let us assume that G is well ordered. Find the smallest i for which the border term in gi belongs to ∂Os and assume that the monomial in the border term is xα1 . Let G1 ⊆ G represent all the polynomials for which the border monomial is xα1 and let |G1 | = s1 . Let the ideal Ixα1 be generated by {c1 , . . . , cs1 } and let b1 ∈ CIxα1 be the coset representative of a1 + Ixα1 . Then there exist d1 , . . . , ds1 ∈ A such that (a1 − b1 ) = d1 c1 + · · · + ds1 cs1 . Let h1 = h − d1 g1 + · · · + ds1 gs1 . Therefore we have, h1 = b1 xα1 + b02 xα2 + · · · + b0t xαt , where b0i ∈ A, i ∈ {2, . . . , t}. Further, h1 = h mod a. Repeating the above process for the remaining monomials in ∂Os in the same sequence as the well ordered basis, we get hs0 = b1 xα1 + . . . + bs0 xαs0 + bs0 +1 xαs+1 + · · · + bt xαt , where each bi is a coset representative in CIxαi . Note that for xαi , s0 + 1 ≤ i ≤ t, Ixαi = {0} and bi ∈ A. The acyclicity of the basis ensures that at each stage, i, all bj , j i will not be modified. Further, at every stage i, the intermediate polynomial, hi = hi−1 mod a. Therefore, hs0 = h mod a which implies that f = hs0 mod a. Further, each bi is a coset representative in CIxαi where xαi ∈ Mon(O). Hence, P A[x1 , . . . , xn ]/a = { ti=1 ai xαi + a | ai ∈ CIxαi }. To prove the secondPcondition of the order span definition (Definition 5.1), consider a polynomial f = ti=1 ai xαi ∈ a. Then, there exists an i ∈ {1, . . . , t} such that ai xαi ∈ BFO (f ). By hypothesis we have, BFO (a) = hc1 xβ1 , . . . , cs xβs i. Since BFO (a) is an ideal generated by terms, we have ai xαi ∈ BFO (a). Thus, there exists terms di xγi , 1 ≤ i ≤ s such that s X ai x α i = (di xγi )(ci xβi ). i=1 β Since for all x |x αi Ixβ ⊆ Ixαi , we have ai ∈ Ixαi . 0 Consider a proper order function, I such that for any xα ∈ Mon(A[x1 , . . . , xn ]), 0 0 0 0 either Ixα ( Ixα or Ixα = Ixα . Let O be the order ideal associated with I and 0 0 0 0 ∂O = {c1 xβ1 , . . . , cl xβl } be the corresponding border. Assume that Mon(O ) satisfies 0 0 (i) and (ii). Consider the ideal, A = hc1 xβ1 , . . . , cl xβl i. We have, A ( BFO (a) 0 since Ixα ( Ixα for some xα . Consider cω xω ∈ BFO (a) \ A. Let h denote the remO,G (cω xω ). Then each non zero term in h is of the form dγ xγ such that dγ ∈ A/Ixγ 20 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS 0 0 and xγ ∈ Mon(O). Since dγ ∈ / Ixγ , it is not an element of Ixγ . Also, cω ∈ / Ixω . 0 Therefore, Mon(O ) fails to satisfy Condition (ii) of the definition of order span for cω xω −h and therefore we have a contradiction. Thus G = {g1 , . . . , gs } is an O-border basis for a.  6. A Full Example In this section, we illustrate the concepts given in this paper with an example. Example 6.1. Let us consider the polynomial ring, Z[x, y]. Let I be an order function such that I1 = {0}, Ix = {0}, Iy = {0}, Ixy = {0}, Iy2 = {0}, Ix2 = h2i, Ix2 y = h2i and the rest of the monomials map to h1i. Therefore, CI1 = CIx = CIy = CIxy = CIy2 = Z and CIx2 = CIx2 y = {0, 1}. The set, O ={a1 , a2 x, a3 y, a4 xy, a5 y 2 , a6 x2 , a7 x2 y | a1 , a2 , a3 , a4 , a5 ∈ Z, a6 , a7 ∈ {0, 1}} is an order ideal corresponding to I. The monomial part of O is the set Mon(O) = {1, x, y, x2 , y 2 , xy, x2 y}. The scalar border of the order ideal is ∂Os = {2x2 , 2x2 y} and the monomial border is ∂Om = {x3 , y 3 , xy 2 , x2 y 2 , x3 y}. Thus the border of O is the union of the scalar border and the monomial border, i.e., ∂O = ∂Om ∪ ∂Os = {x3 , y 3 , xy 2 , x2 y 2 , x3 y, 2x2 , 2x2 y}. Consider the set G = {g1 , g2 , g3 , g4 , g5 , g6 , g7 }, where g1 = x3 − x, g2 = y 3 − y, g3 = xy 2 −xy, g4 = x2 y 2 −x2 y, g5 = x3 y−xy, g6 = 2x2 y−y 2 −y and g7 = 2x2 +2xy−y 2 − 2x − y. The set G is an O-border prebasis for the ideal a = hg1 , g2 , g3 , g4 , g5 , g6 , g7 i. It is also clear that the O-border prebasis satisfies the properties of acyclicity. Hence G is an acyclic O-border prebasis. The set G is a Gröbner basis for a with deglex order with x > y. The proof of Theorem 5.9 implies that the set G is an acyclic O-border basis for a. Hence the border form ideal of a is generated by the border terms i.e., BFO (a) = hx3 , y 3 , xy 2 , x2 y 2 , x3 y, 2x2 , 2x2 yi. Now we demonstrate the border division algorithm (Algorithm 4.2) for a polynomial, f = x4 + 2x3 y 2 + x2 + 4xy + 15 w.r.t. G. We have Mon(O) = {xα1 , . . . , xα7 }, where xα1 = 1, xα2 = x, xα3 = y, xα4 = x2 , xα5 = y 2 , xα6 = xy and xα7 = x2 y. The monomial border is ∂Om = {b1 , . . . , b5 } and the scalar border is ∂Os = {b6 , b7 }, where b1 = x3 , b2 = y 3 , b3 = xy 2 , b4 = x2 y 2 , b5 = x3 y, b6 = 2x2 y and b7 = 2xy. (1) Initialize f1 = f2 = f3 = f4 = f5 = f6 = f7 = 0, l1 = l2 = l3 = l4 = l5 = l6 = l7 = 0 and h = x4 + 2x3 y 2 + x2 + 4xy + 15. (2) Since indO (h) = 2, Step 5 of the algorithm is executed. We have x4 = xb1 and deg(x) = indO (h) − 1. Hence, we have f1 = f1 + x and h = x4 + 2x3 y 2 + x2 + 4xy + 15 − x(x3 − x). Thus, h = 2x3 y 2 + 2x2 + 4xy + 15. Return to Step 2. BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 21 (3) Again, indO (h) = 2 and we return to Step 5 of the algorithm. We have x3 y 2 = xb4 and deg(x) = indO (h) − 1. After the reduction step we have f4 = f4 + 2x and h = 2x3 y 2 + 2x2 + 4xy + 15 − 2x(x2 y 2 − x2 y) = 2x3 y + 2x2 + 4xy + 15. We return to Step 2. (4) In this step, indO (h) = 1 and the polynomial h has the monomial x3 y in its support. Since x3 y ∈ ∂Om , we go to Step 5. We have x3 y = 1 · b5 and deg(1) = indO (h) − 1. We perform the operation f5 = f5 + 2 and h = 2x3 y + 2x2 + 4xy + 15 − 2(x3 y − xy). Hence, h = 2x2 + 6xy + 15. We return to Step 2. (5) We have indO (h) = 1 and none of the terms in h are in the monomial border, ∂Om . Hence, we perform Step 4 of the algorithm. We have 2x2 = 1·b1 . Thus, we have f7 = f7 + 1 and h = 2x2 + 6xy + 15 − 1(2x2 + 2xy − y 2 − 2x − y). Hence, h = 4xy + y 2 + 2x + y + 15. (6) We have indO (h) = 0 and Step 3 of the algorithm is executed. We have l1 = l1 + 15, l2 = l2 + 2, l3 = l3 + 1, l4 = l4 + 0, l5 = l5 + 1, l6 = l6 + 4 and l7 = l7 + 0. The algorithm terminates and returns (f1 , . . . , f7 , l1 , . . . , l7 ). Thus we have the following representation for f , f =xg1 + 0g2 + 0g3 + 1g4 + 2g5 + 0g6 + 1g7 + 15 + 2x + y + 0x2 + 1y 2 + 4xy + 0x2 y. The O-remainder of f is remO,G (f ) = 15 + 2x + y + y 2 + 4xy. Since the remainder is not equal to zero, by Proposition 5.10, f ∈ / a. For this example, the normal form of f is equal to the O-remainder, NFO,G (f ) = remO,G (f ) = 15 + 2x + y + y 2 + 4xy. 7. Concluding Remarks The theory of border bases is popular in the symbolic computation community owing to its numerical stability and mathematical elegance. In (Francis & Dukkipati, 2014) it has been shown that border bases can be extended to polynomial rings over rings if the corresponding residue class ring is free and if one can find its free representation with respect to a monomial order by using Gröbner bases. In this paper we attempted to extend the theory to a much more general case. A theory was built for a special class of generators of the ideal called acyclic border bases. We proved that the set of acyclic border bases contains all the reduced Gröbner bases associated with all term orders. A future direction in this work is to determine an algorithmic characterization for border bases in this case. References Adams, W. W. & Loustaunau, P. (1994). An Introduction to Gröbner Bases, vol. 3 of Graduate Studies in Mathematics. American Mathematical Society. Ajtai, M. (1996). Generating hard instances of lattice problems (Extended Abstract). In: Proceedings of the 1996 ACM Symposium on the Theory of Computing, STOC (Miller, G. L., ed.). ACM. 22 AMBEDKAR DUKKIPATI, NITHISH PAI AND MARIA FRANCIS Ananth, P. V. & Dukkipati, A. (2012). Complexity of Gröbner basis detection and border basis detection. Theoretical Computer Science 459, 1–15. Buchberger, B. (1965). An Algorithm for Finding a Basis for the Residue Class Ring of a ZeroDimensional Polynomial Ideal (in German). Ph.D. thesis, University of Innsbruck, Austria. (reprinted in ?). Francis, M. & Dukkipati, A. (2014). On reduced Gröbner bases and Macaulay-Buchberger basis theorem over noetherian rings. Journal of Symbolic Computation 65, 1–14. Greuel, G.-M., Seelisch, F. & Wienand, O. (2011). The Gröbner basis of the ideal of vanishing polynomials. Journal of Symbolic Computation 46(5), 561–570. Hoffstein, J., Pipher, J. & Silverman, J. (1998). NTRU: A ring-based public key cryptosystem. In: Algorithmic Number Theory (Buhler, J., ed.), vol. 1423 of Lecture Notes in Computer Science. Springer. Kehrein, A. & Kreuzer, M. (2005). Characterizations of border bases. Journal of Pure and Applied Algebra 196(2-3), 251–270. Kehrein, A. & Kreuzer, M. (2006). Computing border bases. Journal of Pure and Applied Algebra 205(2), 279–295. Kehrein, A., Kreuzer, M. & Robbiano, L. (2005). An algebraist’s view on border bases. In: Solving Polynomial Equations (Dickenstein, A. & Emiris, I. Z., eds.), vol. 14 of Algorithms and Computation in Mathematics. Springer, pp. 169–202. Lyubashevsky, V. & Micciancio, D. (2006). Generalized compact knapsacks are collision resistant. In: ICALP (2). Möller, H. M. (1988). On the construction of Gröbner bases using syzygies. Journal of Symbolic Computation 6(2-3), 345–359. Pauer, F. (2007). Gröbner bases with coefficients in rings. Journal of Symbolic Computation 42(11-12), 1003–1011. Sato, Y., Inoue, S., Suzuki, A., Nabeshima, K. & Sakai, K. (2011). Boolean Gröbner bases. Journal of Symbolic Computation 46(5), 622–632. Stetter, H. J. (2004). Numerical Polynomial Algebra. Society for Industrial and Applied Mathematics. Trinks, W. (1978). Über B. Buchbergers Verfahren, Systeme algebraischer Gleichungen zu lösen. Journal of Number Theory 10(4), 475–488. Zacharias, G. (1978). Generalized Gröbner Bases in Commutative Polynomial Rings. Master’s thesis, MIT,Cambridge,MA. Example 7.1. We consider Example 3.5. The set G = {g1 , . . . , g7 }, where g1 = xy − x, g2 = y 2 − y, g3 = x3 − 2y, g4 = x2 y − x2 + 10, g5 = 4x − 2y, g6 = 3y − 3x and g7 = 2x2 − x + 5 is an O-border prebasis but it is not acyclic. Let G0 = {g10 , . . . , g70 } where g10 = xy − x, g20 = y 2 − y, g30 = x3 − x2 + 6, g40 = x2 y − y + 5, g50 = 4x − 7, g60 = 3y − x and g70 = 2x2 − 2y − 3x which is also a O-border prebasis but it is acyclic since the permutation of G0 , {g10 , g20 , g30 , g40 , g70 , g60 , g50 } satisfies the acyclicity condition. Example 7.2. Consider Example 3.6. The set G = {g1 , . . . , g15 }, where g1 = x3 − 3, g2 = x2 y − 3u1 y, g3 = x2 z − 2z, g4 = xy 2 − x + 10, g5 = xyz − 11xy, g6 = xz 2 − u2 u21 x2 , g7 = y 2 − x + u1 u2 , g8 = yz − 3y + 2, g9 = z 2 + 5xz + 11u1 x, g10 = u21 y + u2 x + 3, g11 = (u22 − 3u1 )z − u22 y, g12 = u21 xy + 3u1 x − 2z, g13 = (u22 − 1)xy + 2x2 , g14 = u1 xz + 3u1 x2 , g15 = u2 xz + 2u1 xy + 4x2 − 4z − 10u1 y + 14 is an acyclic O-border prebasis since the following permutation of G, {g1 , g2 , g3 , g4 , g5 , g6 , g7 , g8 , g9 , g14 , g15 , g13 , g12 , g11 , g10 } satisfies the acyclicity condition. E-mail address: [email protected], [email protected], [email protected] BORDER BASES FOR POLYNOMIAL RINGS OVER NOETHERIAN RINGS 23 Dept. of Computer Science & Automation, Indian Institute of Science, Bangalore - 560012
0math.AC
Under review as a conference paper at ICLR 2016 A D EEP M EMORY- BASED A RCHITECTURE TO -S EQUENCE L EARNING FOR S EQUENCE - arXiv:1506.06442v4 [cs.CL] 7 Jan 2016 Fandong Meng1∗ Zhengdong Lu2 Zhaopeng Tu2 Hang Li2 and Qun Liu1 1 Institute of Computing Technology, Chinese Academy of Sciences {mengfandong, liuqun}@ict.ac.cn 2 Noah’s Ark Lab, Huawei Technologies {Lu.Zhengdong, Tu.Zhaopeng, HangLi.HL}@huawei.com A BSTRACT We propose D EEP M EMORY, a novel deep architecture for sequence-to-sequence learning, which performs the task through a series of nonlinear transformations from the representation of the input sequence (e.g., a Chinese sentence) to the final output sequence (e.g., translation to English). Inspired by the recently proposed Neural Turing Machine (Graves et al., 2014), we store the intermediate representations in stacked layers of memories, and use read-write operations on the memories to realize the nonlinear transformations between the representations. The types of transformations are designed in advance but the parameters are learned from data. Through layer-by-layer transformations, D EEP M EMORY can model complicated relations between sequences necessary for applications such as machine translation between distant languages. The architecture can be trained with normal back-propagation on sequenceto-sequence data, and the learning can be easily scaled up to a large corpus. D EEP M EMORY is broad enough to subsume the state-of-the-art neural translation model in (Bahdanau et al., 2015) as its special case, while significantly improving upon the model with its deeper architecture. Remarkably, D EEP M EMORY, being purely neural network-based, can achieve performance comparable to the traditional phrase-based machine translation system Moses with a small vocabulary and a modest parameter size. 1 I NTRODUCTION Sequence-to-sequence learning is a fundamental problem in natural language processing, with many important applications such as machine translation (Bahdanau et al., 2015; Sutskever et al., 2014), part-of-speech tagging (Collobert et al., 2011; Vinyals et al., 2014) and dependency parsing (Chen & Manning, 2014). Recently, there has been significant progress in development of technologies for the task using purely neural network-based models. Without loss of generality, we consider machine translation in this paper. Previous efforts on neural machine translation generally fall into two categories: • Encoder-Decoder: As illustrated in left panel of Figure 1, models of this type first summarize the source sentence into a fixed-length vector by the encoder, typically implemented with a recurrent neural network (RNN) or a convolutional neural network (CNN), and then unfold the vector into the target sentence by the decoder, typically implemented with a RNN (Auli et al., 2013; Kalchbrenner & Blunsom, 2013; Cho et al., 2014; Sutskever et al., 2014); • Attention-Model: with RNNsearch (Bahdanau et al., 2015; Luong et al., 2015) as representative, it represents the source sentence as a sequence of vectors after a RNN (e.g., a bi-directional RNN (Schuster & Paliwal, 1997)), and then simultaneously conducts dynamic alignment with a gating neural network and generation of the target sentence with another RNN, as illustrated in right panel of Figure 1. Empirical comparison between the approaches indicates that the attention-model is more efficient than the encoder-decoder approach: it can achieve comparable results with far less parameters and training instances (Jean et al., 2015). This superiority in efficiency comes mainly from the mechanism of dynamic alignment, which avoids the need to represent the entire source sentence with a fixed-length vector (Sutskever et al., 2014). ∗ The work was done when the first author worked as intern at Noah’s Ark Lab, Huawei Technologies. 1 Under review as a conference paper at ICLR 2016 Encoder-Decoder Attention model Figure 1: Two types of neural machine translators. Note the pictorial illustrations may deviate from individual models e.g., Sutskever et al. (2014), on modeling details. 1.1 D EEP M EMORY- BASED A RCHITECTURE Both encoder-decoders and attention models can be reformalized in the language of Neural Turing Machines (NTM) (Graves et al., 2014), by replacing different forms of representations as content in memories and the operations on them as basic neural net-controlled read-write actions, as illustrated in the left panel of Figure 2. This is clear after realizing that the attention mechanism (Bahdanau et al., 2015) is essentially a special case of reading (in particular with content-based addressing ) in NTM on the memory that contains the representation of source sentence. More importantly, under this new view, the whole process becomes transforming the source sentence and putting it into memory (vector or array of vectors), and reading from this memory to further transform it into the target sentence. This architecture is intrinsically shallow in terms of the transformations on the sequence as an object, with essentially one hidden “layer”, as illustrated in the left panel of Figure 2. Note that although RNN (as encoding/decoding or equivalently as controller in NTM) can be infinitely deep, this depth is merely for dealing with the temporal structure within the sequence. On the other hand, many sequence-to-sequence tasks, e.g, translation, are intrinsically complex and calls for more complex and powerful transformation mechanism than that in encoder-decoder and attention models. Figure 2: Space holder for NTM view of things For this reason, we propose a novel deep memory-based architecture, named D EEP M EMORY, for sequenceto-sequence learning. As shown in the right panel of Figure 2, D EEP M EMORY carries out the task through a series of non-linear transformations from the input sequence, to different levels of intermediate memory-based representations, and eventually to the final output sequence. D EEP M EMORY is essentially a customized and deep version of NTM with multiple stages of operations controlled by a program, where the choices of “layers” and types of read/write operations between layers are tailored for a particular task. Through layer-by-layer stacking of transformations on memory-based representations, D EEP M EMORY generalizes the notion of inter-layer nonlinear mapping in neural networks, and therefore introduces a powerful new deep architecture for sequence-to-sequence learning. The aim of D EEP M EMORY is to learn the representation of sequence better suited to the task (e.g., machine translation) through layer-by-layer transformations. Just as in deep neural network (DNN), we expect that stacking relatively simple transformations can greatly enhance the expressing power and the efficiency of D EEP M EMORY, especially in handling translation between languages with vastly different nature (e.g., Chinese and English) and sentences with complicated structures. D EEP M EM ORY naturally subsumes current neural machine translation models (Bahdanau et al., 2015; Sutskever et al., 2014) as special cases, but more importantly it accommodates many deeper alternatives with more modeling power, which are empirically superior to the current shallow architectures on machine translation tasks. Although D EEP M EMORY is initially proposed for machine translation, it can be adapted for other tasks that require substantial transformations of sequences, including paraphrasing, reasoning (Peng et al., 2015), and semantic parsing (Yin et al., 2015). Also, in defining the layer-by-layer transformations, we can go beyond the read-write operations proposed in (Graves et al., 2014) and design differentiable operations for the specific structures of the task (e.g., in (Yin et al., 2015)). 2 Under review as a conference paper at ICLR 2016 RoadMap We will first discuss in Section 2 the read-write operations as a new form of non-linear transformation, as the building block of D EEP M EMORY. Then in Section 3, we stack the transformations together to get the full D EEP M EMORY architecture, and discuss several architectural variations of it. In Section 4 we report our empirical study of D EEP M EMORY on a Chinese-English translation task. 2 R EAD -W RITE AS A N ONLINEAR T RANSFORMATION We start with discussing read-write operations between two pieces of memory as a generalized form of nonlinear transformation. As illustrated in Figure 3 (left panel), this transformation is between two non-overlapping memories, namely R-memory and W -memory, with W -memory being initially blank. A controller operates the read-heads to get the values from R-memory (“reading”), which are then sent to the write-head for modifying the values at specific locations in W -memory (“writing”). After those operations are completed, the content in R-memory is considered transformed and written to W -memory. These operations therefore define a transformation from one representation (in R-memory) to another (in W -memory), which is pictorially noted in the right panel of Figure 3. Figure 3: Read-write as an nonlinear transformation. These basic components are more formally defined below, following those in a generic NTM (Graves et al., 2014), with however important modifications for the nesting architecture, implementation efficiency and description simplicity. Memory: a memory is generally defined as a matrix with potentially infinite size, while here we limit ourselves to pre-determined (pre-claimed) N × d matrix, with N memory locations and d values in each location. In our implementation of D EEP M EMORY, N is always instance-dependent and is pre-determined by the algorithm1 . Memories of different layers generally have different d. Now suppose for one particular instance (index omitted for notational simplicity), the system reads from the R-memory (MR , with NR units) and writes to W -memory (denoted MW , with NW units) R R-memory: MR = {x1R , x2R , · · · , xN }, R W W -memory: MW = {x1W , x2W , · · · , xN }, W with xnR ∈ RdR and xnW ∈ RdW . Read/write heads: a read-head gets the values from the corresponding memory, following the instructions of the controller, which also influences the controller in feeding the state-machine. D EEP M EMORY allows multiple read-heads for one controller, with potentially different addressing strategies (see Section 2.1 for more details). A write-head simply takes the instruction from controller and modifies the values at specific locations. Controller: The core to the controller is a state machine, implemented as a RNN Long Short-Term Memory (LSTM) (Hochreiter & Schmidhuber, 1997), with state at time t denoted as st (as illustrated in Figure 3). With st , the controller determines the reading and writing at time t, while the return of reading in turn takes part in updating the state. For simplicity, only one reading and writing is allowed at one time step, but more than one read-heads are allowed. The main equations for controllers are then R EAD VECTOR : W RITE VECTOR : S TATE UPDATE : rt = FR (MR , st ; ΘR ) vt = FW (st ; ΘW ) st+1 = FD (st , rt ; ΘD ) 1 It is possible to let the controller learn to determine the length of the memory, but that does not yield better performance on our tasks and is therefore omitted here. 3 Under review as a conference paper at ICLR 2016 where FD (·), FR (·) and FW (·) are respectively the operators for dynamics, reading and writing2 , parameterized by ΘD , ΘR , and ΘW . In D EEP M EMORY, 1) it is only allowed to read from memory of lower layer and write to memory of higher layer, and 2) reading memory can only be performed after finishing the writing to it. The above read-write operations transform the representation in R-memory to the new representation in W memory, while the design choice of read-write specifies the inner structure of the memories in W -memory. The transformation is therefore jointly specified by the read-write strategies (e.g., the addressing described in Section 2.1) and the parameters learned in a supervised fashion (described later in Section 3.2). Memory with the designed inner structure, in this particular case vector array with instance specific length, offers more flexibility than a fixed-length vector in representing sequences. This representational flexibility is particularly advantageous when combined with proper reading-writing strategy in defining nonlinear transformations for sequences, which will serve as the building block of the deep architecture. 2.1 A DDRESSING 2.1.1 A DDRESSING FOR R EADING Location-based Addressing With location-based addressing (L-addressing), the reading is simply rt = xtR . Notice that with L-addressing, the state machine automatically runs on a clock determined by the spatial structure of R-memory. Following this clock, the write-head operates the same number of times. One important variant, as suggested in (Bahdanau et al., 2015; Sutskever et al., 2014), is to go through R-memory backwards after the forward reading pass, where the controller RNN has the same structure but is parameterized differently. Content-based Addressing With a content-based addressing (C-addressing), the return at t is rt = FR (MR , st ; ΘR ) = NR X g(st , xnR ; ΘR ) g̃(st , xnR ; ΘR )xnR , and g̃(st , xnR ; ΘR ) = PNR , R n=1 n0 =1 g(st , xn0 ; ΘR ) where g(st , xnR ; ΘR ), implemented as a DNN, gives an un-normalized “affliiation” score for unit xnR in Rmemory. Clearly it is related to the attention mechanism introduced in (Bahdanau et al., 2015) for machine translation and general attention models discussed in (Gregor et al., 2015) for computer vision. Content-based addressing offers the following two advantages in representation learning: 1. it can focus on the right segment of the representation, as demonstrated by the automatic alignment observed in (Bahdanau et al., 2015), therefore better preserving the information in lower layers; 2. it provides a way to alter the spatial structure of the sequence representation on a large scale, for which the re-ordering in machine translation is an intuitive example. Hybrid Addressing: With hybrid addressing (H-addressing) for reading, we essentially use two read-heads (can be easily extended to more), one with L-addressing and the other with C-addressing. At each time t, the controller simply concatenates the return of two individual read-heads as the final return: NR X rt = [xtR , g(st , xnR ; ΘR )xnR ]. n=1 It is worth noting that with H-addressing, the tempo of the state machine will be determined by the L-addressing read-head, and therefore creates W -memory of the same number of locations in writing. As shown later, Haddressing can be readily extended to allow read-heads to work on different memories. 2.1.2 A DDRESSING FOR W RITING Location-based Addressing With L-addressing, the writing is simple. At any time t, only the tth location in def W -memory is updated: xtW = vt = FW (st ; ΘW ), which will be kept unchanged afterwards. For both locationand content-based addressing, FW (st ; ΘW ) is implemented as a DNN with weights ΘW . Content-based Addressing In a way similar to C-addressing for reading, the units to write is determined W through a gating network g(st , xn,t ; ΘW ), where the values in W -memory at time t is given by W W W ∆n,t = g̃(st , xn,t ; ΘW )FW (st ; ΘW ), xn,t = (1 − αt )xn,t−1 + αt ∆n,t , n = 1, 2, · · · , NW , 2 Note that our definition of writing is slightly different from that in (Graves et al., 2014). 4 Under review as a conference paper at ICLR 2016 W where xn,t stands for the values of the nth location in W -memory at time t, α is the forgetting factor (similarly defined as in (Graves et al., 2014)), g̃ is the normalized weight (with unnormalized score implemented also with a DNN) given to the nth location at time t. 2.2 T YPES OF N ONLINEAR T RANSFORMATIONS As the most “conventional” special case, if we use L-addressing for both reading and writing, we actually get the familiar structure in units found in RNN with stacked layers (Pascanu et al., 2014). Indeed, as illustrated in the figure right to the text, this read-write strategy will invoke a relatively local dependency based on the original spatial order in R-memory. It is not hard to show that we can recover some deep RNN model in (Pascanu et al., 2014) after stacking layers of read-write operations like this. This deep architecture actually partially accounts for the great performance of the Google neural machine translation model (Sutskever et al., 2014). The C-addressing, however, be it for reading and writing, offers a means of major reordering on the units, while H-addressing can add into it the spatial structure of the lower layer memory. In this paper, we consider four types of transformations induced by combinations of the read and write addressing strategies, listed pictorially in Figure 4. Notice that 1) we only include one combination with C-addressing for writing since it is computationally expensive to optimize when combined with a C-addressing reading (see Section 3.2 for some analysis) , and 2) for one particular read-write strategy there are still a fair amount of implementation details to be specified, which are omitted due to the space limit. One can easily design different read/write strategies, for example a particular way of H-addressing for writing. Figure 4: Examples of read-write strategies. 3 D EEP M EMORY : S TACKING T HEM T OGETHER As illustrated in Figure 5 (left panel), the stacking is straightforward: we can just apply a transformation on top of another, with the W -memory in lower layer being the R-memory of upper layer. The entire deep architecture of D EEP M EMORY, with diagram in Figure 5 (right panel), can be therefore defined accordingly. Basically, it starts with a symbol sequence (Layer-0), then moves to the sequence of word embeddings (Layer-1), through layers of transformation to reach the final intermeidate layer (Layer-L), which will be read by the output layer. The operations in output layer, relying on another LSTM to generate the target sequence, are similar to a memory read-write, with the following two differences: • it predicts the symbols for the target sequence, and takes the “guess” as part of the input to update the state of the generating LSTM, while in a memory read-write, there is no information flow from higher layers to the controller; • since the target sequence in general has different length as the top-layer memory, it takes only pure C-addressing reading and relies on the built-in mechanism of the generating LSTM to stop (i.e., after generating a End-of-Sentence token). Memory of different layers could be equipped with different read-write strategies, and even for the same strategy, the configurations and learned parameters are in general different. This is in contrast to DNNs, for which the transformations of different layers are more homogeneous (mostly linear transforms with nonlinear activation function). A sensible architecture design in combining the nonlinear transformations can greatly affect the performance of the model, on which however little is known and future research is needed. 5 Under review as a conference paper at ICLR 2016 Figure 5: Illustration of stacked layers of memory (left) and the overall diagram of D EEP M EMORY (right). 3.1 C ROSS -L AYER R EADING In addition to the generic read-write strategies in Section 2.2, we also introduce the cross-layer reading into D EEP M EMORY for more modeling flexibility. In other words, for writing in any Layer-`, D EEP M EMORY allows reading from more than one layers lower than `, instead of just Layer-` − 1. More specifically, we consider the following two cases. M EMORY-B UNDLE : A M EMORY-B UNDLE, as shown in Figure 6 (left panel), concatenates the units of two aligned memories in reading, regardless of the addressing strategy. Formally, the nth location in the bundle (`0 +`00 ) = of memory Layer-`0 and Layer-`00 would be xn `0 > `00 > > [(xn ) , (xn ) ] . Since it requires strict alignment between the memories to put together, M EMORY-B UNDLE is usually on layers created with spatial structure of same origin (see Section 3.3 for examples). Figure 6: Cross-layer reading. S HORT-C UT Unlike M EMORY-B UNDLE, S HORT-C UT allows reading from layers with potentially different inner structures by using multiple read-heads, as shown in Figure 6 (right panel). For example, one can use a C-addressing read-head on memory Layer-`0 and a L-addressing read-head on Layer-`00 for the writing to memory Layer-` with `0 , `00 < `. 3.2 O PTIMIZATION For any designed architecture, the parameters to be optimized include {ΘD , ΘR , ΘW } for each controller, the parameters for the LSTM in the output layer, and the word-embeddings. Since the reading from each memory can only be done after the writing on it completes, the “feed-forward” process can be described in two scales: 1) the flow from memory of lower layer to memory of higher layer, and 2) the forming of a memory at each layer controlled by the corresponding state machine. Accordingly in optimization, the flow of “correction signal” also propagates at two scales: • On the “cross-layer” scale: the signal starts with the output layer and propagates from higher layers to lower layers, until Layer-1 for the tuning of word embedding; • On the “within-layer” scale: the signal back-propagates through time (BPTT) controlled by the corresponding state-machine (LSTM). In optimization, there is a correction for each reading or writing on each location in a memory, making the C-addressing more expensive than L-addressing for it in general involves all locations in the memory at each time t. The optimization can be done via the standard back-propagation (BP) aiming to maximize the likelihood of the target sequence. In practice, we use the standard stochastic gradient descent (SGD) and mini-batch (size 80) with learning rate controlled by AdaDelta (Zeiler, 2012). 6 Under review as a conference paper at ICLR 2016 3.3 A RCHITECTURAL VARIATIONS OF D EEP M EMORY We discuss four representative special cases of D EEP M EMORY: A RC -I, II, III and IV, as novel deep architectures for machine translation. We also show that current neural machine translation models like RNNsearch can be described in the framework of D EEP M EMORY as a relatively shallow case. A RC -I The first proposal, including two variants (A RC I HYB and A RC -I LOC ), is designed to demonstrate the effect of C-addressing reading between intermediate memory layers, with diagram shown in the figure right to the text. Both variants employ a L-addressing reading from memory Layer-1 (the embedding layer) and L-addressing writing to Layer-2. After that, A RC -I HYB writes to Layer-3 (Laddressing) based on its H-addressing reading (two readheads) on Layer-2, while A RC -I LOC uses L-addressing to read from Layer-2. Once Layer-3 is formed, it is then put together with Layer-2 for a M EMORY-B UNDLE, from which the output layer reads (C-addressing) for predicting the target sequence. M EMORY-B UNDLE, with its empirical advantage over single layers (see Section 4.2), is also used in other three architectures for generating the target sequence or forming intermediate layers. A RC -II As an architecture similar to A RC -I HYB , A RC -II is designed to investigate the effect of H-addressing reading from different layers of memory (or S HORT-C UT in Section 3.1). It uses the same strategy as A RC -I HYB in generating memory Layer-1 and 2, but differs in generating Layer-3, where A RC -II uses C-addressing reading on Layer-2 but L-addressing reading on Layer-1. Once Layer-3 is formed, it is then put together with Layer-2 as a M EMORY-B UNDLE, which is then read by the output layer for predicting the target sequence. A RC -III We intend to use this design to study a deeper architecture and more complicated addressing strategy. A RC -III follows the same way as A RC -II to generate Layer-1, Layer-2 and Layer-3. After that it uses two read-heads combined with a L-addressing write to generate Layer-4, where the two readheads consist of a L-addressing read-head on Layer-1 and a C-addressing readhead on the memory bundle of Layer-2 and Layer-3. After the generation of Layer-4, it puts Layer-2, 3 and 4 together for a bigger M EMORY-B UNDLE to the output layer. A RC -III, with 4 intermediate layers, is the deepest among the four special cases. Arc-IV This proposal is designed to study the efficacy of C-addressing writing in forming intermediate representation. It employs a L-addressing reading from memory Layer-1 and L-addressing writing to Layer-2. After that, it uses a L-addressing reading on Layer-2 to write to Layer-3 with C-addressing. For C-addressing writing to Layer-3, all locations in Layer-3 are randomly initialized. Once Layer-3 is formed, it is then bundled with Layer-2 for the reading (C-addressing) of the output layer. 3.3.1 R ELATION TO OTHER NEURAL MACHINE TRANSLATORS As pointed out earlier, RNNsearch (Bahdanau et al., 2015) with its automatic alignment, is a special case of D EEP M EMORY with shallow architecture. As pictorially illustrated in Figure 7, it employs L-addressing reading on memory Layer-1 (the embedding layer), and L-addressing writing to Layer-2, which then is read (C-addressing) by the output layer to generate the target sequence. As shown in Figure 7, Layer-2 is the only intermediate layer created by nontrivial read-write operations. On the other hand, the connection between D EEP M EMORY and encoder-decoder architectures is less obvious since they usually require the reading from only the last cell (i.e., for a fixed-length vector representation) between certain layers. More specifically, Sutskever et al. (2014) can be viewed as DeepMemory with stacking layers of L-addressing read-write (described in Section 2.2) for both the encoder and decoder part, while the two are actually connected through last hidden states of the LSTMs of the corresponding layers. 7 Under review as a conference paper at ICLR 2016 Attention-model diagram D EEP M EMORY diagram Figure 7: RNNsearch as a special case of D EEP M EMORY. 4 E XPERIMENTS We report our empirical study on applying D EEP M EMORY to Chinese-to-English translation. Our training data consist of 1.25M sentence pairs extracted from LDC corpora, with 27.9M Chinese words and 34.5M English words respectively. We choose NIST 2002 (MT02) dataset as our development set, and the NIST 2003 (MT03), 2004 (MT04) and 2005 (MT05) datasets as our test sets. We use the case-insensitive 4-gram NIST BLEU score as our evaluation metric, and sign-test (Collins et al., 2005) as statistical significance test. In training of the neural networks, we limit the source and target vocabularies to the most frequent 16K words in Chinese and English, covering approximately 95.8% and 98.3% of the two corpora respectively. We compare our method with two state-of-the-art SMT and NMT3 models: • Moses (Koehn et al., 2007): an open source phrase-based translation system with default configuration and a 4-gram language model trained on the target portion of training data with (Stolcke et al., 2002); • RNNsearch (Bahdanau et al., 2015): an attention-based NMT model with default setting (RNNsearchDEFAULT ), as well as an optimal re-scaling of the model (on sizes of both embedding and hidden layers, with about 50% more parameters) (RNNsearchBEST ). For a fair comparison, 1) the output layer in eachD EEP M EMORY variant is implemented as Gated Recurrent Units (GRU) in (Bahdanau et al., 2015), and 2) all the D EEP M EMORY architectures are designed to have the same embedding size as in RNNsearchDEFAULT with parameter size less or comparable to RNNsearchBEST . 4.1 R ESULTS The main results of different models are given in Table 1. RNNsearch (best) is about 1.7 points behind Moses in BLEU on average, which is consistent with the observations made by other authors on different machine translation tasks (Bahdanau et al., 2015; Jean et al., 2015). Remarkably, some sensible designs of D EEP M EM ORY (e.g., A RC -II) can already achieve performance comparable to Moses, with only 42M parameters, while RNNsearchBEST has 46M parameters. Clearly all D EEP M EMORY architectures yield performance significantly better than (A RC -I HYB , A RC -II & A RC -III) or comparable (A RC -I LOC & A RC -IV) to the NMT baselines. Among them, A RC -II outperforms the best setting of NMT baseline (RNNsearchBEST ), by about 1.5 BLEU on average with less parameters. S YSTEMS RNNsearchDEFAULT RNNsearchBEST A RC -I LOC A RC -I HYB A RC -II A RC -III A RC -IV Moses MT03 29.02 30.28 28.98 30.14 31.27* 30.15 29.88 31.61 MT04 31.25 31.72 32.02 32.70* 33.02* 33.46* 32.00 33.48 MT05 28.32 28.52 29.53* 29.40* 30.63* 29.49* 28.76 30.75 AVERAGE 29.53 30.17 30.18 30.75 31.64 31.03 30.21 31.95 PARAMETERS # 31M 46M 54M 54M 42M 53M 48M – Table 1: BLEU-4 scores (%) of NMT baselines: RNNsearchDEFAULT and RNNsearchBEST , D EEP M EMORY architectures (A RC -I, II, III and IV), and phrase-based SMT system (Moses). The “*” indicates that the results are significantly (p<0.05) better than those of the RNNsearchBEST . 3 There are recent progress on aggregating multiple models or enlarging the vocabulary(e.g., in (Jean et al., 2015)), but here we focus on the generic models. 8 Under review as a conference paper at ICLR 2016 D ISCUSSION About Depth: A more detailed comparison between RNNsearch (two layers), A RC -II (three layers) and A RC -III) (four layers), both quantitatively and qualitatively, suggests that with deep architectures are essential to the superior performance of D EEP M EMORY. Although the deepest architecture A RC -III is about 0.6 BLEU behind the A RC II, its performance on long sentences is significant better. Figure 8 shows the BLEU scores of generated translations on the test sets with respect to the length of the source sentences. In particular, we test the BLEU scores on sentences longer than {0, 10, 20, 30, 40, 50, 60} in the merged test set of MT03, MT04 and MT05. Clearly, on sentences with length >30, A RC -III yields consistently higher BLEU scores than A RC -II. This observation is further confirmed by our observations of translation quality (see Appendix) and is consistent with our intuition that D EEP M EMORY with its multiple layers of transformation, is especially good at modeling the transformations of representations essential to machine translation on relatively complicated sentences. 33 30 27 BLEU(%) 4.2 24 21 18 RNNsearch-best ARC-II ARC-III 15 12 0 10 20 30 40 50 sentence length (Merge) 60 Figure 8: The BLEU scores of generated translations on the merged three test sets with respect to the lengths of source sentences. The numbers on X-axis of the figure stand for sentences longer than the corresponding length, e.g., 30 for source sentences with > 30 words. About C-addressing Read: Further comparison between A RC -I HYB and A RC -I LOC (similar parameter sizes) suggests that C-addressing reading plays an important role in learning a powerful transformation between intermediate representations, necessary for translation between language pairs with vastly different syntactical structures. This conjecture is further verified by the good performances of A RC -II and A RC -III, both of which have C-addressing read-heads in their intermediate memory layers. However, if memory Layer-`+1 is formed with only C-addressing read from memory Layer-`, and serves as the only going to later stages, the performance is usually less satisfying. Comparison of this design with H-addressing (results omitted here) suggests that another read-head with L-addressing can prevent the transformation from going astray by adding the tempo from a memory with a clearer temporal structure. About C-addressing Write: The BLEU scores of A RC -IV are lower than that of A RC -II but comparable to that of RNNsearchBEST , suggesting that writing with C-addressing alone yields reasonable representation. A closer look shows that although A RC -IV performs poorly on very long sentences (e.g., source sentences with over 60 words), it does fairly well on sentences with normal length. More specifically, on source sentences with length ≤ 40, it outperforms RNNsearchBEST with 0.79 BLEU points. One possible explanation is that our particular implementation of C-addressing for writing in A RC -IV (Section 3.3) relies heavily on the randomly initialized content and is hard to optimize, especially when the structure of the sentence is complex, which might need to be “guided” by another write-head or some smart initialization. About Cross-layer Read: As another observation, cross-layer reading almost always helps. The performances of A RC -I, II, III and IV unanimously drop after removing the M EMORY-B UNDLE and S HORT-C UT (results omitted here), even after the broadening of memory units to keep the parameter size unchanged. It might be due to the flexibility gained in mixing different addressing modes and representations of different stages. 5 C ONCLUSION We propose D EEP M EMORY, a novel architecture for sequence-to-sequence learning, which is stimulated by the recent work of Neural Turing Machine (Graves et al., 2014) and Neural Machine Translation (Bahdanau et al., 2015). D EEP M EMORY builds its deep architecture for processing sequence data on the basis of a series of transformations induced by the read-write operations on a stack of memories. This new architecture significantly improves the expressive power of models in sequence-to-sequence learning, which is verified by our empirical study on a benchmark machine translation task. 9 Under review as a conference paper at ICLR 2016 R EFERENCES Auli, Michael, Galley, Michel, Quirk, Chris, and Zweig, Geoffrey. Joint language and translation modeling with recurrent neural networks. In Proceedings of EMNLP, pp. 1044–1054, 2013. Bahdanau, Dzmitry, Cho, Kyunghyun, and Bengio, Yoshua. Neural machine translation by jointly learning to align and translate. In Proceedings of ICLR, 2015. Chen, Danqi and Manning, Christopher D. A fast and accurate dependency parser using neural networks. In Proceedings of EMNLP, pp. 740–750, 2014. Cho, Kyunghyun, van Merrienboer, Bart, Gulcehre, Caglar, Bougares, Fethi, Schwenk, Holger, and Bengio, Yoshua. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In Proceedings of EMNLP, pp. 1724–1734, 2014. Collins, Michael, Koehn, Philipp, and Kučerová, Ivona. Clause restructuring for statistical machine translation. In Proceedings of ACL, pp. 531–540, 2005. Collobert, Ronan, Weston, Jason, Bottou, Léon, Karlen, Michael, Kavukcuoglu, Koray, and Kuksa, Pavel. Natural language processing (almost) from scratch. The Journal of Machine Learning Research, 12:2493– 2537, 2011. Graves, Alex, Wayne, Greg, and Danihelka, Ivo. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. Gregor, Karol, Danihelka, Ivo, Graves, Alex, and Wierstra, Daan. DRAW: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. Hochreiter, Sepp and Schmidhuber, Jürgen. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. Jean, Sébastien, Cho, Kyunghyun, Memisevic, Roland, and Bengio, Yoshua. On using very large target vocabulary for neural machine translation. In ACL-IJNLP, 2015. Kalchbrenner, Nal and Blunsom, Phil. Recurrent continuous translation models. In Proceedings of EMNLP, pp. 1700–1709, 2013. Koehn, Philipp, Hoang, Hieu, Birch, Alexandra, Callison-Burch, Chris, Federico, Marcello, Bertoldi, Nicola, Cowan, Brooke, Shen, Wade, Moran, Christine, Zens, Richard, Dyer, Chris, Bojar, Ondrej, Constantin, Alexandra, and Herbst, Evan. Moses: Open source toolkit for statistical machine translation. In Proceedings of ACL on interactive poster and demonstration sessions, pp. 177–180, Prague, Czech Republic, June 2007. Luong, Thang, Pham, Hieu, and Manning, Christopher D. Effective approaches to attention-based neural machine translation. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 1412–1421, 2015. Pascanu, Razvan, Gulcehre, Caglar, Cho, Kyunghyun, and Bengio, Yoshua. How to construct deep recurrent neural networks. In Proceedings of ICLR, 2014. Peng, Baolin, Lu, Zhengdong, Li, Hang, and Wong, Kam-Fai. Towards neural network-based reasoning. arXiv preprint arXiv:1508.05508, 2015. Schuster, Mike and Paliwal, Kuldip K. Bidirectional recurrent neural networks. Signal Processing, IEEE Transactions on, 45(11):2673–2681, 1997. Stolcke, Andreas et al. SRILM-an extensible language modeling toolkit. In Proceedings of ICSLP, volume 2, pp. 901–904, 2002. Sutskever, Ilya, Vinyals, Oriol, and Le, Quoc VV. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, pp. 3104–3112, 2014. Vinyals, Oriol, Kaiser, Lukasz, Koo, Terry, Petrov, Slav, Sutskever, Ilya, and Hinton, Geoffrey. Grammar as a foreign language. arXiv preprint arXiv:1412.7449, 2014. 10 Under review as a conference paper at ICLR 2016 Yin, Pengcheng, Lu, Zhengdong, Li, Hang, and Ben, Kao. Neural enquirer: Learning to query tables. arXiv preprint arXiv:1512.00965, 2015. Zeiler, Matthew D. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. 11 Under review as a conference paper at ICLR 2016 APPENDIX: ACTUAL T RANSLATION E XAMPLES In appendix we give some example translations from D EEP M EMORY, more specically, A RC -II and A RC III, and compare them against the reference and the translation given by RNNsearch. We will focus on long sentences with relatively complicated structures. E XAMPLE T RANSLATION OF A RC -II Source 反对派 国会 议员 昨天 拒绝 就 政府 提出 的 宪法 修正案 进行 表决 Reference yesterday opposition parliament members refused to vote on the constitutional amendment bill proposed by the government RNNsearch the members of the opposition parliament have refused to accept the decision on the amendment of the constitution DeepMemory (Arc-II) the opposition parliament members yesterday refused to vote on the constitutional amendment proposed by the government Source 谢瓦尔德纳泽 在 讲话 中 强调 了 在 此 问题 上 与 俄 美 两 国 进行 合作 和 交换 情 报 的 重要性 。 Reference in his address, shevardnadze stressed the importance of the exchange of intelligence with russia and the united states on this matter. RNNsearch in his speech , UNK stressed the importance of cooperation and exchange between the two countries on this question . DeepMemory (Arc-II) in his speech , UNK stressed the importance of cooperation and exchange of intelligence between russia and the united states on this issue . Source 博尔久扎 指出 , 独联体 集体 安全 条约 组织 快速 反应 部队 的 建立 有助于 遏制 中 亚 地区 的 极端 组织 势力 Reference bordyuzha noted that the creation of a fast reaction force by the cis collective security treaty organization would help contain the strength of extremist groups in central asia RNNsearch UNK pointed out that the establishment of the organization of the commonwealth of independent states ( cis ) is conducive to the maintenance of extremist organizations in the central asian region DeepMemory (Arc-II) UNK noted that the establishment of a rapid reaction force in the organization of collective security of the commonwealth of independent states is conducive to curbing the extremist forces in the central asian region Source 英格兰 说 , 五角大楼 是 在 一 、 两 天 前 确认 这 名 囚犯 身份 的 , 国务院 将 就 这 一 决定 通报 囚犯 所 属 的 国家 并 安排 有关 释放 事宜 。 Reference england said the pentagon verified the identity of this prisoner one or two days ago and that the state department will notify the home country of the prisoner of this decision and make arrangements for his release. RNNsearch england said that the pentagon was established in a and two days ago that the state council would inform the state of the decision and arrangements for the release of the detainees . DeepMemory (Arc-II) england said that the pentagon had confirmed the identity of the prisoners before one or two days ago , and the state council would notify the countries involved in the decision and arrange the release of the prisoners . 12 Under review as a conference paper at ICLR 2016 E XAMPLE T RANSLATION OF A RC -III Source 美国 副国务卿 阿米塔吉 今天 对 叙利亚 发出 警告 , 指称 大马士革 与 华府 未来 关系 的 发展 , 端 看 叙利亚 是否 愿 在 伊拉克 及 黎巴嫩 问题 上 与 美国 合作 。 Reference us deputy secretary of state armitage issued warnings to syria today, saying the development of future relations between damascus and washington depends on whether syria wants to cooperate with the united states on the issues of iraq and lebanon. RNNsearch us deputy secretary of state richard armitage issued a warning to syria today that the development of damascus , washington , and washington could see if syria is willing to cooperate with the united states in iraq and lebanon . DeepMemory (Arc-III) us deputy secretary of state richard armitage issued a warning today that the development of the damascus - washington relations in the future will depend on whether syria is willing to cooperate with the united states on iraq and lebanon issues . Source 俄罗斯 国营 石油 公司 正 与 俄罗斯 国营 瓦斯 公司 进行 合并 , 加上 尤干斯克 石油 天然气 公司 后 , 三 者 合计 将 掌控 俄罗斯 石油 总 生产 的 五分之一 以及 全部 天 然气 生产 , 一举 成为 全球 规模 最 大 能源 集团 。 Reference the russian state petroleum company is merging with the russian state gas company, and with the inclusion of yuganskneftegaz, the combined three will account for a fifth of russia's oil output and all its natural gas production, making it the largest global energy group. RNNsearch the russian state - run oil company is merging with the state - owned gas company , and the state - owned gas corp . DeepMemory (Arc-III) russia 's state - owned petroleum company is merging with the russian state - owned gas company , and the third country will have to control the one - fifth of russian oil production and to become the biggest energy group in the world . Source 希 土 两 国 同 为 北约 成员国 , 但 双方 在 爱琴海 领海 、 领空 以及 岛屿 大陆架 的 划分 和 塞浦路斯 等 问题 上 存在 利益 冲突 和 矛盾 , 也 影响 了 两 国 关系 的 正 常化 。 Reference both greece and turkey are nato members, but the two have conflicts of interest and clashes over maritime and air territories and continental shelf boundary disputes in the aegean sea and the issue of cyprus, which have affected the normalization of their bilateral relations. RNNsearch the two countries have maintained conflicts and contradictions in the fields of territorial waters , airspace , and islands , as well as contradictions and conflicts . DeepMemory (Arc-III) greece and turkey are the member countries of the nato , but the conflict of interests and contradictions between the two countries on the demarcation of the territorial waters , airspace , and the islands of the islands also adversely affect the normalization of relations between the two countries . 13
9cs.NE
Visualizing and Understanding Curriculum Learning for Long Short-Term Memory Networks Volkan Cirik, Eduard Hovy, Louis-Philippe Morency arXiv:1611.06204v1 [cs.CL] 18 Nov 2016 Department of Computer Science Language Technologies Institute Carnegie Mellon University Pittsburgh, PA 15213 {vcirik,hovy,morency}@cs.cmu.edu Abstract Curriculum Learning emphasizes the order of training instances in a computational learning setup. The core hypothesis is that simpler instances should be learned early as building blocks to learn more complex ones. Despite its usefulness, it is still unknown how exactly the internal representation of models are affected by curriculum learning. In this paper, we study the effect of curriculum learning on Long Short-Term Memory (LSTM) networks, which have shown strong competency in many Natural Language Processing (NLP) problems. Our experiments on sentiment analysis task and a synthetic task similar to sequence prediction tasks in NLP show that curriculum learning has a positive effect on the LSTM’s internal states by biasing the model towards building constructive representations i.e. the internal representation at the previous timesteps are used as building blocks for the final prediction. We also find that smaller models significantly improves when they are trained with curriculum learning. Lastly, we show that curriculum learning helps more when the amount of training data is limited. Introduction Inspired by the human learning process, Curriculum Learning (Elman, 1993; Bengio et al., 2009) is an algorithm that emphasizes the order of training instances in a computational learning setup. The main idea is that learning easy instances first could be helpful for learning more complex ones later in the training. The first algorithm proposed by Bengio et al. (2009), which we refer as one-pass curriculum, creates disjoint sets of training examples ordered by the complexity and used separately during training. The second algorithm called baby step curriculum uses an incremental approach where groups of more complex examples are incrementally added to the training set (Spitkovsky, Alshawi, and Jurafsky, 2010). These curriculum learning regimens were shown to improve performance in some Natural Language Processing and Computer Vision tasks (Pentina, Sharmanska, and Lampert, 2015; Spitkovsky, Alshawi, and Jurafsky, 2010). Despite its usefulness, it is still unknown how exactly computational models are affected internally by curriculum learning. An example of computational model particuCopyright c 2017, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. larly relevant to Natural Language Processing is Long ShortTerm Memory (LSTM) network (Hochreiter and Schmidhuber, 1997). LSTM networks have shown competitive performance in several domains such as handwriting recognition (Graves et al., 2009) and parsing (Vinyals et al., 2015). Surprisingly, curriculum learning has not been studied in the context of LSTM networks to our knowledge. Detailed visualizations and analyses of curriculum learning regimens with LSTM will allow us to better understand how models are affected and provides us insights when to use these regimens. Knowing how curriculum learning works, we can design new extensions and understand the nature of tasks most suited for these learning regimens. In this paper, we study the effect of curriculum learning on LSTM networks. We created experiments to directly compare two curriculum learning regimens, one-pass and baby step, with two baseline approaches that include the conventional technique of randomly ordering the training samples. We use two benchmarks for our analyses. First, a synthetic task is designed which is similar to several Natural Language Processing tasks where a sequence of symbols are observed and a particular function (e.g. analogous to a linguistic or a semantic phenomenon) is aimed to be learned. Second, we use sentiment analysis where the polarity of subjective opinions is classified – a fundamental task in Natural Language Processing. As mentioned previously, this is the first work studying LSTM networks on sentiment analysis with curriculum learning to our knowledge. Our visualizations and analyses on these two sequence tasks are designed to study three main factors. First, we compare the four learning regimens on how the LSTM network’s internal representations change as the final prediction is computed. To this end, we simply decode the representations at intermediate steps. This analysis helps us understand how a model handles the task with the help of curriculum learning. Second, we investigate how the performance of models with different complexities are affected by curriculum learning. Smaller yet accurate models are crucial in limited resource settings. Third, we study how the performance of curriculum learning changes in low-resource setups. This analysis provides us a valuable information considering lowresource scenarios are common in several data-driven learning domains such as Natural Language Processing. Related Work We review a list of topics related to our work in the context of curriculum learning (CL), analysis of neural networks and sentiment analysis with neural networks. Curriculum Learning. Motivated by children’s language learning, Elman (1993) studies the effect of learning regimen on a synthetic grammar task. He shows that a Recurrent Neural Network (RNN) is able to learn a grammar when training data is presented from simple to complex order and fails to do so when the order is random. Bengio et al. (2009) investigate CL from an optimization perspective. Their experiments on synthetic vision and word representation learning tasks show that CL results in better generalization and faster learning. Spitkovsky, Alshawi, and Jurafsky (2010) apply a CL strategy to learn an unsupervised parser for sentences of length k and initialize the next parser for sentences of length k + 1 with the previously learned one. They show that learning a hybrid model using the parsers learned for each sentence lengths achieves a significant improvement over a baseline model. Pentina, Sharmanska, and Lampert (2015) investigate the CL in a multi-task learning setup and propose a model to learn the order of multiple tasks. Their experiments on a set of vision tasks show that learning tasks sequentially is better than learning them jointly. Jiang et al. (2015) provide a general framework for CL and Self-Paced Learning where model picks which instances to train based on a simplicity metric. The proposed framework is able to combine prior knowledge of curriculum with Self-Paced Learning in the learning objective. Long Short-Term Memory Networks. LSTM networks are a variant of RNNs (Elman, 1990) capable of storing information and propagating loss over long distance. Using a gating mechanism by controlling the information flow into the internal representation, it is possible to avoid the problems of training RNNs (Bengio, Simard, and Frasconi, 1994; Pascanu, Mikolov, and Bengio, 2012). Several architectural variants have been proposed to improve the basic model (Cho et al., 2014; Chung et al., 2015; Yao et al., 2015; Kalchbrenner, Danihelka, and Graves, 2015; Dyer et al., 2015; Grefenstette et al., 2015). tionality and negation using sentiment analysis and sequence auto-encoding. Synthetic Tasks. Since the early days of neural networks, synthetic tasks were used to test the capabilities of the models (Fahlman, 1991) and often serve as unit tests for machine learning models (Weston et al., 2015). Similar to the first work on LSTM (Hochreiter and Schmidhuber, 1997), many of the contemporary neural network models (Graves, Wayne, and Danihelka, 2014; Kurach, Andrychowicz, and Sutskever, 2015; Sukhbaatar et al., 2015; Vinyals, Fortunato, and Jaitly, 2015) use synthetic tasks to compare and contrast several architectures. Inspired by these studies, we also use a synthetic task as one of our tasks to understand the effect of CL on LSTMs. Sentiment Analysis with Neural Networks. Several approaches have been proposed to solve sentiment analysis using neural networks. Socher et al. (2013) propose Recursive Neural Networks to exploit the syntactic structure of a sentence. A number of extensions of this model have been proposed in the context of sentiment analysis (Irsoy and Cardie, 2014; Tai, Socher, and Manning, 2015). Other proposed approaches use CNN (Kalchbrenner, Grefenstette, and Blunsom, 2014; Kim, 2014) and the averaging of word vector models (Iyyer et al., 2015; Le and Mikolov, 2014). To our knowledge, this work is the first to study how the internal representation of LSTM change in a curriculum learning setup. Curriculum Learning Regimens Curriculum learning emphasizes the order of training instances, prioritizing simpler instances before the more complex ones. In this section, we describe two curriculum learning regimens: one-pass curriculum originally proposed by Bengio et al. (2009) and baby step curriculum from Spitkovsky, Alshawi, and Jurafsky (2010). For both regimens, we develop the curriculum C using the same strategy proposed by Spitkovsky, Alshawi, and Jurafsky (2010) who assume that shorter sequences are easier to learn. The following subsections are describing the two curriculum learning regimens as well as two baseline learning regimens. One-Pass Curriculum Visualization of Neural Networks. Although many of the neural network studies provide quantitative analysis, there are few qualitative analyses of neural networks. Zeiler and Fergus (2014) visualize the feature maps of a Convolutional Neural Network (CNN) (LeCun et al., 1998). They show that feature maps at different layers show sensitivity to different shapes, textures, and objects. Similarly, Karpathy, Johnson, and Li (2015) analyze LSTM on character level language modeling. Their analysis shows that deeper models with gating mechanisms achieve better results. They show that some cells in LSTM learn to detect patterns and how RNNs learn to generalize to longer sequences. More recently, Li et al. (2016) use visualization to show how neural network models handle several linguistics phenomena such as composi- Bengio et al. (2009) propose to use a dataset with simpler instances in the first phase of the training. After some number of iterations, they switch to harder target dataset. The intuition is that after some training on simpler data, the model M is ready to handle the harder target data. Here, we name this regimen One-Pass curriculum (see Algorithm 1). The training data D is sorted by a curriculum C and distributed into k number of buckets. The training starts with the easiest bucket. Unlike the previous work (Bengio et al., 2009), we use early stopping – training stops for the bucket when the loss or task’s accuracy criteria on held-out set do not get any better for p number of epochs. Afterward, the next bucket is being used and trained in the same way. The whole training is stopped after all buckets are used. Note that the model uses each bucket only one time for the training, hence the name. Algorithm 1 One-Pass Curriculum 1: procedure OP-C URRICULUM(M ,D, C) 2: D0 = sort(D, C) 3: {D1 , D2 , ..., Dk } = D0 where C(da ) < C(db ) da ∈ Di , db ∈ Dj , ∀i < j 4: for s = 1...k do 5: while not converged for p epochs do 6: train(M , Ds ) 7: end while 8: end for 9: end procedure Baby Steps Curriculum The intuition behind Baby Steps curriculum (Bengio et al., 2009; Spitkovsky, Alshawi, and Jurafsky, 2010) is that simpler instances in the training data should not be discarded, instead, the complexity of the training data should be increased. After distributing data into buckets based on a curriculum, training starts with the easiest bucket. When the loss or task’s accuracy criteria on a held-out set do not get any better for p number of epochs, the next bucket and the current data bucket are merged. The whole training is stopped after all buckets are used (see Algorithm 2). Algorithm 2 Baby Steps Curriculum 1: procedure BS-C URRICULUM(M ,D, C) 2: D0 = sort(D, C) 3: {D1 , D2 , ..., Dk } = D0 where C(da ) < C(db ) da ∈ Di , db ∈ Dj , ∀i < j Dtrain = Ø for s = 1...k do Dtrain = Dtrain ∪ Ds while not converged for p epochs do train(M , Dtrain ) end while end for end procedure 4: 5: 6: 7: 8: 9: 10: 11: Baseline Regimens The first baseline, named No-CL, is the common practice of shuffling the training data. For a neural network like our LSTM models, this means that training is performed as usual where one epoch sees all the training set in random order. For all experiments described in the following section, models learned with the No-CL regiment are trained 10 times1 , to get a proper average performance. The second baseline, named Sorted, also sees all the data at each epoch but the ordering of the training instances is based on the curriculum C. This is a simplification of the two CL regimens presented in the previous subsections since 1 Note that this favors No-CL due to lower variance in results. we are not partitioning the data based on its complexity (i.e., based on the curriculum). We are simply reordering the training set. A comparison between the No-CL and Sorted baselines will allow us to study the importance of training instance ordering. Experiments The main goal of our experiments is to better understand how a computational model, specifically LSTM networks, are affected internally by CL. We aim to observe (1) the effect of CL on the internal model representations, (2) how the number of model parameters affect the performance of CL, and (3) how the amount of data size change the contribution of CL. The following subsections present LSTM network and our experimental probing methodology to analyze the LSTMs internal representations at different stages in the sequence modeling process. LSTM We now describe LSTM networks. Let x1 , .., xT be a sequence of one-hot coded sequence of symbols of length T . At each time step the LSTM updates its cells as follows:     sigm i    f  sigm t xt W e  o  = sigm W ht−1 tanh m ct = f ht = o ct−1 + i tanh(ct ) m (1) (2) (3) In above equations, W t is a [4n × 2n] matrix to calculate gate weights and new memory information g. W e is an embedding matrix for symbols. At time t, the sigmoid (sigm) and tanh (tanh) non-linearities are applied element-wise to the embedding representation of input xt W e and the output of the network from the previous time step ht−1 . Vectors i, f, o ∈ Rn are binary gates controlling the input, forget and output gates respectively. The vector m ∈ Rn additively modifies the cell ct . We use the final hidden representation hT of the LSTM to prediction with a projection matrix W p . In the case of regression, we use relu(W p hT ) where W p is [1 × n] and relu is rectified non-linearity. For classification, we predict one of k class labels using softmax(relu(W p hT ))) where W p is [k × n] and softmax is the softmax function. Probing Internal States of LSTM We aim to observe how the use of the internal representation of LSTM at intermediate steps changes depending on the learning regimen. Each internal representation ht is probed using the relu(W p ht ) functions learned for regression or the softmax(relu(W p ht )) function learned for classification. By moving these probes along the sequences, we can study the intermediate representation at each time t. Table 1: Probing of the LSTM model at intermediate timesteps for the Digit Sum dataset. Left column is the input and underlined digit emphasizes the last input digit. Ground Truth is the running sum up to that point. Predicted values by the LSTM models are in prediction column. The number in parantheses are the standard deviation. The intermediate representation of Baby Step curriculum model is closer to running sum of the input sequence. Input Sequence 1 10 109 1091 10917 109173 1091735 10917356 109173567 1091735670 10917356706 109173567064 1091735670642 10917356706428 109173567064286 1091735670642861 10917356706428614 109173567064286145 1091735670642861451 10917356706428614516 Ground Truth 1 1 10 11 18 21 26 32 39 39 45 49 51 59 65 66 70 75 76 82 Baby Steps Curriculum Prediction 0.23 1.03 10.27 11.40 18.62 21.54 26.77 32.82 40.56 40.53 46.73 50.96 52.82 61.01 67.78 69.27 72.32 76.77 78.57 83.05 Digit Sum We aim to simulate a low-resource sequence regression problem considering many of the NLP tasks only have a few thousand annotated samples. To this end, the Digit Sum task is posed as follows. Given a sequence of symbols of digits, the model is expected to predict the sum of digits. For instance given a sequence ”5 0 2 4 6” the expected output is 17. Digit Sum task has similarities with our second sequence task, sentiment analysis, where digits are analogous to the word tokens in the natural language text and the summation is analogous to the subjective position of a sequence on a topic. Our two evaluation tasks also have some interesting differences which allow evaluating a broader range of sequence learning tasks. In sentiment analysis, the order of words makes a difference whereas, in the Digit Sum, the order of digits does not change the expected answer. Secondly, the learning setup is a classification of polarity levels for sentiment analysis whereas it is a regression for the Digit Sum. Dataset Details. We define the evaluation task in the Digit Sum dataset as the summation of 20 digits, a typical length of sentences in natural language. Both the validation and testing sets contain 200 sequences of 20 digits randomly generated. The training set consist of 1000 sequences each from length 2 to 20, allowing to develop the curriculum automatically following Spitkovsky, Alshawi, and Jurafsky (2010) procedure. This results in a dataset of size 19K instances2 . Experimental Details. We used LSTM with hidden units of 2, 4, 8, ..., 512 without peephole connections. For all configurations the size of digit embeddings and hidden units 2 We experimented with 10x smaller dataset size and observed very similar results. We do not report these due to limited space. One-Pass Curriculum Prediction 0.00 0.00 0.00 0.00 0.00 0.00 4.29 14.19 29.28 32.20 52.86 67.70 74.59 83.31 87.42 83.43 82.60 83.34 80.42 82.52 Sorted Prediction 0.86 1.32 10.59 11.29 19.30 22.99 29.34 37.21 46.38 48.01 55.50 60.58 63.03 70.91 76.54 76.46 78.88 81.56 80.44 83.68 No-CL Prediction 0.88 (0.20) 1.10 (0.28) 10.20 (0.78) 10.88 (0.95) 17.89 (1.49) 20.84 (1.94) 25.90 (2.39) 32.00 (2.87) 39.12 (3.12) 39.26 (3.00) 45.95 (3.14) 50.32 (3.09) 52.6 (2.94) 61.11 (2.87) 67.97 (2.77) 69.33 (2.57) 73.05 (2.36) 77.67 (2.27) 78.07 (2.19) 83.36 (2.03) are the same. We use RMSprop (Dauphin et al., 2015) with learning rate 0.001 and decay rate of 0.9 with minibatches of size 128. The patience parameter p for early stopping is 10. We use Dropout (Srivastava et al., 2014) of rate in range {0,0.25,0.5} as suggested for LSTMs by Gal (2015). Results Probing Internal Model Representations. We analyze the behavior of the model by using the intermediate representations during processing of a sequence. As we discussed previously, we feed the hidden representations of each digit to the regression node to predict at each timestep of the input. Table 1 shows the input sequence, ground truth, and predictions of the best models for each learning regimen based on validation loss. The prediction of the model trained with One-Pass curriculum and Sorted Baseline shows no correlation with the running sum of the digits. The Baby Step curriculum model is able to predict similar values to running sum. A sequence model can learn to solve this task in numerous ways such as memorizing sequences due to overfitting, using a count table of the digits, or doing a running sum at each time step. To analyze this, we report the average differences between successive predictions (we call it ∆) and the last input digit(see Figure 1). At each timestep, the model trained with Baby Step curriculum updates the hidden representation such that it correlates with the sum of digits observed up to that point. It is also interesting to observe that Baby Step curriculum shows better variance than the average of 10 random starts (No-CL). We emphasize that models are provided with the same sequences for training, yet, the learning regiments results in different models. Effects on Models With Different Complexities. Our next experiment studies the effect of learning regimens on models with different complexities. Figure 3 shows the 9 8 7 6 5 4 3 2 1 0 -10 Baby Step 9 9 8 7 6 5 4 3 2 1 0 -10 ∆ 9 9 8 7 6 5 4 3 2 1 0 -10 1 2 3 4 5 Input Digit 6 7 8 No-CL ∆ ∆ ∆ 9 8 7 6 5 4 3 2 1 0 -10 1 2 3 4 5 Input Digit 6 7 8 One-Pass 1 2 3 4 5 6 7 8 9 4 5 6 7 8 9 Input Digit Sorted 1 2 3 Input Digit Figure 1: Visualization of Input Digit (input digit at time t) vs ∆ (the average difference between predictions at t and t − 1). Shaded areas represent the variance. We expect ∆ to follow the input digit. Model trained with Baby Step curriculum shows the least variance the input digit. Note that for No-CL, we plot all 10 runs (with different seeds). Baby Step One-Pass Sorted No-CL 2500 MSE 2000 Table 2: Classification Accuracies of Training Regimens on Sentiment Analysis Task. The numbers in parantheses are standard deviations. Model gets better at conjunctions if it is trained with Baby-Step curriculum. 1500 1000 500 0 2 4 8 16 32 64 128 Number of Hidden Units 256 512 Figure 3: Mean Squared Error vs the number of units of LSTM. With much smaller model, Baby Step curriculum achieves the best results. The other model requires the right complexity to achieve comparable results. Mean Squared Loss (MSE) results for the Digit Sum with LSTMs with varying hidden unit sizes. Baby Step curriculum achieves consistently better results even if the model has much fewer parameters. Other regimens require the model to have the right complexity. Efficient training of small models is particularly important if we do not have large annotated datasets to train big models. In addition, from practical perspective, to obtain smaller yet accurate models enables deploying fast and accurate models to a limited resource setting (Bucilu, Caruana, and Niculescu-Mizil, 2006; Hinton, Vinyals, and Dean, 2015). Sentiment Analysis Sentiment analysis is an application of NLP to identify the polarity of subjective information in given source (Pang and Regimen All Conjunctions No-CL from (Tai, Socher, and Manning, 2015) No-CL (our implementation) Curriculum Sorted One-Pass Curriculum Baby Steps Curriculum 46.4 (1.1) 46.83 (1.1) 47.42 45.74 47.37 43.88 (1.9) 42.88 43.09 46.07 Lee, 2008). We use the Stanford Sentiment Treebank (SST) (Socher et al., 2013) an extension of a dataset (Pang and Lee, 2005) which has labels for 215,154 phrases in the parse trees of 11,855 sentences sampled from movie reviews. Realvalued sentiment labels are converted to an integer ordinal label in 0,..,4 by simple thresholding for five classes: very negative, negative, neutral, positive, and very positive. Therefore the task is posed as a 5-class classification problem. Dataset Details. We use the standard train/dev/test splits of 8544/1101/2210 for the 5-class classification problem. We flatten the annotated tree structure into sequences of phrases to use finer grained annotations. We treat the words within the span of an inner phrase as a sequence and use the phrase’s annotation as label. This results in a bigger training set of 155019 instances. Experimental Details. We follow the previous work (Tai, Socher, and Manning, 2015) for the empirical setup. We use a single layer LSTM with 168 units for the 5-class classification task. We initialized the word embeddings using 300- No-CL Sorted One-Pass Baby-Step -- - Neutral + ++ 0.5 there are slow and repetitive parts , but it has just enough spice to keep it interesting . there are slow and repetitive parts , but it has just enough spice to keep it interesting . there are slow and repetitive parts , but it has just enough spice to keep it interesting . there are slow and repetitive parts , but it has just enough spice to keep it interesting . 0.5 0.5 0.5 Figure 2: Predictions at intermediate tokens. Colors represent the polarity and heights represent the prediction probability. Baby Step curriculum shows a consistent behavior : only after observing a positive sub-phrase flips the prediction. 0.50 0.45 Accuracy 0.40 Baby Step One-Pass Sorted No-CL 0.35 0.30 0.25 0.20 3K 6K 12K 24K 49K Number of Training Instances 155K Figure 4: The effect of regimen vs the amount of training data. One-Pass and Baby Steps curriculum regimens gets better results when the training data is limited. They converge to similar points when the amount of data increases. dimensional Glove vectors (Pennington, Socher, and Manning, 2014) and fine-tuned them during training. For optimization, we used RMSprop (Dauphin et al., 2015) with learning rate 0.001 and decay rate of 0.9 with mini-batches of size 128. The patience parameter p for early stopping is 10. Results As the first step to our more detailed analysis, Table 2 reports the overall performance of the four learning regimens and the original results stated by Tai, Socher, and Manning (2015). The advantage of CL is most prominent when predicting sentiment for sentences with conjunctions (last column in Table 2). For conjunctions where a span of text contradicts or supports overall sentiment polarity, Baby Step model achieves significantly better results than others. We take a closer look at the LSTM modeling process using a similar probing technique used for the Digit Sum dataset. Probing Intermediate Representations. In Figure 2, we qualitatively show how different models process a sentence with a contrastive conjunction originally demonstrated by Socher et al. (2013). For each model, we plot the sentiment polarity and the probability of prediction for that polarity after observing a word token. Unlike the others, Baby Step model changes the sentiment at the appropriate time; after observing “spice” which constructs a positive statement with the sub-phrase “but it has just enough spice”. Handling contrastive conjunctions requires a model to merge two conflicting signals (i.e. positive and negative) coming from two directions (i.e. left phrase and right phrase) in an accurate way Socher et al. (2013). Considering LSTM’s limited capacity due to using only signal coming from previous timesteps (i.e processing the sentence from left to right), this result is particularly interesting because Baby Step CL boosts LSTM’s performance. Effect of Training Data Size. To investigate the role of the amount of training data, we use a varying fraction of training data with learning regimens. Figure 4 shows the results. CL regimens help when training data is limited. When the amount of training data increases, the difference between the regimens gets lower. This result suggests that in lowresource setups, like many of the NLP problems, CL could be useful to improve a model’s performance. Conclusion We examined curriculum learning on two sequence prediction tasks. Our analyses showed that curriculum learning regimens based on shorter-first approach, help LSTM construct a partial representation of the sequence in a more intuitive way. We demonstrated that curriculum learning helps smaller models improve performance, contributes more in a low resource setup. Using a quantitative and qualitative analysis on sentiment analysis, we showed that a model trained with Baby Step curriculum significantly improves for sentences with conjunctions suggesting that curriculum learning helps LSTM learn longer sequences and functional role of the conjunctions. References Bengio, Y.; Louradour, J.; Collobert, R.; and Weston, J. 2009. Curriculum learning. In Proceedings of the 26th annual international conference on machine learning, 41–48. ACM. Bengio, Y.; Simard, P.; and Frasconi, P. 1994. Learning longterm dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on 5(2):157–166. Bucilu, C.; Caruana, R.; and Niculescu-Mizil, A. 2006. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, 535–541. ACM. Cho, K.; van Merriënboer, B.; Bahdanau, D.; and Bengio, Y. 2014. On the properties of neural machine translation: Encoderdecoder approaches. arXiv preprint arXiv:1409.1259. Chung, J.; Gulcehre, C.; Cho, K.; and Bengio, Y. 2015. Gated feedback recurrent neural networks. arXiv preprint arXiv:1502.02367. Dauphin, Y. N.; de Vries, H.; Chung, J.; and Bengio, Y. 2015. Rmsprop and equilibrated adaptive learning rates for non-convex optimization. arXiv preprint arXiv:1502.04390. Dyer, C.; Ballesteros, M.; Ling, W.; Matthews, A.; and Smith, N. A. 2015. Transition-based dependency parsing with stack long short-term memory. arXiv preprint arXiv:1505.08075. Elman, J. L. 1990. Finding structure in time. Cognitive science 14(2):179–211. Elman, J. L. 1993. Learning and development in neural networks: The importance of starting small. Cognition 48(1):71–99. Fahlman, S. E. 1991. The recurrent cascade-correlation architecture. In Advances in Neural Information Processing Systems, 190–196. Gal, Y. 2015. A theoretically grounded application of dropout in recurrent neural networks. arXiv preprint arXiv:1512.05287. Graves, A.; Liwicki, M.; Fernández, S.; Bertolami, R.; Bunke, H.; and Schmidhuber, J. 2009. A novel connectionist system for unconstrained handwriting recognition. Pattern Analysis and Machine Intelligence, IEEE Transactions on 31(5):855–868. Graves, A.; Wayne, G.; and Danihelka, I. 2014. Neural turing machines. arXiv preprint arXiv:1410.5401. Grefenstette, E.; Hermann, K. M.; Suleyman, M.; and Blunsom, P. 2015. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, 1819–1827. Hinton, G.; Vinyals, O.; and Dean, J. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531. Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural computation 9(8):1735–1780. Irsoy, O., and Cardie, C. 2014. Deep recursive neural networks for compositionality in language. In Advances in Neural Information Processing Systems, 2096–2104. Iyyer, M.; Manjunatha, V.; Boyd-Graber, J.; and III, H. D. 2015. Deep unordered composition rivals syntactic methods for text classification. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing, volume 1, 1681–1691. Jiang, L.; Meng, D.; Zhao, Q.; Shan, S.; and Hauptmann, A. G. 2015. Self-paced curriculum learning. In AAAI, volume 2, 6. Kalchbrenner, N.; Danihelka, I.; and Graves, A. 2015. Grid long short-term memory. arXiv preprint arXiv:1507.01526. Kalchbrenner, N.; Grefenstette, E.; and Blunsom, P. 2014. A convolutional neural network for modelling sentences. arXiv preprint arXiv:1404.2188. Karpathy, A.; Johnson, J.; and Li, F.-F. 2015. Visualizing and understanding recurrent networks. arXiv preprint arXiv:1506.02078. Kim, Y. 2014. Convolutional neural networks for sentence classification. arXiv preprint arXiv:1408.5882. Kurach, K.; Andrychowicz, M.; and Sutskever, I. 2015. Neural random-access machines. arXiv preprint arXiv:1511.06392. Le, Q. V., and Mikolov, T. 2014. Distributed representations of sentences and documents. arXiv preprint arXiv:1405.4053. LeCun, Y.; Bottou, L.; Bengio, Y.; and Haffner, P. 1998. Gradientbased learning applied to document recognition. Proceedings of the IEEE 86(11):2278–2324. Li, J.; Chen, X.; Hovy, E.; and Jurafsky, D. 2016. Visualizing and understanding neural models in nlp. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Pang, B., and Lee, L. 2005. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics, 115–124. Association for Computational Linguistics. Pang, B., and Lee, L. 2008. Opinion mining and sentiment analysis. Foundations and trends in information retrieval 2(1-2):1– 135. Pascanu, R.; Mikolov, T.; and Bengio, Y. 2012. On the difficulty of training recurrent neural networks. arXiv preprint arXiv:1211.5063. Pennington, J.; Socher, R.; and Manning, C. D. 2014. Glove: Global vectors for word representation. In EMNLP, volume 14, 1532–1543. Pentina, A.; Sharmanska, V.; and Lampert, C. H. 2015. Curriculum learning of multiple tasks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 5492–5500. Socher, R.; Perelygin, A.; Wu, J. Y.; Chuang, J.; Manning, C. D.; Ng, A. Y.; and Potts, C. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the conference on empirical methods in natural language processing (EMNLP), volume 1631, 1642. Citeseer. Spitkovsky, V. I.; Alshawi, H.; and Jurafsky, D. 2010. From baby steps to leapfrog: How less is more in unsupervised dependency parsing. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, 751–759. Association for Computational Linguistics. Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; and Salakhutdinov, R. 2014. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research 15(1):1929–1958. Sukhbaatar, S.; Weston, J.; Fergus, R.; et al. 2015. End-to-end memory networks. In Advances in Neural Information Processing Systems, 2431–2439. Tai, K. S.; Socher, R.; and Manning, C. D. 2015. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075. Vinyals, O.; Kaiser, Ł.; Koo, T.; Petrov, S.; Sutskever, I.; and Hinton, G. 2015. Grammar as a foreign language. In Advances in Neural Information Processing Systems, 2755–2763. Vinyals, O.; Fortunato, M.; and Jaitly, N. 2015. Pointer networks. In Advances in Neural Information Processing Systems, 2674– 2682. Weston, J.; Bordes, A.; Chopra, S.; and Mikolov, T. 2015. Towards ai-complete question answering: a set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698. Yao, K.; Cohn, T.; Vylomova, K.; Duh, K.; and Dyer, C. 2015. Depth-gated recurrent neural networks. arXiv preprint arXiv:1508.03790. Zeiler, M. D., and Fergus, R. 2014. Visualizing and understanding convolutional networks. In Computer vision–ECCV 2014. Springer. 818–833.
9cs.NE
ALMOST ENGEL COMPACT GROUPS arXiv:1610.02079v2 [math.GR] 12 May 2017 E. I. KHUKHRO AND P. SHUMYATSKY To Efim Zelmanov on occasion of his 60th birthday Abstract. We say that a group G is almost Engel if for every g ∈ G there is a finite set E (g) such that for every x ∈ G all sufficiently long commutators [...[[x, g], g], . . . , g] belong to E (g), that is, for every x ∈ G there is a positive integer n(x, g) such that [...[[x, g], g], . . . , g] ∈ E (g) if g is repeated at least n(x, g) times. (Thus, Engel groups are precisely the almost Engel groups for which we can choose E (g) = {1} for all g ∈ G.) We prove that if a compact (Hausdorff) group G is almost Engel, then G has a finite normal subgroup N such that G/N is locally nilpotent. If in addition there is a uniform bound |E (g)| 6 m for the orders of the corresponding sets, then the subgroup N can be chosen of order bounded in terms of m. The proofs use the Wilson–Zelmanov theorem saying that Engel profinite groups are locally nilpotent. 1. Introduction A group G is called an Engel group if for every x, g ∈ G the equation [x, g, g, . . . , g] = 1 holds, where g is repeated in the commutator sufficiently many times depending on x and g. (Throughout the paper, we use the left-normed simple commutator notation [a1 , a2 , a3 , . . . , ar ] = [...[[a1 , a2 ], a3 ], . . . , ar ].) A group is said to be locally nilpotent if every finite subset generates a nilpotent subgroup. Clearly, any locally nilpotent group is an Engel group. Wilson and Zelmanov [15] proved the converse for profinite groups: any Engel profinite group is locally nilpotent. Later Medvedev [11] extended this result to Engel compact (Hausdorff) groups. In this paper we consider almost Engel groups in the following precise sense. Definition 1.1. We say that a group G is almost Engel if for every g ∈ G there is a finite set E (g) such that for every x ∈ G all sufficiently long commutators [x, g, g, . . . , g] belong to E (g), that is, for every x ∈ G there is a positive integer 2010 Mathematics Subject Classification. 20D25, 20E18, 20F45. Key words and phrases. Compact groups; profinite groups; finite groups; Engel condition; locally nilpotent groups. 1 n(x, g) such that [x, g, g, . . . , g ] ∈ E (g) | {z } for all n > n(x, g). n Thus, Engel groups are precisely the almost Engel groups for which we can choose E (g) = {1} for all g ∈ G. We prove that almost Engel compact groups are finite-by-(locally nilpotent). By a compact group we mean a compact Hausdorff topological group. Theorem 1.2. Suppose that G is an almost Engel compact group. Then G has a finite normal subgroup N such that G/N is locally nilpotent. In Theorem 1.2 it also follows that there is a locally nilpotent subgroup of finite index – just consider CG (N). The proof uses the aforementioned Wilson–Zelmanov theorem for profinite groups. First the case of a finite group G is considered, where obviously the result must be quantitative: namely, given a uniform bound |E (g)| 6 m for the cardinalities of the sets E (g) inTthe above definition, we prove that the order of the nilpotent residual γ∞ (G) = i γi (G) is bounded in terms of m only. Then Theorem 1.2 is proved for profinite groups. Finally, the result for compact groups is derived with the use of the structure theorems for compact groups. As in the case of finite groups, if there is a uniform bound m for the cardinalities of the sets E (g) in Theorem 1.2, then the subgroup N in the conclusion can be chosen to be of order bounded in terms of m (Corollary 5.5). In an earlier paper [10] we obtained similar results about finite and profinite groups with a stronger condition of “almost Engel” type. That condition means that every element g of the group is “almost n-Engel” for some n = n(g) depending on g. Note, however, that Engel groups do not necessarily satisfy that condition. The new Definition 1.1 of almost Engel groups in the present paper imposes a weaker and more natural “almost Engel” condition and includes Engel groups (when all the subsets E (g) consist only of 1). Thus, the results of the present paper are stronger than in [10] even for (pro)finite groups, and cover a wider class of compact groups. First in § 2 we collect some elementary properties of minimal subsets E (g) in the definition of almost Engel groups. We deal with finite groups in § 3, with profinite groups in § 4, and consider the general case of compact groups in § 5. Our notation and terminology is standard; for profinite groups, see, for example, [14]. We say for short that an element g of a group G is an Engel element if for any x ∈ G we have [x, g, g, . . . , g] = 1, where g is repeated in the commutator sufficiently many times depending on x (such elements g are often called left Engel elements). A subgroup (topologically) generated by a subset S is denoted by hSi. For a group A acting by automorphisms on a group B we use the usual notation for 2 commutators [b, a] = b−1 ba and [B, A] = h[b, a] | b ∈ B, a ∈ Ai, and for centralizers CB (A) = {b ∈ B | ba = b for all a ∈ A} and CA (B) = {a ∈ A | ba = b for all b ∈ B}. Throughout the paper we shall write, say, “(a, b, . . . )-bounded” to abbreviate “bounded above in terms of a, b, . . . only”. 2. Properties of Engel sinks Throughout this section we assume that G is an almost Engel group in the sense of Definition 1.1, so that for every g ∈ G there is a finite set E (g) such that for every x ∈ G there is a positive integer n(x, g) such that [x, g, g, . . . , g ] ∈ E (g) | {z } for any n > n(x, g). (2.1) n ′ If E (g) is another finite set with the same property for possibly different numbers n′ (x, g), then E (g) ∩ E ′ (g) also satisfies the same condition with the numbers n′′ (x, g) = max{n(x, g), n′(x, g)}. Hence for every g ∈ G there is a minimal set satisfying the definition, which we again denote by E (g) and call the Engel sink for g, or simply g-sink for short. Henceforth we shall always use the notation E (g) to denote the (minimal ) Engel sinks, and n(x, g) the corresponding numbers satisfying (2.1). For a fixed g ∈ G, consider the mapping of E (g) by the rule z → [z, g], which maps E (g) into itself by definition. By the minimality of E (g) this mapping is a permutation of E (g). Therefore we can speak of orbits (cycles) of this permutation on E (g). It follows that every z ∈ E (g) can be represented in the form z = [z, g, . . . , g ] | {z } for some k > 1, (2.2) for any positive integer j. (2.3) k and therefore also as z = [z, g, . . . , g ] | {z } jk Conversely, elements satisfying (2.2) belong to E (g). We have thus proved the following. Lemma 2.1. For any g ∈ G the g-sink E (g) consists precisely of all elements z such that z = [z, g, . . . , g], where g occurs at least once. Clearly, every subgroup H of G is also an almost Engel group. Moreover, by Lemma 2.1, for h ∈ H the h-sink constructed within H is precisely the subset E (h) ∩ H of the h-sink E (h) in G. If N is a normal subgroup of G, then G/N is also an almost Engel group. For ḡ = gN the ḡ-sink in G/N is the image of E (g) in this quotient group. These properties will be used throughout the paper without special references. 3 For any element h of the centralizer CG (g) the equation z = [z, g, . . . , g] implies z = [z h , g h , . . . , g h ] = [z h , g, . . . , g]. Hence E (g) is invariant under conjugation by h by Lemma 2.1. If |E (g)| = m, it follows that hm! centralizes E (g). We have thus proved the following. h Lemma 2.2. If h ∈ CG (g) and |E (g)| = m, then hm! centralizes E (g). Engel sinks have especially nice properties in metabelian groups. We denote by M ′ the derived subgroup of a group M. Lemma 2.3. Let M be a metabelian almost Engel group. (a) Every sink E (g) is a normal subgroup contained in M ′ . (b) Elements of E (g) in the same orbit under the map z → [z, g] have the same order. Proof. (a) By (2.2) and (2.3), every element z ∈ E (g) can be represented as z = [z, g, . . . , g] with g repeated jk(z) times for k(z) > 1 and for every j = 1, 2, . . . . In particular, E (g) ⊆ M ′ . For z1 , z2 ∈ E (g) choose j such that jk(z1 )k(z2 ) is larger than n(z1 z2 , g). Then, by the standard metabelian laws, z1 z2 = [z1 , g, . . . , g][z2 , g, . . . , g] = [z1 z2 , g, . . . , g] ∈ E (g), where g is repeated jk(z1 )k(z2 ) times in each commutator. Thus, the finite set E (g) is a subgroup. For any m ∈ M, choose jk(z) larger than n([z, m], g). Then [z, m] = [[z, g, . . . , g], m] = [[z, m], g, . . . , g] ∈ E (g), where g is repeated jk(z) times in each commutator; this means that E (g) is a normal subgroup of M. (b) Let z ∈ E (g). Since z ∈ M ′ , we have [z k , g] = [z, g]k for any integer k. Hence the order of [z, g] divides the order of z. Going in this way over the orbit, we return to z, which implies that the orders of all elements in the orbit are the same.  3. Finite almost Engel groups Of course, any finite group G is almost Engel, and every element g ∈ G has finite (minimal) g-sink E (g). A meaningful result must be of quantitative nature, and this is what we prove in this section. The following theorem will also be used in the proof of the main results on profinite and compact groups. Theorem 3.1. Let G be a finite group, and m a positive integer. Suppose that for every g ∈ G the cardinality of the g-sink E (g) is at most m. Then G has a normal subgroup N of order bounded in terms of m such that G/N is nilpotent. The conclusion of the theorem can also be stated as a bound in terms of m for the order of the nilpotent residual subgroup γ∞ (G), the intersection of all terms of the lower central series (which for a finite group is of course also equal to some subgroup γn (G)). 4 First we recall or prove a few preliminary results. We shall use the following well-known properties of coprime actions: if α is an automorphism of a finite group G of coprime order, (|α|, |G|) = 1, then CG/N (α) = CG (α)N/N for any α-invariant normal subgroup N, the equality [G, α] = [[G, α], α] holds, and if G is in addition abelian, then G = [G, α] × CG (α). Lemma 3.2. Let P be a finite p-subgroup of a group G, and g ∈ G a p′ -element normalizing P . Then the order of [P, g] is bounded in terms of the cardinality of the g-sink E (g). Proof. For the abelian p-group V = [P, g]/[P, g]′ we have V = [V, g] and CV (g) = 1 because the action of g on V is coprime. Then V = {[v, g] | v ∈ V } and therefore also V = {[v, g, . . . , g ] | v ∈ V } | {z } n for any n. Hence, V is contained in the image of E (g) ∩[P, g] in [P, g]/[P, g]′, whence |V | 6 |E (g)|. Since [P, g] is a nilpotent group, its order is bounded in terms of |[P, g]/[P, g]′| and its nilpotency class. We claim that, as a crude bound, the nilpotency class of [P, g] is at most 2|E (g)| + 1. Let γi denote the terms of the lower central series of [P, g]. The number of factors of the lower central series of [P, g] on which g acts nontrivially is at most |E (g)|, because for any such a factor U = γi /γi+1 we have 1 6= [U, g] = {[u, g, . . . , g ] | u ∈ U} | {z } n for any n, since the action of g on U is coprime, and therefore there is an element of E (g) in γi \ γi+1 . It remains to observe that g cannot act trivially on two consecutive nontrivial factors of the lower central series of [P, g]. Indeed, if [γi , g] 6 γi+1 and [γi+1 , g] 6 γi+2 , then by the Three Subgroup Lemma the inclusions [γi , g, [P, g]] 6 [γi+1 , [P, g]] = γi+2 and [[P, g], γi, g] = [γi+1 , g] 6 γi+2 imply the inclusion [g, [P, g], γi] = [[P, g], γi] = γi+1 6 γi+2 , and the last inclusion implies that γi+1 = 1.  The following lemma already appeared in [10], but we reproduce the proof for the benefit of the reader. Lemma 3.3. Let V be an elementary abelian q-group, and U a q ′ -group of automorphisms of V . If |[V, u]| 6 m for every u ∈ U , then |[V, U]| is m-bounded, and therefore |U| is also m-bounded. Proof. First suppose that U is abelian. We consider V as an Fq U-module. Pick u1 ∈ U such that [V, u1 ] 6= 0. By Maschke’s theorem, V = [V, u1 ] ⊕ CV (u1 ), and both summands are U-invariant, since U is abelian. If CU ([V, u1 ]) = 1, then |U| 5 is m-bounded and [V, U] has m-bounded order being generated by [V, u], u ∈ U. Otherwise pick 1 6= u2 ∈ CU ([V, u1 ]); then V = [V, u1 ] ⊕ [V, u2 ] ⊕ CV (hu1 , u2i). If 1 6= u3 ∈ CU ([V, u1 ] ⊕ [V, u2 ]), then V = [V, u1 ] ⊕ [V, u2 ] ⊕ [V, u3 ] ⊕ CV (hu1, u2 , u3 i), and so on. If CU ([V, u1 ] ⊕ · · · ⊕ [V, uk ]) = 1 at some m-bounded step k, then again [V, U] has m-bounded order. However, if there are too many steps, then for the element w = u1 u2 · · · uk we shall have 0 6= [V, ui ] = [[V, ui ], w], so that [V, w] = [V, u1 ] ⊕ · · · ⊕ [V, uk ] will have order greater than m, a contradiction. We now consider the general case. Since every element u ∈ U acts faithfully on [V, u], the exponent of U is m-bounded. If P is a Sylow p-subgroup of U, let M be a maximal normal abelian subgroup of P . By the above, |[V, M]| is m-bounded. Since M acts faithfully on [V, M], we obtain that |M| is m-bounded. Hence |P | is m-bounded, since CP (M) = M and P/M embeds in the automorphism group of M. Since |U| has only m-boundedly many prime divisors, it follows that |U| is mP bounded. Since [V, U] = u∈U [V, u], we obtain that |[V, U]| is also m-bounded.  Recall that the Fitting series starts with the Fitting subgroup F1 (G) = F (G), and by induction, Fk+1 (G) is the inverse image of F (G/Fk (G)). If G is a soluble group, then the least number h such that Fh (G) = G is the Fitting height of G. The following lemma is well known and is easy to prove (see, for example, [9, Lemma 10]). Q Lemma 3.4. If G is a finite group of Fitting height 2, then γ∞ (G) = q [Fq , Gq′ ], where Fq is a Sylow q-subgroup of F (G), and Gq′ is a Hall q ′ -subgroup of G. We now approach the proof of Theorem 3.1 with the following lemma. Lemma 3.5. If G is a finite group such that |E (g)| 6 m for all g ∈ G, then G/F (G) has exponent at most m!. Proof. Every element g ∈ G centralizes all its powers. Therefore by Lemma 2.2, since |E (g m! )| 6 m by hypothesis, g m! centralizes E (g m! ). By the minimality of the g m! -sink, then E (g m! ) = {1}. This means that g m! is an Engel element and therefore belongs to the Fitting subgroup F (G) by Baer’s theorem [7, Satz III.6.15].  We are now ready to prove Theorem 3.1. Proof of Theorem 3.1. Recall that G is a finite group such that |E (g)| 6 m for every g ∈ G. We need to show that |γ∞ (G)| is m-bounded. First suppose that G is soluble. Since G/F (G) has m-bounded exponent by Lemma 3.5, the Fitting height of G is m-bounded, which follows from the Hall– Higman theorems [5]. Hence we can use induction on the Fitting height, with trivial base when the group is nilpotent and γ∞ (G) = 1. When the Fitting height is at least 2, consider the second Fitting subgroup F2 (G). By Lemma 3.4 we have Q γ∞ (F2 (G)) = q [Fq , Hq′ ], where Fq is a Sylow q-subgroup of F (G), and Hq′ is a Hall q ′ -subgroup of F2 (G), the product taken over prime divisors of |F (G)|. For a 6 given q, let H̄q′ = Hq′ /CHq′ (Fq ), and let V be the Frattini quotient Fq /Φ(Fq ). Note that H̄q′ acts faithfully on V , since the action is coprime [7, Satz III.3.18]. For every x ∈ H̄q′ the order |[V, x]| is m-bounded by Lemma 3.2. Then |H̄q′ | is m-bounded by Lemma 3.3. As a result, |[Fq , Hq′ ]| = |[Fq , H̄q′ ]| is m-bounded, since [Fq , H̄q′ ] is the product of m-boundedly many subgroups [Fq , h̄] for h ∈ Hq′ , each of which has m-bounded order by Lemma 3.2. For the same reasons, there are only m-boundedly many primes q for which [Fq , Hq′ ] 6= 1. As a result, |γ∞ (F2 (G))| is m-bounded. Induction on the Fitting height applied to G/γ∞ (F2 (G)) completes the proof in the case of soluble G. Now consider the general case. Most of the following arguments follow the same scheme as in the proof of Theorem 1.2 in [10]. First we show that the quotient G/R(G) by the soluble radical is of m-bounded order. Let E be the socle of G/R(G). It is known that E contains its centralizer in G/R(G), so it suffices to show that E has m-bounded order. In the quotient by the soluble radical, E = S1 × · · · × Sk is a direct product of non-abelian finite simple groups Si . Since the exponent of G/F (G) is m-bounded by Lemma 3.5, the exponent of E is also m-bounded. Now the classification of finite simple groups implies that every Si has m-bounded order, and it remains to show that the number of factors is also m-bounded. By Shmidt’s theorem [7, Satz III.5.1], every Si has a non-nilpotent soluble subgroup Ri , for which γ∞ (Ri ) 6= 1. Since we already proved our theorem for soluble groups, we can apply it to T = R1 × · · · × Rk . We obtain that |γ∞ (T )| is m-bounded, whence the number of factors is m-bounded. Thus, |G/R(G)| is m-bounded. Since |γ∞ (R(G)| is m-bounded by the soluble case proved above, we can consider G/γ∞ (R(G)) and assume that R(G) = F (G) is nilpotent. Then |G/F (G)| is m-bounded. We now use induction on |G/F (G)|. The basis of this induction includes the trivial case G/F (G) = 1 when γ∞ (G) = 1. But the bulk of the proof deals with the case where G/F (G) is a non-abelian simple group. Thus, suppose that G/F (G) is a non-abelian simple group of m-bounded order. Let g ∈ G be an arbitrary element. The subgroup F (G)hgi is soluble, and therefore |γ∞ (F (G)hgi)| is m-bounded by the above. Since γ∞ (F (G)hgi) is normal in F (G), its normal closure hγ∞ (F (G)hgi)G i is a product of at most |G/F (G)| conjugates, each normal in F (G), and therefore has m-bounded order. Choose a transversal {t1 , . . . , tk } of G modulo F (G) and set Y K= hγ∞ (F (G)hti i)G i, i which is a normal subgroup of G of m-bounded order. It is sufficient to obtain an m-bounded estimate for |γ∞ (G/K)|. Hence we can assume that K = 1. We remark that then [F (G), g, . . . , g] = 1 for any g ∈ G, (3.1) 7 when g is repeated sufficiently many times. Indeed, g ∈ F (G)ti for some ti , and the subgroup F (G)hti i is nilpotent due to our assumption that K = 1. We now claim that [F (G), G, . . . , G] = 1 (3.2) if G is repeated sufficiently many times. It is sufficient to prove that [Fq , G, . . . , G] = 1 for every Sylow q-subgroup Fq of F (G). For any q ′ -element h ∈ G we have [Fq , h] = [Fq , h, h] and therefore [Fq , h] = 1 in view of (3.1). Let H be the subgroup of G generated by all q ′ -elements. Then G = Fq H since G/F (G) is non-abelian simple, and [Fq , H] = 1, so that [Fq , G, . . . , G] = [Fq , Fq , . . . , Fq ] = 1 for a sufficiently long commutator. We finally show that D := γ∞ (G) has m-bounded order. First we show that D = [D, D]. Indeed, since G/F (G) is non-abelian simple, D is nonsoluble and we must have G = F (G)[D, D]. Taking repeatedly commutator with G on both sides and applying (3.2), we obtain D = γ∞ (G) 6 [D, D], so D = [D, D]. Since F (G) ∩ D is hypercentral in D by (3.2) and [D, D] = D, it follows that F (G) ∩ D 6 Z(D) ∩ [D, D] by the well-known Grün lemma [3, Satz 4]. Thus, D is a central covering of the simple group D/(F (G) ∩ D) ∼ = G/F (G), and therefore by Schur’s theorem [7, Hauptsatz V.23.5] the order of D is bounded in terms of the m-bounded order of G/F (G). Thus, we have proved that |γ∞ (G)| is m-bounded in the case where G/F (G) is a non-abelian simple group. We now finish the proof of Theorem 3.1 by induction on the m-bounded order k = |G/F (G)| proving that |γ∞ (G)| is (m, k)-bounded. The basis of this induction is the case of G/F (G) being simple: nonabelian simple was considered above, and simple of prime order is covered by the soluble case. Now suppose that G/F (G) has a nontrivial proper normal subgroup with full inverse image N, so that F (G) < N ⊳ G. Since F (N) = F (G), by induction applied to N, the order |γ∞ (N)| is bounded in terms of m and |N/F (G)| < k. Since N/γ∞ (N) 6 F (G/γ∞ (N)), by induction applied to G/γ∞ (N) the order |γ∞ (G/γ∞ (N))| is bounded in terms of m and |G/N| < k. As a result, |γ∞ (G)| is (m, k)-bounded, as required.  4. Profinite almost Engel groups In this and the next sections, unless stated otherwise, a subgroup of a topological group will always mean a closed subgroup, all homomorphisms will be continuous, and quotients will be by closed normal subgroups. This also applies to taking commutator subgroups, normal closures, subgroups generated by subsets, etc. Of 8 course, any finite subgroup is automatically closed. We also say that a subgroup is generated by a subset X if it is generated by X as a topological group. In this section we prove Theorem 1.2 for profinite groups, while Corollary 5.5 for profinite groups is an immediate corollary of Theorem 3.1. Theorem 4.1. Suppose that G is an almost Engel profinite group. Then G has a finite normal subgroup N such that G/N is locally nilpotent. Recall that pro-(finite nilpotent) groups, that is, inverse limits of finite nilpotent groups, are called pronilpotent groups. Lemma 4.2. An almost Engel profinite group is pronilpotent if and only if it is locally nilpotent. Proof. Of course, any locally nilpotent profinite group is pronilpotent. Conversely, suppose that G is an almost Engel pronilpotent group. We claim that all Engel sinks are trivial: E (g) = {1} for every g ∈ G. Indeed, otherwise by Lemma 2.1 E (g) contains a non-trivial element of the form z = [z, g, . . . , g] with g occurring at least once. Choosing an open normal subgroup N with nilpotent quotient G/N such that z 6∈ N, we obtain a contradiction. Thus, E (g) = {1} for every g ∈ G, which means that all elements of G are Engel elements, that is, G is an Engel profinite group. Then G is locally nilpotent by the Wilson–Zelmanov theorem [15, Theorem 5].  T Recall that the pronilpotent residual of a profinite group G is γ∞ (G) = i γi (G), where γi (G) are the terms of the lower central series; this is the smallest normal subgroup with pronilpotent quotient. The following lemma is well known and is easy to prove. Here, element orders are understood as Steinitz numbers. The same results also hold in the special case of finite groups. Lemma 4.3. (a) The pronilpotent residual γ∞ (G) of a profinite group G is equal to the subgroup generated by all commutators [x, y], where x, y are elements of coprime orders. (b) For any normal subgroup N of a profinite group G we have γ∞ (G/N) = γ∞ (G)N/N . Proof. Part (a) follows from the characterization of pronilpotent groups as profinite groups all of whose Sylow subgroups are normal. Part (b) follows from the fact that for any elements x̄, ȳ of coprime orders in a quotient G/N of a profinite group G one can find pre-images x, y ∈ G which also have coprime orders.  The following generalization of Hall’s criterion for nilpotency [4], which will be used later, already appeared in [10], but we reproduce the proof for the benefit of the reader. We denote the derived subgroup of a group B by B ′ . Proposition 4.4. (a) Suppose that B is a normal subgroup of a group A such that B is nilpotent of class c and γd (A/B ′ ) is finite of order k. Then the subgroup 9 C = CA (γd (A/B ′ )) = {a ∈ A | [γd (A), a] 6 B ′ } has finite k-bounded index and is nilpotent of (c, d)-bounded class. (b) Suppose that B is a normal subgroup of a profinite group A such that B is pronilpotent and γ∞ (A/B ′ ) is finite. Then the subgroup D = CA (γ∞ (A/B ′ )) = {a ∈ A | [γ∞ (A), a] 6 B ′ } is open and pronilpotent. Proof. (a) Since A/C embeds into Aut γd (A/B ′ ), the order of A/C is k-bounded. We claim that C is nilpotent of (c, d)-bounded class. Indeed, using simple-commutator notation for subgroups, we have [C, . . . , C , C, C, . . . ] 6 [[γd (A), C], C, . . . ] 6 [[B, B], C, . . . ], | {z } d+1 since [γd (A), C] 6 B ′ by construction. Applying repeatedly the Three Subgroup Lemma, we obtain Y [[B, B], C, . . . , C , C, . . . ] 6 [[B, C, . . . , C ], [B, C, . . . , C ], C, . . . ] | {z } | {z } | {z } 2d−1 i+j=2d−1 i j 6 [[[B, C, . . . , C ], B], C, . . . ] | {z } d 6 [[[B, B], B], C, . . . ]. Thus, γd+1 (C) 6 γ2 (B), then γ(d+1)+(2d−1) (C) 6 γ3 (B), then a similar calculation gives γ(d+1)+(2d−1)+(3d−2) (C) 6 γ4 (B), and so on. An easy induction shows that γ1+f (c,d) (C) 6 γc+1(B) = 1 for 1 + f (c, d) = 1 + dc(c + 1)/2 − c(c − 1)/2, so that C is nilpotent of class f (c, d). (b) As a centralizer of a normal section, D is a closed normal subgroup. Since A/D embeds into Aut γ∞ (A/B ′ ), the subgroup D has finite index; thus, D is an open subgroup. We now show that the image of D = CA (γ∞ (A/B ′ )) in any finite quotient Ā of A is nilpotent. Let bars denote the images in Ā. Then γ∞ (Ā/B̄ ′ ) = γ∞ (A/B ′ ) by Lemma 4.3(b). Therefore, D̄ 6 CĀ (γ∞ (Ā/B̄ ′ )). In a finite group, γ∞ (Ā/B̄ ′ ) = γd (Ā/B̄ ′ ) for some positive integer d. Hence D̄ is nilpotent by part (a).  In general, the set of Engel elements in a profinite group may not be closed. But in an almost Engel group, Engel elements form a closed set, and moreover the following holds. Lemma 4.5. Let G be an almost Engel profinite group, and k a positive integer. Then the set Ek = {x ∈ G | |E (x)| 6 k}. is closed in G. 10 Proof. We wish to show equivalently that the complement of Ek is an open subset of G. Every element g ∈ (G \ Ek ) is characterized by the fact that |E (g)| > k + 1. Let z1 , z2 , . . . , zk+1 be some k + 1 distinct elements in E (g). Using Lemma 2.1 we can write for every i = 1, . . . , k + 1 zi = [zi , g, . . . , g], where g is repeated ki > 1 times. (4.1) Let N be an open normal subgroup of G such that the images of z1 , z2 , . . . , zk+1 are distinct elements in G/N. Then equations (4.1) show that for any u ∈ N the Engel sink E (gu) contains an element in each of the k + 1 cosets zi N. Thus, all elements in the coset gN are contained in G \ Ek . We have shown that every element of G \ Ek has a neighbourhood that is also contained in G \ Ek , which is therefore an open subset of G.  Recall that in Theorem 4.1 we need to show that an almost Engel profinite group G has a finite normal subgroup such that the quotient is locally nilpotent. The first step is to prove the existence of an open locally nilpotent subgroup. Proposition 4.6. If G is an almost Engel profinite group, then it has an open normal pronilpotent subgroup. Of course, the subgroup in question will also be locally nilpotent by Lemma 4.2; the result can also be stated as the openness of the largest normal pronilpotent subgroup. Proof. For every g ∈ G we choose an open normal subgroup Ng such that E (g)∩Ng = 1. Then g is an Engel element in Ng hgi. By Baer’s theorem [7, Satz III.6.15], in every finite quotient of Ng hgi the image of g belongs to the Fitting subgroup. As a result, the subgroup [Ng , g] is pronilpotent. Let Ñg be the normal closure of [Ng , g] in G. Since [Ng , g] is normal in Ng , which has finite index, [Ng , g] has only finitely many conjugates, so Ñg is a product of finitely many normal subgroups of Ng , each of which is pronilpotent. Hence, so is Ñg . Therefore all the subgroups Ñg are contained in the largest normal pronilpotent subgroup K. It is easy to see that G/K is an F C-group (that is, every conjugacy class is finite): indeed, every ḡ ∈ G/K is centralized by the image of Ng , which has finite index in G. A profinite F C-group has finite derived subgroup [13, Lemma 2.6]. Hence we can choose an open subgroup of G/K that has trivial intersection with the finite derived subgroup of G/K and therefore is abelian; let H be its full inverse image in G. Thus, H is an open subgroup such that the derived subgroup H ′ is contained in K. We now consider the metabelian quotient M = H/K ′ , which is also an almost Engel group, and temporarily use the symbols E (g) for the Engel g-sinks in M. For 11 every positive integer k, consider the set Ek = {x ∈ M | |E (x)| 6 k}. By Lemma 4.5, every set Ek is closed in M. Since M is an almost Engel group, we have [ M= Ei . i By the Baire category theorem [8, Theorem 34], one of these sets contains an open subset; that is, there is an open subgroup U and a coset aU such that aU ⊆ Em for some m. In other words, |E (au)| 6 m for all u ∈ U. We claim that |E (u)| 6 m2 for any u ∈ U. Indeed, by Lemma 2.3(a) both E (a) and E (au) are normal subgroups of M contained in M ′ . In the quotient  M̄ = M/ E (a)E (au) , both M̄ ′ hāi and M̄ ′ hāūi are normal locally nilpotent subgroups. Hence their product, which contains ū, is also a locally nilpotent subgroup by the Hirsch–Plotkin theorem [12, 12.1.2]. As a result, E (u) 6 E (a)E (au) and therefore |E (u)| 6 |E (a)| · |E (au)| 6 m2 . Since M ′ 6 K/K ′ , it is easy to see that E (u) = E (uk) for any u ∈ U and any k ∈ K/K ′ . Therefore, setting V = U(K/K ′ ) we have |E (v)| 6 m2 for any v ∈ V . Thus, the Engel sinks of elements of V uniformly satisfy the inequality |E (v)| 6 2 m for all v ∈ V . The same inequality holds in every finite quotient V̄ of V , to which we can therefore apply Theorem 3.1. As a result, |γ∞ (V̄ )| 6 n for some number n = n(m) depending only on m. Then also |γ∞ (V )| 6 n. Let W be the full inverse image of V , which is an open subgroup of G containing K, and let Γ be the full inverse image of γ∞ (V ). Now let F = CW (γ∞ (V )) = {w ∈ W | [Γ, w] 6 K ′ }. By Proposition 4.4(b), this is an open normal pronilpotent subgroup, which completes the proof of Proposition 4.6.  Proof of Theorem 4.1. Recall that G is an almost Engel profinite group, and we need to show that γ∞ (G) is finite. Henceforth we denote by F (L) the largest normal pronilpotent subgroup of a profinite group L. By Proposition 4.6 we already know that G has an open normal pronilpotent subgroup, so that F (G) is also open. Further arguments largely follow the scheme of proof of Theorem 1.1 in [10]. Since G/F (G) is finite, we can use induction on |G/F (G)|. The basis of this induction includes the trivial case G/F (G) = 1 when γ∞ (G) = 1. But the bulk of the proof deals with the case where G/F (G) is a finite simple group. Thus, we assume that G/F (G) is a finite simple group (abelian or non-abelian). Let p be a prime divisor of |G/F (G)|, and g ∈ G \ F (G) an element of order pn , where n is either a positive integer or ∞ (so pn is a Steinitz number). For any prime q 6= p, the element g acts by conjugation on the Sylow q-subgroup Q of F (G) as an automorphism of order dividing pn . The subgroup [Q, g] is a normal subgroup of 12 Q and therefore also a normal subgroup of F (G). The image of [Q, g] in any finite quotient has order bounded in terms of |E (g)| by Lemma 3.2. It follows that [Q, g] is finite of order bounded in terms of |E (g)|. Since [Q, g] is normal in F (G), its normal closure h[Q, g]G i in G is a product of finitely many conjugates and is therefore also finite. Let R be the product of these closures h[Q, g]G i over all Sylow q-subgroups Q of F (G) for q 6= p. Since [Q, g] is finite of order bounded in terms of |E (g)| as shown above, there are only finitely many primes q such that [Q, g] 6= 1 for the Sylow q-subgroup Q of F (G). Therefore R is finite, and it is sufficient to prove that γ∞ (G/R) is finite. Thus, we can assume that R = 1. Note that then [Q, g a ] = 1 for any conjugate g a of g and any Sylow q-subgroup Q of F (G) for q 6= p. Choose a transversal {t1 , . . . , tk } of G modulo F (G). Let G1 = hg t1 , . . . , g tk i. Clearly, G1 F (G)/F (G) is generated by the conjugacy class of the image of g. Since G/F (G) is simple, we have G1 F (G) = G. By our assumption, the Cartesian product T of all Sylow q-subgroups of F (G) for q 6= p is centralized by all elements g ti . Hence, [G1 , T ] = 1. Let P be the Sylow p-subgroup of F (G) (possibly, trivial). Then also [P G1 , T ] = 1, and therefore γ∞ (G) = γ∞ (G1 F (G)) = γ∞ (P G1 ). The image of γ∞ (P G1 ) ∩ T in G/P is contained both in the centre and in the derived subgroup of P G1 /P and therefore is isomorphic to a subgroup of the Schur multiplier of the finite group G/F (G). Since the Schur multiplier of a finite group is finite [7, Hauptsatz V.23.5], we obtain that γ∞ (G) ∩ T = γ∞ (P G1 ) ∩ T is finite. Therefore we can assume that T = 1, in other words, that F (G) is a p-group. If |G/F (G)| = p, then G is a pro-p group, so it is pronilpotent, which means that γ∞ (G) = 1 and the proof is complete. If G/F (G) is a non-abelian simple group, then we choose another prime r 6= p dividing |G/F (G)| and repeat the same arguments as above with r in place of p. As a result, we reduce the proof to the case F (G) = 1, where the result is obvious. We now finish the proof of Theorem 4.1 by induction on |G/F (G)|. The basis of this induction where G/F (G) is a simple group was proved above. Now suppose that G/F (G) has a nontrivial proper normal subgroup with full inverse image N, so that F (G) < N ⊳ G. Since F (N) = F (G), by induction applied to N the group γ∞ (N) is finite. Since N/γ∞ (N) 6 F (G/γ∞ (N)), by induction applied to G/γ∞ (N) the group γ∞ (G/γ∞ (N)) is also finite. As a result, γ∞ (G) is finite, as required.  5. Compact almost Engel groups In this section we prove the main Theorem 1.2 about compact almost Engel groups. We use the structure theorems for compact groups and the results of the preceding section on profinite almost Engel groups. 13 Recall that a group H is said to be divisible if for every h ∈ H and every positive integer k there is an element x ∈ H such that xk = h. Proposition 5.1. If H is an almost Engel divisible group, then H is in fact an Engel group. Proof. We need to show that E (h) = {1} for every h ∈ H. Let |E (h)| = k. Let g ∈ H be an element such that g k! = h. Since g centralizes h, by Lemma 2.2 we obtain that h = g k! centralizes E (h). By the minimality of the h-sink, then E (h) = {1}, as required.  We are ready to prove Theorem 1.2. Proof of Theorem 1.2. Let G be an almost Engel compact group; we need to show that there is a finite subgroup N such that G/N is locally nilpotent. By the wellknown structure theorems (see, for example, [6, Theorems 9.24 and 9.35]), the connected component of the identity G0 in G is a divisible group such that G0 /Z(G0) is a Cartesian product of simple compact Lie groups, while the quotient G/G0 is a profinite group. By Proposition 5.1, G0 is an Engel group. Compact Lie groups are linear groups, and linear Engel groups are locally nilpotent by the Garashchuk– Suprunenko theorem [1] (see also [2]). Hence G0 = Z(G0 ) is an abelian subgroup. Remark 5.2. If a compact group G is an Engel group, then by the above G is an extension of an abelian subgroup G0 by a profinite group G/G0 . Being an Engel group, G/G0 is locally nilpotent by the Wilson–Zelmanov theorem [15, Theorem 5]. It is known that an Engel abelian-by-(locally nilpotent) group is locally nilpotent (see, for example, [12, 12.3.3]). This gives an alternative proof of Medvedev’s theorem [11]. We proceed with the proof of Theorem 1.2. Lemma 5.3. For every g ∈ G we have E (g) ∩ G0 = 1, which is equivalent to the fact that for any x ∈ G0 we have [x, g, . . . , g] = 1 if g is repeated sufficiently many times. Proof. Suppose the opposite and choose 1 6= z ∈ E (g) ∩ G0 . By Lemma 2.1 then z = [z, g, . . . , g] with g occurring at least once. Hence z belongs also to the gsink within the semidirect product G0 hgi. Since this subgroup is metabelian, by Lemma 2.3(a) the g-sink in G0 hgi is a subgroup, which is equal to E (g) ∩ G0 . Therefore we can choose z1 in E (g) ∩ G0 of some prime order p = |z1 |. Again by Lemma 2.1 we have z1 = [z1 , g, . . . , g] with g occurring at least once. In the divisible k group G0 for every k = 1, 2, . . . there is an element zk such that zkp = z1 . We have yk = [zk , g, . . . , g] ∈ E (g) ∩ G0 when g is repeated sufficiently many times. 14 k k Then ykp = [zkp , g, . . . , g] = [z1 , g, . . . , g], which is an element of the orbit of z1 in E (g)∩G0 under the mapping x → [x, g] and therefore has the same order p = |z1 | by Lemma 2.3(b). Thus, yk is an element of E (g) of order exactly pk+1 , for k = 1, 2, . . . . As a result, E (g) is infinite, a contradiction with the hypothesis.  Applying Theorem 4.1 to the almost Engel profinite group Ḡ = G/G0 we obtain a finite normal subgroup D with locally nilpotent quotient. Then D contains all Engel sinks E¯(g) of elements g ∈ Ḡ and therefore the subgroup E generated by them: E := hE¯(g) | g ∈ Ḡi 6 D. Clearly, E¯(g)h = E¯(g h ) for any h ∈ Ḡ; hence E is a normal finite subgroup of Ḡ. We replace D by E in the sense that Ḡ/E is also locally nilpotent by the Wilson– Zelmanov theorem [15, Theorem 5], since this is an Engel profinite group. We now consider the action of Ḡ by automorphisms on G0 induced by conjugation. Lemma 5.4. The subgroup E acts trivially on G0 . Q Proof. The abelian divisible group G0 is a direct product A0 × p Ap of a torsion-free divisible group A0 and Sylow subgroups Ap over various primes p. Clearly, every Sylow subgroup is normal in G. First we show that E acts trivially on each Ap . It is sufficient to show that for every g ∈ Ḡ every element z ∈ E¯(g) acts trivially on Ap . Consider the action of hz, gi on Ap . Note that hz, gi = hz hgi ihgi, where hz hgi i is a finite g-invariant subgroup, since it is contained in the finite subgroup E. For any a ∈ Ap the subgroup hahgi i = ha, [a, g], [a, g, g], . . . i is a finite p-group by Lemma 5.3, and this subgroup is g-invariant. Its images under the action of elements of the finite group hz hgi i generate a finite p-group B, which is hz, gi-invariant. Lemma 5.3 implies that the image of hz, gi in its action on B must be a p-group. Indeed, otherwise this image contains a p′ element y that acts non-trivially on the Frattini quotient V = B/Φ(B). Then V = [V, y] and CV (y) = 1, whence [V, y] = {[v, g] | v ∈ [V, y]} and therefore also [V, y] = {[v, y, . . . , y] | v ∈ [V, y]} with y repeated n times, for any n, contrary to Lemma 5.3. But since z is an element of E¯(g), by Lemma 2.1 we have z = [z, g, . . . , g] with at least one occurrence of g. Since a finite p-group is nilpotent, this implies that the image of z in its action on B must be trivial. In particular, z centralizes a. As a result E acts trivially on Ap , for every prime p. Q We now show that E also acts trivially on the quotient W = G0 / p Ap of G0 by its torsion part. Note that W can be regarded as a vector space over Q. Every element g ∈ E has finite order and therefore by Maschke’s theorem W = [W, g] × CW (g). If [W, g] 6= 1, then [W, g] = {[w, g, . . . , g] | w ∈ [W, g]} with g repeated n times, for any n. This contradicts Lemma 5.3. 15 Q Thus, E acts trivially both on W and on p Ap . Then any automorphism of G0 induced by conjugation by g ∈ E acts on every element a ∈ A0 as ag = at, where i t = t(a) is an element of finite order in G0 . Since ag = ati , the order of t must divide the order of g. Assuming the action of E on G0 to be non-trivial, choose an element g ∈ E acting on G0 as an automorphism of some prime order p. Then there is a ∈ A0 such that ag = at, where t ∈ G0 has order p. For any k = 1, 2, . . . there k k is an element ak ∈ A0 such that apk = a. Then agk = ak tk , where tpk = t. Thus |tk | = pk+1, and therefore pk+1 divides the order of g, for every k = 1, 2, . . . . We arrived at a contradiction since g has finite order.  Let F be the full inverse image of E in G. Recall that we have normal subgroups G0 6 F 6 G such that G0 is divisible, F/G0 is finite, and G/F is locally nilpotent. We aim at producing a finite normal subgroup N such that G/N is locally nilpotent. By Lemma 5.4 the subgroup G0 is contained in the centre of the full inverse image F of E, so that F has centre of finite index. Then the derived subgroup F ′ is finite by Schur’s theorem [7, Satz IV.2.3]. We can assume that F ′ = 1, so that then F is abelian. In the abstract abelian group F the divisible subgroup G0 has a complement C, which is obviously finite, F = G0 × C. Let M be the normal closure of C in G. Note that G/M is a locally nilpotent group. Indeed, G/F is locally nilpotent, while F/M is G-isomorphic to G0 /(G0 ∩ M) so that G/M is an Engel group by Lemma 5.3. Being an abelian-by-(locally nilpotent) Engel group, then G/M is locally nilpotent. Consider the natural semidirect product M ⋊(G/CG (M)) with the induced topology, in which the action of G/CG (M) on M is continuous. Both M and G/CG (M) are profinite groups; therefore M ⋊ (G/CG (M)) is also a profinite group (see [14, Lemma 1.3.6]). Note that G/CG (M) is locally nilpotent, since M 6 CG (M). The group M ⋊ (G/CG (M)) is also almost Engel, so by Theorem 4.1 it contains a finite normal subgroup with locally nilpotent quotient. This finite subgroup therefore contains the subgroup K generated by all Engel sinks in M ⋊ (G/CG (M)); since G/CG (M) is locally nilpotent, K 6 M. Since G/M is also locally nilpotent, the Engel sinks in G are all contained in M and coincide with the Engel sinks in M ⋊ (G/CG (M)). Renaming K by N as a subgroup of G we arrive at the required result. Indeed, N is a normal subgroup because E (g)h = E (g h ) for any h ∈ G. The group G/N is locally nilpotent being an Engel group which is an extension of an abelian group F/N by a locally nilpotent group G/F . The proof of Theorem 1.2 is complete.  Corollary 5.5. Let G be an almost Engel compact group such that for some positive integer m all Engel sinks E (g) have cardinality at most m. Then G has a finite normal subgroup N of order bounded in terms of m such that G/N is locally nilpotent. 16 Proof. By Theorem 1.2 the group G is finite-by-(locally nilpotent). Therefore every abstract finitely generated subgroup H of G is finite-by-nilpotent and residually finite. By Theorem 3.1, every finite quotient of H has nilpotent residual of mbounded order. Hence γ∞ (H) is also finite of m-bounded order, and H/γ∞ (H) is nilpotent. Thus, every finitely generated subgroup of G has a normal subgroup of m-bounded order with nilpotent quotient. By the standard inverse limit argument, the group G has a normal subgroup of m-bounded order with locally nilpotent quotient.  Acknowledgements The authors thank Gunnar Traustason and John Wilson for stimulating discussions. The first author was supported by the Russian Science Foundation, project no. 14-21-00065, and the second by the Conselho Nacional de Desenvolvimento Cientı́fico e Tecnológico (CNPq), Brazil. The first author thanks CNPq-Brazil and the University of Brasilia for support and hospitality that he enjoyed during his visits to Brasilia. References [1] M. S. Garashchuk and D. A. Suprunenko, Linear nilgroups, Dokl. Akad. Nauk BSSR 4 (1960), 407–408. (Russian) [2] K. W. Gruenberg, The Engel structure of linear groups, J. Algebra 3 (1966), 291–303. [3] O. Grün, Beitrge zur Gruppentheorie. I, J. Reine Angew. Math. 174 (1935), 1–14. [4] P. Hall, Some sufficient conditions for a group to be nilpotent, Illinois J. Math. 2 (1958), 787–801. [5] P. Hall and G. Higman, The p-length of a p-soluble group and reduction theorems for Burnside’s problem, Proc. London Math. Soc. (3) 6 (1956), 1–42. [6] K. H. Hofmann and S. A. Morris, The structure of compact groups, De Gruyter, Berlin, 2006. [7] B. Huppert, Endliche Gruppen. I (Springer, Berlin, 1967). [8] J. L. Kelley, General topology, Grad. Texts in Math., vol. 27, Springer, New York, 1975. [9] E. I. Khukhro and V. D. Mazurov, Finite groups with an automorphism of prime order whose centralizer has small rank, J. Algebra 301 (2006) 474–492. [10] E. I. Khukhro and P. Shumyatsky, Almost Engel finite and profinite groups, Int. J. Algebra Comput., 26, no. 5 (2016), 973–983. [11] Yu. Medvedev, On compact Engel groups, Israel J. Math. 185 (2003), 147–156. [12] D. J. S. Robinson, A course in the theory of groups, Springer, New York, 1996. [13] A. Shalev, Profinite Groups with Restricted Centralizers, Proc. Amer. Math. Soc. 122, no. 4 (1994), 1279–1284. [14] J. S. Wilson, Profinite groups (Clarendon Press, Oxford, 1998). [15] J. S. Wilson and E. I. Zelmanov, Identities for Lie algebras of pro-p groups, J. Pure Appl. Algebra 81, no. 1 (1992), 103–109. 17 Sobolev Institute of Mathematics, Novosibirsk, 630090, Russia, and University of Lincoln, U.K. E-mail address: [email protected] Department of Mathematics, University of Brasilia, DF 70910-900, Brazil E-mail address: [email protected] 18
4math.GR
arXiv:1801.09117v1 [math.GR] 27 Jan 2018 Centralizer fusion systems of central involutions in a finite group with soluble centralizer of involutions KIVANÇ ERSOY and İPEK TUVAY Abstract. It is a long-standing open problem raised by Starostin to describe all finite groups with soluble centralizers of involutions. One can observe that if the centralizer fusion system of an involution is nilpotent, then the centralizer of that involution is soluble. In this paper, we classify the cases when the centralizer fusion system of a central involution in a finite group whose all involutions have soluble centralizers is a nilpotent fusion system. Indeed, we analyse the case when the solvable radical has odd order and the corresponding factor group is simple. 2010 Mathematics Subject Classification: 20D05, 20D20 Keywords: centralizer of involution, fusion system, finite simple group. 1. Introduction Since Brauer-Fowler Theorem indicates that there are finitely many simple groups with a given structure of centralizer of an involution, the study of such proper subgroups has been an active research area on the way to the classification of finite simple groups. Starostin raised the following problem: Problem 1.1. [6, Problem 2.74] Describe the finite groups all of whose involutions have soluble centralizers. 1 2 KIVANÇ ERSOY AND İPEK TUVAY Here one should mention the famous N-group papers of Thompson (see [11, 12, 13, 14, 15, 16]) where finite simple groups in which normalizers of p-subgroups are soluble, are classified. Clearly, centralizer of an involution is exactly the normalizer of the subgroup generated by that involution. Hence, finite simple groups in Thompson’s list occur as natural examples of finite simple groups with soluble centralizers of involutions. Indeed, Gorenstein and Lyons classified finite groups whose all 2-local subgroups are soluble (see [5, Main Theorem]). By the classification of finite simple groups, one can list finite simple groups all of whose involutions have soluble centralizers (See the list in Proposition 3.1). Moreover, Syskin proved the following theorem for finite non-soluble groups in which all involutions of the Sylow 2-subgroup P are contained in center of P . Theorem 1.2. [9, Theorem A] Let G be a finite non-soluble group with soluble centralizers of involutions and P a Sylow 2-subgroup of G. Assume that the subgroup generated by all involutions of P is contained in the center of P . Then G/O2′ (G) has a normal subgroup isomorphic to one of the following groups: (1) P SL2 (q) where q = 3, 5 mod 8 (2) SL2 (2n ) where n ≥ 2 (3) P SU3 (2n ) where n ≥ 2 (4) 2 B2 (22m+1 ) where m ≥ 1. The theory of fusion systems which was originated from the work of Burnside and Frobenius, was formulated axiomatically by Puig (for details see [1, 2, 7]). Let G be a finite group and P be a Sylow p-subgroup of G. The fusion system FP (G) is the category whose objects are subgroups of P and whose morphisms are induced by the conjugation action by elements of G on the subgroups of P . In this paper fusion systems are used as an invariant of the groups with soluble centralizers of involutions having odd order soluble radicals (see Lemma 2.2). CENTRALIZER FUSION SYSTEMS OF CENTRAL INVOLUTIONS 3 In this paper we investigate a special type of finite groups with soluble centralizers of involutions in which the soluble radical has odd order. We ask the following question: Question 1.3. Let G be a finite group whose all involutions have soluble centralizers and R its soluble radical. If R has odd order and G/R is simple, is the centralizer of a central involution of G necessarily an extension of an odd order group by a 2-group? We use knowledge about fusion systems to classify the cases when this property holds. Indeed we prove that this result just depend on the structure of G/R. The main result of the paper is the following: Theorem 1.4. Let G be a finite non-soluble group with soluble centralizers of involutions. Assume that the soluble radical R of G has odd order and G/R is simple. Let x be a central involution of G. Then the following holds. (1) CF (x) is nilpotent iff G/R is isomorphic to one of A5 , A6 , A7 , P SL2 (q),2 B2 (2m ) where m is odd, M11 or 2 F4 (2)′ . (2) CF (x) is non-nilpotent iff G/R is isomorphic to one of A8 , P SL3(2n ), P SL3 (3) or P SU3 (2n ). Therefore, whenever the centralizer fusion system is nilpotent, the centralizer of the central involution is isomorphic to an odd order group extended by a 2-group. 2. Preliminaries In this section we collect definitions and results that will be used in our proofs. Definition 2.1. An involution x of a finite simple group G is called a central involution if CG (x) contains a Sylow 2-subgroup of G. Likewise for groups, there is a notion of centralizer fusion system in general. To avoid technicality, we will define it here for just central 4 KIVANÇ ERSOY AND İPEK TUVAY involutions, indeed by using [2, Theorem 4.27], for a central involution x ∈ G, the centralizer fusion system CF (x) of x in F = FP (G) can be viewed as the fusion system FP (CG (x)). We use the following result to see that the 2-fusion system of a finite group with a soluble radical of odd order is isomorphic to the 2-fusion system of the quotient. Lemma 2.2. [7, Theorem 2.12] Let G be a finite group, P be a Sylow 2-subgroup of G. If N is a normal 2′ -subgroup of G then FP (G) ∼ = FP N/N (G/N). The following result characterizes nilpotent fusion systems. Recall that the Sylow p-subgroup P has a normal p-complement in G iff Op′ (G) ⋊ P ∼ = G. Theorem 2.3. [2, Theorem 1.12] (Frobenius Normal p- Complement Theorem) Let G be a finite group and P be a Sylow psubgroup of G. Then FP (G) = FP (P ) iff P has a normal p-complement in G. Let G be a finite group and x ∈ G be an involution in G. Let P be a Sylow 2-subgroup of G containing x. Proposition 2.4. Let G be a finite group, P be a Sylow 2-subgroup of G and x be a central involution in P . Let F = FP (G). If CF (x) is a nilpotent fusion system, then CG (x) is soluble. Proof. Observe that if CF (x) = FP (CG (x)) is nilpotent, then by Theorem 2.3, CG (x) has a normal subgroup K of odd order where [CG (x) : K] is a 2-power. Indeed, CG (x) = P K. Now, K is soluble by Odd Order Theorem, and P is a 2-group, hence CG (x) is soluble.  3. Main Results We first need to give a list of finite simple groups with soluble centralizers of involutions. CENTRALIZER FUSION SYSTEMS OF CENTRAL INVOLUTIONS 5 Proposition 3.1. Let S be a finite non-abelian simple group with soluble centralizer of involutions. Then S is isomorphic to one of the following groups: (1) A5 , A6 , A7 , A8 ; (2) P SL2 (q) where q ≥ 4 is a prime power; (3) 2 B2 (22n+1 ), n ∈ N; (4) P SL3 (2n ) n ∈ N (5) P SL3 (3); (6) P SU3 (3); (7) P SU3 (2n ), n ∈ N (8) Matthieu group M11 (9) Tits group 2 F4 (2)′ Proof. Let G be an alternating group An . Take x = (12)(34). ∼ A8 . One can easily observe that CG (x) is non-soluble if n ≥ 9. Let G = There are two conjugacy class of involutions, one of which is a product of two transpositions and the other is a product of four transpositions. It is easy to check that in any case the centralizers are soluble. Since A5 , A6 and A7 are subgroups of A8 , they also have soluble centralizers of involutions. Let G be a simple group of Lie type. Then there is a simple linear algebraic group G of adjoint type over the algebraic closure of Fp , a ′ Frobenius map σ of G such that G = O p (Gσ ). Clearly, CG (x) = ′ O p (CG (x, σ)). First assume that p 6= 2. Then involutions are semisimple elements of G. Assume that CG (x) is soluble. Now, by [3, Theorem D], centralizer of an involution in G over the algebraic closure of Fq involves a simple linear algebraic group whenever 2 ≤ Σmi , namely the highest root. Then the sum of coefficients of the highest root is 2 which means G is of type P SL2 (q). Now, assume CG (x) is non-soluble where CG (x) is soluble. This means there is P SL2 (p), which is soluble, which means p = 3. Hence, the groups are either P SL2 (q) or P SL3 (3). 6 KIVANÇ ERSOY AND İPEK TUVAY Secondly assume p = 2. Then involutions are unipotent elements. If rank(G) > 2, take an involution u belonging to the root subgroup hxr (t) : t ∈ F2 i for the positive root r. Since rank(G) > 2, there is a positive root s such that r + s nor r − s is a not root, (indeed, if you choose r a fundamental root, there is another fundamental root s such that r+s is not a root, r−s is not a root in any case.) Therefore, there is a subgroup hxs (t1 ), x−s (t2 ) : t1 , t2 ∈ F2 i, which is clearly non-soluble. Now, assume G ∼ = C2 (2n ), where the root system of C2 is generated by r, s with highest root 2r+s. Since 2r+2s and 2r are not roots in the root system C2 , by Chevalley Commutator Formula, the highest root commutes with hxs (t1 ), x−s (t2 ) : t1 , t2 ∈ F2n i, which is non-soluble. Hence, the rest only follows from the list, indeed G is one of the groups listed ′ in [5, Main Theorem], namely 2 B2 (22m+1 ), P SU3(2m ),2 F4 (2) .Similarly, Tits group 2 F4 (2)′ is another simple group which is listed in [5, Main Theorem]. Consider the case when G is one of the sporadic simple groups. One can observe that M11 has a semidihedral Sylow 2-subgroup P of order 16 and Z(P ) has order 2. Moreover, any involution in P has soluble centralizer, so M11 is the only sporadic group belonging to our list. By [5, Main Theorem], the list is complete.  Theorem 3.2. Let G be a finite group with soluble centralizers of involutions. Suppose the soluble radical R of G has odd order. Then S ≤ G/R ֒→ Aut(S) where S is the unique minimal normal subgroup of G/R. Proof. Let G be a finite group with soluble centralizers of involutions and a soluble radical R of odd order. Then CG/R (xR) = CG (x)R/R for any involution x ∈ G, hence G/R is a finite group with soluble centralizers of involutions and trivial soluble radical. Take a minimal normal subgroup M of G/R. Being a non-soluble minimal normal subgroup, M ∼ = Σt S where S is a fixed finite non-abelian i=1 simple group. Since any involution in S × {1} × . . . × {1} ≤ M has CENTRALIZER FUSION SYSTEMS OF CENTRAL INVOLUTIONS 7 soluble centralizers of involutions, one has t = 1. Therefore, G/R has a minimal normal subgroup isomorphic to S where S is a finite simple group with soluble centralizers of involutions, namely one of the groups listed in Proposition 3.1. Now, assume that N is another minimal normal subgroup of G/R. Since S ∩ N must be trivial, N ≤ CG (S) ≤ CG (x) for any involution x ∈ S. Hence, N must be soluble. But G/R has no soluble normal subgroups, hence S is the unique minimal normal subgroup of G/R. In particular, CG (S) is a normal subgroup of G which commute elementwise by S, so CG (S) has odd order, that is CG (S) = 1. Now, G/CG/R (S) ∼ = G/R embeds naturally in AutS, while S embeds in the former trivially.  For fusion systems, we will concentrate on the groups G where G/R ∼ = S. Recall that a fusion system F defined on a p-group P is called nilpotent if F = FP (P ). First, we need to show that for any central involution x in P SL2 (q), the centralizer fusion system CF (x) is nilpotent. Proposition 3.3. Every subgroup of odd order in the dihedral group D2n is normal. Proof. Consider the dihedral group D2n = hr, ρ : r n = ρ2 = 1 and rρ = ρr n−1 i. Clearly, (ρr k )2 = 1 for any k. Hence, if y ∈ D2n is not an involution, then y ∈ H = hri, which is normal in D2n . But since H is cyclic, any subgroup is characteristic in H, hence normal in D2n . Therefore, any subgroup of odd order is normal in D2n .  Lemma 3.4. Let G ∼ = P SL2 (q) where q = pn , let P be a Sylow 2-subgroup of G, F = FP (G) and x is a central involution in P . Then CF (x) is nilpotent. Proof. Since x was assumed to be a central involution, by definition, CF (x) = FP (CG (x)). First assume that q is even. In this case, a Sylow 2-subgroup P of G is an elementary abelian 2-group conjugate to unitriangular subgroup 8 KIVANÇ ERSOY AND İPEK TUVAY of P SL2 (q) and CG (x) = P for any x ∈ P . Hence, CF (x) = FP (P ), hence it is nilpotent. Now assume that q is odd. Then P consists of semisimple elements. Take the central involution x ∈ P . Since x is semisimple, it is contained in a maximal torus T of G, which has order either q−1 2 or q+1 . 2 Moreover, CG (x) is a dihedral group which contains T as a normal subgroup, that is CG (x) ∼ = Dq−1 or Dq+1 , dihedral groups of order q − 1 or q + 1 respectively. In any case, by Proposition 3.3, Hall 2′ -subgroup of CG (x) is normal. By Theorem 2.3, FP (CG (x)) = FP (P ) iff for any CG (x) has a normal 2-complement. Hence, FP (CG (x)) is nilpotent.  Theorem 3.5. Let G be a simple group of Lie type over a finite field of characteristic 2. Let P be a Sylow 2-subgroup of G, F = FP (G) and x ∈ Z(P ) be a central involution. Then CF (x) is nilpotent iff G∼ = SL2 (2n ),2 B2 (22m+1 ) or P SL(3, 2) and not nilpotent in P SL3 (2n ) and P SU3 (2n ). Proof. Assume that CF (x) is nilpotent, that is, equal to FP (P ). Then it is also a soluble fusion system by [2, Corollary 5.96]. Then, CG (x) must be soluble, since P has a normal 2-complement in CG (x) by [2, Theorem 1.12]. Then G must be isomorphic to P SL2 (2n ),2 B2 (22m+1 )P SL3 (2n ) or P SU3 (2n ). G = P SL2 (2n ) ∼ = SL2 (2n ) has an abelian Sylow 2-subgroup P with CG (x) = P where x is a central involution. Hence the centralizer fusion system is nilpotent. Now, assume that G ∼ = P SL3 (2n ). The centralizer of the central involution x contains the Sylow 2-subgroup as a normal subgroup. Assume the 2′ -subgroup of CG (x) is also normal. Then CG (x) becomes a direct product of a 2-group and a group of odd order. But  a b c    CG (x) = { 0 e f  Z : a, b, c, e, f ∈ F2n } 0 0 a CENTRALIZER FUSION SYSTEMS OF CENTRAL INVOLUTIONS  a 0 0 9    does not normalize T = { 0 e 0  Z : a, e ∈ F2n }, hence the 0 0 a centralizer fusion system of the central involution is not nilpotent. Let G ∼ = P SU3 (22n ), let P be a Sylow 2-subgroup of G, F = FP (G) and x is a central involution in P . Then CF (x) is not nilpotent. Indeed, let q = 2n . By [8, p.528], one can choose the hermitian form given by   0 0 1   A =  0 1 0  and define SU3 (q 2 ) = {X ∈ SL3 (q 2 ) : X t AX = A} 1 0 0 n where (Aij ) = (A2ij ) and P SU3 (q 2 ) = SU3 (q 2 )/Z(SU3 (q 2 )). Observe that the order of Z(SU3 (q 2 )) divides 3. Denote G = P SU3 (q 2 ). By [8, p. 529], all involutions in G are conjugate and every involution is   1 0 1   central. So, choose x =  0 1 0  ∈ G, and observe by [8, p.529] 0 0 1 that   α β γ   CG (x) = { 0 αq−1 α−1 β q  Z : αq+1 = 1 and αγ q +αq γ = β q+1}. 0 α−q 0 We need to show that CG (x) does not have a normal 2-complement. Observe that |CG (x)| = q 3 (q + 1) and  a 0  Q = { 0 aq−1 0 0 0   0  Z : aq+1 = 1} a−q is a subgroup of CG (x) of order q + 1. Since Q is a complement of the Sylow 2-subgroup P of CG (x) (which is itself normal), if one shows that Q is not normal, then CG (x) does not have a normal 2-complement and by [2, Theorem 1.12], CF (x) is not nilpotent. Assume that Q E CG (x). Since P E CG (x), elements of Q must commute with elements of P , indeed, CCG (x) (P ) must contain Q. If 10  KIVANÇ ERSOY AND İPEK TUVAY a 0 0  n+1   = a, hence we get a  0 aq−1 0  ∈ CCG (x) (P ) then a2q = a2 0 0 a−q contradiction. Therefore, CF (x) is not nilpotent for P SU3 (2n ). Finally, we need to check 2 B2 (22m+1 ). Observe that for any central involution x, one has CG (x) = P where P is the Sylow 2-subgroup containing x. Hence the centralizer fusion system is nilpotent.  Theorem 3.6. Let G be a finite group with soluble centralizers of involutions, P be a Sylow 2-subgroup of G and F = FP (G) and x be a central involution of G. Assume that the soluble radical R of G has odd order and G/R is simple. Then CF (x) is a nilpotent fusion system except G/R is either A8 , P SL3(2n ), P SU3 (2n ) or P SL3 (3). Proof. From [7, Theorem 2.12], FP (G) ∼ = FP R/R (G/R). Moreover since CP (x) = P , < x > is fully centralized, so from [2, Theorem 4.27] we get CF (x) = FP (CG (x)) ∼ = FP R/R (CG/R (xR)) Thus, it is enough to calculate the centralizers of central involutions for the finite simple groups S such that G/R ∼ = S (here we should mention that S is one of the finite simple groups listed in Proposition 3.1). If S = A5 , any involution in S is a product of two transpositions and P is isomorphic to Klein 4-group. Let x be one of the involutions in P . Since CS (x) = P , we have CF (x) = FP (P ). If S = A6 , then for any involution in S, there exists a Sylow 2-subgroup of S whose center contains this involution. Indeed, for any involution x = (ab)(cd) and for y = (acbd)(ef ) where {e, f } ∈ {1, 2, 3, 4, 5, 6}\{a, b, c, d} one has P =< y, z | y 4 = z 2 = 1, zyz −1 = y −1 >∼ = D8 such that x ∈ Z(P ). Here, P is a Sylow 2-subgroup of S, so x is a central involution. Observe that CS (x) ∼ = (C2 ≀ C2 ) × C2 , from 6 this we get |CA6 (x)| = 8. Hence CF (x) = FP (P ). CENTRALIZER FUSION SYSTEMS OF CENTRAL INVOLUTIONS 11 If S = A7 , likewise A5 and A6 any involution is a product of two transpositions. Since CS (x) ∼ = (C2 ≀C2 )×S3 and CA (x) = CS (x)∩A7 , 7 7 7 we get CS (x) ∼ = P × A3 where P is a Sylow 2-subgroup of S isomorphic to D8 . Hence CF (x) = FP (P × A3 ) = FP (P ). Let S = A8 ∼ = GL4 (2) and P is a Sylow 2-subgroup of S. In this case, any central involution in S is a product of four transpositions. If x is one of these involutions, CS (x) ∼ = C2 ≀ S4 , and similar to the 8 arguments above CA8 (x) ∼ = UT4 (2), CF (x) is not = C24 ⋊ A4 . Since P ∼ nilpotent. If S = P SL2 (q) for some q, then by Lemma 3.4, CF (x) is nilpotent for any involution x ∈ S. If S = P SL3 (3) any involution is central and from [4, Lemma 5.1] CS (x) ∼ = GL2 (3) for any involution x in S. Since GL2 (3) is not 2nilpotent, by [2, Theorem 1.12] we deduce that CF (x) is not nilpotent. If S = M11 , observe that the centralizer of the central involution z ∈ S, namely CS (z) has order 48 and the Sylow 3-subgroup of CS (z) is not normal. That means, CF (x) is not nilpotent.  By Theorem 3.5, when the simple group is defined over a field of characteristic 2, the centralizer fusion system CF (x) of the central involution is nilpotent iff G ∼ = SL2 (2n ),2 B2 (22m+1 ) or P SL(3, 2) and not nilpotent in P SL3 (2n ) and P SU3(2n ). This completes the proof of the main theorem. Acknowledgements The first and second authors were partially supported by Mimar Sinan Fine Arts University Scientific Research Project Unit with project numbers 2017/21 and 2017/22, respectively. References [1] M. Aschbacher, R. Kessar, B. Oliver, Fusion Systems in Algebra and Topology, Cambridge Univ. Press, Cambridge, 2011. 12 KIVANÇ ERSOY AND İPEK TUVAY [2] D. A. Craven, The Theory of Fusion Systems, Cambridge Univ. Press, Cambridge, 2011. [3] B. Hartley, M. Kuzucuol̆u, “Centralizers of elements in locally finite simple groups”, Proc. London. Math. Soc.3 (62) 1991 301-324 [4] B. Huppert, N. Blackburn, Finite Groups III, Springer-Verlag, Berlin Heidelberg, 1982. [5] D. Gorenstein, R. Lyons, “Non-solvable finite groups with solvable 2-local subgroups”, J. Algebra 38, 453-522 (1976). [6] V.D. Mazurov, E.I. Khukhro, Unsolved problems in group theory, The Kourovka Notebook 18 Novosibirsk 2014. [7] M. Linckelmann, Introduction to fusion systems, Group Representation Theory, EPFL Press, Lausanne, 2007, 79-113. [8] L. Pforte, “The involution module of P SU3 (22f ), Osaka J. Math. 52 (2015), 527-544 [9] S.A. Syskin, “On finite groups with solvable centralizers of involutions”, Algebra and Logic, May 1971, Volume 10, Issue 3, pp. 206-216. [10] J. Tits, “Algebraic and abstract simple groups”, Ann. of Math. 80 (1964), 313-329 [11] J.G. Thompson, “Nonsolvable finite groups all of whose local subgroups are solvable”, Bulletin of the American Mathematical Society 74, (1968) 383-437 [12] J.G. Thompson, “Nonsolvable finite groups all of whose local subgroups are solvable. II”, Pacific Journal of Mathematics 33, (1970) 451-536 [13] J.G. Thompson, “Nonsolvable finite groups all of whose local subgroups are solvable. III”, Pacific Journal of Mathematics 39, (1971) 483-534 [14] J.G. Thompson, ”Nonsolvable finite groups all of whose local subgroups are solvable. IV”, Pacific Journal of Mathematics 48, (1973) 511-592 [15] J.G. Thompson, “Nonsolvable finite groups all of whose local subgroups are solvable. V”, Pacific Journal of Mathematics 50, (1974) 215-297 [16] J.G. Thompson, “Nonsolvable finite groups all of whose local subgroups are solvable. VI”, Pacific Journal of Mathematics 51, (1974) 573-630 CENTRALIZER FUSION SYSTEMS OF CENTRAL INVOLUTIONS 13 Department of Mathematics, Mimar Sinan Fine Arts University, Istanbul, 34427 Turkey and Institute of Mathematics, Freie Universität Berlin, Germany E-mail address: [email protected] Department of Mathematics, Mimar Sinan Fine Arts University, Istanbul, 34427 Turkey E-mail address: [email protected]
4math.GR
1 Inexact Alternating Optimization for Phase Retrieval In the Presence of Outliers arXiv:1605.00973v2 [cs.IT] 24 Jul 2017 Cheng Qian, Xiao Fu, Member, IEEE, Nicholas D. Sidiropoulos, Fellow, IEEE, Lei Huang, Senior Member, IEEE, and Junhao Xie, Senior Member, IEEE Abstract—Phase retrieval has been mainly considered in the presence of Gaussian noise. However, the performance of the algorithms proposed under the Gaussian noise model severely degrades when grossly corrupted data, i.e., outliers, exist. This paper investigates techniques for phase retrieval in the presence of heavy-tailed noise – which is considered a better model for situations where outliers exist. An `p -norm (0 < p < 2) based estimator is proposed for fending against such noise, and twoblock inexact alternating optimization is proposed as the algorithmic framework to tackle the resulting optimization problem. Two specific algorithms are devised by exploring different local approximations within this framework. Interestingly, the core conditional minimization steps can be interpreted as iteratively reweighted least squares and gradient descent. Convergence properties of the algorithms are discussed, and the CramérRao bound (CRB) is derived. Simulations demonstrate that the proposed algorithms approach the CRB and outperform stateof-the-art algorithms in heavy-tailed noise. Index Terms—Phase retrieval, iterative reweighted least squares (IRLS), gradient descent, impulsive noise, Cramér-Rao bound (CRB). I. I NTRODUCTION Phase retrieval aims at recovering a signal x ∈ CN from only the magnitude of linear measurements. This is an old problem [2], [3] that has recently attracted renewed and growing interest. Phase retrieval arises in many fields, such as X-ray crystallography, coherent diffraction imaging, and optical imaging and astronomy, where the detectors only record the intensity information, because phase is very difficult and expensive to measure. The mathematical description of the phase retrieval problem is simple: given the measuring matrix A = [a1 · · · aM ]H ∈ CM ×N and the measurement vector y ∈ RM , where am ∈ CN , and y = |Ax|, find x ∈ CN . Early attempts to solve the phase retrieval problem can be traced back to the 1970s, where techniques such as Gerchberg-Saxton (GS) [2], Fienup [3] and their variants were proposed. These algorithms have been empirically Original manuscript submitted to IEEE Trans. on Signal Processing, October 4, 2016; revised July 25, 2017. Conference version of part of this work appears in Proc. EUSIPCO 2016 [1]. C. Qian, X. Fu and N. D. Sidiropoulos are with the Department of Electrical and Computer Engineering, University of Minnesota, Minneapolis, MN 55455 USA (e-mail: [email protected], [email protected], [email protected]). L. Huang is with the College of Information Engineering, Shenzhen University, Shenzhen, 518060 China (e-mail: [email protected]). J. Xie is with the Department of Electronics and Information Engineering, Harbin Institute of Technology, Harbin, 150001 China (e-mail: [email protected]). The work of N. Sidiropoulos was supported by NSF CIF-1525194. shown to work well under certain conditions, although little had been known regarding their convergence properties from a theoretical point of view. Recently, some new algorithms along this line of work were proposed in [4], where the convergence issue is better studied. In recent years, more modern optimization-based approaches for phase retrieval have been proposed. For example, Candès proposed a semidefinite relaxation approach known as the PhaseLift algorithm [5] and proved that exact recovery is possible with high probability in the noiseless case. Hand recently studied the robustness of PhaseLift and showed that it can tolerate a constant fraction of arbitrary errors [6]. Wirtinger-Flow (WF) [7] is a more recent approach that combines a good statistical initialization with a computationally light gradient-type refinement algorithm. The combination works very well when A is i.i.d. Gaussian. Following [7], conceptually similar approaches, namely, the truncated WF (TWF) [8] and truncated amplitude flow (TAF) algorithms [9], [10] were proposed to handle more challenging scenarios. In the recent work in [11], [12], the authors proposed a leastsquares feasible point pursuit (LS-FPP) approach that aims to solve the same optimization problem as LS PhaseLift in the presence of noise. Simulations in [11] indicate that LS-FPP approaches the Cramér-Rao bound (CRB) for the Gaussian measurement model considered in [11]. Some phase retrieval algorithms were originally developed under an exact measurement model, and subsequently treated the noisy case by replacing equality constraints with relaxed inequality constraints [5]-[13]. Most of the existing algorithms were explicitly or implicitly developed under a Gaussian noise model. In certain applications, a subset of the measurements may be corrupted much more significantly than the others, and heavy-tailed noise may be encountered as well [14]-[16]. One representative example is high energy coherent X-ray imaging using a charge-coupled device (CCD), where the impulsive noise originates from X-ray radiation effects on the CCD, and the density of impulses increases with the intensity of X-ray radiation or CCD exposure time [16]-[17]. Under such circumstance, modeling the noise as Gaussian is no longer appropriate. In recent years, robust phase retrieval algorithms, e.g., [14], [15], [18], have been proposed to handle outliers. The framework in [15] considered an undersampled phase retrieval model corrupted with Laplacian-distributed outliers, but the approach was designed specifically for sparse x. Variations of TWF to handle outliers were also considered. For example, the work in [18] replaces the sample mean that is used in TWF 2 by sample median in the initialization and truncated update, which exhibits robustness to outliers under certain conditions [18]. However, as TWF, this approach still heavily relies on the assumption that Gaussian measurements are employed. Another important aspect of phase retrieval is how noise enters the measurement model. Our previous work [11] considered the noise model y = |Ax|2 + n. Another noise model that is frequently considered in the literature [2]-[4] is y = |Ax| + n. (1) Notice the subtle but important difference between the two models: whether noise is added to the magnitude or the squared magnitude. The choice hinges on the experimental setup, including the measurement apparatus; but (1) is more widely adopted by experimentalists. Contributions: We consider the phase retrieval problem under the model in (1) in the presence of impulsive noise, and focus on designing robust algorithms to handle it. To fend against impulsive noise, we adopt the `p -fitting (0 < p < 2) based estimator that is known to be effective in dealing with outliers, and devise two optimization algorithms using twoblock inexact alternating optimization. Specifically, the two algorithms both solve local majorization-based approximate subproblems for one block, instead of exactly solving the conditional block minimization problem to optimality. Interestingly, starting from different majorizations, the resulting solutions turn out equivalent to iteratively reweighted least squares and gradient descent, respectively. Unlike the existing inexact and exact alternating optimization frameworks that mostly operate with convex constraints, the proposed algorithms work with a unit-modulus nonconvex constraint, so convergence analysis seems difficult. Nevertheless, we prove convergence of the proposed algorithms to a Karush-Kuhn-Tucker (KKT) point by exploiting the two-block structure of the problem. We also derive computationally light implementations using Nesterov-type and stochastic gradient updates. In order to assist in performance analysis and experimental design, we derive the CRB for the model in (1) and under different parameterizations, in the presence of Laplacian and Gaussian noise. Curiously, although related CRBs for different noisy measurement models have been previously derived in [11], [19]-[22], to the best of our knowledge, there is no available CRB for the model in (1) – and our work fills this gap. The proposed algorithms are validated by extensive simulations. The simulations show that our approaches outperform the state-of-the-art algorithms in the presence of impulsive noise. A preliminary conference version of part of this work has been submitted to EUSIPCO 2016 [1]. The conference version includes one of the two basic algorithms, the Laplacian CRB, and limited simulations. The second algorithm, Nesterov acceleration and stochastic gradient-type updates, additional CRB results, and, most importantly, proof of convergence of the iterative algorithms are all provided only in this journal version, which naturally also includes more comprehensive simulation results. Notation: Throughout the paper, we use boldface lowercase letters for vectors and boldface uppercase letters for matrices. Superscripts (·)T , (·)∗ , (·)H , (·)−1 and (·)† represent transpose, complex conjugate, conjugate transpose, matrix inverse and pseudo-inverse, respectively. The Re{·} and Im{·} denote the real part and imaginary part. E[·] is the expectation operator, | · | is the absolute value operator, || · ||F is the Frobenius norm, || · ||p is the vector `p -norm, whose definition PN is ||x||p = ( i=1 |xi |p )1/p , is the element-wise product, and diag(·) is a diagonal matrix with its argument on the diagonal. δij denotes the Kronecker delta function, and ∠(·) takes the phase of its argument. 0m , 1m , and Im stand for the m × 1 all-zero vector, m × 1 all-one vector, and m × m identity matrix, respectively. Furthermore, trace(·) and ∂a/∂x denote the trace and partial derivative operators, respectively. II. P ROPOSED A LGORITHMS A. AltIRLS Let us first consider the noiseless case where y = |Ax|. Effectively, it can also be written as y u = Ax (2) where u = ej∠(Ax) is an auxiliary vector of unknown unitmodulus variables with its mth component being um = H ej∠(am x) . In the presence of impulsive noise, `p -(quasi)-norm has be recognized as an effective tool for promoting sparsity and fending against outliers [23]-[25]. Therefore, we propose to employ an `p -fitting based estimator instead of using the `2 -norm, which has the form of min |u|=1,x M X 2 |ym um − aH m x| +  p/2 (3) m=1 where 0 < p < 2 is chosen to down-weigh noise impulses (i.e., outliers), and  > 0 is a small regularization parameter (e.g.,  ∈ [10−8 , 10−6 ]) that keeps the cost function within its differentiable domain, which will prove handy in devising an effective algorithm later. To handle Problem (3), we follow the rationale of alternating optimization, i.e., we first update x fixing u, and then we do the same for u. Assume that after some iterations, the current solution at iteration r is (x(r) , u(r) ). At step (r + 1), the subproblem with respect to (w.r.t.) x is x(r+1) = arg min x M  p/2 X H 2 |ym u(r) m − am x| +  (4) m=1 which is still difficult to handle. Particularly, when p < 1, the subproblem itself is still non-convex; when p ≥ 1, the subproblem is convex but has no closed-form solution. Under such circumstances, we propose to employ the following lemma [26]: Lemma 2.1: Assume 0 < p < 2,  > 0, and φp (w) := p   p−2 2−p 2 + w. Then, we have 2 pw x2 +  p/2 = min wx2 + φp (w) w≥0 and the unique minimizer is  p−2 p 2 wopt = x + 2 . 2 (5) (6) 3 By PM Lemma 2.1, an upper bound of  p/2 (r) H 2 that is tight at the current m=1 |ym um − am x| +  solution x(r) can be easily found: M  X |ym u(r) m − 2 aH m x| + Algorithm 1 AltIRLS for phase retrieval 1: 2: (0) W  p/2 p 2 m=1 M  X H (r) ≤ ym u(r) wm m − am x 2  (r) + φp wm  (7) m=1 3: 4: 5: where (r) wm p := 2  ym u(r) m − (r) aH mx 6:  p−2 2 2 + (8) 7: (r) and the equality holds if and only if x = x . Instead of directly dealing with Problem (4), we solve a surrogate problem using the right hand side (RHS) of (7) at each iteration to update x. Notice that the RHS of (7) is convex w.r.t. x and the corresponding problem can be solved in closed-form: †  x(r+1) = W(r) A W(r) y u(r) (9) where W(r) = diag q (r) w1 ···  q (r) wM . (10) The conditional problem w.r.t. u is u(r+1) = arg min |u|=1 M  X (r+1) 2 |ym um − aH | + mx p/2 . m=1 (11) Although the problem is non-convex, it can be easily solved to optimality. Specifically, the first observation is that the partial minimization w.r.t. u is insensitive to the value of p; i.e., given a fixed x, for any p > 0, the solutions w.r.t. u are identical. Second, for all p > 0, the solution is simply to align the angle (r+1) of ym um to that of aH , which is exactly mx H (r+1) u(r+1) = ej∠(am x m function A LT IRLS (y, A, x(0) ) (0) Initialize u(0)q= exp(∠(Ax )) and W(0)  q ), m = 1, . . . , M. (12) We update x and u alternately, until some convergence criterion is met. We see that the way that we construct the upper bound of the partial problem w.r.t. x is in fact the same as the procedure in iteratively reweighted least squares (IRLS) [25], [26]. The difference is that we ‘embed’ this IRLS step into an alternating optimization algorithm. We therefore call this algorithm alternating IRLS (AltIRLS), which is summarized in Algorithm 1. A relevant question regarding Algorithm 1 is whether or not this algorithm converges to a meaningful point, e.g., a stationary or KKT point. Note that the block variable u is constrained to a non-convex set, and we do not compute the optimal solution for the block variable x at each iteration of Algorithm 1. For such a type of algorithm, there is no existing theoretical framework that establishes convergence. We therefore need careful custom convergence analysis. We have the following result: Proposition 2.1: Assume that 0 < p < 2 and  > 0, and that A has full column rank. Then, the solution sequence produced 8: 9: 10: = diag (0) (0) w1 (0) ym um − aH mx ···  p−2 2 2 + (0) wM = (0) wm with = while stopping criterion has not been reached do x(r) = (W(r−1) A)† W(r−1) (y u(r−1) ). u(r) = exp(j∠(Ax(r) ))   p−2 2 2 (r) (r) (r) wm = p2 ym um − aH , ∀m x +  m q  q (r) (r) W(r) = diag w1 · · · wM r =r+1 end while end function by Algorithm 1 converges to a set K that consists of all the KKT points of Problem (3). Proof: See Appendix A. The result in Proposition 2.1 is interesting: Although the algorithm that we propose to compute the `p fitting-based estimator solves non-convex subproblems, it ensures convergence to a KKT point. Such a nice property is proven by exploiting the two-block structure of the algorithm. Note that the proof itself does not rely on the specific form of the optimization problem in (3), and thus can be easily extended to other two-block alternating optimization cases, which we believe is of much broader interest. B. AltGD Algorithm 1 uses a simple update strategy, but its complexity may still become an issue when the problem size grows. Specifically, the bottleneck of the AltIRLS algorithm lies in solving the subproblem w.r.t. x, i.e., min x W(r) (y u) − W(r) Ax 2 (13) 2 whose closed-form solution can be computed via (9). It is observed from (9) that the matrix inversion part requires O(N 3 ) flops to compute and also O(N 2 ) memory to store, both of which are not efficient for high-dimensional x – e.g., when x is a vectorized image, N is usually very large (more specifically, for a 100 × 100 image, N is 10,000). To circumvent this difficulty, one way is to employ a certain fast least squares solver such as conjugate gradient [28] to handle Problem (13). This is a viable option, but such solvers still typically require many iterations to obtain a fairly accurate solution of (13). Here, we propose to deal with problem (13) using a simpler approach. Specifically, let us denote f (r) (x) = W(r) (y u(r) ) − W(r) Ax 2 2 (14) and approximate (13) using the following function g (r) (x) = f (r) (x(r) ) + Re{(∇f (r) (x(r) ))H (x − x(r) )} 4 µ(r) x − x(r) 2 2 . 2 3 where µ(r) ≥ 0 is a pre-specified parameter. Instead of optimizing f (r) (x), we optimize g(r) (x). By rearranging terms, the subproblem becomes   2 1 (16) x(r+1) = arg min x − x(r) − (r) ∇f (x(r) ) x µ 2 and the solution is x(r+1) = x(r) − 1 ∇f (x(r) ) µ(r) (17) if µ(r) ≥ λmax (AH (W(r) )2 A), and the equality holds if and only if x = x(r) . Therefore, the algorithmic structure of Algorithm 2 is the same as that of Algorithm 1, except that the majorizing functions of the x-block are different – which means that the proof of convergence of Algorithm 1 also applies here: Corollary 2.1: If µ(r) ≥ λmax (AT (W(r) )2 A) for all r, then the whole sequence produced by Algorithm 1 converges to K. Algorithm 2 AltGD for phase retrieval 5: 6: 7: 8: 9: 2 10 1 which does not require any matrix inversion operation. Also, the N × N matrix does not 2 need to be stored, if2 we take the order Ax(r) → W(r) Ax(r) → AH W(r) Ax(r) to compute the update of x. Therefore, using this approach, both memory and complexity requirements are less demanding. We summarize the algorithm in Algorithm 2. We call this algorithm alternating gradient descent (AltGD). Note that when µ is chosen as the Lipschitz constant, (15) is an upper bound of the cost function in (13). In other words, we have f (r) (x) ≤ g (r) (x) 2: 3: 4: AltGD Accelerated AltGD 10 i.e., a gradient step with step-size 1/µ(r) , where the gradient is 2  ∇f (r) (x(r) ) = AH W(r) Ax(r) − y u(r) (18) 1: 10 (15) || y−|Ax| ||pp + function A LT GD(y, A, x(0) ) Initialize u(0) = exp(∠(Ax(0) )) while stopping criterion has not been reached do Choose µ(r−1) as the leading eigenvalue of H A (W(r−1) )2 A or the trace of (W(r−1) )2 x(r) = x(r−1) − 1/µ(r−1) ∇f (x(r−1) ) u(r) = exp(j∠(Ax(r) )) r =r+1 end while end function Remark 2.1: Exactly computing λmax (AH (W(r) )2 A) may be time consuming in practice. Many practically easier ways can be employed, e.g., the Armijo rule-based line search [27]. In our simulations, we use a simple heuristic: we let µ(r) = trace((W(r) )2 ) instead of λmax (AH (W(r) )2 A). The rationale behind is that we observe that the energy of AH (W(r) )2 A is usually dominated by W(r) , 0 10 0 20 40 60 80 100 120 Number of iterations 140 160 180 200 Fig. 1. Cost function value versus number of iterations. and using µ(r) = trace((W(r) )2 ) is a good approximation of trace(AH (W(r) )2 A) that is an upper bound of λmax (AH (W(r) )2 A). We should mention that this step-size choice is a heuristic, but works well in practice, as will be shown in the simulations. C. Further Reducing Complexity 1) Extrapolation: Algorithm 2 is easier to compute than Algorithm 1 in terms of per-iteration complexity. However, first-order methods tend to require more iterations in total. One way to alleviate this effect is to incorporate Nesterov’s “optimal first-order” method [29]-[31], i.e., for each update, we set  t(r−1) − 1  (r) (r−1) z(r) = x(r) + x − x (19) t(r) p 1 + 1 + 4(t(r−1) )2 (20) t(r) = 2 1 x(r+1) = z(r) − (r) ∇f (r) (z(r) ) (21) µ In practice, the above ‘extrapolation’ technique greatly expedites the whole process in various applications [23], [32]. Some numerical evidence can be seen in Fig. 1, where a simple comparison between the plain Algorithm 2 and the extrapolated version is presented. We choose SNR= 20 dB, N = 16 and M = 128. Each element in the signal and measurement vectors is independently drawn from the complex circularly symmetric Gaussian distribution with mean zero and variance one. The noise is generated from a symmetric α stable (SαS distribution) which will be described in detail in Section IV. Fig. 1 shows the convergence of AltGD and accelerated AltGD using extrapolation when p = 1.3. As we can see, the accelerated AltGD converges after 40 iterations which is much faster than AltGD that converges after 200 iterations. 2) Block Incremental / Stochastic Gradient: When N is very large (thus M > N is larger), even gradient computation is too much of a burden. In such cases, a pragmatic way is to “break down” the problem to pieces and do (block) 5 incremental or stochastic gradient. We divide the measurement matrix into L blocks Γl . Then it is straightforward to get the gradient for the lth block as (r) 2 (r)  ∇fΓl (x(r) ) = AH AΓl x(r) − yΓl uΓl . (22) Γl WΓl The estimate of x is updated according to x(r+1) = x(r) − 1 (r) µΓl ∇fΓl (x(r) ) (23) Proof: See Appendix B. The CRB for real x is a special case of the complex case, which can be easily derived from Proposition 3.1: Proposition 3.2: In Laplacian noise, the CRB of real-valued x is   CRBL,r = trace F−1 (27) L,r where FL,r = (r) where µΓl is chosen as the leading eigenvalue of AH Γl AΓl or (r) 2  trace WΓl . The algorithm can proceed block by block with revisits, or by randomly picking blocks, resulting in block incremental gradient and stochastic gradient versions, respectively. A subtle point here is that, to maintain robustness, one should choose a block size larger than one. The reason is that the robustness of the algorithm is brought by treating different ym with different weights (more specifically, by downweighting the outliers). When using only one ym for updating, this ability vanishes. III. C RAM ÉR -R AO B OUND A NALYSIS In this section, the CRB on the accuracy of retrieving x in (1) is presented. The CRB provides a lower bound on the MSE of unbiased estimators. In many signal processing applications, one cannot guarantee that an estimator is unbiased, or even that an unbiased estimator exists, yet the CRB is still surprisingly predictive of estimator performance [35], [38]. For phase retrieval under Gaussian noise, over the past few years, several CRBs have been derived for different models, e.g., 2-D Fourier-based measurements [19], noise added prior to taking the magnitude [20] and noise added after taking the magnitude square [11], [21]. To the best of our knowledge, there is no available CRB formula for the signal model in (1). Here, we present the CRBs for two particular types of noise: Laplacian and Gaussian noise. Although our main interest here lies in evaluating performance of robust algorithms and the Laplacian CRB serves this purpose, the Gaussian CRB is of interest in other application contexts. Note that we use subscripts r, c, L and G to stand for real, complex, Laplacian and Gaussian, respectively. To get started, we should note that our derivations are based on the assumption that aH m x is nonzero. That is because the term |Ax| is non-differentiable at aH m x = 0, the Fisher information only exists at aH x = 6 0. With this caveat, we m have the following proposition: Proposition 3.1: In Laplacian noise, the CRB is   CRBL,c = trace F†L,c (24) GL,r = Re{AH diag(Ax)}. (25) CRBG = 2CRBL . GL,c   Re{AH diag(Ax)} = . Im{AH diag(Ax)} (26) (30) Proof: The proof is straightforward by calculating the Gaussian FIM and comparing it with the Laplacian FIM in (28). We omit it here. In certain applications of phase retrieval, we may be more interested in the performance bound for retrieving the phase of x. The following proposition provides the CRB on both the phase and amplitude of x under Laplacian noise. Note that in the Gaussian noise case, it is straightforward to apply Proposition 3.3 to compute the lower bound. Similar results can also be found in [36]. Proposition 3.4: In Laplacian noise, the CRB of the amplitude of x is CRBL,|x| = N X di (31) i=1 and the variance of any biased estimate of the phase of x is bounded below by CRBL,∠(x) = 2N X di (32) i=N +1 where d = [d1 · · · d2N ] contains the main diagonal elements of F†L which in this case is defined as 2 GL diag(|Ax|−2 ) GTL σn2 (33) with GL = with (29) In Appendix C, we show that when A has full column rank, FL,c is singular with rank (2N −1) while FL,r is always nonsingular. Thus, for complex x, we adopt its pseudo-inverse to compute an optimistic (looser) CRB, which is still a valid lower bound that can be used to benchmark the efficiency of any biased estimator [33]-[35]. If x is close to zero, then the CRB is not tight at low SNRs, and more measurements should be used to approach the CRB. Proposition 3.3: In the Gaussian noise case, the CRB is two times larger than the CRB in Proposition 3.1, i.e., FL = 2 GL,c diag(|Ax|−2 ) GTL,c σn2 (28) with where FL,c = 2 GL,r diag(|Ax|−2 ) GTL,r σn2  diag(|x|)−1  IN   Re diag (x∗ ) AH diag(Ax) . Im{diag(x∗ )AH diag(Ax)} (34) Proof: See [11] and Appendix B. 6 In this section, we evaluate the performance of the proposed methods and compare them with some existing algorithms, namely, WF [7], TWF [8], TAF [9], AltMinPhase [4], MTWF [18] and GS [2] in terms of MSE performance, where the MSE is computed after removing the global phase ambiguity between the true and estimated x. In the simulations, we consider an exponential signal x = exp(j0.16πt) comprising 16 samples, i.e., t = 1, · · · , 16. We test the algorithms using different types of A, i.e., random matrix that is usually employed in [4], [7]-[9], [18], and the 2D Fourier matrix that is widely used in real devices [2], [3] (cf. subsection IV-E). For the random measuring matrix case (used in subsections A-D), the measurement vectors are generated from a masked Fourier transformation, which takes the form of  T A = (DΛ1 )T · · · (DΛK )T where K = M/N is the number of masks, D is a N × N discrete Fourier transform (DFT) matrix with DDH = N IN and Λk is a N × N diagonal masking matrix with its diagonal entries generated by b1 b2 , where b1 and b2 are independent and distributed as [5]  1 w. prob. 0.25   (√   −1 w. prob. 0.25 2/2 w. prob. 0.8 √ b1 = and b2 =  −j w. prob. 0.25 3 w. prob. 0.2.    j w. prob. 0.25 All results are obtained using a computer with 3.1 GHz Intel Xeon E31225 and 16 GB RAM. For the random measurement case, the algorithms are all initialized from the same starting point is computed by picking the principal eigenvector of PM that 2 H y a i=1 i i ai , and the stopping criterion is 2 2 − y − |Ax(r−1) | y − |Ax(r−1) | 2 2 2 2 AltIRLS AltGD 100 10-5 10-10 IV. S IMULATION R ESULTS y − |Ax(r) | 105 MSE Remark 3.1: In deriving the CRB in Proposition 3.4, we use no additional assumptions on x. Therefore, Proposition 3.4 works for both real and complex x. Specifically, in the real case, the phase is actually the sign of x. Here, FL is also singular with rank deficit equal to one, so we adopt its pseudo-inverse to compute the CRB. We omit the proof of rank-1 deficiency of FL , since it follows the line of argument in Appendix C. ≤ 10−7 or the number of iterations reaching 1000. Furthermore, we use AltGD with extrapolation for the simulations. A. Selection of p Before we do the performance comparison, let us study how p affects the performance of the proposed methods. In this example, SNR is fixed at 20 dB, where the SNR is computed via   ||Ax||2 SNR = 10 log10 . ||n||2 We assume that 10% of the data are corrupted by outliers that are generated from the Gaussian distribution with mean zero 10-15 10-20 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 p Fig. 2. MSE versus p. and variance 100, and the remaining elements in n are zero. K = 8 masks are employed to generate the measurements. Fig. 2 shows the MSE as a function of p. Note that, when p is smaller than 1, in order to achieve convergence in a non-convex setting, we initialize our methods in a two-step way. Specifically, for each of the proposed methods, when 0.6 < p < 1, we use the spectrum output to initialize our methods with p = 1.3 and 100 iterations, and then choose the corresponding output to do another 100 iterations with p = 1 and use the output as a final starting point. When p ≤ 0.6, we take an additional intermediate step with p = 0.7 and 100 iterations to gradually stage the initialization process for our approaches, since in this p-regime the subproblem is strictly non-convex. It is observed that generally, p ≤ 1 provides better performance than p > 1, especially for AltIRLS. When p < 0.5, AltGD suffers severe performance degradation while AltIRLS still performs well. Our understanding is that firstorder algorithms are in general more sensitive to problem conditioning, and a small p can lead to badly-conditioned W(r) . Working with p < 1 usually requires much more careful initialization. In our experience, p ≈ 1.3 strikes a good compromise between numerical stability and estimation accuracy. To illustrate the performance provided by our proposed methods with p < 1 over the state-of-art algorithms including TWF, WF, TAF, AltMinPhase, MTWF, and GS, we present the following example, where the parameters are the same as for Fig. 2, except that 20% of the data are corrupted by outliers. Note that among these competitors, TAF, AltMinPhase and GS share the same magnitude measurement model in (1) as ours, but WF is designed under the energy measurement model (i.e., 2 ym = |aH m x| + nm ). In addition, TWF and MTWF adopt a 2 2 Poisson model with λ = |aH i x| . Hence, y is fed to WF, TWF and MTWF, where the squaring is element-wise. We set p = 0.4 for the proposed methods, and perform Monte-Carlo trials to estimate MSE = 10 log10 (||x̂ − x||22 ). We show the results of 1,000 random trials in Fig. 3. One can see that for most trials the benchmark algorithms fail to give reasonable 7 AltIRLS AltGD 100 600 400 50 200 0 -200 -150 -100 -50 0 0 -200 -150 MSE (dB) WF 150 150 100 100 50 50 0 -200 -150 -100 -50 -100 -50 0 MSE (dB) TWF 0 0 -200 MSE (dB) GS -150 -100 -50 0 MSE (dB) AltMinPhase 150 400 100 200 that admit closed-form PDF expression, that is, α = 1 and α = 2 which respectively yield the Cauchy and Gaussian distributions. For α < 2, φ(t; α, β, γ, µ) possesses heavy tails, and thus is considered suitable for simulating impulsive noise. The parameter α controls the density of impulses - smaller α’s correspond to more outliers. In the following, we set α = 0.8, and the other parameters are β = 0, γ = 2 and µ = 0, resulting in a symmetric α-stable (SαS) distribution with zero-shift. 3) GMM: In our simulations, we also use a two-component GMM to generate impulsive noise, whose PDF is as follows:   2 X |n|2 c p i exp − (35) p(n) = 2σi2 2πσi2 i=1 where σi2 is the variance of the ith term, and 0 ≤ ci ≤ 1 is the probability of occurrence of the ith component. Note that we have c1 +c2 = 1, and we set c2 < c1 and σ22 > σ12 – therefore, the second component corresponds to outliers. In this example, we choose c1 = 0.9, c2 = 0.1, σ12 = 0.1 and σ22 = 100, which corresponds to a situation where strong outliers are present. 50 0 -200 -150 -100 -50 0 0 -200 -150 MSE (dB) MTWF -100 -50 0 MSE (dB) TAF 150 1000 100 500 0 -200 50 -150 -100 -50 0 0 -200 MSE (dB) -150 -100 -50 0 MSE (dB) Fig. 3. Signal recovery performance comparison. results. However, our methods produce much lower MSEs, which indicates that our proposed methods are efficient in suppressing outliers. B. Statistical Performance Comparison We now compare the MSE performance as a function of SNR. The results are averaged over 500 Monte-Carlo trials. To simulate outliers, we use the Laplacian distribution, the α-stable distribution, and a Gaussian mixture model (GMM) to generate heavy-tailed noise n, respectively. Specifically, the outlier generating process is summarized below: 1) Laplacian: The probability density function (PDF) of the Laplacian distribution is given in (52). 2) α-stable: The PDF of an α-stable distribution is generally not available, but its characteristic function can be written in closed-form as φ(t; α, β, c, µ) = exp (jtµ − γ α |t|α (1 − jβsgn(t)Φ(α))) where Φ(α) = tan (απ/2), 0 < α ≤ 2 is the stability parameter, −1 ≤ β ≤ 1 is a measure of asymmetry, γ > 0 is a scale factor which measures the width of the distribution and µ is a shift parameter. There are two special cases Figs. 5, 6 and 7 show the MSEs of x̂ under Laplacian, SαS and GMM noise, respectively. In the simulations, the number of measurements is set to be M = 8N . Note that for SαS and GMM noise, we set p = 1.3 for AltIRLS and AltGD, while for Laplacian noise we let p = 1 which corresponds to the maximum likelihood estimator. In the Laplacian noise case, we include the CRB derived in Proposition 3.2 as a performance benchmark. It is observed from Fig. 5 that our approaches outperform the GS algorithm and yield the MSEs which are closest to the CRB. The performance gap between the proposed methods and their competitors becomes larger in the SαS and GMM noise cases since the outliers become stronger; see Fig. 6 and 7. This indicates that the proposed algorithms work better in more critical situations, i.e., when more severe outliers exist. Note that the MTWF performs slightly better than TWF in GMM noise and its performance is inferior to our methods in the three noise scenarios. As a reference, we also plot the MSE performance versus SNR in Gaussian noise in Fig. 8, where we set p = 2 for having a maximum likelihood estimator. We compare the performance of the algorithms with the CRB in Proposition 3.4. One can see that the algorithms perform similarly when the noise follows an i.i.d. Gaussian distribution. This suggests that the Gaussian noise case may be an easier case - where all the algorithms under test perform reasonably. Fig. 4 compares the CPU time as a function of N , where SNR is 10 dB, N increases from 8 to 128 and the other parameters are the same as Fig. 7. It is seen that AltGD is the fastest1 . C. Success Rate Performance Comparison Fig. 9 shows the success rate versus the proportion of outliers in the measurements, where the GMM is employed 1 Note that in the simulation we use the heuristic step size as stated in Remark 2.1; if the step size µ = λmax (AH (W(r) )2 A) is used, AltGD may consume more time. 8 103 102 101 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase GS CRB:Laplacian 10-1 MSE CPU time (s) 100 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase GS 100 10-2 10-1 10-2 0 50 100 150 200 250 10-3 300 N 5 10 15 20 SNR (dB) Fig. 4. CPU time versus number of variables N in GMM noise. Fig. 5. MSE versus SNR in Laplacian noise. to control the outlier fraction. We vary c2 from 0 to 0.5 and fix σ12 = 0 and σ22 = 100. SNR is 10 dB. For the proposed methods, we choose p = 0.4 for comparison. We declare success when the squared Euclidean distance of the estimate x̂ from the ground-truth x is smaller than or equal to 10−4 ; i.e., the success rate is computed as 101 100 10-1 (36) MSE 500 1 X success rate = γi 500 i=1 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase GS 10-2 where ( γi = 1, 0, if kx̂i − xk22 ≤ 10−4 otherwise. 10-3 (37) Fig. 9 shows that our methods outperform the benchmark methods by a large margin in terms of success rate. When the outlier fraction is greater than 0.25, our methods can still estimate x quite accurately, while the other six competitors all fail. Note that the performance of AltIRLS is better than AltGD – but the complexity of AltGD is much lower. Fig. 10 plots the success rate versus sample complexity (measured in terms of M/N with N = 16), where SNR is 10 dB and 20% of the data are corrupted by outliers. It is obvious that our two algorithms have the highest success rates when M/N ≥ 5, while the other algorithms have very low success rates even when M/N ≥ 8. 10-4 5 10 15 Fig. 6. MSE versus SNR in SαS noise. 101 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase GS 100 In this subsection, we showcase the performance using real caffeine molecule data that is often used to test phase retrieval algorithms [7]. The caffeine molecule data with size 128 × 128 is the projection of electron density of a 3-D Caffeine molecule’s density map onto the xy-plane. The objective is to reconstruct the data from the magnitude of its masked Fourier transform. Here, we use the same measuring process as in the previous simulations and K = 8 masks are used to generate measurements. We compare the performance of AltGD, TAF, MSE 10-1 D. Performance Comparison on Caffeine Molecule Image Data 20 SNR (dB) 10-2 10-3 10-4 5 10 15 SNR (dB) Fig. 7. MSE versus SNR in GMM noise. 20 9 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase GS CRB:Gaussian 100 MSE MTWF, and TWF. We also include the block incremental (BI) implementation of AltGD (cf. Section II.C2), which is referred to as BI-AltGD. The outliers are generated from GMM with c2 = 0.3, σ12 = 0 and σ22 = 100, which indicates that there are 30% of the data are corrupted by outliers. SNR is 0 dB and the data is normalized with unit norm. Fig. 11 plots the retrieved molecule’s density map using AltGD, BI-AltGD with p = 1.3, TAF, MTWF and TWF. It is seen in Fig. 11 that our schemes still work well, while the other competitors yield blurred images. 10-1 E. Performance Comparison with 2D Fourier Measurements 10-2 5 10 15 20 SNR (dB) Fig. 8. MSE versus SNR in Gaussian noise. 1 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase 0.9 0.8 Success rate 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Outliers fraction Fig. 9. Success rate of exact recovery versus outlier fraction in GMM noise. 1 AltIRLS AltGD MTWF TAF TWF WF AltMinPhase 0.9 0.8 Success rate 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 2 3 4 5 6 7 8 9 10 M/N Fig. 10. Success rate of exact recovery versus M/N under GMM noise. In the above simulations, the measurement vectors are generated from coded diffraction pattern (CDP) with random masks. The success of the existing algorithms such as the well-known PhaseLift, WF and its variants are all based on the randomness of measurements. However, to the best of our knowledge, the CDP model is still considered to be impractical, as there has been no device supporting the masking technique yet. In practice, most devices record the intensity of the Fourier transform of the object, where the intensity is usually proportional to the magnitude of the oversampled 2D Fourier measurements with 2× oversampling. In this case, the measurement matrix A is a Kronecker product of two oversampled Fourier matrices. With 2D Fourier measurements, the most successful method is Fienup’s hybrid-input-output (HIO) algorithm [3], which has been observed to give empirically reliable phase retrieval performance, especially in the noiseless case. In the noisy case, HIO can also provide good initialization for other algorithms, e.g., GS. Therefore, HIO and HIO-initialized GS are employed as baselines in this subsection. In this simulation, we compare the performance of AltGD, HIO and GS under 2D Fourier measurements in the presence of outliers, where GMM-type outliers are generated with c2 = 0.1, σ12 = 0 and σ22 = 100. Each entry of the signal matrix X ∈ R16×16 is generated from the normal distribution. After zero-padding around X, we have X̃ ∈ R32×32 . Then the measurements are obtained by first calculating 2D fast Fourier transformation (FFT) on X̃ and then taking the magnitude of 2D FFT(X̃), where the sizes of left and right Fourier matrices are both 32 × 32. Note that SNR is 10 dB and is computed as 10 log10 (kX̃k2F /kNk2F ) where N ∈ R32×32 is the noise matrix. For AltGD and GS, HIO with 5000 iterations is employed to provide an initial estimate of X, and then an additional 5000 iterations are used in AltGD and GS, respectively. Moreover, HIO with 10000 iterations is included as a baseline. For AltGD, we choose p = 1.3. The MSEs obtained from 1000 Monte-Carlo tests are plotted in Fig. 12. It is seen that HIO does not perform very well, and is inferior to AltGD and GS. AltGD has better performance than GS, since most of its MSEs are concentrated around −35 dB, while those obtained by GS are located around −20 dB. Finally, Fig. 13 shows the recovered image of 128 × 128 Cameraman from 2D Fourier measurements under GMM noise, where SNR is 12 dB and the noise is generated in the same way as for Fig. 12. The number of iterations used for 10 20 20 20 40 40 40 60 60 60 80 80 80 100 100 100 120 120 20 40 60 80 100 120 120 20 40 (a) Original 60 80 100 120 20 (b) BI-AltGD 20 20 40 40 40 60 60 60 80 80 80 100 100 100 120 120 40 60 80 100 60 80 100 120 80 100 120 (c) AltGD 20 20 40 120 120 20 40 (d) TAF 60 80 100 120 (e) TWF 20 40 60 (f) MTWF Fig. 11. Retrieving molecule image in SαS noise. 50 0 -40 AltGD -30 -20 -10 0 10 20 30 MSE (dB) 50 0 -40 GS -30 -20 -10 0 10 20 30 MSE (dB) 40 HIO 20 0 -40 -30 -20 -10 0 10 20 (a) Original (b) AltGD (c) GS (d) HIO 30 MSE (dB) Fig. 12. Signal recovery performance comparison with 2D Fourier measurements in GMM noise. initialization and refinement are all 5000. For AltGD, we set p = 0.6. It is seen that the image recovered from AltGD is much more clear than those recovered by HIO and GS. V. C ONCLUSION In this paper, we considered phase retrieval in the presence of grossly corrupted data – i.e., outliers. We formulated this problem as an `p fitting problem, where 0 < `p < 2, and provided an algorithmic framework that is based on two-block Fig. 13. Retrieving Cameraman image in GMM noise with 2D Fourier measurements. 11 inexact alternating optimization. Two algorithms, namely, AltIRLS and AltGD, were proposed under this framework. Although the algorithms cannot be analyzed using standard convergence results for alternating optimization due to a nonconvex constraint, we managed to show that the algorithms converge to a KKT point. The tools used for convergence analysis can also be used for analyzing convergence of other types of algorithms that involve non-convex constraints and inexact alternating optimization. Pertinent CRBs were derived for the noisy measurement models considered. Simulations showed that the proposed algorithms are promising in dealing with outliers in the context of phase retrieval using both random measurements and 2D Fourier measurements, for simulated and real image data. ≥ g(x̃(r+1) , {ũ(r) m }) ≥ ≥ (rj ) j) g(x̃, {ũm }) ≥ g(x̃(rj +1) , {ũ(r m }) ≥ ≥ ≥ Let us denote = f (x, u) = 2 |ym um − aH m x| +  p/2 m=1 Therefore, our problem can be written as min f (x̃, {ũm }) = kym ũm − p/2 + s.t. kũm k22 = 1, ∀m. (r) 2 (r) wm kym ũ(r) m − Ãm x̃k2 + φ(wm ) . (39) g(x̃, {ũ(r) m }) = arg min x̃ ũ(r+1) = arg m f (x̃(r+1) , {ũm }) min kũm k22 =1, ∀m (40) (41) Let us assume the boundedness of x̃(r) and ũ(r) and which will be shown later. Under this assumption, the (r) gradients of g(x̃, {ũm }) and f (x̃, {ũm }) exist. According to Lemma 2.1, it is easily seen that (r) f (x̃, {ũ(r) m }) ≤ g(x̃, {ũm }) ∀x̃, f (x̃ , {ũ(r) m }) (r) ∇x̃ f (x̃ , {ũ(r) m }) = = (r) g(x̃ , {ũ(r) m }) (r) ∇x̃ g(x̃ , {ũ(r) m }). (42a) (42b) (42c) Now, we have f (x̃ (44e) (47) (48) f (x̃? , {um }) ≥ f (x̃? , {u?m }). (49) ũ?m = 0, ∀m = g(x̃ (r) , {ũ(r) m }) (43a) (50) where λm ∈ R2 are dual variables. Combining (47) and (50), it follows that every limit point of the solution sequence is a KKT point. Now, we rigorously show the boundedness of x̃(r) and ũ(r) and W(r) . Let us first show that W(r) is bounded given finite x̃(r) and ũ(r) . This is relatively easy, since y and A are always bounded and thus W(r) is also bounded when 0 < p < 2 and  > 0 by definition (cf. Eq. (8)). Now, we show that x̃(r) and ũ(r) are bounded. Since the algorithm is essentially majorization minimization, there is no risk for x̃(r) being unbounded, if the initialization is bounded, A has full column rank, and y is bounded. To explain, one can see that ũ(r) − Ãx̃(0) kpp ≥ ky ũ(r) − Ãx̃(r) kpp ≥ |kykpp − kÃx̃(r) kpp | , {ũ(r) m }) (44d) Therefore, ũ?m also satisfies the partial KKT condition ky (r) (44c) (rj ) f (x̃(rj ) , u) ≥ f (x̃(rj ) , {ũm }) ∇ũm f (x̃? , {ũ?m }) + λ?m (r) wm , (r) (44b) and thus Now our algorithm can be re-expressed as x̃ (44a) (45) ∇x̃ f (x̃? , {ũ?m }) = 0.  m=1 (r+1) j) f (x̃ , {ũ(r m }) j +1) f (x̃(rj +1) , {ũ(r }) m (rj+1 ) (rj+1 ) f (x̃ , {ũm }) (rj+1 ) (rj+1 ) g(x̃ , {ũm }), Similarly, by the update rule in (41), we have (38) Note that in the new expression (38), all the variables are realvalued. Accordingly, we may define g(x̃, {ũ(r) m }) = (43d) By (42c), we immediately have m=1 M  X (43c) The inequality in (45) means that x̃? is blockwise minimizer of g(x̃, {ũ?m }). Therefore, it satisfies the partial KKT condition w.r.t. x̃, i.e., (46) ∇x̃ g(x̃? , {ũ?m }) = 0. x̃ = [Re{xT }, Im{xT }]T ,   H Re{aH m }, −Im{am } . Ãm = Im{aH Re{aH m }, m} {ũm },x̃ (rj +1) g(x̃, {ũ?m }) ≥ g(x̃? , u? ). ũm = [Re{um }, Im{um }]T , Ãm x̃k22 (43b) where (44d) is obtained by the fact that rj+1 ≥ rj + 1 since rj indexes a subsequence. Taking j → ∞, and by the boundedness of W(r) and continuity of g(·), we see that . To simplify the analysis, let us define M  X f (x̃ , {ũ(r) m }) (r+1) f (x̃ , {ũ(r+1) }) m where (43a) follows (42b), (43b) is obtained because of (40), (43c) holds since we have the property in (42a), and (43b) is obtained by the fact that the subproblem w.r.t. u is optimally solved, i.e., (41). Assume that {rj } denotes the index set of a convergent sub(r ) sequence, and that {x̃(rj ) , {ũmj }} converges to (x̃? , {ũ?m }) Then, we have A PPENDIX A P ROOF OF P ROPOSITION 2.1 M X (r+1) ≥ kÃx̃(r) kpp − kykpp . (51) 12 The first inequality holds because block upper bound minimization algorithm always decreases the objective [40]. The second inequality is due to the triangle inequality for k · kpp when 0 < p < 1 [39]; for p > 1, one can apply the same argument to k · kp . From the above, one can see that kÃx̃(r) kpp ≤ ∞. Therefore, if A does not have a null space, then x̃(r) has to be bounded. Consequently, W(r) is always bounded from above. The next step is to show that the whole sequence converges to K, the set of all the KKT points. This is relatively straightforward. Let us assume that the whole sequence does not converge to K. This means that there exists a subsequence which does not converge to K. The boundedness of x̃(r) , ũ(r) implies that every subsequence of {x̃(r) , ũ(r) } has a limit point. We have just shown that every limit point is a KKT point, and thus this is a contradiction. Therefore, the whole sequence has to converge to K. A PPENDIX B CRB FOR L APLACIAN N OISE The likelihood function for Laplacian noise is given by [36][37] ) ( √ M Y 2 1 H √ yi − |ai x| (52) exp − p(y; x) = σn 2σn i=1 where the noise variance is is σn2 , and its log-likelihood function √ ln p(y; x) = −M ln( 2σn ) − √ M 2X σn yi − |aH i x| . (53) i=1 The vector of unknown parameters for complex-valued x is β = [Re{x1 } · · · Re{xN }, Im{x1 } · · · Im{xN }]T . (54) It is worth noting that σn2 is actually an unknown parameter which should be considered as a part of β. However, since σn2 is uncorrelated with the real and imaginary parts of xi , their mutual Fisher information is zero. It will not impact the final CRB formula for x. For this reason, we do not include σn2 in β. Thus, the FIM can be partitioned into four parts, i.e.,   FL,rr FL,ri FL,c = (55) FL,ir FL,ii where  [FL,c ]m,n = E ( sgn(a) = (56) The partial derivative of ln p(y; x) with respective to βm is √ M 2 X ∂ yi − |aH ∂ ln p(y; x) i x| =− ∂βm σn i=1 ∂βm √ M H 2 X yi − |aH i x| ∂|ai x| = H σn i=1 yi − |ai x| ∂βm √ M 2X ∂|aH i x| = sgn(yi − |aH (57) i x|) σn i=1 ∂βm 1, a>0 −1, a<0 (58) and   [Re ai aH  i x ]m   , for βm = Re{xm }  H H |a x| ∂|ai x|  i H =  ∂βm [Im ai ai x ]m   , for βm = Im{xm }.  |aH i x| (59) Substituting (57) into (56), we have [FL,c ]m,n = M M H 2 X X ∂|aH i x| ∂|ai x| σn2 i=1 j=1 ∂βm ∂βn   H × E sgn(yi − |aH i x|) · sgn(yj − |aj x|) . (60) Next we compute the value of E[sgn(yi − |aH i x|)sgn(yj − H |aH x|)]. For notational simplicity, let s = sgn(y i i − |ai x|). j It is obvious that when i = j, we have E [si sj ] = 1. (61) For i 6= j, we first write E [si sj ] = Pr(si = sj ) × (+1) + Pr(si 6= sj ) × (−1) = 2Pr(si = sj ) − 1 (62) where Pr standards for the probability. Then the value of Pr(si = sj ) is computed as Pr(si = sj ) = Pr(si = 1|sj = 1)Pr(sj = 1) + Pr(si = −1|sj = −1)Pr(sj = −1) = Pr(si = 1)Pr(sj = 1) + Pr(si = −1)Pr(sj = −1) = 0.5 (63) where Pr(si = 1) = Pr(si = −1) = 0.5 and the second equation follows by independence of si and sj when i 6= j. Substituting (63) into (62) and using (61) yields ( 1, i = j E [si sj ] = (64) 0, i 6= j. Substituting (64) into (60), we obtain [FL,c ]m,n =  ∂ ln p(y; x) ∂ ln p(y; x) . ∂βm ∂βn where M H 2 X ∂|aH i x| ∂|ai x| . σn2 i=1 ∂βm ∂βn (65) Now using (59) and (65), the four sub-FIMs can be easily derived as 2 FL,rr = 2 Re{AH diag(Ax)} · diag(|Ax|−2 ) σn × Re{AH diag(Ax)}T (66) 2 FL,ii = 2 Im{AH diag(Ax)} · diag(|Ax|−2 ) σn × Im{AH diag(Ax)}T (67) 2 FL,ri = 2 Re{AH diag(Ax)} · diag(|Ax|−2 ) σn 13 × Im{AH diag(Ax)}T FL,ir = FTL,ri . (68) (69) Combining (66)-(69), we obtain FL,c = 2 GL,c diag(|Ax|−2 ) GTL,c σn2 (70)   Re{AH diag(Ax)} = . Im{AH diag(Ax)} (71) where GL,c This completes the proof of Proposition 3.1. A PPENDIX C P ROOF OF R ANK P ROPERTY OF FL,c AND FL,r We note here that FL,c is derived under the assumption −2 of nonzero aH ) is full rank. As a m x. Therefore, diag(|Ax| result, computing the rank of FL,c is equivalent to computing the rank of GL,c . To this end, define a nonzero vector v = [ v1T v2T ]T ∈ R2N , which leads to GTL,c v = Re{AH diag(Ax)}T v1 + Im{AH diag(Ax)}T v2 . (72) Now let u = v1 + jv2 , then n H o GTL,c v = Re AH diag(Ax) u = Re {(Ax)∗ (Au)} (73) which equals to zero if and only if u = jx (74) n o 2 GTL,c v = Re j |Ax| = 0. (75) i.e., This means that there is only one direction v = [−Im{x}T Re{x}T ]T , which is non-zero, lies in the null space of GL,c , thus also in the null space of FL,c . In the real x case, similar to the proof of FL,c , it suffices to show that there is no nonzero vector v ∈ RN making FL,r v = 0. It is easy to see that GTL,r v = Re {(Ax)∗ (Av)} . (76) Since v is real-valued, it cannot be set to v = jx to make (76) zero. Given a nontrivial A, it is impossible to find a v such that Av = 0 except v = 0. Therefore, FL,r is full rank. This completes the proof. R EFERENCES [1] C. Qian, X. Fu, N. D. Sidiropoulos, and L. Huang, “Inexact alternating optimization for phase retrieval with outliers,” Proceeding of 24th European Signal Processing Conference (EUSIPCO), pp. 1538-1542, Budapest, 2016. [2] R. Gerchberg and W. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik, vol. 35, pp. 237-246, 1972. [3] J. R. Fienup, “Phase retrieval algorithms: A comparison,” Applied Optics, vol. 21, no. 15, pp. 2758-2769, 1982. [4] P. Netrapalli, P. Jain and S. Sanghavi, “Phase retrieval using alternating minimization,” IEEE Trans. Signal Process., vol. 63, no. 18, pp 48144826, 2015. [5] E. J. Candès, T. Strohmer, and V. Voroninski. “PhaseLift: Exact and stable signal recovery from magnitude measurements via convex programming,” Communications on Pure and Applied Mathematics, vol. 66, no. 8, pp. 1241-1274, 2013. [6] P. Hand, “PhaseLift is robust to a constant fraction of arbitrary errors,” Applied and Computational Harmonic Analysis, vol. 42, no. 3, pp. 550562, 2017. [7] E. J. Candès, X. Li and M. Soltanolkotabi, “Phase retrieval via Wirtinger Flow: Theory and algorithms,” IEEE Trans. Info. Theory, vol. 61, no. 4, pp. 1985-2007, 2015. [8] Y. Chen and E. Candès, “Solving random quadratic systems of equations is nearly as easy as solving linear systems,” Advances in Neural Information Processing System, pp. 739-747, 2015. [9] G. Wang, G. B. Giannakis, and Y. C. Eldar, “Solving systems of random quadratic equations via truncated amplitude flow,” arXiv preprint arXiv:1605.08285, 2016. [10] G. Wang, G. B. Giannakis and J. Chen, “Scalable solvers of random quadratic equations via stochastic truncated amplitude flow,” IEEE Trans. Signal Process., vol. 65, no. 8, pp. 1961-1974, 2017. [11] C. Qian, N. D. Sidiropoulos, K. Huang, L. Huang and H. C. So, “Phase retrieval using feasible point pursuit: Algorithms and Cramér-Rao bound,” IEEE Trans. Signal Process., vol. 64, no. 20, pp. 5282-5296, 2016. [12] C. Qian, N. D. Sidiropoulos, K. Huang, L. Huang and H. C. So, “Least squares phase retrieval using feasible point pursuit,” Proceedings of the International Conference on Acoustics, Speech, and Signal Processing (ICASSP 2016), Shanghai, China, pp. 4288-4292, 2016. [13] E. J. Candès, Y. C. Eldar, T. Strohmer and V. Voroninski, “Phase retrieval via matrix completion,” SIAM Review, vol. 57, no. 2 pp. 225-251, 2015. [14] J. Sigl, “Nonlinear residual minimization by iteratively reweighted least squares,” Computational Optimization and Applications, vol. 64, no. 3, pp. 755-792, 2016. [15] D. S. Weller, A. Pnueli, G. Divon, O. Radzyner, Y. C. Eldar and J. A. Fessler, “Undersampled phase retrieval with outliers,” IEEE Trans. Computational Imaging, vol. 1, no. 4, pp. 247-258, 2015. [16] S. Chen and H. Lu, “Noise characteristic and its removal in digital radiographic system,” Proceeding of 15th World Conference on Nondestructive Testing, Roma 2000. [17] I. Frosio and N. A. Borghese, “Statistical based impulsive noise removal in digital radiography,” IEEE Trans. Medical Imaging, vol. 28, no. 1, pp. 3-16, 2009. [18] H. Zhang, Y. Chi and Y. Liang, “Provable non-convex phase retrieval with outliers: Median truncated wirtinger flow,” Proceeding of International Conference on Machine Learning (ICML), New York, 2016. [19] J. N. Cederquist and C. C. Wackerman, “Phase-retrieval error: A lower bound,” Journal of the Optical Society of America A, vol. 4, no. 9 pp. 1788-1792, 1987. [20] R. Balan, “The Fisher information matrix and the CRLB in a nonAWGN model for the phase retrieval problem,” Proceeding of 2015 Internat. Conf. on Sampl. Theory and Applications (SampTA), pp. 178182, Washington, DC, 2015. [21] R. Balan, “Reconstruction of signals from magnitudes of redundant representations: The complex case,” Foundations of Computational Mathematics, pp. 1-45, 2013. [22] A. S. Bandeira, J. Cahill, D. G. Mixon and A. A. Nelson, “Saving phase: Injectivity and stability for phase retrieval,” Applied and Computational Harmonic Analysis, vol. 37, no. 1, pp. 106-125, 2014. [23] X. Fu, K. Huang, B. Yang, W.-K. Ma and N.D. Sidiropoulos, “Robust volume minimization-based matrix factorization for remote sensing and document clustering,” IEEE Trans. Signal Process., vol. 64, no. 23, pp. 6254-6268, 2016. [24] Y. Liu, Y. Dai and S. Ma, “Joint power and admission control: Nonconvex `q approximation and an effective polynomial time deflation approach,” IEEE Trans. Signal Process., vol. 63, no. 14, pp. 3641-3656, 2015. [25] R. Chartrand and W. Yin, “Iteratively reweighted algorithms for compressive sensing,” Proceeding of IEEE Internat. Conf. Acoust., Speech and Signal Process., Las Vegas, NV, pp. 3869-3872, 2008. [26] X. Fu, K. Huang, W.-K. Ma, N. D. Sidiropoulos, and R. Bro, “Joint tensor factorization and outlying slab suppression with applications,” IEEE Trans. Signal Process., vol. 63, no. 23, pp. 6315-6328, 2015. [27] A. Beck and M. Teboulle, “A fast iterative shrinkage-thresholding algorithm for linear inverse problems,” SIAM journal on Imaging Sciences, vol.2, no.1, pp. 183–202, 2009. [28] Y. Dai and Y. Yuan, “A nonlinear conjugate gradient method with a strong global convergence property,” SIAM Journal on Optimization, vol. 10, no. 1, pp. 177-182, 1999. 14 [29] Y. Nesterov, “A method for unconstrained convex minimization problem with the rate of convergence O (1/k2 ),” Doklady an SSSR, vol. 269, no.3, pp. 543-547, 1983. [30] O. Fercoq and P. Richtàrik, “Accelerated, parallel, and proximal coordinate descent,” SIAM Journal on Optimization, vol. 25, no. 4, pp. 19972023, 2015. [31] Y. Nesterov, “Efficiency of coordinate descent methods on huge-scale optimization problems,” SIAM Journal on Optimization, vol. 22, no. 2 pp. 341-362, 2012. [32] Y. Xu, R. Hao, W. Yin, and Z. Su, “Parallel matrix factorization for low-rank tensor completion,” Inverse Problems and Imaging, vol. 9, no. 2, pp. 601-624, 2015. [33] P. Stoica and T. L. Marzetta, “Parameter estimation problems with singular information matrices,” IEEE Trans. Signal Process., vol. 49, no. 1, pp. 87-90, 2001. [34] A. O. Hero, III, J. A. Fessler and M. Usman, “Exploring estimator bias-variance tradeoffs using the uniform CR bound,” IEEE Trans. Signal Process., vol. 44, pp. 2026-2041, 1996. [35] K. Huang and N. D. Sidiropoulos, “Putting nonnegative matrix factorization to the test: A tutorial derivation of pertinent Cramér-Rao bounds and performance benchmarking,” IEEE Signal Processing Magazine, Special Issue on Source Separation and Applications, vol. 31, no. 3, pp. 76-86, 2014. [36] S. A. Vorobyov, Y. Rong, N. D. Sidiropoulos and A. B. Gershman, “Robust iterative fitting of multilinear models,” IEEE Trans. Signal Process., vol. 53, no. 8, pp. 2678-2689, 2005. [37] S. M. Kay, Fundamentals of statistical signal processing: Detection theory, Upper Saddle River, NJ: Prentice-Hall, 1998. [38] S. Basu and Y. Bresler, “The stability of nonlinear least squares problems and the Cramer-Rao bound,” IEEE Transactions on Signal Processing, vol. 48, no. 12, pp. 3426-3436, 2000. [39] R. Chartrand and V. Staneva, “Restricted isometry properties and nonconvex compressive sensing,” Inverse Problems, vol. 24, no. 3, pp. 035020, 2008. [40] M. Razaviyayn, M. Hong, and Z.-Q. Luo, “A unified convergence analysis of block successive minimization methods for nonsmooth optimization,” SIAM Journal on Optimization, vol. 23, no. 2, pp. 1126-1153, 2013.
7cs.IT
Semantics for probabilistic programming: higher-order functions, continuous distributions, and soft constraints Sam Staton Hongseok Yang Frank Wood Chris Heunen Ohad Kammar University of Edinburgh University of Cambridge arXiv:1601.04943v3 [cs.PL] 4 May 2016 University of Oxford Abstract a distribution defined by normalizing another program. This is called a nested query, by analogy with database programming. We study the semantic foundation of expressive probabilistic programming languages, that support higher-order functions, continuous distributions, and soft constraints (such as Anglican, Church, and Venture). We define a metalanguage (an idealised version of Anglican) for probabilistic computation with the above features, develop both operational and denotational semantics, and prove soundness, adequacy, and termination. This involves measure theory, stochastic labelled transition systems, and functor categories, but admits intuitive computational readings, one of which views sampled random variables as dynamically allocated read-only variables. We apply our semantics to validate nontrivial equations underlying the correctness of certain compiler optimisations and inference algorithms such as sequential Monte Carlo simulation. The language enables defining probability distributions on higher-order functions, and we study their properties. Here is a simple example of a program. We write gauss (µ, σ) for the Gaussian probability distribution whose density function is 2 density gauss(a, (µ, σ)) = σ √12π exp(− (a−µ) ). 2σ 2 1 2 3 4 norm( let x = sample(gauss (0.0, 3.0)) in score(density gauss(5.0, (x, 1.0)); return(x < 4.5)) (1) Line 2 samples x from a prior Gaussian distribution. The soft constraint on Line 3 expresses the likelihood of the observed data, 5.0, coming from a Gaussian given the prior x. Line 4 says that what we are actually interested in is a boolean random variable over the sample space. Line 1 calculates a posterior distribution for the return value, using the prior and the likelihood. In this example we can precisely calculate that the posterior distribution on {true, false} has p(true) = 0.5. Languages like this currently lack formal exact semantics. The aim of this paper is to provide just such a foundation as a basis for formal reasoning. Most expressive probabilistic programming languages are explained in terms of their Monte Carlo simulation algorithms. The simplest such algorithm, using importance and rejection sampling, is the de facto semantics against which other algorithms are ‘proved approximately correct’. Such ‘semantics’ are hard to handle and extend. We provide two styles of semantics, operational and denotational. For first-order probabilistic programs, the denotational semantics is straightforward: types are interpreted as measurable spaces, and terms are interpreted as measurable functions (§4). Operational semantics is more complicated. For discrete distributions, an operational semantics might be a probabilistic transition system, but for continuous distributions, it must be a stochastic relation (labelled Markov process). We resolve this by equipping the set of configurations with the structure of a measurable space (§5). The advantage to the operational semantics is that it is easily extended to higher-order programs (§7). Denotational semantics for higher-order programs poses a problem, because measurable spaces do not support the usual β/η theory of functions: they do not form a Cartesian closed category (indeed, RR does not exist as a measurable space [3]). Earlier work dealt with this either by excluding higher-order functions or by considering only discrete distributions. We resolve this by moving from the category of measurable spaces, where standard probability theory takes place, to a functor category based on it (§8). The former embeds in the latter, so we can still interpret first-order concepts. But the functor category does have well-behaved function spaces, so we can also interpret higher-order concepts. Moreover, by lifting the monad of probabil- 1. Introduction Probabilistic programming is the idea to use programs to specify probabilistic models; probabilistic programming languages blend programming constructs with probabilistic primitives. This helps scientists express complicated models succinctly. Moreover, such languages come with generic inference algorithms, relieving the programmers of the nontrivial task of (algorithmically) answering queries about their probabilistic models. This is useful in e.g. machine learning. Several higher-order probabilistic programming languages have recently attracted a substantial user base. Some languages (such as Infer.net [22], PyMC [27], and Stan [36]) are less expressive but provide powerful inference algorithms, while others (such as Anglican [37], Church [13], and Venture [21]) have less efficient inference algorithms but more expressive power. We consider the more expressive languages, that support higher-order functions, continuous distributions, and soft constraints. More precisely, we consider a programming language (§3) with higher-order functions (§6) as well as the following probabilistic primitives. Sampling The command sample(t) draws a sample from a distribution described by t, which may range over the real numbers. Soft constraints The command score(t) puts a score t (a positive real number) on the current execution trace. This is typically used to record that some particular datum was observed as being drawn from a particular distribution; the score describes how surprising the observation is. Normalization The command norm(u) runs a simulation algorithm over the program fragment u. This takes the scores into account and returns a new, normalized probability distribution. The argument to sample might be a primitive distribution, or 1 2016/5/5 Finally, for a predicate ϕ, we use the indicator expression [ϕ] to denote 1 if ϕ holds, and 0 otherwise. ity distributions [12] to the functor category, we can also interpret continuous distributions. Finally, we can interpret observations by considering probability distributions with continuous density, irrespective of the categorical machinery (§9). The denotational semantics is sound and adequate with respect to the operational semantics (§5.3,8.3), which means one can use the denotational model to directly check program equations while respecting computational issues. For example: 3. A first-order language This section presents a first-order language for expressing Bayesian probabilistic models. The language forms a first-order core of a higher-order extension in Section 6, and provides a simpler setting to illustrate key ideas. The language includes infinitary type and term constructors, constant terms for all measurable functions between measurable spaces, and constructs for specifying Bayesian probabilistic models, namely, operations for sampling distributions, scoring samples, and normalizing distributions based on scores. This highly permissive and slightly unusual syntax is not meant to be a useful programming language itself. Rather, its purpose is to serve as a semantic metalanguage to which a practical programming language compiles, and to provide a mathematical setting for studying high-level constructs for probabilistic computation. • we demonstrate a key program equation for sequential Monte Carlo simulation (§4.1); • we show that every term of first-order type is equal to one without λ-abstractions or application, and hence is interpreted as a measurable function (Proposition 8.3). 2. Preliminaries We recall basic definitions and facts of measure theory. Definition 2.1. A σ-algebra on a set X is a family Σ of subsets of X, called measurable (sub)sets, which contains X and is closed under complements and countable unions. A measurable space is a set with a σ-algebra. A measure on a measurable space S (X, Σ) is Pa function p : Σ → [0, ∞] such that p(∅) = 0 and p( i∈N Ui ) = i∈N p(Ui ) for each sequence U1 , U2 , . . . of disjoint measurable sets. A probability measure or probability distribution is a measure p with p(X) = 1. Types The language has types A, B ::= R | P(A) | 1 | A × B | X Ai i∈I where I ranges over countable sets. A type A stands for a measurable space JAK. For example, R denotes the measurable space of reals, P(A) is the space of probability measures on A, and 1 is the (discrete) measurable space on the singleton set. The other type constructors correspond to products and sums of measurable spaces. Notice that countable sums are allowed, enabling us to express usual ground types in programming languages via standard encoding. For instance, the type for booleans is 1 + 1, and that for P natural numbers i∈N 1. In the paper we use a few important constructions for measurable spaces. The first is to make a set X into a measurable space by taking the full powerset of X as Σ, yielding a discrete measurable space. When X is countable, a probability distribution on (X, Σ) is determined by its values on singleton P sets, that is, by specifying a function p : X → [0, 1] such that x∈X p(x) = 1. The second construction is to combine a collection of measurable spaces (Xi , ΣP i )i∈I by sum or product. Q The underlying sets are the disjoint union i∈I XiP and product i∈I Xi of sets. The measurable sets in the sum are i∈I Ui for Ui ∈ Σi . The σ-algebra of Q the product is the smallest one containing all the subsets i∈I Ui where Ui ∈ Σi equals Xi but for a single index i. For the third, the real numbers form a measurable space (R, ΣR ) under the smallest σ-algebra that contains the open intervals; the measurable sets are called Borel sets. Restricting to any measurable subset gives a new measurable space, such as the space R≥0 of nonnegative reals and the unit interval [0, 1]. The fourth construction is to make the set P (X) of all probability measures on a measurable space (X, ΣX ) into a measurable space, by letting ΣP (X) be the smallest σ-algebra containing the sets {p ∈ P (X) | p(U ) ∈ V } for all U ∈ ΣX and V ∈ Σ[0,1] . Terms We distinguish typing judgements: Γ ⊢d t : A for deterministic terms, and Γ ⊢p t : A for probabilistic terms (see also e.g. [20, 26, 31]). In both, A is a type, and Γ is a list of variable/type pairs. Variables stand for deterministic terms. Intuitively, a probabilistic term Γ ⊢p t : A may have two kinds of effects: during evaluation, t may sample from a probability distribution, and it may score the current execution trace (typically according to likelihood of data). Evaluating a deterministic term Γ ⊢d t : A does not have any effects. Sums and products The language includes variables, and standard constructors and destructors for sum and product types. Γ ⊢d t : Ai P Γ, x : A, Γ′ ⊢d x : A Γ ⊢d (i, t) : i∈I Ai P Γ ⊢d t : (Γ, x : Ai ⊢z ui : B)i∈I i∈I Ai (z ∈ {d, p}) Γ ⊢z case t of {(i, x) ⇒ ui }i∈I : B Definition 2.2. Let (X, ΣX ), (Y, ΣY ) be measurable spaces. A function f : X → Y is measurable if f -1 (U ) ∈ ΣX for U ∈ ΣY . We can push forward a measure along a measurable function: if p : ΣX → [0, 1] is a probability measure on (X, ΣX ) and f : X → Y is a measurable function, then q(U ) = p(f -1 (U )) is a probability measure on (Y, ΣY ). Γ ⊢d ∗ : 1 Γ ⊢d tj : Aj for all j ∈ {0, 1} Γ ⊢d (t0 , t1 ) : A0 × A1 Γ ⊢d t : A0 × A1 Γ ⊢d πj (t) : Aj In the rules for sums, I may be infinite. In the last rule, j is 0 or 1. We use some standard syntactic sugar, such as false and true for the injections in the type bool = 1 + 1, and if for case in that instance. Definition 2.3. A stochastic relation between measurable spaces (X, ΣX ) and (Y, ΣY ) is a function r : X × ΣY → [0, 1] such that r(x, −) : ΣY → [0, 1] is a probability distribution for all x ∈ X, and r(−, V ) : X → [0, 1] is measurable for all V ∈ ΣY . Sequencing We include the standard constructs (e.g. [20, 23]). Γ ⊢p t : A Γ, x : A ⊢p u : B Γ ⊢d t : A Γ ⊢p return(t) : A Γ ⊢p let x = t in u : B Giving a stochastic relation from (X, ΣX ) to (Y, ΣY ) is equivalent to giving a measurable function (X, ΣX ) → (P (Y ), ΣP (Y ) ). Stochastic relations r : X × ΣY → [0, 1] and s : Y × ΣZ → [0, 1] compose associatively to (s ◦ r) : X × ΣZ → [0, 1] via the formula Z (s ◦ r)(x, W ) = s(y, W ) r(x, dy). Where A = 1, we write (t; u) for let x = t in u. Language-specific constructs The language has constant terms for all measurable functions. Γ ⊢d t : A (f : JAK → JBK measurable) (2) Γ ⊢d f (t) : B Y 2 2016/5/5 If the model evidence is 0 or ∞, the conversion fails, and this is tracked by the ‘+1+1’. In particular, all the usual distributions are in the language, including the Dirac distribution dirac(x) concentrated on outcome x, the Gaussian distribution gauss(µ, σ) with mean µ and standard deviation σ, the Bernoulli distribution bern(p) with success probability p, the exponential distribution exp(r) with rate r, and the Beta distribution beta(α, β) with parameters α, β.1 For example, from the measurable functions 42.0 : 1 → R, e(−) : R → R, gauss : R × R → P (R) and < : R × R → 1 + 1 we can derive: Γ ⊢d 42.0 : R 4. Denotational semantics This section discusses the natural denotational semantics of the first-order language. The basic idea can be traced back a long way (e.g. [18]) but our treatment of score and norm appear to be novel. As described, types A are interpreted as measurable spaces JAK. A context Γ = (x1Q : A1 , . . . , xn : An ) is interpreted as the def measurable space JΓK = n i=1 JAi K of its valuations. Γ ⊢d t : R Γ ⊢d et : R Γ ⊢d µ : R Γ ⊢d σ : R Γ ⊢d t : R Γ ⊢d u : R Γ ⊢d gauss (µ, σ) : P(R) Γ ⊢d t < u : bool The following terms form the core of our language. Γ ⊢d t : P(A) Γ ⊢p sample(t) : A • Deterministic terms Γ ⊢d t : A are interpreted as measurable functions JtK : JΓK → JAK, providing a result for each valuation of the context. • Probabilistic terms Γ ⊢p t : A are interpreted as measurable Γ ⊢d t : R Γ ⊢p score(t) : 1 functions JtK : JΓK → P (R≥0 × JAK), providing a probability measure on (score,result) pairs for each valuation of the context. The first term samples a value from a distribution t. The second multiplies the score of the current trace with t. Since both of these terms express effects, they are typed under ⊢p instead of ⊢d . The reader may think of the score of the current execution trace as a state, but it cannot be read, nor changed arbitrarily: it can only be multiplied by another score. The argument t in score(t) is usually the density of a probability distribution at an observed data point. For instance, recall the example (1) from the Introduction: Informally, if (Ω, p : Ω→[0, 1]) is the prior sample space of the program (specified by sample), and l : Ω→R≥0 is the likelihood (specified by score), and r : Ω → JAK is the return value, then a measure in P (R≥0 × JAK) is found by pushing forward p along (l, r). Sums and products The interpretation of deterministic terms follows the usual pattern of the internal language of a distributive catdef egory (e.g. [28]). For instance, JΓ, x : A, Γ′ ⊢d x : AK(γ, a, γ ′ ) = a, def and JΓ ⊢d f (t) : AK(γ) = f (JtK(γ)) for measurable f : JAK → JBK. This interpretation is actually the same as the usual set-theoretic semantics of the calculus, as one can show by induction that the induced functions JΓK → JAK are measurable. norm(let x = sample(gauss(0.0, 3.0)) in score(density gauss(5.0, (x, 1.0)); return(x < 4.5)) An execution trace is scored higher when x is closer to the datum 5. When the argument t in score(t) is 0, this is called a hard constraint, meaning ‘reject this trace’; otherwise it is called a soft constraint. In the discrete setting, hard constraints are more-or-less sufficient, but even then, soft constraints tend to be more efficient. Sequencing For probabilistic terms, we proceed as follows. def Jreturn(t)K(γ)(U ) = [(1, JtK(γ)) ∈ U ], which denotes a Dirac distribution, and Jlet x = t in uK(γ)(V ) is Z      JtK(γ)(d(r, x)) . JuK(γ, x) (s, b) (r · s, b) ∈ V Normalization Two representative tasks of Bayesian inference are to calculate the so-called posterior distribution and model evidence from a prior distribution and likelihood. Programs built from sample and score can be thought of as setting up a prior and a likelihood. Consider the following program: R≥0 ×JAK As we will explain shortly, these interpretations come from treating P (R≥0 × (−)) as a commutative monad, which essentially means the following program equations hold. let x = sample(bern(0.25)) in let y = (if x then return 5.0 else return 2.0) in score(density exp(0.0, y)); return(x) Jlet x = return(x) in uK = JuK Jlet x = t in return(x)K = JtK Jlet y = (let x = t in u) in vK = Jlet x = t in let y = u in vK Here the prior y comes from the Bernoulli distribution, and the likelihood concerns datum 0.0 coming from an exponential distribution with rate y. Recall that density exp(0.0, y) = y. So there are two execution traces, returning either true, with probability 0.25 and score 5.0, or false, with probability 0.75 and score 2.0. The product of the prior and likelihood gives an unnormalized posterior distribution on the return value: (true 7→ 0.25·5=1.25, false 7→ 0.75·2=1.5). The normalizing constant is the average score: (0.25·5 + 0.75·2) = 2.75, so the posterior is (true 7→ 1.5 1.25 ≈0.45, false 7→ 2.75 ≈0.55). The average score is called the 2.75 model evidence. It is a measure of how well the model encoded by the program matches the observation. Note that the sample x = true matches the datum better, so the probability of true goes up from 0.25 to 0.45 in the posterior. In our language we have a term norm(t) that will usually convert a probabilistic term t into a deterministic value, which is its posterior distribution together with the model evidence. Γ ⊢p t : A Γ ⊢d norm(t) : (R × P(A)) + 1 + 1 Jlet x = t in let y = u in (x, y)K = Jlet y = u in let x = t in (x, y)K The last equation justifies a useful program optimisation technique [37, §5.5]. (The last two equations require assumptions about free variables of u, v and t, to avoid variable capture.) Language-specific constructs We use the monad: def Jsample(t)K(γ)(U ) = JtK(γ)({a | (1, a) ∈ U }) def Jscore(t)K(γ)(U ) = [(max(JtK(γ), 0), ∗) ∈ U ] Here are some program equations to illustrate the semantics so far. Jscore(7.0); score(6.1)K = Jscore(42.7)K { let x = sample(gauss (0.0, 1.0)) = Jsample(bern(0.5))K in return(x > 0.0) s { let x = sample(gauss (0.0, 1.0)) = Jreturn(false)K in return(x > x) s Normalization We interpret norm(t) as follows. Each probability measure p on (R≥0 × X)R induces an unnormalized posterior measure p̄ on X: let p̄(U ) = R ×U r p(d(r, x)). As long as the ≥0 average score p̄(X) is not 0 or ∞, we can normalize p̄ to build 1 Usually, gauss(0.0, 0.0) is undefined, but we just let gauss(0.0, 0.0) = gauss(0.0, 1.0), and so on, to avoid worrying about this sort of error. 3 2016/5/5 a posterior probability measure on X. This construction forms a natural transformation ιX : P (R≥0 × X) → (R × P (X)) + 1 + 1  if p̄(X) = 0  (1, ∗) def (2, ∗) ιX (p) =  if p̄(X) = ∞ (3)    0, p̄(X), λU. p̄(U )  otherwise p̄(X) the resampled value in the continuation v. Line 3 propagates the error of 0: w is a deterministic term of the right type whose choice does not matter. Finally, line 4 detects an infinite evidence error, and undoes the transformation. This error does not arise in most applications of sequential Monte Carlo simulation. 5. Operational semantics def Let Jnorm(t)K(γ) = ι(JtK(γ)). Here are some examples: s { norm(let x = sample(gauss (0.0, 3.0)) in score(density gauss(5.0, (x, 1.0)); return(x < 4.5))  = 0, (0.949, bern (0.5)) { s norm let x = sample(bern(0.25)) in  (if x then score(5.0) else score(2.0)); return(x)  5 )) = 0, (2.75, bern( 11  Jnorm let x = sample(exp(1.0)) in score(ex ) K = (2, ∗) { s s { 1 norm let x = sample(beta(1,  3)) = norm score( 1+3 );  in score(x); return(x) sample(beta(2, 3)) In this section we develop an operational semantics for the firstorder language. There are several reasons to consider this, even though the denotational semantics is arguably straightforward. First, extension to higher-order functions is easier in operational semantics than in denotational semantics. Second, operational semantics conveys computational intuitions that are obscured in the denotational semantics. We expect these computational intuitions to play an important role in studying approximate techniques for performing posterior inference, such as sequential Monte Carlo, in the future. Sampling from probability distributions complicates operational semantics. Sampling from a discrete distribution can immediately affect control flow. For example, in the term The third equation shows how infinite model evidence errors can arise when working with infinite distributions. In the last equation, the parameter x of score(x) represents the probability of true under bern(x). The equation expresses the so called conjugateprior relationship between Beta and Bernoulli distributions, which has been used to optimise probabilistic programs [38]. let x = sample(bern(0.5)) in if x then return(1.1) else return(8.0) the conditional depends on the result of sampling the Bernoulli distribution. The result is 1.1 with probability 0.5 (cf. [5, §2.3]). Sampling a distribution on R introduces another complication. Informally, there is a transition Monads The interpretation of letand return given above arises from the fact that P R≥0 × (−) is a commutative monad on the category of measurable spaces and measurable functions (see also [7, §2.3.1], [33, §6]). Recall that a commutative monad (T, η, µ, σ) in general comprises an endofunctor T together with natural transformations ηX : X → T (X), µX : T (T (X)) → T (X), σX,Y : X ×T (Y ) → T (X ×Y ) satisfying some laws [17]. Using this structure we interpret return and let following Moggi [23]:  def JΓ ⊢p return(t) : AK(γ) = ηJAK JtK(γ)  def JΓ ⊢p let x = t in u : BK(γ) = µJBK T (JuK) σJΓK,JAK (γ, JtK(γ)) sample(gauss (0.0, 1.0)) −→ return(r) for every real r, but any single transition has zero probability. We can assign non-zero probabilities to sets of transitions; informally:   Pr sample(gauss (0.0, 1.0)) −→ {return(r) | r ≤ 0} = 0.5. To make this precise we need a σ-algebra on the set of terms, which can be done using configurations rather than individual terms. A configuration is a closure: a pair ht, γi of a term t with free variables and an environment γ giving values for those variables as elements of a measurable space. (See also [14, §3], [6, §3].) Sampling a distribution p on R+R exhibits both complications: Concretely, we make P (R≥0 × (−)) into a monad by combining the standard commutative monad structure [12] on P and the commutative monoid (R≥0 , ·, 1) with the monoid monad transformer. (We record a subtle point about ι (3). It is not a monad morphism, and we we cannot form a commutative monad of all measures because the Fubini property does not hold in general.) let x = sample(p) in case x of (0, r) ⇒ return(r + 1.0) |(1, r) ⇒ return(r − 1.0) The control flow in the case distinction depends on which summand is sampled, but there is potentially a continuous distribution over the return values. We handle this by instantiating the choice of summand in the syntax, but keeping the value of the summand in the environment, so that expression (4) can make a step to the closure 4.1 Sequential Monte Carlo simulation The program equations above justify some simple program transformations. For a more sophisticated one, consider sequential Monte Carlo simulation [8]. A key idea of its application to probabilistic programs is: ‘Whenever there is a score, it is good to renormalize and resample’. This increases efficiency by avoiding too many program executions with low scores [25, Algorithm 1]. The denotational semantics justifies the soundness of this transformation. For a term with top-level score, i.e. a term of the form (let x = t in (score(u); v)) where u and v may have x free: Jnorm(let x = t in (score(u); v))K = Jnorm(case (norm(let x = t in score(u); return(x))) of (0, (e, d)) ⇒ score(e); let x = sample(d) in v | (1, ∗) ⇒ score(0); return(w) | (2, ∗) ⇒ let x = t in (score(u); v))K (4) , y 7→ 42.0i. h let x = return(0, y) in case x of (0, r) ⇒ return(r + 1.0) |(1, r) ⇒ return(r − 1.0) A type is indecomposable if it has the form R or P(A), and a context Γ is canonical if it only involves indecomposable types. Configurations Let z ∈ {d, p}. A z-configuration of type A is a triple hΓ, t, γi comprising a canonical context Γ, a term Γ ⊢z t : A, and an element γ of the measurable space JΓK. We identify contexts that merely rename variables, such as 1 2 3 4 h(x : R, y : P(R)), f (x, y), (x 7→ 42.0, y → 7 gauss (0.0, 1.0))i ≈h(u : R, v : P(R)), f (u, v), (u 7→ 42.0, v → 7 gauss(0.0, 1.0))i. Let us explain the right hand side. Line 1 renormalizes the program after the score, and in non-exceptional execution returns the model evidence e and a new normalized distribution d. Line 2 immediately records the evidence e as a score, and then resamples d, using We call d-configurations deterministic configurations, and p-configurations probabilistic configurations; they differ only in typing. We will abbreviate configurations to ht, γi when Γ is obvious. 4 2016/5/5 Values v in a canonical context Γ are well-typed deterministic terms of the form v, w ::= xi | ∗ | (v, w) | (i, v) parameterized by a family of measurable ‘normalization’ functions  νA : Conp (A) → R≥0 × P (JAK) + 1 + 1 (8) (5) indexed by types A. where xi is a variable in Γ. Similarly, a probabilistic term t in context Γ is called probabilistic value or p-value if t ≡ return(v0 ) for some value v0 . Remember from Section 4 that the denotational semantics of values is simple and straightforward. Write Cond (A) and Conp (A) for the sets of deterministic and probabilistic configurations of type A, and make them into measurable spaces by declaring U ⊆ Conz (A) to be measurable if the set {γ ∈ JΓK | ht, γi ∈ U } is measurable for all judgements Γ ⊢z t : A. X JΓK (6) Conz (A) = Reduction of deterministic terms Define a type-indexed family of relations −→ ⊆ ConNd (A) × Cond (A) as the least one that is closed under the following rules. hΓ, πj (v0 , v1 ), γi −→ hΓ, vj , γi hΓ, case (i′ , v) of {(i, x) ⇒ ti }i∈I , γi −→ hΓ, ti′ [v/x], γi hΓ, f (w), γi −→ h(Γ, Γ′ ), v, (γ, γ ′ )i (w a value ∧ Γ′ ⊢d v : A an ordered value ∧ f (JwK(γ)) = JvK(γ ′ )) (Γ,t) Γ canonical, Γ ⊢z t : A hΓ, norm(t), γi −→ h(Γ, x:R, y:P(B)), (0, (x, y)), γ[x7→r, y7→p]i (A = (R×P(B) + 1 + 1) ∧ νB (hΓ, t, γi) = (0, (r, p)) ∧ x, y 6∈ Γ) Further partition Conz (A) into ConVz (A) and ConNz (A) based on whether a term in a configuration is a value or not: ConVd (A) = {hΓ, t, γi ∈ Cond (A) ConNd (A) = {hΓ, t, γi ∈ Cond (A) ConVp (A) = {hΓ, t, γi ∈ Conp (A) ConNp (A) = {hΓ, t, γi ∈ Conp (A) | | | | hΓ, norm(t), γi −→ hΓ, (i, ∗), γi (A = (R × P(B) + 1 + 1) ∧ νB (hΓ, t, γi) = (i, ∗), i ∈ {1, 2}) t is a value} t is not a value} t is a p-value} t is not a p-value} hΓ, t, γi −→ hΓ′ , t′ , γ ′ i hΓ, C[t], γi −→ hΓ′ , C[t′ ], γ ′ i (C[−] is not (−)) Particularly well-behaved values are the ordered values Γ ⊢d v : A, where each variable appears exactly once, and in the same order as in Γ. The rule for f (w) keeps the original context Γ and the closure γ because they might be used in the continuation, even though they are not used in v. The rules obey the following invariant. Lemma 5.1. Consider a canonical context Γ, a type A, an ordered value Γ ⊢d v : A, and the induced measurable function Lemma 5.2. If hΓ, t, γi −→ hΓ′ , t′ , γ ′ i, then Γ′ = (Γ, Γ′′ ) and γ ′ = (γ, γ ′′ ) for some Γ′′ and γ ′′ ∈ JΓ′′ K. JvK : JΓK → JAK. Proof. By induction on the structure of derivations. The collection of all such functions for given A is countable, and forms a coproduct diagram. This lemma allows us to confirm that our specification of a relation −→ ⊆ ConNd (A) × Cond (A) is well-formed (‘type preservation’). Proof. By induction on the structure of types. The key fact is that every type is a sum of products of indecomposable ones, because the category of measurable spaces P P is distributive, i.e. the canonical map i∈I (A × Bi ) → A × i∈I Bi is an isomorphism. Proposition 5.3. The induced relation is a measurable function. Proof. There are three things to show: that the relation is entire (‘progress’); that the relation is single-valued (‘determinacy’); and that the induced function is measurable. All three are shown by induction on the structure of terms. The case of application of measurable functions crucially uses Lemma 5.1. For example, A = (R × bool) + (R × R) has 3 ordered values, first (x : R ⊢d (0, (x, true)) : A), second (x : R ⊢d (0, (x, false)) : A), and third (x : R, y : R ⊢d (1, (x, y)) : A), inducing a canonical measurable isomorphism R + R + R × R ∼ = JAK. Evaluation contexts We distinguish three kinds of evaluation contexts: C[−] is a context for a deterministic term with a hole for deterministic terms; D[−] and E [−] are contexts for probabilistic terms, the former with a hole for probabilistic terms, the latter with a hole for deterministic terms. C[−] ::= (−) | πj C[−] | (C[−], t) | (v, C[−]) | (i, C[−]) | case C[−] of {(i, x) ⇒ ti }i∈I | f (C[−]) D[−] ::= (−) | let x = D[−] in t Reduction of probabilistic terms Next, we define the stochastic relation −→ for probabilistic terms, combining two standard approaches: for indecomposable types, which are uncountable, use labelled Markov processes, i.e. give a distribution on the measurable set of resulting configurations; for decomposable types (sums, products etc.), probabilistic branching is discrete and so a transition system labelled by probabilities suffices. (7) Proposition 5.4. Let (Xi )i∈I be an indexed family of measurable spaces. Suppose we are given: E [−] ::= D[return[−]] | D[sample[−]] | D[score[−]] | case D[−] of {(i, x) ⇒ ti }i∈I • a function q : I → [0, 1] that Pis only nonzero on a countable subset I0 ⊆ I, and such that where t, ti are general terms and v is a value. i∈I0 q(i) = 1; • a probability measure qi on Xi for each i ∈ I0 . 5.1 Reduction P This determines a probability measure p on i∈I Xi by P p(U ) = i∈I q(i) qi ({a | (i, a) ∈ U }) P for U a measurable subset of i∈I Xi , Using the tools developed so far, we will define a measurable function for describing the reduction of d-configurations, and a stochastic relation for describing reduction of p-configurations: −→ : ConNd (A) → Cond (A), −→ : ConNp (A) × ΣR≥0 ×Conp (A) → [0, 1], We will use three entities to define the desired stochastic relation −→ : ConNp (A) × ΣR≥0 ×Conp (A) → [0, 1]. 5 2016/5/5 (Γ′ , t′ ) and the distribution Pr(C −→(−) (−)) indexed by such pairs satisfy the conditions in Proposition 5.4. It follows that the partial evaluation Pr(C −→ (−)) of the function in the statement is a probability measure, so it suffices to establish measurability of the other partial evaluation Pr((−) −→ U ). Recall that ConNp (A) is defined in terms of the sum of measurable spaces, and that all p-configurations in each summand have the same term. Finally, use induction on the term shared by all p-configurations in the summand to see that the restriction of Pr((−) −→ U ) to each summand is measurable. 1. A countably supported probability distribution on the set {(Γ, t) | Γ ⊢p t : A} for each C ∈ ConNp (A). We write Pr(C −→ (Γ, t)) for the probability of (Γ, t). 2. A probability measure on the space JΓK for each C ∈ ConNp (A) and (Γ, t) with Pr(C −→ (Γ, t)) 6= 0. Write Pr(C −→Γ,t U ) for the probability of a measurable subset U ⊆ JΓK. 3. A measurable function Sc : ConNp (A) → R≥0 , representing the score of the one-step transition relation. (For one-step transitions, the score is actually deterministic.) These three entities are defined by induction on the structure of the syntax of A-typed p-configurations in Figure 1. We combine them to define a stochastic relation as follows. 5.2 Termination To see that the reduction process terminates, we first define the transitive closure. This is subtle, as sampling can introduce countably infinite branching; although each branch will terminate, the expected number of steps to termination can be infinite. We use the deterministic transition relation to define an evaluation relation ⇓ ⊆ Cond (A) × ConV d (A), by setting C ⇓ D if ∃n. C ⇓n D, where Proposition 5.5. The map ConNp (A) × ΣR≥0 ×Conp (A) → [0, 1] that sends (C, U ) to Pr(C −→ U ), defined as X   Pr C −→ (Γ, t) Pr C −→Γ,t {γ | (Sc(C), hΓ, t, γi) ∈ U } , (Γ,t) is a stochastic relation. 0 C⇓ C on t Proof. For each p-configuration C = h , t, i, use induction  to see that the probability distribution Pr C −→ (−) on pairs (C ∈ ConVd (A)) D ⇓n E C⇓ C −→ D n+1 E To define evaluation for probabilistic configurations, we need substochastic relations: functions f : X × ΣY → [0, 1] that are measurable in X, satisfy f (x, Y ) ≤ S 1 for every xP∈ X, and are countably additive in Y , i.e. f (x, i∈N Ui ) = i∈N f (Ui ) for a sequence U1 , U2 , . . . of disjoint measurable sets. Thus a stochastic relation (as in Definition 2.3) is a sub-stochastic relation with f (x, Y ) = 1. Define a sub-stochastic relation  def  Pr(hΓ, E [t], γi −→ (Γ′ , E [t′ ])) = hΓ, t, γi −→ hΓ′ , t′ , γ ′ i def Pr(hΓ, D[t], γi −→ (Γ′ , D[t′ ])) = Pr(hΓ, t, γi −→ (Γ′ , t′ )) def Pr(hΓ, let x = return(v) in t, γi −→ (Γ, t[v/x])) = 1 Pr(− ⇓ −) : Conp (A) × ΣR≥0 ×ConVp (A) → [0, 1] def P by Pr(C ⇓ U ) = n Pr(C ⇓n U ), where Pr(C ⇓0 U ) is given by [(1, C) ∈ U ], and Pr(C ⇓n+1 U ) is Z Pr(D ⇓n {(s, E) | (r · s, E) ∈ U }) Pr(C −→ d(r, D)). def Pr(hΓ, case (j, v) of {(i, x) ⇒ ti }i∈I , γi −→ (Γ, tj [v/x])) = 1 def Pr(hΓ, score(v), γi −→ (Γ, return(∗))) = 1 Pr(hΓ, sample(v), γi −→ ((Γ, Γ′ ), return(v ′ ))) ( JvK(γ)({Jv ′ K(γ ′ ) | γ ′ ∈ JΓ′ K}) if Γ′ ⊢d v ′ : A ordered def = 0 otherwise R≥0 ×Conp (A) Proposition 5.6 (Termination). Evaluation of deterministic terms is a function: ∀C. ∃D. C ⇓ D. Evaluation of probabilistic terms is a stochastic relation: ∀C. Pr(C ⇓ (R≥0 × ConV p (A))) = 1. Pr(hΓ, E [t], γi −→(Γ′ ,E[t′ ]) U ) def = [hΓ, t, γi −→ hΓ′ , t′ , γ ′ i ∧ γ ′ ∈ U ] Proof. By induction on the structure of terms. Termination comes from the omission of recursion in our language. We do so for now, because our semantic model does not yet handle higher-order recursion, and probabilistic while-languages are already well-understood (e.g. [18]). (See also the discussion about domain theory in §8.) def Pr(hΓ, D[t], γi −→(Γ′ ,D[t′ ]) U ) = Pr(hΓ, t, γi −→(Γ′ ,t′ ) U ) def Pr(hΓ, let x = return(v) in t, γi −→(Γ,t[v/x]) U ) = [γ ∈ U ] def Pr(hΓ, case (j, v) of {(i, x) ⇒ ti }i∈I , γi −→Γ,tj [v/x] U ) = [γ ∈ U ] def Pr(hΓ, score(v), γi −→(Γ,return(∗)) U ) = [γ ∈ U ] 5.3 Soundness Pr(hΓ, sample(v), γi −→((Γ,Γ′ ),return(v′ )) U ) For soundness, extend the denotational semantics to configurations: def = ′ ′ ′ ′ • define sd : Cond (A) → JAK by hΓ, t, γi 7→ JtK(γ); ′ JvK(γ)({Jv K(γ ) | γ ∈ JΓ K ∧ (γ, γ ) ∈ U }) JvK(γ)({Jv ′ K(γ ′ ) | γ ′ ∈ JΓ′ K}) def • define sp : Conp (A) × ΣR≥0 ×JAK → [0, 1] similarly by (hΓ, t, γi, U ) 7→ JtK(γ)(U ). We may also use this stochastic relation as a measurable function sp : Conp (A) → P (R≥0 × JAK); def Sc(hΓ, E [t], γi) = 1 Sc(hΓ, D[t], γi) = Sc(hΓ, t, γi) • define sV p : ConVp (A) → JAK by hΓ, return(v), γi 7→ JvK(γ). def Sc(hΓ, sample(v), γi) = 1 Note that in this first-order language, sV p is a surjection which equates two value configurations iff they are related by weakening, contraction or exchange of variables. def Sc(hΓ, score(v), γi) = max(JvK(γ), 0) def Sc(hΓ, let x = return(v) in t, γi) = 1 Assumption 5.7. Throughout this section we assume that the normalization function ν on configurations (8) is perfect, i.e. it corresponds to ι, the semantic normalization function (3): def Sc(hΓ, case (j, v) of {(i, x) ⇒ ti }i∈I , γi) = 1 νA (hΓ, t, γi) = ιJAK (sp (hΓ, t, γi)). Figure 1. Entities used to define reduction of probabilistic terms 6 2016/5/5 Lemma 5.8 (Context extension). Let z ∈ {d, p}. Suppose that hΓ, t, γi and h(Γ, Γ′ ), t, (γ, γ ′ )i are configurations in Conz (A). Then sz (hΓ, t, γi) = sz h(Γ, Γ′ ), t, (γ, γ ′ )i. which takes a probability measure and returns a suspended program that will sample from it. On the other hand, to reify the normalization construction, we use a different calling convention. Proposition 5.9 (Soundness). The following diagrams commute (in the category of measurable functions, and stochastic relations, respectively). ⊢d λx. norm(force(x)) : T(A) ⇒ R × P(A) + 1 + 1 ConNp (A) ConNd (A) one-step reduction  Cond (A) ❯❯s❯d❯* 4 JAK ✐✐✐✐✐ sd one-step reduction sp This function takes a suspended probabilistic program and returns the result of normalizing it. / R≥0 × JAK O Example: higher-order expectation Higher types also allow us to consider probability distributions over programs. For an example, consider this term. multiplication  / R≥0 × R≥0 × JAK R≥0 × Conp (A) id ×s def Eh = λ(d, f ) : T(A) × (A ⇒ R). case (norm(let a = force(d) in score(f (a)))) of (0, (e, y)) ⇒ e | (1, ∗) ⇒ 0.0 | (2, ∗) ⇒ 0.0 p Proof. By induction on the structure of syntax. The inductive steps with evaluation contexts use the extension Lemma 5.8, which applies by the invariant Lemma 5.2. It has type (T(A) × (A ⇒ R)) ⇒ R. Intuitively, given a thunked probabilistic term t and a function f that is nonnegative, Eh treats t as a probability distribution on A, and computes the expectation of f on this distribution. Notice that A can be a higher type, so Eh generalises the usual notion of expectation, which has not been defined for higher types because the category of measurable spaces is not Cartesian closed. Adequacy The denotational semantics is adequate, in the sense:  JtK(∗) = P (R≥0 × sV p ) Pr(h∅, t, ∗i ⇓ (−)) for all ⊢p t : A. That is, the denotation JtK(∗) is nothing but pushing forward the probability measure Pr(h∅, t, ∗i ⇓ (−)) from the operational semantics along the function sV p . This adequacy condition holds because Proposition 5.9 ensures that X  Pr(h∅, t, ∗i ⇓k {(r, C) | (r, sV p (C)) ∈ U }) ≤ JtK(∗)(U ) 7. Higher-order operational semantics In this section we consider operational semantics for the higherorder extension of the language. In an operational intuition, force(t) forces a suspended computation t to run. For example, k≤n for all n and U , and Proposition 5.6 then guarantees that the lefthand side of this inequality converges to the right-hand side as n tends to infinity. ⊢d thunk(sample(gauss(0.0, 1.0))) : T(R) is a suspended computation that, when forced, will sample the normal distribution. 6. A higher-order language Assumption 7.1. From the operational perspective it is unclear how to deal with sampling from a distribution over functions. For this reason, in this section, we only allow the type P(A) when A is a measurable type. We still allow probabilistic terms to have higherorder types, and we still allow T(A) where A is higher-order. This short section extends the first-order language with functions and thunks [19], allowing variables to stand for program fragments. In other words, ‘programs are first-class citizens’. Types Extend the grammar for types with two new constructors. X A, B ::= R | P(A) | 1 | A × B | Ai | A ⇒ B | T(A) 7.1 Reduction We now extend the operational semantics from Section 5 with higher types. Values (5) are extended as follows. i∈I Informally, A ⇒ B contains deterministic functions, and T(A) contains thunked (i.e. suspended) probabilistic programs. Then A ⇒ T(B) contains probabilistic functions. A type is measurable if it does not involve ⇒ or T, i.e. if it is in the grammar of Section 3. v ::= . . . | λx.t | thunk(t) Evaluation contexts (7) are extended as follows. C[−] ::= . . . | C[−] t | v C[−] Terms Extend the term language with the following rules. First, the usual abstraction and application of deterministic functions: Γ, x : A ⊢d t : B Γ ⊢d λx. t : A ⇒ B There are two additional redexes: (λx.t) v and force(thunk(t)). The deterministic transition relation is extended with this β-rule: Γ ⊢d t : A ⇒ B Γ ⊢d u : A Γ ⊢d t u : B hΓ, (λx.t) v, γi −→ hΓ, t[v/x], γi. Extend the probabilistic transition relation with the following rules.  Pr hΓ, force(thunk(t)), γi −→ (Γ, t) = 1  Pr hΓ, force(thunk(t)), γi −→(Γ,t) U = [γ ∈ U ] Second, we have syntax for thunking and forcing (e.g. [19, 23, 26]). Γ ⊢p t : A Γ ⊢d thunk(t) : T(A) E [−] ::= . . . | D[force[−]] Γ ⊢d t : T(A) Γ ⊢p force(t) : A Sc(hΓ, force(thunk(t)), γi) = 1 All the rules from Section 3 are also still in force. For rule (2) to still make sense, we only include constant terms for measurable functions f : JAK → JBK between measurable types A and B. 7.2 Termination The evaluation relations for deterministic and probabilistic configurations of the higher-order language are defined as in Subsection 5.2. The resulting rewriting system still terminates, even though configurations may now include higher-order terms. Examples One motivation for higher types is to support code structuring. The separate function types and thunk types allow us to be flexible about calling conventions. For example, sampling can be reified as the ground term Proposition 7.2 (Termination). Evaluation of deterministic terms is a function: ∀C. ∃D. C ⇓ D. Evaluation of probabilistic terms is a stochastic relation: ∀C. Pr(C ⇓ (R≥0 × ConV p (A))) = 1. ⊢d λx. thunk(sample(x)) : P(A) ⇒ T(A), 7 2016/5/5 Proof. We sketch an invariant of higher-order terms that implies the termination property, formulated as unary logical relations via sets 8.1 Semantic model Fix a category Meas of measurable spaces and measurable functions that is essentially small but large enough for the purposes of Section 4. For example, Meas could be the category of standard Borel spaces [4, 35]: one can show that JAK is standard Borel by induction on A, and the class of all standard Borel spaces is countable up to measurable isomorphism. In Section 4 we interpreted first-order types A as measurable spaces JAK. We will interpret higher-order types A as functors LAM : Measop → Set. Informally, when A is a first-order type and Γ is a first-order context, we will have LAM(JΓK) ∼ = Meas(JΓK, JAK) ≈ {t | Γ ⊢d t : A}. For a second order type (A ⇒ B), we will have ∼ Meas(JΓK × JAK, JBK) ≈ {t | Γ, x : A ⊢d t : B} LA ⇒ BM(JΓK) = R(Γ ⊢z A) ⊆ {t | Γ ⊢z t : A}, Rv (Γ ⊢z A) ⊆ {t | Γ ⊢z t : A ∧ t a z-value}, for each canonical context Γ, type A, and z ∈ {d, p}, defined by: R(Γ ⊢d A) = {t | ∀γ. hΓ, t, γi ⇓ hΓ′ , t′ , γ ′ i ∧ t′ ∈ Rv (Γ′ ⊢d A)} R(Γ ⊢p A) = {t | ∀γ. Pr(hΓ, t, γi ⇓ P (R≥0 × Γ′ Rv (Γ′ ⊢p A) × JΓ′ K)) = 1} Rv (Γ ⊢p A) = {return(v) | v ∈ Rv (Γ ⊢d A)} Rv (Γ ⊢d A) = {x | (x : A) ∈ Γ} for A indecomposable Rv (Γ ⊢d 1) = {∗} Rv (Γ ⊢d A1 × A2 ) = {(v1 , v2 ) | ∀j. vj ∈ Rv (Γ ⊢d Aj )} X Rv (Γ ⊢d Ai ) = {(i, v) | v ∈ Rv (Γ ⊢d Ai )} so that β/η equality is built in. To put it another way, LAM(Rn ) models terms of type A having n read-only real-valued memory cells. Lemma 8.1. For a small category C with countable sums, consider the category C of countable-product-preserving functors Cop → Set, and natural transformations between them. Rv (Γ ⊢d T (A)) = {thunk(t) | t ∈ R(Γ ⊢p A)} Rv (Γ ⊢d A ⇒ B) = {λx.t | ∀Γ′ ⊇ Γ, u ∈ Rv (Γ′ ⊢d A). • C has all colimits; • C is Cartesian closed if C has products that distribute over t[u/x] ∈ R(Γ′ ⊢d B)} Induction on the structure of a term Γ, x1 : A1 , . . . xn : An ⊢z t : B for z ∈ {d, p} now proves that vi ∈ Rv (Γ ⊢d Ai ) for i = 1, . . . , n implies t[~v /~x] ∈ R(Γ ⊢z B). sums; • There is a full and faithful embedding y : C → C, given by def y(c) = C(−, c), which preserves limits and countable sums. Proof. See e.g. [30, §7], or [16, Theorems 5.56 and 6.25]. The embedding y is called the Yoneda embedding. 8. Higher-order denotational semantics This section gives denotational semantics for the higher-order language, without using Assumption 7.1. We are to interpret the new constructs T(A), thunk, and force. We will interpret probabilistic judgements as Kleisli morphisms JΓK → T (JAK) for a certain def monad T , and set JT(A)K = T (JAK), so thunk and force embody the correspondence of maps JΓK → T (JAK) and JΓK → JT(A)K. On which category can the monad T live? Interpreting λabstraction and application needs a natural ‘currying’ bijection between morphisms JΓK × R → R and morphisms JΓK → JR ⇒ RK. But measurable functions cannot do this: it is known that no measurable space JR ⇒ RK can support such a bijection [3]. We resolve the problem of function spaces by embedding the category of measurable spaces in a larger one, where currying is possible, and that still has the structure to interpret the first order language as before. As the larger category we will take a category of functors Measop → Set from a category Meas of measurable spaces and measurable functions to the category Set of sets and functions. This idea arises from two traditions. First, we can think of a variable of type R as a read-only memory cell, as in the operational semantics, and functor categories have long been used to model local memory (e.g. [24]). Second, the standard construction for building a Cartesian closed category out of a distributive one is based on functor categories (e.g. [30]). For a simple example, consider the category CSet of countable sets and functions. It has countable sums and finite products, but is not Cartesian closed. Because every countable set is a countable sum of singletons, the category CSet is equivalent to Set. Our semantics for the higher-order language will take place in the category Meas. Note that products in Meas are pointwise, e.g. (F × G)(X) = F (X) × G(X) for all F, G ∈ Meas and all X ∈ Meas, but sums are not pointwise, e.g. (1 + 1) ∈ Meas is the functor that assigns a measurable space X to the set of its measurable subsets. This is essential for y to preserve sums. Distribution types We have to interpret distribution types P(A) in our functor category Meas. How can we interpret a probability distribution on the type R ⇒ R? We can answer this pragmatically, without putting σ-algebra structure on the set of all functions. If JR ⇒ RK were a measurable space, a random variable valued in JR ⇒ RK would be given by a measurable space (X, ΣX ), a probability distribution on it, and a measurable function X → JR ⇒ RK. Despite there being no such measurable space JR ⇒ RK, we can speak of uncurried measurable functions X ×R → R. Thus we might define a probability distribution on JR ⇒ RK to be a triple  (X, ΣX ), f : X × R → R, p : ΣX → [0, 1] Other models of higher-order programs Semantics of higherorder languages with discrete probability are understood well. For terminating programs, there are set-theoretic models based on a distributions monad, and for full recursion one can use probabilistic powerdomains [15] or coherence spaces [10]. It is also plausible one could model continuous distributions in domain theory, since it supports computable real analysis (e.g. [9]); this could be interesting because computability is subtle for probabilistic programming (e.g. [1]). Nonetheless, we contend it is often helpful to abstract away computability issues when studying probabilistic programming languages, to have access to standard theorems of probability theory to justify program transformations. of a measurable space (X, ΣX ) of ‘codes’, a measurable function f where we think of f (x, r) as ‘the function coded x evaluated at r’, and a probability distribution p on the codes. These triples should be considered modulo renaming the codes. This is exactly the notion of probability distribution that arises in our functor category. Lemma 8.2. For a small category C with countable sums: • any functor F : C → C extends to a functor F : C → C satisfying F ◦ y ∼ = y ◦ F , given by X  G(a) × C b, F (a) / ∼ F (G)(b) = a 8 2016/5/5 where the equivalence relation ∼ is the least one satisfying (a′ , x, F g ◦ f ) ∼ (a, Gg(x), f ); • similarly, any functor F : C × C → C in two arguments extends to a functor F : C×C → C, with F ◦(y×y) ∼ = y◦F : P  G(a) × H(b) × C c, F (a, b) F (G, H)(c) = /∼ a,b A subtle point is that configuration spaces (6) involve uncountable sums: the set of terms of a given type is uncountable, but y only preserves countable sums. This is not really a problem because only countably many terms are reachable from a given program. Definition 8.4. For a type A, the binary reachability relation ∗d on {(Γ, t) | Γ ⊢d t : A ∧ Γ canonical} is the least reflexive and transitive relation with (Γ, t) ∗d (Γ′ , u) if hΓ, t, γi −→ hΓ′ , u, γ ′ i for γ ∈ JΓK, γ ′ ∈ JΓ′ K. Similarly, ∗p is the least reflexive and transitive relation on {(Γ, t) | Γ ⊢p t : A∧ Γ canonical} with (Γ, t) ∗p (Γ′ , u) if Pr hΓ, t, γi −→ (Γ′ , u) 6= 0 for γ ∈ JΓK. → G between functors F, G : C → C lifts to a natural transformation α : F → G, and similarly for functors C × C → C; • and this is functorial, i.e. G ◦ F ∼ = G ◦ F and β ◦ α = β ◦ α. • any natural transformation α : F Proposition 8.5. Let z ∈ {d, p}. For any closed term ⊢z t : A, the set of reachable terms {(Γ, u) | (∅, t) ∗z (Γ, u)} is countable. Proof. F (G) is the left Kan extension of G along F , see e.g. [16]. Direct calculation shows F (G) preserves products if G does. Proof. One-step reachability is countable by induction on terms. Since all programs terminate by Proposition 7.2, the reachable terms form a countably branching well-founded tree. Thus the commutative monads P and T = P (R≥0 × (−)) on Meas lift to commutative monads P and T ∼ = P (yR≥0 × (−)) on Meas. The latter monad captures the informal importancesampling semantics advocated by the designers of Anglican [37]. We may thus restrict to the configurations built from a countable set U of terms that is closed under subterms and reachability. Extend the denotational semantics in Meas to configurations by defining sd : y(Cond (A)) → LAM, sp : y(Conp (A)) → T LAM, and sV p : y(ConVp (A)) → T LAM; use the isomorphisms X LΓM y(Conz (A)) ∼ = 8.2 Conservativity We interpret the types of the higher order language as objects in Meas using its categorical structure. P def P def def L i∈I Ai M = i∈I LAi M LRM = yR LP(A)M = P (LAM) def LA × BM = LAM × LBM def LA ⇒ BM = LAM ⇒ LBM def (Γ⊢z t:A)∈U def LT(A)M = T (LAM) L1M = 1 to define sd , sp , sV p by copairing the interpretation morphisms LΓ ⊢d t : AM : LΓM → LAM and LΓ ⊢p u : AM : LΓM → T (LAM). We extend this interpretation to contexts. def Lx1 : A1 , . . . , xn : An M = Proposition 8.6 (Soundness). The following diagrams commute. Qn i=1 LAi M y(ConNd (A)) Deterministic terms Γ ⊢d t : A are interpreted as natural transformations LΓM → LAM in Meas, and probabilistic terms Γ ⊢p t : A as natural transformations LΓM → T LAM, by induction on the structure of terms as in Section 4. Application and λ-abstraction are interpreted as usual in Cartesian closed categories [28]. Thunk and force are trivial from the perspective of the denotational semantics, because LTAM = T LAM. To interpret norm(t), use Lemma 8.2 to extend the normalization functions T (X) → R≥0 × P (X) + 1 + 1 between measurable spaces (3) to natural transformations T (F ) → y(R≥0 ) × P (F ) + 1 + 1. Note that all measurable types A have a natural isomorphism LAM ∼ = yJAK. This interpretation conserves the first-order semantics of Section 4: y(reduction)  y(Cond (A)) ❱❱s❱d❱+ 3 LAM ❤❤❤s❤❤ y(ConNp (A)) y(reduction) d  T (Conp (A)) ❱❱s❱p❱+ 3 T LAM ❤❤❤❤ µ·T (sp ) Adequacy It follows that the higher denotational semantics remains adequate, in the sense that for all probabilistic terms ⊢p t : A,  LtM1 (∗) = (T (sV p ))1 Pr(h∅, t, ∗i ⇓ (−)) . Adequacy is usually only stated at first-order types. At first-order types A the function sV p does very little, since global elements of LAM correspond bijectively with value configurations modulo weakening, contraction and exchange in the context. At higher types, the corollary still holds, but sV p is not so trivial because we do not reduce under thunk or λ. (See also [29].) Proposition 8.3. For z ∈ {d, p}, and first-order Γ and A: 9. Continuous densities • for first-order Γ ⊢z t, u : A, JtK = JuK if and only if LtM = LuM; • every term Γ ⊢z t : A has LtM = LuM for a first-order Γ ⊢z u : A. In most examples, the argument t to score(t) is a density function for a probability distribution. When scores are based on density functions, this makes the relationship between score and sample tighter than we have expressed so far. Our language easily extends to accommodate such distributions. We just add a collection density types to the syntax. Proof. We treat z = d; the other case is similar. By induction on the structure of terms, LtM = yJtK : LΓM → LAM. The first point follows from faithfulness of y; the second from fullness and (2). One interesting corollary is that the interpretation of a term of first-order type is always a measurable function, even if the term involves thunking, λ-abstraction and application. This corollary gives a partial answer to a question by Park et. al. on the measurability of all λ-definable ground-type terms in probabilistic programs [26] (partial because our language does not include recursion). D ::= R | bool | N | 1 | D × D A ::= · · · | D(D) The D in this grammar denotes a measurable space that: (i) carries a separable metrisable topology that generates the σ-algebra; and that (ii) comes with a chosen σ-finite measure µD . An example is R with its usual Euclidean topology and the Lebesgue measure (which maps each interval to its size). The type D(D) denotes a measurable R space JD(D)K of continuous functions f : JDK → R≥0 with X f dµD = 1. The σ-algebra of JD(D)K is the least one making {f | f (x) ≤ r} measurable for all (x, r) ∈ JDK × R≥0 . 8.3 Soundness The same recipe as in Section 5.3 will show that the higher-order denotational semantics is sound and adequate with respect to the higher-order operational semantics. This needs Assumption 7.1. 9 2016/5/5 A density type D(D) comes with two measurable functions ev : JD(D)K × JDK → R≥0 dist : JD(D)K → JP(D)K [7] E.-E. Doberkat. Stochastic Relations: Foundations for Markov Transition Systems. Chapman & Hall, 2007. [8] A. Doucet, N. de Freitas, and N. Gordon. Sequential Monte Carlo Methods in Practice. Springer, 2001. [9] A. Edalat and M. H. Escardó. Integration in Real PCF. Inf. Comput. , 160:128–166, 2000. [10] T. Ehrhard, C. Tasson, and M. Pagani. Probabilistic coherence spaces are fully abstract for probabilistic PCF. In POPL, 2014. [11] C. E. Freer and D. M. Roy. Computable de Finetti measures. Ann. Pure Appl. Logic, 163(5):530–546, 2012. [12] M. Giry. A categorical approach to probability theory. Categorical Aspects of Topology and Analysis, 915:68–85, 1982. [13] N. Goodman, V. Mansinghka, D. M. Roy, K. Bonawitz, and J. B. Tenenbaum. Church: a language for generative models. In UAI, 2008. [14] C. Hur, A. V. Nori, S. K. Rajamani, and S. Samuel. A provably correct sampler for probabilistic programs. In FSTTCS, 2015. [15] C. Jones and G. D. Plotkin. A probabilistic powerdomain of evaluations. In LiCS, 1989. [16] G. M. Kelly. Basic concepts of enriched category theory. CUP, 1982. [17] A. Kock. Monads on symmetric monoidal closed categories. Archiv der Mathematik, XXI:1–10, 1970. [18] D. Kozen. Semantics of probablistic programs. Journal of Computer and System Sciences, 22:328–350, 1981. [19] P. B. Levy. Call-by-push-value: A subsuming paradigm. In TLCA’02. [20] P. B. Levy, J. Power, and H. Thielecke. Modelling environments in call-by-value programming languages. Inf. Comput., 185(2), 2003. [21] V. K. Mansinghka, D. Selsam, and Y. N. Perov. Venture: a higher-order probabilistic programming platform with programmable inference. 2014. URL http://arxiv.org/abs/1404.0099. [22] T. Minka, J. Winn, J. Guiver, and D. Knowles. Infer.NET 2.4, Microsoft Research Cambridge, 2010. [23] E. Moggi. Notions of computation and monads. Inf. Comput., 93(1): 55–92, 1991. [24] F. J. Oles. Type algebras, functor categories and block structure. In Algebraic methods in semantics. CUP, 1984. [25] B. Paige and F. Wood. A compilation target for probabilistic programming languages. In ICML, 2014. [26] S. Park, F. Pfenning, and S. Thrun. A probabilistic language based on sampling functions. ACM TOPLAS, 31(1):171–182, 2008. [27] A. Patil, D. Huard, and C. J. Fonnesbeck. PyMC: Bayesian stochastic modelling in Python. Journal of Statistical Software, 35, 2010. [28] A. M. Pitts. Categorical logic. In Handbook of Logic in Computer Science, volume 5. OUP, 2000. [29] G. D. Plotkin and J. Power. Adequacy for algebraic effects. In FOSSACS, 2001. [30] J. Power. Generic models for computational effects. TCS, 364(2): 254–269, 2006. [31] N. Ramsey and A. Pfeffer. Stochastic lambda calculus and monads of probability distributions. In POPL, 2002. [32] D. M. Roy, V. Mansinghka, N. Goodman, and J. Tenenbaum. A stochastic programming perspective on nonparametric Bayes. In ICML Workshop on Nonparametric Bayesian, 2008. [33] Adam Scibior, Zoubin Ghahramani, Andrew D. Gordon: Practical probabilistic programming with monads. Haskell 2015. [34] C.-C. Shan and N. Ramsey. Symbolic Bayesian inference by lazy partial evaluation, 2016. [35] S. M. Srivastava. A course on Borel sets. Springer, 1998. [36] Stan Development Team. Stan: A C++ library for probability and sampling, version 2.5.0, 2014. URL http://mc-stan.org/. [37] F. Wood, J. W. van de Meent, and V. Mansinghka. A new approach to probabilistic programming inference. In AISTATS, 2014. [38] H. Yang. Program transformation for probabilistic programs, 2015. Presentation at DALI. ev (f, x) = f (x) Z dist (f )(U ) = f dµD U Note that measurability of ev relies on continuity of the densities [3]. The usual way of imposing a soft constraint based on a likelihood can be encoded in our first-order language as score(ev (f, x)), where the datum x is observed with a probability distribution with density f . Thus the categorical machinery used to interpret higher-order functions is not needed for such soft constraints. There is a limit to this use of continuity: probability measures produced by norm(t) need not have continuous density. For example, norm(return(42.0)) produces a discontinuous Dirac measure. Probability densities are often used by importance samplers. The importance sampler generates samples of f ∈ JD(R)K by first sampling from a proposal distribution g where sampling is easy, and then normalizing those samples x from g according to their importance weight f (x)/g(x). This works provided the support of g is R, e.g. g = density gauss(x, (0.0, 1.0)). Jnorm(sample(dist (f )))K = r z norm(let x = sample(dist(g)) in score( ev(f,x) ); return(x)) ev(g,x) Density types can be incorporated into the higher order language straightforwardly. The only subtlety is that denotational semantics now needs the base category to contain JD(D)K. 10. Conclusion and future work We have defined a metalanguage for higher-order probabilistic programs with continuous distributions and soft constraints, and presented operational and denotational semantics, together with useful program equations justified by the semantics. One interesting next step is to use these tools to study other old or new language features and concepts (such as recursion, function memoisation [32], measure-zero conditioning [5], disintegration [2, 34], and exchangeability [11, 21, 37]) that have been experimented with in the context of probabilistic programming. Another future direction is to formulate and prove the correctness of inference algorithms, especially those based on Monte Carlo simulation, following [14]. Acknowledgments We thank T. Avery, I. Garnier, T. Le, K. Sturtz, and A. Westerbaan. This work was suppoted by the EPSRC, a Royal Society University Fellowship, An Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIP, No. R0190-15-2011), DARPA PPAML, and the ERC grant ‘causality and symmetry — the next-generation semantics’. References [1] N. L. Ackerman, C. E. Freer, and D. M. Roy. Noncomputable conditional distributions. In LiCS, 2011. [2] N. L. Ackerman, C. E. Freer, and D. M. Roy. On computability and disintegration, 2015. URL http://arxiv.org/abs/1509.02992. [3] R. J. Aumann. Borel structures for function spaces. Illinois Journal of Mathematics, 5:614–630, 1961. [4] S. K. Berberian. Borel spaces. World Scientific, 1988. [5] J. Borgström, A. D. Gordon, M. Greenberg, J. Margetson, and J. van Gael. Measure transformer semantics for Bayesian machine learning. LMCS, 9(3):11, 2013. [6] J. Borgström, U. Dal Lago, A. D. Gordon, M. Szymczak. A lambda-calculus foundation for universal probabilistic programming. arxiv:1512.08990. 2015. 10 2016/5/5
6cs.PL
arXiv:1602.04484v5 [cs.LG] 19 Apr 2017 Surprising properties of dropout in deep networks David P. Helmbold Department of Computer Science University of California, Santa Cruz Santa Cruz, CA 95064, USA [email protected] Philip M. Long Google [email protected] April 21, 2017 Abstract We analyze dropout in deep networks with rectified linear units and the quadratic loss. Our results expose surprising differences between the behavior of dropout and more traditional regularizers like weight decay. For example, on some simple data sets dropout training produces negative weights even though the output is the sum of the inputs. This provides a counterpoint to the suggestion that dropout discourages co-adaptation of weights. We also show that the dropout penalty can grow exponentially in the depth of the network while the weight-decay penalty remains essentially linear, and that dropout is insensitive to various re-scalings of the input features, outputs, and network weights. This last insensitivity implies that there are no isolated local minima of the dropout training criterion. Our work uncovers new properties of dropout, extends our understanding of why dropout succeeds, and lays the foundation for further progress. 1 Introduction The 2012 ImageNet Large Scale Visual Recognition challenge was won by the University of Toronto team by a surprisingly large margin. In an invited talk at NIPS, Hinton [15] credited the dropout training technique for much of their success. Dropout training is a variant of stochastic gradient descent (SGD) where, as each example is processed, the network is temporarily perturbed by randomly “dropping out” nodes of the network. The gradient calculation and weight updates are performed on the reduced network, and the dropped out nodes are then restored before the next SGD iteration. Since the ImageNet competition, dropout has been successfully applied to a variety of domains [8, 10, 9, 17, 7], and is widely used [21, 13, 23]; for example, it is incorporated into popular packages such at Torch [25], Caffe [6] and TensorFlow [24]. It is intriguing that crippling the network during training often leads to such dramatically improved results, and dropout has also sparked substantial research on related methods (e.g. [12, 29]). In this work, we examine the effect of dropout on the inductive bias of the learning algorithm. A match between dropout’s inductive bias and some important applications could explain the success of dropout, and its popularity also motivates the study of its unusual properties. Weight decay training optimizes the empirical error plus an L2 regularization term, λ2 ||w||22 , so we call λ 2 2 ||w||2 the L2 penalty of w since it is the difference between training criterion evaluated at w and the empirical loss of w. By analogy, we define the dropout penalty of w to be the difference between the dropout training criterion and the empirical loss of w (see Section 2). Dropout penalties measure how much dropout discriminates against weight vectors, so they are key to understanding dropout’s inductive bias. Even in one-layer networks, conclusions drawn from (typically quadratic) approximations of the dropout penalty can be misleading [14]. Therefore we focus on exact formal analysis of dropout in multi-layer 1 networks. Theoretical analysis of deep networks is notoriously difficult, so we might expect that a thorough understanding of dropout in deep networks must be achieved in stages. In this paper we further the process by exposing some of the surprising ways that the inductive bias of dropout differs from L2 and other standard regularizers. These include the following: • We show that dropout training can lead to negative weights even when the output is a positive multiple of the the inputs. Arguably, such use of negative weights constitutes co-adaptation – this adds a counterpoint to previous analyses showing that dropout discourages co-adaptation [22, 14]. • Unlike weight decay and other p-norm regularizers, dropout training is insensitive to the rescaling of input features, and largely insensitive to rescaling of the outputs; this may play a role in dropout’s practical success. Dropout is also unaffected if the weights in one layer are scaled up by a constant c, and the weights of another layer are scaled down by c; this implies that dropout training does not have isolated local minima. • The dropout penalty grows exponentially in the depth of the network in cases where the L2 regularizer grows linearly. This may enable dropout to penalize the complexity of the network in a way that more meaningfully reflects the richness of the network’s behaviors. (The exponential growth with d of the dropout penalty is reminiscent of some regularizers for deep networks studied by Neyshabur, et al [20].) • Dropout in deep networks has a variety of other behaviors different from standard regularizers. In particular: the dropout penalty for a set of weights can be negative; the dropout penalty of a set of weights depends on both the training instances and the labels; and although the dropout probability intuitively measures the strength of dropout regularization, the dropout penalties are often non-monotonic in the dropout probability. In contrast, Wager, et al [28] show that when dropout is applied to generalized linear models, the dropout penalty is always non-negative and does not depend on the labels. Our analysis is for multilayer neural networks with the square loss at the output node. The hidden layers use the popular rectified linear units [19] outputting σ(a) = max(0, a) where a is the node’s activation (the weighted sum of its inputs). We study the minimizers of a criterion that may be viewed as the objective function when using dropout. This abstracts away sampling and optimization issues to focus on the inductive bias, as in [5, 30, 4, 18, 14]. See Section 2 for a complete explanation. Related work A number of possible explanations have been suggested for dropout’s success. Hinton, et al [16] suggest that dropout controls network complexity by restricting the ability to co-adapt weights and illustrate how it appears to learn simpler functions at the second layer. Others [3, 1] view dropout as an ensemble method combining the different network topologies resulting from the random deletion of nodes. Wager, et al [27] observe that in 1-layer networks dropout essentially forces learning on a more challenging distribution akin to ‘altitude training’ of athletes. Most formal analysis of the inductive bias of dropout has concentrated on the single-layer setting, where a single neuron combines the (potentially dropped-out) inputs. Wager, et al [28] considered the case that the distribution of label y given feature vector x is a member of the exponential family, and the log-loss is used to evaluate models. They pointed out that, in this situation, the criterion optimized by dropout can be decomposed into the original loss and a term that does not depend on the labels. They then gave approximations to this dropout regularizer and discussed its relationship with other regularizers. As we have seen, many aspects of the behavior of dropout and its relationship to other regularizers are qualitatively different when there are hidden units. Wager, et al [27] considered dropout for learning topics modeled by a Poisson generative process. They exploited the conditional independence assumptions of the generative process to show that the excess risk of dropout training due to training set variation has a term that decays more rapidly than the straightforward empirical risk minimization, but also has a second additive term related to document length. They also discussed situations where the model learned by dropout has small bias. 2 Baldi and Sadowski [2] analyzed dropout in linear networks, and showed how dropout can be approximated by normalized geometric means of subnetworks in the nonlinear case. Gal and Ghahramani [11] described an interpretation of dropout as an approximation to a deep Gaussian process. The impact of dropout (and its relative dropconnect) on generalization (roughly, how much dropout restricts the search space of the learner) was studied in [29]. In the on-line learning with experts setting, Van Erven, et al [26] showed that applying dropout in on-line trials leads to algorithms that automatically adapt to the input sequence without requiring doubling or other parameter-tuning techniques. The rest of the paper is organized as follows. Section 2 introduces our notation and formally defines the dropout model. We prove that dropout enjoys several scaling invariances that weight-decay doesn’t in Section 3, and that dropout requires negative weights even in very simple situations in Section 4. Section 5 uncovers various properties of the dropout penalty function. Section 6 describes some simulation experiments. We provide some concluding remarks in Section 7. 2 Preliminaries Throughout, we will analyze fully connected layered networks with K inputs, one output, d layers (counting the output, but not the inputs), and n nodes in each hidden layer. We assume that n is a positive multiple of K and that K is an even perfect square and a power of two to avoid unilluminating floor/ceiling clutter in the analysis. We will call this the standard architecture. We use W to denote a particular setting of the weights and biases in the network and W(x) to denote the network’s output on input x using W. The hidden nodes are ReLUs, and the output node is linear. W can be decomposed as (W1 , b1 , ..., Wd−1 , bd−1 , w, b), where each Wj is the matrix of weights on connections from the j − 1st into the jth hidden layer, each bj is the vector of bias inputs into the jth hidden layer, w are the weights into the output node, and b is the bias into the output node. We will refer to a joint probability distribution over examples (x, y) as an example distribution. We focus on square loss, so the loss of W on example (x, y) is (W(x) − y)2 . The risk is the expected loss with respect  def to an example distribution P , we denote the risk of W as RP (W) = E(x,y)∼P (W(x) − y)2 . The subscript will often be omitted when P is clear from the context. The goal of L2 training is to find weights and biases minimizing the L2 criterion with regularization def strength λ: J2 (W) = R(W) + λ2 ||W||2 . Here and throughout, we use ||W||2 to denote the sum of the squares of the weights of W. (As usual, the biases are not penalized.) We use WL2 to denote a minimizer of this criterion. The L2 penalty, λ2 ||W||2 , is non-negative. This is useful, for example, to bound the risk of a minimizer WL2 of J2 , since R(W) ≤ J2 (W). Dropout training independently removes nodes in the network. In our analysis each non-output node is dropped out with the same probability q, so p = 1 − q is the probability that a node is kept. (The output node is always kept; dropping it out has the effect of cancelling the training iteration.) When a node is dropped out, the node’s output is set to 0. To compensate for this reduction, the values of the kept nodes are multiplied by 1/p. With this compensation, the dropout can be viewed as injecting zero-mean additive noise at each non-output node [28]. 1 The dropout process is the collection of random choices, for each node in the network, of whether the node is kept or dropped out. A realization of the dropout process is a dropout pattern, which is a boolean vector indicating the kept nodes. For a network W, an input x, and dropout pattern R, let D(W, x, R) be the output of W when nodes are dropped out or not following R (including the 1/p rescaling of kept nodes’ outputs). The goal of dropout training on an example distribution P is to find weights and biases minimizing the dropout criterion for a given dropout probability:  def JD (W) = ER E(x,y)∼P (D(W, x, R) − y)2 . 1 Some authors use a similar adjustment where the weights are scaled down at prediction time instead of inflating the kept nodes’ outputs at training time. 3 output 1 1 1 1 1 1 1 -1 x1 x2 Figure 1: A network where the dropout penalty is negative. This criterion is equivalent to the expected risk of the dropout-modified network, and we use WD to denote a minimizer of it. Since the selection of dropout pattern and example from P are independent, the order of the two expectations can be swapped, yielding  (1) JD (W) = E(x,y)∼P ER (D(W, x, R) − y)2 . Equation (1) is a key property of the dropout criterion. It indicates when something is true about the dropout criterion for a family of distributions concentrated on single examples, then (usually) the same thing will be true for any mixture of these single-example distributions. Consider now the example network in Figure 1. The weight parameters W1 and w are all-1’s, and all of the biases are 0. W(1, −1) = 0 as each hidden node computes 0. Each dropout pattern indicates the subset of the four lower nodes to be kept, and when q = p = 1/2 each subset is equally likely to be kept. If R is the dropout pattern where input x2 is dropped and the other nodes are kept, then the network computes D(W, (1, −1), R) = 8 (recall that when p = 1/2 the values of non-dropped out nodes are doubled). Only three dropout patterns produce a non-zero output, so if P is concentrated on the example x = (1, −1), y = 8 the dropout criterion is: 2 13 1 (8 − 8)2 + (4 − 8)2 + (0 − 8)2 = 54. (2) 16 16 16 As mentioned in the introduction, the dropout penalty of a weight vector for a given example distribution and dropout probability is the amount that the dropout criterion exceeds the risk, JD (W) − R(W). Wager, et al [28] show that for 1-layer generalized linear models, the dropout penalty is non-negative. Since W(1, −1) = 0, we have R(W) = 64, and the dropout penalty is negative in our example. This is because the variance in the output due to dropout causes the network to better fit the data (on average) than the network’s non-dropout evaluation. In Section 5.2, we give a necessary condition for this variance to be beneficial. As with the dropout criterion, the dropout penalty decomposes into an expectation of penalties over single examples:   JD (W) − R(W) = E(x,y)∼P ER (D(W, x, R) − y)2 − (W(x) − y)2 . JD (W) = Definition 1 Define P(x,y) as the distribution with half of its weight on example (x, y) and half of its weight on example (0, 0). Unless indicated otherwise, we assume p = q = 1/2 for simplicity, although this is not crucial for our results. 3 3.1 Scaling inputs, weights and outputs Dropout is scale-free Here we prove that dropout regularizes deep networks in a manner that is independent of the scale of the input features. In other words, training under dropout regularization does not penalize the use of large 4 weights when needed to compensate for small input values. Definition 2 For any example distribution P , define the dropout aversion with P to be the maximum, over minimizers WD of the dropout risk JD (WD ), of RP (WD ) − inf W RP (W). The dropout aversion of P measures the extent to which P is incompatible with the inductive bias of dropout, measured by the risk gap between the true risk minimizer and the optimizers of the dropout criterion. Definition 3 For example distribution P and square matrix A, denote by A ◦ P the distribution obtained by sampling (x, y) from P , and outputting (Ax, y). When A is diagonal and has full rank, then A ◦ P is a rescaling of the inputs, like changing one input from minutes to seconds and another from feet to meters. Theorem 4 For any example distribution P , and any diagonal full-rank K × K matrix A, the dropout aversion of P equals the dropout aversion of A ◦ P . Proof: Choose a network W = (W1 , b1 , ..., Wd−1 , bd−1 , w, b). Let W ′ = (W1 A−1 , b1 ..., Wd−1 , bd−1 , w, b). For any x, W(x) = W ′ (Ax), as A−1 undoes the effect of A before it gets to the rest of the network, which is unchanged. Furthermore, for any dropout pattern R, we have D(W, x, R) = D(W ′ , Ax, R). Once again A−1 undoes the effects of A on kept nodes (since A is diagonal), and the rest of the network W ′ is modified by R an a manner paralleling W. Thus, there is bijection between networks W and networks W ′ with JD (W ′ ) = JD (W) and R(W ′ ) = R(W), yielding the theorem. Theorem 4 indicates that some common normalizations of the input features (e.g. to have unit variance) do not affect the quality of the dropout criterion minimizers, but normalization might change the speed of convergence and which minimizer is reached. Centering the features has slightly different properties. Although it is easy to use the biases to define a W ′ that “undoes” the centering in the non-dropout computation, different W ′ appear to be required for different dropout patterns, breaking the bijection exploited in Theorem 4. As we will see in Section 3.4, weight decay does not enjoy such scale-free status. 3.2 Dropout’s invariance to parameter scaling Next, we describe an equivalence relation among parameterizations for dropout networks of depth d ≥ 2. Basically, scaling the parameters at a level creates a corresponding scaling of the output. (A similar observation was made in a somewhat different context by Neyshabur, et al [20].) Theorem 5 For any input x, dropout pattern R, any network W = (W1 , b1 , ..., Wd−1 , bd−1 , w, b), and any positive c1 , ..., cd , if       d−1 d Y Y W ′ = c1 W1 , c1 b1 , c2 W2 , c1 c2 b2 , ..., cd−1 Wd−1 ,  cj  bd−1 , cd w,  cj  b  , (3) j=1 then D(W ′ , x, R) = Q d j=1 cj ′  D(W, x, R). In particular, if Qd j=1 cj j=1 = 1, then for any example distribution P , networks W and W have the same dropout criterion, dropout penalty, and expected loss. Note that the re-scaling of the biases at layer j depends not only on the rescaling of the connection weights at layer j, but also the re-scalings at lower layers. Proof: Choose an input x and a dropout pattern R. Define W ′ as in (3). For each hidden layer j, let (hj1 , ..., hjn ) be the jth hidden layer when applying W to x with QR, and let (h̃j1 , ..., h̃jn ) be the jth ′ hidden layer when applying W instead. By induction, for all i, h̃ji = ℓ≤j cℓ hji ; the key step is that the 5 pre-rectified value used to compute h̃ji has the same sign as for hji , since Q rescaling by cj preserves Qthe sign. Thus the same units are zeroed out in W and W ′ and D(W, x, R) = ( j cj )D(W ′ , x, R). When j cj = 1, this implies D(W, x, R) = D(W ′ , x, R). Since this is true for all x and R, we have JD (W) = JD (W ′ ). Since, similarly, W(x) = W ′ (x) for all x, so R(W) = R(W ′ ), the dropout penalities for W and W ′ are also the same. Theorem 5 implies that the dropout criterion never has isolated minimizers, since one can continuously up-scale the weights on one layer with a compensating down-scaling at another layer to get a contiguous family of networks computing the same function and having the same dropout criterion. It may be possible to exploit the parameterization equivalence of Theorem 5 in training by using canonical forms for the equivalent networks or switching to an equivalent networks whose gradients have better properties. We leave this question for future work. 3.3 Output scaling with dropout Scaling the output values of an example distribution P does affect the aversion, but in a very simple and natural way. Theorem 6 For any example distribution P , if P ′ is obtained from P by scaling the outputs of P by a positive constant c, the dropout aversion of P ′ is c2 times the dropout aversion of P . Proof: If a network W minimizes the dropout criterion for P , then the network W ′ obtained by scaling up the weights and bias for the output unit by c minimizes the dropout criterion for P ′ , and for any x, y, and dropout pattern R, (D(W, x, R) − y)2 = (D(W ′ , x, R) − cy)2 /c2 . 3.4 Scaling properties of weight decay Weight decay does not have the same scaling properties as dropout. Define the weight-decay aversion analogously to the dropout aversion. We analyze the L2 criterion for depth-2 networks in Appendix B, resulting in the following theorem. Our proof shows that, despite the non-convexity of the L2 criterion, it is still possible to identify a closed form for one of its optimizers. Theorem 7 Choose an arbitrary number n of hidden nodes, and λ > 0. λ2 ). The weight-decay aversion of P(x,1) is min( 41 , x·x Theorem 7 shows that, unlike dropout, the weight decay aversion does depend on the scaling of the input features. √ Furthermore, when 2λ > x · x, the weight-decay criterion for P(x,1) has only a single isolated optimum weight setting2 – all weights set to zero and bias 1/2 at the output node. This means that weight-decay in 2-layer networks can completely regularize away significant signal in the sample even when λ is finite, contrasting starkly with weight-decay’s behavior in 1-layer networks. The “vertical” flexibility to rescale weights between layers enjoyed by dropout (Theorem 5) does not hold for L2 : one can always drive the L2 penalty to infinity by scaling one layer up by a large enough positive c, even while scaling another down by c. On the other hand, the proof of Theorem 7 shows that the L2 criterion has an alternative “horizontal” flexibility involving the rescaling of weights across nodes on the hidden layer (under the theorem’s assumptions). Lemma 32 shows that at the optimizers each hidden node’s contributions to the output are a constant (depending on the input) times their contribution to the the L2 penalty. Shifting the magnitudes of these contributions between hidden nodes leads to alternative weights 2 Since the output node puts weight 0 on each hidden node and the biases are unregularized, this optimum actually represents a class of networks differing only in the irrelevant biases at the hidden nodes. One can easily construct other cases when weightdecay has isolated minima in this sense, for example when n = 2 and there is equal probability on x and −x, both with label 1. 6 that compute the same value and have the same weight decay penalty. This is a more general observation than the permutation symmetry between hidden nodes because any portion of a hidden node’s contribution can be shifted to another hidden node. 4 Negative weights for monotone functions If the weights of a unit are non-negative, then the unit computes a monotone function, in the sense that increasing any input while keeping the others fixed increases the output. The bias does not affect a node’s monotonicity. A network of monotone units is also monotone. We first present our theoretical results for many features (Section 4.1) and few features (Section 4.2), and then discuss the implication of these results in Section 4.3. 4.1 The basic case – many features In this section, we analyze the simple distribution P(1,1) that assigns probability 1/2 to the example (0, ..., 0), 0, and probability 1/2 to the example (1, ..., 1), 1. This is arguably the simplest monotone function. Nevertheless, we prove that dropout uses negative weights to fit this data. The key intuition is that optimizing the dropout criterion requires controlling the variance. Negative weights at the hidden nodes can be used to control the variance due to dropout at the input layer. When there are enough hidden nodes this becomes so beneficial that every minimizer of the dropout criterion uses such negative weights. Theorem 8 For the standard architecture, if K > 18 and n is large enough relative to K and d, every optimizer of the dropout criterion for P(1,1) uses at least one negative weight. To prove Theorem 8, we first calculate JD (Wneg ) for a network Wneg that uses negative weights, and then prove a lower bound greater than this value that holds for all networks using only non-negative weights. All of the biases in Wneg are 0. A key building block in the definition of Wneg is a block of hidden units that we call the first-one gadget. Each such block has K hidden nodes, and takes its input from the K input nodes. The ith hidden node in the block takes the value 1 if the Kth input node is 1, and all inputs xi′ for i′ < i are 0. This can be accomplished with a weight vector w with wi′ = −1 for i′ < i, with wi = 1, and with wi′ = 0 for i′ > i. The first hidden layer of Wneg comprises n/K copies of the first-one gadget. Informally, this construction removes most of the variance in the number of 1′ s in the input, as recorded in the following lemma. Lemma 9 On any input x ∈ {0, 1}n except (0, 0, ..., 0), the sum of the values on the first hidden layer of Wneg is exactly n/K. The weights into the remaining hidden layers of Wneg are all 1, and all the weights into the output def layer take a value c = K2 , 1 d−2 2nd−1 (1+ K n )(1+ n ) following lemma analyzes Wneg .  1 Lemma 10 JD (Wneg ) = 2 1 − chosen to minimize the dropout criterion for the network. The (1−2−K ) d−2 (1+ Kn )(1+ n1 )  .  d−2 1 + n1 denominator in Lemma 10 approaches 1, so When n is large relative to K and d, the 1 + K n JD (Wneg ) approaches 2−K /2 in this case. Lemma 16 below gives a larger lower bound for any network with all positive weights. In the concrete case when d = 2 and n = K 3 , then Lemma 10 implies JD (Wneg ) < 1/K 2 . Proof (of Lemma 10): Consider a computation of Wneg (1, 1, ..., 1) under dropout and let ŷ be the (random) output. Let k0 be the number of input nodes kept, and, for each j ≥ 2, let kj be the number of 7 nodes in the jth hidden layer kept. Call the node in each first-one gadget that computes 1 a key node, and if no node in the gadget computes 1 because the input is all dropped, arbitrarily make the gadget’s first hidden node the key node. This ensures there is exactly one key node per gadget, and every non-key node computes 0. Let k1 be the number kept key nodes on the first hidden layer. If k0 = 0, the output ŷ of the Qof d−1 network is 0. Otherwise, ŷ = c2d j=1 kj . Note that k0 is zero with probability 2−K . Whenever k0 ≥ 1, k1 is distributed as B(n/K, 1/2). Each other kj is distributed as B(n, 1/2), and k1 , k2 , ..., kd−1 are independent of one another. E(ŷ) = Pr(k0 ≥ 1)c2d E[k1 |k0 ≥ 1] d−1 Y j=2 E[kj ] = (1 − 2−K )c2d  n   n d−2 2c = (1 − 2−K )nd−1 . 2K 2 K Using the value of the second moment of the binomial, we get  2  d−1  n  n  Y   kj   = 4c2 (1 − 2−K ) E(ŷ 2 ) = E 1k0 ≥1 c2d + 1 nd−2 (n + 1)d−2 K K j=1 =  d−2  4c2 (1 − 2−K ) 2(d−1) 1 K 1 + 1 + . n K2 n n Thus,  1 1 − 2E(ŷ) + E(ŷ 2 ) 2  d−2 !  2 −K 4c 4c (1 − 2 ) 1 1 K 1 − (1 − 2−K )nd−1 + n2(d−1) 1 + = 1+ 2 K K2 n n ! (1 − 2−K ) 1 1− =  d−2 , 2 1+ K 1+ 1 JD (Wneg ) = n since c = K d−2 1 2nd−1 (1+ K n )(1+ n ) n , completing the proof. Next we prove a lower bound on JD for networks with nonnegative weights. Let W be an arbitrary such network. Our lower bound will use a property of the function computed by W that we now define. Definition 11 A function φ : RK → R is supermodular if for all x, δ 1 , δ 2 ∈ RK where δ 1 , δ 2 ≥ 0 φ(x) + φ(x + δ 1 + δ 2 ) ≥ φ(x + δ 1 ) + φ(x + δ 2 ), or equivalently: φ(x + δ 1 + δ 2 ) − φ(x + δ 2 ) ≥ φ(x + δ 1 ) − φ(x) The latter indicates that adding δ 1 to the bigger input x + δ 2 has at least as large an effect as adding it to the smaller input x. Since W has all non-negative weights, it computes a supermodular function of its inputs. (This fact may be of independent interest.) Lemma 12 If a network has non-negative weights and its activation functions σ(·) are convex, continuous, non-decreasing, and differentiable except on a finite set, then the network computes a supermodular function of its input x. 8 Proof: We will prove by induction over the layers that, for any unit h in the network, if h(x) is the output of unit h when x is the input to W, then h(·) is a supermodular function of its input. The base case holds since each input node h outputs the corresponding component of the input, and (x + δ 1 ) − x = (x + δ 1 + δ 2 ) − (x + δ 2 ). Now, for the inductive step, let w be the weight vector for node h, let b be its bias, and σ(·) be its activation function. Let I(x), I(x + δ 1 ), I(x + δ 2 ), and I(x + δ 1 + δ 2 ) be the inputs to node h when the inputs to the network are x, x + δ 1 , x + δ 2 and x + δ 1 + δ 2 respectively. By induction, these inputs to node h (componentwise) satisfy I(x + δ 1 ) − I(x) ≤ I(x + δ 1 + δ 2 ) − I(x + δ 2 ). Therefore, since w, δ 1 , and δ 2 are non-negative, the interval [w · I(x + δ 2 ) + b, w · I(x + δ 1 + δ 2 ) + b] is at least as long and starts at least as high as the interval [w · I(x) + b, w · I(x + δ 1 ) + b]. Since σ is continuous and differentiable except on a finite set, we have Z w·I(x+δ1 )+b h(I(x + δ 1 )) − h(I(x)) = σ ′ (z)dz w·I(x)+b ≤ Z w·I(x+δ 1 +δ 2 )+b σ ′ (z)dz (since σ ′ is non-decreasing) w·I(x+δ 2 )+b = h(I(x + δ 1 + δ 2 )) − h(I(x + δ 2 )). Definition 13 Let r0 ∈ {0, 1}K be the dropout pattern concerning the input layer, and let R′ be the dropout pattern concerning the rest of the network, so that the dropout pattern R = (r0 , R′ ). For each ℓ ∈ {0, ..., K}, let ψW (ℓ) be the average output of W under dropout when ℓ of the inputs are kept: i.e.,   X r0j = ℓ . ψW (ℓ) = E D(W, 1K , (r0 , R′ )) j Lemma 14 For any ℓ ∈ {1, ..., K − 1, }, ψW (ℓ + 1) − ψW (ℓ) ≥ ψW (ℓ) − ψW (ℓ − 1). Proof: Generate u, i and j randomly by, first choosing u uniformly at random from among bit vectors with ℓ ones, then choosing i uniformly from the 0-components of u, and j uniformly from the 1-components of u. By Lemma 12, W(u + ei ) − W(u) ≥ W(u − ej + ei ) − W(u − ej ) (4) always holds. Furthermore, u + ei is uniformly distributed among bit vectors with ℓ + 1 ones, u − ej is uniformly distributed among bit vectors with ℓ − 1 ones, and u + ei − ej is uniformly distributed among bit vectors with ℓ ones. This is true for W, but it is also true for any network obtained by dropping out some of the hidden nodes of W. Thus ψW (ℓ + 1) − ψW (ℓ) = E(D(W, 1K , (r0 , R′ )| = E(D(W, r0 , (1K , R′ )| ≥ E(D(W, r0 , (1K , R′ )| = ψW (ℓ) − ψW (ℓ − 1), X j X j X j r0j = ℓ + 1)) − E(D(W, 1K , (r0 , R′ )| r0j = ℓ + 1)) − E(D(W, r0 , (1K , R′ )| r0j = ℓ)) − E(D(W, r0 , (1K , R′ )| 9 X j X r0j = ℓ)) j X r0j = ℓ)) j r0j = ℓ − 1)) (by (4)) completing the proof. We will use the following lower bound on the tail of the binomial. (Many similar lower bounds are known.) Lemma 15 If X is distributed according to Bin(n, 1/2), then √ √ Pr(X < n/2 − n/4) = Pr(X > n/2 + n/4) ≥ 1/4. √ √ Proof: Using √ the fact that, for any i, Pr(X = i) ≤ 1/ n, we get Pr(|X − n/2| < n/4) ≤ 1/2, so Pr(X < n/2 − n/4) ≥ 1/4. Now we are ready for the lower bound on JD (W). 1 Lemma 16 If K > 18 and the weights in W are non-negative, then JD (W) ≥ 36K . q 1 1 Proof: Assume to the contrary that JD (W) < 36K . First, note that ψW (0) ≤ 18K , or else the contribution 1 . Applying Lemma 15, we have to JD (W) due to the (0, 0), 0 example is at least 36K r r √ √ 2 2 ψW (K/2 − K/4) > 1 − and ψW (K/2 + K/4) < 1 + 9K 9K (5) 1 for the (1, . . . , 1), 1 example. as otherwise the contribution of one of the tails to JD (W) will be at least 36K √ We will contradict this small variation of ψW (ℓ) around K/2. The bounds on ψW (0) and ψ(K/2 − K/4) and Lemma 14 imply that ψW (ℓ) grows rapidly when ℓ is around K/2, in particular: q q 2 1 1 − 9K − 18K √ √ 1 √ ψ(K/2 − K/4 + 1) − ψ(K/2 − K/4) ≥ > p , K/2 − K/4 9/32K since K > 18. Now using Lemma 14 repeatedly shows that √ √ ψ(K/2 + K/4) − ψ(K/2 − K/4) > which contradicts (5), completing the proof. √ 1 K ×p =2 2 9/32K r 2 , 9K Putting together Lemmas 10 and 16 immediately proves Theorem 8, since for K > 18 and large enough n, the criterion for Wneg must be less than the criterion for any network with all non-negative weights. 4.2 The case when K = 2 Theorem 8 uses the assumption that K > 18 and n is large enough; is the lower bound on K really necessary? Here we show that it is not, by treating the case that K = 2. Theorem 17 For the standard architecture, if K = 2, for any fixed d and large enough n, every optimizer of the dropout criterion for P(1,1),1 uses negative weights. Proof: Define Wneg as in the proof of Lemma 10, except that the output layer has a bias of 1/5. We claim that lim JD (Wneg ) = 1/10. n→∞ To see this, consider the joint input/label distribution under dropout: Pr((0, 0), 0) = 1/2 Pr((0, 0), 1) = 1/8 Pr((2, 0), 1) = 1/8 Pr((0, 2), 1) = 1/8 Pr((2, 2), 1) = 1/8. 10 (6) Due to the bias of 1/5 on the output, Wneg (0, 0) = 1/5. Thus, contribution to JD from examples with x = (0, 0) in this joint distribution is 1/2 × (1/5)2 + 1/8 × (4/5)2 = 1/10. Now, choose x 6= (0, 0). If, after dropout, the input is x, each node in the hidden layer closest to the input computes 1. Arguing exactly as in the proof of Lemma 10, in such cases, E((ŷ − 1)2 ) = 1 − 1+ 2 n  1 1+  1 d−2 n . This proves (6). Now, let W be an arbitrary network with non-negative weights. For our distribution,   ER (D(W, (0, 0), R) − 0)2 + ER (D(W, (1, 1), R) − 1)2 JD (W) = . 2 Let V00 = E(W(0, 0)), V22 = E(W(2, 2)), V20 = E(W(2, 0)), V02 = E(W(0, 2)) where the expectations are taken with respect to the dropout patterns at the hidden nodes (with no dropout at the inputs). Since each dropout pattern over the hidden nodes defines a particular network, and Lemma 12 holds for all of them, the relationships also hold for the expectations, so V22 ≥ V20 + V02 − V0 . Using this V notation, handling the dropout at the input explicitly, and the bias-variance decomposition keeping just the bias terms we get:  (V00 − 0)2 + (V00 − 1)2 + (V22 − 1)2 + (V20 − 1)2 + (V02 − 1)2 /4 2 8JD (W) ≥ 4(V00 − 0)2 + (V00 − 1)2 + (V22 − 1)2 + (V20 − 1)2 + (V02 − 1)2 . JD (W) ≥ (7) (8) We will continue lower bounding the RHS. We can re-write V22 as V20 + V02 − V00 + ǫ where ǫ ≥ 0. This is convex and symmetric in V02 and V20 so they both take the same value at the minimizer of the RHS, so we proceed using V20 for this common minimizing value. 2 8JD (W) ≥ (2V20 − V00 + ǫ − 1)2 + 2(V20 − 1)2 + (V00 − 1)2 + 4V00 . Differentiating with respect to V20 , we see that the RHS is minimized when V20 = (2 + V00 − ǫ)/3, giving 8JD (W) ≥ (V00 − ǫ − 1)2 2 + (V00 − 1)2 + 4V00 . 3 If V00 ≥ 1, then JD ≥ 1/2 (just from the (0,0),0 example) and when V00 < 1 the RHS of the above is minimized for non-negative ǫ when ǫ = 0. Using this substitution, the minimizing value of V00 is 1/4 giving 8JD (W) ≥ 1 JD (W) ≥ 1/8. Combining this with (6) completes the proof. 11 4.3 More general distributions and implications In the previous sub-section we analyzed the distribution P over the 2-feature examples (1, 1), 1 and (0, 0), 0. However, these two examples can be embedded in a larger feature space by using any fixed vector of additional feature values, creating, for instance, a distribution over (0, 1, 0, 0, 0, 1/2, 1), 0 and (0, 1, 1, 1, 0, 1/2, 1), 1 (with the additional features underlined) The results of Section 4.2 still apply to distribution over these extended examples after defining Wneg network to have zero weight on the additional features, and noticing that any weight on the additional features in the positive-weight network W can be simulated using the biases at the hidden nodes. It is particularly interesting when the additional features all take the value 0, we call these zero-embeddings. Every network W with non-negative weights has JD (W) ≥ 1/8 on each of these zero-embeddings of P . On the other hand, a single Wneg network with n/K copies of the K-input first-one gadget has JD (Wneg ) ≈ 1/10 simultaneously for all of these zero-embeddings of P (when n >> K). Any source distribution over {0, 1}K × {0, 1} that puts probability 1/2 on the the 0, 0 example and distributes the other 1/2 probability over examples where exactly two inputs are one is a mixture of zeroembeddings of P , and thus JD (W) ≥ 1/8 while JD (Wneg ) ≈ 1/10 for this mixture and optimizing the dropout criterion requires negative weights. In our analysis the negative weights used by dropout are counterintuitive for fitting monotone behavior, but are needed to control the variance due to dropout. This suggests that dropout may be less effective when layers with sparse activation patterns are fed into wider layers, as dropout training can hijack part of the expressiveness of the wide layer to control the artificial variance due to dropout rather than fitting the underlying patterns in the data. 5 5.1 Properties of the dropout penalty Growth of the dropout penalty as a function of d Weight-decay penalizes large weights, while Theorem 5 shows that compensating rescaling of the weights does not affect the dropout penalty or criterion. On the other hand, dropout can be more sensitive to the calculation of large outputs than weight decay, and large outputs can be produced in deep networks using only small weights. We make this observation concrete by exhibiting a family of networks where the depth and desired output are linked while the size of individual weights remains constant. For this family, the dropout penalty grows exponentially in the depth d (as opposed to linearly for weight-decay), suggesting that dropout training is less willing to fit the data in this kind of situation. Theorem 18 If x = (1, 1, ..., 1) and 0 ≤ y ≤ Knd−1 , for Px,y there are weights W for the standard y2 , architecture with R(W) = 0 such that (a) every weight has magnitude at most one, but (b) JD (W) ≥ K+1 whereas (c) J2 (W) ≤ λy 2/d 2 (Kn + n2 (d − 2) + n). 1/d Proof: Let W be the network whose weights are all c = K 1/dyn(d−1)/d and biases are all 0, so that the L2 penalty is the number of weights times λc2 /2. It is a simple induction to show that, for these weights and input (1, 1, ..., 1), the value computed at each hidden node on level j is cj Knj−1 , so the the network outputs cd Knd−1 , and has zero square loss (since W(x) = cd Knd−1 = y). Consider now dropout on this network. This is equivalent to changing all of the weights from c to 2c and, independently with probability 1/2, replacing the value of each node with 0. For a fixed dropout pattern, each node on a given layer has the same weights, and receives the same (kept) inputs. Thus, the value computed at every node on the same layer is the same. For each j, let Hj be the value computed by the units in the jth hidden layer. If k0 is the number of input nodes kept under dropout, and, for each j ∈ {1, ..., d − 1}, kj is the number of Qℓ−1 hidden nodes kept in layer j, a straightforward induction shows that, for all ℓ, we have Hℓ = (2c)ℓ j=0 kj , Qd−1 so that the output ŷ of the network is (2c)d j=0 kj . 12 Using a bias-variance decomposition, E((ŷ − y)2 ) = (E[ŷ] − y)2 + Var(ŷ). Since each kj is binomially distributed, and k0 , ..., kd−1 are independent, we have E(ŷ) = (2c)d (K/2)(n/2)d−1 = cd Knd−1 = y, so E((ŷ − y)2 ) = Var(ŷ). Since E(ŷ 2 ) = (2c)2d (K(K + 1)/4)(n(n + 1)/4)d−1 = y 2 (1 + 1/K)(1 + 1/n)d−1 , we have Var(ŷ) = E(ŷ 2 ) − E(ŷ)2 = y 2 ((1 + 1/K)(1 + 1/n)d−1 − 1) ≥ y 2 /K, completing the proof. If y = exp(Θ(d)), the dropout penalty grows exponentially in d, whereas the L2 penalty grows polynomially. 5.2 A necessary condition for negative dropout penalty Section 2 contains an example where the dropout penalty is negative. The following theorem provides a necessary condition. Theorem 19 The dropout penalty can be negative. For all example distributions, a necessary condition for this in rectified linear networks is that either a weight, input, or bias is negative. Proof: [2] show that for networks of linear units (as opposed to the non-linear rectified linear units we focus on) the network’s output without dropout equals the expected output over dropout patterns, so in our notation: W(x) equals ER (D(W, x, R)). Assume for the moment that the network consists of linear units and the example distribution is concentrated on the single example (x, y). Using the bias-variance decomposition for square loss and this property of linear networks,  JD (W) = ER (D(W, x, R)−y)2 = (ER (D(W, x, R)−y)2 + VarR (D(W, x, R)) ≥ (W(x) − y)2 and the dropout penalty is again non-negative. Since the same calculations go through when averaging over multiple examples, we see that the dropout penalty is always non-negative for networks of linear nodes. When all the weights, biases and inputs in a network of rectified linear units are positive, then the rectified linear units behave as linear units, so the dropout penalty will again be non-negative. 5.3 Multi-layer dropout penalty does depend on labels In contrast with its behavior on a variety of linear models including logistic regression [28], the dropout penalty can depend on the value of the response variable in deep networks with ReLUs and the quadratic loss. Thus in a fundamental and important respect, dropout differs from traditional regularizers like weightdecay or an L1 penalty. Theorem 20 There are joint distributions P and Q, and weights W such that, for all dropout probabilities q ∈ (0, 1), (a) the marginals of P and Q on the input variables are equal, but (b) the dropout penalties of W with respect to P and Q are different. We will prove Theorem 20 by describing a general, somewhat technical, condition that implies that P and Q are witnesses to Theorem 20. For each input x and dropout pattern R, let H(W, x, R) be the values presented to the output node with dropout. As before, let w ∈ Rn be those weights of W on connections directly into the output node and let b be the bias at the output node. Let r ∈ {0, 1}n be the indicator variables for whether the various nodes connecting to the output node are kept. Proof (of Theorem 20): Suppose that P is concentrated on a single (x, y) pair. We will then get Q by modifying y. Let h be the values coming into the output node in the non-dropped out network. Therefore the output of the non-dropout network is w · h + b while the output of the network with dropout is w · H(W, x, R) + b. We now examine the dropout penalty, which is the expected dropout loss minus the non-dropout loss. We 13 will use δ as a shorthand for w · (H(W, x, R) − h).  dropout penalty = E (w · H(W, x, R) + b − y)2 − (w · h + b − y)2  = E (w · H(W, x, R) + b − w · h + w · h − y)2 − (w · h + b − y)2  = E δ 2 + 2(w · h + b − y)E(δ) which depends on the label y unless E(δ) = 0. Typically E(δ) 6= 0. To prove the theorem, consider the case where x = (1, −2) and there are two hidden nodes with weights 1 on their connections to the output node. The value at the hidden nodes without dropout is 0, but with dropout the hidden nodes never negative and computes positive values when only the negative input is dropped, so the expectation of δ is positive. 6 Experiments We did simulation experiments using Torch [25]. The code is accessible at https://www.dropbox.com/sh/6s2lcfrq17zshmp/AAAQ06uDa4gOAuAnw2MAghEMa?dl=0 6.1 Negative Weights We trained networks with the standard architecture with K = 5 inputs, depth 3, and width 50 on the training data studied in Section 4: one input with x = (0, 0, ..., 0) and y = 0, and one input with x = (1, 1, ..., 1) and y = 1. We used the nn.StochasticGradient function from Torch with a maximum of 10000 iterations, and 0.1 a learning rate of 1+0.1×t on iteration t. With the above parameters, we repeated the following experiment 1000 times. • Initialize the parameters of a network WD . • Clone this network, to produce a copy W with the same initialization. • Train WD with dropout probability 1/2 at all nodes, and train W without dropout (without using weight decay for either one). • Compare the number of negative weights neg(WD ) in WD with neg(W). Counts of the outcomes are shown in the following table. neg(WD ) > neg(W) 584 neg(WD ) < neg(W) 338 neg(WD ) = neg(W) 78 Recall that Theorem 8 shows that a global optimizer of the dropout criterion definitely uses negative weights when trained on data sources similar to P(1,1) , despite the fact that that they are consistent with a monotone function. This experiment shows that even when optimization is done in a standard way, using dropout tends to create models with more negative weights for P(1,1) , and we attribute this to the variance reduction effects associated with Theorem 8. The experiment also indicates that training with dropout sometimes produces fewer negative weights. Due to the random initialization, a hidden ReLU unit with negative weights can evaluate to 0 on both inputs, so its weights will never be updated without dropout. On the other hand, the extra variance from dropout could cause updates to these negative weights. Another way the non-dropout training could produce more negative weights is if a hidden node whose output is too large has many small weights that turn negative with a standard gradient descent step. However, with dropout only about half the small weights will be updated. Theorem 8 focusses on the effect of dropout at the global minimum, and abstracts away these kinds of initialization and optimization effects. 14 1.1 Dropout Weight Decay 1 Training error 0.9 0.8 0.7 0.6 0.5 0.4 0.6 0.8 1 1.2 1.4 1.6 Input Scale Figure 2: Training error as a function of the scale of the inputs for Dropout and Weight Decay in the experiment of Section 6.2. 6.2 Scale (in)sensitivity Our experiments regarding the sensitivity with respect to the scale of the input used the standard architecture with K = 5, d = 2, n = 5. We used stochastic gradient using the optim package for Torch, with learning 0.01 and momentum of 0.5, and a maximum of 100000 iterations. rate 1+0.00001t We performed 10 sets of training runs. In each run: • Ten training examples were generated uniformly at random from [−1, 1]K . Q • Target outputs were assigned using y = i sign(xi ). • Five training sets S1 , ..., S5 with ten examples each were obtained by rescaling the inputs by {0.5, 0.75, 1, 1.25, 1.5} and leaving the outputs unchanged. • The weights of a network Winit were initialized using the default initialization from Torch. • For each Si : – Winit was cloned three times to produce WD , W2 and Wnone with identical starting parameters. – WD was trained with dropout probability 1/2 and no weight decay. – W2 was trained with weight decay with λ = 1/2 and no dropout. – Wnone was trained without any regularization. The average training losses of WD and W2 , over the 10 runs, are shown in Figure 2. (The average training loss of Wnone was less than 0.05 at all scales.) The theoretical insensitivity of dropout to the scale of the inputs described in Theorem 4 is also seen here, along with the contrast with weight decay analyzed in Theorem 7. The scale of the inputs also affects the dynamics of stochastic gradient descent. With very small inputs, convergence is very slow, and with very large inputs, SGD is unstable. The effects of the scale of the inputs on inductive bias analyzed in this paper are visible at the scales where optimization can be done effectively. 7 Conclusions The reasons behind dropout’s surprisingly good performance in training deep networks across a variety of applications are somewhat mysterious and there is relatively little existing formal analysis. A variety of 15 explanations have been offered (e.g. [1, 2, 3, 11, 27]), including the possibility that dropout reduces the amount of coadaptation in a network’s weights [16]. The dropout criterion is an expected loss over dropout patterns, and the variance in the output values over dropout patterns contributes to this expected loss. Therefore dropout may co-adapt weights in order to reduce this (artificial) variance. We prove that this happens even in very simple situations where nothing in the training data justifies negative weights (Theorem 8). This indicates that the relationship between dropout and co-adaption is not a simple one. The effects of dropout in deep neural networks are rather complicated, and approximations can be misleading since the dropout penalty is very non-convex even in 1-layer networks [14]. In Section 3 we show that dropout does enjoy several scale-invariance properties that are not shared by weight-decay. A perhaps surprising consequence of these invariances is that there are never isolated local minima when learning a deep network with dropout. Further exploration of these scale invariance properties is warranted to see if they are a contributor to dropout’s empirical success or can be exploited to facilitate training. While contrasting dropout to weight-decay in simple situations, we found that a degenerate all-zero network results (Theorem 7) when the L2 regularization parameter is above a threshold. This is in dramatic contrast to our previous intuition from the 1-layer case. In [28], dropout was viewed as a regularization method, adding a data dependent penalty to the empirical loss of (presumably) undesirable solutions. Section 5 shows that, unlike the generalized linear models case analyzed there, the dropout penalty in deeper networks can be negative and depends on the labels in the training data, and thus behaves unlike most regularizers. On the other hand, the dropout penalty can grow exponentially in the depth of the network, and thus may better reflect the complexity of the underlying model space than L2 regularization. This paper uncovers a number of dropout’s interesting fundamental properties using formal analysis of simple cases. However, the effects of using dropout training in deep networks are subtle and complex, and we hope that this paper lays a foundation to promote further formal analysis of dropout’s properties and behavior. Acknowledgments We are very grateful to Peter Bartlett, Seshadhri Comandur, and anonymous reviewers for valuable communications. References [1] P. Bachman, O. Alsharif, and D. Precup. Learning with pseudo-ensembles. NIPS, 2014. [2] P. Baldi and P. Sadowski. The dropout learning algorithm. Artificial intelligence, 210:78–122, 2014. [3] Pierre Baldi and Peter J Sadowski. Understanding dropout. In Advances in Neural Information Processing Systems, pages 2814–2822, 2013. [4] P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. [5] L. Breiman. Some infinity theory for predictor ensembles. Annals of Statistics, 32(1):1–11, 2004. [6] Caffe, 2016. http://caffe.berkeleyvision.edu. [7] Danqi Chen and Christopher D Manning. A fast and accurate dependency parser using neural networks. In EMNLP, pages 740–750, 2014. [8] G. E. Dahl. Deep learning how I did it: Merck 1st place interview, 2012. http://blog.kaggle.com. [9] G. E. Dahl, T. N. Sainath, and G. E. Hinton. Improving deep neural networks for LVCSR using rectified linear units and dropout. ICASSP, 2013. [10] L. Deng, J. Li, J. Huang, K. Yao, D. Yu, F. Seide, M. L. Seltzer, G. Zweig, X. He, J. Williams, Y. Gong, and A. Acero. Recent advances in deep learning for speech research at microsoft. ICASSP, 2013. 16 [11] Yarin Gal and Zoubin Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. arXiv:1506.02142, 2015. [12] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron C. Courville, and Yoshua Bengio. Maxout networks. In ICML, pages 1319–1327, 2013. [13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, pages 1026–1034, 2015. [14] D. P. Helmbold and P. M. Long. On the inductive bias of dropout. JMLR, 16:3403–3454, 2015. [15] G. E. Hinton. Dropout: a simple and effective way to improve neural networks, 2012. videolectures.net. [16] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors, 2012. Arxiv, arXiv:1207.0580v1. [17] Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In ACL, pages 655–665, 2014. [18] P. M. Long and R. A. Servedio. Random classification noise defeats all convex potential boosters. Machine Learning, 78(3):287–304, 2010. [19] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, pages 807–814, 2010. [20] Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. In COLT, pages 1376–1401, 2015. [21] Jürgen Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 61:85–117, 2015. [22] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 15:1929–1958, 2014. [23] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CVPR, 2015. [24] Tensorflow, 2016. https://www.tensorflow.org. [25] Torch, 2016. http://torch.ch. [26] T. Van Erven, W. Kotłowski, and M. K. Warmuth. Follow the leader with dropout perturbations. COLT, pages 949–974, 2014. [27] S. Wager, W. Fithian, S. Wang, and P. S. Liang. Altitude training: Strong bounds for single-layer dropout. NIPS, 2014. [28] S. Wager, S. Wang, and P. Liang. Dropout training as adaptive regularization. NIPS, 2013. [29] L. Wan, M. Zeiler, S. Zhang, Y. Le Cun, and R. Fergus. Regularization of neural networks using dropconnect. In ICML, pages 1058–1066, 2013. [30] T. Zhang. Statistical behavior and consistency of classification methods based on convex risk minimization. Annals of Statistics, 32(1):56–85, 2004. 17 A Table of Notation Notation 1set (x, y) σ(·) W w, v W(x) P Px,y RP (W) q, p R r, s D(W, x, R) JD (W) J2 (W) λ WD WL2 n, d K B Meaning indicator function for “set” an example with feature vector x and label y the rectified linear unit computing max(0, ·) an arbitrary weight setting for the network specific weights, often subscripted the output value produced by weight setting W on input x an arrelbitrary source distribution over (x, y) pairs the source distribution concentrated on the single example (x, y) the risk (expected square loss) of W under source P probabilities that a node is dropped out (q) or kept (p) by the dropout process a dropout pattern, indicates the kept nodes dropout patterns on subsets of the nodes Output of dropout with network weights W, input x, and dropout pattern R the dropout criterion the L2 criterion the L2 regularization strength parameter an optimizer of the dropout criterion an optimizer of the L2 criterion the network width and depth the number of input nodes Proof of Theorem 7 Here we prove Theorem 7, showing that the weight-decay aversion depends on the values of the inputs and the number of input nodes K. Furthermore, unlike the single-layer case, the L2 regularization strength has a threshold where the minimizer of the L2 criterion degenerates to the all-zero network. We will focus on the standard architecture with depth d = 2. Recall that we are analyzing the distribution P(x,1) that assigns probability 1/2 to (x, 1) and probability 1/2 to (0, 0). Also, recall that, for P(x,1) , the weight-decay aversion is the maximum risk incurred by a minimizer of J2 . This motivates the following definition. Definition 21 An aversion witness is a minimizer of J2 that is also a maximizer of the risk R, from among minimizers of J2 . The proof of Theorem 7 involves a series of lemmas. We first show that there is a aversion witness WL2 with a special form, and then relate any hidden node’s effect on the output to the regularization penalty on the weights in and out of that node. This will allow us to treat optimizing the L2 criterion as a one-dimensional problem, whose solution yields the theorem. For some minimizer WL2 of J2 , let v∗j denote the vector of weights into hidden node j and wj∗ denote the weight from j to the output node. Let a∗j be the bias for hidden node j and let b∗ be the bias for the output node. Let hj be the function computed by hidden node j. Note that, if there is an aversion witness with a certain property, then we may assume without loss of generality that WL2 has that property. Lemma 22 We may assume without loss of generality that for each hidden node j, there is an input x̃ ∈ {0, x} such that hj (x̃) = 0. Proof: Suppose neither of hj (0) or hj (x) was 0. If wj∗ = 0, then replacing both with 0 does not affect the output of WL2 , and does not increase the penalty. If wj∗ 6= 0, then subtracting min{hj (0), hj (x)} 18 from a∗j and adding min{hj (0),hj (x)} wj∗ min{hj (0), hj (x)} = 0. to b does not affect WL2 or the penalty, but, after this transformation, Lemma 23 We may assume without loss of generality that for each hidden node j, we have |v∗j · x| = max{hj (0), hj (x)}. Proof: If hj (x) ≥ hj (0) = 0, then a∗j = 0, and hj (x) = v∗j · x. If hj (0) > hj (x) = 0. Then, a∗j > 0, and v∗j · x ≤ −a∗j . If needed, the magnitude of v∗j can be decreased to make v∗j · x = −a∗j . This decrease does not affect WL2 (x) or WL2 (0), and can only reduce the L2 penalty. Lemma 24 We may assume without loss of generality that for each hidden node j, we have hj (0) = 0. Proof: Suppose hj (0) > 0. Let z be this old value of hj (0). Then hj (x) = 0 and z = hj (0) = −v∗j · x. If we negate v∗ and set aj = 0, then Lemma 23 implies that we swap the values of hj (x) and hj (0). Then, by adding zwj∗ to b∗ and negating wj∗ , we correct for this swap at the output node and do not affect the function computed by WL2 or the penalty. Note that Lemma 24 implies that a∗1 = ... = a∗K = 0. Lemma 25 For all j, v∗j · x ≥ 0. Proof: Since a∗j = 0, if v∗j · x < 0, we could make WL2 compute the same function with a smaller penalty by replacing v∗j with 0. Lemma 25 implies that the optimal WL2 computes the linear function, WL2 (x̃) = (w∗ )T V ∗ x̃ + b∗ . (9) Later we will call (w∗ )T V ∗ x̃ the activation at the output node. Lemma 26 b∗ = 1−(w∗ )T V ∗ x . 2 Proof: Minimize J2 (wrt distribution P(x,1) ) as a function of b using Calculus. Now, we have WL2 (x̃) = 1 + (w∗ )T V ∗ (x̃ − x/2) 2 (10) which immediately implies WL2 (0) = 1 − WL2 (x). (11) Lemma 27 Each v∗j is a rescaling of x. Proof: Projecting v∗j onto the span of x does not affect hj , and cannot increase the penalty. Lemma 28 WL2 (x) ≤ 1. Proof: By (11), if WL2 (x) > 1 then WL2 (0) < 0 and the loss and the penalty would both be reduced by scaling down w∗ . Lemma 29 WL2 maximizes W(x) over those weight vectors W that have the same penalty as WL2 and compute a function of the form W(x̃) = 12 + (w)T V (x̃ − x/2) (i.e. Equation 10). 19 Proof: Let W maximize W(x) over the networks considered. If WL2 (x) < W(x) ≤ 1, then W would have the same penalty as WL2 but smaller error, contradicting the optimality of WL2 . f obtained by scaling down the weights in the output layer so that If W(x) > 1, then the network W f W(x) = 1 has a smaller penalty than WL2 and smaller error, again contradicting WL2 ’s optimality. Informally, Lemmas 28 and 29 engender a view of the learner straining against the yolk of the L2 penalty to produce a large enough output on x. This motivates us to ask how large W(x) can be, for a given value of ||W||22 (recall that Lemma 25 allows us to assume that the biases at the hidden nodes are all 0). Definition 30 For each hidden node j, let αj be the constant such v∗j = αj x, so that hj (x) = αj x · x. Recall that the activation at the output node on input x is the weighted sum of the hidden-node outputs, (w∗ )T V ∗ x. Definition 31 The contribution to the activation at the output due to hidden node j is wj∗ hj (x) = wj∗ αj x · x  and the contribution to the L2 penalty from these weights is λ2 (wj∗ )2 + α2j x · x . We now bound the contribution to the activation in terms of the contribution to the L2 penalty. Note that as the L2 “budget” increases, so does the the maximum possible contribution to the output node’s activation. Lemma 32 If B is hidden node j’s weight-decay contribution, (wj∗ )2 + α2j x · x, then hidden node k’s contriq q B , where it achieves the bution to the output node’s activation is maximized when wj∗ = B2 and αj = 2x·x √ value B x · x/2 q Proof: Since α2j x · x + (wj∗ )2 = B, we have wj∗ = B − α2j x · x, so the contribution to the activation q can be re-written as αj x · x B − α2j x · x. Taking the derivative with respect to αj , and solving, we get q q B B αj = ± 2x·x and we want the positive solution (otherwise the node outputs 0). When αj = 2x·x we have q wj∗ = B2 and thus the node’s maximum contribution to the activation is r B 2 r √ B x·x B (x · x) = . 2x · x 2 Lemma 33 The minimum sum-squared weights for a network W (without biases at the hidden nodes) that has an activation A at the output node on input x is √2A . x·x √ Proof: When maximized, the contribution of each hidden node to the activation at the output is x · x/2 times the hidden node’s contribution to the sum of squared-weights. Since each weight in W is used in exactly one hidden node’s contribution to the output node’s activation, this completes the proof. Note that this bound is independent of n, the number of hidden units, but does depend on the input x. Proof (of Theorem 7): Let A ≥ 0 be the activation at the output node for WL2 on input x. From Lemma 26 we get that b∗ = 1−A 2 . Combining Lemmas 28 , 29 and 33, we can re-write the J2 criterion for WL2 and distribution P(x,1) in terms of A as follows. λ 1 1 ∗ 2 2 (b − 0) + (WL2 (x) − 1) + ||W||22 2 2 2 !  2  2 1−A 1 1+A 2A + = − 1 + λ√ . 2 2 2 x·x J2 (WL2 ) = 20 (12) Differentiating with respect to A, we see that the criterion is minimized when A=1− √ 2λ x·x 2λ ≤1 x·x 2λ >1 when √ x·x when √ A=0 since we assumed A ≥ 0; when A = 0 then WL2 has all zero weights with a bias of 1/2 at the output. The risk part of (12) simplifies to λ2 (1 − A)2 = , 4 x·x   1 λ2 so the overall the risk of an aversion witness is min . , 4 x·x 21
9cs.NE
To appear in IEEE/ACM Design Automation Conference 2017 Hardware-Software Codesign of Accurate, Multiplier-free Deep Neural Networks Hokchhay Tann, Soheil Hashemi, R. Iris Bahar, Sherief Reda School of Engineering, Brown University, Providence RI 02912 arXiv:1705.04288v1 [cs.NE] 11 May 2017 {hokchhay tann, soheil hashemi, iris bahar, sherief reda}@brown.edu ABSTRACT While Deep Neural Networks (DNNs) push the state-ofthe-art in many machine learning applications, they often require millions of expensive floating-point operations for each input classification. This computation overhead limits the applicability of DNNs to low-power, embedded platforms and incurs high cost in data centers. This motivates recent interests in designing low-power, low-latency DNNs based on fixed-point, ternary, or even binary data precision. While recent works in this area offer promising results, they often lead to large accuracy drops when compared to the floating-point networks. We propose a novel approach to map floating-point based DNNs to 8-bit dynamic fixedpoint networks with integer power-of-two weights with no change in network architecture. Our dynamic fixed-point DNNs allow different radix points between layers. During inference, power-of-two weights allow multiplications to be replaced with arithmetic shifts, while the 8-bit fixed-point representation simplifies both the buffer and adder design. In addition, we propose a hardware accelerator design to achieve low-power, low-latency inference with insignificant degradation in accuracy. Using our custom accelerator design with the CIFAR-10 and ImageNet datasets, we show that our method achieves significant power and energy savings while increasing the classification accuracy. 1. INTRODUCTION Recent availability of high-performance computing platforms has enabled the success of deep neural networks (DNNs) in many demanding fields, especially in the domains of machine learning and computer vision. At the same time, applications of DNNs have proliferated to platforms ranging from data centers to embedded systems, which open up new challenges in low-power, low-latency implementations that can maintain state-of-the-art accuracy. While systems with general purpose CPUs and GPUs are capable of processing very large DNNs, they have high power requirements and are not suitable for embedded systems, which has led to in- ACM ISBN 978-1-4503-2138-9. DOI: 10.1145/1235 creasing interest in the design of low-power custom hardware accelerators. In designing low-power hardware for DNNs, one major challenge stems from the high precision used in the network parameters. State-of-the-art DNNs in classification accuracy are typically implemented using single precision (32bit) floating-point, which requires large memory size for both the network parameters as well as the intermediate computations. Complex hardware multipliers and adders are also needed to operate on such representations. On the other hand, the inherent resiliency of DNNs to insignificant errors, has resulted in a wide array of hardwaresoftware codesign techniques targeted for lowering the energy and memory footprint of these networks. Such techniques broadly aim either to lower the cost of each operation by reducing the precision [9, 10, 14] or to lower the number of required operations, for example by knowledge distillation [7, 16, 17]. While previous studies offer low-precision DNNs with little reduction in accuracy, the smallest fixed-point solutions proposed require 8-bits or more for both the activation and network parameters. Furthermore, while solutions with binary and ternary precisions prove effective for smaller networks with small datasets, they often lead to unacceptable accuracy loss on large datasets such as ImageNet [19]. In addition, these low-precision network techniques usually require precision specific network designs and therefore cannot readily be used on a specific network without an expensive architecture exploration. In this work, we aim to tackle the low-power high-accuracy challenge for DNNs by proposing a hardware-software codesign solution to transform existing floating-point networks to 8-bit dynamic fixed-point networks with integer powerof-two weights without changing the network topology. The use of power-of-two weights enables a multiplier-free hardware accelerator design, which efficiently performs computation on dynamic fixed-point precision. More specifically, our contributions in this paper are as follows: • We propose to compress floating-point networks to 8bit dynamic fixed-point precision with integer powerof-two weights. We then propose to fine-tune the quantized network using student-teacher learning to improve classification accuracy. Our technique requires no change to the network architecture. • We propose a new multiplier-free hardware accelerator for DNNs and synthesize it using an industry level library. Our custom accelerator efficiently operates using 8-bit multiplier-free dynamic fixed-point precision. To appear in IEEE/ACM Design Automation Conference 2017 • We also propose to utilize an ensemble of dynamic fixed-point networks, resulting in improvements in classification accuracy compared to the floating-point counterpart, while still allowing large energy savings. • We evaluate our methodologies on two state-of-the-art and demanding test sets, namely CIFAR-10 and ImageNet, and use well-recognized network architectures for our experiments. We compare our solution against a baseline floating-point accelerator and quantify the power and energy benefits of our methodology. The rest of our paper is organized as follows. In Section 2, we provide a breif background on deep neural networks. In Section 3, we summarize previous work related to ours. Section 4 describes our methodologies and accelerator design. Next, in Section 6, we provide the results obtained from our methodologies and our custom accelerator. Here we discuss the performance from both hardware and accuracy perspectives. Finally, in Section 7 we conclude our work. 2. BACKGROUND Figure 1 shows the template structure of a deep neural network. While a large number of layer types are available in the literature, three layer types are more commonly used in DNNs: • Convolutional Layers: Each neuron in this layer is connected to a subset of inputs with the same spatial dimensions as the kernels, which are typically 3dimensional as shown in Figure 1. The opPconvolution P P eration can be formulated as y = b+ i j k (xi,j,k · wi,j,k ). Here, x is the input subset, w is the kernel weight matrix, and b is a scalar bias. These layers are used for feature extractions. • Pooling Layers: Pooling layers are simply used to down sample input data. • Fully-Connected Layers: These layers are similar to convolutional layers with differences being that inputs and kernels are one-dimensional vectors. These layers are often used toward the end as classifier, where the output vector from the final layer (logits) is fed to a logistic function. • Non-Linearity: For each scalar input x, this layer outputs σ(x), where σ(·) is a predefined non-linear function, such as tanh(·), rectify linear unit (ReLU), etc. DNNs typically are based on floating-point precision and trained with backpropagation algorithm. Each training step involves two phases: forward and backward. In the forward phase, the network is used to perform classification on the input. Afterward, the gradients are propagated back to each layer in the backward phase to update the network’s parameters. The biggest portion of the computational demands are required by the multiplier blocks utilized in the convolutional and fully connected layers. 3. RELATED WORKS Previous work in software and hardware implementation of DNNs has been, for the most part, disconnected. Few studies have tried to optimize highly accurate designs with low power budgets. On the accuracy front, one aspect of condensing DNNs is to train much smaller networks from the large, cumbersome models [16, 17]. Both models are based Forward Pass Backward Pass (Gradient Descent) … Input Layer Convolutional Layer Pooling Layer Fully Connected Layer Output Layer Figure 1: Typical Structure of Deep Neural Network on floating-point precision. This approach proposes to train the student (smaller model) to mimic to the outputs of the teacher (larger model). The loss function for the training is composed of two parts: the losses with respect to the true labels and the outputs from the teacher model. Alternatively, DNNs with low precision data formats have enormous potentials for reducing hardware complexity, power and latency. Not surprisingly, there exists a rich body of literature which studies such limited precisions. Previous work in this area have considered a wide range of reduced precision including fixed point [5, 13, 15], ternary (-1,0,1) [12] and binary (-1,1) [8, 14]. Furthermore, comprehensive studies of the effects of different precision on deep neural networks are also available. Gysel et al. [10] propose Ristretto, a hardware-oriented tool capable of simulating a wide range of signal precisions. While they consider dynamic fixed-point, in their work the focus is on network accuracy so the hardware metrics are not evaluated. On the other hand, Hashemi et al. [9] provide a broad evaluation of different precisions and quantizations on both the hardware metrics and network accuracy. However, they do not evaluate dynamic fixed point. In the hardware design domain, while few work have considered different bit-width fixed-point representations in their accelerator design [6, 9, 18], in contrast to the accuracy analysis, no evaluation of hardware designs using dynamic fixedpoint is available. We fill this gap by providing an accelerator design optimized to use dynamic fixed-point representation for intermediate computations while using power-of-two weights. In recent years, a few works have focused on techniques to reduce the power demands of DNNs at the cost of small reductions in network accuracy. For instance, Tann et al. propose an incremental learning algorithm where the network in trained in incremental steps [11]. The idea is then to turn off large portions of the network in order to save energy if these portions are not needed to retain accuracy. While this work delivers significant power and energy saving with small network accuracy degradation, it is orthogonal to our work and can be applied in conjunction. Sarwar et al. propose a multiplier-less neural network where an accurate multiplier is replaced with an alphabet set multiplier to save power. This work however, focuses on multi-layer perceptrons and deep neural networks are not evaluated [4]. In contrast, we evaluate our work on both CIFAR-10 and ImageNet and highlight that our methodology is capable of delivering significant savings in energy while even showing improvements in accuracy. 4. MULTIPLIER-FREE DYNAMIC FIXEDPOINT (MF-DFP) NETWORKS In order to simplify the hardware implementation, we propose to alter the compute model by replacing multipliers To appear in IEEE/ACM Design Automation Conference 2017 with shift blocks and reducing signal bit width to 8 bits. We represent the signals using dynamic fixed-point format since synaptic weights and signals in different layers can vary greatly in range. Employing a uniform fixed-point representation across the layers would require large bit widths to accommodate for such range. As demonstrated by others [9, 10], even with 16-bit fixed-point, significant accuracy drop is observed when compared to floating-point representation. Dynamic fixed-point representation, as proposed in [13], can be represented using two variables hb, f i, where b ∈ N+ is the bit width, and f ∈ Z is the fractional length. Each b-bitPnumber in this scheme can be interpreted as i (−1)s 2−f b−2 i=0 2 xi , where s, xi ∈ {0, 1} are the sign bit th and the i bit respectively. The term dynamic refers to the fact that different layers in DNNs can take on different values for f depending on their ranges. In this work, we deploy 8-bit dynamic fixed-point for all of our experiments. While we adopt our quantization process from the techniques in [10], our work differs from theirs in three aspects: (i) we perform hardware-software analysis for power-of-two weights and dynamic fixed-point data path, (ii) we propose to include student-teacher learning in the fine-tuning process, and (iii) we demonstrate that an ensemble of two MFDFP networks can outperform the floating-point network while having significant savings in energy. These aspects are described in Algorithm 1 as three phases. Next, we describe these phases in more details. Algorithm 1: Floating-Point to Dynamic Fixed-Point 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4.1 Network Quantization (Phase 1) In order to construct a dynamic fixed-point network, we take as input a fully trained floating-point network. We first quantize on this input network by rounding its weights to the nearest powers of two. We also round the intermediate signals to 8-bit dynamic fixed-point using Ristretto [10] (line 2). We then perform fine-tuning on the network to recover from accuracy loss due to quantization (lines 1–9). DNNs are typically trained using the backpropagation algorithm with variants of gradient descent methods, which can be ill-suited for low-precision networks. The computed gradients and learning rates are typically very small, which means that parameters may not be updated at all due to their low-precision format. Intuitively, this requires high precision in order to converge to a good minima. However, integer power-of-two weights only allow large increment jumps. To combat this disparity, we adopt solution proposed by Courbariaux et al. [14] to keep two sets of weights during the training process: one in quantized precision and one in floating-point. As shown in Algorithm 1, during forward propagation, the floating-point weight set is stochastically or deterministically quantized before the input data is evaluated (line 4). For our work, we found that deterministic quantization gives better performance. The output result of the quantized network is then used to compute the loss with respect to the true label of the data (line 5). The gradients with respect to this loss are then used to update the floatingpoint parameters during backward propagation (line 6), and the process is repeated until convergence. This approach allows small gradients to accumulate over time and eventually cause incremental updates in the quantized weights. 4.2 Additional Fine-tuning (Phase 2) 15 16 17 18 19 20 // FLnet: the input floating-point net. // t_logits: the floating-point net’s logits. Input : FLnet, t logits begin Phase 1 // MF_DFPnet: dynamic fixed-point network Output: MF DFPnet // Quantize the weights to powers of two and // inputs to 8-bit fixed-point MF DFPnet = Quantize 8bit(FLnet); // Fine-tuning MF_DFPnet until convergence // using hard data labels as in [14]. for i = 1 to Convergence do Forward Pass(MF DFPnet); // Compute gradients grads=Grad(MF DFPnet, true labels); // Backpropagate grad and update weights: Backward update(FLnet, grads); MF DFPnet = Quantize 8bit(FLnet); end end begin Phase 2 // Additional training using different for j = i to Convergence do Forward Pass(MF DFPnet); grads=Grad(MF DFPnet, true labels); // Also with respect to teacher’s logits grad logit=Grad(MF DFPnet, t logits); // gradient to update: gradients=grads + β·grad logit; Backward update(FLnet, gradients); MF DFPnet = Quantize 8bit(FLnet); end return MF DFPnet end // Phase 3: If using ensemble, repeat Phase 1 // and 2 with different input FLnet. On top of the technique from Courbariaux et al. [14], we propose additional training with a different loss function once training with hard labels no longer improves the performance. As shown in Algorithm 1 lines 10–20, in addition to using hard labels, we introduce student-teacher learning, where a student network is trained to mimic the outputs of a teacher network [16, 17]. Both networks are floating-point based, but the student typically has a far fewer number of parameters. In our work, we treat the dynamic fixed-point network as the student and the floating-point network as the teacher. The loss function in the student-teacher learning incorporates the knowledge learned by the teacher model [16]. Suppose S is the student network, and T is the teacher with output logit vectors zS and zT and class probability PS and PT respectively. The softmax regression function is relaxed by introducing a temperature parameter τ such exp(zT ,i /τ ) exp(zS,i /τ ) and PT,i = P exp(z . Let that PS,i = P exp(z S,j /τ ) T ,j /τ ) j j WS be the parameters of the student network, then the loss function for the student model is defined to be: L(WS ) = H(Y, PS ) + β · H(PT , PS ) (1) where β is a tunable parameter, H is the cross entropy, and Y is the one-hot true data label. Using τ >> zS , zT , we To appear in IEEE/ACM Design Automation Conference 2017 where N is the length P of of vectors zS , zT . With zero-meaned zS , zT ( j zS,j = P j zT,j = 0), the approximated gradient is then: 8 bit << >> 4 bit in w << >> (2) in w << >> Ensemble of MF-DFP Networks (Phase 3) in w 5. HARDWARE ACCELERATOR DESIGN As discussed in Section 4, while we maintain low-precision in both network signals and parameters for efficiency, providing the network with the flexibility to change the location of the radix point from layer to layer is necessary for minimizing the accuracy degradation. While improving the accuracy, this scheme incurs complexities in the hardware design as some bookkeeping in needed to keep track of the location of the radix point in different parts of the network. In the proposed accelerator, we enable such flexibility by providing each set of calculations with details on the indices of both the input feature maps as well as the output activation. More specifically, we implement this feature by adding control signals dedicated to both the input feature, and the output activation radix indices. Dedicated hardware is then added to the hardware to shift the result to the correct index as determined by the radix indices. On the other hand, while dynamic fixed-point representation for synaptic weights and activation maps allows for compact bit widths, during inference, we would still need to perform fixed-point multiplications. As described in Section 4, we propose to quantize the weights to integer powerof-two, which would allow the expensive multiplications to be replaced with arithmetic shifts. These shift operators are far more hardware-friendly than full-scale multipliers. In this quantization scheme, for each weight w, we represent its quantized version using two numbers hs, ei, where s is the sign of the weight w, and e = max[round(log2 (|w|)), −7] is the exponent for the power of 2 (i.e., 2e ). Here, round() performs rounding to the nearest integer. Note that we bound e ≥ −7 since our input data is limited to 8 bits. For each input x, x·w is then transformed into (s·x)  e, where  represents the shift operator. In addition, we observe that + n 17 bit + 18 bit + << >> . . . Deploying an ensemble of DNNs has been proven to be a simple and effective method to boost the inference accuracy of a DNN [21]. The idea is to independently train multiple DNNs of the same architecture and use them to evaluate each input. The output is then chosen based on the majority of votes. Suppose the ensemble consists of M networks producing output logit vectors zi , i ∈ [1, M ]. Then the outPM 1 put class can simply be the maximum element in M i=1 zi . This idea is amenable in scenarios where there exists enough time or energy budget to justify evaluating the input on a number of networks. In section 6.2 we highlight that, since the reduction in energy from the proposed MF-DFP are so dramatic, the designer may implement an ensemble of MFDFP networks in parallel and still save significantly in energy consumption. More specifically, we show that an ensemble of multiplier-free dynamic fixed-point networks can outperform a floating-point network while still achieving significant energy saving. In order to construct such ensemble, we run Algorithm 1 multiple times with different starting floating-point networks on line 1. m 16 bit + 19 bit + Accumulator & Routing NL clk (b) Proposed Hardware Accelerator Design Memory Subsystem Memory Interface δL(WS ) β ≈ (PS,i − Yi ) + · (zS,i − zT,i ). δzS,i N · τ2 4.3 (a) The Dynamic, Fixed-Point Structure of a Single Neuron. in w 8 bit 1+z P i /τ N + j zj /τ 8 bit ≈ 20 bit Pexp(zi /τ ) j exp(zj /τ ) . . . have Pi = DMA Input Buffer DMA Weights Buffer DMA Output Buffer Neural Processing Unit (NPU) Processing Unit #1 Processing Unit #2 Processing Unit #16 Control Circuitry Figure 2: Proposed Hardware Accelerator Design (a) a Single Neuron and (b) The Organization of Neurons and Hardware Blocks. the magnitudes of the weights is less than 1, so our rounding leads to 8 possible exponents {0, −1, . . . , −7}. Therefore the weights can be encoded into 4-bit representation. This observation is used to simplify our hardware architecture significantly as discussed in 6.2. To further improve the accuracy, we ensure that there is no loss in intermediate values by mitigating the possibility of overflows. In order to do so, we ensure that all intermediate signals have large enough word-width, thereby effectively increasing the width of the intermediate wires as needed. To illustrate our idea, Figure 2(a) shows the simplified structure of a single neuron in our proposed implementation, highlighting the main feature of the accelerator design. In Figure 2(a), the dedicated hardware implementing the dynamic fixed-point scheme is shown as “Accumulator & Routing”. Here m and n represent the locations of the radix points for the input features and output activations respectively. In order to integrate our proposed neuron architecture into a full-scale hardware accelerator, we utilize a tile-based implementation inspired from DianNao [3], where each cycle a small number of physical neurons is fed a new set of data for calculation. We implement three separate memory subsystems assigned to input data, weights, and output data, respectively. This memory subsystem ensures the isolation of memory transfers from the calculation for maximum throughput. The computation itself is performed in neural processing units (NPUs) containing a number of processing units each implementing 16 neurons with 16 synapses. Figure 2(b) illustrates the organization of the proposed To appear in IEEE/ACM Design Automation Conference 2017 Table 1: Design metrics of the proposed MF-DFP accelerator against the floating-point baseline. 6.1 EXPERIMENTAL RESULTS Experimental Setup In this section, we discuss our results on the CIFAR-10 and ImageNet 2012 datasets [2, 19] using the well-known DNN architectures from [2] and [20] respectively. We remove all local response normalization layers since they are not amenable to our multiplier-free hardware implementation. All of our experiments are based on Caffe [1]. For CIFAR-10, we begin by training the floating-point networks using the benchmark architecture. For the ImageNet benchmark, we obtain the floating-point model from Caffe Model Zoo1 . We then run the networks on their corresponding training set data to obtain the pre-softmax output logits. From these floating-point networks, we construct our proposed MF-DFP networks using Algorithm 1. For our hardware evaluations, we compile our designs using Synopsys Design Compiler and a 65 nm standard cell library in the typical processing corner. We synthesize our hardware so that we have zero timing slack for the floatingpoint design. Therefore, we use a constant clock frequency of 250MHz for all our experiments. While the utilization of barrel shifters instead of multipliers provides us with timing slacks which can be used to boost the frequency, we choose to keep the frequency constant as changing the frequency adds another dimension for evaluation which is out of the scope of this work. 6.2 Results We evaluate our proposed methodology as well as our custom hardware accelerator on CIFAR-10 and ImageNet using a broad range of performance metrics including accuracy, power consumption, design area, inference time, and inference accuracy. Table 1 summarizes the design area and the power consumption of the proposed multiplier-free custom accelerator. Values shown in parenthesis, (in,w), reflect the number of bits required for the representation of inputs and weights respectively. We also implement a floating-point 1 https://github.com/BVLC/caffe/wiki/Model-Zoo Power Cons. (mW ) 1361.61 138.96 270.27 Area Saving (%) 0 87.97 76.00 Power Saving (%) 0 89.79 80.15 0.52 Training with Data labels only Student-Teacher Training Floating-Point Network 0.51 0.5 0.49 0.48 0.47 0.46 0.45 0.44 Phase 1 Phase 2 0.43 0 6. Design Area (mm2 ) 16.52 1.99 3.96 Precision (in, w) Floating-point(32,32) Proposed MF-DFP(8,4) Ens. MF-DFP(8,4) Error Rate hardware accelerators. Here we want to stress the benefits of our methodologies relative to the floating-point design. Thus, an architectural design space exploration such as altering number of hardware neurons and synapses is out of the scope of this work. In order to incorporate the proposed ensemble of networks, the number of processing units is increased as needed to parallelize the computation of an ensemble of networks. Note that the memory subsystems as well as the control logic also need to be modified to account for the number of processing units. In section 6.2 we evaluate our methodologies using a single processing unit, resulting in a single multiplier-free dynamic fixed point (MF-DFP) network, and two processing units, which form an ensemble of two networks. We also implement and compare our hardware design with a conventional 32-bit floating-point architecture using a single processing unit as a baseline. Compared to our proposed design, the baseline implementation utilizes multipliers in the first stage of the design and keeps the bitwidth constant at 32-bits throughout the design for both the activations and the network parameters. 10 20 30 40 50 Training Epochs Figure 3: ImageNet 2012 validation set top-1 error rates for quantized network trained with only data labels, with student-teacher learning, and floatingpoint network. version of our accelerator as a baseline design and for comparison. As shown in the table our accelerator can achieve significant benefits in both design area and power consumption using both one processing unit and using an ensemble of two networks. Next we report the results when using our methodologies and hardware accelerator for our benchmarks. Figure 3 shows the classification error rate of the baseline floating-point network as well as the fine-tuning process of MF-DFP for the ImageNet benchmark. Here, we observe that by fine-tuning using just data labels (Phase 1), we achieve significant performance with less than a 1% increase in error rate than the floating-point counterpart. Additional training using the student-teacher model (Phase 2) as described in Section 4.2 on top of just data labels, allows us to reduce the error rate even more. In this experiment, we observed that more benefit is achieved when the studentteacher training is started from a non-global optimal point in the data labels-only training. More specifically, the value of i in Algorithm 1 line 11 should be close to convergence but not the global optimal point in the training process. In either case, the student-teacher learning provides consistently better performance than using the data labels-only training. For this training, we set τ = 20, β = 0.2 and start with a learning rate of 1e-03. We decrease the rate by a factor of 10 when learning levels off and stop the training when the learning rate drops below 1e-07. Furthermore, in Table 2, we summarize the accuracy, inference time, and the energy performance of our proposed techniques. As shown in the table, our methodology can achieve energy savings as high as 89% in the case of single MF-DFP network with a maximum of 0.79% degradation in accuracy for both benchmarks. This is especially significant as there is absolutely no modification to network depth and To appear in IEEE/ACM Design Automation Conference 2017 Table 2: Time, energy and top-1 accuracy for CIFAR-10 and ImageNet. In addition, for Imagenet, we also show in parenthesis the top-5 accuracy. Ensemble accuracy is obtained by deploying two MF-DFP networks. Precision Floating-Point (32,32) MF-DFP (8,4) Ensemble MF-DFP Classification Accuracy (%) 81.53 80.77 82.61 CIFAR-10 Time Energy (us) (uJ) 246.52 335.68 246.27 34.22 246.27 66.56 Energy Saving (%) 0 89.81 80.17 Table 3: Comparison of memory requirements for floating-point versus MF-DFP network parameters for CIFAR-10 and ImageNet benchmarks. Precision Floating-Point MF-DFP Ensemble MF-DFP CIFAR-10 (MB) 0.3417 0.0428 0.0855 ImageNet (MB) 237.95 29.75 59.50 channel size. In addition, with the extra area budget, we can implement two processing units in our accelerator and, for each benchmark, we deploy an ensemble of two MF-DFP networks trained using different starting points. As shown in Table 2, we can outperform the floating networks in both benchmarks using this ensemble while still achieving significant energy saving. Finally, while we design our methodology with memory footprint in mind, we do not include the power consumption of the main memory subsystem in our evaluations. However, as a general guideline, our methodology emphasizes on reductions in network precisions and therefore requires 8× less memory compared to a floating-point implementation as shown in Table 3. For the ensemble method, the memory requirement essentially doubles from single MF-DFP, however, they are still far lower than the floating-point networks. 7. CONCLUSION In this work we proposed a novel hardware-software codesign approach which enables seamless mapping of full-precision deep neural networks to a multiplier-free dynamic fixedpoint network. In our work, no change to the network architecture is required to maintain accuracy within acceptable bounds. We also formalized the use of student-teacher learning for accuracy improvements in low-precision networks. In addition, we proposed a hardware design capable of incorporating the dynamic fixed point as well as the multiplier-free design aspects. We proposed to utilize an ensemble of lower precision ML-DFP networks to increase the accuracy even further. We evaluated our designs using two well-recognized and demanding datasets, namely CIFAR-10 and ImageNet running on networks well studied in the literature. Using one single MF-DFP network on our tastbenches, our design achieves up to 90% energy savings with an insignificant accuracy drop of approximately 1%. Using an ensemble of two networks, energy savings of 80% are achievable while delivering accuracy gains of more than 1% for CIFAR-10, and 0.5% for ImageNet top-1 classification accuracy. Acknowledgment This work is supported by NSF grant 1420864. We would like to thank NVIDIA Corporation for their generous GPU donation. Classification Accuracy (%) 56.95 (79.88) 56.16 (79.13) 57.57 (80.29) ImageNet Time Energy (us) (uJ) 15666.45 21332.38 15666.06 2176.96 15666.06 4234.07 Energy Saving (%) 0 89.80 80.15 References [1] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [2] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images, 2009. [3] T. Chen, Z. Du, N. Sun, J. Wang, C. Wu, Y. Chen, and O. Temam. DianNao: A small-footprint high-throughput accelerator for ubiquitous machine-learning. In Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’14, pages 269–284, 2014. [4] S.S. Sarwar, S. Venkataramani, A. Raghunathan, K. Roy. Multiplier-less Artificial Neurons Exploiting Error Resiliency for Energy-Efficient Neural Computing. In Proc. DATE, 2016. [5] C.Z. Tang, and H.K. Kwan. Multilayer feedforward neural networks with single powers-of-two weights. In IEEE Transactions on Signal Processing, pages 2724–2727, 1993. [6] M. Sankaradas, J. Murugan, V. Jakkula, S. Cadambi, S. Chakradhar, I. Durdanovic, E. Cosatto, and H.P. Graf. A Massively Parallel Coprocessor for Convolutional Neural Networks. In Proc. IEEE ASAP, 2009. [7] A. Romero, N. Ballas, S.E. Kahou, A. Chassang, C. Gatta, and Y. Bengio. FitNets: Hints for Thin Deep Nets. arXiv preprint arXiv:1412.6550, 2014. [8] D. Soudry, I. Hubara, and R. Meir. Expectation backpropagation: Parameter-free training of multilayer neural networks with continuous or discrete weights. In Proc. NIPS, pages 963–971, 2014. [9] S. Hashemi, N. Anthony, H. Tann, R.I. Bahar, and S. Reda. Understanding the Impact of Precision Quantization on the Accuracy and Energy of Neural Networks. In Proc. DATE, 2017. [10] P. Gysel, M. Motamedi, S. Ghiasi, “Hardware-Oriented Approximation of Convolutional Neural Networks,” in ICLR Workshop, 2016. [11] H. Tann, S. Hashemi, I. Bahar, S. Reda, “Runtime Configurable Deep Neural Networks for Energy-Accuracy Trade-off,” in Proceedings of IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis, p. 34. 2016. [12] K. Hwang, and W. Sung. Fixed-point feedforward deep neural network design using weights +1, 0, and -1. In IEEE SiPS, 2014. [13] M. Courbariaux, Y. Bengio, and D. Jean-Pierre. Low precision arithmetic for deep learning. In arXiv preprint arXiv:1412.7024, 2014. [14] M. Courbariaux, I. Hubara, D. Soudry, R. El-Yaniv, and Y. Bengio. Binarized Neural Networks: Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1. In arXiv preprint arXiv:1602.02830, 2016. [15] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan. Deep Learning with Limited Numerical Precision. In arXiv preprint arXiv:1502.02551, 2015. [16] G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In arXiv preprint arXiv:1503.02531, 2015. [17] C. Bucilua, R. Caruana, and A. Niculescu-Mizil Model compression. In Proc. of ACM SIGKDD, 2006. [18] C. Zhang, P. Li, G. Sun, Y. Guan, B. Xiao, and J. Cong. Optimizing FPGA-based Accelerator Design for Deep Convolutional Neural Networks. In Proc. ACM/SIGDA FPGA, 2015. [19] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, and A.C. Berg, and F. Li. ImageNet Large Scale Visual Recognition Challenge. In IJCV, pages 211–252, 2015 [20] A. Krizhevsky, I. Sutskever, and G.E. Hinton Imagenet classification with deep convolutional neural networks. In Proc. NIPS, 2012. [21] J. Ba, and R. Caruana. Do deep nets really need to be deep? In Proc. NIPS, pages 2654–2662, 2014.
9cs.NE
Primitivity, Uniform Minimality, and State Complexity of Boolean Operations arXiv:1702.00877v3 [cs.FL] 26 Mar 2018 Sylvie Davies University of Waterloo Department of Pure Mathematics [email protected] Abstract. A minimal deterministic finite automaton (DFA) is uniformly minimal if it always remains minimal when the final state set is replaced by a non-empty proper subset of the state set. We prove that a permutation DFA is uniformly minimal if and only if its transition monoid is a primitive group. We use this to study boolean operations on group languages, which are recognized by direct products of permutation DFAs. A direct product cannot be uniformly minimal, except in the trivial case where one of the DFAs in the product is a one-state DFA. However, nontrivial direct products can satisfy a weaker condition we call uniform boolean minimality, where only final state sets used to recognize boolean operations are considered. We give sufficient conditions for a direct product of two DFAs to be uniformly boolean minimal, which in turn gives sufficient conditions for pairs of group languages to have maximal state complexity under all binary boolean operations (“maximal boolean complexity”). In the case of permutation DFAs with one final state, we give necessary and sufficient conditions for pairs of group languages to have maximal boolean complexity. Our results demonstrate a connection between primitive groups and automata with strong minimality properties. 1 Introduction Formal definitions are postponed until later. The state complexity of a regular language is the minimal number of states needed to recognize the language with a deterministic finite automaton. It is well-known that if Lm and L′n are regular languages over a common alphabet Σ with state complexity m and n respectively, then the state complexity of Lm ∪ L′n is at most mn, and this bound is tight for all m, n ≥ 2. The upper bound follows from the standard “direct product” automaton construction for recognizing unions of regular languages. Examples which meet the bound were given by Maslov in 1970 [15], and independently by Yu, Zhuang and Salomaa in 1994 [21], who noted that the same bound holds for intersection. More generally, if ◦ is a binary boolean operation on languages over Σ, then Lm ◦L′n has state complexity at most mn, and this bound is tight for all m, n ≥ 2 if and only if ◦ is proper, that is, not a constant function (L◦L′ = ∅ or L◦L′ = Σ ∗ ) or a function that depends on only one argument (for example, L ◦ L′ = Σ ∗ \ L). This was proved by Brzozowski in 2009 [5], who gave examples showing that mn is a tight bound for symmetric difference, and noted that the examples for union and symmetric difference (together with their complements) suffice to prove mn is a tight upper bound for all proper binary boolean operations. To prove a lower bound on the worst-case state complexity of a regular operation, it suffices to give just one family of examples that meet the bound. Such families are called witnesses. Witnesses are known for most commonly used unary and binary operations on regular languages. However, there are several directions of research in state complexity which necessitate finding new witnesses for operations that have previously been studied. For example, sometimes the first witnesses found for an operation are not optimal in terms of alphabet size, so researchers will look for new witnesses over a smaller alphabet. When studying the n-ary versions of binary operations, such as the union of n languages, or more generally combined operations [13,18], such as the star of a union of languages, again new witnesses are needed. It is also interesting to consider families of languages that are simultaneous witnesses for multiple operations; it is not generally the case that a witness for one operation will work for others. Brzozowski found a family of languages which is a simultaneous witness for reversal, star, concatenation and all binary boolean operations [6]. Each of the problems just mentioned, as well as the fundamental problem of determining the worstcase state complexity of an operation, may also be studied in subclasses of the regular languages, such as the star-free languages [9] or ideal languages [8]. Often the known witnesses do not lie in the subclass, so new witnesses must be found. In some cases, new witnesses can be found by making slight modifications to known witnesses, but this is not always successful. Furthermore, this technique does little to advance our understanding of why particular witnesses work. For these reasons, it is desirable to have results which describe the general landscape of witnesses for a particular operation. By this we mean results that give necessary conditions for witnesses, revealing common structural properties that all witnesses share, or sufficient conditions allowing one to easily generate examples of witnesses or check whether a candidate family is a witness. For example, Salomaa, Wood and Yu proved that a regular language of state complexity n is a witness for the reversal operation if the transition monoid of its minimal DFA has the maximal possible size nn [19]; this gives a general sufficient condition for a language to be a witness for reversal. Ideally, collecting results of this sort would eventually lead to a complete classification of witnesses for commonly used operations. In reality, we suspect the problem of fully classifying witnesses is only tractable in very special cases, but even results which take small steps in this direction can be quite useful and enlightening. The main inspiration for this work is a paper of Bell, Brzozowski, Moreira, and Reis [3], which considers the following question: for which pairs of languages (Lm , L′n ) (with state complexities m and n respectively) does Lm ◦ L′n reach the maximal state complexity mn for every proper binary boolean operation ◦? Bell et al. give sufficient conditions for this to occur. The conditions are based on the transition monoids of the minimal deterministic automata of Lm 2 and L′n ; essentially, if the transition monoids contain the symmetric groups Sm and Sn , then “usually” (i.e., excluding a known class of counterexamples) the language Lm ◦ L′n will have state complexity mn. We obtain a refinement of this result: we prove that if the transition monoids contain 2-transitive groups, then “usually” Lm ◦ L′n has state complexity mn (though our notion of “usually” is more restrictive than that of Bell et al.). We also obtain necessary and sufficient conditions for Lm ◦ L′n to have state complexity mn in the special case where the minimal automata for Lm and L′n have exactly one final state, and their transition monoids contain a transitive permutation group. We can view this result as solving a particular special case of the problem of characterizing witnesses for boolean operations. To obtain these results, we exploit a connection between a certain class of permutation groups called primitive groups, and the notion of uniformly minimal automata introduced by Restivo and Vaglica [16]. A minimal deterministic finite automaton (DFA) is uniformly minimal if it always remains minimal when the final state set is replaced by a non-empty proper subset of the state set. For a permutation DFA (that is, a DFA whose transition monoid is a permutation group), uniform minimality is equivalent to primitivity of the transition monoid. Although uniform minimality played an important role in the paper of Bell et al., this connection with primitive groups was not used in their paper. Primitive groups are an important and well-studied class of permutation groups; there are deep results on their structure, and large libraries of primitive groups are available in computer algebra systems such as GAP [14] and Magma [4]. Uniformly minimal DFAs have received comparatively little study; thus this connection has significant implications for the theory of uniformly minimal DFAs. The paper is structured as follows. Section 2 contains background material needed to understand the paper. Section 3 discusses the relationship between primitive groups and uniformly minimal permutation DFAs. Section 4 contains our main results on witnesses for the maximal state complexity of boolean operations. Section 5 concludes the paper by giving a summary of our results and stating some open problems. 2 Definitions and Notation For a function f : X → Y , we typically write the symbol f to the right of its arguments. For example, if the image of x under f is y, we write xf = y. Functions are composed from left to right, and composition is denoted by juxtaposition: if g : Y → Z, then f g denotes the composition of f and g, and x(f g) = (xf )g = yg is an element of Z. Let P(X) denote the power set of X, that is, the set of all subsets of X. Given f : X → Y we may extend f by union to obtain a function f : P(X) → Ye (where S Ye is the closure of Y under union) defined by Sf = x∈S xf for S ⊆ X. We denote the extension by the same symbol as the original function. Note that for convenience, we often make no distinction between an element of a set and the singleton containing the element; so x∪x′ = {x}∪{x′ } = {x, x′ } and xf = {x}f . 3 2.1 Monoids, Groups and Actions A monoid is a set M equipped with an associative binary operation · and an identity element e such that m · e = e · m = m for all m ∈ M . Typically we omit the symbol for the operation; so the previous equation could be written as me = em = m. For n ≥ 1 we write mn for the n-fold product of m with itself, and define m0 = e for all m ∈ M . If for each m ∈ M , there exists m′ ∈ M such that mm′ = m′ m = e, then M is called a group, and m′ is called the inverse of M and denoted m−1 . The order of an element g of a group is the least integer n ≥ 1 such that g n = e. A submonoid of M is a subset M ′ ⊆ M which is closed under · and contains the identity e of M . If additionally M ′ is a group, it is called a subgroup of M ; we write M ′ ≤ M to mean that M ′ is a subgroup of M . Note that we do not allow submonoids or subgroups of M to have an identity element different from that of M . If x1 , . . . , xk are elements of a group G, then hx1 , . . . , xk i denotes the group generated by x1 , . . . , xk , the smallest subgroup of G containing x1 , . . . , xk . Let M and M ′ be monoids with identity elements e and e′ respectively. A homomorphism from M to M ′ is a function ϕ : M → M ′ such that (m1 m2 )ϕ = (m1 )ϕ(m2 )ϕ for all m1 , m2 ∈ M and eϕ = e′ . A bijective homomorphism is called an isomorphism, and two monoids are said to be isomorphic if there exists an isomorphism from one to the other. We write M ∼ = M ′ to mean that M and ′ ′ M are isomorphic. If G and G are groups and ϕ : G → G′ is a homomorphism, the kernel of ϕ is the set ker ϕ = {g ∈ G : gϕ = e′ }, that is, the set of elements of G that map to the identity of G′ . If G is a group, N ≤ G, and gng −1 ∈ N for all g ∈ G and n ∈ N , we say N is a normal subgroup of G. A group G is simple if it has no non-trivial proper normal subgroups, that is, the only normal subgroups of G are G itself and the trivial group (containing just the identity element of G). The kernel of a homomorphism from G to another group is always a normal subgroup of G. We occasionally use the following elementary facts about normal subgroups and homomorphisms: – If ϕ : G → G′ is a homomorphism and ker ϕ is the trivial one-element subgroup of G, then ϕ is injective. – If ϕ : G → G′ is a surjective homomorphism and N is a normal subgroup of G, then N ϕ is a normal subgroup of G′ . A monoid action of M on a set X is a function ψ : X × M → X such that ((x, m)ψ, m′ )ψ = (x, mm′ )ψ and (x, e)ψ = x for all m, m′ ∈ M and x ∈ X. Equivalently, it is a family of functions mψ : X → X such that mψ m′ψ = (mm′ )ψ for all m, m′ ∈ M and eψ is the identity map on X. The map mψ is called the action of m. To simplify the notation, we often omit the action symbol ψ and just write xm instead of xmψ or (x, m)ψ. Furthermore, we typically avoid assigning a symbol to the action at all; rather than “let ψ be a monoid action of M on X” we write “let M be a monoid acting on X”, meaning that M has a specific but nameless action on X associated with it. If S ⊆ M generates the monoid M , a monoid action ψ is completely determined by its values on elements of S. If M is a group, we use the term group action rather than monoid action. 4 Let G be a group acting on X. For x ∈ X, the stabilizer subgroup or simply stabilizer of x is the subgroup {g ∈ G : xg = x} of G. For S ⊆ X, the setwise stabilizer of S is the subgroup {g ∈ G : Sg = S}. Elements of the setwise stabilizer need not fix every element of S; for example, if 1g = 2 and 2g = 1 then g is in the setwise stabilizer of {1, 2}. Let X be a finite set. A function t : X → X is called a transformation of X. The set of all transformations of X is a monoid under composition called the full transformation monoid TX . A submonoid of TX is called a transformation monoid on X. The degree of a transformation monoid on X is the size of X. If M is a transformation monoid on X, the monoid action ψ : X × M → X given by (x, t)ψ = xt for x ∈ X, t ∈ M is called the natural action of M . If X = {1, . . . , n} we write Tn for TX . A bijective transformation of X is called a permutation of X. We can describe any particular permutation of X using cycle notation as follows. For x1 , . . . , xk ∈ X, we write (x1 , . . . , xk ) for the permutation that sends xi to xi+1 for 1 ≤ i < k, sends xk to x1 , and fixes all other elements of X. This permutation is called a cycle of length k, or simply a k-cycle. All permutations that are not cycles can be expressed as a product of cycles. The identity permutation is denoted by an empty cycle, i.e., “()”. Cycle notation conflicts with the notation we use for ordered k-tuples, but this should not cause confusion. We mainly use cycle notation when giving concrete examples of permutations. The set of all permutations of X is a subgroup of TX called the symmetric group SX . A subgroup of SX is called a permutation group on X; this a special type of transformation monoid and we have the same notions of degree and natural action. The alternating group AX is the subgroup of SX consisting of all permutations that can be expressed as a product of an even number of 2-cycles. If X = {1, . . . , n} we write Sn for SX and An for AX . Let G be a group acting on X. We say that the action of G is transitive or that G acts transitively on X if for all x, x′ ∈ X, there exists g ∈ G such that xg = x′ . We say the action of G is k-transitive or G acts k-transitively on X if for all pairs of k-tuples (x1 , . . . , xk ), (x′1 , . . . , x′k ) ∈ X k , there exists g ∈ G such that for 1 ≤ i ≤ k we have xi g = x′i ; informally, k-transitive means “transitive on k-tuples”. A non-empty set B ⊆ X is called a block for G if for all g ∈ G, either Bg ∩ B = B (equivalently, Bg = B) or Bg ∩ B = ∅. A block B is trivial if it is a singleton or the entire set X. We say the action of G is primitive or that G acts primitively on X if it is transitive and all of its blocks are trivial. Equivalently, a transitive group action of G is primitive if for every set S ( X with at least two elements, there exists g ∈ G such that ∅ ( Sg ∩ S ( S. If G is a permutation group and the natural action of G is transitive (ktransitive, primitive), then we say G is a transitive group (k-transitive group, primitive group). For example, the cyclic group h(1, 2, 3, 4)i ≤ S4 is a transitive group, since its natural action on {1, 2, 3, 4} is transitive. This terminology can cause confusion, since transitivity, k-transitivity and primitivity are properties of actions and not groups; statements like “G is transitive” or “G is primitive” 5 are statements about a particular action of G (the natural action) rather than the abstract group itself. In particular, these properties are not preserved under isomorphism; for example, the group h(5, 6, 7, 8)i ≤ S8 is not transitive, but it is isomorphic to the transitive group h(1, 2, 3, 4)i ≤ S4 . As the notions of transitivity and primitivity are central to this paper, we give numerous examples to illustrate them below. Example 1. Consider the group G = h(1, 2, 3, 4, 5, 6)i ≤ S6 . This group is clearly transitive, since its natural action on {1, 2, 3, 4, 5, 6} is transitive. However, it is imprimitive, since {1, 3, 5} and {2, 4, 6} are non-trivial blocks. Indeed, if we let a = (1, 2, 3, 4, 5, 6), then {1, 3, 5}a = {2, 4, 6} and {2, 4, 6}a = {3, 5, 1}. Hence for all k ≥ 0, we either have {1, 3, 5}ak ∩ {1, 3, 5} = ∅ or {1, 3, 5}ak ∩ {1, 3, 5} = {1, 3, 5}, and similarly for {2, 4, 6}. One may also verify that {1, 4}, {2, 5} and {3, 6} are non-trivial blocks, and that there are no blocks of size 4 or 5.  Example 2. Consider the group G = h(1, 2, 3, 4, 5)i ≤ S5 . This group is clearly transitive, and it is also primitive. To see this, suppose for a contradiction that B is a non-trivial block. Let a = (1, 2, 3, 4, 5) and let k = |b − b′ |, where b and b′ are distinct elements of B. Then Bak ∩ B 6= ∅, so we must have Bak = B since B is a block. Thus for each i ∈ B, we have iak ∈ Bak , and thus iak ∈ B. Then since iak ∈ B, we have ia2k ∈ Bak , and thus ia2k ∈ B. By induction it follows that {iank : n ≥ 0} ⊆ B. We claim {iank : n ≥ 0} = {1, 2, 3, 4, 5}, which contradicts the fact that B is a non-trivial block. Indeed, for j ∈ {1, 2, 3, 4, 5}, we have iank = j if and only if i + nk ≡ j (mod 5). Since 5 is prime and 0 < k < 5, we see that k is coprime with 5. Hence by elementary number theory, there exists n such that nk ≡ j − i (mod 5) and so i + nk ≡ i + j − i ≡ j (mod 5) as required. Hence j ∈ {iank : n ≥ 0} for all j ∈ {1, 2, 3, 4, 5}, which proves the claim. It follows G has no non-trivial blocks, and thus G is primitive.  The above argument can be generalized to prove that a cyclic group G = h(1, 2, . . . , n)i is primitive if and only if n is prime. If a = (1, 2, . . . , n), then for each divisor d of n and each integer 1 ≤ i ≤ n, we see that {iamd : m ≥ 0} is a block. In particular, when n is composite, there exists a divisor d with 1 < d < n, giving rise to a non-trivial block. Example 3. Consider the group G = h(1, 2, 3), (4, 5, 6)i ≤ S6 . This group is intransitive, since (for example) it does not contain a permutation mapping 1 to 4. Thus it is imprimitive by definition. Alternatively, observe that {1, 2, 3} and {4, 5, 6} are non-trivial blocks for G. Generally an intransitive group will always have non-trivial blocks, but there is one exception: the trivial subgroup of S2 (containing only the identity element). The natural action of this group is clearly not transitive on {1, 2}, but its only blocks are the trivial blocks {1}, {2} and {1, 2}. To avoid dealing with this exception, we require primitive groups to be transitive by definition.  The next example shows that we have the following hierarchy of permutation group properties: (2-transitive) ⇒ (primitive) ⇒ (transitive). 6 These implications do not reverse. Cyclic groups of composite order give examples of transitive imprimitive groups, while cyclic groups of prime order p ≥ 5 give examples of primitive, non-2-transitive groups. (For example, the group h(1, 2, 3, 4, 5)i ≤ S5 is not 2-transitive on {1, 2, 3, 4, 5} since nothing maps the pair (1, 2) to the pair (1, 3).) Example 4. The alternating group An is 2-transitive for n ≥ 4. Indeed, given i, i′ , j, j ′ ∈ {1, . . . , n}, the permutation (i, i′ )(j, j ′ ) is the product of an even number of 2-cycles, and it maps the pair (i, j) to (i′ , j ′ ). We claim An is also primitive for n ≥ 2. To see this, first note that An is a cyclic group of prime order for 2 ≤ n ≤ 3. For n ≥ 4, suppose for a contradiction that B is a non-trivial block. Then B has at least two elements i and j, but B is not all of {1, . . . , n}. Choose k ∈ {1, . . . , n} \ B. Since An is 2-transitive, there exists an element g ∈ An which maps the pair (i, j) to (j, k). Then Bg ∩ B 6= ∅ (since Bg and B contain j), and thus Bg ∩ B = Bg = B since B is a block. But Bg contains k and B does not, which is a contradiction. Thus all blocks of An are trivial, and thus An is primitive. In fact, this argument shows that all 2-transitive groups are primitive.  The following fact is immediate from the definitions of transitivity and primitivity, and is frequently useful: if H is a subgroup of G and H is transitive (primitive), then G is also transitive (primitive). For example, the symmetric group Sn is primitive for n ≥ 2, since it contains the primitive group An . So far, we have only looked at cyclic groups and the symmetric and alternating groups. For our last pair of examples, we consider two subgroups of S6 that are a little more interesting. Example 5. Define a = (2, 4, 6), b = (1, 5)(2, 4) and c = (1, 4, 5, 2)(3, 6), and let G = ha, b, ci. We claim this group is transitive on {1, . . . , 6}. For g ∈ G and g i, j ∈ {1, . . . , 6}, we will write i −→ j to mean ig = j. Observe that c3 a2 c c 1 −→ 2 −→ 6 −→ 3, c 1 −→ 4 −→ 5. Thus for each i 6= 1, there is some group element that maps 1 to i. If g ∈ G maps 1 to i, then g −1 maps i to 1. It follows for each i, j, there is some element x that maps i to 1, and another element y that maps 1 to j, giving y x i −→ 1 −→ j. Thus G is transitive. It is also imprimitive, with non-trivial blocks {1, 3, 5} and {2, 4, 6}. Indeed, we see that a b c {1, 3, 5} −→ {1, 3, 5}, {1, 3, 5} −→ {5, 3, 1}, {1, 3, 5} −→ {4, 6, 2}. Hence these sets are non-trivial blocks.  7 Example 6. Define a = (1, 2, 3, 4, 6) and b = (1, 2)(3, 4)(5, 6) and let G = ha, bi. It is easy to see that this group is transitive on {1, . . . , 6}: just verify that 1 can be mapped to every other element and use the argument from the previous example. This group is also primitive. To see this, first note that the subgroup hai acts primitively on {1, 2, 3, 4, 6}, since it is a cyclic group of prime order. Hence a non-trivial block of G cannot be a subset of {1, 2, 3, 4, 6}, so in particular a non-trivial block of G must contain 5. Suppose B is a non-trivial block that contains 5; then Ba ∩ B contains 5 and hence Ba ∩ B = Ba = B. Since B is non-trivial, it contains some element i 6= 5, and since Ba = B we have {i, ia, ia2, . . . , ia4 } = {1, 2, 3, 4, 6} ⊆ B. This implies B = {1, 2, 3, 4, 5, 6}, and so B is trivial, which is a contradiction. Thus all blocks of G are trivial, and thus G is primitive.  A congruence of a monoid action of M on X is an equivalence relation on X that is M -invariant in the following sense: if E is an equivalence class, then for all m ∈ M , there exists an equivalence class E ′ such that Em ⊆ E ′ . In other words, if x and x′ are equivalent, then xm and x′ m are equivalent for all m ∈ M . The equality congruence {(x, x) : x ∈ X} in which elements are equivalent only if they are equal, and the full congruence X × X in which all elements are equivalent, are called trivial congruences. If M is a transformation monoid on X, a congruence of the natural action is called an M -congruence. The notion of congruences leads to an important alternate characterization of primitivity. In the case of a permutation group G on X, notice that for all S ⊆ X and g ∈ G, the set Sg has the same size as S. Hence a G-congruence has the following property: if E is an equivalence class, then for all g ∈ G, the set Eg is also an equivalence class. In particular, we either have E ∩ Eg = E or E ∩ Eg = ∅ for all g ∈ G; thus the classes of G-congruences are blocks. In fact, if G is transitive, then every G-congruence arises from the blocks of G as follows. If B is a block for G, the block system corresponding to B is the set {Bg : g ∈ G}. As the name implies, each set in a block system is also a block for G. Indeed, for all g ′ ∈ G, we either have Bgg ′ ∩ Bg = ∅ or Bgg ′ ∩ Bg 6= ∅, and in the latter case, Bgg ′ g −1 ∩ B 6= ∅. But B is a block, so this implies Bgg ′ g −1 = B and thus Bgg ′ = Bg. Thus every set in a block system in a block, so in particular, all distinct sets in a block system are pairwise disjoint. Furthermore, since G is transitive, each element of X appears in at least one block of the system. It follows that block systems are partitions of X, and thus equivalence relations on X. It is easy to see that block systems are G-invariant, and thus are G-congruences. Thus every block gives rise to a block system that is a G-congruence, and every G-congruence consists of blocks; it follows block systems and G-congruences are one and the same if G is a transitive group. If all G-congruences are trivial, then all block systems of G consist only of trivial blocks, and vice versa. Thus we obtain our alternate characterization of primitivity: a transitive permutation group G on X is primitive if and only if all G-congruences are trivial. Let us revisit some of our earlier examples of primitive and imprimitive groups in the context of this new characterization. 8 Example 7. Consider the imprimitive cyclic group G = ha = (1, 2, 3, 4, 5, 6)i ≤ S6 of Example 1. Put an equivalence relation ∼ on X = {1, . . . , 6} by letting i ∼ j if i and j have the same parity (odd or even). Notice that for i ∈ X, the elements i and ia have opposite parity. Thus ∼ is a G-congruence, since if i ∼ j then ia ∼ ja, and so if [i] is the equivalence class of i then [i]a = [ia] is also an equivalence class. In fact, the classes of ∼ are just the blocks {1, 3, 5} and {2, 4, 6} we found in Example 1; thus the G-congruence ∼ corresponds to the block system {{1, 3, 5}, {2, 4, 6}}. If we define an equivalence relation by i ∼ j if i and j are equivalent modulo 3, we obtain a non-trival G-congruence corresponding to the block system {{1, 4}, {2, 5}, {3, 6}}. As for the trivial G-congruences, the equality congruence corresponds to the block system {{1}, {2}, . . . , {6}} containing the singletons, and the full congruence corresponds to the block system {{1, . . . , 6}} that just contains the full set X.  Example 8. Consider the primitive cyclic group G = h(1, 2, 3, 4, 5)i ≤ S5 of Example 2. With the notion of G-congruences, it is much easier to prove that this group is primitive. Indeed, fix a G-congruence on X. By G-invariance, all classes of the G-congruence must have the same size, say m. If the congruence has n classes, then we have mn = |X| = 5. So m is either 1 or 5 since 5 is prime, which means the classes are either singletons (giving the equality congruence) or the full set X (giving the full congruence). Thus all G-congruences are trivial, and thus G is primitive. Alternatively, we could make the same argument in terms of block systems, using the fact that all blocks in a system have the same size to show all blocks must be trivial. This argument actually shows that not only are cyclic groups of prime order primitive, but all transitive groups of prime degree are primitive (since |X| is the degree of a permutation group on X).  2.2 Languages, Automata and State Complexity Let Σ be a finite set. The set of all finite-length sequences of elements of Σ is called the free monoid generated by Σ, and is denoted Σ ∗ . In this context, elements of Σ are called letters, and elements of Σ ∗ are called words over Σ. The operation of the free monoid is concatenation of words, and the identity element is the empty word ε of length zero. A set L ⊆ Σ ∗ is called a language over Σ, and Σ is called the alphabet of L. We use the convention that a language L ⊆ Σ ∗ is implicitly a pair (L, Σ), so for example, the language {a, ab} over alphabet {a, b} and the language {a, ab} over alphabet {a, b, c} are distinct. In particular, two words over different alphabets are necessarily distinct. This is similar to the convention which views two functions with different codomains as necessarily distinct. A deterministic finite automaton (DFA) is a tuple A = (Q, Σ, δ, 1, F ) where Q and Σ are finite sets, δ : Q × Σ ∗ → Q is a monoid action, 1 ∈ Q, and F ⊆ Q. The elements of Q are called states; the state 1 is called the initial state and the states in F are called final states. The set Σ is the alphabet of the automaton. The monoid action δ is called the transition function. 9 Since Σ generates Σ ∗ , we may completely specify the action δ by defining the function aδ : Q → Q for each a ∈ Σ. If w = a1 · · · ak for a1 , . . . , ak ∈ Σ, then wδ : Q → Q is the composition (a1 )δ · · · (ak )δ . The function εδ : Q → Q is necessarily the identity map. The monoid M (A) = {wδ : w ∈ Σ ∗ } is called the transition monoid of A; it is a submonoid of TQ and thus has a natural action on Q. We call the function wδ the action of w. Under our notational conventions, we may write δ(p, w) = q as pwδ = q or simply pw = q. We may also extend wδ by union and apply it to subsets of the state set: for X ⊆ Q we w have Xw = {qw : q ∈ X}. We also sometimes write p −→ q to mean pw = q. A state q ∈ Q is reachable from p ∈ Q if pw = q for some w. Two states p, q ∈ Q are distinguishable by X ⊆ Q if there exists w ∈ Σ ∗ such that pw ∈ X ⇔ qw 6∈ X. We frequently use two special cases of these definitions: A state q ∈ Q is reachable if it is reachable from the initial state 1, and states p, q ∈ Q are distinguishable if they are distinguishable by F . We say A is accessible if every state is reachable (from the initial state 1), and strongly connected if every state is reachable from every other state. A state q ∈ Q is empty if qw 6∈ F for all w ∈ Σ ∗ . In a strongly connected DFA, there exists an empty state if and only if all states are empty. Consider the following relation on Q: two states p, q ∈ Q are related if and only if they are indistinguishable by X ⊆ Q, that is, for all w ∈ Σ ∗ we have pw ∈ X ⇔ qw ∈ X. This is an equivalence relation on Q, and in fact it is an M (A)-congruence. Indeed, if p and q are equivalent, we have pw ∈ X ⇔ qw ∈ X for all w ∈ Σ ∗ . So in particular, if we take w = xy for some fixed x ∈ Σ ∗ , then (px)y ∈ X ⇔ (qx)y ∈ X for all y ∈ Σ ∗ , and thus px and qx are equivalent for all x ∈ Σ ∗ . This congruence is called the indistiguishability congruence of X. The language recognized by A or simply language of A is the language L(A) = {w ∈ Σ ∗ : 1w ∈ F } over Σ. A language which can be recognized by a DFA is called a regular language. Two DFAs are equivalent if they have the same language. Two DFAs A = (Q, Σ, δ, 1, F ) and A′ = (Q′ , Σ ′ , δ ′ , 1′ , F ′ ) with Σ = Σ ′ are isomorphic if there is a bijection f : Q → Q′ such that 1f = 1′ , F f = F ′ , and (qaδ )f = (qf )aδ′ for all a ∈ Σ; in other words, they are identical up to the naming of the states. In particular, isomorphic DFAs are equivalent. We say A is minimal if the number of states is minimal among all DFAs equivalent to A. It is well-known that for each regular language L, all minimal DFAs recognizing L are isomorphic and hence have the same number of states. The number of states in a minimal DFA for L is called the state complexity of L, and is denoted sc(L). A DFA A is minimal if and only if all states are reachable and all pairs of states are distinguishable. Given a binary regular operation ◦, the state complexity of the operation ◦ is the following function: (m, n) 7→ max{sc(Lm ◦ Kn ) : sc(Lm ) = m, sc(Kn ) = n}. That is, it is the maximal state complexity of the language resulting from the operation, expressed as a function of the state complexities of the operation’s arguments. 10 For f : N × N → N and g : N × N → N, we say f ≤ g if f (m, n) ≤ g(m, n) for all (m, n) ∈ N × N; we say that f is an upper bound for the state complexity of the operation ◦ if sc(◦) ≤ f , and a tight upper bound if sc(◦) = f . In the definition of state complexity of operations, we assume that ◦ takes two languages over the same alphabet as arguments. This is justified by our view that words over different alphabets are necessarily distinct; hence, for example, the union of two languages over different alphabets would be a set containing a mixture of words over different alphabets, which is not a language. To perform such an operation, one must first convert the operands to languages over a common alphabet. This convention is very common in the literature; however, Brzozowski has recently argued this convention is unnecessary, and in fact leads to incorrect state complexity bounds for operations on languages over different alphabets, since converting the input languages to a common alphabet can change their state complexities [7]. Brzozowski introduces a distinction between restricted state complexity of operations, the traditional model in which operands must have the same alphabet, and unrestricted state complexity of operations, a new model which produces accurate state complexity bounds for operations on languages over different alphabets. We use restricted state complexity in this paper for the following reasons. First, computing unrestricted state complexity requires using DFAs which have an empty state, and in particular are not strongly connected. In this paper, we mainly study DFAs whose transition monoids are permutation groups, which are always strongly connected. This group-theoretic focus is essential to most of our results. Working with DFAs that are not strongly connected would take us into the realm of semigroup theory, and we are unsure how much of our work would carry over. Second, restricted state complexity has been the dominant model of state complexity of operations for many years, while unrestricted state complexity is a recent generalization. Although restricted state complexity gives incorrect results when applied to languages over different alphabets, it is otherwise a correct model. We have chosen to study the simpler case of restricted state complexity in this paper and leave the more general unrestricted case for potential future work. 3 Primitive Groups and Uniform Minimality A DFA A = (Q, Σ, δ, 1, F ) is called a permutation DFA if M (A) is a permutation group on Q. In this case we call M (A) the transition group rather than the transition monoid. The languages recognized by permutation DFAs are called group languages. Proposition 1. For a permutation DFA A, the following are equivalent: 1. A is accessible. 2. A is strongly connected. 3. M (A) is transitive. 11 Proof. (1) ⇒ (3): Since A is accessible, for each q ∈ Q there exists wq ∈ Σ ∗ such that 1wq = q. Since M (A) is a group, the element wq has an inverse, and thus for all p, q ∈ Q we have p(wp )−1 wq = 1wq = q. It follows M (A) is transitive. (3) ⇒ (2): Since M (A) is transitive, for all p, q ∈ Q there exists w ∈ Σ ∗ such that pw = q. This is precisely saying that A is strongly connected. The last implication (2) ⇒ (1) is immediate. ⊓ ⊔ Note that (2) ⇔ (3) holds for arbitrary DFAs, not only permutation DFAs. Let A = (Q, Σ, δ, 1, F ) be a DFA and let L = L(A) be its language. For S ⊆ Q, we write A(S) for the DFA A = (Q, Σ, δ, 1, S) obtained by replacing the final state set of A with S. We say a regular language L′ is a cognate of L if L′ = L(A(S)) for some S ⊆ Q. We say a DFA A′ is a cognate of A if A′ = A(S) for some S; so a language is a cognate of L if and only if it is recognized by a cognate of A. If S = Q or S = ∅, then A(S) is called a trivial cognate of A, since L(A(S)) is either Σ ∗ or the empty language ∅. We say A is uniformly minimal if all non-trivial cognates of A are minimal. That is, we can reassign the final state set of the DFA in any non-trivial way and the new DFA will always be minimal. Equivalently, all cognates of L = L(A) have the same state complexity |Q|. This definition is essentially restricted to accessible DFAs, since if A is not accessible, then not all states are reachable and hence no cognate of A can be minimal. Restivo and Vaglica introduced and studied uniformly minimal DFAs in [17]. Their notion of uniform minimality is almost the same as ours, except it is restricted to strongly connected DFAs. Presumably, Restivo and Vaglica were interested in DFAs that are minimal for every reassignment of initial and final states; if a DFA is not strongly connected, we can reassign the initial state to obtain a new DFA which is not accessible and hence not minimal. However, for strongly connected DFAs, the choice of initial state has no effect on minimality since every state is reachable from each possible choice of initial state. Hence we lose nothing by fixing an initial state and generalizing to accessible DFAs. Remark. Restivo and Vaglica also studied uniformly minimal DFAs in [16], but they used different terminology. They used the term “almost uniformly minimal” for the notion discussed above, and used “uniformly minimal” for a stronger condition that can only be met by incomplete DFAs (which we do not discuss in this paper). A DFA A is called simple if all M (A)-congruences are trivial. Ésik proved the following result for strongly connected DFAs [17, Proposition 1]. The same proof works for accessible DFAs. Proposition 2. An accessible DFA A is uniformly minimal if and only if it is simple. Proof. Suppose A is simple, that is, all M (A)-congruences are trivial. Then in particular, for every S ⊆ Q, the indistiguishability congruence of S is trivial. If the indistiguishability congruence for S is the equality relation, then each state 12 lies in its own class, so all pairs of states are distinguishable. Since A is accessible, all states are reachable, and hence A is minimal. If the indistinguishability congruence for S is the full relation, then all states are indistinguishable. But final states are always distinguishable from non-final states, so this can only happen if all states are final (S = Q) or all states are non-final (S = ∅). Hence if ∅ ( S ( Q, then A(S) is minimal, so it follows that A is uniformly minimal. Conversely, suppose A is not simple, and there exists a non-trivial M (A)congruence. Then this congruence has a class E which has at least two elements, but is not all of Q. Let E be the final state set of A and let p, q ∈ E. For all w ∈ Σ ∗ , the states pw and qw both lie in the set Ew, which is contained in some congruence class E ′ . If E ′ = E, then we have pw, qw ∈ E. If E ′ ∩ E = ∅, then we have pw, qw 6∈ E. Thus for all w ∈ Σ ∗ , we have pw ∈ E ⇔ qw ∈ E, and so p and q are not distinguishable by E. Hence A is not uniformly minimal, since A(E) is not minimal. ⊓ ⊔ In the special case of permutation DFAs, we have: Corollary 1. An accessible permutation DFA A is uniformly minimal if and only if M (A) is primitive. Proof. If A is uniformly minimal, then it is simple, so all M (A)-congruences are trivial. Now, recall that a group G is primitive if and only if all G-congruences are trivial. Since M (A) is a group, we see that M (A) is primitive. Conversely, if M (A) is primitive, then all M (A)-congruences are trivial. Hence A is simple and hence uniformly minimal. ⊓ ⊔ Note that both implications in Corollary 1 are vacuously true if A is not accessible: A cannot be uniformly minimal, and M (A) cannot be transitive and thus cannot be primitive. Thus one can technically omit the accessible assumption. It seems this relationship between primitivity and minimality has been overlooked until recently. Primitive groups have seen increasing application in automata theory over the past decade, particularly in connection with the classical synchronization problem for DFAs; for a survey of such work see [2]. The connection between simple DFAs and primitive groups was recently noted by Almeida and Rodaro [1]. However, primitive groups are not mentioned in Restivo and Vaglica’s work on uniformly minimal DFAs, nor in any other work on DFA minimality that we are aware of. The wealth of results on primitive groups makes Corollary 1 quite useful for studying and constructing uniformly minimal DFAs. For example, we can use this corollary to easily prove that for each n ≥ 2, there exists a uniformly minimal DFA with n states. Restivo and Vaglica proved this using a rather complicated construction [16, Theorem 3]. Proposition 3. For each n ≥ 2, there exists a uniformly minimal permutation DFA with n states. 13 Proof. The symmetric group Sn is primitive for all n ≥ 2, and clearly for each n ≥ 2 there exists an n-state DFA with transition group Sn . For example, let {g1 , . . . , gk } be a generating set of the symmetric group and let A be a DFA with states {1, . . . , n}, alphabet Σ = {a1 , . . . , ak }, and transition function δ with (ai )δ = gi for 1 ≤ i ≤ k. In fact we can use a binary alphabet, since Sn has generating sets of size two for all n ≥ 2. ⊓ ⊔ This proof illustrates a technique that is very useful for producing examples of DFAs. If we have a generating set for a transformation monoid, we can construct a DFA which has that monoid as its transition monoid. Example 9. Let A be the DFA with alphabet {a, b} defined as follows. – The states are {1, 2, 3, 4}, the initial state is 1, and the final states are {3, 4}. – The transformations are the permutations a = (2, 3, 4) and b = (1, 2)(3, 4). More formally, we mean that the transition function δ of A is given by aδ = (2, 3, 4) and bδ = (1, 2)(3, 4). However, we will generally be brief when describing DFAs, as above. The permutations (1, 2)(3, 4) and (2, 3, 4) generate the alternating group A4 . Thus the transition group of A is A4 . We saw in Example 4 that A4 is transitive and primitive. Hence by Proposition 1, A is strongly connected, and by Corollary 1, A is uniformly minimal. A state diagram of A is given in Figure 1. We can see from the diagram that A is indeed strongly connected. It is tedious, but possible to verify that A is uniformly minimal by checking that it is minimal with respect to every non-empty, proper subset of {1, 2, 3, 4}.  a a a, b b 1 a 2 3 4 b b Fig. 1. Uniformly minimal DFA A of Example 9. a 1 a 2 a 3 a 4 a 5 a 6 Fig. 2. Non-minimal DFA A of Example 10 with an imprimitive transition group. 14 Example 10. Let A be the DFA with alphabet {a}, states {1, . . . , 6}, initial state 1, final states F = {1, 3, 5} and a = (1, 2, 3, 4, 5, 6). A diagram is in Figure 2. The transition group G of A is the cyclic group of order six, which is imprimitive. We saw in Example 1 that F = {1, 3, 5} is a block for this group. Hence for all k, we either have F ak = F or F ak ∩ F = ∅. Thus if i, j ∈ F , then for all k we have iak ∈ F ⇔ jak ∈ F . This means all pairs of states in F are indistinguishable by F , and hence A is not minimal. This argument actually shows that whenever F is a non-trivial block of G, the DFA A is not minimal. In fact, this also holds whenever F is a union of non-trivial blocks of G (see Lemma 1 below). Note that if we construct a DFA from a cyclic group of prime order, we get a uniformly minimal DFA, since cyclic groups of prime order are primitive.  There exist many infinite families of primitive groups, and hence of uniformly minimal permutation DFAs. However, there are infinitely many positive integers n for which the only primitive groups of degree n are Sn and An [12, pg. 66]. Hence other infinite families of primitive groups cannot be used to construct n-state uniformly minimal DFAs for every n, unless we “fill in the gaps” with symmetric or alternating groups. Remark. Steinberg has extended the notion of primitivity to transformation monoids [20]. Steinberg defines a transformation monoid M to be primitive if there are no non-trivial M -congruences. Under this definition, an accessible DFA A is uniformly minimal if and only if the transition monoid M (A) is primitive. However, we have not investigated whether any of our other results that hold for primitive groups are also true for primitive monoids. We close this section with a technical lemma that generalizes Proposition 2. If M is a transformation monoid on X and S ⊆ X, we say that S is saturated by an M -congruence if it is a union of classes of the M -congruence. Lemma 1. An accessible DFA A with ∅ ( F ( Q is minimal if and only if there is no non-trivial M (A)-congruence that saturates F . It follows that if all M (A)-congruences are trivial, then A is uniformly minimal. Conversely, if there is a non-trivial M (A)-congruence, then it saturates its own congruence classes and at least one class is a proper non-empty subset of Q, and thus A is not uniformly minimal. Hence this indeed generalizes Proposition 2. Proof. We prove the contrapositive: A is not minimal if and only if there exists a non-trivial M (A)-congruence that saturates F . Suppose A is not minimal. Then the indistinguishability congruence of F is a non-trivial M (A)-congruence, since at least two states are indistinguishable. Suppose there is an indistinguishability class E that is neither contained in F nor disjoint from F . Then there exist p, q ∈ E such that p ∈ F and q 6∈ F . But then p and q are distinguishable by F , which cannot happen since E is an indistinguishability class. Thus for each indistinguishability class [q], we have 15 S [q] ⊆ F or [q] ∩ F = ∅. Then we have F = f ∈F [f ], so F is saturated by its indistinguishability congruence. Conversely, let E1 , . . . , Ek ⊆ Q be the congruence classes of a non-trivial M (A)-congruence that saturates F . Choose a congruence class Ei of size at least two. Then for all w ∈ Σ ∗ we have Ei w ⊆ Ej for some j. Since F is a union of congruence classes, either Ej ⊆ F or Ej ∩ F = ∅. Hence for p, q ∈ Ei and all w ∈ Σ ∗ , we have pw ∈ F ⇔ Ej ⊆ F ⇔ Ei w ⊆ F ⇔ qw ∈ F . It follows that states in Ei are indistinguishable, and thus A is not minimal. ⊓ ⊔ In the special case of permutation DFAs, this has a useful consequence. Corollary 2. Let A be a permutation DFA. If |F | = 1 or |F | = |Q| − 1, then A is minimal if and only if it is accessible. Proof. Recall that if G is a transitive permutation group and E and E ′ are classes of a G-congruence, then |E| = |E ′ |. It follows that if |F | = 1, then a non-trivial M (A)-congruence cannot saturate F since all the congruence classes have size at least two. Furthermore, an M (A)-congruence saturates F if and only if it saturates Q \ F , and if |F | = |Q| − 1 then a non-trivial M (A)-congruence cannot saturate the set Q \ F of size one. Hence if A is accessible, it is minimal by Lemma 1. On the other hand, if A is not accessible, it cannot be minimal. ⊓ ⊔ 4 Main Results Throughout this section, A = (Q, Σ, δ, 1, F ) and A′ = (Q′ , Σ ′ , δ ′ , 1′ , F ′ ) are minimal DFAs with a common alphabet Σ = Σ ′ . The languages of A and A′ are L and L′ , and the transition monoids are M and M ′ , respectively. For w ∈ Σ ∗ , we write w for wδ ∈ M and w′ for wδ′ ∈ M ′ . Sometimes we will assume A and A′ are permutation DFAs, and then we will use G and G′ for the transition groups rather than M and M ′ . 4.1 Direct Products and Boolean Operations The direct product of A and A′ is the DFA A×A′ with state set Q×Q′ , alphabet a Σ, transitions (q, q ′ ) −→ (qa, q ′ a′ ) for each (q, q ′ ) ∈ Q × Q′ and a ∈ Σ, initial state (i, i′ ), and an unspecified set of final states. By assigning particular sets of final states to A × A′ as described below, we can recognize the languages resulting from arbitrary binary boolean operations on L and L′ . Fix a function ◦ : {0, 1}2 × {0, 1}; these are called binary boolean functions. For a set S, let χS : S → {0, 1} denote the characteristic function of S, defined by χS (x) = 1 if x ∈ S and χS (x) = 0 otherwise. We can think of χS (x) as giving the “truth value” of the proposition “ x ∈ S ”, where 0 is false and 1 is true. Now for F ⊆ Q and F ′ ⊆ Q′ , define F ◦ F ′ = {(q, q ′ ) ∈ Q × Q′ : χF (q) ◦ χF ′ (q ′ ) = 1}. Then A × A′ with final states F ◦ F ′ recognizes the language L ◦ L′ defined by L ◦ L′ = {w ∈ Σ ∗ : χL (w) ◦ χL′ (w) = 1}. 16 For example, if ◦ : {0, 1}2 → {0, 1} is the “logical or” function, then L ◦ L′ = L ∪ L′ , since w ∈ L ◦ L′ if w ∈ L or w ∈ L′ . Similarly, the “logical and” function gives the intersection L ∩ L′ . We say that a boolean function (and the associated boolean operation on languages) is proper if its output depends on both of its arguments. For example, u ◦ v = 1 − u (giving L ◦ L′ = Σ ∗ \ L) only depends on the first argument, and u ◦ v = 0 (giving with L ◦ L′ = ∅) depends on neither argument, so they are not proper. If L and L′ have state complexity m and n respectively, then the improper binary boolean operations have state complexity 1 (if they are constant), state complexity m (if they depend only on the first operand), or state complexity n (if they depend only on the second operand). There are 16 binary boolean operations in total, and one may easily verify that 10 of them are proper. If A and A′ have m and n states respectively, A × A′ has mn states. Hence every proper binary boolean operation has state complexity bounded by mn. It is well-known that this bound is tight for general regular languages, and it remains tight for regular group languages. In fact, the original witnesses for union given by Maslov [15] and Yu et al. [21] are group languages, and we will demonstrate later (in Example 13) that these languages are also witnesses for all other proper binary boolean operations. We will say the pair (L, L′ ) has maximal boolean complexity if sc(L ◦ L′ ) = sc(L) sc(L′ ) for all proper binary boolean operations ◦. Suppose that ∅ ( F ( Q and ∅ ( F ′ ( Q′ . We say a subset of Q × Q′ is (F, F ′ )-compatible if it is equal to F ◦ F ′ for some proper binary boolean operation ◦. Notice that (L, L′ ) has maximal boolean complexity if and only if A × A′ is minimal for every (F, F ′ )-compatible subset of Q × Q′ . We disallow F = ∅ and F = Q since then A × A′ is minimal for F ◦ F ′ only if |Q| = 1 and L = ∅ or L = Σ ∗ ; these cases are uninteresting. Similarly, we exclude F ′ = ∅ and F ′ = Q′ . We say the pair (A, A′ ) (or the direct product A × A′ ) is uniformly boolean minimal if for every pair of sets (S, S ′ ) with ∅ ( S ( Q and ∅ ( S ′ ( Q′ and every (S, S ′ )-compatible set S ◦ S ′ , the DFA (A × A′ )(S ◦ S ′ ) is minimal. In other words, if every pair of cognates of L and L′ has maximal boolean complexity. We give an example of a pair of DFAs that are not uniformly boolean minimal, as well as a pair of DFAs that are. Example 11. Define two DFAs over alphabet Σ = {a, b, c} as follows: – A has state set Q = {1, 2}, initial state 1, final state set F = {1}, and transformations a = b = (1, 2), c = (). – A′ has state set Q′ = {1, 2}, initial state 1, final state set F ′ = {1}, and transformations a′ = c′ = (1, 2), b′ = (). We show that (L(A), L(A′ )) does not have maximal boolean complexity, and thus A × A′ is not uniformly boolean minimal. 17 To see this, consider the symmetric difference operator ⊕, arising from the “exclusive or” boolean function: for u, v ∈ {0, 1}, the “exclusive or” u ⊕ v is zero if u = v and one if u 6= v. The corresponding operation on languages over Σ is L ⊕ L′ = {w ∈ Σ ∗ : w ∈ L or w ∈ L′ , but not both} = (L \ L′ ) ∪ (L′ \ L). The final state set that makes A × A′ recognize L(A) ⊕ L(A′ ) is: F ⊕ F ′ = {(q, q ′ ) ∈ Q × Q : q ∈ F or q ′ ∈ F ′ , but not both} = {(1, 2), (2, 1)}. State diagrams of the DFAs A, A′ and (A × A′ )(F ⊕ F ′ ) are shown in Figure 3. Notice that (A × A′ )(F ⊕ F ′ ) is not minimal: the states (1, 2) and (2, 1) cannot be distinguished. Since F ⊕ F ′ is an (F, F ′ )-compatible set, it follows that (L(A), L(A′ )) does not have maximal boolean complexity, and that A × A′ is not uniformly boolean minimal.  c c 1, 1 c 1, 2 a, b 1 c 2 a, b b b b a a a b a, c 1 a b b 2 a, c c 2, 1 2, 2 c Fig. 3. DFAs A, A′ and A × A′ of Example 11. The final state set of A × A′ is chosen so that A × A′ recognizes the symmetric difference of the languages of A and A′ . Example 12. Define two DFAs over alphabet Σ = {a, b} as follows: – A has state set Q = {1, 2} and transformations a = (1, 2), b = (). – A′ has state set Q′ = {1, 2, 3} and transformations a′ = (1, 2), b′ = (1, 2, 3). The initial and final states are not important for this example. The direct product A × A′ is shown in Figure 4. Notice that the transition group of A′ is S3 . We will see much later (Corollary 3) that this implies A × A′ is uniformly boolean minimal. Note that A × A′ is not uniformly minimal; for example, it is not minimal with respect to the final state set {(1, 1), (1, 2), (1, 3)}. If |Q|, |Q′ | ≥ 2, a direct product DFA with state set Q×Q′ can never be uniformly minimal. In particular, it cannot be minimal for final state sets of the form S × Q′ (“unions of rows”) or Q × S ′ (“unions of columns”). However, the definition of uniform boolean minimality excludes these sets.  18 b b 1, 1 1, 2 a a a a b 1, 3 a 2, 1 b 2, 2 b a 2, 3 b Fig. 4. Uniformly boolean minimal DFA A × A′ of Example 12. Bell, Brzozowski, Moreira and Reis found sufficient conditions for a pair of DFAs to be uniformly boolean minimal [3]. However, these conditions require that the transition monoids of the DFAs contain the symmetric group, in the sense that they contain every permutation of the DFA’s state set. In particular, for permutation DFAs, these conditions only apply when the transition group is the symmetric group on the state set. We obtain more general sufficient conditions for uniform boolean minimality in permutation DFAs, which apply to a larger class of transition groups. Additionally, we show that DFAs whose transition monoids contain 2-transitive groups “usually” meet these conditions, up to some technical assumptions we will state later. We also obtain necessary and sufficient conditions for a pair of languages (L, L′ ) to have maximal boolean complexity in the special case where L and L′ are recognized by permutation DFAs A and A′ with exactly one final state. In this special case, it turns out (L, L′ ) has maximal boolean complexity if and only if A × A′ is accessible. We give several group-theoretic conditions and a graph-theoretic condition that are equivalent to A × A′ being accessible. We begin with a proposition which characterizes (F, F ′ )-compatible subsets. If Q is the state set of a DFA and S ⊆ Q, write S for Q \ S. Similarly, if L is a language over Σ, write L for Σ ∗ \ L. Proposition 4. Let ∅ ( F ( Q and ∅ ( F ′ ( Q′ . A subset of Q × Q′ is (F, F ′ )-compatible if and only it is equal to one of the following sets: (a) (b) (c) (d) (e) (f ) F × F ′ (corresponding to L ∩ L′ ). F × F ′ (corresponding to L ∩ L′ = L \ L′ ). F × F ′ (corresponding to L ∩ L′ = L′ \ L). F × F ′ (corresponding to L ∩ L′ = L ∪ L). (F ×F ′ )∪(F ×F ′ ) (corresponding to symmetric difference (L\L′ )∪(L′ \L)). The complement (Q × Q′ ) \ S, where S is one of the above sets. Proof. Let ◦ be a proper binary boolean function. Let k be the number of pairs (u, v) ∈ {0, 1} × {0, 1} such that u ◦ v = 1. 19 Case 1 (k = 1): If k = 1, then there is a unique pair (u, v) such that u ◦ v = 1. Hence F ◦ F ′ = {(q, q ′ ) : χF (q) = u and χF ′ (q ′ ) = v}. Consider possible values for (u, v): – – – – If If If If (u, v) = (0, 0) (u, v) = (0, 1) (u, v) = (1, 0) (u, v) = (1, 1) then then then then F F F F ◦ F′ ◦ F′ ◦ F′ ◦ F′ =F =F =F =F × F ′. × F ′. × F ′. × F ′. Hence F ◦ F ′ is a set of type (a), (b), (c) or (d). Case 2 (k = 2): If k = 2, there are exactly two pairs (u, v) and (u′ , v ′ ) such that u ◦ v = u′ ◦ v ′ = 1. We claim that u 6= u′ and v 6= v ′ . To see this, suppose u = u′ . Then we must have v 6= v ′ , or else the pairs are not distinct. Thus {v, v ′ } = {0, 1} and it follows u ◦ 0 = u ◦ 1 = 1. Hence ◦ only depends on the value of the first argument, which contradicts the fact that ◦ is proper. By a symmetric argument, we cannot have v = v ′ . Now, observe that (q, q ′ ) is in F ◦ F ′ if and only if χF (q) = u and χF ′ (q ′ ) = v or χF (q) = u′ and χF ′ (q ′ ) = v ′ . Suppose (u, v) = (1, 0). Then we necessarily have (u′ , v ′ ) = (0, 1) and we get F ◦ F ′ = (F × F ′ ) ∪ (F × F ′ ). If (u, v) = (0, 1), then (u′ , v ′ ) = (1, 0) and we get the same set. If (u, v) = (1, 1) or (u, v) = (0, 0), then we get F ◦ F ′ = (F × F ′ ) ∪ (F × F ′ ). But this is simply the complement of the previous set. So we either get a set of type (e) or the complement of such a set, which is type (f). Case 3 (k = 3): If k = 3, then there is a unique pair (u, v) such that u ◦ v = 0. Hence F ◦ F ′ is the complement of a set of type (a), (b), (c) or (d), that is, a set of type (f). This proves that every (F, F ′ )-compatible set, that is, every set of the form F ◦ F ′ where ◦ is a proper binary boolean function, has one of the given forms (a)–(f). Conversely, if we are given sets F and F ′ and a set X ⊆ Q × Q′ with one of the forms (a)–(f), the proof shows how to construct a proper binary boolean function ◦ such that X = F ◦ F ′ . It follows X is (F, F ′ )-compatible if and only if it has one of the forms (a)–(f). ⊓ ⊔ 4.2 Accessibility of A × A′ In this section, we consider the problem of determining when A×A′ is accessible. This is essential for proving that A × A′ is minimal for a certain final state set, and also an interesting question in its own right. Recall that by Proposition 1, the DFA A × A′ is strongly connected if and only if the transition monoid of A × A′ is transitive. Furthermore, if A× A′ is a permutation DFA, then it is accessible if and only if its transition group is transitive. The following proposition describes the structure of the transition monoid of A × A′ . 20 Proposition 5. Let M× denote the transition monoid of A × A′ . 1. M× is isomorphic to the submonoid of M ×M ′ generated by {(a, a′ ) : a ∈ Σ}. We often identify M× with this submonoid. 2. The projections π : M× → M and π ′ : M× → M ′ given by (w, w′ )π = w and (w, w′ )π ′ = w′ are surjective. 3. If M and M ′ are groups, then M× is a group. Proof. (1): Write w× for wA×A′ ∈ M× . Consider the map ϕ : M× → M × M ′ given by w× 7→ (w, w′ ). This map is clearly a monoid homomorphism. Furthermore, if (x, x′ ) = (y, y ′ ) then qx = qy and q ′ x′ = q ′ y ′ for all q ∈ Q and q ′ ∈ Q′ , and thus in M× we have (q, q ′ )x× = (q, q ′ )y× for all (q, q ′ ) ∈ Q × Q′ . Hence x× = y× whenever x× ϕ = y× ϕ, and it follows that ϕ is injective. Since ϕ is injective, (M× )ϕ is a finite monoid of the same size as M× . It follows ϕ is bijective when viewed as homomorphism between M× and (M× )ϕ, and thus ϕ is an isomorphism between these monoids. Since {a× : a ∈ Σ} generates M× , we see that {(a, a′ ) : a ∈ Σ} generates (M× )ϕ. Hence we have M× ∼ = (M× )ϕ = h(a, a′ ) : a ∈ Σi as required. (2): Fix w ∈ M . Then for the element (w, w′ ) ∈ M× we have (w, w′ )π = w. Hence π maps surjectively onto M . Similarly, π ′ maps surjectively onto M ′ . (3): Since M× is a monoid, it suffices to show every element of M× has an inverse. Recall that the identity elements of M and M ′ are ε and ε′ respectively. For (w, w′ ) ∈ M× , pick m and n such that wm = ε in M and (w′ )n = ε′ in M ′ . This is possible since M and M ′ are finite groups. We have (wmn−1 , (w′ )mn−1 ) ∈ M× , and (w, w′ )(wmn−1 , (w′ )mn−1 ) = (wmn−1 , (w′ )mn−1 )(w, w′ ) = (wmn , (w′ )mn ) = (ε, ε′ ), the identity of M× . Thus (wmn−1 , (w′ )mn−1 ) is an inverse of (w, w′ ). ⊓ ⊔ Recall that for permutation DFAs A and A′ , we denote the transition group of A by G and the transition group of A′ by G′ ; in this case we will also write G× for the transition group of A × A′ . If A and A′ are permutation DFAs, the transitivity of G× is a necessary and sufficient condition for all states of A × A′ to be reachable. However, the structure of G× can be difficult to understand. Hence we will derive a simpler characterization of transitivity that depends only on properties of G and G′ . Suppose that A and A′ are permutation DFAs. Consider the subgroup ker π ≤ G× . It contains all (w, w′ ) ∈ G× such that w is the identity in G. View Q × Q′ as a grid, where elements of Q are “row indices” and elements of Q′ are “column indices”. Then ker π consists of the elements of G× which fix all row indices. Hence we define R = ker π and call R the full row stabilizer. Similarly, C = ker π ′ fixes all column indices and we call it the full column stabilizer. Both of these subgroups are normal, since they are kernels of homomorphisms. Fix q ∈ Q and q ′ ∈ Q′ . Let (q, ∗) denote the set {(q, i′ ) ∈ Q × Q′ : i′ ∈ Q′ }, that is, the “q-th row” of Q × Q′ . Similarly, let (∗, q ′ ) = {(i, q ′ ) ∈ Q × Q′ : i ∈ Q} denote the “q ′ -th column” of Q × Q′ . Let Rq ≤ G× be the setwise stabilizer of (q, ∗) and let Cq′ ≤ G× be the setwise stabilizer of (∗, q ′ ). We call the subgroups Rq the single row stabilizers and the subgroups Cq′ the single column stabilizers. 21 The full row stabilizer R is the intersection of all single row stabilizers, and hence is a subgroup of each Rq ; the analogous fact holds for C. We now give necessary and sufficient conditions for A × A′ to be transitive in the case where A and A′ are permutation DFAs. Lemma 2. Let A and A′ be permutation DFAs. The following are equivalent: 1. A × A′ is accessible. 2. G and G′ are transitive and for all q ∈ Q and q ′ ∈ Q′ , the subgroups Rq π ′ ≤ G′ and Cq′ π ≤ G are transitive. 3. G is transitive and Rq π ′ ≤ G′ is transitive for some q ∈ Q, or G′ is transitive and Cq′ π ≤ G is transitive for some q ′ ∈ Q′ . 4. G× is transitive. Proof. Since A × A′ is a permutation DFA, we see that (1) ⇔ (4). Also, the implication (2) ⇒ (3) is immediate. (3) ⇒ (4): Fix (i, i′ ), (j, j ′ ) ∈ Q × Q′ . Suppose that Rq π ′ is transitive for some q ∈ Q; the case where some Cq′ π is transitive is symmetric. – Since G is transitive, there exists x ∈ G such that ix = q. Let k ′ ∈ Q′ be the x element such that i′ x′ = k ′ . Then (i, i′ ) −→ (q, k ′ ). – Since G is transitive, there exists y ∈ G such that qy = j in G. – Since Rq π ′ ≤ G′ is transitive on Q′ , there exists z ′ ∈ Rq π ′ such that k ′ z ′ = z j ′ (y ′ )−1 . Since (z, z ′ ) ∈ Rq , we have qz = q. Hence (q, k ′ ) −→ (q, j ′ (y ′ )−1 ). It follows that x y z (i, i′ ) −→ (q, k ′ ) −→ (q, j ′ (y ′ )−1 ) −→ (qy, j ′ ) = (j, j ′ ). Thus G× is transitive on Q × Q′ , since for all elements (i, i′ ), (j, j ′ ) ∈ Q × Q′ , there exists an element of G× that maps one to the other. (4) ⇒ (2): If G× is transitive, then for all q, i, j ∈ Q and q ′ , i′ , j ′ ∈ Q′ , there exist x, y ∈ Σ ∗ such that y x (q, i′ ) −→ (qx, i′ x′ ) = (q, j ′ ) and (i, q ′ ) −→ (iy, q ′ y ′ ) = (j, q ′ ). Thus, we see that: – Since qx = q, we have (x, x′ ) ∈ Rq , and since q ′ y ′ = q ′ , we have (y, y ′ ) ∈ Cq′ . – For all i, j ∈ Q, there exists a word y ∈ Cq′ π ≤ G that maps i to j. – For all i′ , j ′ ∈ Q′ , there exists a word x′ ∈ Rq π ′ ≤ G′ that maps i′ to j ′ . Hence for all q ∈ Q and q ′ ∈ Q′ , we see that Rq π ′ is transitive on Q′ and Cq′ π is transitive on Q. Since Cq′ π ≤ G and Rq π ′ ≤ G′ , it follows that G and G′ are transitive. This establishes a cycle of implications (2) ⇒ (3) ⇒ (4) ⇒ (2). Since we also have (1) ⇔ (4), all the statements are equivalent. ⊓ ⊔ 22 This lemma reduces the problem of checking transitivity of G× to just checking the the transitivity of a row stabilizer on the column indices, or of a column stabilizer on the row indices. The following proposition gives a graph-theoretic interpretation of this idea, which may be easier to understand and apply. This graph-theoretic condition for accessibility of A × A′ can easily be proved without appeal to group theory, but for illustrative purposes we will connect it with condition (3) of Lemma 2. Proposition 6. Let A and A′ be permutation DFAs. The following statements are equivalent: 1. A is accessible and there exists q ∈ Q such that all states in (q, ∗) are reachable, or A′ is accessible and there exists q ′ ∈ Q′ such that all states in (∗, q ′ ) are reachable. 2. G is transitive and Rq π ′ ≤ G′ is transitive for some q ∈ Q, or G′ is transitive and Cq′ π ≤ G is transitive for some q ′ ∈ Q′ . Proof. (1) ⇒ (2): Suppose A is accessible, and there exists q ∈ Q such that all states in (q, ∗) are reachable. Since A is an accessible permutation DFA, G is transitive on Q. To see that Rq π ′ ≤ G′ is transitive on Q′ , fix i′ , j ′ ∈ Q′ . Since all states in (q, ∗) are reachable from the initial state (1, 1′ ) of A × A′ , there is some word x x ∈ G× such that (1, 1′ ) −→ (q, i′ ). Also, there is some y ∈ G× such that y (1, 1′ ) −→ (q, j ′ ). Since A × A′ is a permutation DFA, there is some z ∈ Σ ∗ such that z = x−1 . Thus we have y z (q, i′ ) −→ (1, 1′ ) −→ (q, j ′ ). We see that zy maps q to itself, so z ′ y ′ ∈ Rq π ′ . Hence Rq π ′ is transitive on Q′ . By a symmetric argument, if A′ is accessible and there exists q ′ ∈ Q′ such that all states in (∗, q ′ ) are reachable, it follows that G′ is transitive on Q′ and Cq′ π ≤ G is transitive on Q. (2) ⇒ (1): Suppose G is transitive and Rq π ′ ≤ G′ is transitive for some q ∈ Q. Since G is transitive, A is accessible. In particular, there exists w ∈ Σ ∗ w such that 1w = q, and it follows that (1, 1′ ) −→ (q, 1′ w′ ) in A × A′ . Since Rq π ′ is x transitive on Q′ , for all q ′ ∈ Q there exists x ∈ Rq π ′ such that (q, 1′ w′ ) −→ (q, q ′ ). ′ Hence every state in (q, ∗) is reachable. In the case where G and some Cq′ π are transitive, we can use a symmetric argument. ⊓ ⊔ We now prove one of our main results, which gives necessary and sufficient conditions for pairs of group languages recognized by DFAs with exactly one final state to have maximal boolean complexity. 23 Theorem 1. Suppose |Q| ≥ 3 or |Q′ | ≥ 3. Let A and A′ be permutation DFAs with exactly one final state. Then the following are equivalent: 1. A × A′ is accessible. 2. For all proper binary boolean operations ◦, the language L ◦ L′ has maximal state complexity. That is, (L, L′ ) has maximal boolean complexity. 3. There exists a proper binary boolean operation ◦ such that the language L◦L′ has maximal complexity. Determining whether A × A′ is accessible can be difficult in general. Perhaps the easiest method is to use the graph-theoretic condition of Proposition 6, which states that assuming A and A′ are accessible, the direct product A × A′ is accessible if either of the following holds. – There exists a row (q, ∗) such that all states in (q, ∗) are reachable. – There exists a column (∗, q ′ ) such that all states in (∗, q ′ ) are reachable. This reduces the problem to just checking reachability for a single row or column. The group-theoretic conditions of Lemma 2 may also be used, but they are perhaps harder to understand. Much later in the paper (Section 4.4) we will use these to obtain simpler group-theoretic conditions for accessibility of A × A′ . In particular, provided that A and A′ are both accessible, and also satisfy an additional criterion called dissimilarity (which is usually easy to check), we have: – If G or G′ is a transitive simple group, then A × A′ is accessible. – If G or G′ is a primitive group, then A × A′ is accessible. Proof (Theorem 1). The only difficult implication here is (1) ⇒ (2). Suppose A × A′ is accessible; we want to show that L ◦ L′ has maximal state complexity for every proper binary boolean operation ◦. That is, we want to show that all pairs of states of A × A′ are distinguishable by each (F, F ′ )-compatible subset of Q × Q′ . Note that since A × A′ is accessible, by Lemma 2 we know that G× is transitive and that Rq π ′ ≤ G′ and Cq′ π ≤ G are transitive for all q ∈ Q and q ′ ∈ Q′ . What this means is: – For every pair of states (p, p′ ) and (q, q ′ ) of A × A′ , there exists a word w w ∈ Σ ∗ such that (p, p′ ) −→ (q, q ′ ). (Transitivity of G× ) – Fix a state q ∈ Q. For every pair of states i′ , j ′ ∈ Q′ , there exists a word w w ∈ Σ ∗ such that (q, i′ ) −→ (q, j ′ ). (Transitivity of Rq π ′ ) – Fix a state q ′ ∈ Q′ . For every pair of states i, j ∈ Q, there exists a word w w ∈ Σ ∗ such that (i, q ′ ) −→ (j, q ′ ). (Transitivity of Cq′ π) We will use these facts repeatedly throughout the proof. Let F = {f } and F ′ = {f ′ }, so that F × F ′ = {(f, f ′ )}. Let (p, p′ ) and (q, q ′ ) be distinct states of A×A′ that we wish to distinguish. We will show these states are distinguishable with respect to each type of set described in Proposition 4. 24 We only need to consider types (a) through (e), since sets of type (f) are just complements of sets of types (a) through (e), and two states are distinguishable by a set X if and only if they are distinguishable by the complement of X. Case 1 (States in the same row or same column): Suppose p = q, that is, both states (p, p′ ) and (q, q ′ ) are in the same row. Then we necessarily have p′ 6= q ′ , since the states are distinct. w – By transitivity of G× , for all r ∈ Q there exists w ∈ Σ ∗ such that (p, p′ ) −→ (r, f ′ ). w – Since p = q and p′ 6= q ′ , we have (q, q ′ ) −→ (r, s) for some s 6= f ′ . (Since w′ ′ ′ is a permutation, it must map p and q to different states.) If r ∈ F , we have (r, f ′ ) ∈ F × F ′ and (r, s) ∈ F × F ′ . Hence we can distinguish the states if the final state set is F × F ′ , F × F ′ , or (F × F ′ ) ∪ (F × F ′ ). If r 6∈ F , we have (r, f ′ ) ∈ F × F ′ and (r, s) ∈ F × F ′ . Hence we can distinguish the states if the final state set is F × F ′ or F × F ′ . This covers all the possible sets of final states. If p 6= q and p′ = q ′ (that is, the states are in the same column) we can use a symmetric argument. Case 2 (States in different rows and different columns): Assume p 6= q and p′ 6= q ′ . We consider each possible set of final states in turn. F × F ′ : Here A × A′ has exactly one final state (f, f ′ ), so it is minimal by Corollary 2. F × F ′ : We make a few observations: w – By transitivity of G× , there exists w ∈ Σ ∗ such that (p, p′ ) −→ (f, f ′ ). – Since p 6= q, p′ 6= q ′ and w is a permutation, we must have qw 6= f and q ′ w′ 6= f ′ . x – Since Cf ′ π is transitive, there exists x ∈ Σ ∗ such (qw, f ′ ) −→ (f, f ′ ). It follows that w x (p, p′ ) −→ (f, f ′ ) −→ (f x, f ′ ), w x (q, q ′ ) −→ (qw, q ′ w′ ) −→ (f, q ′ w′ x′ ). – Since qwx = f , qw 6= f and x is a permutation, we have f x 6= f . It follows that (f x, f ′ ) ∈ F × F ′ . – Since f ′ x′ = f ′ , q ′ w′ 6= f ′ and x′ is a permutation, we have q ′ w′ x′ 6= f ′ . It follows that (f, q ′ w′ x′ ) ∈ F × F ′ . Hence wx maps (p, p′ ) to a non-final state and (q, q ′ ) to a final state. Thus we have distinguished the two states. F × F ′ : We can use a symmetric argument to the previous case. w F × F ′ : As in the case of F × F ′ , pick w such that (p, p′ ) −→ (f, f ′ ). Then w (q, q ′ ) −→ (qw, q ′ w′ ), which is in F × F ′ since qw 6= f and q ′ w′ 6= f ′ . Thus w w sends (q, q ′ ) to a final state. But (p, p′ ) −→ (f, f ′ ) is non-final, so we have distinguished the states. 25 (F × F ′ ) ∪ (F × F ′ ): This is the most complicated case. u – By transitivity of G× , there exists u ∈ Σ ∗ such that (p, p′ ) −→ (f, r′ ), where r′ 6= f ′ . u – We have (f, r′ ) ∈ F × F ′ , so u sends (p, p′ ) to a final state. If (q, q ′ ) −→ ′ ′ (qu, q u ) is non-final, then u distinguishes the states, so we may assume without loss of generality that it is final. – We cannot have qu = f , since p 6= q and pu = f . Thus qu ∈ F . Since (qu, q ′ u′ ) is final we therefore must have q ′ u′ ∈ F ′ , that is, q ′ u′ = f ′ . Define r = qu; now we have reduced the problem to distinguishing two states of the forms (f, r′ ) and (r, f ′ ), with r 6= f and r′ 6= f ′ . Suppose |Q| ≥ 3; if we only have |Q′ | ≥ 3 we can use a symmetric argument to the argument below. – Since Cf ′ π is transitive and |Q| ≥ 3, there is a word v ∈ Σ ∗ such that v (f, f ′ ) −→ (s, f ′ ) for some s 6∈ {r, f }. v – It follows that (f, r′ ) −→ (s, r′ v ′ ), where r′ v ′ 6= f ′ . v – The state (s, r′ v ′ ) is in F × F ′ , and thus is non-final. If (r, f ′ ) −→ (rv, f ′ ) is ′ ′ final, then v distinguishes (f, r ) and (r, f ). Hence we may assume without loss of generality that (rv, f ′ ) is non-final. – A non-final state either lies in F × F ′ or F × F ′ . Since f ′ ∈ F ′ , we must have (rv, f ′ ) ∈ F × F ′ . But then rv = f . Thus we have u v (p, p′ ) −→ (f, r′ ) −→ (s, r′ v ′ ), u v (q, q ′ ) −→ (r, f ′ ) −→ (f, f ′ ). Now, apply v again to both states. – – – – Since s 6= r and rv = f , we have sv 6= f . Since f ′ v ′ = f ′ and r′ 6= f ′ , we have r′ v ′ 6= f ′ and r′ v ′ v ′ 6= f ′ . v It follows that (s, r′ v ′ ) −→ (sv, r′ v ′ v ′ ) ∈ F × F ′ , and thus is non-final. v However, recall that f v = s and s 6= f ; thus (f, f ′ ) −→ (s, f ′ ) is in F × F ′ . Hence (p, p′ ) and (q, q ′ ) are distinguished by uv 2 . We have shown that all pairs of states of A × A′ are distinguishable by all (F, F ′ )-compatible sets of final states, and so this proves (1) ⇒ (2). The implication (2) ⇒ (3) is immediate. For (3) ⇒ (1), just note that for each proper binary boolean operation ◦, the language L ◦ L′ is recognized by (A × A′ )(X) for some set of final states X. If (A × A′ )(X) is not accessible, then it cannot be minimal and thus L ◦ L′ cannot have maximal state complexity. ⊓ ⊔ Note that Example 11 gives a pair of languages recognized by two-state permutation DFAs which have maximal complexity for intersection, but not symmetric difference (see also [3, Example 2]). Hence in the previous theorem, it was necessary to assume that at least one DFA has three or more states. 26 Note that Theorem 1 also holds in the following cases: – A and A′ both have exactly one non-final state. – A has exactly one final state and A′ has exactly one non-final state. – A has exactly one non-final state and A′ has exactly one final state. The same arguments we gave in Theorem 1 can be used in the above three cases, but the role of each argument is changed. For example, consider the case where A has one final state and A′ has one non-final state. Let F = {f } and let F ′ = Q′ \ F ′ = {q ′ }. We can use the same arguments as in the original proof of Theorem 1, except wherever F ′ appears we substitute F ′ . So for example, we deal with the case of F × F ′ = {(f, q ′ )} by appealing to Corollary 2, just like we did for F × F ′ in the original proof. This works because distinguishability arguments are the same whether we distinguish with respect to a set of final states or a set of non-final states. We now apply Theorem 1 to show that the original witnesses for the maximal state complexity of union (found by Maslow and later by Yu, Zhuang and Salomaa) are in fact witnesses for all proper binary boolean operations. Example 13. In [15], Maslov defined two families of DFAs over alphabet {0, 1} as follows, and claimed that the languages they recognize are witnesses for union. The DFA A has states {S0 , . . . , Sm−1 } with S0 initial and Sm−1 final, and the transitions are given by Si 0 = Si , Si 1 = Si+1 for i 6= m − 1, and Sm−1 1 = S0 . The DFA B has states {P0 , . . . , Pn−1 } with P0 initial and Pn−1 final, and the transitions are given by Pi 1 = Pi , Pi 0 = Pi+1 for i 6= n − 1, and Pn−1 0 = P0 . It is easy to see that A × B is accessible: the state (Si , Pj ) can be reached from (S0 , P0 ) via the word 1i 0j . Furthermore, A and B are permutation DFAs: the symbol 0 acts as the identity permutation in A and as a cyclic permutation of the states in B, while 1 acts as a cyclic permutation in A and the identity in B. They also have exactly one final state. So in fact, for m, n ≥ 3, the pair of languages (L(A), L(B)) has maximal boolean complexity by Theorem 1. That is, Maslov’s languages are witnesses for all proper binary boolean operations, in addition to union. Yu, Zhuang and Salomaa gave a different family of witnesses in [21]. For a word w ∈ Σ ∗ and a ∈ Σ, let |w|a denote the number of occurrences of the letter a in w. Yu et al. defined languages Lm = {w ∈ {a, b}∗ : |w|a ≡ 0 (mod m)} and Ln = {w ∈ {a, b}∗ : |w|b ≡ 0 (mod n)}, then proved that Lm ∩ Ln and Lm ∪ Ln both have state complexity mn. In fact, (Lm , Ln ) has maximal boolean complexity for m, n ≥ 3. Indeed, one may verify that the minimal DFA of Lm has m states, with the initial and final states equal; the letter a acts as a cyclic permutation of the state set, and the letter b acts as the identity. The minimal DFA of Ln is similar, except there are n states, b is the cyclic permutation, and a is the identity. These DFAs are almost identical to the DFAs defined by Maslov, except with a different choice of final state. This does not change the fact that they are permutation DFAs with one final state and an accessible direct product, and hence meet the conditions of Theorem 1.  27 4.3 Uniform Boolean Minimality We now give sufficient conditions for a pair of permutation DFAs (A, A′ ) to be uniformly boolean minimal. Just as with uniform minimality, primitive groups play an important role in our conditions for uniform boolean minimality. To state our conditions, we need some new notation. For p, q ∈ Q and p′ , q ′ ∈ Q′ , we write Rp,q for the setwise stabilizer of (p, ∗) ∪ (q, ∗), and Cp′ ,q′ for the setwise stabilizer of (∗, p′ ) ∪ (∗, q ′ ). If p = q then Rp,q = Rp = Rq , and similarly if p′ = q ′ then Cp′ ,q′ = Cp′ = Cq′ . We call these subgroups double row stabilizers and double column stabilizers. Under this definition, single row stabilizers are special cases of double row stabilizers, and similarly for column stabilizers. Note that Rp and Rq are not necessarily subgroups of Rp,q , nor the other way around: the group Rp might contain elements that map q to some state r 6∈ {p, q}, while the group Rp,q might contain elements that swap p and q. However, the full row stabilizer R is a common subgroup of Rp , Rq and Rp,q . The analogous facts hold for column stabilizers. Lemma 3. Suppose A and A′ are permutation DFAs. 1. If |Q| ≥ 3, the group G is primitive, and Rp,q π ′ ≤ G′ is primitive for all p, q ∈ Q, then A × A′ is uniformly boolean minimal. 2. If |Q′ | ≥ 3, the group G′ is primitive, and Cp′ ,q′ π ≤ G is primitive for all p′ , q ′ ∈ Q′ , then A × A′ is uniformly boolean minimal. Note that we do not require p 6= q or p′ 6= q ′ , so in case (1) both the single and double row stabilizers must be primitive, and in case (2) both the single and double column stabilizers must be primitive. Proof. Suppose that the conditions of (1) hold, that is, |Q| ≥ 3, G is primitive and for all p, q ∈ Q, the subgroup Rp,q π ′ ≤ G′ is primitive. The case where the conditions of (2) hold is symmetric. We want to show that for every pair of sets ∅ ( S ( Q and ∅ ( S ′ ( Q′ and each (S, S ′ )-compatible subset X ⊆ Q × Q′ , the DFA (A × A′ )(X) is minimal. It suffices to consider the cases where X = S × S ′ and where X = (S × S ′ ) ∪ (S ×S ′ ). It may seem that this would only cover sets of type (a) and complements of sets of type (e) from Proposition 4. However, these two cases actually cover all possible types of (S, S ′ )-compatible sets. To see this, consider a set S ×S ′ of type (b). If we prove that (A×A′ )(T ×T ′ ) is minimal for all pairs of sets ∅ ( T ( Q and ∅ ( T ′ ( Q′ , then in particular we can take T = S and T ′ = S ′ to show that (A × A′ )(S × S ′ ) is covered. A similar argument works for sets of type (c) and (d) . Now note that if (A × A′ )(X) is minimal, then (A × A′ )(X) is also minimal, so we also cover sets of type (e) and (f). So all types of sets from Proposition 4 are covered by just looking at the cases X = S × S ′ and X = (S × S ′ ) ∪ (S × S ′ ). Let (i, i′ ) and (j, j ′ ) be distinct states of A × A′ ; we will show they are distinguishable with respect to X. Case 1 (States in the same row): Suppose i = j, that is, the states are in the same row. Since the states are distinct, we have i′ 6= j ′ . 28 – Since G is primitive, it is transitive, and thus there exists a word w ∈ G that w w maps i = j to some element s ∈ S. Thus (i, i′ ) −→ (s, i′ w′ ) and (j, j ′ ) −→ ′ ′ (s, j w ). – Suppose w does not distinguish (i, i′ ) and (j, j ′ ) with respect to X. Then (s, i′ w′ ) ∈ X ⇔ (s, j ′ w′ ) ∈ X. – Since Rs π ′ is primitive, all permutation DFAs with state set Q′ and transition group Rs π ′ are uniformly minimal by Corollary 1. It follows there exists x′ ∈ Rs π ′ that distinguishes i′ w′ and j ′ w′ with respect to S ′ . We have: w x (i, i′ ) −→ (s, i′ w′ ) −→ (s, i′ w′ x′ ), w x (j, j ′ ) −→ (s, j ′ w′ ) −→ (s, j ′ w′ x′ ). – Since x′ distinguishes i′ w′ and j ′ w′ with respect to S ′ , we see that i′ w′ x′ ∈ S ⇔ j ′ w′ x′ 6∈ S. – Hence (s, i′ w′ x′ ) ∈ S × S ′ ⇔ (s, j ′ w′ x′ ) ∈ S × S ′ . It follows that either w or wx distinguishes (i, i′ ) and (j, j ′ ) with respect to X, regardless of whether we have X = S × S ′ or X = (S × S ′ ) ∪ (S × S ′ ). Case 2 (States in the same column): Suppose i′ = j ′ , that is, the states are in the same column but different rows. Since G is primitive, all permutation DFAs with state set Q and transition group G are uniformly minimal. Hence there exists x ∈ G that distinguishes i and j with respect to S. Suppose without loss of generality that ix ∈ S and jx 6∈ S. Since Rix,jx π ′ is primitive, it is transitive, and thus there exists y ′ ∈ Rix,jx π ′ such that i′ x′ y ′ ∈ S. If y fixes ix and jx, then (ixy, i′ x′ y ′ ) = (ix, i′ x′ y ′ ) ∈ S ×S ′ , and (jxy, j ′ x′ y ′ ) = (jx, j ′ x′ y ′ ) ∈ S×S ′ since i′ = j ′ implies i′ x′ y ′ = j ′ x′ y ′ . If y swaps ix and jx then (ixy, i′ x′ y ′ ) = (jx, i′ x′ y ′ ) ∈ S × S ′ and (jxy, j ′ x′ y ′ ) = (ix, j ′ x′ y ′ ) ∈ S × S ′ . In either case, it follows that xy distinguishes (i, i′ ) and (j, j ′ ) with respect to X, regardless of whether we have X = S × S ′ or X = (S × S ′ ) ∪ (S × S ′ ). Case 3 (States in different rows and different columns): Suppose i 6= i′ and j 6= j ′ . We divide this case into two subcases. Subcase 3a (X = S × S ′ ): We may assume without loss of generality that (i, i′ ) and (j, j ′ ) are both in X. To see this, observe that since G is transitive and Rq π ′ ≤ G′ is transitive for each q ∈ Q, we know that G× is transitive by Lemma 2. Thus there exists w ∈ Σ ∗ that maps (i, i′ ) to a state in X. Hence either w distinguishes the states, or w also maps (j, j ′ ) into X. Suppose we have (i, i′ ), (j, j ′ ) ∈ X = S × S ′ . Since Ri,j π ′ is primitive, there exists w ∈ Ri,j π ′ that distinguishes i′ and j ′ with respect to S ′ . Without loss of generality, assume i′ ∈ S ′ and j ′ 6∈ S ′ . Then (i, i′ )(w, w′ ) = (i, i′ ) ∈ S × S ′ and (j, j ′ )(w, w′ ) ∈ S × S ′ . Hence w distinguishes the states. Subcase 3b (X = (S × S ′ ) ∪ (S × S ′ )): This is the final case we must deal with, and most complicated part of the proof. We introduce a notion of polarity to simplify the arguments. We assign a polarity of 1 or −1 to each state in Q × Q′ as follows. First, let q ∈ Q have polarity 1 if q ∈ S and polarity −1 if q 6∈ S. Similarly, q ′ ∈ Q′ has polarity 1 if q ′ ∈ S ′ and polarity −1 if q ′ 6∈ S ′ . Then the polarity of (q, q ′ ) ∈ Q × Q′ is the product of the polarities of q and q ′ . 29 Next, we partition Q×Q′ into four quadrants: S×S ′ , S×S ′ , S×S ′ , and S×S ′ . Notice that in each quadrant, all states have the same polarity. Furthermore, the set X = (S × S ′ ) ∪ (S × S ′ ) is the set of all states with positive polarity, and the set X = (S × S ′ ) ∪ (S × S ′ ) is the set of all states with negative polarity. Hence to show all states are distinguishable by X, we must show that for each pair of states of equal polarity, there is a word that preserves the polarity of one state and reverses the polarity of the other state. We now prove two claims, which together complete the proof of this subcase. First we show that pairs of states in the same quadrant are distinguishable, and then we show that pairs of states in different quadrants are distinguishable. Claim 1 (States in the same quadrant are distinguishable): Suppose (i, i′ ) and (j, j ′ ) are in the same quadrant. This means that (i, i′ ) and (j, j ′ ) have the same polarity; furthermore, i and j have the same polarity, and i′ and j ′ have the same polarity. – Choose a word w′ ∈ Ri,j π ′ that distinguishes i′ and j ′ with respect to S ′ (by primitivity of Ri,j π ′ ). – Notice that w preserves the polarity of both i and j, since it either fixes both i and j or it swaps them, and i and j have the same polarity. – Since (i, i′ ) and (j, j ′ ) are in the same quadrant, we either have i′ , j ′ ∈ S ′ or i′ , j ′ ∈ S ′ . – Since w′ distinguishes i′ and j ′ with respect to S ′ , it follows that w′ acts on i′ and j ′ by preserving the polarity of one state and reversing the polarity of the other. It follows that (w, w′ ) acts on (i, i′ ) and (j, j ′ ) by preserving the polarity of one state and reversing the polarity of the other. In other words, w distinguishes these states. Claim 2 (States in different quadrants are distinguishable): Suppose that (i, i′ ) and (j, j ′ ) lie in different quadrants. – We may assume without loss of generality that (i, i′ ) and (j, j ′ ) have the same polarity; otherwise they are trivially distinguishable. – We may also assume without loss of generality that (i, i′ ), (j, j ′ ) ∈ X, by the same argument we used in Subcase 3a. Thus we must have (i, i′ ) ∈ S × S ′ and (j, j ′ ) ∈ S × S ′ , or vice versa. – We may assume without loss of generality that (i, i′ ) ∈ S × S ′ and (j, j ′ ) ∈ S × S ′ , by swapping the names of (i, i′ ) and (j, j ′ ) if necessary. So we have reduced to the case where one state is in quadrant S × S ′ and the other is in quadrant S × S ′ . – Since G is primitive, S and S are either not blocks, or they are trivial blocks. – S and S are proper non-empty subsets of Q, so they can only be trivial blocks if |S| = |S| = 1. – This would imply |Q| = |S| + |S| = 2, and we are assuming |Q| ≥ 3, so they cannot both be trivial blocks. So at least one of S or S is not a block. Note that in the case where G′ is primitive and the groups Ci′ ,j ′ π ≤ G are primitive, we would use |Q′ | ≥ 3 here. 30 If S is not a block, let w ∈ G be a word such that ∅ ( Sw ∩ S ( S. Otherwise, S is not a block, so let w ∈ G be a word such that ∅ ( Sw ∩ S ( S. Now, we partition Q into two sets: P = {q ∈ S : qw ∈ S} ∪ {q ∈ S : qw ∈ S}, P = {q ∈ S : qw ∈ S} ∪ {q ∈ S : qw ∈ S}. Note that P is non-empty, since if it was empty we would have Sw ∩ S = ∅ and Sw∩S = ∅. Similarly, P is non-empty, since otherwise we would have Sw∩S = S and Sw ∩ S = S. Observe that if i, j ∈ P , then P is a proper subset of Q with size at least two, so it cannot be a block for G. Hence some word in G distinguishes i and j by P . Similarly, if i, j ∈ P , then i and j are distinguishable by P . So we may assume that either i ∈ P and j ∈ P , or i ∈ P and j ∈ P . Suppose that i ∈ P and j ∈ P . Recall that we have (i, i′ ) ∈ S × S ′ and (j, j ′ ) ∈ S × S ′ . Thus since i ∈ S we have iw ∈ S, and since j ∈ S we have jw ∈ S. Hence (iw, i′ w′ ), (jw, j ′ w′ ) ∈ S × Q′ , that is, w maps both (i, i′ ) and (j, j ′ ) into S × Q′ . There are two possibilities: – The states (iw, i′ w′ ) and (jw, j ′ w′ ) are in the same quadrant, and thus are distinguishable by Claim 1. – The states (iw, i′ w′ ) and (jw, j ′ w′ ) are in different quadrants. Since iw and jw are both in S, one state must lie in S × S ′ and the other S × S ′ . Thus w distinguishes (i, i′ ) and (j, j ′ ), and we are done. So if i ∈ P and j ∈ P , we have proved the claim. If we have i ∈ P and j ∈ P , then we have iw ∈ S and jw ∈ S, and so a symmetric argument shows that the states are distinguishable. This completes the proof of Claim 2. By Claim 1 and Claim 2, we see that all pairs of states are distinguishable by sets of the form (S × S ′ ) ∪ (S × S ′ ), completing the proof of Subcase 3b and hence Case 3. We have shown that for every pair of sets ∅ ( S ( Q and ∅ ( S ′ ( Q′ and each (S, S ′ )-compatible subset X ⊆ Q × Q′ , each pair of states in (A × A′ )(X) is distinguishable by X. Thus A × A′ is uniformly boolean minimal. ⊓ ⊔ While Lemma 3 gives sufficient conditions for uniform boolean minimality, the conditions are not necessary. We will demonstrate this later, in Example 20. In the above proof, most of the difficulty came from dealing with the case (S ×S ′ )∪(S ×S ′ ), which corresponds to the operation of symmetric difference (or complement of symmetric difference). In fact, if we choose to ignore the operation of symmetric difference, we can obtain necessary and sufficient conditions for the corresponding weaker version of uniform boolean minimality. Proposition 7. Suppose A and A′ are permutation DFAs. The following are equivalent: 1. Rq π ′ ≤ G′ and Cq′ π ≤ G are primitive for all q ∈ Q and q ′ ∈ Q′ . 2. For all sets ∅ ( S ( Q and ∅ ( S ′ ( Q′ , the DFA (A × A′ )(S × S ′ ) is minimal. 31 Proof. (1) ⇒ (2): We proceed as in the proof of Lemma 3. Let (i, i′ ) and (j, j ′ ) be distinct states of A × A′ ; we will show they are distinguishable with respect to S × S ′ . Case 1 (States in the same row): In the proof of Lemma 3, we proved that states in the same row are distinguishable, using the facts that G is transitive and Rq π ′ is primitive for all q ∈ Q. Those facts still hold under our new hypotheses, so the same argument can be used here. Case 2 (States in the same column): The argument we used for this case in Lemma 3 relied on the double row stabilizers being transitive, so we cannot use it here. However, under our new hypotheses, we know that G′ is transitive and Cq′ π is primitive for all q ′ ∈ Q. Thus we can just use a symmetric argument to the one for states in the same row. Case 3 (States in different rows and different columns): Suppose i 6= j and i′ 6= j ′ . As in the proof of Lemma 3, we may assume without loss of generality that (i, i′ ), (j, j ′ ) ∈ S × S ′ . Since Ci′ π ′ is primitive, there exists w ∈ Ci′ π that distinguishes i and j with respect to S. We claim that we can choose w so that iw ∈ S and jw 6∈ S: – Suppose for a contradiction that for all words w ∈ Ci′ π which distinguish i and j by S, we have iw 6∈ S and jw ∈ S. – Fix x ∈ Ci′ π such that ix 6∈ S and jx ∈ S. y – By transitivity of Ci′ π, we can choose y ∈ Ci′ π such that (ixy, i′ ) −→ (jx, i′ ). It follows ixy = jx, and thus ixy ∈ S. – Suppose jxy 6∈ S. Then we have ixy ∈ S and jxy 6∈ S, where xy ∈ Ci′ π. This contradicts our assumption that for all words w ∈ Ci′ π which distinguish i and j by S, we must have iw 6∈ S and jw ∈ S. – Thus we can assume jxy ∈ S. But then since ixy = jx, we have ixy 2 = jxy ∈ S. If jxy 2 6∈ S, we get a contradiction as before, so jxy 2 ∈ S. – In general, we have ixy k = jxy k−1 , and it follows by induction on k that ixy k ∈ S and jxy k ∈ S for all k > 1. – But Ci′ π is a finite group, so y k = ε for some k. This gives ixy k = ix ∈ S and jxy k = jx ∈ S, which contradicts the fact that ix 6∈ S. This proves the claim; there must exist w ∈ Ci′ π such that iw ∈ S and jw 6∈ S. w w Then we have (i, i′ ) −→ (iw, i′ ) ∈ S × S ′ , but (j, j ′ ) −→ (jw, j ′ w′ ) 6∈ S × S ′ since jw 6∈ S. Thus w distinguishes the states. We have now shown that all pairs of states (i, i′ ) and (j, j ′ ) are distinguishable. (2) ⇒ (1): Suppose that for all sets ∅ ( S ( Q and ∅ ( S ′ ( Q′ , the DFA (A × A′ )(S × S ′ ) is minimal. Assume for a contradiction that there exists q ′ ∈ Q′ such that Cq′ π is not primitive. Then there exists a non-trivial block B ( Q for Cq′ π. We claim that (A × A)(B × {q ′ }) is not minimal: – Since B is a non-trivial block, it contains at least two distinct elements. Let i, j ∈ B be distinct and consider the states (i, q ′ ) and (j, q ′ ) of A × A′ . – If q ′ w′ 6= q ′ , then w does not distinguish (i, q ′ ) and (j, q ′ ). Indeed, if q ′ w′ 6= q ′ , then (iw, q ′ w′ ) and (jw, q ′ w′ ) both lie outside of B × {q ′ }. 32 – Hence if w ∈ Σ ∗ distinguishes (i, q ′ ) and (j, q ′ ), we must have q ′ w′ = q ′ , and thus w ∈ Cq′ π. – Since B is a block for Cq′ π, we either have iw, jw ∈ B (if Bw = B) or {iw, jw} ∩ B = ∅ (if Bw ∩ B = ∅). – Thus w ∈ Cq′ π cannot distinguish (i, q ′ ) and (j, q ′ ): if iw, jw ∈ B then w maps both states to B × {q}; otherwise it maps both states to B × {q}. – It follows that no word can distinguish (i, q ′ ) and (j, q ′ ) by B × {q ′ }. This shows that (A × A′ )(B × {q ′ }) is not minimal, which is a contradiction. It follows that Cq′ π must be primitive for all q ′ ∈ Q′ . A symmetric argument shows that Rq π ′ must be primitive for all q ∈ Q. ⊓ ⊔ One may wonder whether condition (1) of Proposition 7 are actually sufficient to prove Lemma 3. We will show later (Example 19) that this is not the case. 4.4 Dissimilar DFAs While the conditions of Lemma 3 are somewhat complicated, there are cases where we can easily verify that they hold. We consider some of these cases next. We will say that the DFAs A and A′ are similar if the maps π : M× → M and ′ π : M× → M ′ are injective. By Proposition 5, π and π ′ are always surjective, so if they are also injective then they are isomorphisms. Hence if A and A′ are similar, the map π −1 π ′ : M → M ′ given by w 7→ w′ is a well-defined monoid isomorphism. If A and A′ are not similar, we say they are dissimilar. If π and π ′ both fail to be injective, we say that A and A′ are strongly dissimilar. We give some examples of dissimilar DFAs. All DFAs will be over the twoletter alphabet {a, b}, and we will not specify the initial and final states since they do not affect whether DFAs are similar. Example 14. Let A have states {1, 2} and transformations a = (1, 2) and b = (). Let A′ have states {1, 2} and transformations a′ = () and b′ = (1, 2). Notice that in the transition group of A×A′ , we have (b, b′ ) = ((), (1, 2)) and (ε, ε′ ) = ((), ()). Thus (b, b′ )π = (ε, ε′ )π = () and it follows that π is not injective. Hence A and A′ are dissimilar. In fact, a symmetric argument shows that π ′ is not injective, and thus these DFAs are strongly dissimilar. Another way to see that these DFAs are dissimilar is to consider the “map” w 7→ w′ . This “map” is not actually well-defined, since from the fact that b 7→ b′ we must have () 7→ (1, 2), but from the fact that ε 7→ ε′ we must have () 7→ (). (Formally, this “map” is a binary relation; we say it is “well-defined” if the relation happens to be a function, and otherwise is not.) This means A and A′ cannot be similar, since we know that if they are similar, then π −1 π ′ is a well-defined isomorphism which sends w to w′ . Alternatively, without even checking whether the “map” w 7→ w′ is well defined, we can see that since () = b 7→ b′ = (1, 2), this “map” sends an element of order one to an element of order two, and thus it cannot possibly be a group isomorphism. But then A and A′ cannot be similar.  33 Usually, the easiest way to prove that a pair of DFAs is dissimilar is to examine the “map” w 7→ w′ and show that either it is not well-defined or not an isomorphism. Example 15. Let A have states {1, 2} and transformations a = (1, 2), b = (1, 2). Let A′ have states {1, 2, 3, 4} and transformations a′ = (1, 2)(3, 4), b = (1, 3)(2, 4). The transition group of A has two elements: ε = () and a = b = (1, 2). However, the transition group of A′ has four elements: ε = (), a′ = (1, 2)(3, 4), b′ = (1, 3)(2, 4), a′ b′ = (1, 4)(2, 3). Hence these DFAs must be dissimilar, since they have different transition groups. Similar DFAs always have isomorphic transition monoids/groups. These DFAs are not strongly dissimilar. To see this, observe that the transition group of A × A′ has four elements: (ε, ε′ ) = ((), ()), (a, a′ ) = ((1, 2), (1, 2)(3, 4)), (b, b′ ) = ((1, 2), (1, 3)(2, 4)), (ab, a′ b′ ) = ((), (1, 4)(2, 3)). It is easy to verify that any other product of elements will be equal to one of these four. Now note that π ′ is a bijection but π is not, and thus A and A′ are not strongly dissimilar. In this case, the “map” w 7→ w′ is not well-defined. However, the map (π ′ )−1 π given by w′ 7→ w is well-defined, and in fact is a group homomorphism (but not an isomorphism).  As for examples of similar DFAs, we have the following fact: isomorphic DFAs are necessarily similar. Indeed, suppose there is an isomorphism f : Q → Q′ . Then for all q ∈ Q and a ∈ Σ, we have (qa)f = (qf )a′ , and thus qa = q(f a′ f −1 ). It follows that a = f a′ f −1 for all a ∈ Σ ∗ , and thus w = f w′ f −1 for all w ∈ Σ ∗ . Hence π : M× → M is given by (w, w′ )π = (f w′ f −1 , w′ )π = f w′ f −1 , and this map is clearly injective since if f w′ f −1 = f x′ f −1 then w′ = x′ . Similarly, we have w′ = f −1 wf and π ′ : M× → M is injective. This shows that DFA similarity is a generalization of DFA isomorphism. However, the next example shows that it is possible for two DFAs with different numbers of states to be similar, and that the monoid isomorphism w 7→ w′ does not necessarily have to be conjugation by a permutation. Example 16. Consider the symmetric group S10 . This group contains an intransitive subgroup that is isomorphic to S5 , given by permutations of {1, . . . , 10} which fix every point in {6, . . . , 10}. This can be considered the “natural” embedding of S5 in S10 . However, there is also a primitive subgroup of S10 that is isomorphic to S5 , and is not conjugate to this natural embedding. In GAP’s library of primitive groups, this subgroup can be accessed with the command PrimitiveGroup(10,2). We can use GAP to compute an explicit isomorphism between S5 and this subgroup: gap> IsomorphismGroups(SymmetricGroup(5),PrimitiveGroup(10,2)); [ (3,4), (1,2,3)(4,5) ] -> [ (1,2)(6,8)(7,9), (2,6,4,5,3,7)(8,10,9) ] 34 The GAP output tells us that the map which sends (3, 4) to (1, 2)(6, 8)(7, 9) and (1, 2, 3)(4, 5) to (2, 6, 4, 5, 3, 7)(8, 10, 9) can be extended multiplicatively to an isomorphism between S5 and the aforementioned primitive subgroup of S10 . We use this isomorphism to construct similar permutation DFAs of different sizes. Let A have states {1, . . . , 5} and transformations a = (3, 4), b = (1, 2, 3)(4, 5). Let A′ have states {1, . . . , 10} and transformations a′ = (1, 2)(6, 8)(7, 9) and b′ = (2, 6, 4, 5, 3, 7)(8, 10, 9). The transition group G of A is S5 , and the transition group G′ of A′ is a primitive subgroup of S10 that is isomorphic to S5 . Furthermore, the map w 7→ w′ is an isomorphism of G and G′ . Hence A and A′ are similar. This pair of DFAs has other interesting properties; we will revisit them in Example 21. Notice that similarity of DFAs is a very fragile property; if we simply switch the roles of a′ and b′ in A′ , giving a = (3, 4) and a′ = (2, 6, 4, 5, 3, 7)(8, 10, 9), then A and A′ are no longer similar. Indeed, after the switch, wee see that w 7→ w′ sends an element of order two to an element of order six, which means it cannot be an isomorphism of G and G′ .  Dissimilar permutation DFAs have the following nice property. Proposition 8. If A and A′ are dissimilar permutation DFAs, then at least one of the following statements holds: 1. Rπ ′ is a non-trivial normal subgroup of G′ . 2. Cπ is a non-trivial normal subgroup of G. If A and A′ are strongly dissimilar, then both hold. Proof. Recall that R = ker π and C = ker π ′ ; these are normal subgroups of G× . Since π and π ′ are surjective, Rπ ′ is a normal subgroup of G′ and Cπ is a normal subgroup of G. – We have ker π = {(w, w′ ) ∈ G× : w = ε}, so Rπ ′ = {w′ ∈ G′ : w = ε} and similarly Cπ = {w ∈ G : w′ = ε′ }. – If Rπ ′ is trivial, then whenever w = ε we have w′ = ε′ , and so R = ker π = {(ε, ε′ )} is trivial; hence π is injective. – Similarly, if Cπ is trivial, then C = ker π ′ is trivial, and thus π ′ is injective. Thus we see that if A and A′ are dissimilar, then π and π ′ cannot both be injective, and so Rπ ′ and Cπ cannot both be trivial. Furthermore, if A and A′ are strongly dissimilar, then neither π nor π ′ can be injective, and so neither Rπ ′ nor Cπ can be trivial. ⊓ ⊔ This leads to a useful theorem: Theorem 2. Let A and A′ be dissimilar permutation DFAs with |Q|, |Q′ | ≥ 3. 1. Suppose G and G′ are transitive. If all non-trivial normal subgroups of G and of G′ are transitive, then A × A′ is accessible. 2. Suppose G and G′ are primitive. If all non-trivial normal subgroups of G and of G′ are primitive, then A × A′ is uniformly Boolean minimal. 35 Proof. By Proposition 8, since A and A′ are dissimilar, one of Rπ ′ or Cπ is a non-trivial normal subgroup. Suppose that Cπ ≤ G is non-trivial; the other case is symmetric. (1): Since all non-trivial normal subgroups of G are transitive, Cπ is transitive. Hence Cq′ π is transitive for all q ′ ∈ Q, since Cq′ π ≥ Cπ. Since G′ is transitive, we see that condition (3) of Lemma 2 holds. Thus A × A′ is accessible. (2): Since all non-trivial normal subgroups of G are primitive, Cπ is primitive. Hence Cp′ ,q′ π is primitive for all p′ , q ′ ∈ Q, since Cp′ ,q′ π ≥ Cπ. Since G′ is primitive, we see that A and A′ meet the conditions of Lemma 3. Thus A × A′ is uniformly Boolean minimal. ⊓ ⊔ The power of Theorem 2 comes from the fact that several interesting classes of groups have the property that all non-trivial normal subgroups are transitive or primitive. The next corollary gives examples of when Theorem 2 can be applied. Corollary 3. Let A and A′ be dissimilar permutation DFAs with |Q|, |Q′ | ≥ 3. 1. Suppose G and G′ are transitive. (a) If G and G′ are transitive simple groups, then A × A′ is accessible. (b) If G and G′ are primitive groups, then A × A′ is accessible. 2. Suppose G and G′ are primitive. (a) If G and G′ are primitive simple groups, then A×A′ is uniformly Boolean minimal. (b) If G is SQ or AQ , and G′ is SQ′ or AQ′ , and we have (|Q|, |Q′ |) 6∈ {(3, 4), (4, 3), (4, 4)}, then A × A′ is uniformly Boolean minimal. (c) If G and G′ are 2-transitive groups which are not of affine type, then A × A′ is uniformly Boolean minimal. Before proving this, we will explain what we mean by “affine type”. The notion of “affine type” comes from the O’Nan-Scott theorem [12, Theorem 4.1A], a structure theorem for primitive groups. The O’Nan-Scott theorem divides the primitive groups into different types based on their socle. The socle of a group G is the subgroup generated by all the minimal normal subgroups of G, that is, the normal subgroups N of G for which there does not exist a non-trivial normal subgroup N ′ of G with N ′ ⊆ N . A group is abelian if its binary operation is commutative. A primitive group with an abelian socle is necessarily of affine type, which means it is a permutation group of degree pd for p prime and d ≥ 1, and is isomorphic to a subgroup of the affine group AGL(d, p). This is a group of permutations of the set Fdp , where Fp is the finite field with p elements; it consists of all maps of the form (γ1 , . . . , γd ) 7→ (αγ1 + β, . . . , αγd + β), where α, β, γ1 , . . . , γd ∈ Fp . After this proof, we will show that there exist DFAs A and A′ whose transition groups are 2-transitive groups of affine type, such that A × A′ is not uniformly Boolean minimal. Hence in the statement of Corollary 3 (2c), excluding 2-transitive groups of affine type is necessary. We remark that A3 , S3 , A4 and S4 happen to be groups of affine type; we will see in the proof that this is not true for symmetric and alternating groups of larger degree. 36 Proof. (1a): Recall that a group is simple if it has no non-trivial proper normal subgroups. Hence if G is a transitive simple group, then the only non-trivial normal subgroup of G is G itself. Similarly, the only non-trivial normal subgroup of G′ is G′ itself. Thus the conditions of Theorem 2 hold. (1b) Suppose G and G′ are primitive. It is an easy exercise in group theory to show that all non-trivial normal subgroups of a primitive group are transitive (e.g., see [12, Theorem 1.6A]). Thus the conditions of Theorem 2 hold in this case. (2a): Since G is a primitive simple group, then the only non-trivial normal subgroup of G is G itself, and similarly for G′ . Thus the conditions of Theorem 2 hold. (2b): First suppose |Q| 6= 4 and |Q′ | 6= 4. It is well-known that An is simple for n 6= 4 (e.g., see [12, Corollary 3.3A]). Thus AQ and AQ′ are primitive simple groups. So if G = AQ and G′ = AQ′ , this case follows from (2a). Now, consider the symmetric groups. It is well-known that for n 6= 4, the only non-trivial normal subgroups of Sn are An and Sn . To see this, let N be a non-trivial normal subgroup of Sn . If An ≤ N , we claim that either N = An or N = Sn . Indeed, if N properly contains An , then it contains some permutation p that cannot be written as a product of an even number of 2-cycles. But every permutation can be written as a product of 2cycles, so p can be written as a product of an odd number of 2-cycles. Thus for each 2-cycle (i, j), we have (i, j)p ∈ An ≤ N . So N contains (i, j)pp−1 = (i, j); since N contains all 2-cycles, we must have N = Sn . If N ≤ An , consider ghg −1 for g ∈ An and h ∈ N . Since g, h and g −1 are all in An , each can be written a product of an even number of 2-cycles, and thus ghg −1 can be written this way as well. So N is also a non-trivial normal subgroup of An ; but An is simple for n 6= 4, so we must have N = An . Thus a non-trivial normal subgroup is either Sn or An . both of which are ′ )}, Theorem 2 applies primitive. Thus if (G, G′ ) ∈ {(AQ , SQ′ ), (SQ , AQ′ ), (SQ , SQ and gives the result. Note we have also shown that for n ≥ 5, the alternating group An is the unique minimal normal subgroup of Sn and An . Thus the socle of Sn and An is non-abelian, which shows that Sn and An are not of affine type when n ≥ 5. Now, suppose |Q| = 4 or |Q′ | = 4 and (|Q|, |Q′ |) 6∈ {(3, 4), (4, 3), (4, 4)}. Then |Q| ≥ 5 or |Q′ | ≥ 5. Assume without loss of generality that |Q| = 4 and |Q′ | ≥ 5; the other case is symmetric. Consider the normal subgroup Rπ ′ of G′ . If Rπ ′ is trivial, then as we argued in the proof of Proposition 8, the map π : G× → G must be injective. Since G is either A4 or S4 , this means |G× | ≤ |S4 | = 24. But the map π ′ : G× → G′ is surjective, and G is either AQ′ or SQ′ for |Q′ | ≥ 5. This means |G× | ≥ |A5 | = 60. So we have 60 ≤ 24, which is a contradiction. Thus Rπ ′ cannot be trivial. So Rπ ′ is a non-trivial normal subgroup of G′ , and thus it is primitive, since G′ is SQ′ or AQ′ and |Q′ | ≥ 5. Thus the arguments in the proof of Theorem 2 apply and A × A′ is uniformly Boolean minimal. (2c): The results from permutation group theory that we use for this case are somewhat more advanced. We will need the fact that a 2-transitive group 37 has a unique minimal normal subgroup; this follows from two theorems in [12] (Theorem 4.1B and Theorem 4.3B), or alternatively is stated as a single result in [10] (Proposition 5.2). The other fact we need is that if the socle of a 2transitive group is non-abelian, it is necessarily primitive [12, Theorem 7.2E]. Now, suppose G is 2-transitive. The socle of G is the subgroup generated by all the minimal normal subgroups; but G has a unique minimal normal subgroup N , so the socle of G is just equal to N . If N is abelian, then G is of affine type. Thus we may assume the socle N is non-abelian; then it follows that N is primitive. Since N is the unique minimal normal subgroup of G, every non-trivial normal subgroup of G contains N , and thus is primitive. Similarly, every nontrivial normal subgroup of G′ is primitive. It follows that Theorem 2 applies. ⊓ ⊔ 4.5 Affine Groups We now construct an infinite family of pairs of dissimilar permutation DFAs which have 2-transitive transition groups of affine type, and are not uniformly boolean minimal. The details of the construction require some knowledge of finite fields. We will first give the construction in full generality, and then use the construction to produce an explicit pair of 8-state DFAs. Example 17. For k ≥ 0, let F2k denote the finite field of order 2k . For α, β, ξ ∈ F2k with α 6= 0, define tα,β : F2k → F2k to be the map ξ 7→ αξ + β. The set of all such maps forms a group of permutations of F2k , which is called the 1-dimensional affine group on F2k and is denoted AGL(1, 2k ). Multiplication (that is, composition of maps) in the affine group is given by the rule tα,β tγ,ξ = tαγ,βγ+ξ . It is an easy but somewhat tedious exercise to show that the affine group is 2-transitive. In [12, Chapter 4] it is proved that the affine group has an abelian socle. Recall that the multiplicative group of a finite field is cyclic. Let x be a generator for the multiplicative group of F2k . We claim that the elements tx,0 and t1,1 generate AGL(1, 2k ). This is once again an easy but tedious exercise, so we omit a proof. An element of AGL(1, 2k ) of the form t1,β for some β ∈ F2k is called a translation. The translations form a subgroup of AGL(1, 2k ), which we call T . We claim that the subgroup of translations T is imprimitive and contains a block B of size 2k−1 . To see this, recall that F2k is a k-dimensional vector space over F2 . Pick k − 1 non-zero elements of F2k and let B be the subspace spanned by them. Now consider Bt1,β for β ∈ F2k . – If β ∈ B, then α+β ∈ B for all α ∈ B, since B is a subspace; thus Bt1,β = B. – If β 6∈ B, then for all α ∈ B we have α + β 6∈ B. Indeed, if α + β was in B then (α + β) − α = β would be in B, since B is a subspace. – Thus if β 6∈ B, then Bt1,β ∩ B = ∅. 38 And so, we see that B is indeed a block for T . Consider the subgroup A of AGL(1, 2k ) × AGL(1, 2k ) generated by the elements a = (tx,0 , tx,0 ), b = (t1,1 , t1,0 ) and c = (t1,0 , t1,1 ). We claim that every element (tα,β , tγ,ξ ) of A has the property that α = γ. For simplicity, we will call elements with this property balanced. Certainly the elements a, b and c are balanced, and so is the identity element (t1,0 , t1,0 ). We will show that multiplying a balanced element on the right by a, b or c results in a balanced element. Indeed, first observe that tα,β tx,0 = tαx,βx and tα,β t1,1 = tα,β+1 . Thus if we take an arbitrary balanced element (tα,β , tα,γ ), then we have: (tα,β , tα,γ )a = (tα,β tx,0 , tα,γ tx,0 ) = (tαx,βx , tαx,γx ). (tα,β , tα,γ )b = (tα,β t1,1 , tα,γ t1,0 ) = (tα,β+1 , tα,γ ). (tα,β , tα,γ )c = (tα,β t1,0 , tα,γ t1,1 ) = (tα,β , tα,γ+1 ). Since a, b and c and the identity are balanced, and multiplying a balanced element by a, b or c results in a balanced element, it follows the group ha, b, ci = A consists solely of balanced elements. Next, let B = F2k \B and consider the set X = (B ×B)∪(B ×B) ⊆ F2k ×F2k . Notice that (0, 0), (1, 1) ∈ F2k × F2k both lie in X. We claim that elements of A cannot distinguish (0, 0) and (1, 1) with respect to X, that is, for all g ∈ A we have (0, 0)g ∈ X ⇔ (1, 1)g ∈ X. – To see this, consider an arbitrary element g = (tα,β , tα,γ ) of A. – We have 0tα,β = β and 1tα,β = α + β. It follows that (0, 0)g = (β, γ) and (1, 1)g = (α + β, α + γ) = (βt1,α , γt1,α ). – Since B is a block for the subgroup of translations T , we either have Bt1,α = B or Bt1,α ∩ B = ∅. – But B has size 2k−1 , which is exactly half the size of F2k , so if Bt1,α ∩ B = ∅ then Bt1,α = B. It follows that if (β, γ) is in B × B or B × B (that is, (β, γ) is in X) then (βt1,α , γt1,α ) is also in B × B or B × B (and thus in X). Likewise, if (β, γ) is not in X, then it is either in B × B or B × B, and it follows (βt1,α , γt1,α ) is not in X. Thus (0, 0)g ∈ X ⇔ (1, 1)g ∈ X for all g ∈ A. Finally, for each k ≥ 1, we construct a pair of DFAs over the alphabet {a, b, c} with 2k states each, which both have AGL(1, 2k ) as their transition group, but do not have a uniformly boolean minimal direct product. We define a DFA A as follows: – The state set is F2k , the initial state is 0, and the final state set is B. – The transformations are a = tx,0 , b = t1,1 and c = t1,0 . We define A′ in the same way as A, except the roles of b and c are swapped: – The transformations are a′ = tx,0 , b′ = t1,0 and c′ = t1,1 . 39 Since tx,0 and t1,1 generate AGL(1, 2k ), it is clear that both DFAs have AGL(1, 2k ) as their transition group. Now consider A × A′ . Let ◦ be the “complement of symmetric difference” operation, so that B ◦ B = (B × B) ∪ (B × B). Observe that the transition group of A × A′ is simply the group A. Thus the states (0, 0) and (1, 1) of A × A′ are not distinguishable by B ◦ B. Hence (A × A′ )(B ◦ B) is not minimal, and it follows that A × A′ is not uniformly boolean minimal.  Example 18. We now carry out the construction of Example 17 for k = 3, 2k = 8. First, we must construct the finite field F8 . Let F2 = {0, 1} denote the ring of integers modulo two. We define F8 to be the quotient ring F2 [x]/hx3 + x + 1i. This ring consists of polynomials of the form {a + bx + cx2 : a, b, c ∈ F2 }. Addition and multiplication work as usual for polynomials, except when multiplying, any terms of degree 3 or higher are reduced by repeatedly applying the rule x3 = x + 1. Note also that since the coefficients of the polynomials are in F2 , we have 2f (x) = 0 for all polynomials f (x). For example, we have (x2 + x + 1) + (x2 + 1) = x. Applying these facts, we see that: x3 = x + 1, x4 = x2 + x, x5 = x3 + x2 = x2 + x + 1, x6 = x3 + x2 + x = x2 + x + x + 1 = x2 + 1, x7 = x3 + x = x + 1 + x = 1. These calculations show that every non-zero element of F8 can be written as a power of the monomial x; in particular, 1 can be written as a power of x, and thus x is invertible. Hence F8 is indeed a field and x is a generator of the multiplicative group of F8 . Next, we explicitly write out the permutations tx,0 and t1,1 in cycle notation: tx,0 = (x, x2 , x3 , x4 , x5 , x6 , x7 ) = (x, x2 , x + 1, x2 + x, x2 + x + 1, x2 + 1, 1). t1,1 = (0, 1)(x, x+1)(x2 , x2 +1)(x2 +x, x2 +x+1) = (0, x7 )(x, x3 )(x2 , x6 )(x4 , x5 ). Finally, we need to find a block B for the subgroup of translations of AGL(1, 8). The construction tells us to pick two non-zero elements of F8 and let B be the subspace spanned by them. If we take 1 and x, we get B = {0, 1, x, x + 1}. We now have all the information we need to construct A and A′ . A state diagram for A is shown in Figure 5, with the self-loops on c omitted. One may verify computationally that A × A′ is not minimal when it is assigned the final  state set (B × B) ∪ (B × B). For k = 1, we get DFAs A, A′ and A × A′ that are isomorphic to the DFAs of Example 11. For k = 2, it happens that AGL(1, 4) is isomorphic to the alternating group A4 . Hence the k = 2 case gives an example of dissimilar DFAs that are not uniformly boolean minimal, and have alternating groups as their transition groups. As Corollary 3 shows, this example does not generalize to alternating groups of higher degree. The DFA A of Example 9 is isomorphic to the DFA A produced by the construction of Example 17 with k = 2. The construction of Example 17 also shows that condition (1) of Proposition 7 is not sufficient for uniform boolean minimality. 40 a b b 0 x7 a a x x6 a b x2 b b b a a x3 x5 a b x4 a, b Fig. 5. DFA A of Example 18. Each state also has a self-loop on letter c; these transitions are omitted from the diagram. The final state set is B = {0, x7 = 1, x, x3 = x+1}, the block of the subgroup of translations of AGL(1, 8) that was found in Example 18. Example 19. The DFAs A and A′ constructed in Example 17 are not uniformly boolean minimal. However, we claim the subgroups Rα π ′ ≤ G′ and Cα π ≤ G are primitive for all α ∈ F2k , and thus A and A′ meet condition (1) of Proposition 7. In fact, the groups Rα π ′ and Cα π are equal to AGL(1, 2k ). First, we show that R0 π ′ and C0 π are equal to AGL(1, 2k ). Consider (a, a′ ) = (tx,0 , tx,0 ). – Since tx,0 fixes 0, it follows that (a, a′ ) ∈ R0 and (a, a′ ) ∈ C0 . Thus a′ = tx,0 ∈ R0 π ′ and a = tx,0 ∈ C0 π. – Since (b, b′ ) = (t1,1 , t1,0 ) and b′ = t1,0 fixes 0, we see that (b, b′ ) ∈ C0 . Thus b = t1,1 ∈ C0 π. – Similarly, since (c, c′ ) = (t1,0 , t1,1 ), we see that (c, c′ ) ∈ R0 . Thus c′ = t1,1 ∈ R0 π ′ . Since tx,0 and t1,1 generate AGL(1, 2k ), and these elements are in R0 π ′ and C0 π, it follows R0 π ′ and C0 π are equal to AGL(1, 2k ) and thus are primitive. To show that Rα π ′ and Cα π are primitive for all α 6= 0, we prove a general fact about single row and column stabilizers: if Cp′ π ≤ G is primitive for some p′ ∈ Q′ and G′ is transitive, then Cq′ π is primitive for all q ′ ∈ Q′ (and similarly for single row stabilizers). To see this, choose w′ ∈ G′ such that p′ w′ = q ′ . Let B be a block for Cq′ π. We claim Bw−1 is a block for Cp′ π. To see this, choose x ∈ Cp′ π and consider Bw−1 x ∩ Bw−1 . If Bw−1 x ∩ Bw−1 6= ∅, then Bw−1 xw ∩ B 6= ∅. Now, for all x ∈ Cp′ π, we have p′ x′ = p′ by definition. It follows q ′ (w′ )−1 x′ w′ = p′ x′ w′ = p′ w′ = q ′ . Since (w′ )−1 x′ w′ fixes q ′ , we have w−1 xw ∈ Cq′ π. – Since B is a block for Cq′ π and Bw−1 xw ∩ B 6= ∅, we have Bw−1 xw = B. – Hence Bw−1 x = Bw−1 , which proves Bw−1 is a block for Cp′ π. – – – – – – 41 It follows that if B is a block for Cq′ π, it must be a trivial block; otherwise Bw−1 is a non-trivial block for the primitive group Cp′ π, which is a contradiction. Thus Cα π is primitive for all α ∈ F2k , and symmetrically we see that Rα π ′ is primitive for all α ∈ F2k . This shows that A and A′ satisfy condition (1) of Proposition 7, yet A × A′ is not uniformly boolean minimal.  We can also use DFAs derived from affine groups to show that the conditions of Lemma 3 are not necessary for uniform boolean minimality. Example 20. As in Example 18, we define two DFAs A and A′ that have transition group AGL(1, 8). However, this time the direct product of the DFAs will be uniformly boolean minimal. We define A as follows (leaving the final state set unspecified). – The state set is F8 , constructed as in Example 18, and the initial state is 0. – The transformations are a = tx,0 and b = t1,1 . ′ Define A′ to have the same states as A and transformations a′ = t−1 x,0 , b = t1,1 . ′ Since A and A only have 8 states each, we were able to verify computationally that A × A′ is uniformly boolean minimal by a brute force approach. We computed A × A′ , and for each pair of sets ∅ ( S ( Q and ∅ ( S ′ ( Q′ , we checked the minimality of (A × A′ )(X) for all (S, S ′ )-compatible sets X. We have also verified computationally that R0,1 π ′ and C0,1 π are imprimitive, and hence A and A′ do not meet the conditions of Lemma 3. We verified this by using the cycle notation representation we found for tx,0 and t1,1 to explicitly construct the transition group G× of A × A′ in GAP. Then we computed the setwise stabilizer R0,1 of {0, 1} × F8 (the rows indexed by 0 and 1), and the setwise stabilizer C0,1 of F8 × {0, 1} (the columns indexed by 0 and 1). Next, we computed R0,1 π ′ ≤ G′ and C0,1 π ≤ G. These groups turned out to both be equal to T , the subgroup of translations in AGL(1, 8). We saw earlier than T is imprimitive.  We suspect that if this construction is generalized to AGL(1, 2k ), the resulting DFAs will have the same property of being uniformly boolean minimal but having R0,1 π ′ and C0,1 π imprimitive. However, we were unable to prove this. 4.6 Similar DFAs To close out Section 4, we consider what happens when the DFAs A and A′ are similar. We have not investigated this case very deeply. In some ways, it seems much more difficult than the dissimilar case. Particularly, most of our results rely on the projections of various kinds of row and column stabilizers being transitive or primitive. For similar DFAs, the projections of the full row and column stabilizers Cπ and Rπ ′ are both trivial. Hence there is no guarantee that other types of stabilizers such as Rq π ′ or Cp′ ,q′ π have useful properties, or even that they are non-trivial, and so we cannot necessarily use these groups to our advantage. 42 On the other hand, similarity imposes the very strong condition that the groups G, G′ and G× are all isomorphic. It may be possible to exploit this to prove some interesting things in the similar case. It is not difficult to prove that if A and A′ are isomorphic as DFAs, then G× is necessarily intransitive, so the case of isomorphic similar DFAs is uninteresting for our purposes. We give two examples demonstrating what can happen with non-isomorphic similar DFAs. Example 21. Recall that in Example 16, we constructed two similar DFAs that are of different sizes (and hence are non-isomorphic) and have primitive transition groups. – A has states {1, . . . , 5} and transformations a = (3, 4), b = (1, 2, 3)(4, 5). – A′ has states {1, . . . , 10} and transformations a′ = (1, 2)(6, 8)(7, 9) and b′ = (2, 6, 4, 5, 3, 7)(8, 10, 9). We have verified computationally that A × A′ has an intransitive transition group, and so is not accessible. Thus even if non-isomorphic similar DFAs have primitive transition groups, their direct product might have an intransitive transition group (compare this with Corollary 3 for dissimilar DFAs). Note that in Example 16, we also showed that by simply swapping the roles of a′ and b′ in A′ , the two DFAs A and A′ become dissimilar. Furthermore, A has the symmetric group S5 as its transition group. Thus by Corollary 3, the two DFAs actually become uniformly boolean minimal if we swap the roles of a′ and b′ .  Example 22. There is a primitive subgroup of S6 that is isomorphic to S5 . Using GAP, we can obtain an explicit isomorphism between S5 and this subgroup, just as we did in Example 16. gap> IsomorphismGroups(SymmetricGroup(5),PrimitiveGroup(6,2)); [ (3,4), (1,2,3)(4,5) ] -> [ (1,2)(3,4)(5,6), (1,2,3,5,4,6) ] We then use this isomorphism to construct similar DFAs: – A has states {1, . . . , 5} and transformations a = (3, 4) and b = (1, 2, 3)(4, 5). – A′ has states {1, . . . , 6} and transformations a′ = (1, 2)(3, 4)(5, 6) and b′ = (1, 2, 3, 4, 5, 6). Unlike the DFAs of Example 21, here we verified computationally that A × A′ actually has a transitive transition group. Hence a direct product of nonisomorphic similar DFAs with primitive transition groups may or may not be accessible. Note that A × A′ is not uniformly boolean minimal. For example, we have verified computationally that (A×A′ )(X) is not minimal for X = {1}×{1, 3, 5}. We have not found an example of two similar DFAs that are uniformly boolean minimal, but we also have not proved that no such example exists.  43 5 Conclusion We summarize the major results proved in Section 4. Theorem 1 gives necessary and sufficient conditions for a pair of regular languages (L, L′ ) to have maximal boolean complexity, with the requirement that these languages are recognized by permutation DFAs A and A′ with exactly one final state. In this special case, it turns out that (L, L′ ) is uniformly boolean minimal if and only if A × A′ is accessible. This gives a partial characterization of witnesses for the state complexity of proper binary boolean operations. We have several results which may help to determine whether A × A′ is accessible. Lemma 2 gives group-theoretic conditions for accessibility, while Proposition 6 gives a useful graph-theoretic condition. Theorem 2 gives a particularly useful group-theoretic condition for accessibility of A × A′ , as well as a similar condition for uniform boolean minimality. The power of this theorem is demonstrated by Corollary 3, which gives several classes of groups where the condition of Theorem 2 holds. If one can show that the transition group A or of A′ lies in one of these classes, one immediately gets useful information about A × A′ . Corollary 3 is also useful for constructing examples of DFAs whose direct product is accessible or uniformly boolean minimal: one may pick a pair of groups from the classes mentioned in the corollary, and use them as the transition groups of a pair of DFAs. Lemma 3 gives some sufficient conditions for uniform boolean minimality of permutation DFAs. The conditions are stronger than those of Theorem 2, but more difficult to verify. Unfortunately, Example 20 shows that these conditions are not necessary. Necessary and sufficient conditions for uniform boolean minimality are still unknown. Proposition 7 gives a necessary and sufficient condition (1) for a property that is slightly weaker than uniform boolean minimality to hold (in permutation DFAs). Specifically, condition (1) of Proposition 7 does not guarantee minimality for final state sets corresponding to the symmetric difference operation or its complement. Unfortunately, Example 19 shows that condition (1) of Proposition 7 is not sufficient for uniform boolean minimality. This means a precise characterization of uniform boolean minimality lies strictly between the conditions given by Lemma 3 and Proposition 7. We state some unsolved problems and potential new directions of research arising from our work in this paper. – Find necessary and sufficient conditions for A × A′ to be uniform boolean minimal. Even in the special case of permutation DFAs, we were unable to resolve this. – Find more classes of groups where the hypotheses of Theorem 2 hold, thus extending the reach of Corollary 3. – Find an example of two similar DFAs that are uniformly boolean minimal, or prove that no such DFAs exist. Even pairs of similar DFAs with an accessible direct product seem to be rare; one such pair is given in Example 22. 44 – Prove anything interesting about accessibility and/or uniform boolean minimality of direct products of non-isomorphic similar DFAs. – Investigate uniform boolean minimality with respect to “unrestricted state complexity” (see the last two paragraphs of Section 2). – Investigate uniform boolean minimality for DFAs that do not contain “interesting” subgroups of permutations. That is, let us say the transition group of a DFA is “interesting” if it satisfies the hypotheses of any of our major results. Although we stated our results exclusively for permutation DFAs, they hold more generally for DFAs whose transition monoids contain an “interesting” subgroup of permutations. However, many DFAs have transition monoids which do not contain “interesting” subgroups; for example, DFAs of star-free languages have transition monoids with no non-trivial subgroups. In these cases, what can we say about uniform boolean minimality, or even accessibility of direct products? – Look for necessary and/or sufficient conditions characterizing state complexity witnesses for operations on regular languages other than boolean operations (e.g., concatenation, star, reverse). As these problems could be extremely difficult, it may be useful to start with the special case of group languages or some other subclass of the regular languages. Acknowledgements I thank Jason Bell and Janusz Brzozowski for careful proofreading and helpful comments. The computer algebra system GAP [14] was invaluable for this research; I cannot overstate its importance in obtaining these results. In particular, I thank the authors of the Automata GAP package [11] and all contributors to GAP’s library of primitive groups. Funding: This work was supported by the Natural Sciences and Engineering Research Council of Canada under grant No. OGP0000871. References 1. Almeida, J., Rodaro, E.: Semisimple synchronizing automata and the WedderburnArtin theory. Int. J. Found. Comput. Sc. 27(02), 127–145 (2016) 2. Araújo, J., Cameron, P.J., Steinberg, B.: Between primitive and 2-transitive: synchronization and its friends. https://arxiv.org/abs/1511.03184 (Nov 2015) 3. Bell, J., Brzozowski, J., Moreira, N., Reis, R.: Symmetric groups and quotient complexity of boolean operations. In: Esparza, J., et al. (eds.) ICALP 2014. LNCS, vol. 8573, pp. 1–12. Springer (2014) 4. Bosma, W., Cannon, J., Playoust, C.: The Magma algebra system I: The user language. J. Symbolic Comput. 24(3–4), 235–265 (1997) 5. Brzozowski, J.: Quotient complexity of regular languages. J. Autom. Lang. Comb. 15(1/2), 71–89 (2010) 6. Brzozowski, J.: In search of most complex regular languages. Int. J. Found. Comput. Sc. 24(06), 691–708 (2013) 45 7. Brzozowski, J.: Unrestricted state complexity of binary operations on regular languages. In: Câmpeanu, C., Manea, F., Shallit, J. (eds.) DCFS 2016. LNCS, vol. 9777, pp. 60–72. Springer (2016) 8. Brzozowski, J., Jirásková, G., Li, B.: Quotient complexity of ideal languages. Theoret. Comput. Sci. 470, 36–52 (2013) 9. Brzozowski, J., Liu, B.: Quotient complexity of star-free languages. Int. J. Found. Comput. Sc. 23(06), 1261–1276 (2012) 10. Cameron, P.J.: Finite permutation groups and finite simple groups. Bull. London Math. Soc 13(1), 1–22 (1981) 11. Delgado, M., Linton, S., Morais, J.: Automata – a GAP package, Version 1.13. http://cmup.fc.up.pt/cmup/mdelgado/automata/ (19 November 2011) 12. Dixon, J.D., Mortimer, B.: Permutation groups. Springer (1996) 13. Ésik, Z., Gao, Y., Liu, G., Yu, S.: Estimation of state complexity of combined operations. Theoret. Comput. Sci. 410(35), 3272–3280 (2009) 14. The GAP Group: GAP – Groups, Algorithms, and Programming, Version 4.8.6 (2016), http://www.gap-system.org 15. Maslov, A.N.: Estimates of the number of states of finite automata. Dokl. Akad. Nauk SSSR 194, 1266–1268 (Russian) (1970), English translation: Soviet Math. Dokl. 11(1970) 1373–1375 16. Restivo, A., Vaglica, R.: Extremal minimality conditions on automata. Theor. Comput. Sci. 440–441, 73–84 (2012) 17. Restivo, A., Vaglica, R.: A graph theoretic approach to automata minimality. Theoret. Comput. Sci. 429, 282–291 (2012) 18. Salomaa, A., Salomaa, K., Yu, S.: State complexity of combined operations. Theoret. Comput. Sci. 383(2), 140–152 (2007) 19. Salomaa, A., Wood, D., Yu, S.: On the state complexity of reversals of regular languages. Theoret. Comput. Sci. 320(2), 315–329 (2004) 20. Steinberg, B.: A theory of transformation monoids: combinatorics and representation theory. https://arxiv.org/abs/1004.2982 (Apr 2010) 21. Yu, S., Zhuang, Q., Salomaa, K.: The state complexities of some basic operations on regular languages. Theor. Comput. Sci. 125(2), 315–328 (1994) 46
4math.GR
Taming Context-Sensitive Languages with Principled Stateful Parsing Nicolas Laurent Kim Mens arXiv:1609.05365v1 [cs.PL] 17 Sep 2016 Université catholique de Louvain, ICTEAM {nicolas.laurent, kim.mens}@uclouvain.be Abstract 1. Historically, true context-sensitive parsing has seldom been applied to programming languages, due to its inherent complexity. However, many mainstream programming and markup languages (C, Haskell, Python, XML, and more) possess context-sensitive features. These features are traditionally handled with ad-hoc code (e.g., custom lexers), outside of the scope of parsing theory. Current grammar formalisms struggle to express contextsensitive features. Most solutions lack context transparency: they make grammars hard to write, maintain and compose by hardwiring context through the entire grammar. Instead, we approach context-sensitive parsing through the idea that parsers may recall previously matched input (or data derived therefrom) in order to make parsing decisions. We make use of mutable parse state to enable this form of recall. We introduce principled stateful parsing as a new transactional discipline that makes state changes transparent to parsing mechanisms such as backtracking and memoization. To enforce this discipline, users specify parsers using formally specified primitive state manipulation operations. Our solution is available as a parsing library named Autumn. We illustrate our solution by implementing some practical context-sensitive grammar features such as significant whitespace handling and namespace classification. In this section, we review the notion of context-sensitive parsing (1.1), describe how we tackle it through recall and stateful parsing (1.2), and situate our implementation (1.3). In what follows, we use the term parser to refer to any unit of functionality that can match some input text (both at the the lexical and grammatical levels) and produce a result based on this match. We assume that simple parsers can be combined into increasingly complex parsers. Categories and Subject Descriptors Languages]: Processors—Parsing 1.1 Introduction Context-Sensitive Parsing True context-sensitive parsing is seldom applied to programming languages. Writing context-sensitive grammars can prove challenging, for instance the grammar for the language an bn cn is notoriously tricky [10]. In addition, most language features can be adequately expressed using the much more tractable context-free grammars. Nevertheless, many mainstream languages exhibit context-sensitive features. Here are a few examples: • In C, in order to determine whether the statement x*y; is the product of x by y, or rather the declaration of a variable y which is a pointer to type x, one must analyze the type definitions preceding the statement. • In Haskell and Standard ML, programmers can introduce operators with custom precedence and associativity. The parser needs to interpret these definitions in order to be able to parse the remainder of the input. D.3.4 [Programming Keywords stateful parsing, grammars, context sensitivity, data dependence, parsing expressions • Since Python has significant indentation, a Python parser Nicolas Laurent is a research fellow of the Belgian fund for scientific research (F.R.S.-FNRS). • In XML, opening tags must be matched with corresponding closing tags. For instance, <foo></foo> is valid while <foo></bar> is not. As such, an XML parser must memo- needs to detect when the indentation level increases or decreases. rize the names of open tags, at arbitrary levels of nesting. • Many network protocols, including TCP, make use of length-delimited fields whose length is not known in advance but indicated by a length field that precedes them. Most parsing tools cannot adequately handle these syntactic peculiarities, leading to all sorts of hacks, and sometimes [Copyright notice will appear here once ’preprint’ option is removed.] Taming Context-Sensitive Languages with Principled Stateful Parsing 1 2016/9/20 2. to the rejection of parsing tools altogether. There are a few exceptions however, which we review in Section 2. Section 3 deals with the key properties almost all these solutions lack, namely context transparency, hence calling for a new solution. 1.2 As the problem of context-sensitive features in programming languages is not new, it is not surprising that several solutions have been proposed. We review these solutions in order to better put our contributions in perspective. We do not purport to review the entire body of work on context-sensitive parsing, but only the approaches closest to our goal. In particular, we left out the literature on context-sensitive lexical analysis (e.g., [3, 30]) which by definition only handles a small subset of all context sensitivity issues. Recall and Stateful Parsing While context sensitivity was first characterized by Chomsky [5], his Context-Sensitive Grammars (CSG) are only of little help, due to the intricate coding that they require1 . A CSG is made of rewrite rules X → Y where X and Y are strings of mixed terminals and non-terminals. These rules must be non-contracting: Y, as a string of symbols, must not be shorter than X.2 As a matter of fact, these grammars were never meant to describe programming languages, but natural languages, where the shape of the rules make much more sense. In particular, it is difficult to encode recall constraints: for instance, requiring the same string of tokens to appear at two different locations in the sentence (assuming the string is not fixed in advance). We propose instead to approach context sensitivity through the notion of recall, i.e. the ability to accept sentences based on relationships between some of their parts. This is more easily understood in parsing terms as the capability to make parsing decisions based on previously matched input. We enable recall by allowing users to write parsers which can manipulate mutable state. However, unlike solutions deployed by existing parsing tools such as ANTLR [24] and Rats! [9], we are principled about state use. Indeed, parsing algorithms do not proceed linearly. When faced with a choice, they may speculatively try an alternative, and need to backtrack if this alternative does not succeed. When backtracking happens, all changes made to the state during the speculative execution need to be reversed. Parsers may also memoize the result of a speculative execution. In a stateful model, these results need to include the state changes incurred by the execution. As will be explained in Section 4, we satisfy these requirements by introducing primitive operations to manipulate mutable state in a principled way. 2.1 Implementation Data-dependent grammars Jim et al. [15] proposed data-dependent grammars, a formalism which permits context sensitivity by allowing rules to be parameterized by semantic values. A parameterized nonterminal appearing on the right-hand side of a rule acts as a form of function call that also returns a semantic value. These semantic values are computed by semantic actions written in a general-purpose programming language. There are also semantic predicates which can make grammar branches succeed or fail depending on a semantic value. Data-dependent grammars can be compiled to a format accepted by a target parsing tool, which must support fairly general semantic actions. In subsequent work [14], the authors introduced a new kind of automaton that can be used We implement our stateful parsing approach as a PEGlike [8] (top-down recursive descent) functional-style 3 parsercombinator library named Autumn, which can be used with Java, Kotlin, and other Java-compatible languages. Implementation details are given in Section 5 and a detailed use case is worked out in Section 6. 1 The same holds for a large body of work on mildly context-sensitive grammars. [16] 2 In reality, CSG rules are not required to be non-contracting, but noncontracting grammars and CSG describe the same set of languages. [6] 3 Parsers are merely functions. Moreover, custom parsers can be defined. Taming Context-Sensitive Languages with Principled Stateful Parsing Backtracking Semantic Actions Parsing with backtracking semantic actions [29] is an approach that extends a (general) backtracking LR parser with reversible semantic actions. Upon backtracking, state changes are reversed. Two important restrictions apply: state changes can only occur during term reduction, and the state can only affect the parse through semantic conditions that trigger backtracking. Compared to our approach, the difference in implementation (top-down recursive versus LR) has far-reaching consequences. Backtracking semantic actions reverse state changes rather than making snapshots of the state. Accordingly it becomes impossible to compare state snapshots. These capabilities are very useful in the context of PEG parsing, as they enable the definition of custom parsers, left-recursion and memoization; but less so within an LR system where custom parsers cannot be defined. We also believe our top-down recursive-descent model to be more intuitive in the presence of state. Logically, state changes occur as parser are invoked, from left to right and from top to bottom. Backtracking semantic actions, on the other hand, are executed upon term reduction. This means that a parser may modify the state before other parsers that matched input on its left. Despite these caveats, we consider parsing with backtracking semantic actions [29] to be the safest and most convenient system for context-sensitive parsing among those presented in this section. 2.2 1.3 Related Work 2 2016/9/20 to implement parsers recognizing data-dependent grammars. These techniques are put to work in a tool called Yakker. Data-dependent grammars, though theoretically compelling, suffer from usability issues. The value-passing model means that the parse state needs to be threaded throughout the grammar. Making a rule dependent on a new semantic value means that all rules through which this rule is reachable might need to be modified to pass this value around. Maintainability-wise, this is far from ideal. Moreover, it harms composability, as a rule must be aware of all states it has to pass through. Afroozeh and Izmaylova [1] show how advanced parser features such as lexical disambiguation filters, operator precedence, significant indentation and conditional preprocessor directives can be translated to data-dependent grammars. Quite clearly, the task is non-trivial and one comes away with the feeling that dependent grammars are better suited as an elegant calculus to be targeted by parsing tool writers rather than as a paradigm that fits the needs of tool users. The machinery implementing the formalism is also distinctively non-trivial, involving a multi-stage transformation into a continuation routine or into a new kind of automaton. In contrast, our approach consists of a lightweight library that can be layered on top of a general-purpose programming language. Finally, we note that the much older Definite Clause Grammars (DCGs) [25] formalism works on almost exactly the same principle, but building upon logic programming. Accordingly, it suffers from similar limitations. 2.3 tors generate grammar fragments at parse-time (much like a monadic parser generates a new parser), hence the term active. While monadic parsing seems at first sight very similar to the data-dependent grammars from Section 2.2, Atkey [2] carefully contrasts the two approaches: We characterise their [Jim et al.] approach as refining context-free grammars: each Yakker grammar has an underlying context-free grammar with regular righthand sides, and the constraints allow for sophisticated data-dependent filtering of parses. In contrast, we consider active right-hand sides that generate the grammar as the input is read. Nevertheless, monadic parsers suffer from the same pitfalls as data-dependent grammars: the state is threaded through the grammar (or code), leading to poor maintainability and composability. 2.4 Attribute grammars [18] associate attributes to AST nodes (assuming an AST node per matched grammar rule). The attributes can be synthesized: their value derived from the attributes of subnodes, or inherited: their value computed by a parent node. The formalism supports context-sensitive parsing through production guards predicated over attributes. However, attribute grammars are not context-transparent. To enable recall, they need to propagate the recalled value from the definition site to the use site, through a chain of of synthesized and inherited attributes. Even reference attributed grammars [11], which allow attributes to contain references to nodes, do not fully solve this distribution problem. Monadic parsers Monadic parsing [12] is a well-known way to build functionalstyle parser-combinator libraries, made popular by Haskell libraries such as Parsec [21]. In this paradigm, the type of a parser is a function parameterized by a result type, i.e. with signature string → (string, result), where the parameter string is the input text and the returned string is the input remaining after parsing. The parser type is also a monad instance, meaning there is a bind function whose signature, in Haskell notation, is: 2.5 Stateful Parsing Manipulating parse-wide state can be an effective solution to the problem of data dependence: the data depended upon can be written in the state when encountered and read or even altered later on. Broadly speaking, we can distinguish two big classes of stateful parsing tools. First, there are parser combinator libraries that allow users to write their own subparsers. Notable examples include Parboiled [7], Lua Peg [13] and Scala’s parser combinators [22]. Since these custom parsers are implemented in a general-purpose programming language, they can manipulate state, even though the libraries make no provision for this. Second, there are parsing tools that provide very general semantic actions and semantic predicates. Notable examples include Bison [28] and ANTLR [24]. These work much like their counterpart in Yakker (cf. Section 2.2), except that instead of returning a value, semantic actions may modify a global state object. Unfortunately, most parsing tools in both categories do not make the necessary provisions for dealing with backtracking and memoization: if the parser backtracks over a construct that made state changes (semantic action or custom parser), these changes need to be undone; if the parser can memoize Parser r1 -> (r1 -> Parser r2) -> Parser r2 where r1 and r2 are result types. This function takes a parser as first parameter, and a function which transforms the result of the parse into another parser as second parameter. When invoked, the parser returned by bind will invoke the first parser, pass its result (of type r1) to the function, then invoke the parser this function returns, yielding a result of type r2. The important point about monadic parsers is that they can handle context sensitivity. Indeed, the second parameter to bind (the function) returns a parser from a result. This means that the behaviour of the parser returned by bind depends on data acquired during the parse: this is a form of recall. An in-depth analysis of this aspect was done by Atkey [2]. In particular, he formalizes monadic parsers by introducing active right-hand sides, which are the right-hand sides of rules that can contain monadic combinators. These combinaTaming Context-Sensitive Languages with Principled Stateful Parsing Attribute Grammars 3 2016/9/20 the result of a construct, state changes need to be memoized as well. In the absence of such guarantees, a construct can only access state which it is sure has not been corrupted by changes that should have been discarded. It must also be sure that some state-altering construct was not skipped due to memoization. These are tricky propositions to verify even for medium-sized grammars, and every change to the grammar threatens to falsify them. One may think that solving the backtracking problem is simply a matter of inserting a construct that reverses state changes whenever a rule fails. However, a rule can be backtracked over even if it succeeded. It suffices that one of the rules through which our rule was reached fails. Hence this scheme would entail, for each state-altering construct, the modification of every rule through which it can be reached. 2.6 A grammatical construct is context-transparent if it is unaware of the context shared between its ancestors and its descendants. Data-dependent grammars, monadic parsers, DCGs and attribute grammars are not context-transparent because of the need to explicitly pass values around. For instance, consider two data-dependent grammars4 : a grammar for a Pythonlike language with significant indentation, in which the rules for block-level constructs (statements, definitions) are paremeterized by the indentation level; and a grammar for a generic macro definition language (e.g., GNU M4). We want to compose these two languages such that macro definitions may appear anywhere where definitions can appear in our Python-like language. Additionally, we want macro bodies to include Python-like code. The issue is that the rules in the macro language grammar know nothing about indentation level, yet the indentation level needs to be shared between the block holding the macro definition and the Python-like code appearing inside macro definitions. In this case, the lack of context transparency would force us to rewrite all rules in the macro language grammar to carry around the indentation level. Stateful parsers also are not context-transparent, as they must ensure that no unforeseen backtracking or memoization takes place. For instance, if a parser a manipulates the state and its callers do not expect it to backtrack, it cannot be swapped for a parser c(a) (where c is some parser combinator) without first ensuring that c(a) never backtracks over a. Lack of context-transparency makes grammars hard to reason about, hence hard to write and to maintain: refactoring, extending or composing grammars becomes particularly challenging, because each change to a rule might entail the need to modify all rules through which it is (transitively) reachable. In stateful parsers, such changes are liable to introduce undesired backtracking or memoization. We suggest a simple solution: use stateful parsing (which does not thread context through the grammar), but undo state changes upon backtracking and allow the memoization of state changes. And to achieve this, we introduce a new context sensitivity handling discipline: principled stateful parsing. Rats! Rats! [9] is a fully-memoizing (packrat) PEG parser. Rats! is, to the best of our knowledge, the only stateful parsing tool that provides some guarantees for state usage, by ensuring that state changes are discarded if certain conditions are met. For this purpose, Rats! introduces transactions that wrap rules under which state changes might occur. A transaction can either succeed, in which case its state changes are retained, or fail, in which case the changes are discarded. Rats! also requires that a nonterminal invoked at a given position within a transaction must always modify the state in the same way, no matter how that nonterminal was reached. Combining transactions with this requirement ensures that Rats! will never have to discard the memoization of a rule, hence upholding the linear-time guarantee of packrat parsers. In spite of its advantages, this scheme has two important pitfalls. First, it requires nonterminal invocations at a given position to always return the same result. This precludes parsing expressions that modify the behaviour of the parsing expression they invoke. However, this capability is valuable in practice. For example, we use it to enable left-recursion handling in our library (cf. Section 5.4). Second, state changes are not memoized. If a rule succeeds after applying a state change, but the enclosing transaction fails, the changes are lost. If we wanted to call the rule at the same position again, the memoized result would be used and it does not include the state changes. This means that a state change cannot safely be referenced by two different transactions, and that transactions cannot be re-tried after a state change higher up in the grammar hierarchy. 3. 4. In Section 1, we established the relevance of context-sensitive parsing and introduced the notion of recall as a way to express context-sensitive features in terms of backreferences to previously matched input. We enable recall by storing the matched input (or data derived thereof) in a mutable data store: the parse state. This section expounds how principled stateful parsing is able to work with parse state while avoiding the usual pitfalls of stateful parsing (cf. sections 2.5 and 3). Context Transparency As the previous section has shown, enabling the definition of context-sensitive languages without jeopardizing maintainability, composability or even safety is no easy feat. We put forward the notion of context transparency as the gold standard that a context sensitive parsing mechanism needs to meet in order to be considered sufficiently practical. Taming Context-Sensitive Languages with Principled Stateful Parsing Principled Stateful Parsing 4 The same reasoning applies to monadic parsers, DCGs and attribute grammars. 4 2016/9/20 4.1 Intuition be made using the same notation. We also note that in Z, all types used in the lambda calculus are sets. Since we adopt the functional parser-combinator approach (cf. Section 1), parsers are simply functions manipulating parse state (Section 4.2.1) whose set-theoretic signature is given in Section 4.2.2. Section 4.2.3 formally specifies the primitive state-manipulation operations that were briefly introduced in Section 4.1. Finally, Section 4.2.4 gives the semantics of parser invocation by specifying the call operation, which maps a parser (as defined in 4.2.2) to a single state transformation. Before diving into a formal explanation, we present the remarkably simple intuition behind the approach. The point of using state is to pass context around implicitly, without the need to hardwire context in the grammar, hence achieving context transparency (cf. Section 3). If the execution of a parser were linear, simply reading/writing to this state would suffice. Unfortunately, parsers must sometimes perform speculative executions that may fail further down the line, a phenomenon called backtracking. When backtracking occurs, all state changes in the speculative execution being backtracked over must be reversed. Hence, we need an operation that can take a snapshot of the state at a given point, and an operation that can restore the state described by such a snapshot. Given these requirements, it helps to think of the parse state as a log of the operations applied to the state, which can be snapshot and rolled back as required. Appropriately, this is also how we formalize the parse state. Additionally, it is sometimes desirable to save the result of a speculative execution (whether it failed or not), i.e., the state changes it induced: a delta acquired by performing a diff between the states before and after the execution. It is also necessary to be able to merge these changes back into the state. The most straightforward application of the diff and merge capabilities is the memoization of parse results. However, other valuable use cases exist, such as longestmatch parsing and left-recursive parsing (see Section 5.4). This motivates the need for four primitive state-manipulation operations: snapshot, restore, diff and merge. These operations are described in section 4.2.3. 4.2.1 At the core of our approach lies the notion of parse state. The parse state abstracts over a general mutable data store. We do not place any constraint on the data within the store. This is formalized as follows. [CHANGE] STATE = seq CHANGE The square brackets introduce the abstract set CHANGE of all state changes. What exactly constitutes a state change (most likely the mutation of a memory location) is an implementation concern that is not relevant to the formalization. STATE is the set of possible parse states: i.e., of possible configurations of our mutable store. We represent a parse state as a sequence of state changes. This means that a state can be seen as a log of the operations over the mutable store it represents, assuming some well-defined initial state. In Z, the set of sequences of items from the set S is written seq S and corresponds to the powerset of pairs (i, s) ∈ N × S, or equivalently to the powerset of partial functions N  7 S. In each sequence, the indices are unique and consecutive. In practice, an implementation of the approach will want to use parse state to reify important parsing notions, such as input position. We consciously avoided making our formalism needlessly specific, hence the absence of some usual parsing notions such as input position. This enables using our approach to parse non-linear inputs (e.g., object graphs), or perform computations that only bear nominal resemblance to traditional parsing, even though this direction is outside the scope of the current paper. Principled stateful parsing is an approach where parsers behave transactionally: each parser invocation either succeeds or leaves the state untouched. Additionally, it is possible to generate and merge deltas corresponding to state changes made by parser invocations. All this is made possible through the use of formally specified state manipulation operations. 4.2 Formalization 4.2.2 We formalize our approach using the Z notation [26], though eschewing its schema calculus in favor of a purely functional presentation.5 The Z notation is a formal specification language that builds on top of Zermelo-Frankel set theory, first-order logic and simply typed lambda calculus. As such, Z can be seen as a language where functions can be defined in lambda calculus extended with predicates from first-order logic and set theory. Formal assertions over the functions can Parsers A parser represents a computation over the parse state that either succeeds or fails, and has side effects on the parse state, in the form of state changes, as introduced in the previous section. TRANSFORM = STATE → STATE PARSER = STATE → seq TRANSFORM RESULT ::= success | failure result : STATE → PARSER → RESULT 5 To improve the presentation, we took some liberty with the Z layout (but not with the notation). A machine-understandable version of the specification is available online [20]. Taming Context-Sensitive Languages with Principled Stateful Parsing Parse State Formally, a parser is a function from a state — the current state at the time of invocation — to a sequence of 5 2016/9/20 Call Of these six, call has a special status: it represents the invocation of a parser. We will define this operation in section 4.2.4, hence specifying the semantics of parsers given their execution trace. Note that the signature definition of call expands to PARSER → STATE → STATE: a parser must be called with a state as parameter. transformations, which move from one state to another. This amounts to defining a parser in terms of its execution trace. Two things seem to be missing from this definition. First, it does not say if the parse succeeds when run over a specific state. This property is exposed separately through the result predicate rather than as part of the PARSER signature. This approach is not significant: it simply makes the math look nicer. Second, the input being parsed does not explicitly appear in the signature. Instead, the input is assumed to be held within the parse state.6 A parser is a recognizer of states. It accepts states for which result state = success holds. If within the input state one dissociates the parse input from the rest of the state (the context), one can see that the parser recognizes — hence also defines — different languages depending on the context. But a parser is also a transformer of states as well: when invoked it performs a STATE → STATE transformation. In section 4.2.4 we explain how to derive this transformation from a parser (recall that parsers have type PARSER defined as STATE → seq TRANSFORM), as a means of defining the semantics of a parser given its execution trace. We could alternatively have defined PARSER as STATE → TRANSFORM (with the result being the composition of the transformations in the sequence), or directly as STATE → STATE. We chose to emphasize the execution trace — a sequence of transformations — instead, because the primitive state operations described in the next section are suppliers of such transformations, to be composed to yield the transformation performed by the parser. This representation also emphasizes that the parse state is both an input of the parser and an input of the returned transformations. This reflects the fact that a parser is contextsensitive: it chooses which operation to perform depending on the state. This is closely related to the notions of active right-hand sides [2] and monadic parsing [12]. In fact, each operation in the sequence is chosen depending on the state obtained by running the initial state through the composition of all preceding transformations. Abstracting over this makes the specification much simpler, without altering its meaning. 4.2.3 Snapshot A snapshot, as the name implies, is a capture of the state at a specific point during the execution. Naturally, this makes SNAPSHOT, the set of all snapshots, equivalent to STATE. Formally, the snapshot operation, which creates such a capture, is simply the identity function. snapshot = λ x : STATE • x Diff The diff operation returns a DELTA object representing the difference between a snapshot and the current state, as a set of state changes. As a precondition, this operation requires the snapshot it receives to be a prefix of the current state. This is expressed with the Z built-in prefix infix operator. By keeping the deltas append-only, we ensure that a delta can be later merged to any state, not just the one corresponding to the snapshot. ∀ sn : dom diff • ∀ st : dom (diff sn) • sn prefix st Since deltas are state suffixes, DELTA, the state of all deltas, is equivalent to STATE. Assuming the precondition is respected, diff can be defined as the remainder of the current state after chopping off the prefix corresponding to the snapshot. In Z, the squash function packs the indices (left-hand side) of a set of pairs in N × S, where S is some set, in order to turn this set into a proper sequence. For instance, it turns {(2, x), (5, y)} to {(1, x), (2, y)}. diff = λ sn : SNAPSHOT • λ st : STATE • squash (st \ sn) Transformations All operations except diff and snapshot return a transformation. Recall that we defined PARSER as STATE → seq TRANSFORM. The transformations returned by the operations are precisely those which will be part of a parser’s execution trace. diff and snapshot are different because they do not modify the parse state. Instead, diff and snapshot create new objects, which can be freely passed through the parse state. Primitive Operations We now present six primitive operations (amongst which the four announced in Section 4.1) that parsers can perform. SNAPSHOT = seq CHANGE DELTA = seq CHANGE ApplyChange The applyChange operation is very simple: given a change, it simply returns a transformation that applies this change, by appending it to the change log. It can be defined as follows, using the concatenation operator (a) to append the change to the old log. call : PARSER → TRANSFORM snapshot : STATE → STATE diff : SNAPSHOT → STATE → DELTA applyChange : CHANGE → TRANSFORM restore : SNAPSHOT → TRANSFORM merge : DELTA → TRANSFORM applyChange = λ c : CHANGE • λ st : STATE • st a hci This “operation” models the fact that parsers can perform arbitrary state changes. 6 Nothing precludes the input from being mutable, even though we have not investigated the usefulness of the idea. Taming Context-Sensitive Languages with Principled Stateful Parsing 6 2016/9/20 Restore The restore operation takes a snapshot as input and returns a transformation that brings the state to that described by the snapshot. encounter them. Our approach is not language-specific and can easily be ported to other languages. We start by exposing the fundamentals of the Autumn API and how it relates to our formalization (Section 5.1). We then show the API in action on a simple example (Section 5.3). Finally we discuss how the API enables simple left-recursion handling (Section 5.4). restore = λ sn : SNAPSHOT • λ st : STATE • sn Merge The merge operation takes a delta as input and returns a transformation that appends this delta to the input state. 5.1 In this section, we review how our implementation relates to our formalization of principled stateful parsing (Section 4). Figure 1 shows the key interfaces and classes in our implementation. merge = λ d : DELTA • λ st : STATE • st a d 4.2.4 Parser Invocation Semantics We now look at how the transformation returned by the call operation can be derived from the execution trace returned by a parser. Recall that the call operation’s signature is PARSER → TRANSFORM. We start by defining two helper functions. composeTwo maps sequences of transformations of length n ≥ 2 to a sequence of length n − 1 similar to the input sequence, but where the first two items have been replaced by their composition (s 1 and s 2 access the first two items of s while # is the relational composition operator). reduceN takes a natural n and a sequence of transformations and returns the composition of its n first items, or the identity transformation if n = 0. This is achieved by iteratively running the sequence through composeTwo, using the Z built-in iter operator. interface Parser { fun parse ( ctx : Context ): Result } sealed class Result { object Success : Result () open class Failure ( val pos : Int , val msg : String ) : Result () } class Context ( input : String , vararg states : State <* , * >) { var pos : Int = 0 val text : String = input + ’\ u0000 ’ fun <T : State <* ,* > > state ( klass : Class <T >): T { ... } fun fun fun fun composeTwo = λ s : seq TRANSFORM • hs 1 # s 2i a tail (tail s) reduceN = λ n : N • λ s : seq TRANSFORM • if (n = 0) then id STATE else iter (n − 1) composeTwo s 1 snapshot (): Snapshot { ... } restore ( snap : Snapshot ) { ... } diff ( snap : Snapshot ) { ... } merge ( delta : Delta ) { ... } ... } class Snapshot { ... } class Delta { ... } interface State < Snapshot , Delta > { fun snapshot (): Snapshot fun restore ( snap : Snapshot ) fun diff ( snap : Snapshot ): Delta fun merge ( delta : Delta ) } With this in place, we define the result of call as the composition of all transformations within the call’s execution trace, assuming the parser invocation is successful. Otherwise, the identity transformation is returned. The hash sign (#) is an operator returning the cardinality of a set. abstract class Grammar { open val whitespace : Parser = ZeroMore ( CharPred ( Char :: isWhitespace )) open val root : Parser open val requiredStates : List < State <* ,* > = emptyList () ... } call = λ p : PARSER • λ st : STATE • if (result st p = success) then reduceN (# p st) (p st) st else st 5. The Autumn API Figure 1. Key interfaces and classes in the implementation of Autumn. Implementation Parser We represent a parser by an instance of the Parser interface. Implementers must override the parse method, which takes a Context as parameter and returns a Result: either a Success or a Failure which holds the position at which the failure occurred, together with a diagnostic message. It can also hold custom diagnostic information through subclassing of Failure. This gives a lot of control over the error messages that will be shown to the user. We implemented the principled stateful parsing approach in a general-purpose parsing library called Autumn. It is freely available online [20]. Autumn is implemented in Kotlin, an up-and-coming JVM language that closely matches Java’s semantics while reducing boilerplate. Kotlin possesses many features that make it particularly well suited for writing domain-specific languages (DSLs), an ability we exploit to define grammars. We will introduce these features as we Taming Context-Sensitive Languages with Principled Stateful Parsing 7 2016/9/20 Context Each parse — the invocation of a parser on a complete piece of input text — has an associated Context object. The role of this object is to hold the state for the parse. The context is passed down to parsers during parser invocation, so that all parsers may access it. Using a context object rather than global state allows multiple parses to coexist, potentially in parallel. The mutable store mentioned in the formalization is represented as a collection of singleton classes implementing the State interface. Parsers can retrieve a state instance by calling the state method with the proper class object. Note that the state held by the context also includes the input text and the input position, although, as a special provision, these can be accessed directly through the text and pos properties respectively. the stack and can be grafted back at a later time, allowing for granular change handling. • MapState: represents a map as an immutable Hash Array Map Trie (HAMT) [4]. Our implementation is based on that of Steindorfer and Vinju [27] which ensures good performance. The map is treated as a unit. • InertState: represents state that does not change during the parse, or whose change is not significant (e.g., logging logic). All operations are implemented as no-ops. Grammar Programmers must subclass the Grammar class in order to define a new grammar. When doing so, they must define the root parser by overriding root(), and provide any required State instances by overriding requiredStates(). Grammar also defines a default whitespace parser which consumes any number of characters matching the Java Char::isWhitespace predicate. Parser combinator libraries traditionally struggle with the definition of recursive parsers: it is forbidden to write [val A = Seq(..., A)] because A is not defined yet when it is evaluated on the right-hand side. Using the Grammar initialization logic, we can replace the recursive reference to A with the [!"A"] operator-overloading syntax: [val A = Seq(..., !"A")]. This creates a stub parser which will be patched with a reference to A at parse-time. To achieve this, the Grammar class maps names to parsers through reflection over its Parser-valued fields. State The State interface has four methods: snapshot, restore, diff and merge, corresponding to the four key operations introduced in Section 4.1, but only locally for the State instance itself. To get the parse-wide semantics of Section 4, we aggregate the state operations over all State instances. This is achieved through the methods in the Context class that mimic the State interface. These methods manipulate the Snapshot and Delta classes (not to be confused with the eponymous type parameters of interface State), which aggregate State-level snapshots and deltas. In our formalization, we represented the mutable store as a log of all operations over the store. In practice, this might not be a good idea, as parsers must compute using the state, meaning the “current state” would need to be re-derived from the whole log at least every time backtracking happens, unless all operations were fully reversible. The approach we took instead was to give maximum implementation flexibility to the programmer: he can choose, for each State instance, the most appropriate strategy to create snapshots and deltas, as well as to restore/merge them back in. Maintaining a log of reversible operations is only one possibility among many. However, having the programmer implement the State interface for each data structure he wishes to manipulate would be tedious and repetitive. Hence, we supply base implementations for common use cases, such as: 5.2 Autumn enforces the principled stateful parsing guarantees, but only if its interfaces are implemented correctly. In particular: • Each implementation of Parser must either succeed or undo all the state changes it incurred. This is usually achieved through the use of snapshot() and restore(). • Each implementation of State must implement its opera- tions according to the specification given in Section 4. 5.3 Example As an illustration, Figure 2 shows the implementation of one of the most fundamental parser combinators, the sequential composition of parsers. The resulting parser calls its subparsers sequentially, succeeding if they all succeed. If one of them fails, the parser reverts the state to its initial condition. • CopyState: for states that are records containing just a few fields, which we can afford to copy every time, and which can be treated as a unit (i.e., a delta cannot represent that a field changed while the others retained their previous value — the value of every field is systematically captured). 5.4 Left-Recursion When a parser invokes itself (either directly or indirectly through intermediate parsers) without intervening state changes, the result is an infinite loop of parser invocations. This is a well-known problem of top-down recursive parsers, called left-recursion. Fortunately, it can be mitigated as follows: start by running the left-recursive parser while failing all left-recursive invocations, then re-run it, using the result of the initial parse as the result of all left-recursive invocations. • StackState: represents a stack as a singly linked list (which is naturally immutable). Snapshots and deltas are represented as nodes in the list. The list is treated as a unit. • MonotonicStack: Similar to StackState, but adds the restriction that diff must only be called with a snapshot that is a suffix of the current stack. Deltas are then prefixes of Taming Context-Sensitive Languages with Principled Stateful Parsing Contract 8 2016/9/20 • Namespace classification — The parser needs to know class Seq ( vararg children : Parser ): Parser (* children ) { override fun _parse_ ( ctx : Context ): Result { val snapshot = ctx . snapshot () for ( child in children ) { val r = child . parse ( ctx ) if (r is Failure ) { ctx . restore ( snapshot ) return ctx . failure } } return Success } } which identifiers refer to types. In our language, this is needed because there is an ambiguity between the syntax of function calls — which can receive a closure parameter as an indented block — and the syntax of anonymous classes: val a = myFunction () myFunction2 () val b = MyClass () var x : Int fun foo () { ... } Figure 2. Implementation of the sequential parser combinator in Autumn. The body of a class only admits declarations, while the block part of a function call admits all statements (including declarations). These two constructs result in different nodes being added to the abstract syntax tree (AST) produced by the parse. Repeat until as much input as possible has been matched. Refer to our earlier paper [19] for more details. Interestingly, this strategy can be implemented entirely within the stateful parsing paradigm. In particular, when we speak of result of a parse, we are really referring to a delta of the parse state. These deltas need to be stored in the parse state, so that they can be retrieved by left-recursive invocations. We also need to track, within the state, which leftrecursive parsers have been invoked at which input position, so that we may recognize left-recursive invocations.7 Recognizing left-recursive invocations is the task of a dedicated parser that must be wrapped around all left-recursive parsers. We do so by annotating recursive parsers with the ! operator. Since left-recursion requires recursive references (cf. Section 5.1), we can easily check that all such parsers have been properly annotated: a missing annotation will result in an unresolved reference instead of a mystifying infinite loop. 6. 6.1 We now explain how Examply handles significant whitespace. The code enabling this feature is shown in Figure 3. The usual whitespace handling strategy is to assume that every parser consumes its trailing whitespace through invocation of the whitespace parser. To do so, it is only necessary to ensure that all “primitive” parsers (fullfilling what is traditionally the role of lexical analysis: matching identifiers, literals, keywords and operators) consume their trailing whitespace: then all parsers will do so by transitivity. The Grammar class provides some support for this, including lexical analysis emulation (not demonstrated in this paper), and the [+"lit"] syntax which evaluates to a parser matching a literal string and any trailing whitespace. Ultimately, this leads to an important guarantee: all parsers are invoked at an input position where no leading whitespace is present. In order to handle significant whitespace, we maintain two data structures. The first one, IndentMap, maps line numbers to two quantities: the input position at which the indentation ends on that line, and the indentation count, which is obtained by expanding tabs to tab stops aligned to multiples of 4. The second data structure, IndentStack, is a stack that stores the indentation counts for all enclosing blocks. Context.indent and Context.istack are extension properties for the Context class and provide syntactic sugar to access the indentation count on the current line, and the indentation stack, respectively. We build IndentMap at the beginning of the parse, through the invocation of the buildIndentMap parser. This does not require any special tricks: each parser has access to the whole input (ctx.text). The parser does not advance the input position (ctx.pos), so that subsequent parsers are free to proceed. Within the grammar, we use the indent parser to require an indented block, and the dedent parser to test for the end of an indented block. The implementation of these parsers is straightforward. indent checks if the current line is indented with respect to the indentation of the current block (the top of Use Case In this section, we demonstrate the stateful parsing approach with a realistic use case, using our Autumn library. We implement a parser for a simple, yet non-trivial, staticallytyped, object-oriented programming language, which we call Examply. This imaginary language draws inspiration from Java (its main unit of definition is the class), Kotlin (its postfix type notation and closure notation) and Python (significant indentation). Its full grammar, written with Autumn, can be found online [20]. Examply possesses two common contextsensitive features: • Significant whitespace — Indentation is significant: Like Python, the language does not use curly braces or keywords to delimit blocks of code such as loop or function bodies. Instead, these constructs expect to have their body indented with respect to their first line. Similarly, a decrease in indentation signifies the end of the block. Newlines are also significant, as they are used to separate successive statements and declarations. 7 We could track the whole state instead of the input position, but we enforce the stronger requirement that a parser invocation has to advance the input position not to be considered left-recursive: unlike other state changes, an increase in input position is a strong proof of progress. Taming Context-Sensitive Languages with Principled Stateful Parsing Significant Whitespace 9 2016/9/20 IndentStack, initialized to 0). If so, it succeeds after pushing the new indentation count onto the stack. dedent checks to new) to disambiguate constructor invocation from function invocation. Or we could perform AST-disambiguation passes after parsing. We stress that Examply is designed to showcase the strength of the principled stateful approach, and notably its ability to deal with the quirks of existing languages. To understand the logistics of namespace classification, we must first define how our imaginary language handles type references: see if the indentation count of the current line is less than that of the current block, or if we have reached the end of the input. If so it succeeds, after popping the previous count from the stack. Finally, the newline parser succeeds if and only if it is invoked at the end of the indentation on the current line or at the end of the input. 1. Types are always referenced through a single identifier, except within imports where they are preceded by a package string. data class IndentEntry ( val count : Int , val end : Int ) class IndentMap : InertState < IndentMap > { lateinit var map : Map < Int , IndentEntry > fun get ( ctx : Context ): IndentEntry = map [ ctx . lineMap . lineFromOffset ( ctx . pos )]!! } 2. A class name can only be referenced after or within its definition. 3. A class definition can appear anywhere other declarations can: at the top-level, within another class, or within a code block. class IndentStack : StackState < Int >() val Context . indent : IndentEntry get () = state ( IndentMap :: class ). get ( this ) val Context . istack : IndentStack get () = state ( IndentStack :: class ) 4. Class definitions are lexically scoped: a class has access to all imported classes and to all classes defined before it within one of its outer scopes (class body or code block). val buildIndentMap = Parser { ctx -> val map = HashMap < Int , IndentEntry >() var pos = 0 ctx . text . split ( ’\n ’). forEachIndexed { i , str -> val wspace = str . takeWhile { it == ’ ’ || it == ’\t ’ } val count = wspace . wspace . expandTabs (4). length map . put (i , IndentEntry ( count , pos + wspace . length )) pos += str . length + 1 } ctx . state ( IndentMap :: class ). map = map Success } 5. A class has access to all classes defined within its superclass and other ancestors. 6. A class cannot inherit from one of its outer classes. 7. In order to avoid ambiguous type names (for instance, both a class defined in an outer class and a class defined in a superclass could bear the same name), Examply features type aliases that assign an alternate name to an existing type. Type aliases can appear anywhere a class definition can appear, and have the same visibility as class definitions. val indent = Parser { ctx -> val new = ctx . indent . count val old = ctx . istack . peek () ?: 0 if ( new > old ) Success after { ctx . istack . push ( new ) } else ctx . failure { " Expecting indentation > $old positions " } } Figure 4 shows the code handling namespace classification. We do not engage with its minutiae, but instead give a highlevel description of its operation. The code itself should demonstrate that the implementation of these ideas is terse and readable, even to those who ignore the precise semantics of some operations. We note however that in the code, ctx.stack refers to the stack used to construct AST nodes. We occasionally peek in this stack in order to retrieve identifiers. The main data structure is the TypeStack State instance. It holds a stack of Types, which are pairs formed by a string and a list of other Types. Intuitively, each Type instance represents a class name alongside with a list of classes accessible through it: its inner classes and the inner classes of its ancestors. We call these classes the private classes of a class: they cease being accessible once the class definition ends. We define two helper functions over the type stack: isType checks if an identifier refers to a type, and priv returns the private classes of the named class, or an empty list if no such class exists. Each time we encounter a new type during the parse, it is pushed onto the type stack. This is the the task of the NewType parser, which is applied to identifiers introduced by classes val dedent = Parser { ctx -> val new = ctx . indent . count val old = ctx . istack . peek () ?: 0 if ( new < old || ctx . pos == ctx . text . length - 1) Success after { ctx . istack . pop () } else ctx . failure { " Expecting indentation < $old positions " } } val newline = Predicate { indent . end == pos || ctx . pos == ctx . text . length - 1 } Figure 3. Using Autumn to implement significant whitespace handling for Examply. 6.2 Namespace Classification Examply needs to distinguish between types (i.e., class names) and other identifiers at parse-time, in order to resolve ambiguities. We call this process namespace classification: we want to know whether an identifier belongs to the namespace of types or not. Such parse-time tracking is reminiscent of the C language, and is seldom seen in modern languages. In Examply, we could avoid it by adding a keyword (e.g., Taming Context-Sensitive Languages with Principled Stateful Parsing 10 2016/9/20 and type aliases. A parameter controls whether the new type is an alias, in which case it inherits the private classes of the aliased class. Note that classes start with an empty list of private classes. This will be updated once the class definition is complete. Once a scope (a class body, or some code block) is exited, the types introduced within it are not longer accessible. To enforce this, we use the Scoped parser: it saves the type stack size, invokes its child parser (corresponding to a scope), then removes any extraneous items from the type stack. If the scoped body was a class body, the Type representing the class on the stack must be updated with a list of its private classes, so that an inner class may access them. This is the role of the ClassDef parser. It looks up the class and superclass names on the AST stack, then looks up the list of private classes of the superclass. If found, this list is pushed on the type stack. All of this is done after taking a snapshot of type stack. Subsequently, the body parser is invoked and, if successful, a delta of the type stack is generated using the snapshot. This delta corresponds to the private classes of the class, including those introduced by its superclass. The snapshot is restored and the topmost entry on the type stack (which represents the class) is removed and replaced with a new one that binds the class name to its private classes. A reduced version of this process also needs to happen for anonymous classes: they need to access their superclass’ private classes, but no Type record must be created for them. The anonClassInherit parser fullfills this role, by reusing the inherit function. Finally, to resolve the ambiguity, we use the classGuard parser: it performs a lookahead, attempting to match an identifier, and succeeding only this identifier refers to a type. We defer our assessment of the approach until Section 6.4. 6.3 data class Type ( val name : String , val priv : LinkList < Type >) class TypeStack : MonotonicStack < Type >() val Context . types : TypeStack get () = state ( TypeStack :: class ) fun isType ( ctx : Context , iden : String ): Boolean = ctx . types . stream (). any { it . name == iden } fun priv ( ctx : Context , iden : String ): LinkList < Type > = ctx . types . stream () . filter { it . name == iden } . next () ?. priv ?: LinkList () fun NewType ( child : Parser , alias : Boolean = false ) = Parser { ctx -> child . parse ( ctx ) andDo { val name = ctx . stack . peek () as String val priv = if ( alias ) priv ( ctx , name ) else LinkList () ctx . types . push ( Type ( name , priv )) } } fun Scoped ( body : Parser ) = Parser { ctx -> val size = ctx . types . size body . parse ( ctx ) andDo { ctx . types . truncate ( size ) } } fun inherit ( ctx : Context , name : String ) = priv ( ctx , name ). stream (). each { ctx . types . push ( it ) } fun ClassDef ( body : Parser ) = Parser { ctx -> val parent = ctx . stack . at (0) as Maybe < SimpleType > val name = ctx . stack . at (1) as String val snapshot = ctx . types . snapshot () if ( parent is Some < SimpleType >) inherit ( ctx , parent . value . name ) body . parse ( ctx ) andDo { val diff = ctx . types . diff ( snapshot ) ctx . types . restore ( snapshot ) ctx . types . pop () ctx . types . push ( Type ( name , diff )) } } val anonClassInherit = Perform { ctx -> inherit ( ctx , ctx . stack . at (1) as String ) } val classGuard = Seq ( iden , Predicate { ctx -> isType ( ctx , ctx . stack . peek () as String ) } ). ahead Putting it all together Figure 4. Using Autumn to implement namespace classification for Examply. To illustrate the use of significant whitespace and namespace classification (as presented in sections 6.1 and 6.2), let’s look at two short examples. First, here is how we define an indented code block: The parser is simply guarded with the classGuard parser, which checks if there is an identifier at the current input position, and whether this identifier refers to a type. The body of the class can access the superclass’ private classes through anonClassInherit. The Scope wrapper ensures that this access is restricted to the class and does not spread to the code that follows. decls refers to an indented block of declarations. val statements = Seq ( indent , Scoped (!" statement " until dedent )) . collect < Stmt >() The block starts by an increase in indentation (indent), and ends when a decrease in indentation is encountered (dedent), parsing statements in the mean time (!"statement" until dedent). The collect part instructs the parser to collect all statement nodes pushed onto the AST stack and to aggregate them in a list, which is itself pushed onto that stack. We also see that all indented statements form a scope (Scoped) in the sense of Section 6.2. Second, here is how the parser for “block constructors” (i.e., anonymous classes) is defined: 6.4 We have implemented two context-sensitive features in for an imaginary but non-trivial programming language. With the code we have shown so far, the rest of the grammar is trivially able to define code delimited by changes in indentation, or by newlines (Section 6.1); or to direct the parse depending on whether an identifier refers to a type (Section 6.2). val blockCtorBody = Scoped ( Seq ( anonClassInherit , decls )) val blockCtor = Seq ( classGuard , iden , paramList , blockCtorBody ) . build { CtorCall ( get () , get () , get ()) } Taming Context-Sensitive Languages with Principled Stateful Parsing Discussion 11 2016/9/20 All this, by itself, is no mean feat. There are few parsing tools where this is possible to begin with (most of them are presented in Section 2). Significant indentation handling, in particular, is non-trivial because Autumn does not include a lexical analysis layer out of the box. We also underline that the presented implementations are rather terse, less than 50 lines of code each. Some of that does come from our choice of implementation language, but it also shows that the principled stateful parsing approach does not impose a significant boilerplate overhead. In particular, the ability to reuse state-handling strategies, such as MonotonicStack means that context-transparency comes almost for free. The state manipulations operations from sections 4.1 and 4.2.3 are strangely discreet in our examples. Significant whitespace handling does not use them at all, while namespace classification performs a diff in order to capture the types introduced by a class body. But because they do not appear in the code does not mean the operations are not used, they are simply hidden from view. The basic contract of principled stateful parsing is that each parser either succeeds or leaves the state untouched. You can convince yourself that all the parsers and parser combinators we introduced satisfy this condition, either by reusing existing combinators, or by delegating the responsibility for this to their single subparser. It remains that the parsers we introduce do get backtracked over during the parse. As such, their state mostly get saved and restored by other parsers that invoke them, directly or indirectly. It is in fact crucial for the state to get restored when backtracking occurs: we need to know the correct indentation level whenever we backtrack out of a block; we also need to know which identifiers are classes, even when backtracking over a type definition. Granted, given that most constructs in the grammar are guarded by specific keywords, such backtracking occurences should be rare. However, unlike the other, often accidentally stateful parsers (cf. Section 2), context transparency ensures that we can evolve the grammar as we see fit, without fear of breaking the mechanisms we just introduced. It is also a pre-requisite for safe grammar composition. In fact, the scarcity of state operations is a boon: it means that the benefits of our approach come at very little cost, at least implementation-wise. We would also disabuse the reader of the notion that the Autumn codebase hides some devilish complexity in order to make up for this: the whole library [20] is less than 2500 lines of code. All pre-defined parsers live in a single file of less than 500 lines. This file defines around 50 parsers: those corresponding to all basic PEG [8] operators, as well as numerous extensions, notably to work with error messages, AST nodes, ... 6.5 Parboiled [7] for context-free grammars. The implementation currently incurs overhead even for context-free grammars, which we are working to reduce. The overhead scales with the amount of state in use, depending on the State implementation details. The costly operations are the creation of snapshots and deltas. In general, memory allocations tend to be the bottleneck, so increased sharing between snapshots results in better performances. Indeed, we’ve had success with purely functional data structures [23]. Just like PEG parsing without full memoization, parsing has exponential complexity in the worst case. In practice however run times are acceptable, as programming language grammars are fairly deterministic. 7. Conclusion In this paper, we proposed an approach to tackle the problem of context-sensitive parsing. Our solution, unlike existing ones, possesses the property of context transparency: grammatical constructs are unaware of the context shared between their ancestors and their descendants, making it easier to write, evolve and compose context-sensitive grammars. We proceeded in two parts. First, we allowed parsers to manipulate a mutable data store, so as to enable contextsensitivity through recall. Second, we required parsers to behave transactionally: a parser must either succeed, or fail and leave the state unaltered. This transactional discipline, which we call principled stateful parsing, prevents parsing mechanisms such as backtracking and memoization to break the guarantee of context transparency. To enforce the principled stateful parsing discipline, we supplied formally specified state manipulation operations. The role of these operations is to snapshot and restore the state, as well as to create and merge deltas between a snapshot and the current state. We implemented our approach in a parsing library called Autumn, and showed how it can be used in practice to implement common context-sensitive grammar features such as significant whitespace and namespace classification. We underline the low boilerplate and conceptual overhead introduced by the approach. We view this work as a first step towards bringing disciplined grammarware engineering (as defined by Klint, Lämmel and Verhoef [17]) to context-sensitive parsing. Performance Performance has not been our focal point, but preliminary testing seems to indicate that performance is within an order of magnitude of mainstream parsing tools such as Rats! [9] and Taming Context-Sensitive Languages with Principled Stateful Parsing 12 2016/9/20 References [17] P. Klint, R. Lämmel, and C. Verhoef. Toward an engineering discipline for grammarware. ACM Transactions on Software Engineering and Methodology, 14(3):331–380, July 2005. [1] A. Afroozeh and A. Izmaylova. One parser to rule them all. In ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! 2015, pages 151–170. ACM, 2015. [18] D. Knuth. Semantics of context-free languages. Mathematical systems theory, 2(2):127–145, 1968. [19] N. Laurent and K. Mens. Parsing expression grammars made practical. In Proceedings of the ACM SIGPLAN International Conference on Software Language Engineering, SLE 2015, pages 167–172. ACM, 2015. [20] N. Laurent and K. Mens. Taming context-sensitive languages with principled stateful parsing: Artifacts. Software Language Engineering: Artifacts Track, 2016. https://github.com/ ncellar/sle2016. [2] R. Atkey. The semantics of parsing with semantic actions. In Proceedings of the 27th Annual IEEE/ACM Symposium on Logic in Computer Science, LICS 2015, pages 75–84. IEEE Computer Society, 2012. [3] J. Aycock and R. N. Horspool. Schrödinger’s token. Software: Practice and Experience, 31(8):803–814, 2001. [4] P. Bagwell. Ideal hash trees. Technical Report LAMPREPORT-2001-001, Ecole polytechnique fédérale de Lausanne, 2001. [5] N. Chomsky. Three models for the description of language. IRE Transactions on Information Theory, 2(3):113–124, 1956. [21] D. Leijen and E. Meijer. Parsec: Direct style monadic parser combinators for the real world. Technical Report UU-CS2001-35, Department of Information and Computing Sciences, Utrecht University, 2001. [6] N. Chomsky. Formal properties of grammar. In Handbook of Mathematical Psychology, chapter 12, pages 360–363 and 367. Wiley, 1963. [22] A. Moors, F. Piessens, and M. Odersky. Parser combinators in Scala. Technical Report CW491, Department of Computer Science, KU Leuven, Feb. 2008. [23] C. Okasaki. Purely Functional Data Structures. Cambridge University Press, New York, NY, USA, 1998. [7] M. Doenitz. The Parboiled homepage, 2015. https://github. com/sirthias/parboiled. [24] T. Parr, S. Harwell, and K. Fisher. Adaptive LL(*) parsing: The power of dynamic analysis. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA ’14, pages 579–598. ACM, 2014. [8] B. Ford. Parsing expression grammars: A recognition-based syntactic foundation. SIGPLAN Notices, 39(1):111–122, Jan. 2004. [9] R. Grimm. Better extensibility through modular syntax. SIGPLAN Notices, 41(6):38–51, June 2006. [25] F. Pereira and D. Warren. Readings in natural language processing. chapter Definite Clause Grammars for Language Analysis, pages 101–124. Morgan Kaufmann, 1986. [10] D. Grune and C. J. Jacobs. Parsing Techniques: A Practical Guide, p. 21–23. Springer, 2nd edition, 2008. Informatica [26] J. M. Spivey and J. Abrial. The Z notation. Prentice Hall, 1992. [12] G. Hutton and E. Meijer. Monadic parsing in Haskell. Journal of Functional Programming, 8(4):437–444, July 1998. [27] M. J. Steindorfer and J. J. Vinju. Optimizing hash-array mapped tries for fast and lean immutable jvm collections. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, pages 783–800. ACM, 2015. [11] G. Hedin. Reference attributed grammars. (Slovenia), 24(3), 2000. [13] R. Ierusalimschy. A text pattern-matching tool based on parsing expression grammars. Software: Practice and Experience, 39(3):221–258, Mar. 2009. [28] The Free Software Foundation. The GNU Bison homepage, 2014. http://www.gnu.org/software/bison/. [14] T. Jim and Y. Mandelbaum. A new method for dependent parsing. In Proceedings of the 20th European Conference on Programming Languages and Systems, ESOP 2011, pages 378–397. Springer, 2011. [29] A. D. Thurston and J. R. Cordy. A backtracking LR algorithm for parsing ambiguous context-dependent languages. In Proceedings of the 2006 conference of the Centre for Advanced Studies on Collaborative Research, October 16-19, 2006, Toronto, Ontario, Canada, pages 39–53, 2006. [15] T. Jim, Y. Mandelbaum, and D. Walker. Semantics and algorithms for data-dependent grammars. SIGPLAN Notices, 45(1):417–430, Jan. 2010. [30] E. Van Wyk and A. Schwerdfeger. Context-aware scanning for parsing extensible languages. In International Conference on Generative Programming and Component Engineering, GPCE 2007. ACM, October 2007. [16] L. Kallmeyer. Parsing Beyond Context-Free Grammars. Springer, 2010. Taming Context-Sensitive Languages with Principled Stateful Parsing 13 2016/9/20
6cs.PL
Schur’s theory for partial projective representations arXiv:1711.06739v1 [math.GR] 17 Nov 2017 Mikhailo Dokuchaev and Nicola Sambonet∗ November 21, 2017 Abstract This article focuses on those aspects about partial actions of groups which are related to Schur’s theory on projective representations. It provides an exhaustive description of the partial Schur multiplier, and this result is achieved by introducing the concept of a second partial cohomology group relative to an ideal, together with an appropriate analogue of a central extension. In addition, the new framework is proved to be consistent with the earlier notion of cohomology over partial modules. 1 Introduction It is becoming relatively common to encounter the word partial as a prefix for some classical terminology in algebra. This phenomenon is due to the increasing awareness about the algebraic relevance of partial symmetries which explicitly or implicitly appear in various local-global aspects of well-known mathematical topics. It was indeed the theory of C ∗ -algebras which motivated the introduction of the notions of partial actions and partial representations of groups [17]. In this regard, the most prominent application of the partial actions is their involvement in the construction of a crossed product, which encloses relevant classes of algebras [7]. Partial representations are intimately related to partial actions in various ways, in particular, they play a fundamental role in providing partial crossed product structures on concrete algebras. This can be seen applied to a series ∗ The first author was partially supported by Fapesp of Brazil and by CNPq of Brazil. The second author was supported by Fapesp of Brazil. Address: Instituto de Matemática e Estatı́stica da Universidade de São Paulo, Rua do Matão 1010, 05508-090 São Paulo, Brazil. Email: [email protected] and [email protected] 1 of important algebras, among the most recent examples being C ∗ -algebras related to dynamical systems of type (m, n) [2], the Carlsen-Matsumoto algebras of subshifts [8] and algebras related to separated graphs [1]. In the latter paper, a partial-global passage was remarkably employed to a problem on paradoxical decompositions. The general concept of a twisted partial group action, used to define more general crossed products, involves a kind of a 2-cocycle (see [9, 16]), raising the desire to fit it into some cohomology theory. In order to obtain some testing material for the development of such a theory, partial projective group representations were introduced and studied in [13, 14, 15, 28]. The notion of a partial multiplier naturally appears in analogy with the classical Schur’s theory of projective representations. Since the algebraic structures involved in partial representations are not only groups but also inverse semigroups, the new theory diverges from the original one and the multiplier results in a semilattice of abelian groups, called components. That is briefly to say, a collection composed of abelian groups and parametrized by a meet semilattice, where the operations of group-multiplications are compatible with the partial order. Subsequently, a cohomology theory based on partial actions was developed in [10, 11, 12]. Notice that partial cohomology turned out to be useful to deal with the ideal separation property of (global) reduced C ∗ -crossed products in [25], where partial 2-cocyles appear as factor sets (twists) of partial projective representations (called twisted partial representations in [25]) naturally related to (global) C ∗ -dynamical systems. With respect to the partial Schur multiplier, it was shown in [10, Theorem 2.14] that each component is a union of cohomology groups with values in non-necessarily trivial partial modules. Furthermore, in the case of an algebraically closed field K, it was proved in [15, Theorem 5.9] that each component of the partial Schur multiplier is an epimorphic image of a direct product of copies of K× . However, computations of the partial Schur multiplier of concrete groups show that each component is, in fact, isomorphic to a direct product of copies of K× (see [6, 15, 26, 27, 28, 29]), raising the conjecture that this should be true for all groups. The present article is inspired by the aforementioned conjecture, of which it provides an affirmative answer for finite groups (Corollary 5.3), and it actuates an essential refinement for our understanding of partial projective group representations. To this aim, the theory is reformed to encompass a 2 broader setting, specifically to allow arbitrary coefficients and to establish a partial analogue for Schur’s theory of central extensions (in particular, see Theorem 3.3). Influenced by known properties of partial factor sets, the concepts of a pre-cohomology group, of a second partial cohomology group relative to an ideal, and of a second partial cohomology semilattice of groups with values in an arbitrary abelian group are introduced. Then the partial Schur multiplier is shown to coincide with the second partial cohomology semilattice of groups with values in K× . This new level of abstraction conveys standard techniques into the scene, which promptly produce new theorems. Most remarkably, in the finite case the pre-cohomology groups are completely determined by minor information about the underlying group (Theorem 4.3). Also, taking the ideals into accounts, a general statement is established for the second partial cohomology groups (Theorem 5.2). Furthermore, considering appropriate partial G-modules, one is able to conclude, in particular, that each component of the partial Schur multiplier is isomorphic to a single partial cohomology group (see Theorem 6.1) in the sense of [10], bringing thus the partial Schur theory closer to the classical one. The text is structured as follows: in section 2 some fundamental concepts in the theory of partial actions of groups and in Schur’s theory will be recalled; in section 3 new concepts will be introduced, and the partial analogue for Schur’s theory with arbitrary coefficients will be developed; in section 4 and, respectively, in section 5 the pre-cohomology groups and the second partial cohomology semilattice of groups will be studied in details; lastly, in section 6 the consistency with the previous notion of partial cohomology will be proved. 2 2.1 Prerequisites The universal inverse semigroup of a group Inverse semigroups are the algebraic structures which capture the idea of partial symmetry [21]. In an inverse semigroup S the system of equations xyx = x ∧ yxy = y (1) admits a unique solution for y in terms of x, commonly denoted by y = x−1 . This is easily recognized to be a generalization of groups, still it incorporates 3 the semilattices, which are the semigroups consisting of commuting idempotents. A partial bijection over a set X is any bijection between subsets of X. Multiplication of partial bijection is defined as follows: if α : A → Aα and β : B → B β , then β ◦ α is their composition on the largest subset where it makes sense, i. e. α−1 (Aα ∩ B). Necessarily, one has to admit the existence of the map ∞ : ∅ → ∅, and this serves as the zero element. As the reader has noticed, we convene to denote with ∞ the zero element of a semigroup, if this ever exists, coherently with the additive notation for abelian groups. The set of partial bijections over X turns out to be an inverse semigroup in the obvious way, that is by inversion of functions, which is named the symmetric inverse semigroup I(X). We recall that, given an ideal I of a semigroup S, the Rees congruence is defined by setting x ∼ y when either x = y or both x and y belong to I. The corresponding quotient is denoted by S/I. In general, if ϑ : S → T is a homomorphism of semigroups and T admits the zero ∞, then ϑ−1 (∞) is an ideal of S. Inverse semigroups apply to the theory of groups through the notion of partial actions and partial homomorphisms of groups [17]. A partial action is a map ψ : G → I(X) satisfying the compatibility conditions that ψ(1) = idX and the composition ψ(g) ◦ ψ(h) coincides with the restriction of ψ(gh). In turn, this notion results to be a special case of the following. A partial homomorphism is a map ψ from a group G into a semigroup M satisfying the conditions ψ(1) · ψ(g) = ψ(g) = ψ(g) · ψ(1) (2) ψ(g−1 ) · ψ(g) · ψ(h) = ψ(g −1 ) · ψ(gh) (3) ψ(g) · ψ(h) · ψ(h−1 ) = ψ(gh) · ψ(h−1 ) (4) for any pair of elements g and h of G. These relations, which openly emerge from the compatibility requirement of partial action, are used to introduce the universal inverse semigroup S(G) associated with G (see [17]). Precisely, S(G) is the abstract semigroup generated by symbols Π(g) subject to relations analogue to (2)-(4), so that the map Π : G → S(G) is an injective partial homomorphism, and this construction is universal in sense that S(G) ③<< Π ③③ ③ ψ̄ ③③  ③③ ψ // M G 4 (5) every partial homomorphism ψ extends to a semigroup homomorphism ψ̄ uniquely by means of Π. In fact, S(G) is isomorphic to the Birget-Rhodes expansion of G [24] (see also [3, 4]). Thus, a generic element of S(G) is identified with a pair (R, g) where R is a finite subset of G containing 1 and g, whereas multiplication obeys to the rule (R, g) · (S, h) = (R ∪ gS, gh) . The result is an inverse semigroup since the system of equations (1) admits the unique solution (R, g)−1 = (g−1 R, g −1 ), and the universal partial homomorphism Π associates an element g of the group with Π(g) = ({1, g}, g). It is convenient to extend the definition of Π to a higher number of elements as Π(g1 , . . . , gk ) = Π(g1 ) · · · Π(gk ). In particular, considering two elements yields Π(g, h) = ({1, g}, g) · ({1, h}, h) = ({1, g, gh}, gh) , (6) whereas considering three elements yields Π(x, y, z) = ({1, x}, x) · ({1, y}, y) · ({1, z}, z) = ({1, x, xy, xyz}, xyz) . (7) One may notice how these relations confirm that Π satisfies (2)-(4). It is important to describe the ideals of S(G) since these determine the vanishing of a partial homomorphism. Precisely, in the notation of (5) the equality ψ(g1 ) · · · ψ(gk ) = ∞ occurs if and only if Π(g1 , . . . , gk ) belongs to I = ψ̄ −1 (∞). To begin with, the principal ideals in S(G), which we will denote by h·iS , can be characterized as follows [14, Corollary 2]: h(R, g)iS = h(S, h)iS ⇐⇒ (S, h) = (x−1 R, x−1 y) for some x, y ∈ R . (8) For our purpose, one may just consider the following relations which are direct consequences of the definition of a partial representation: hΠ(g, g−1 )iS = hΠ(g)iS = hΠ(g−1 )iS = hΠ(g−1 , g)iS , (9) and more generally, for any 1 ≤ j ≤ r and 1 ≤ k ≤ r, hΠ(g1 , . . . , gr )iS = hΠ((g1 · · · gj )−1 , g1 , . . . , gr )iS = hΠ(g1 , . . . , gr , (gk · · · gr )−1 )iS = hΠ((g1 · · · gj )−1 , g1 , . . . , gr , (gk · · · gr )−1 )iS . 5 (10) In addition, with respect to (6), taking y = 1 and either x = g or x = gh in the above characterization (8) yields hΠ(g, h)iS = hΠ(h, h−1 g −1 )iS = hΠ(h−1 , g −1 )iS . (11) These identities prove that, given a partial homomorphism ψ, the subset of G × G consisting of those pairs (g, h) for which ψ(g) · ψ(h) = ∞ is invariant under the action of the symmetric group S3 generated by the transformations (g, h) 7→ (h, h−1 g−1 ) , (g, h) 7→ (h−1 , g−1 ) . (12) This action, which has been discovered in [13], will be central in the present essay. Another family of ideals can be described by the simple observation that, for any pair of elements (R, g) and (S, h) of S(G), since |R ∪ gS| ≥ |S| and |R∪gS| ≥ |R|, left and right multiplication are “non-decreasing operations”. Consequently, for any positive integer k, the set Nk = {(R, g) ∈ S(G) | |R| ≥ k + 1} is an ideal of S(G). In the present essay the crucial case is when k = 3. Indeed, in the notation of (5), for any partial homomrphisms ψ considered hereby it will be assumed that the ideal I = ψ̄ −1 (∞) is proper in S(G) and it contains N3 . This assumption is motivated by the theory on partial projective representations where the semilattice Λ = (Λ, ∪) , Λ = {I | N3 ≤ I ⊳ S(G)} (13) plays a prominent role (see [15]). Taking this into account, suppose that Π(x, y, z) is not contained in I, for I = ψ̄ −1 (∞) lying in Λ. Accordingly with (7), one has |{1, x, xy, xyz}| ≤ 3, which can be rewritten as 1 ∈ {x, y, z, xy, yz, xyz} . (14) Therefore, the failure on this condition implies ψ(x) · ψ(y) · ψ(z) = ∞. 2.2 A sketch of classical Schur’s theory The ordinary multiplier is the fundamental object in the theory of projective representations and central extensions [22, 23, 31]. Hereby, few of the very 6 elementary concepts are mentioned in order to fix the notation and facilitate the description of their partial analogue. A central extension of a group M is a group E endowed with a surjective homomorphism π : E → M such that A = ker π is contained in the center Z(P ). This situation is summarized in the diagram A ι π // E // M (15) The interest is to consider such a central extension together with a group G and a homomorphism ψ : G → M . The archetypes are: i. When M = G and ψ is the identity, then E is a central extension of G. ii. When E = GL(n, C) and M = PGL(n, C) for some positive integer n, then ψ is a projective representation of G. Hence, the choice of a section ϕ : G → E completes the commutative diagram: G (16) ϕ A ι // E ~~ ψ π  // M One can not expect that the map ϕ is a homomorphism. However, the failure for this to happen is encoded in the equation ϕ(g) · ϕ(h) = ϕ(gh) · σ(g, h) (17) where σ is a function in AG×G . Clearly, not any function is admissible: adopting the additive notation for group multiplication in A, associativity of E proves that σ satisfies the equality σ(x, y) + σ(xy, z) = σ(x, yz) + σ(y, z) for any x, y and z in G. In connection with cohomology this fact is restated as follows. The coboundary homomorphism δ2 : AG ×2 → AG ×3 is defined by means of the relation δ2 σ(x, y, z) = σ(y, z) − σ(xy, z) + σ(x, yz) − σ(x, y) , 7 (18) and the group of cocycles is the kernel of this homomorphism Z 2 (G, A) = {σ ∈ AG×G | δ2 σ = 0} . Thus, the function σ determined by (17) is an element of Z 2 (G, A). Luckily enough the process is reversible and any σ ∈ Z 2 (G, A) defines a central extension (15) of the group G as follows. The underlying set is A × G and multiplication is given by (λ, g) · (µ, h) = (λ + µ + σ(g, h), gh) . (19) Therefore, there is a correspondence between the central extensions and the cocycles of G which, however, depends on the choice of section. Nonetheless, any change of section, as it can be seen easily, corresponds to addition of a coboundary δ1 ζ(g, h) = ζ(h) − ζ(gh) + ζ(g) . (20) Hence, it is of interest to introduce the group B 2 (G, A) = {δ1 ζ | ζ ∈ AG } , and to consider the second cohomology group H 2 (G, A) = Z 2 (G, A)/B 2 (G, A) . The terminology Schur multiplier applies to the case when G is a finite group and A = C× , which answers to the original problem of classifying the projective representations. For general coefficients, the facts here discussed provide a one-to-one correspondence between the isomorphism classes of the central extensions of G by A and the elements of H 2 (G, A) Of course, the above definition is a special case in the theory of group cohomology (see [5]). Indeed, in the present manuscript it is always assumed that the (global) group actions over the coefficient modules are trivial. In view of this, the first cohomology group simply is H 1 (G, A) = ker δ1 = Hom(G, A) . 3 The partial analogue notions Also the partial counterpart of the theory originates with the study of partial projective representations in K× -cancellative monoids [13, 14, 15] (previously named K-cancellative). However, the most general situation can be extended to semigroups and partial homomorphisms. 8 Firstly, referring to the diagram (15), in the current framework E will be taken as an A-cancellative central extension of a semigroup M by an abelian group A, in the following sense. A central extension is a semigroup E which contains A as a central subgroup, and M is the quotient semigroup E/A with respect to the following congruence: x ∼ y whenever there exist a and b in A such that ax = by. Given a central extension E endowed with zero ∞, this extension is called A-cancellative if, for every a, b in A and every x in E \ {∞}, the equality ax = bx implies a = b. Observe that, this condition yields that, for every a in A, the equation ax = ∞ has no solution for x in E other than x = ∞. In second place, the due modification in the diagram (16) is given by an A-cancellative central extension of M together with a group G and a partial homomorphism ψ : G → M . Notice that, when ∞ ∈ E, then M has at least two elements. In this case, it is convenient to assume that ψ(1) 6= ∞ since, otherwise, ψ(g) = ∞ for all g. With respect to (3)-(4) and (17), this time the failure for the section ϕ to be a partial homomorphism can be shown to be encoded in the equations ϕ(g−1 ) · ϕ(g) · ϕ(h) = ϕ(g −1 ) · ϕ(gh) · σ(g, h) −1 ϕ(g) · ϕ(h) · ϕ(h −1 ) = ϕ(gh) · ϕ(h ) · σ(g, h) (21) (22) where σ(g, h) is an element of A. Actually, it is convenient to regard σ(g, h) as an element of the semigroup A∞ = A ∪ {∞}, obtained adjoining the zero ∞ to the abelian group A, and set σ(g, h) = ∞ whenever the above equations reduce to the triviality ∞ = ∞. Similarly with the case of a partial projective representation over a field, the fact that the same function σ appears in both (21) and (22) is not obvious, but the arguments given in the proof of [13, Theorem 3] can be easily adapted to this case. Moreover, also in the current situation the map σ has not to satisfy the cocycle identity [13, page 260]. However, by means of (10), associativity of E applied to the relation ϕ(x−1 )·ϕ(x)·ϕ(y)·ϕ(z)·ϕ(z −1 ) shows that δ2 σ(x, y, z) = 0 whenever Π(x, y, z) does not belong to the ideal I = ψ −1 (∞). Accordingly to (14), it is of interest to introduce the following: Definition 1. A pre-cocycle of G with values in A is a function σ in AG×G satisfying the weak cocycle condition: 1 ∈ {x, y, z, xy, yz, xyz} ⇒ δ2 σ(x, y, z) = 0 . 9 The group of pre-cocycles is denoted by pZ 2 (G, A), and pH 2 (G, A) = pZ 2 (G, A)/B 2 (G, A) is the pre-cohomology group of G. The zero ∞, which does not appear in the above definition, is reintroduced as follows. Any fixed ideal I in the semilattice Λ, introduced in (13), defines an additive characteristic function ǫI : G × G → A∞ obeying to ( ∞ Π(g, h) ∈ I ǫI (g, h) = 0 otherwise. associating α 7→ α + ǫI is a homoIn these terms, the map AG×G → AG×G ∞ morphism of semigroups. Definition 2. In the current notation, define Z 2 (G, I; A) = pZ 2 (G, A) + ǫI , B 2 (G, I; A) = B 2 (G, A) + ǫI . Then, the quotient H 2 (G, I; A) = Z 2 (G, I; A)/B 2 (G, I; A) , is the second partial cohomology group relative to I with coefficients in A. We shall see below (Theorem 6.1) that this definition is coherent with the notion of partial cohomology groups given in [10]. Moreover, the fact Z 2 (G, N3 ; A) = pZ 2 (G, A) justifies that only ideals containing N3 are considered. Clearly, the identity element of H 2 (G, I; A) is the class [ǫI ]. In addition, in AG×G one has ǫI + ǫJ = ǫI∪J . Thus, by allowing external sums, that is ∞ [σ + ǫI ] + [τ + ǫJ ] = [σ + τ + ǫI∪J ], it is possible to join all of these groups as follows: Definition 3. The second partial cohomology semilattice of groups of G is a H 2 (G, Λ; A) = H 2 (G, I; A) I∈Λ The semigroup of idempotents in H 2 (G, Λ; A) consists of the classes [ǫI ] as I varies in Λ, and it is canonically isomorphic with (Λ, ∪). Furthermore, the definition of Z 2 (G, −; A) and B 2 (G, −; A) immediately yields: 10 Proposition 3.1. For any pair of ideals I and J in Λ, the homomorphism H 2 (G, J; A) → H 2 (G, I ∪ J; A) mapping µ 7→ µ + [ǫI ] is surjective. From the above discussion, it follows that a map σ defined by (21)-(22) is an element of Z 2 (G, I; A) for I = ψ(∞)−1 . The following construction, which is analogue to (19), provides the converse of this statement. Namely, for any ideal I in Λ, every element of Z 2 (G, I; A) can be obtained as a map σ arising from an A-cancellative central extension together with a partial homomorphism, as in (21)-(22). Lemma 3.2. Given σ in Z 2 (G, I; A), then the set E = (A × S(G) \ I)∪{∞} endowed with multiplication ( (λ + µ + σ(x, y), R ∪ xS, xy) if (R ∪ xS, xy) ∈ /I (λ, R, x) · (µ, S, y) = ∞ otherwise results in an A-cancellative central extension of S(G)/I. Moreover, E is a monoid with identity element (−σ(1, 1), Π(1)), and the natural partial homomorphism G → S(G)/I admits the section ( (−σ(1, 1), Π(g)) if Π(g) ∈ /I ϕ : G → E , g 7→ ∞ otherwise which is associated with σ. Proof. To prove the associativity of E, given X = (R, x), Y = (S, y) and Z = (T, z) in S(G) \ I together with λ, µ and ν in A, one considers the two ways for computing the product (λ, X)·(µ, Y )·(ν, Z). There is no loss of generality assuming that XY Z does not belong to I, since otherwise the product results ∞. In particular, associativity corresponds to the cocycle identity δ2 σ(x, y, z) = 0 under this condition. Write XY Z = (R ∪ xS ∪ xyT, xyz). Since {1, x, xy, xyz} is contained in R ∪ xS ∪ xyT and N3 is contained in I, it follows that |{1, x, xy, xyz}| ≤ 3, that is 1 ∈ {x, y, z, xy, yz, xyz}. This proves the associativity of E since, by hypothesis, σ = σ ′ + ǫI for some σ ′ ∈ pZ 2 (G, A). Finally, denoting by ψ the canonical partial homomorphism G → S(G)/I, sending g to Π(g) whenever the latter is not in I, and to ∞ otherwise, and taking the section ϕ : G → E which accordingly maps g either to (−σ(1, 1), ψ(g)) or to ∞, it is evident that the associated map is σ = σ ′ + ǫI . 11 It is routine to check that the isomorphism class of the extension E only depends on the partial cohomology class of σ in H 2 (G, I; A), consequently: Theorem 3.3. For any ideal I in Λ, there is a one-to-one correspondence between the equivalence classes of A-cancellative central extensions of S(G)/I and the elements of H 2 (G, I; A). In particular, in the case A = K× , any partial cocycle in Z 2 (G, Λ; K× ) defines a K× -cancellative monoid together with a partial projective representation, and vice-versa. Therefore, the partial multiplier pM (G) introduced in [13] turns out to be a partial cohomology semilattice of groups: Proposition 3.4. Let G be a group and K a field. Then the partial multiplier pM (G) over K coincides with H 2 (G, Λ; K× ). 4 Pre-cohomology The pre-cocycles can be characterized in several different ways: Lemma 4.1. Let σ ∈ AG×G . The following properies are equivalent: i. σ is a pre-cocycle. ii. 1 ∈ {xy, xyz} ⇒ δ2 σ(x, y, z) = 0 iii. For every g, h ∈ G the following holds: a. σ(h, h−1 g−1 ) = σ(g, h) + σ(gh, h−1 g−1 ) − σ(g, g −1 ) b. σ(h−1 , g−1 ) = −σ(h, h−1 g−1 ) + σ(h, h−1 ) + σ(1, 1) Moreover, if the above properties are satisfied, then: c. σ(g, 1) = σ(1, 1) = σ(1, g) d. σ(g, g−1 ) = σ(g −1 , g) e. σ(h−1 g−1 , g) = σ(g, h) + σ(gh, h−1 g−1 ) − σ(h, h−1 ) f. σ(gh, h−1 ) = −σ(g, h) + σ(h, h−1 ) + σ(1, 1) g. σ(g−1 , gh) = −σ(g, h) + σ(g, g −1 ) + σ(1, 1) Proof. Denote by i.x the property [x = 1 ⇒ δ2 σ(x, y, z) = 0, ∀y, z], and so on, so that the property i is the conjunction of the properties: i = i.x ∧ i.y ∧ i.z ∧ i.xy ∧ i.yz ∧ i.xyz. The proof is divided in eight steps. 12 I) i ⇒ ii. This is trivial, since ii = i.xy ∧ i.xyz. II) i.xyz = iii.a. Indeed, iii.a = [δ2 σ(g, h, h−1 g−1 ) = 0, ∀g, h] = i.xyz. III) i.xyz ⇒ c. Observe that g−1 ·g ·1 = 1·g ·g −1 = 1, ∀g. Thus, i.xyz ⇒ [σ(g, 1)−σ(1, 1) = δ2 σ(g−1 , g, 1) = 0]∧[σ(1, 1)−σ(1, g) = δ2 σ(1, g, g−1 ) = 0]. IV) ii ⇐⇒ iii. Write down δ2 σ(h, h−1 , g−1 ) = σ(h−1 , g−1 ) − σ(1, g −1 ) + σ(h, h−1 g −1 ) − σ(h, h−1 ) . Then, by c one has σ(1, g−1 ) = σ(1, 1), so that i.xy ∧ c ⇒ iii.b, as well as iii.b ∧ c ⇒ i.xy. Therefore, the result follows by II and III. V) i.xyz ⇒ i.x ∧ i.y ∧ i.z. It is easily seen that c ⇒ i.x ∧ i.y ∧ i.z, simply by consideration of δ2 σ(1, y, z), δ2 σ(x, 1, z), and δ2 σ(x, y, 1). Therefore, this statement follows by III. VI) ii ⇒ d. Firstly, i.xy ⇒ [δ2 (g, g −1 , g) = 0, ∀g]. Thus, writing down explicitly 0 = δ2 σ(g, g−1 , g) = σ(g −1 , g) − σ(1, g) + σ(g, 1) − σ(g, g−1 ), the claim follows by III. VII) iii ⇒ i. In view of IV and V, it is left to prove that iii ⇒ i.yz. Observe that i.yz = [δ2 σ(x, y, y −1 ) = 0, ∀x, y], and explicitly write down δ2 σ(x, y, y −1 ) = σ(y, y −1 ) − σ(xy, y −1 ) + σ(x, 1) − σ(x, y) . (23) Setting h = xy and g = x−1 in iii.b, yields σ(y −1 x−1 , x) = −σ(xy, y −1 ) + σ(xy, y −1 x−1 ) + σ(1, 1) . By the use of c, which is allowed by III, σ(1, 1) = σ(x, 1), so that −σ(xy, y −1 ) + σ(x, 1) = σ(y −1 x−1 , x) − σ(xy, y −1 x−1 ) . (24) Therefore, substituting (24) in (23), one obtains δ2 σ(x, y, y −1 ) = σ(y, y −1 ) + σ(y −1 x−1 , x) − σ(xy, y −1 x−1 ) − σ(x, y) . (25) Now, setting g = y −1 x−1 and h = x in iii.a, yields σ(x, y) = σ(y −1 x−1 , x) + σ(y −1 , y) − σ(y −1 x−1 , xy) , that is σ(y −1 , y) + σ(y −1 x−1 , x) − σ(y −1 x−1 , xy) − σ(x, y) = 0 . 13 (26) The use of d, which is allowed by VI, yields σ(y −1 , y) = σ(y, y −1 ), and σ(xy, y −1 x−1 ) = σ(y −1 x−1 , xy). Thus, (26) implies that (24) vanishes, that is δ2 σ(x, y, y −1 ) = 0. VIII) i ⇒ e ∧ f ∧ g. Writing down the equalities δ2 σ(h−1 g−1 , g, h) = 0, δ2 σ(g, h, h−1 ) = 0, and δ2 σ(g−1 , g, h) = 0 explicitly, which are guaranteed by i.xyz, i.yz, and i.xy respectively, it can be easily seen that the result just requires the use of c and d, which is allowed by III and VI. The above description of the pre-cocycles allows one to relate these functions with the action of S3 defined in (12). Proposition 4.2. Let G be any group. Introduce on G × G the following equivalence relation: for any element g of G set (g, 1) ∼ (1, 1) ∼ (1, g) , (g, g −1 ) ∼ (g −1 , g) and, for any pair of elements g and h of G satisfying g 6= 1 6= h 6= g −1 set (g, h) ∼ (h, h−1 g −1 ) ∼ (h−1 , g −1 ) . Then the group of pre-cocycles pZ 2 (G, A) is isomorphic with the group of functions AΩ over the set of equivalence classes Ω = G × G/ ∼. Proof. Fix a choice of representatives ∆ : Ω → G × G satisfying, for convenience, ∆(1, 1)∼ = (1, 1). As for the homomorphism pZ 2 (G, A) → AΩ simply take the composition σ 7→ σ ◦ ∆. Whereas, the homomorphism AΩ → pZ 2 (G, A), such that f 7→ σ, is defined as follows. First, set σ(g, 1) = σ(1, g) = f (1, 1)∼ , σ(g, g −1 ) = σ(g −1 , g) = f (g, g −1 )∼ for any g ∈ G. Then, for any other class ω of Ω, that is ∆(ω) = (g, h) where g 6= 1 6= h 6= g −1 , set σ(g, h) = f (ω) , and, in accordance with the relations iii.a, iii.b iii.e, iii.f iii.g of Lemma 4.1, define the values of σ over the remaining elements of the orbit as follows: σ(h, h−1 g−1 ) = f (ω) + σ(gh, h−1 g−1 ) − σ(g, g −1 ) σ(h−1 , g−1 ) = −f (ω) + σ(g, g −1 ) + σ(h, h−1 ) − σ(gh, h−1 g−1 ) + σ(1, 1) σ(h−1 g−1 , g) = f (ω) + σ(gh, h−1 g−1 ) − σ(h, h−1 ) σ(gh, h−1 ) = −f (ω) + σ(h, h−1 ) + σ(1, 1) σ(g−1 , gh) = −f (ω) + σ(g, g −1 ) + σ(1, 1) . 14 It is easy to check that these homomorphisms are inverse of each other. In the case of a finite group G, the previous result proves that pZ 2 (G, Z) is a finitely generated abelian group of functions, so that standard techniques can be used (see [19, §97]). Theorem 4.3. Let G be a group of order n < ∞, and denote by G(k) the set of elements of order k in G. Then, for any abelian group A, pH 2 (G, A) ≃ Am−n ⊕ A ⊗ G/[G, G] , where m = (n2 + 2|G(3) | + 3|G(2) | + 5)/6. Proof. Since G is finite then Ω is also finite and, consequently, the group AΩ is a finitely generated A-module. Denoting m = |Ω|, the above formula for m in terms of n, |G(2) |, and |G(3) | can be easily achieved (a similar computation is given in [6]). Furthermore, if Ω = {ω1 , . . . , ωm } then AΩ = Ahω1 ⊕ · · · ⊕ Ahωm , where hωi denotes the characteristic function hωi : ωj 7→ δij (the Kronecker symbol). Hence, AΩ ≃ A ⊗ ZΩ , ZΩ = Zhω1 ⊕ · · · ⊕ Zhωm . By Proposition 4.2, unlike the analogue case in the classical theory, it follows that pZ 2 (G, A) ≃ A ⊗ pZ 2 (G, Z) . In view of this fact, one first considers the case A = Z. Hence, in the subgroup Z 2 (G, Z) admits a complement: indeed, given any σ ∈ ZG×G , and a positive integer q, one has δ2 (qσ) = 0 if and only if δ2 σ = 0, so that Z 2 (G, Z) is a pure subgroup and thus, since pZ 2 (G, Z) is finitely generated, it is complemented [18, Theorem 28.2]. Hence, denoting by r the free-abelian rank of Z 2 (G, Z), one has pZ 2 (G, Z) = Zm−r ⊕ Z 2 (G, Z), and so pH 2 (G, Z) = Zm−r ⊕ H 2 (G, Z) . pZ 2 (G, Z) It is well known that, since G is finite, H 2 (G, Z) ≃ H 1 (G, Q/Z) ≃ G/[G, G] (see [5, Proposition 6.1, Corollary 10.2]). Therefore, in order to prove the theorem’s claim for A = Z it is left to show that r = n. To see this, it is 15 sufficient to find a finite index subgroup of Z 2 (G, Z) isomorphic with Zn , and this goal is achieved by taking B 2 (G, Z). Indeed, since |H 2 (G, Z)| < ∞, it has finite index and, since n < ∞ implies that H 1 (G, Z) = 0, the desired isomorphism is given by the differential δ1 : C1 (G, Z) = ZG ≃ Zn → B 2 (G, Z). Returning to the case of generic coefficients one has to consider the quotient pZ 2 (G, A)/B 2 (G, A) and, more precisely, to describe B 2 (G, A) as a subgroup of pZ 2 (G, A). The only difficulty is that, denoting by hg the characteristic function relative to g in C 1 (G, Z) = ZG , the canonical (finite) set {δ1 hg | g ∈ G} freely generates B 2 (G, Z) as a Z-module, but in B 2 (G, A) the corresponding generating set {1A ⊗ δ1 hg | g ∈ G} is not necessarily free. Consequently, a more delicate analysis of pZ 2 (G, Z) is needed in order to find a basis presenting a good behavior. To this aim, one considers the inclusion B 2 (G, Z) ⊆ Z 2 (G, Z) of finitely generated free Z-modules, and uses Smith’s normalization theorem to obtain simultaneous basis (see [30, Theorem 8.61]); therefore, there exists elements f1 , . . . , fn of Z 2 (G, Z) together with nonnegative integers λ1 , . . . , λn , which are uniquely determined by imposing the condition that λi divides λi+1 for every i < n, satisfying Z 2 (G, Z) = Zf1 ⊕ · · · ⊕ Zfn , B 2 (G, Z) = λ1 Zf1 ⊕ · · · ⊕ λn Zfn . As already remarked, there is an isomorphism in cohomology which allows to compute the integral coefficients as follows: Zλ1 ⊕ · · · ⊕ Zλn = H 2 (G, Z) ≃ G/[G, G] . At this moment one chooses a basis {gm+1 , . . . , gn } of the complement Zm−n to obtain a decomposition pZ 2 (G, Z) = Zf1 ⊕ · · · ⊕ Zfn ⊕ Zgn+1 ⊕ · · · ⊕ Zgm . It is readily seen that 1A ⊗ f1 , . . . , 1A ⊗ gm freely generates pZ 2 (G, A) as an A-module. Therefore, denoting by T = λ1 Af1 ⊕ · · · ⊕ λn Afn , it is left to prove that B 2 (G, A) = T . Since each δ1 hg ∈ B 2 (G, Z) can be expressed as an integral combination of the elements λ1 f1 , . . . , λn fn , it follows that 1A ⊗ δ1 hg ∈ T for every g ∈ G, so that B 2 (G, A) ≤ T . On the other hand, since the elements {δ1 hg | g ∈ G} constitute a basis of B 2 (G, Z), then every λi fi is an integral combination of these elements, proving that λi 1A ⊗ fi ∈ B 2 (G, A), so that T ≤ B 2 (G, A). 16 5 Partial cohomology relative to an ideal In this section the results about the pre-cohomology groups are generalized to the partial cohomology groups relative to ideals I ∈ Λ. In the above notation, let ∆ : Ω → G × G denote a choice of representatives satisfying ∆(1, 1)∼ = (1, 1), and let Ω∗ = Ω \ {(1, 1)∼ }. Then the map Π : G × G → S(G) defined in (6) induces a map Π∼ : Ω∗ → Λ , ω 7→ hΠ ◦ ∆(ω)iS ∪ N3 , which, in view of the equalities (9) and (11), does not depend on the choice of ∆. In this regard the relative pre-cocycles are characterized as follows: Lemma 5.1. A function σ in AG×G lies in Z 2 (G, I; A) if and only if it ∞ satisfies i. Π(g, h) ∈ I ⇐⇒ σ(g, h) = ∞, ii. Π(x, y, z) ∈ / I ⇒ δ2 σ(x, y, z) = 0. Moreover, the group Z 2 (G, I; A) is isomorphic with the group of function AΩI where ΩI = {(1, 1)∼ } ∪ {ω ∈ Ω∗ | Π∼ (ω) 6⊆ I}. Proof. Clearly, any function of the form σ = σ ′ + ǫI where σ ′ ∈ pZ 2 (G, A) satisfies i. To see that σ also satisfies ii, firstly one has to show that no summand of δ2 σ is equal to ∞. Equivalently, that no-one among Π(x, y), Π(xy, z), Π(x, yz), and Π(y, z) is contained in I. To this aim, the cases of Π(x, y) and Π(y, z) are trivial; on the other hand, assuming that Π(xy, z) ∈ I yields Π(x−1 , x, y, z) = Π(x−1 , xy, z) ∈ I, but then also Π(x, y, z) = Π(x, x−1 , x, y, z) ∈ I contradicting the hypothesis, and the case of Π(x, yz) is similar. Therefore, when Π(x, y, z) ∈ / I then δσ(x, y, z) = δσ ′ (x, y, z). However, since I contains N3 , Π(x, y, z) ∈ / I implies that 1 ∈ {x, xy, xyz, yz, z}, ′ so that δσ (x, y, z) = 0. Vice versa, given σ satisfying the properties i and ii, one has to produce a pre-cocycle σ ′ for which σ = σ ′ + ǫI . Accordingly to Proposition 4.2, one defines f in AΩ by setting f (ω) = 0 if σ ◦ ∆(ω) = ∞, and f (ω) = σ ◦ ∆(ω) otherwise. Then, the desired σ ′ is obtained by means of the isomorphism AΩ → pZ 2 (G, A) as f 7→ σ ′ . Finally, the above defined function f ∈ AΩ can be regarded as an element of AΩI simply by restriction. Conversely, any function in AΩI can be 17 extended to an element f of AΩ by imposing the value 0 over the complementary set Ω \ ΩI , resulting as above in an element σ ∈ Z 2 (G, I; A). For the general case of partial cohomology groups relative to ideals, one is able to come at a weaker form of Theorem 4.3: Theorem 5.2. Let G be a finite group. Then H 2 (G, I; Z) ≃ ZmI −nI ⊕ Z/µ1 Z ⊕ · · · ⊕ Z/µnI Z where mI = |ΩI | ≥ nI = rkZ B 2 (G, I; Z), and µ1 , . . . , µnI are positive integers ordered by recursive division. Moreover, H 2 (G, I; A) ≃ A ⊗ H 2 (G, I; Z) ≃ AmI −nI ⊕ A/µ1 A ⊕ · · · ⊕ A/µnI A for any abelian group A. Proof. The result follows in a way similar to the proof of Theorem 4.3, with the following minor modification. In this case, using Lemma 5.1, one also has Z 2 (G, I; A) ≃ A ⊗ Z 2 (G, I; Z). Then, applying Smith’s normalization theorem, one obtains a free basis f1 , . . . , fmI of Z 2 (G, I; Z) together with positive integers µ1 , . . . , µnI such that µ1 f1 , . . . , µnI fnI is a free basis of B 2 (G, I; Z). Finally, the fact B 2 (G, I; A) = µ1 Af1 ⊕ · · · ⊕ µnI Afni is proved considering the canonical generating set {δhg + ǫI | g ∈ G}. In particular, when A is a divisible group, then for every ideal I in Λ each summand A/µi A in the decomposition of H 2 (G, I; A) is trivial. This observation confirms the conjecture mentioned in the introduction: Corollary 5.3. If G is finite and K is an algebraically closed field, then any component of the partial multiplier is a finite direct sum of copies of K× . 5.1 An example It can be seen in the proof of Theorem 4.3 that the torsion part of pH 2 (G, Z) comes from the classical cohomology group H 2 (G, Z). A similar statement can not be formulated for a generic ideal I. Moreover, the next example shows that the torsion part of H 2 (G, I; Z) is not necessarily a quotient of H 2 (G, Z). The general procedure to compute H 2 (G, I; Z) explicitly, which can be reproduced for various small groups using GAP [20], is summarized 18 as follows: one determines m = |Ω| together with a set of representatives ∆(ω1 ), . . . , ∆(ωm ) for the classes of Ω; the matrix M = (δ1 hgi ◦ ∆(ωj ))i,j ∈ Matn×m (Z) yields the coefficients of the natural basis δ1 hg1 , . . . , δ1 hgn of B 2 (G, Z) in terms of the characteristic functions hω1 , . . . , hωm ; given an ideal I in Λ, one determines Ω \ ΩI = {ωi1 , . . . , ωim−mI } to obtain, removing from A the columns i1 , . . . , im−mI , a matrix MI ; finally, the coefficients µ1 , . . . , µnI which describe the torsion part of H 2 (G, I; Z) in Theorem 5.2 are the nonzero diagonal entries of the Smith’s normal form of the matrix MI . Example 4. Consider the cyclic group G = Z6 . It is directly seen that G admits 8 = (62 + 2 · 2 + 3 · 1 + 5)/6 classes in Ω, which are represented by the following pairs: ω1 ω2 ω3 ω4 ω5 ω6 ω7 ω8 ∆ (0, 0) (1, 5) (2, 4) (3, 3) (1, 1) (1, 2) (1, 3) (2, 2) Thus, the coefficients of the matrix M = (δ1 hgi ◦ ∆(ωj ))i,j ∈ Mat6×8 (Z) can be read in the following table: ω1 δh0 δh1 δh2 δh3 δh4 δh5 ω2 ω3 ω4 ω5 ω6 ω7 ω8 1 −1 −1 −1 · · · · · 1 · · 2 1 1 · · · 1 · −1 1 · 2 · · · 2 · −1 1 · · · 1 · · · −1 −1 · 1 · · · · · · It can be checked that the Smith’s normalization algorithm provides two matrices P ∈ GL(6, Z) and Q ∈ GL(8, Z), such that the diagonal entries of D = P M Q are λ1 = · · · = λ5 = 1 and λ6 = 6. In accordance with Theorem 4.3, then pH 2 (Z6 , Z) ≃ Z ⊕ Z ⊕ Z6 . Consider now I = N3 ∪ hΠ(1, 2), Π(1, 3)iS , so that Ω \ ΩI = {ω6 , ω7 }. In particular nI = |ΩI | = 6, and Smith’s normalization for MI provides a matrix with diagonal entries µ1 = . . . = µ4 = 1, µ5 = 2 and µ6 = 6. Therefore, H 2 (Z6 , I; Z) ≃ Z2 ⊕ Z6 that, as anticipated, is not a quotient of H 2 (Z6 , Z) = Z6 . 19 N3 : Z ⊕ Z❋ ⊕ ❘ Z6 ❋❋❘❘❘❘ ❋❋ ❘❘❘ ❋❋ ❘ ❋❋ ❘❘❘❘❘ ❘❘❘ ❋❋ ❘❘❘ ❋❋ ❘❘ ❋ ①① ①① ① ①① ①① ① ①① ①① ω5 : Z ⊕❋Z6 ω6 : Z ⊕❋Z❘6 ω7 : Z ⊕ ◆Z6 ω8 : Z ⊕ ✼✼ Z6 ◆◆◆❧❧❧ ❋❋ ❋❋❘❘❘❘❦❦❦❦ ♠♠ ✂✂ ✼✼ ❧ ❋❋♠♠♠♠♠ ❋❦❋❦❦ ❘❘❘ ◆ ❧ ✂ ❧ ◆◆ ✼ ◆◆◆ ✂✂ ❦❦❦ ❋❋❋ ❘❘❘❘❧❧❧❧❧ ♠♠ ❋❋❋ ❦ ♠ ✂ ❦ ♠ ◆◆◆ ✼✼✼ ❋❋ ❦❦❦❦ ❋❋ ❧❧❧❧ ❘❘❘❘ ✂ ♠♠ ♠ ✂ ♠ ❋ ❋ ❦ ❧ ◆ ❘ ❧ ❋ ❘❘❘ ◆◆◆ ✼✼✼ ❦❦ ❋ ✂✂ ♠♠♠ ❧❧❧ ❋❋ ❘❘❘ ❦❦❦ ❋❋ ❧ ◆◆ ❦ ❧ ✂♠✂♠♠♠♠ ❦ ❘ ❦❦ Z ⊕ Z Z6 ❁ Z Z ⊕ Z2 Z6 ❋ ❤ 2 6 6 ❤ ✐✐ Z6 ❇❇ ❤❤❤❤❤ ❋❋ ① ❁❁ ✂ ❤❤❤❤ ✐✐✐✐ ✞✞ ❤❇ ❤ ① ✐ ❇ ❤ ❤ ✂ ✐ ❤ ❤ ❋ ① ✐ ❤ ❤ ❁❁ ✂✂ ❤ ❋❋ ①① ✞ ❤❤ ❇❇ ✐✐✐✐ ❤❤❤❤ ❋❋①①❤❤❤❤❤❤❤❤ ❁❁✂✂ ✞✞ ✐✐✐❇✐❇❇ ❤❤❤❤ ❋ ✐ ❤ ✞ ① ❤ ✐ ❤ ❁ ❤ ✂ ❋ ❤ ✐ ❤ ① ✞ ✂ ❁ ❇❇ ❤❤❤ ❤❤❤① ❋ ✐✐✐ ✞✞ ✂✂ ❁❤❁❁❤❤❤❤❤①❤①①① ❤❤❤❋❤❋❤❋❤❋❤❤ ❇❇ ✐✐✐✐ ✐ ✞ ✂ ✐ ❤ ✐ ❤ ❤ ✞ ✂ ❤❤❤ ①❤❤❤❤ ✐✐✐✐ ω4 : Z❇6 Z2 Z2 ❤ Z6 ❁◗❤◗◗ ❤ Z2 ❤ ❤ ❤ ❤ ❁❁ ◗◗◗ ①① ①① ❤❇❇❤❤❤ ❁❁ ◗◗◗◗ ①① ①❤①❤❤❤❤❤❤ ❇❇❇ ① ① ❤ ① ◗◗◗ ❁❁ ❇❇ ①①❤ ❤❤❤①❤ ◗◗◗ ①①① ❁❁ ❇❇ ❤❤❤❤①①① ①◗◗◗ ❤ ❤ ① ❁❁ ❇❇ ❤ ❤ ① ① ❇❇ ❁ ①①①① ❤❤❤❤◗❤◗❤◗❤ ① ◗ ① ❤ ◗ ❤ ❤ Z3 0 Z2 ❤ ω2 : Z6 ◗ ◗◗◗ ◗◗◗ ◗◗◗ ◗◗◗ ◗◗◗ ◗◗◗ ◗◗◗ ◗ ω3 : Z2 ❙ Z2 ❁ 0 Z3 ❙❙❙ ❁❁ ⑤⑤ ❙❙❙ ⑤ ❁❁ ❙❙❙ ⑤⑤ ❁❁ ❙❙❙ ⑤⑤ ❙❙❙ ❁❁ ⑤ ❙❙❙ ⑤⑤ ❁❁ ❙❙❙ ⑤⑤ ❁ ❙❙❙ ⑤ ❙❙ ⑤ Z2 ● ● ●● ●● ●● ●● ●● ●● ● 0 ✇0 ✇✇ ✇ ✇✇ ✇✇ ✇ ✇ ✇✇ ✇✇ ✇ ✇ Figure 1: The partial cohomology semilattice of groups H 2 (Z6 , Λ; Z). The semilattice structure is the same of (Λ, ∪). At the vertex corresponding to the ideal I appears H 2 (Z6 , I; Z). The principal-modulo-N3 ideals are marked by their generator, thus “ω5 : Z⊕Z6 ” stands for H 2 (G, Π∼ (ω5 ); Z) ≃ Z⊕Z6 . 20 For another instance, consider I = N3 ∪hΠ(2, 4), Π(3, 3)iS . Since, by (9), hΠ(2, 4)iS = hΠ(2)iS = hΠ(4)iS and hΠ(3, 3)iS = hΠ(3)iS , it immediately follows that Ω \ ΩI = {ω3 , . . . , ω8 }. Thus, only the first and the second column in the above table are relevant, and one sees that δ1 h5 +ǫI = hω2 +ǫI and δ1 (h0 + h5 ) + ǫI = hω1 + ǫI . Consequently, H 2 (G, I; Z) = 0 in this case. The full description of H 2 (Z6 , Λ; Z) is shown in Figure 1. 6 Consistency with the previous notion It is left to show that for any abelian group of coefficients A and any ideal I in Λ, the group H 2 (G, I; A) is a partial cohomology group according to [10]. To this aim, one has to associate the pair (I; A) with a unital partial G-module B (that is to say, a commutative monoid together with a unital partial G-action). Theorem 6.1. For any pair (I; A), there exists a unital partial G-module B such that H 2 (G, I; A) ≃ H 2 (G, B). Proof. The construction is similar to that of Lemma 3.2: let E(S(G) \ I) denote the collection of the idempotents in S(G) \ I, then the set B = (A × E(S(G) \ I)) ∪ {∞} endowed with zero element ∞ and multiplication ( (a + b, εη) if εη ∈ /I (a, ε) · (b, η) = ∞ otherwise, results in an A-cancellative central extension of the semilattice E(S(G)/I). Moreover, B is a commutative monoid with identity element (0A , Π(1)), and it is naturally endowed with the following unital partial action: for any g ∈ G, one considers the idempotent ( (0A , Π(g, g−1 )) if Π(g) ∈ /I eg = ∞ otherwise together with the ideal Bg = Beg of B, and the partial action ϑ is given by the family of isomorphisms {ϑg : Bg−1 → Bg | g ∈ G}, defined by: ( (a, Π(g)εΠ(g−1 )) if Π(g)εΠ(g−1 ) ∈ /I ϑg (a, ε) = ∞ otherwise. 21 Thus, for any x1 , . . . , xn ∈ G, the ideal B(x1 ,...,xn ) = Bx1 Bx1 x2 · · · Bx1 x2 ···xn is either reduced to the trivial semigroup {∞}, or it is generated by the idempotent  ex1 ex1 x2 · · · ex1 ···xn = 0A , Π(x1 , x2 , . . . , xn , (x1 x2 · · · xn )−1 ) , which obviously plays the role of the identity element. In the latter case, the subgroup of B(x1 ,...,xn ) consisting of invertible elements is   U (B(x1 ,...,xn ) ) = a, Π(x1 , x2 , . . . , xn , (x1 x2 · · · xn )−1 ) | a ∈ A , which is isomorphic to A by means of the projection on the first component π : B \ {∞} → A. It is convenient to extend π to the whole B by the assignment of π(∞) = ∞. Therefore, an n-cochain σ ∈ C n (G, B), which is by definition a map σ : Gn → B satisfying σ(x1 , . . . , xn ) ∈ U (B(x1 ,...,xn ) ) for every x1 , . . . , xn ∈ G, can be identified with the composite function σ̄ = π ◦ σ : Gn → A∞ . Clearly, one has that σ̄(x1 , . . . , xn ) = ∞ if and only if Π(x1 , . . . , xn , (x1 . . . xn )−1 ) ∈ I, which indeed corresponds to the case B(x1 ,...,xn ) = {∞}. By the above construction of the partial action of G over B, the coboundary map δn : C n (G, B) → C n+1 (G, B) is given by the relation ( (δn σ̄(x1 , . . . , xn+1 ), η) if η ∈ /I δn σ(x1 , . . . , xn+1 ) = ∞ otherwise, where η = Π(x1 , . . . , xn+1 , (x1 · · · xn+1 )−1 ) and δn : C n (G, A) → C n+1 (G, A) is the standard coboundary homomorphism relative to the the trivial (global) G-module A. Notice that, in view of (10), the condition η ∈ / I is equivalent to Π(x1 , . . . , xn+1 ) ∈ / I. 2 Therefore, taking n = 2, Lemma 5.1 shows that σ ∈ Z (G, B) if and only if σ̄ ∈ Z 2 (G, I; A). Finally, one checks the case n = 1 to conclude that σ ∈ B 2 (G, B) if and only if σ̄ ∈ B 2 (G, I; A), so that the map σ → σ̄ induces the desired isomorphism of cohomology groups. References [1] P. Ara and R. Exel. Dynamical systems associated to separated graphs, graph algebras, and paradoxical decompositions. Advances in Mathematics, 252:748–804, 2014. 22 [2] P. Ara, R. Exel, and T. Katsura. Dynamical systems of type (m, n) and their C∗ -algebras. Ergodic Theory and Dynamical Systems, 33(5):1291– 1325, 2013. [3] J. C. Birget and J. Rhodes. Almost finite expansions of arbitrary semigroups. Journal of Pure and Applied Algebra, 32(3):239–287, 1984. [4] J. C. Birget and J. Rhodes. Group theory via global semigroup theory. Journal of Algebra, 120(2):284–300, 1989. [5] K. S. Brown. Cohomology of groups, volume 87 of Graduate Texts in Mathematics. Springer-Verlag, New York-Berlin, 1982. [6] H. G. G. de Lima and H. Pinedo. On the total component of the partial Schur multiplier. Journal of the Australian Mathematical Society, 100(3):374–402, 2016. [7] M. Dokuchaev. Partial actions: a survey. In Groups, algebras and applications, volume 537 of Contemp. Math., pages 173–184. Amer. Math. Soc., Providence, RI, 2011. [8] M. Dokuchaev and R. Exel. Partial actions and subshifts. Journal of Functional Analysis, 272(12):5038–5106, 2017. [9] M. Dokuchaev, R. Exel, and J. J. Simón. Crossed products by twisted partial actions and graded algebras. Journal of Algebra, 320(8):3278– 3310, 2008. [10] M. Dokuchaev and M. Khrypchenko. Partial cohomology of groups. Journal of Algebra, 427:142–182, 2015. [11] M. Dokuchaev and M. Khrypchenko. Twisted partial actions and extensions of semilattices of groups by groups. International Journal of Algebra and Computation, online-ready, pages 1–47, 2016. [12] M. Dokuchaev and M. Khrypchenko. Partial cohomology of groups and extensions of semilattices of abelian groups. Journal of Pure and Applied Algebra, to appear, arXiv:1705.09654, 2017. [13] M. Dokuchaev and B. Novikov. Partial projective representations and partial actions. Journal of Pure and Applied Algebra, 214(3):251–268, 2010. 23 [14] M. Dokuchaev and B. Novikov. Partial projective representations and partial actions II. Journal of Pure and Applied Algebra, 216(2):438–455, 2012. [15] M. Dokuchaev, B. Novikov, and H. Pinedo. The partial Schur multiplier of a group. Journal of Algebra, 392:199–225, 2013. [16] R. Exel. Twisted partial actions: a classification of regular C ∗ -algebraic bundles. Proceedings of the London Mathematical Society. Third Series, 74(2):417–443, 1997. [17] R. Exel. Partial actions of groups and actions of inverse semigroups. Proceedings of the American Mathematical Society, 126(12):3481–3494, 1998. [18] L. Fuchs. Infinite abelian groups. Vol. I. Pure and Applied Mathematics, Vol. 36. Academic Press, New York-London, 1970. [19] L. Fuchs. Infinite abelian groups. Vol. II. Academic Press, New YorkLondon, 1973. Pure and Applied Mathematics. Vol. 36-II. [20] The GAP Group. GAP – Groups, Algorithms, and Programming, Version 4.8.8, 2017. [21] J. M. Howie. An introduction to semigroup theory. Academic Press [Harcourt Brace Jovanovich, Publishers], London-New York, 1976. L.M.S. Monographs, No. 7. [22] I. M. Isaacs. Character theory of finite groups. Academic Press [Harcourt Brace Jovanovich, Publishers], New York-London, 1976. Pure and Applied Mathematics, No. 69. [23] G. Karpilovsky. The Schur multiplier, volume 2 of London Mathematical Society Monographs. New Series. The Clarendon Press, Oxford University Press, New York, 1987. [24] J. Kellendonk and M. V. Lawson. Partial actions of groups. International Journal of Algebra and Computation, 14(1):87–114, 2004. [25] M. Kennedy and C. Schafhauser. Noncommutative boundaries and the ideal structure of reduced crossed products, 2017. 24 [26] B. Novikov and H. Pinedo. On components of the partial Schur multiplier. Communications in Algebra, 42(6):2484–2495, 2014. [27] H. Pinedo. A calculation of the partial Schur multiplier of S3 . Int. J. Math. Game Theory Algebra, 22(4):405–417, 2014. [28] H. Pinedo. Partial projective representations and the partial Schur multiplier: a survey. Bol. Mat., 22(2):167–175, 2015. [29] H. Pinedo. The total component of the partial Schur multiplier of the elementary abelian 3-group. Rev. Colombiana Mat., 50(1):75–83, 2016. [30] J. J. Rotman. Advanced modern algebra. Part 1, volume 165 of Graduate Studies in Mathematics. American Mathematical Society, Providence, RI, third edition, 2015. [31] I. Schur. Über die darstellung der endlichen gruppen durch gebrochen lineare substitutionen. Journal für die reine und angewandte Mathematik, 127:20–50, 1904. 25
4math.GR
arXiv:1309.7919v2 [nlin.CD] 11 Mar 2014 CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM Jesse Berwald Institute for Mathematics and Its Applications Minneapolis, Minneapolis, MN 55455, USA Marian Gidea Yeshiva University, Department of Mathematical Sciences, New York, NY 10016 and School of Mathematics, Institute for Advanced Study Princeton, NJ 08540, USA (Communicated by the associate editor name) Abstract. We consider a model for substrate-depletion oscillations in genetic systems, based on a stochastic differential equation with a slowly evolving external signal. We show the existence of critical transitions in the system. We apply two methods to numerically test the synthetic time series generated by the system for early indicators of critical transitions: a detrended fluctuation analysis method, and a novel method based on topological data analysis (persistence diagrams). 1. Introduction Gene expression is the process by which the genetic code is used to synthesize functional gene products (proteins, functional RNAs). The timing and the level of gene production is specified by a wide range of mechanisms, termed gene regulation. It is believed that a significant number of genes express cyclically, with about 10 − 15% of genes directly regulated by the circadian molecular clock. Such gene expression oscillations allow for rapid adaptation to changes in intracellular and environmental conditions. In general, the phase and amplitude of gene expression depend on the function of the gene and internal and external stimuli. It has been postulated that gene expression oscillation is a basic property of all genes, not necessarily connected with any specific gene function [27]. Gene regulatory systems are intrinsically stochastic. Stochasticity originates in the statistical uncertainty of the chemical reactions between molecules, and is inversely proportional to the square root of the number of molecules. Thus, lower numbers of interacting molecules yield increasingly significant statistical fluctuations. Besides intrinsic stochasticity, gene expression is also subjected to extrinsic 1991 Mathematics Subject Classification. Primary: 92D20; 34C23; 55N99. Secondary: 34F05; 57M99. Key words and phrases. Gene regulatory networks; critical transitions; stochastic differential equations; persistence diagrams. The first author is supported by the MCRN. The second author is supported by NSF grant DMS-1201357, by the National Cancer Institute grant P20 CA157069, by The Fund for Math of the IAS, and by the MCRN. 1 2 JESSE BERWALD AND MARIAN GIDEA stochasticity, due to environmental effects. In general, stochastic fluctuations are seen as a source of robustness and stability, but sometimes can adversely affect a cell function [22]. A motivation for the modeling and simulation of gene regulatory systems comes from synthetic biology, an emerging field of research devoted to the design and construction of biological systems, based on engineering principles. An interesting analogy in [31] compares a molecular network to an electrical circuit, where, instead of resistors, capacitors and transistors connected via circuits one has genes, proteins, and metabolites connected via chemical reactions and molecular pathways. Some milestone achievements in this direction have been reported, e.g., in [1, 10, 13]. Relatedly, one would also like to achieve a clear understanding of the functionality of the molecular circuits and networks through measurements of various product outputs, in the same way one understands an electrical circuit through measurements of current, voltage, and resistance. In particular, one would like to discern possible ways in which systems subjected to varying parameters and noise may switch between different stable regimes, or more generally, between potential attractors. It is the concept of suddenly shifts amongst stable regimes which we explore in this paper. We investigate the occurrence of these critical transitions in a model of a genetic regulatory system. By a critical transition we mean a sudden change of a system from one stable regime (fixed point, limit cycle) to an unstable regime, possibly followed by some other stable regime. We consider a simple genetic circuit that exhibits an oscillatory regime, and we study the behavior of the system under noise. Explicitly, we consider a two-gene model whose oscillations depend on several parameters. We show that the system undergoes a critical transition under slow parameter drift. We accomplish this by recording the time series generated by this model and analyzing the critical transitions. We utilize numerical methods to identify early warning signals indicative of critical transitions in the synthetic data. First, we apply a statistical method, based on detrended fluctuation analysis, to analyze these time series data. The method is described in detail in Subsection 4.1. The tests are performed using a windowed analysis of the data and reveal that the autocorrelation of the time series increases towards 1, and the variance of the time series distribution grows steadily prior to a critical transition. These signs are consistent with early warning indicators of critical transitions described by others; for instance, see results in Scheffer, et al [28]. Secondly, we apply a method from topological data analysis, based on persistence diagrams, which we describe in more detail in Subsection 4.2. Again, we consider windows of data from the time series. In this case, we consider these windows as strings of data points to which we associate filtrations of Rips complexes and for which we generate associated persistence diagrams to analyze the topology of the data at different resolutions. The persistence diagrams reveal qualitative changes in the topology of the strings of data points prior to the critical transitions: the distribution of data points becomes more widespread and/or asymmetric. While the detrended fluctuation analysis has been previously used for detection of critical transitions, the application of persistence diagrams, a method from topological data analysis, is novel. We also make a comparison between the two methods. While the detrended fluctuation analysis introduces artificial choices and possible bias (see also [2]), the proposed topological method is inherently robust. Note that both methods can be applied to detect or predict critical transitions in experimental data as well. CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 3 As such, the results from model testing may serve as benchmarks for testing data measured from real world sources. 2. Background In this section we briefly describe critical transitions in the context of fast-slow systems. We consider both deterministic and stochastic systems. Then we present a simple genetic regulatory model of the substrate-depletion oscillator type. 2.1. Critical transitions. A fast-slow system of ordinary differential equations is a system of the type (1) x0 = (2) 0 = εy m m+n g(x, y), where (x, y) ∈ R × R , f : R → R , g : Rm+n → Rn are C r -functions with d . One can regard y as a fast variable. r ≥ 3, ε > 0 is a small parameter, and 0 = dt Rescaling the time t = ετ yields (3) n f (x, y), m ẋ = εf (x, y), (4) ẏ = g(x, y), d dτ . where ˙ = The singular limit of (1),(2) when ε → 0 gives the slow subsystem, and the singular limit of (3),(4) gives the fast subsystem. The critical set is defined as C0 = {(x, y) : g(x, y) = 0} ∂g is and consists of equilibrium points for the fast subsystem. If the Jacobian ∂y nonsingular on C0 , then C0 is an m-dimensional manifold, and is the graph of a smooth function y = h0 (x). The slow subsystem is determined by x0 = f (x, h0 (x)) ∂g at a point have non-zero and restricts to C0 . In the case that all eigenvalues of ∂y real parts, then the point is normally hyperbolic. The set of normally hyperbolic points forms a normally hyperbolic invariant manifold (NHIM). In particular, it has stable and unstable manifolds. The NHIM can have attractive components, where ∂g all the eigenvalues of ∂y have negative real part, and repelling components, where at least one eigenvalue has positive real part. An attractive component has an ndimensional stable manifold, while a repelling component has a non-trivial unstable manifold. Fenichel’s Theorem [11] implies that, for all sufficiently small ε, every compact submanifold (with boundary) S0 of C0 can be continued to a NHIM Sε (not uniquely defined) for the flow of (1), (2), which is the graph of a smooth function y = hε (x). The stable and unstable manifolds of S0 continue to stable and unstable manifolds of Sε . The flow on Sε converges to the slow flow as ε → 0. Such a manifold Sε is referred to as a slow manifold. We define a critical transition for this type of system following [17]. We assume that the critical set C0 can be decomposed as C0 = S0a ∪ S0r ∪ S0b , where S0a is an attractive NHIM, S0r a repelling NHIM, and S0b is the part of C0 that is not normally hyperbolic (corresponding to bifurcation points). By definition, a point p0 = (x0 , y0 ) on C0 that is not normally hyperbolic is a critical transition if there exists a concatenation of trajectories γ0 , γ1 , where γ0 : [t−1 , t0 ] → Rm+n , γ1 : [t0 , t1 ] → Rm+n satisfy the following properties: (1) γ0 (t−1 , t0 ) is a trajectory of the slow subsystem, oriented from γ0 (t−1 ) to γ0 (t0 ), contained in the attracting NHIM S0a ; 4 JESSE BERWALD AND MARIAN GIDEA (2) γ0 (t0 ) = γ1 (t0 ) = p0 ∈ S0b is a point that is not normally hyperbolic; (3) γ1 (t0 , t1 ) is a trajectory of the fast subsystem, oriented from γ1 (t0 ) to γ1 (t1 ). When we consider the dynamics of the system for ε > 0 sufficiently small, a trajectory starting near γ0 follows closely the slow dynamics around γ0 for some time, after which it transitions to follow the fast dynamics near γ1 for a period of time. In [17, 18] several types of bifurcations are examined to determine whether or not they exhibit the characteristics of critical transitions, under some suitable conditions on the smoothness, compactness, and non-degeneracy on the system. We summarize the findings below: (a) for m = n = 1, saddle-node (fold) bifurcation points determine critical transitions; (b) for m = n = 1, subcritical pitchfork bifurcation points determine critical transitions; (c) for m = n = 1, transcritical bifurcation points determine critical transitions; (d) for m = 2 and n = 1, subcritical non-degenerate Hopf bifurcations determine critical transitions. 2.2. Incorporating noise. It is often important for the understanding of a physical system to incorporate stochastic effects. We consider the Langevin form of (1), (2) (5) dx = (6) dy = f (x, y) + σ1 dW1 , 1 1 g(x, y) + √ σ2 dW2 , ε ε where σ1 , σ2 represent noise levels (depending on ε), and W1 , W2 are one-dimensional Wiener processes (Brownian motions). Assuming σ1 , σ2 are sufficiently small, the sample paths of the system (5), (6) stay near S0a with high probability, up to a neighborhood of the critical transition, after which they exit the neighborhood. In [17, 18], it is argued that the following behaviors are typical of a system prior to a critical transition: (i) The system recovery from small perturbations is ‘critically’ slows down; (ii) The variance in the time series increases steadily; (iii) The autocorrelation of the time series increases towards 1; (iv) The distribution of the time series becomes more asymmetric. We note that (iv) from above depends on whether or not the underlying bifurcation has symmetry. For example, a saddle-node bifurcation as in (a) from above will typically yield asymmetric fluctuations, while a pitchfork bifurcation as in (b) from above will typically yield symmetric fluctuations. A complementary characteristic to (iv) is that the distribution of the time series loses its normality, for example it changes from uni-modal to multi-modal. Such system response characteristics can be monitored numerically and serve as ‘early warnings’ of critical transitions in real-world systems. Examples include Earth’s climate, ecological systems, global finance, asthma attacks or epileptic seizures; see, e.g., [7, 28, 29, 30], and the references therein. 2.3. A simple genetic circuit. We briefly describe a model of simple genetic circuit which generates oscillations of varying amplitude. The model consists of two genes, one producing the protein R(t), and the other producing the protein X(t). The protein X(t) is a substrate for the activator protein R(t) that is produced in an autocatalytic process. As R(t) accumulates, the production of R(t) accelerates CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 5 until there is an explosive conversion of the whole of X(t) into R(t). This rapid change corresponds to a critical transition in the underlying system. With the substrate X(t) depleted, the autocatalytic reaction terminates, and the activator R(t) degrades in time. This allows the level of X(t) to grow again, leading to another cycle of explosive growth in R(t). This process is know as a substratedepletion oscillator. An example of this mechanism is the oscillation of the M-phase-promoting factor (MPF) activator in the frog egg, where the substrate is the phosphorylated form of the B-cyclin-dependent kinase (note that the true mechanism involves several other proteins and reactions) [26]. A mathematical model for the substrate-depletion oscillator is given by the following system: (7) X 0 (t) = k1 S − [k00 + k0 EP (R(t))]X(t), (8) R0 (t) = [k00 + k0 EP (R(t))]X(t) − k2 R(t). Here EP (R(t)) represents the level of the phosphorylated version of the protein R(t) – involved with R(t) in a mutual activation process – given by EP (R) = G(k3 R, k4 , J, K), where G, the Goldbeter-Koshland function, is defined by G(u, v, J, K) = v − u + vJ + uK + 2uK p . (v − u + vJ + uK)2 − 4(v − u)uK The Goldbeter-Koshland function represents the equilibrium concentration of the phosphorylated form of a protein, for a phosphorylation-dephosphorylation reaction governed by Michelis-Menten kinetics. The Goldbeter-Koshland function is responsible for creating a switch-like signal-response in the evolution of the protein R(t). The quantities k0 , k00 , k1 , k2 , k3 , k4 , J, K, S are parameters. The parameter S is the strength of a signal, representing the rate of synthesis of the substrate X, which we regard as an external input to the system. This system presents both positive and negative feedback. The positive feedback loop creates a bistable system and the negative-feedback loop drives the system back and forth between two stable steady states. In what follows, we will modify the simple genetic circuit in (7) and (8) by considering the external input S as a slowly varying parameter, in addition to including a stochastic term. We will study critical transitions in the resulting system. 3. Model We consider a new model of a genetic regulatory network with a slowly dependent signal, given by (7), (8), with S being now a slowly evolving parameter, i.e. (9) X 0 (t) = k1 S(t) − [k00 + k0 EP (R(t))]X(t), (10) R0 (t) = (11) S 0 (t) = ε, [k00 + k0 EP (R(t))]X(t) − k2 R(t), where ε > 0 is small. We will fix the parameter as in [31], k0 = 0.04, k00 = 0.01, k1 = k2 = k3 = 1, k4 = 0.3, J = K = 0.05. The fast subsystem is obtained by letting ε → 0 yielding (12) X 0 (t) = k1 S(t) − [k00 + k0 EP (R(t))]X(t), (13) 0 R (t) = [k00 + k0 EP (R(t))]X(t) − k2 R(t), (14) S 0 (t) = 0. 6 JESSE BERWALD AND MARIAN GIDEA R X,R X(t) R(t) X t Figure 1. A sample trajectory, and the X-time series (higher value) and R-time series (lower values). We rescale time τ = εt, and we rewrite the corresponding system relative to the rescaled time (15) εẊ = k1 S − [k00 + k0 EP (R)]X, (16) εṘ = [k00 + k0 EP (R)]X − k2 R, (17) Ṡ = 1. Sample trajectories for this system are plotted in Fig. 1. From the above equations the slow subsystem is obtained by letting ε → 0 yielding (18) 0 = k1 S − [k00 + k0 EP (R)]X, (19) 0 = [k00 + k0 EP (R)]X − k2 R, (20) Ṡ = 1. From this we see that the critical submanifold is given by ) ( k1 k1 S ,R = S . C0 = (X, R, S) , X = 0 k2 k0 + k0 EP ( kk21 S) The critical submanifold consists of equilibrium points of the fast subsystem. The stability of the C0 is determined by the eigenvalues of the Jacobi matrix evaluated at the equilibrium points   −[k00 + k0 EP (R)] −[k0 ∂R EP (R)X] J= . k00 + k0 EP (R) k0 ∂R EP (R)X − k2 For the values of the parameters chosen above, we find that the stability at an equilibrium point changes at Scrit1 = 0.13326703 and Scrit2 = 0.34680193, respectively. The corresponding equilibria are Xcrit1 = 5.41285587, Rcrit1 = 0.13326703, and Xcrit2 = 1.07370450, Rcrit2 = 0.34680193. Precisely, for S < Scrit1 and S > Scrit2 the equilibrium point is stable. For S ∈ (Scrit1 , Scrit2 ) the equilibrium point is unstable, and there exists a periodic orbit that is asymptotically stable, whose existence can be established numerically, as observed in Fig. 1. The values S = Scrit1 , S = Scrit2 yield subcritical Hopf bifurcations, where an unstable equilibrium point is turned into a stable one and a small unstable periodic orbit is born (or vice versa). In addition, one expects canard-type solutions in some exponentially small neighborhoods of Scrit1 , Scrit2 , relative to ε (see, e.g., [19]). In Fig. 2 we plot the nullclines of the system for the critical points Scrit1 and Scrit2 . CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 7 Figure 2. The nullclines of the fast system for S = Scrit1 and S = Scrit2 . The specific stochastic differential equation (SDE) system associated to (15), (16), (17) can be written (21) Ẋ = (22) Ṙ = (23) Ṡ = 1 σ1 (k1 S − [k00 + k0 EP (R)]X) + √ dW1 , ε ε 1 0 σ2 ([k + k0 EP (R)]X − k2 R) + √ dW2 , ε 0 ε 1, where W1 , W2 represent Brownian motions, and σ1 , σ2 are noise levels. Since the parameter values Scrit1 and Scrit2 yield subcritical Hopf bifurcations, the theory from Subsection 2.1 allows us to conclude that the corresponding points (Xcrit1 , Rcrit1 ), (Xcrit2 , Rcrit2 ) determine critical transitions. A typical trajectory of the stochastic system in the phase space and its corresponding R-time series are shown in Fig. 3. Examining the R-time series, one can see that a critical transition occurs near time t ≈ 1000. We note that a similar analysis for activator-inhibitor oscillations has been performed in [18]. Remark 1. As mentioned in Section 1, noise in the form of random fluctuations arises naturally in gene regulatory networks. One typically distinguishes between intrinsic noise, inherent in the biochemical reactions, and extrinsic noise, originating in the random variation of the externally set control parameters. Both types of noise can be model by augmenting the governing rate equations with additive or multiplicative stochastic terms. We refer the interested reader to [14]. In our model we only consider the effects of additive noise, which can be thought of as a randomly varying external field acting on the biochemical reactions. The field enters into the governing rate equations as an additive stochastic term in the Langevin equation. We choose to focus on additive extrinsic noise as this could be used as a switch and/or amplifier for gene expression, which has potential applications to gene therapy [14]. Switching mechanisms are exactly the type of phenomena that we would like to capture via the critical transitions approach. 4. Methods We use the model proposed in Section 3 to generate a synthetic time series given by successive reading of one of the variables. We investigate the synthetic time series for early warning signs of critical transitions. Below we describe two such detection 8 JESSE BERWALD AND MARIAN GIDEA Phase plane plot x 1.4 1.4 R 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 t 0.2 0 1 2 3 4 5 6 0.2 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Figure 3. Phase space of the model described by (21), (22), (23), and a corresponding R-time series. methods: a well-known detrended fluctuation analysis method, and a novel method inspired by topological data analysis. 4.1. Detrended fluctuation analysis. Detrended fluctuation analysis (DFA) is a technique introduced by Hurst half a century ago to analyze fluctuations in time series. The DFA procedure has been widely used for early detection of critical transitions [23, 28, 30]. We outline the algorithm below. 4.1.1. Algorithmic description of DFA. The DFA procedure takes as input a time series (sk , zk ), k = 1, . . . , N , where sk is the instant of time of the k-th measurement (not necessarily equally spaced), and zk is the k-th measurement of some observable. To detect whether the system undergoes a critical transition, the DFA algorithms proceeds as follows: Interpolation: Choose an optimal step size ∆t, and interpolate the given time series such that it is evenly spaced in time. Denote the new series (tk , xk ), with tk = k∆t. Detrending: One way to remove a general trend from statistical data is by subtracting a moving average. For example, using a Gaussian kernel   1 (t − k∆t)2 Gk (t) = √ exp − 2d2 2πd of bandwidth d, one may compute the weighted average of xk , PN Gk (i∆t)xi X(k∆t) = Pi=1 . N i=1 Gk (i∆t) Subtracting the weighted average from the time series yields the detrended series, yk = xk − X(k∆t) . CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 9 Remark 2. Instead of Gaussian kernel detrending, alternative detrending methods can be used, such as linear, cubic spline, or Fourier interpolation, depending on the nature of the data. We also explore these additional methods in Section 5 Lag-1 autocorrelation: The final step involves fitting a first-order autoregressive (AR(1)) process yk+1 = ck yk + σξk , to the detrended time series yk , where (σξk )k∈N is white noise of intensity σ. In order to compute ck , choose a sliding window of size w and determine the least-squares fit yj+1 ≈ ck yj , for j = k, . . . , k + w − 1. Hence, for each window we extract the value of AR(1) ck . Recall that the lag-1 autocorrelation AR(1) is 0 for white noise and close to 1 for red (autocorrelated) noise. 4.1.2. Detection of critical transitions via DFA. The following criterion has been proposed for the detection of critical transition [28]: • Given a time series measured from a system approaching a critical transition, the DFA outputs a time series (tk , yk ) for which (1) the autocorrelation has a general trend which increases towards 1; (2) the variance has a positive trend. In certain special cases, this criterion has a rigorous justification [17, 18]. The DFA method is an effective tool in detecting early signs of critical transitions in noisy data. However, the method comes with several significant drawbacks, such as its sensitivity to the procedures and parameters used in processing the data. For instance, the sample frequency, detrending method (e.g., the bandwidth of the Gaussian detrending), or the size of the sliding window all have a strong effect on the conclusions drawn from the algorithm in subsection 4.1 and hence on the power of the DFA method to serve as a prediction tool. One concern is that the measurement of the AR(1) values as well as the variance are strongly influenced by the fit of the detrending method, with a poor fit being likely to signal ‘false positives’ for critical transitions (see [2]). 4.2. Persistence diagrams. As mentioned in Section 1, we propose to use tools from the field of topological data analysis as a new method to detect critical transitions in dynamical systems. In particular, we leverage the stability properties of persistence diagrams to detect critical transitions. Topological persistence is a relatively recent development that forms the core of topological data analysis and has been widely used to extract relevant information from noisy data (see [8] for background in persistence topology in general). There are numerous applications, including computer vision, cluster analysis, biological networks, cancer survival analysis, and granular material (see [4, 8, 12, 20, 25] and the references listed there). In this section we describe the way in which we adapt this method to observe changes in time series from systems approaching or undergoing critical transitions. The key idea is to extract from the time series consecutive strings of data points of a fixed length, which we regard as individual point cloud data sets. To each such point cloud we assign a topological invariant, namely its persistence diagram. 10 JESSE BERWALD AND MARIAN GIDEA Roughly speaking, the persistence diagram is a representation of the data set in an abstract metric space which encodes information about topological features of the data. The highlight of this method is that when the system undergoes a critical transition, the topological features associated to the point cloud data sets also change significantly. The fact that the corresponding persistence diagrams and distances between them can be computed algorithmically enables us to describe these changes quantitatively. 4.2.1. Description of persistence diagrams. We describe the concept of a persistence diagram associated with point cloud data starting with an informal description. From a high-level perspective, the data analysis pipeline works as follows: Data =⇒ Filtration =⇒ Persistence Module =⇒ Persistence Diagram We focus on the first two and the fourth parts of this pipeline, and only briefly detail the algebraic aspects of the third component below. Suppose that one is provided with a point cloud data set, X0 , that is an approximation of some geometric shape. One would like to infer from the data the topological information on that shape. However, a finite collection of points has only trivial topology. One way to convert the collection of points into a non-trivial topological space is to replace the points of the set by balls of a certain radius . One then computes the topological features of the resulting set, X . Typical invariants resulting from this computation, which serve to classify the set, include the number connected components along with the number of ‘tunnels’ and number of ‘cavities’ (known as Betti numbers). Of course, the topology of X depends on the choice of the radius of the balls in this construction. Instead of fixing a certain radius, topological persistence considers all possible radii, from some sufficiently small value, up to a sufficiently large radius. This growth of the radius yields the filtration step above. As the radius is gradually increased, new topological features will be ‘born’ and certain existing ones will ‘die’. A schematic representation of this process is depicted in Fig. 4. The birth and death of each topological feature at a given dimension is recorded by a persistence diagram. This is a collection (multiset actually) of (birth,death) times in R2 . The 0- and 1dimensional diagrams for the associated filtration are shown in the bottom row of Fig. 4. The lifespan of a feature is easily computed by calculating (death time) - (birth time). A topological feature with a long lifespan, measured by the range of radii over which it ‘persists’, is likely to capture an essential topological feature of the underlying space from which the data was sampled. On the other hand, short lived features are likely to result from ‘noise’ in the data. However, rather than discriminating between what is an essential feature of the topology and what is not, the persistence diagram method provides a summary of topological features that appear and disappear throughout the variation of the radii of the balls, as well as a ranking of the significance of these features, expressed in terms of the lifespans. We now continue with a concise, formal description of persistence diagrams. For an introduction to algebraic topology and homology, see [15]; surveys of persistent topology can be found in [8, 32] Given point cloud data X ⊂ Rd , i.e., a collection of points in Rd , and δ > 0, we associate to them the Rips complex Rδ . This is, by definition, the abstract simplicial complex whose 0-simplices are points xα , and whose k-simplices are given by unordered (k+1)-tuples of points {xαj }j=0,...,k which CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM t=1 t=2 t=3 0 1 2 3 0-dimensional birth 4 0 0 1 1 2 2 3 3 4 death 4 death t=4 0 1 2 3 birth 4 1-dimensional Figure 4. A collection of points in the plane, resembling a ‘noisy’ circle, is given. At each instant of time t = 1, . . . , 4, around each point we constructs disks of radii δ1 /2, . . . , δ4 /2, respectively, with δ1 < δ2 < δ3 < δ4 . The corresponding Rips complexes are also constructed at each instant. The topological features of the Rips complexes change as time increases. At time t = 1 there are 8 connected components and no 1-dimensional hole. At time t = 2 the connected components coalesce into a single component (thus in the 0-dimensional diagram there are actually 7 deaths represented at (1, 2)), and a 1-dimensional hole is born. Both the single connected component and the 1-dimensional hole survive to t = 3. At time t = 4 the 1-dimensional hole dies as it fills in (the death is represented at (2, 4)), while the single connected component continues living (in fact, it has infinite lifespan). The ♦ at (1, 4) represents this fact. 11 12 JESSE BERWALD AND MARIAN GIDEA are pairwise within a distance δ. Figure 4 provides an example for X ⊂ R2 . For all 0 < a < b we have Ra ⊂ Rb . That is, the family {Rδ }δ>0 forms a filtration. Denote by Hp (Ra ) the p-homology of Ra with Z2 coefficients. Heuristically, the homology of a simplicial complex provides information about the topological features of the complex, e.g., the number of connected components, tunnels and cavities in that complex. The inclusion Ra ,→ Rb induces the homomorphisms f∗a,b : H∗ (Ra ) → H∗ (Rb ) in all dimensions. Note that the image F a−ρ,b of f∗a−δ,a in H∗ (Rb ) is independent of ρ for all ρ > 0 sufficiently small. We denote this image by F∗a−,b . A real value c > 0 is called a homological critical value if there exists q such that the homomorphism fqc−ρ,c : Hq (Rc−ρ ) → Hq (Rc ) is not an isomorphism for all sufficiently small ρ > 0. The image Fqc−,c of fqc−ρ,c in Hq (Rc ) is independent of ρ, if this is small enough. The quotient group Bqc = Hq (Rc )/Fqc−,c is called the q-th birth group at Rc , and it captures the homology classes that did not exist in Rc−ρ . A homology class α ∈ Hq (Rc ) is born in Rc if it represents a non-trivial element in Bqc , that is, the canonical projection of α is non-zero. Now consider the homomorphism gqa,b : Bqa → Hq (Rb )/F a−,b , where gqa,b ([α]) = a,b [fq (α)], for α ∈ Hq (Rb ), where the notation [·] stands for equivalence class. We set gqa,b = 0 for all b > 0 sufficiently large. The kernel Dqa,b of the map gqa,b is called the death subgroup of Bqa at Rbq . A homology class α ∈ Hq (Ra ) dies entering Rb if [α] ∈ Dqa,b but [α] 6∈ Dqa,b−ρ , for ρ > 0 sufficiently small. The degree r of the death value b of Bqa is defined by r = rankDqa,b − rankDqa,b− . The sum of the degrees of all death value of the birth group Bqa is clearly equal to rank(Bqa ). The birth time of a homology class α is the value a > 0 where the α is born in Ra , and the death time is the value b > 0 where α dies in Rb . The q-persistence diagram of the filtration (Rδ )δ>0 is defined as a multiset Pq in R2 consisting of points of the type zi = (a, bi ), where a is a birth value corresponding to a non-trivial group Bpa , and bi is a death value of Bpa ; the point zi appears in the diagram with multiplicity equal to the degree ri of the death value bi . Since deaths occur after births, all points (a, bi ) lie above the diagonal set of R2 . By default, the diagonal set of R2 is part of the persistence diagram, representing all trivial homology generators that are born and die at every level. Each point on the diagonal has infinite multiplicity. The axes of the persistence diagram are birth values on the horizontal axis and death values on the vertical axis. Again, see Figure 4 for a schematic representation of the construction of a persistence diagram. It is convenient to define a metric on the space of persistence diagrams. A number of options exist. A fairly standard metric is the p-Wasserstein metric. On the set of the q-persistence diagrams consider the p-Wasserstein metric, 1 ≤ p ≤ ∞, defined by  1/p X dp (Pq1 , Pq2 ) = inf kz − φ(z)kp∞  , φ z∈Pq1 where Pq1 , Pq2 are two q-persistence diagrams, and the sum is taken over all bijections φ : Pq1 → Pq2 . The set of bijections, {φ : Pq1 → Pq2 }, is nonempty owing to the fact that each diagram includes the diagonal set, allowing one to match off-diagonal elements in one diagram with diagonal elements in another when their numbers differ. CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 13 The space of q-persistence diagrams together with the p-Wasserstein metric forms a metric space, which is complete and separable. The Wasserstein distance takes the ‘best’ matching; that is, it minimizes the distance, relative to the Lp norm, that one has to shift generators in Pq1 to match them with those in Pq2 . In probability theory, and in particular cases with continuous or weighted distributions, the Wasserstein metric is sometimes termed the ‘earth mover distance’, which refers to the operation of transforming one distribution into another with the minimal change in mass. In what follows we set p = 2 and drop the reference to p. For details on the Wasserstein metric, see [6]. One of the remarkable properties of persistence diagrams is their stability, meaning that small changes in the initial point cloud data produce persistence diagrams that are close to one another relative to Wasserstein metric. The stability results are very general for the ‘bottleneck distance’, when p = ∞, and more restrictive for the Wasserstein metric with p < ∞. The essence of the stability results, as shown in [3, 6, 9], is that the persistence diagrams depend Lipschitz-continuously on point cloud data. In applications, the stability result ensures the robustness of the data analysis performed via persistence diagrams, which makes them a powerful alternative to statistical methods. This is particularly useful in context of data from stochastic systems, since persistence diagrams turn out to be quite versatile in distinguishing between small but relevant features in a data set and noise. 4.2.2. Detection of critical transitions via persistence diagrams. We now describe how to apply this method to detect critical transitions in time series. Consider a time series (tj , xj ), j = 1, . . . , J, with xj ∈ Rd . (In the case of a time series obtained from the model discussed in Section 3, we will chose d = 1). Assume that the time series (tj , xj ) is obtained as a time discretization of a process (t, xt ) which is Lipschitz continuous. (This is indeed the case when a time series is obtained from a Langevin equation, as in Subsection 3.) To each ti we associate a string of N consecutive data points points from the time series, with N sufficiently large, which we denote ti 7→ Xi = (xi , xi+1 , . . . , xi+N −1 ). (24) We regard each Xi as a point cloud set in Rd . We compute the persistence diagrams P∗ (Xi ) of Xi , in all dimensions, and follow the evolution of the persistence diagrams in time. Diagrams corresponding to nearby times will be close to one another, due to the Lipschitz continuity of the process underlying the time series and to the robustness of persistence diagrams. Within this context, persistence diagrams that are near to each other in time, but relatively far from one another in the Wasserstein metric, indicate a sudden change in the time series. Therefore, we propose the following empirical criterion for detection of critical transitions in slow-fast systems: • Persistence diagrams undergo significant changes, measured using the Wasserstein metric, prior to a critical transition. This criterion follows from the following heuristic argument. If the noise level in the Langevin equation is small, then far from a critical transition the time series follows closely, with high probability, a trajectory of the slow subsystem. A point cloud associated to a data string displays significant topological features similar to those of the slow manifold, plus less significant topological features due to noise. In 14 JESSE BERWALD AND MARIAN GIDEA 0.3 X 0.25 0.2 0.15 0.1 0.05 0 t 0.05 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Figure 5. R-time series for the gene regulatory network model from Section 3 cut off before the critical transition. addition, the corresponding persistence diagrams at nearby times are close to one another relative to the Wasserstein metric. When the system undergoes a critical transition, the time series ceases to follow the slow manifold, as the dynamics enters a transient regime. The topological features associated to the slow manifold are destroyed, and new topological features appear in the point cloud structure. Furthermore, if the system moves to a different stable regime after a finite time, the point cloud will reflect the topological features associated to that regime. Critically, for a point cloud data near a critical transition the corresponding persistence diagrams shift away from those diagrams corresponding to data far from the critical transition. Consequently, successive distances between diagrams in this region exhibit a large jump prior to a critical transition. 5. Results We numerically solve the SDE defined in (21) – (23) using the Euler-Maruyama procedure, with stepsize 0.01 and noise level σ1 = σ2 = 0.02. We fix the rate of change of the parameter S to be ε = 10−4 . As output, we choose the time series given by the R-component; a particular realization of this time series is shown in the righthand panel of Fig. 3. Since the solution values are dense in time, we subsample the time series by taking every 10-th data point. The time series follows a slowly varying attractive equilibrium point, until it reaches a critical transition, at which point it enters an oscillatory mode. To test for early signs of the critical transition, we truncate the time series before it enters the oscillatory regime. This truncated region is shown in Fig. 5. 5.1. DFA analysis. We conduct three experiments to detect critical transitions using the DFA1 methodology on the time series generated by our model. The first experiment uses a Gaussian kernel to detrend the time series; in the second experiment we use a cubic spline interpolation; and in the third experiment, we use Fourier interpolation. For each of the detrended time series we compute AR(1) and the variance for a windowed time series. The results are summarized in Fig. 6. All three experiments show AR(1) increases to 1 as the system approaches the 1The DFA procedure that we use here was implemented in Matlab by Rebecca M. Jones [16] CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 15 transition, while the variance also grows steadily, both behaviors being consistent with a critical transition. 5.2. Persistence diagram analysis. We compute the 0-dimensional persistence diagrams for strings of N data points Xi (see Eq. (24)) as the ti approaches a critical transition, as for the example time series in Fig. 5. We construct Rips complexes, with an initial radius of δ = 10−4 around each data point, and then grow the radii of the balls δ, 2δ, . . . , nδ, where n is chosen large enough so that the final complex in the resulting filtration has a single connected component. From this filtration we compute the 0-persistence diagrams. We choose the size of the data sets N = 300; larger sizes make little difference in the qualitative behavior of the diagrams. The 0-dimensional persistence diagrams are easy to interpret: they track of the births and deaths of connected components in the Rips complex, as the radii of the balls increase. Note that all births occur at the same time, when the radius of balls is zero and we have N disjoint points. After this initial stage, a large number of connected components die as the radii of the balls increase, as connected components merge with one another. Consider Fig. 7, where the persistence diagrams for a data string far from the critical transition (left panel) and a data string close to the critical transition (right panel) are shown. For data far from the critical transition, points cluster near the attractive equilibrium. Thus, when balls are constructed in the Rips filtration around these points, they will quickly yield a robust connected component around the attractive equilibrium , plus a small number of scattered connected components corresponding to points that escape for brief periods time from the equilibrium point due to stochastic effects. The implication is that, in the corresponding persistence diagram, the vertical spread of the death times is relatively small, and consists of a small numbers of points away from the diagonal (accounting for the robust connected component and a few outliers), plus many short-lived points close to the diagonal (accounting for noise). Conversely, when a data string originates from close to a critical transition, the points tend to spread further away from the attractive equilibrium point, due to changes in the potential field. Heuristically, the equilibrium loses its attractiveness. This causes the distribution of the data points from the time series to grow. The implication is that, in the corresponding persistence diagram, the vertical spread of the death times is much larger, with a tendency to form multiple small clusters. The visual inspection of persistence diagrams provides intuition, but is not a precise way to indicate the approach to a critical transition. To quantify the above assessment, we study the behavior of the Wasserstein distances between consecutive diagrams which are summarized in Fig. 8. In the figure, time increases from left to right. The figures in the top row represent persistence diagrams for data sampled far from the critical transition, and those in the middle represent persistence diagrams for data sampled close to the critical transition. The five time frames captured in each column spread over a time interval of size ∆t = 0.5. We then compute the Wasserstein distances between consecutive persistence diagrams. These changes in the persistence diagrams are quantified in the bottom row of Fig. 8. The solid curve, corresponding to data near the critical transition, shows a significant increase in the distances between consecutive diagrams as the point cloud anayzed near the critical transition. The dotted curve, corresponding to distances between diagrams far from the critical transition, shows only small variations in the consecutive distances. 16 JESSE BERWALD AND MARIAN GIDEA Time series and its trend Detrended time series 0.2 Autocorrelation coefficient 0.1 x 10 0.08 4 Variance 4 0.986 3.8 0.984 0.15 0.06 3.6 0.982 0.04 3.4 0.98 0.1 0.02 3.2 0.978 0 3 0.05 0.976 0.02 2.8 0.974 0.04 2.6 0 0.972 0.06 0.05 0.08 0 5000 10000 Time series and its cubic interpolation 0.3 2.4 2.2 0.97 0 5000 10000 Detrended time series using spline method 0.15 0 2000 4000 6000 8000 Autocorrelation coefficient 0.974 0 7 x 10 2000 4000 6000 Variance 8000 2000 4000 6000 Variance 8000 4 0.972 0.25 0.1 6.5 0.97 0.2 0.05 0.968 0.15 0 6 0.966 5.5 0.1 0.05 0.05 0.1 0 0.15 0.964 0.962 5 0.96 4.5 0.958 0.05 0 5000 10000 Time series and its Fourier interpolation 0.3 0.25 0.2 0 5000 10000 Detrended time series using FFT method 0.15 0.956 0 2000 4000 6000 8000 Autocorrelation coefficient 0.975 4 7 0.1 0 x 10 4 6.5 0.97 0.2 0.05 6 0.965 0.15 0 5.5 0.1 0.05 0.96 5 0.05 0.1 0 0.15 0.955 0.05 0 5000 10000 0.2 4.5 0 5000 10000 0.95 0 2000 4000 6000 8000 4 0 2000 4000 Figure 6. DFA analysis of the time series using (top to bottom) Gaussian kernel, cubic spline, and Fourier interpolation detrending. 6000 8000 CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 17 50 20 40 death death 15 30 10 20 5 10 0 0 0 5 10 15 20 0 birth 10 20 30 birth 40 50 Figure 7. The 0-persistence diagram on the left corresponds to a string of data sampled far from the critical transition; the diagram on the right corresponds to a string of data sampled near the critical transition. In each persistence diagram, the dots mark finite deaths times, and the diamond indicates infinite death times. The computed distance are indicated by the symbols on each curve and are placed between the diagrams from which they were computed.2 Note that the variance of the lifespans is related to the variance in the time series. An increase in the vertical spread while approaching a critical transition is consistent with the findings by the DFA method in Subsection 5.1. Also, the change observed in the clustering of the diagram coordinates is related to asymmetric or multimodal properties of the data, as mentioned in Subsection 4.2. 6. Conclusions The substrate-depletion oscillator that we analyze in this paper is a realistic model for certain types of molecular regulation circuits studied experimentally. The methods for detecting critical transitions that we propose are suitable for the analysis of real data as well. Indeed, most of the experimental data obtained about gene regulatory networks (e.g., data obtained from microarrays, or reverse transcriptase polymerase chain reaction) is limited by background noise, and both the DFA and persistence diagram methods are robust to noise in data, as long as the noise does not overwhelm the signal. Also, in comparison with the DFA method, which necessitates a number of ‘ad-hoc’ choices of statistical parameters and procedures, the persistence diagram method appears more robust and objective. In current and future work, we are developing a theoretical framework for the empirical criterion proposed in this paper. Namely, we plan to establish rigorously that bifurcation-induced critical transitions determine large changes in the persistence diagrams, and, conversely, large changes in the persistence diagrams imply the existence of bifurcations. 2For the computation of persistence diagrams we use the Perseus software developed by Vidit Nanda [24]. The Wasserstein distances were computed using software written by Miroslav Kramar [21]. 18 JESSE BERWALD AND MARIAN GIDEA Figure 8. The 0-persistence diagrams on the top row correspond to consecutive strings of data sampled far from the critical transition; the diagrams in the middle row correspond to consecutive strings of data sampled near the critical transition. The bottom curves describe the distances between consecutive diagrams. The plot labels are positioned between two successive diagrams with values on the y-axis indicating the 2-Wasserstein distances between them. Acknowledgement A portion of this work has been done while M.G. was a member of the IAS, to which he is very grateful. Also, we thank Konstantin Mischaikow, Miroslav Kramar, Vidit Nanda, and Rebecca M. Jones for many useful discussions on this subject. References [1] T. Bulter, S.-G. Lee, W.-W. Wong, E. Fung, M.R. Connor, and J.C. Liao, Design of artificial cell-cell communication using gene and metabolic networks, Proc. Natl. Acad. Sci. USA, 101 (2004), 2299–2304. [2] R.M. Bryce and K.B. Sprague, Revisiting detrended fluctuation analysis, Scientific Reports 2, (2012), doi:10.1038/srep00315 [3] F. Chazal, D. Cohen-Steiner, L. J. Guibas, F. Mémoli, S. Oudot, Gromov-Hausdorff Stable Signatures for Shapes using Persistence, Computer Graphics Forum (proc. SGP 2009) (2009), 1393–1403. [4] F. Chazal, L.Guibas, S. Oudot, and P. Skraba, Persistence-Based Clustering in Riemannian Manifolds, Proc. 27th Annual ACM Symposium on Computational Geometry, (2011), 97–106. [5] F. Chazal, V. de Silva, S. Oudot, Persistence stability for geometric complexes, Geometriae Dedicata, (2013), doi: 10.1007/s10711-013-9937-z [6] D. Cohen-Steiner, H. Edelsbrunner, J. Harer, Y. Mileyko. Lipschitz Functions Have Lp -Stable Persistence. Foundations of Computational Mathematics. Vol. 10 (2010), doi: 10.1007/s10208-010-9060-6 CRITICAL TRANSITIONS IN A MODEL OF A GENETIC REGULATORY SYSTEM 19 [7] P.D. Ditlevsen and S.J. Johnsen, Tipping points: Early warning and wishful thinking, Geophysical Research Letters, Vol. 37, L19703 (2010), doi:10.1029/2010GL044486 [8] H. Edelsbrunner and J. Harer, Persistent homology — a survey, in “Surveys on Discrete and Computational Geometry. Twenty Years Later”, 257-282, eds. J. E. Goodman, J. Pach and R. Pollack, Contemporary Mathematics 453, Amer. Math. Soc., Providence, Rhode Island, (2008). [9] H. Edelsbrunner and M. Morozov, Persistent Homology: Theory and Applications, Proceedings of the European Congress of Mathematics, (2012). [10] M. Elowitz and S.Leibler, A Synthetic Oscillatory Network of Transcriptional Regulators, Nature, Vol. 403, (2000), 335–338. [11] N. Fenichel, Geometric singular perturbation theory for ordinary differential equations, Journal of Differential Equations, 31 (1979), 53–98. [12] M. Gameiro, Y. Hiraoka, S. Izumi, M. Kramar, K. Mischaikow, and V. Nanda, A Topological Measurement of Protein Compressibility, preprint, (2013). [13] T.S Gardner, C.R. Cantor, and J.J. Collins, Construction of a genetic toggle switch in Escherichia coli, Nature, Vol. 403 (2000), 339–342. [14] J. Hasty, J. Pradines, M. Dolnik, and J.J. Collins, Noise-based switches and amplifiers for gene expression, PNAS 97 (2000), 2075–2080. [15] A. Hatcher,Algebraic Topology. Cambridge University Press, (2002). [16] R.M. Jones, Matlab code for the DFA procedure, http://criticaltransitions.wikispot.org/ (2013). [17] C. Kuehn, A mathematical framework for critical transitions: Bifurcations, fast-slow systems and stochastic dynamics, Physica D: Nonlinear Phenomena, 240(12) (2011), 1020-1035. [18] C. Kuehn, A Mathematical Framework for Critical Transitions: Normal Forms, Variance and Applications, Journal of Nonlinear Science, DOI 10.1007/s00332-012-9158-x [19] M. Krupa, and P. Szmolyan, Extending geometric singular perturbation theory to nonhyperbolic points -fold and canard points in two dimensions, SIAM J. of Math. Anal. 33 (2001), 286– 314. [20] L. Kondic, A. Goullet, C.S. O’Hern, M. Kramar, K.Mischaikow, R.P. Behringer, Topology of force networks in compressed granular media, Europhys. Lett. 97 (2012), 54001. [21] M. Kramar, C++ code to compute the Wasserstein metric, Personal communication, http://www.math.rutgers.edu/∼miroslav (2013). [22] A. Leier, P.D. Kuo, W. Banzhaf, and K. Burrage, Evolving noisy oscillatory dynamics in genetic regulatory networks, In EuroGP’06 Proceedings of the 9th European conference on Genetic Programming, LNCS 3905 (2006), 290–299. [23] V.N. Livina and T. M. Lenton, A modified method for detecting incipient bifurcations in a dynamical system, Geophys. Res. Lett., 34, (2007), L03712. [24] V. Nanda, The Perseus Software Project for Rapid Computation of Persistent Homology, http://www.math.rutgers.edu/˜vidit/perseus.html [25] M. Nicolau, A.J. Levine, and G. Carlsson, Topology based data analysis identifies a subgroup of breast cancers with a unique mutational profile and excellent survival, PNAS,17 (2011) [26] B. Novak, and J.J. Tyson, Numerical analysis of a comprehensive model of M-phase control in Xenopus oocyte extracts and intact embryos, J. Cell. Sci., 106 (1993), 1153– 1168. [27] A.A. Ptitsyn, S. Zvonic, and J.M. Gimble, Digital Signal Processing Reveals Circadian Baseline Oscillation in Majority of Mammalian Genes, PLoS Comput Biol 3 (2007), e120. [28] M. Scheffer et al., Early-warning signals for critical transitions, Nature, 461 (2009), 53–59. [29] M. Scheffer et al, Anticipating Critical Transitions, Science 338, (2012) 344, DOI: 10.1126/science.1225244 [30] J.M.T. Thompson, and J. Sieber, Climate tipping as a noisy bifurcation: a predictive technique, IMA Journal of Applied Mathematics (2010), 1–20. [31] J.J. Tyson, K.C. Chen, and B. Novak, Sniffers, buzzers, toggles and blinkers: dynamics of regulatory and signaling pathways in the cell, Curr. Opin. Cell. Biol. 15(2), (2003), 221–231. [32] A.J. Zomorodian, Topology for Computing, Cambridge University, (2005) 20 JESSE BERWALD AND MARIAN GIDEA E-mail address: [email protected] E-mail address: [email protected]
5cs.CE
Semi-Automatic Construction of a Domain Ontology for Wind Energy Using Wikipedia Articles Dilek Küçüka,∗, Yusuf Arslanb arXiv:1410.8581v1 [cs.CL] 30 Oct 2014 b a Power Electronics Department, TÜBİTAK Energy Institute, 06531, Ankara, Turkey Department of Computer Engineering, Middle East Technical University, 06531, Ankara, Turkey Abstract Domain ontologies are important information sources for knowledge-based systems. Yet, building domain ontologies from scratch is known to be a very labor-intensive process. In this study, we present our semi-automatic approach to building an ontology for the domain of wind energy which is an important type of renewable energy with a growing share in electricity generation all over the world. Related Wikipedia articles are first processed in an automated manner to determine the basic concepts of the domain together with their properties and next the concepts, properties, and relationships are organized to arrive at the ultimate ontology. We also provide pointers to other engineering ontologies which could be utilized together with the proposed wind energy ontology in addition to its prospective application areas. The current study is significant as, to the best of our knowledge, it proposes the first considerably wide-coverage ontology for the wind energy domain and the ontology is built through a semi-automatic process which makes use of the related Web resources, thereby reducing the overall cost of the ontology building process. Keywords: wind energy, wind power, domain ontology, text mining, Web mining Corresponding author. Tel: +90-312-2101310; fax: +90-312-2101315 Email addresses: [email protected] (Dilek Küçük), [email protected] (Yusuf Arslan) ∗ Preprint submitted to Elsevier November 3, 2014 1. Introduction Renewable energy resources (such as wind, solar, and biomass, among others) have emerged as an important engineering topic mainly due to the profound advantages of the corresponding plants over conventional plants (such as fossil-fuelled and nuclear). Considering wind energy, the primary benefits of the wind energy plants are that (i) energy production does not lead to environmental pollution and (ii) as wind is abundant in many countries, the financial costs of these plants are comparably lower than that of the conventional plants [1]. Compared to the other renewable resources, wind is considerably variable and hence it is hard to determine optimal places for wind power plant installations and to forecast daily energy productions of the plants precisely. The latter point (the uncertainty of the production) results in particular problems during the integration of these plants to the electrical grid as the electricity transmission system operators should be informed of prospective daily productions in advance to make short-term planning and to ensure that the supply matches the demand [1]. Other directions of research on the topic include predictions for the economic viability of wind power plant projects and wind turbine design [2]. As wind energy keeps increasing its share in the electricity generation (and annually growing at a rate of 30% [3]), research projects targeting at these problems have started to increase (such as [4]). In this paper, we target at wind power applications from a knowledge-based perspective and propose a wide-coverage domain ontology for wind energy domain1 . A domain ontology 1 In this study, we utilize the terms wind power and wind energy interchangeably to denote the electrical power generated from wind through the wind turbines installed on the wind power plants (as they are commonly used interchangeably and they denote wind generated power), although the terms power and energy are quite distinct terms in physics. 2 is defined as a reusable vocabulary of concepts, relationships, and activities in the domain along with the governing theories and principles [5]. Various domain ontologies have been reported in the literature [6, 7, 8, 9, 10] and there is ongoing research on the topic along with research on the Semantic Web. Although domain ontologies serve various purposes, building them from scratch is too labor-intensive and time-consuming. Hence, we employ a semi-automatic approach to build our wind energy ontology which comprises two main phases: in the first phase, Wikipedia [11] articles on the topic are processed to learn the concepts from highly frequent words and phrases (n-grams) and in the second phase, these concepts are organized with their properties and relationships to arrive at the ultimate ontology. Yet, the final form of the ontology is open to extensions as well, that is, other concepts and properties covering more details about the domain can be added to the ontology. It can also be integrated with other related engineering ontologies for better coverage of the domain. Ontology-based studies on wind power domain are rather limited. We come across only three studies on the topic, the first of which [12] proposes an ontology on wind power plant information and the resulting ontology comprises some generic concepts which are not specific to wind power domain and moreover it basically aims to cover concepts related to the management of wind power plant information. The second study [13] describes an ontology for wind turbines condition monitoring and is more domain-specific compared to the ontology proposed in [12]. Yet this study [13] also suffers from low coverage, i.e., it only considers the semantics of wind turbines instead of the whole wind power domain. The last related study [14] utilizes an ontology of facts to be utilized by a multi-agent system which aims to control a photovoltaic (PV)-based microgrid. This ontology covers specific 3 facts or concepts related to agent operations which are far from representing the domain of renewable energy or wind energy. Hence, to the best of our knowledge, in the current study, we propose the first large-scale ontology for the wind power domain. Yet, as will be emphasized in Section 3, this ontology can well be integrated with related engineering ontologies and aligned with the aforementioned ontologies including [12, 13]. The rest of the paper is organized as follows: In Section 2, the ontology building process for wind energy domain is presented in details. Section 3 is devoted to prospective integration opportunities with related engineering ontologies and plausible application areas of the proposed ontology. Finally, Section 4 concludes the paper and provides pointers to future work. 2. Building an Ontology for Wind Energy Our semi-automatic ontology construction process for wind energy domain comprises two main phases: • Learning the concepts and properties of these concepts from related Wikipedia articles by extracting the frequent phrases as unigrams, bigrams, and trigrams from the article texts. This phase executes in fully automated mode. • Building the ontology by organizing these components and properties utilizing other written information sources like related international standards and textbooks. We provide the execution flow of the overall approach with more detailed steps in Figure 1. In the figure, the resources (input and output) are shown as rectangular shapes, while the functional steps are presented as round rectangles (fully automated steps are shown with darker color than the manual steps). At the end of this execution flow, we realize the 4 ontology on Protégé [15] which is an ontology editor and a knowledge-base framework. The details of the aforementioned two phases are described in the rest of this section basically following the functional steps in Figure 1. Figure 1: Execution Flow of the Employed Ontology Building Approach. 5 2.1. Learning Ontology Concepts from the Web Ontology learning is defined as the task of automatic or semi-automatic knowledge discovery from different data sources and representation of the ultimate ontology [16]. Within the course of the current study, we consider Wikipedia [11] articles as our data source for learning an ontology for the wind energy domain. Wikipedia is a large and valuable source of semantic information. It has been commonly pointed out in the literature that it can serve various tasks including information extraction, information retrieval, question answering systems, and ontology building [17, 18]. Therefore, we choose the Wikipedia article for the term wind power [19] as our initial point and utilized this article and linked articles as the information source to facilitate the ontology building process for wind energy domain. The approach followed is very much like that of the Web search engines which traverse the links in Web pages in a breadth-first manner, yet, we only consider the articles linked to the initial article (links in the first level), i.e., we do not process the articles linked to the linked articles of the initial article. Table 1: Frequent N-grams in the Initial Wikipedia Article for Wind Power (with Frequencies in Parentheses). Unigrams wind (346) power (149) energy (135) turbine (65) capacity (54) electricity (50) grid (36) Bigrams wind power (82) wind energy (51) wind turbine (45) wind farm (39) renewable energy (22) capacity factor (16) offshore wind (15) Trigrams offshore wind power (8) wind power capacity (4) wind power industry (3) meteorology and climatology (2) wind turbine engineering (2) electric power transmission (2) wind generated power (2) Our overall ontology learning procedure for wind energy domain from Wikipedia articles is carried out as follows: first, the text of the initial Wikipedia article is obtained and stopwords in the text are eliminated. After stopword elimination, named entities (such as 6 person, location, and organization names) as well as numeric expressions are also removed from the text. Next, unigrams, bigrams, and trigrams are obtained with their frequencies from the resulting text. Especially highly frequent phrases are then manually examined to determine whether they are relevant to the target ontology or not. Relevant phrases are utilized as concepts and concept properties of the ontology. The same procedure is employed for the linked Wikipedia articles and again relevant phrases contribute to the ontology. To better illustrate the process, the highly frequent sample phrases in the text of the initial Wikipedia article are provided in Table 1 together with their frequencies in parentheses as sorted by their frequencies. 2.2. Organizing the Ontology Apart from the frequent phrases determined in the steps described in the previous section, we have also examined several related textbooks of the domain [2, 1] and the set of wind turbine standards by International Electrotechnical Commission (IEC) [20] to arrive at a wide-coverage (yet extensible) domain ontology for wind power domain. At this stage, the relevant phrases extracted from the Web are complemented with those extracted from the aforementioned written resources and the resulting information is organized to form the ultimate ontology. The taxonomy of the concepts in the final form of the proposed domain ontology is presented in Figure 2. The ontology is built utilizing Protégé [15, 21] as the ontology editor and the hierarchy of the ontology classes is presented in Figure 3 as snapshots. 7 Wind Power Plant (Wind Farm) is-a has generates causes utilizes measures controls Blade Gearbox Hub Rotor Generator H-axis Turbine Wind Turbine (Wind Turbine Generator) Meteorological Tower Data Logger Humidity Sensor Sensor Pressure Sensor 8 Temperature Wind Profiler Solar Radiation Sensor Solar Radiation DAQ System Monitoring and Control System Forecast System Turbine Status Wind Vane Propeller Anemometer Measured Power Wind Speed LIDAR Sensor Meteorological Data Wind Turbulence Wind Direction RADAR Sensor Power Quality Wind Power (Wind Energy) Sonic Anemometer SODAR Sensor Analysis System Numerical Weather Prediction Physical Model Statistical Model Cup Anemometer Temperature Sensor Control System Anemometer Humidity Pressure V-axis Turbine Tower Nacelle Vertical Wind Component Horizontal Wind Component Wind Shear U-component V-component Figure 2: The Domain Ontology for Wind Energy. Forecast Power Figure 3: The Class Hierarchy of the Wind Energy Ontology on Protégé [15]. At the center of the ontology is the Wind Power Plant class which has the major components represented by the classes of Meteorological Tower, Wind Turbine, Monitoring and Control System, and Forecast System. The Meteorological Tower class in turn comprises Data Logger and Sensor classes, where the latter class has several subclasses, namely, Humidity Sensor, Pressure Sensor, Temperature Sensor, Solar Radiation Sensor, Wind Profiler, Wind Vane, and Anemometer. Among these classes, the latter three of them represent devices for measuring wind properties and are therefore more significant 9 for the overall wind energy ontology. To clarify the corresponding devices, a wind profiler is a device for measuring wind speed and direction, while wind vanes only measure wind direction and anemometers only measure wind speed. Anemometers usually come in three basic types represented in our ontology by the classes of Cup Anemometer, Propeller Anemometer, and Sonic Anemometer. All of the Sensor subclasses in the proposed wind energy ontology represent devices for measuring distinct types of data on meteorological phenomena which are represented by the Meteorological Data class. The Wind class has the components of Wind Speed, Wind Direction, Vertical Wind Component, Horizontal Wind Component (which in turn has U-component and V-component as components), Wind Shear and Turbulence. The names of the first four of these classes are fairly selfexplanatory. Considering the last two classes, wind shear is the change of wind speed as a function of height while turbulence is defined to be the standard deviation of horizontal wind speed, vertical wind speed, and wind direction as 10-min averages [1]. The second significant component of a wind farm is a set of wind turbines (i.e., wind turbine generators) represented with the Wind Turbine class. The turbines usually fall into one of the two types: horizontal axis turbines (modeled with H-axis Turbine) and vertical axis turbines (modeled with V-axis Turbine class). Main components of a generic wind turbine are rotor, nacelle, and tower which are modeled with the corresponding classes of Rotor, Nacelle, and Tower, respectively. The rotor of a wind turbine is usually composed of the blades (modeled by the Blade class) and the rotor hub (represented with the Hub class) which connects the blades to the shaft [1]. Nacelle is the part of the turbine that includes the main parts apart from those included in the rotor system such gearbox, generator, and brake [1] where we only include the Gearbox and the Generator classes in our ontology as 10 parts of the Nacelle class. Depending on the requirements of the application in which the wind energy ontology will be utilized, the parts of the Nacelle class can be extended and more classes to represent these parts can be added to the ontology. The last part of a wind turbine is the structural part represented with the Tower class. Wind turbines generate wind power represented with the Wind Power class in our ontology. The last two parts of a typical wind power plant are the monitoring and control system (modeled with Monitoring and Control System class) and the forecast system (modeled with Forecast System class). The former system has several components including a control system, a data acquisition (DAQ) system, and an analysis system denoted by the classes of Control System, DAQ System, and Analysis System, respectively. This system is used to monitor and measure turbine status information, as well as generated power and electrical power quality, which are represented by Turbine Status, Measured Power, and Power Quality classes, respectively. The power quality is actually another related domain which is not modeled in our ontology in details but as will be emphasized in the following section, an ontology for this domain can be integrated into the current ontology to cover this power quality concept and related concepts adequately. The Forecast System class represents the system which utilizes numerical weather predictions together with previously generated physical and statistical models of the wind power plants to produce forecasts regarding the wind generated power. Hence, related classes with self-explanatory names include Numerical Weather Prediction, Physical Model, Statistical Model, and finally Forecast Power. Although some forecast systems may also output forecasts for wind speed and direction, we do not consider that case here as the ultimate aim of the system is usually power forecast. 11 Wind Power Plant, which is the central class of our wind energy ontology, has the synonymous names of Wind Farm, Wind Plant, and Wind Energy Plant. It is also commonly abbreviated as WPP. As other concepts of the domain also have several synonyms, we have added a synonymSet property for applicable concepts to hold the synonyms of the actual class names corresponding to these concepts. Abbreviations are also treated as synonyms and this property is used to hold abbreviations as well. We provide synonyms of some of the concepts of the ontology in Table 2 for illustrative purposes. As shown in the table, WPP is added as a synonym of the Wind Power Plant class. Similarly, WTG is the abbreviation for Wind Turbine Generator which in turn is a synonym of the Wind Turbine class, hence WTG is also added to the synonym set of this class. Table 2: Synonyms of Some of the Concepts in the Wind Energy Ontology. Ontology Class Wind Power Plant Wind Power Wind Turbine Wind Vane Synonyms WPP, Wind Plant, Wind Energy Plant, Wind Farm Wind Power Generation, Energy, Generation, Wind Energy, Wind Generation, Wind Generated Power, Electricity Production Turbine, Wind Turbine Generator, WTG, Generator Weather Vane, Weather Cock As we have previously pointed out, properties and relations are also specified within the ultimate wind energy ontology. While properties are mostly obtained from the extracted keywords from Wikipedia articles (where the procedure is outlined in the previous subsection), relations are manually formed considering the interrelations between the semantic concepts (corresponding to the classes in Figure 2). Plausible properties of some of the classes are provided in Table 3 for illustrative purposes. It should be noted that properties may also have some synonymous names. For instance, installed capacity property of Wind Power Plant class has rated capacity, nominal capacity, maximum effect, power capacity, 12 nameplate capacity, and wind power capacity as its synonyms. Similarly, utilisation rate is a synonym for the capacity factor property of the same class2 . Therefore such information is also modeled in the ontology through the synonymSet property of the applicable concept properties. Among the properties of Wind Power Plant class in Table 3, voltage level corresponds to that level through which the plant is integrated to the electrical grid and the names of the remaining ones are fairly self-explanatory. The properties of Wind Turbine mostly model the technical characteristics of the turbines while the properties of the Wind Speed class aim to cover the actual speed, the height at which the speed is measured or forecasted, the date of measurement or forecast, and the plant where the speed is measured or forecasted. Table 3: Properties of Some of the Concepts of the Wind Energy Ontology. Ontology Class Wind Power Plant Wind Turbine Wind Speed Properties name, owner, location, license date, number of turbines, installed capacity, capacity factor, voltage level model, hub height, swept area, rated power, power curve, cut-in wind speed, cut-out wind speed, rotor diameter, number of blades speed, height, date, wind power plant Considering the relations among the concepts in the ontology, there are basically seven distinct relation types which are outlined below: • is-a: This type denotes the subclass-class relation between the corresponding concepts in the ontology. For instance, is-a relation exists between the Anemometer and Sensor classes to specify that an anemometer is a kind of sensor. 2 Installed capacity of a power plant is defined as the “intended technical fullload sustained output” [19] of the corresponding plant while capacity factor is usually defined as the ratio of generated power to the installed capacity. 13 • has: This relation corresponds to the part-of information between concepts. It exists between the Wind Power Plant and Wind Turbine classes as wind power plants have a number of turbines. • generates: This relation type and the remaining types denote functional relations with quite self-explanatory names. Hence, we only provide examples from the ontology in Figure 2 to illustrate the relations, hence, this generates relation can be observed between Wind Turbine and Wind Power classes of the ontology. • causes: This type of relation is illustrated between Wind and Wind Power classes as depicted in Figure 2. • utilizes: This relation exists between the classes of Wind Turbine and Wind as wind turbines utilize wind to generate wind power. • measures: This relation type can be observed between the Anemometer and Wind Speed classes in the ontology. • controls: This relation exists between Control System and Wind Power Plant classes in the wind energy ontology. It should be noted that we do not claim to cover all meteorological phenomena and other wind related concepts in our ontology and as it will be clarified in the upcoming section, relevant ontologies on the topic can be integrated into the wind power ontology to increase its coverage. The final form of the proposed ontology is made available for research purposes at http://www.ceng.metu.edu.tr/~e120329/wont.owl as a Web Ontology Language (OWL) file. 14 3. Prospective Integration with Related Ontologies and Application Areas The proposed wind energy ontology has some concepts, particularly Power Quality and Meteorological Data, corresponding to distinct but related domains which may be represented in a more detailed manner. But, instead of extending the proposed wind energy ontology with the concepts for these domains from scratch, ontologies for these two domains can be integrated into the wind energy ontology. For the domain of meteorological data, the ontology covered in [22], which is an ontology for atmospheric science, can be integrated into the wind energy ontology. For the domain of electrical power quality, PQONT domain ontology [9] has been proposed and it can readily be integrated into the wind power ontology as it is publicly available as an OWL file. Another plausible option is to extend the proposed ontology to make it a larger renewable energy ontology, considering the semantics of other renewable energy types like solar and biomass. With this prospective extension and aforementioned integration opportunities with the related domain ontologies, the wind energy ontology can be turned into a wider coverage ontology and hence can serve a wider range of applications. There are several significant application areas of domain ontologies. Basically, they are known to be of particular importance for semantic information extraction, information retrieval, and question answering systems, among others. Below, we outline the plausible application areas in which the wind energy ontology that we have proposed can be employed: • The ontology could act as a shared vocabulary of concepts to ensure the interoperability of the various wind energy applications like monitoring and forecast systems. The proposed ontology could also aid in reducing the software analysis and design 15 costs during the development of the aforementioned systems as it acts as a viable source of semantic information for the underlying domain of wind energy. • The ontology can be integrated into a domain-specific information extraction system to automatically extract significant pieces of information on wind energy and related topics from free natural language texts. Utilizing such an information extraction system, the proposed ontology could be populated with relevant instances. Similar to the previous point, the ontology could be employed as part of an information retrieval system to determine the index terms to be used during retrieval or as part of a question answering system to determine relevant answers from relevant documents for the specified questions. A text categorization system can also benefit from the proposed ontology to detect documents related to wind energy (or, renewable energy) in a large set of text documents. The ontology could also be employed in a natural language interface over the populated ontology where queries in natural language can be transformed into valid ontology queries making use of the concept names, properties, and their synonyms to pinpoint the queried information. This final application is exemplified in [9] where a natural language interface, based on the PQONT domain ontology for electrical power quality, is described where the interface basically utilizes the ontology to determine the concepts specified in the natural language query expressions.. 4. Conclusion There is a growing interest in wind energy which is a significant type of renewable energy with a growing share in the electricity production all over the world. Accord- 16 ingly, research on topics related to wind energy, including monitoring and forecast of wind power, has gained considerable attention. In this study, we deal with the wind energy domain from a knowledge-based perspective and propose the first considerably wide-coverage domain ontology for wind energy. The ontology building process is a learning-based semiautomated procedure where in the first phase plausible keywords to be utilized during the determination of the concepts and their properties are learned from the Web. Namely, related Wikipedia articles are processed to determine the relevant keywords and next related textbooks and international standards are examined to organize these keywords to arrive at the ultimate ontology. Hence, we decrease the ontology building costs considerably by employing a learning procedure and utilizing Web as a source of semantic information. It should be noted that the proposed ontology can be extended or customized to better satisfy the needs of prospective applications in which the ontology will be employed. The final form of the proposed ontology is also made publicly available for research purposes. Plausible directions of future research include the integration of the ontology with related engineering ontologies such as those for atmospheric science and electrical power quality. It can also be extended into a more comprehensive renewable energy ontology. Moreover, the ontology can be employed in knowledge-based systems such as information extractors, information retrieval, question answering, and text categorization systems in addition to natural language interfaces, to assess its practical contribution to such systems. References [1] P. Jain, Wind Energy Engineering, 1st Edition, McGraw-Hill, 2011. 17 [2] T. Burton, D. Sharpe, N. Jenkins, E. Bossanyi, Wind Energy Handbook, 1st Edition, John Wiley & Sons, 2001. [3] Renewable energy - Wikipedia, http://en.wikipedia.org/wiki/Renewable_energy. [4] Wind Power Monitoring and Forecast System (RİTM), http://www.ritm.gov.tr/en/root/index.php. [5] A. Gómez-Pérez, M. Fernández-López, O. Corcho, Ontological Engineering, 3rd Edition, Springer-Verlag, 2004. [6] R. Stevens, C. Goble, I. Horrocks, S. Bechhofer, Building a bioinformatics ontology using OIL, IEEE Transactions on Information Technology in Biomedicine 6 (2) (2002) 135–141. [7] D. Gasević, V. Devedzić, Petri net ontology, Knowledge-Based Systems 19 (4) (2006) 220–234. [8] J. Morbach, A. Yang, W. Marquardt, Ontocape-a large-scale ontology for chemical process engineering, Engineering Applications of Artificial Intelligence 20 (2) (2007) 147–161. [9] D. Küçük, O. Salor, T. İnan, I. Çadırcı, M. Ermiş, PQONT: A domain ontology for electrical power quality, Advanced Engineering Informatics 24 (2010) 84–95. [10] C. Zhang, C. Cao, Y. Sui, X. Wu, A chinese time ontology for the Semantic Web, Knowledge-Based Systems 24 (7) (2011) 1057–1074. [11] Wiki - Wikipedia, http://en.wikipedia.org/wiki/Wiki. 18 [12] Y. Zhu, X. Wang, D. Cheng, Ontology-based research on wind power plant information interaction, in: Proceedings of the Workshop on Knowledge Discovery and Data Mining, 2008. [13] P. Papadopoulos, L. Cipcigan, Wind turbines’ condition monitoring: an ontology model, in: Proceedings of the International Conference on Sustainable Power Generation and Supply, 2009. [14] M. Pipattanasomporn, H. Feroze, S. Rahman, Securing critical loads in a pv-based microgrid with a multi-agent system, Renewable Energy 39 (1) (2012) 166–174. [15] The Protégé Ontology Editor and Knowledge Acquisition System, http://protege.stanford.edu. [16] L. Drumond, R. Girardi, A survey of ontology learning procedures, in: Proceedings of the 3rd Workshop on Ontologies and Their Applications, 2008. [17] O. Medelyan, D. Milne, C. Legg, I. H. Witten, Mining meaning from Wikipedia, International Journal of Human-Computer Studies 67 (9) (2009) 716–754. [18] S. Ferrández, A. Toral, O. Ferrández, A. Ferrández, R. Munoz, Exploiting Wikipedia and EuroWordNet to solve cross-lingual question answering, Information Sciences 179 (20) (2009) 3473–3488. [19] Wind power - Wikipedia, http://en.wikipedia.org/wiki/Wind_power. [20] IEC 61400 - Wikipedia, http://en.wikipedia.org/wiki/IEC_61400. [21] N. F. Noy, M. Sintek, S. Decler, M. Crubezy, R. W. Fergerson, M. A. Musen, Creating 19 Semantic Web contents with Protege-2000, IEEE Intelligent Systems 16 (2) (2001) 60–71. [22] R. Ramachandran, S. Movva, S. Graves, S. Tanner, Ontology-based semantic search tool for atmospheric science, in: Proceedings of the 22nd International Conference on Interactive Information Processing Systems for Meteorology, Oceanography, and Hydrology, 2006. 20
5cs.CE
Publications of the Astronomical Society of Australia (PASA) c Astronomical Society of Australia 2015; published by Cambridge University Press. doi: 10.1017/pas.2015.xxx. arXiv:1501.05992v1 [astro-ph.IM] 24 Jan 2015 The Murchison Widefield Array Correlator S. M. Ord4,20 , B. Crosse4 , D. Emrich4 , D. Pallot4 , R. B. Wayth4,20 , M. A. Clark23,5,22 , S. E. Tremblay4,20 , W. Arcus4 , D. Barnes25 , M. Bell14 , G. Bernardi21,24,5 , N. D. R. Bhat,4 , J. D. Bowman1 , F. Briggs2 , J. D. Bunton3 , R. J. Cappallo6 , B. E. Corey6 , A. A. Deshpande9 , L. deSouza3,14 , A. Ewell-Wice7 , L. Feng7 , R. Goeke7 , L. J. Greenhill5 , B. J. Hazelton16 , D. Herne4 , J. N. Hewitt7 , L. Hindson19 , H. Hurley-Walker4 , D. Jacobs1 , M. Johnston-Hollitt19 , D. L. Kaplan18 , J. C. Kasper13,5 , B. B. Kincaid6 , R. Koenig3 , E. Kratzenberg6 , N. Kudryavtseva4 , E. Lenc,14,20 C. J. Lonsdale6 , M. J. Lynch4 , B. McKinley2 , S. R. McWhirter6 , D. A. Mitchell3,20 , M. F. Morales16 , E. Morgan7 , D. Oberoi11 , A. Offringa,2,20 , J. Pathikulangara3 , B. Pindor12 , T. Prabu9 , P. Procopio12 , R. A. Remillard7 , J. Riding12 , A. E. E. Rogers6 , A. Roshi8 , J. E. Salah6 , R. J. Sault12 , N. Udaya Shankar9 , K. S. Srivani9 , J. Stevens3 , R. Subrahmanyan9,20 , S. J. Tingay4,20 , M. Waterson4,2 , R. L. Webster12,20 , A. R. Whitney6 , A. Williams4 , C. L. Williams7 , J. S. B. Wyithe12,20 1 Arizona State University, Tempe, USA The Australian National University, Canberra, Australia 3 CSIRO Astronomy and Space Science, Australia 4 International Centre for Radio Astronomy Research (ICRAR), Curtin University, Perth, Australia 5 Harvard-Smithsonian Center for Astrophysics, Cambridge, USA 6 MIT Haystack Observatory, Westford, MA, USA 7 MIT Kavli Institute for Astrophysics and Space Research, Cambridge, USA 8 National Radio Astronomy Observatory, Charlottesville, USA 9 Raman Research Institute, Bangalore, India 10 Swinburne University of Technology, Melbourne, Australia 11 National Center for Radio Astrophysics, Pune, India 12 The University of Melbourne, Melbourne, Australia 13 University of Michigan, Ann Arbor, USA 14 University of Sydney, Sydney, Australia 15 University of Tasmania, Hobart, Australia 16 University of Washington, Seattle, USA 17 University of Western Australia, Perth, Australia 18 University of Wisconsin–Milwaukee, Milwaukee, USA 19 Victoria University of Wellington, New Zealand 20 ARC Centre of Excellence for All-sky Astrophysics (CAASTRO) 21 Square Kilometre Array South Africa (SKA SA), Cape Town, South Africa 22 California Institute of Technology, California, USA 23 NVIDIA, Santa Clara, California, USA 24 Department of Physics and Electronics, Rhodes University, Grahamstown, South Africa 25 Monash University, Melbourne, Australia 2 Abstract The Murchison Widefield Array (MWA) is a Square Kilometre Array (SKA) Precursor. The telescope is located at the Murchison Radio–astronomy Observatory (MRO) in Western Australia (WA). The MWA consists of 4096 dipoles arranged into 128 dual polarisation aperture arrays forming a connected element interferometer that cross-correlates signals from all 256 inputs. A hybrid approach to the correlation task is employed, with some processing stages being performed by bespoke hardware, based on Field Programmable Gate Arrays (FPGAs), and others by Graphics Processing Units (GPUs) housed in general purpose rack mounted servers. The correlation capability required is approximately 8 TFLOPS (Tera FLoating point Operations Per Second). The MWA has commenced operations and the correlator is generating 8.3 TB/day of correlation products, that are subsequently transferred 700 km from the MRO to Perth (WA) in real-time for storage and offline processing. In this paper we outline the1correlator design, signal path, and processing elements and present the data format for the internal and external interfaces. Keywords: instrumentation: interferometers, techniques: interferometric 2 1 Introduction The MWA is a 128 element dual polarisation interferometer, each element is a 4x4 array of analog beam formed dipole antennas. The antennas of each array are arranged in a regular grid approximately 1m apart, and these small aperture arrays are known as tiles. The science goals that have driven the MWA design and development process are discussed in the instrument description papers(Tingay et al. 2013a; Lonsdale et al. 2009), and the MWA science paper (Bowman et al. 2013). These are (1) the detection of redshifted 21cm neutral hydrogen from the Epoch of Re-ionization (EoR); (2) Galactic and extra-Galactic surveys; (3) time-domain astrophysics; (4) solar, heliospheric and ionospheric science and space weather. 1.1 Specific MWA Correlator Requirements The requirements and science goals have driven the MWA into a compact configuration of 128 dualpolarisation tiles. 50 tiles are concentrated in the 100m diameter core, with 62 tiles distributed within 750-m and the remaining 16 distributed up to 1.5-km from the core. The combination of the low operating frequency of the MWA and its compact configuration allow the correlator to be greatly reduced in complexity, however this trade-off does drive the correlator specifications. Traditional correlators are required to compensate for the changing geometry of the array with respect to the source in order to permit coherent integration of the correlated products. In the case of the MWA, no such corrections are performed. This drives the temporal resolution specifications of the correlator and forces the products to be rapidly generated in order to maintain coherence. Tingay et al. (2013a) list the system parameters and these include a temporal resolution of 0.5 s. The temporal decoherence introduced by integrating for 0.5 s without correcting for the changing array geometry; and the requirement to image a large fraction of the primary beam, drive the system channel resolution specification to 10 kHz. It should be noted that this does not drive correlator complexity as it is total processed bandwidth that is the performance driver, not the number of channels. Albeit the number of output channels does drive the data storage and archiving specifications. The MWA correlator is required to process the full bandwidth as presented by the current MWA digital receivers, which is 30.72 MHz per polarisation. In summary, in order to meet the MWA science requirements, the correlator is required to correlate 128 dual polarisation inputs, each input is 3072x10kHz in bandwidth. The correlator must present products, integrated for no more than 0.5 seconds at this native channel resolution, to the data archive for storage. PASA (2015) doi:10.1017/pas.2015.xxx Ord et al. 1.2 Benefits of Software Correlator Implementations The correlation task has previously been addressed by Application Specific Integrated Circuits (ASICs) and Field Programmable Gate Arrays (FPGAs). However the current generation of low frequency arrays including the MWA (Wayth et al. 2009), LOFAR (van Haarlem et al. 2013), PAPER (Parsons et al. 2010) and LEDA (Kocz et al. 2014) have chosen to utilise, to varying degrees, general purpose computing assets to perform this operation. The MWA leverages two technologies to perform the correlation task, a Fourier transformation performed by a purpose built FPGA-based solution, and a cross-multiply and accumulate task (XMAC) utilising the xGPU library1 described by Clark et al. (2012), also used by the PAPER telescope and the LEDA project. The MWA system was deployed over 2012/13 as described by Tingay et al. (2013a), and is now operational. The MWA is unique amongst the recent low frequency imaging dipole arrays, in that it was not designed to utilise a software correlator at the outset. The flexibility provided by the application of general purpose, GPU based, software solution has allowed a correlator to be rapidly developed and fielded. This was required in-order to respond to a changed funding environment, which resulted in a significant design evolution from that initially proposed by Lonsdale et al. (2009) to that described by Tingay et al. (2013a). Expeditious correlation development and deployment was possible because General Purpose GPU (GPGPU) computing provides a compute capability, comparable to that available from the largest FPGAs, in a form that is much more accessible to software developers. It is true that GPU solutions are more power intensive than FPGA or ASIC solutions, but their compute capability is already packaged in a form factor that is readily available and the development cycle is identical to other software projects. Furthermore the GPU processor lifecycle is very fast and it is also generally very simple to benefit from architecture improvements. For example, the GPU kernel used as the cross-multiply engine in the MWA correlator will run on any GPU released after 2010. We could directly swap out the GPU in the current MWA cluster, replace them with cards from the Kepler series (K20X), and realise a factor of 2.5 increase in performance (and a threefold improvement in power efficiency). The organisation of this paper begins with a short introduction to the correlation problem, followed by an outline of the MWA correlator design and then a description of the sub-elements of the correlator following the signal path; we finally discuss the relevance of this correlator design to the Square Kilometre Array and 1 xGPU available correlators/xGPU at: https://github.com/GPU- The MWA Correlator 3 there are several Appendices describing the various internal and external interfaces. 2 The Correlation Problem A traditional telescope has a filled aperture, where a surface or a lens is used to focus incoming radiation to a focal point. In contrast, in an interferometric array like the MWA the purpose of a correlator is to measure the level of signal correlation between all antenna pairs at different frequencies across the observing band. These products can then be added coherently, and phased, or focussed, to obtain a measurement of the sky brightness distribution in any direction The result of the correlation operation is commonly called a visibility and is a representation of the measured signal power (brightness) from the sky on angular scales commensurate with the distance between the constituent pair of antennas. Visibilities generated between antennas that are relatively far apart measure power on smaller angular scales and vice versa. When all visibilities are calculated from all pairs of antennas in the array many spatial scales are sampled (see Thompson et al. (2001) for an extensive review of interferometry and synthesis imaging). When formed as a function of observing frequency (ν), this visibility set forms the cross-power spectrum. For any two voltage time-series from any two antennas V1 and V2 this product can be formed in two ways. First the cross correlation as a function of lag, τ , can be found, typically by using a delay line and multipliers to form the lag correlation between the time-series. Z ∞ (V1 ? V2 )(τ ) = V1 (t)V2 (t − τ )dt. (1) −∞ The cross power spectrum, S(ν), is then obtained by application of a Fourier transform: Z ∞ S12 (ν) = (V1 ? V2 )(τ )e−2πiντ dτ. (2) −∞ When the tasks required to form the cross power spectrum are performed in this order (lag cross-correlation, followed by Fourier transform) the combined operation is considered an XF correlator. However the cross correlation analogue of the convolution theorem allows Equation 2 to be written as the product of the Fourier transform of the voltage time series from each antenna: Z ∞ Z ∞ S12 (ν) = V1 (t)e−2πiνt dt × V2 (t)e−2πiνt dt. −∞ −∞ (3) Implemented as described by Equation 3 the operation is an FX correlator. For large-N telescopes the FX correlator has a large computational advantage. In an XF correlator for an array of N inputs the cross correlation for all baselines requires O(N 2 ) operations for every lag, and there is a one to one correspondence between lags PASA (2015) doi:10.1017/pas.2015.xxx and output channels, F, resulting in O(F N 2 ) operations to generate the full set of lags. The Fourier transform requires a further O(F log2 F ) operations, but this can be performed after averaging the lag spectrum and is therefore inconsequential. For the FX correlator we require O(N F log2 F ) operations for the Fourier transform of all input data streams, but only O(N 2 ) operations per sample for the cross multiply (although we have F channels the sample rate is now lower by the same factor). Therefore as long as N is greater than log2 F there is a computational advantage in implementing an FX correlator. XF correlators have been historically favoured by the astronomy community, at least in real-time applications, as until very recently N has been small, and there are disadvantages to the FX implementation. The predominant disadvantage is data growth: the precision of the output from the Fourier transform is generally larger than the input, resulting in a data rate increase. There is also the complexity of implementing the Fourier transform in real-time. 3 The MWA Correlator System The tasks detailed in this section cover the full signal path after digitisation, including fine channelisation, data distribution, correlation and output. In the MWA correlator the F stage is performed by a dedicated channeliser, subsets of frequency channels from all antennas are then distributed to a cluster of processing nodes via an ethernet switch. The correlation products are then assembled and distributed to an archiving system. An outline of the system as a whole is shown in Figures 1 and 2. As shown in Figure 3 the correlator is conceptually composed of 4 sub-packages, the Polyphase Filterbank (PFB), that performs the fine channelisation, the Voltage Capture System (VCS), responsible for converting the data transport protocol into ethernet and distributing the data, the correlator itself (XMAC), and the output buffering that provides the final interface to the archive. Figure 2 presents the physical layout of the system. 3.1 The System Level View The computer system consists of 40 servers, grouped into different tasks and connected by a 10GbE data network and several 1GbE monitoring, command and control networks. The correlator computer system has been designed for ease of maintenance and reliability. All of the servers are configured as thin-clients and have no physical hard-disk storage that is utilised for any critical functions - any hard-disk is used for noncritical storage and could be removed (or fail) without limiting correlator operation. All of the servers receive their Operating System through a process known as the 4 Ord et al. REC 1 VCS 1 V REC 2 32 MWA ANTENNAS VCS 2 V PFB 1 REC 3 VCS 3 V VCS 4 V REC 4 4 BLOCKS (2 NOT SHOWN) SWITCH REC 13 VCS 13 V REC 14 32 MWA ANTENNAS VCS 14 V PFB 4 REC 15 VCS 15 V REC 16 128 Antennas 16 digital g receivers (Digitisation and first g stage Fourier transform) XMAC PRO PROCESSING AND A R ARCHIVING 10 GbE Switch for cross connect 24 Servers Final corner turn bit promotion p GPU-based XMAC Local and Remote Archiving VCS 16 V FPGA Polyphase yp p Filter Banks (Second stage Fourier transform) 16 Servers Rocket-IO to 10 GbE Protocol Conversion + Demultiplex Figure 2. The full physical layout of the MWA digital signal processing path. The initial digitalisation and coarse channelisation is performed in the field. The fine channelisation, data distribution and correlation is performed in the computer facility at the Murchison Radio Observatory, the data products are finally archived at the Pawsey Centre in Perth. PXE (Pre-eXecution Environment) boot process, and import all of their software over NFS (Network File System) and mount it locally in memory. The servers are grouped by task into the VCS (voltage capture system) machines that house the FPGA capture card and the servers that actually perform the cross-multiplyaccumulate (XMAC) and output the visibility sets for archiving. Any machine can be replaced without any more effort than is required to physically connect the server box and update an entry in the IP address mapping tables. 3.2 The MWA Data Receivers: Input to the Correlator As described in Prabu et al. (2014) there are 16 digital receivers deployed across the MWA site. Power and fiPASA (2015) doi:10.1017/pas.2015.xxx bre is reticulated to them as described by Tingay et al. (2013a). The individual tiles are connected via coaxial cable to the receivers, the receivers are connected via fibre runs of varying lengths to the central processing building of the MRO, where the rest of the signal processing is located. 3.2.1 The Polyphase Filterbank Polyphase Filter Banks (PFBs) are commonly used in digital signal communications as a realisation of a Discrete Fourier Transform (DFT; see Crochiere & Rabiner (1983) for a detailed explanation). It specifically refers to the formation of a DFT via a method of decimating input samples into a polyphase filter structure and forming the DFT via the application of a Fast Fourier Transform to the output of the polyphase filter (Bunton 2003). The MWA Correlator 5 Figure 3. The decomposition of the MWA Correlator system demonstrating the relationship between the major sub-elements. Figure 1. The MWA signal processing path, following the MWA data receivers, in the form of a flow diagram. As described by Prabu et al. (2014) the first or coarse PFB is as an 8 tap, 512 point, critically sampled, polyphase filter bank. This is implemented as; an input filtering stage realised by 8x512 point Kaiser windowing function, the output of which is subsampled into a PASA (2015) doi:10.1017/pas.2015.xxx 512 point FFT. This process transforms the 327.68 MHz input bandwidth into 256, 1.28 MHz wide, subbands. The second stage of the F is performed by four dedicated FPGA based polyphase filter bank boards housed in two ATCA (Advanced Telecommunications Computing Architecture) racks, which implement a 12 tap, 128 point filter response weighted DFT. Because the first stage is critically sampled the fine channels that are formed at the boundary of the coarse channels are corrupted by aliasing. These channels are processed by the pipeline, but removed during post-processing, the fraction of the band excised due to aliasing is approximately 12%. The second stage is also critically sampled so there is a similar degree of aliasing present in each 10kHz wide channel. The aliased signal correlates, and the phase of the correlation does not change significantly across the narrow channel, any further loss in sensitivity is negligible. Development of the PFB boards was initially funded through the University of Sydney and the firmware initially developed by CSIRO. The boards were designed to form part of the original MWA correlator which would share technology with the Square Kilometre Array Molongolo Prototype (SKAMP) (de Souza et al. 2007). Subsequent modifications to the firmware were undertaken at MIT-Haystack and the final boards, with firmware specific to the MWA, were first deployed as part of the 32-tile MWA prototype. 3.2.2 Input Format, Skew and Packet Alignment The PFB board input data format is the Xilinx serial protocol RocketIO, although there have been some customisations at a low level, made within the RocketIO CUSTOM scheme. The data can be read by any multigigabit-transceiver (MGT) that can use this protocol, 6 which in practice is restricted to the Xilinx FPGA (Vertex 5 and newer). The packet format as presented to the PFB board for the second stage channeliser is detailed in Prabu et al. (2014). A single PFB board processes 12 fibres that have come from 4 different receivers. The receivers are distributed over the 3 km diameter site and there exists the possibility of there being considerable difference in packet arrival time between inputs that are connected to different receivers. The PFB boards have an input buffer that is used to align all receiver inputs on packet number 0 (which is the 1 second tick marker see Appendix A). The buffer is of limited length (±8 time-samples, corresponding to several hundred metres of fibre) and if the relative delay between input lines from nearby and distant receivers is greater than this buffer length, the time delay between receivers will be undetermined. We have consolidated the receivers into 4 groups with comparable distances to the central processing building and constrained these groups to have fibre runs of 1380, 925, 515, and 270 metres. Each of the 4 groups is allocated to a single PFB (see Figure 2). This has resulted in more fibre being deployed than was strictly necessary, but has guaranteed that all inputs to a PFB board will arrive within a packet-time. The limited buffer space available can therefore be utilised to deal with variable delays induced by environmental factors and will guarantee that all PFB inputs will be aligned when presented to the correlator. This packet alignment aligns all inputs onto the same 1 second mark but does not compensate for the outward clock signal delay, which traverses the same cable length, and produces a large cable delay between the receiver groups, commensurate with the differing fibre lengths. The largest cable length difference is 1110 metres, being the difference in length between the shortest and longest fibres and is removed during calibration. 3.2.3 PFB Output Format As the MWA PFB boards were originally purposed as the hardware F-stage of an FPGA based FX correlator, the output of the PFB was never intended to be processed independently. The output format is also the Xilinx serial protocol RocketIO, and the PFB presents eight output data lanes on two CX4 connectors. These connectors generally house four-lane XAUI as used by Inifiniband and 10Gb Ethernet, but these are simply used as a physical layer. In actuality all of the pins on the CX4 connectors are driven as transmitters, as opposed to receive and transmit pairs, therefore only half of the available pins in the CX4 connectors were being used. We were subsequently able to change the PFB firmware to force all output data onto connector pins that are traditionally transmit pins, and leave what would normally be considered the receive pins unused. We then custom designed breakout cables that split the PASA (2015) doi:10.1017/pas.2015.xxx Ord et al. CX4 into 4 single lane SFP connectors (see Appendix A). 3.3 The Voltage Capture System In order to capture data generated by the PFBs with off-the-shelf hardware, the custom built SFP connectors were then plugged into an off-the-shelf Xilinx based RocketIO capture cards that are housed within linux servers. Each card can capture 2 lanes from the PFB cards, therefore 4 cards were required per PFB, and 16 cards required in total. A set of 16 machines are dedicated to this voltage capture system (VCS), these are 16 CISCO UCS C240 M3 servers. They each house two Intel Xeon E5-2650 processors, 128 GB of RAM, and 2x1TB RAID5 disk arrays. These machines also mount the Xilinx-based FPGA board, supplied by Engineering Design Team Incorporated (EDT) that is used to capture the output from the PFB. All of the initial buffering and packet synchronisation is performed within these machines. 3.3.1 Raw Packet Capture The data capture and distribution is enabled by a succession of software packages outlined in Figure 4. First, the EDT supplied capture card transfers a raw packet stream from device memory to CPU host memory. The transfer is mediated by the device driver and immediately copied to a larger shared memory buffer. At this stage the data are checked for integrity and aligned on packet boundaries to ensure efficient routing without extensive re-examination of the packet contents. Each of the 16 MWA receivers in the field obtain time synchronisation via a distributed 1 pulse per second (PPS) that is placed into the data stream in the “second tick” field as described in Appendix A. We maintain synchronisation with this “tick” and ensure all subsequent processing within the correlator labels the UTC second correctly. As each machine operates independently the success or failure of this synchronisation method can only be detected when packets from all the servers arrive for correlation, at which point the system is automatically resynchronised if an error is detected. No unsynchronised data are correlated. 3.3.2 The Demultiplex Data distribution in a connected element interferometer is governed by two considerations; all the inputs for the same frequency channels for each time step must be presented to the correlator; and the correlator must be able to keep up with the data rate. As there are four PFB boards (see Figure 2), each processing one quarter of the array, each output packet contains the antenna inputs to that PFB, for a subset of the channels for a single time step. Individual data streams from each antenna in time order need to be The MWA Correlator 7 Figure 4. The decomposition of the Voltage Capture System. The diagram shows the individual elements that comprise the VCS on a single host. There are 16 VCS hosts operating independently (but synchronously) within the correlator system as a whole. cross-connected to satisfy the requirement that a single time step for all antennas is presented simultaneously for cross correlation. To achieve this we utilise the fact that each PFB packet is uniquely identified by the contents of its header (see Appendix A). We route each packet (actually each block of 2000 packets) to an endpoint based upon the contents of this header, each VCS server sends 128 contiguous, 10kHz channels to the same physical endpoint, from all of the antennas in its allocation. This results in the same 128 frequency channels, from all antennas in the array, arriving at the same physical endpoint. This is repeated for 24 different endpoints – each receiving a different 128 channels. These endpoints are the next group of servers, the cross multiply and accumulate (XMAC) machines. This cross-connect is facilitated by a 10 Gb ethernet switch. In actuality this permits the channels to be aggregated on any number of XMAC servers. We use 24 as it suits the frequency topology of the MWA. Regardless of topology some level of distribution is required to reduce the load on an individual XMAC server in a flexible manner, as compute limitations govern how many frequency channels can be simultaneously processed in the XMAC stage. Clark et al. (2012) demonstrates that the XMAC engine performance is limited to processing approximately 4096 channels per NVIDIA Fermi GPU at the 32 antenna level and 1024 channels at the 128 antenna level. This is well within the MWA computational limitations as we are required to process 3072 channels, and have up to 48 GPU available. However, the benefit of packet switching correlators in general is clear: if performance were an issue we could simply add more GPU onto the switch to reduce the load per GPU without adding complexity. Conversely, as GPU perforPASA (2015) doi:10.1017/pas.2015.xxx mance improves we can reduce the number of servers and still perform the same task. Each of the VCS servers is required to maintain 48 concurrent TCP/IP connections, two to each endpoint, because each VCS server captures two lanes from a PFB board . This amounts to 48 open sockets that are being written to sequentially. As there are many more connections than available CPU cores individual threads, tasked to manage each connection, the operation is subject to the linux thread scheduler, which attempts to distribute CPU resources in a round robin manner. Each thread on each transmit line utilises a small ring buffer to allow continuous operation despite the inevitable device contention on the single 10 Gb ethernet line. Any such contention causes the threads without access to the interface to block. This time spent in this wait condition allows the scheduler to redistribute resources. We also employ some context-based thread waiting on the receiving side of the sockets to help the scheduler in its decision making and to even the load across the data capture threads. We have found that this scheme results in a thread scheduling pattern that is remarkably fair and equitable in the allocation of CPU resources and provided that a reasonably-sized ring buffer is maintained for each data line, all the data are transmitted without loss. 3.3.3 VCS Data Output To summarise, we are switching packets as they are received and they are routed based upon the contents of their header. Therefore any VCS server can process any PFB lane output. Each server holds a single PCIbased capture card, and captures two PFB data lanes. The data from each lane is grouped in time contiguous 8 blocks of 2000 packets (50 milliseconds worth of samples for 16 adjacent 10 kHz frequency channels), from all 32 of the antennas connected to that PFB. The packet header provides sufficient information to uniquely identify the PFB, channel group, and time block it is, and the packet block is routed on that basis. Further information is given in Appendix B. A static routing table is used to ensure that each XMAC server receives a contiguous block of frequency channels, the precise number of which is flexible and determined by the routing table, but it is not alterable at runtime. 2 3.3.4 Monitoring, Command, Control and the Watchdog Monitor and control functionality within the correlator is mediated by a watchdog process that runs independently on each server. The watchdog launches each process, monitors activity, and checks error conditions. It can restart the system if synchronisation is lost and mediates all start/stop/idle functionality as dictated by the observing schedule. All interprocess command and control, for example propagation of HALT instructions to child processes and time synchronisation information, is maintained in a small block of shared memory that holds a set of key-value pairs in plain text that can be interrogated or set by third-party tools to control the data capture and check status. 3.3.5 Voltage Recording The VCS system also has the capability to record the complete output of the PFB to local disk. The properties and capabilities of the VCS system will be detailed in a companion paper (Tremblay et al. 2014). 3.4 The Cross-Multiply and Accumulate (XMAC) The GPU application for performing the cross-multiply and accumulate is running on 24 NVIDIA M2070 Fermi GPU housed in 24 IBM iDataplex servers. These machines are housed in racks adjacent to the VCS servers and connected via a 10Gb ethernet network. The package diagram detailing this aspect of the correlator is presented in Figure 5 and the packet interface and data format is described in Appendix C. The cross-multiply servers receive data from the 32 open sockets and internally align and unpack the data into a form suitable for the GPU. The GPU kernel is launched to process the data allocation and internally integrates over a user defined length of time. There are other operations possible, such as incoherent beam forming and the raw dump of data products (or input voltages). These modes will 2 In order to achieve optimal loop unrolling and compile-time evaluation of conditional statements, xGPU requires that the number of channels, number of stations, and minimum integration time are compile-time parameters. PASA (2015) doi:10.1017/pas.2015.xxx Ord et al. be expanded upon during the development of other processing pipelines and will be detailed in companion papers when the modes are available to the community. 3.4.1 Input Data Reception, and Management A hierarchical ring buffer arrangement is employed to manage the data flow. Each TCP connection is managed by a thread that receives a 2000 packet block and places it in a shared memory buffer. Exactly where in a shared memory block each of the 2000 packets is placed is a function of the time/frequency/antenna block that it represents. A small corner-turn, or transpose, is required as the PFB mixes the order of time and frequency. The final step in this process is the promotion of the sample from 4 to 8 bits, which is required to enable a machine instruction that performs rapid promotion from 8 to 32 bits within the GPU. This promotion is not performed if the data are just being output to local disk after reordering. Each of the 32 threads is filling a shared memory block that represents 1 second of GPU input data, and a management thread is periodically checking this block to determine whether it is full. Safeguards are in place that prevent a thread getting ahead of its colleagues or overwriting a block. The threads wait on a condition variable when they have finished their allocation, so if a data line is not getting sufficient CPU resources it will soon be the only thread not waiting and is guaranteed to complete. This mechanism helps the Linux thread scheduler to divide the resources equitably. The use of TCP allows the receiver to actually prioritise which threads on the send side of the connection are blocked to facilitate an even distribution of CPU resources. Once the management thread judges the GPU input block to be full, it releases it, launches the GPU kernel and frees all the waiting threads to fill the next buffer while the GPU is running. 3.4.2 xGPU - Correlation on a GPU It is possible to address the resources of a GPU in a number of ways, utilising different application programming interfaces (API), such as OpenCL, CUDA, and openGL. The MWA correlator uses the xGPU library as is described in detail in Clark et al. (2012). The xGPU library is a CUDA application which is specific to GPUs built by the NVIDIA corporation. There are many references in the literature to the CUDA programming model and examples of its use (Sanders & Kandrot 2010). The performance improvement seen when porting an application to a GPU is in general due to the large aggregate FLOPS and memory bandwidth rates, but to realise this performance requires effective use of the large number of concurrent threads of execution that can be supported by the architecture. This massively parallel architecture is permitted by the large number of The MWA Correlator 9 Figure 5. The decomposition of the cross-multiply and accumulate operation running on each of 24, GPU enabled IBM iDataplex servers. processing cores on modern GPUs. The TESLA M2070 are examples of NVIDIA Fermi architecture and have 448 cores, grouped into 14 streaming multiprocessors or SM, each with 32 cores. The allocation of resources follows the following model: threads are grouped into a thread block and a thread block is assigned to an SM; there can be more thread blocks than SM, but only one block will be executing at a time on any SM; the threads within each block are then divided into groups of 32, (one for each core of the associated SM), and this subdivision called a warp; execution is serialised within a warp with the same instruction being performed by all 32 threads, but on different data elements in the single instruction multiple data paradigm. GPGPU application performance is often limited by memory access bandwidth. A good predictor of algorithm performance is therefore arithmetic intensity, or the number of floating point operations per byte transferred. A complex multiply and add for two dual polarisation antennas at 32 bit precision requires 32 bytes of input, 32 FLOPS (16 multiply-adds), and 64 bytes of output. The arithmetic intensity of this is 32/96=0.33. Compare this to the Fermi C2070 architecture which has a peak single-precision performance of 1030 GFLOPS and memory bandwidth of 144 GB/s; the ratio of which (7.2) tells us that the performance of the algorithm will be completely dominated by memPASA (2015) doi:10.1017/pas.2015.xxx ory traffic. The high performance kernel developed by Clark et al. (2011) increases the arithmetic intensity in two ways. Firstly the output memory traffic can be reduced by integrating the products for a time, I, at the register level. Secondly, instead of considering a single baseline, groups of (m × n) baselines denoted tiles (see Figure 6), are constructed cooperatively by a block of threads. In order to fill an m × n region of the final correlation matrix, only two vectors of antennas need be transferred from host memory. A thread block loads two vectors of antenna samples (of length n and m) and forms nm baselines. These two steps then alter the arithmetic intensity calculation to Arithmetic Intensity = 32mnI 16(m + n)I + 64mn (4) (5) which implies that the arithmetic intensity can be made arbitrarily large by increasing the tile size until the number of available registers is exhausted. In practice a balance must be struck between the available resources and the arithmetic intensity and this balance is achieved in the xGPU implementation by multi-level tiling and we direct the reader to Clark et al. (2012) for a complete discussion. 10 Ord et al. Each tile is mapped to a block of threads Tx The correlation matrix is broken into tiles, each tile consists of many baselines Ty Rx Each thread is allocated a a sub-tile of baselines Ry Figure 6. The arithmetic intensity of the correlation operation on the GPU is increased by tiling the correlation matrix. Threads are assigned groups of baselines instead of a single baseline. The MWA correlator is not a delay tracking correlator. Therefore, we do not have to adjust the correlator inputs for whole, or partial sample delays. The correlator always provides correlation output products phased to zenith. The system parameters (integration time, baseline length, channel width) have all been chosen with this in mind and the long operating wavelengths result in the system showing only minimal ( 1%) decorrelation even far from zenith for typical baseline lengths, integration times and channel widths (see Figure 7). Typical observing resolutions have been between 0.5 and 2 seconds in time and 40 kHz and 10 kHz in frequency. 3.4.3 Output Data Format The correlation products are accumulated on the GPU device and then copied asynchronously back to host memory. The length of accumulation is chosen by the operator. Each accumulation block is topped with a FITS header (Wells et al. 1981) and transferred to an archiving system where the products are concatenated into larger FITS files with multiple extensions, wherein each integration is a FITS extension (see Appendix D). The archiving system is an instantiation of the Next Generation Archiving System (NGAS) (Wicenec & Knudstrup 2007; Wu et al. 2013) and was originally developed to store data from the European Southern Observatory (ESO) telescopes. The heart of the system is a database that links the output products with the meta-data describing the observation and that manages the safe transportation and archiving of data. In the MWA operating paradigm all visibilities are stored, which at the native resolution is 33024 visibilities and 3072 channels or approximately 800 MBytes per time resolution unit (more than 6 Gb/s for 1 second integraPASA (2015) doi:10.1017/pas.2015.xxx tions). Due to the short baselines and long wavelengths used by the array it is reasonable to integrate by a factor of two in each dimension (of time and frequency, see Figure 7 for the parameter space), but even this reduced rate amounts to 17 TBytes/day at 100% duty cycle. The large data volume precludes handling by humans and the archiving scheme is entirely automated. NGAS provides tools to access the data remotely and provides the link between the data products to the observatory SQL database. As discussed in Tingay et al. (2013a), the data are taken at the Murchison Radio Observatory in remote Western Australia and transferred to the Pawsey HPC Centre for SKA Science in Perth, where 15 PB of storage is allocated to the MWA over its five-year lifetime. Subsequently the archive database is mirrored by the NGAS system to other locations around the world: MIT in the USA; The Victoria University of Wellington, NZ; and the Raman Research Institute in India. These remote users are then able to access their data locally. 4 Instrument Verification and Commissioning After initial instrument commissioning with simple test vectors and noise inputs the telescope entered a commissioning phase in September 2012. The commissioning team initially consisted of 19 scientists from 10 institutions across 3 countries and was led by Curtin University. This commissioning phase was successfully concluded in July 2013 giving way to “Early Operations” and the MWA is now fully operational. 4.1 Verification The development of the MWA correlator proceeded separately to the rest of the MWA systems and the correlator GPU based elements were verified against other software correlator tools. The MWA correlator is comparatively simple, it does not track delays, performs the correlation at 32-bit floating point precision, and does not have to perform any Fourier transformations. The only verification that was required was to ensure that the cross multiply and accumulate was performed to sufficient precision and matched results generated by a simple CPU implementation. Subsequent to ensuring that the actual cross multiply and accumulate operation was being performed correctly the subsequent testing and integration was concerned with ensuring that the signal and path was maintained. This was a relatively complex operation due to the requirement that the correlator interface with legacy hardware systems. The details of these interfaces are presented in the Appendices. In Figure 8 a correlation matrix is shown, the colours representing the length of the baseline associated with that antenna pair. The The MWA Correlator 11 Figure 7. The combined reduction in coherence due to time and bandwidth smearing 45 degrees from zenith on a 1km baseline, at an observing frequency of 200MHz as a function of channel width and integration time, demonstrating that even this far from zenith the decorrelation PASA (2015) is generally less the 1%. The longest MWA baselines are 3km, and these baselines show closer to 5% decorrelation for the same observing parameters. Decorrelation factors above 1% are not plotted for clarity. doi:10.1017/pas.2015.xxx 12 Ord et al. Figure 8. A correlation matrix showing the baseline length distribution. The antennas are grouped into receivers, each servicing 16 antennas and the antenna layout displays a pronounced centrally dense core. The layout is detailed in Tingay et al. (2013a). The colours indicate baseline length and the core regions are also indicated by arrows within the figure. following Figure 9 shows the response of the baselines when the telescope is pointed at the radio galaxy Centaurus A, demonstrating the response of the different baseline lengths of the interferometer to structure in the source. Images of this object obtained with the MWA can be found in McKinley et al. 2013. The arrows on Figure 8 indicate those baselines associated with the densely-packed core (Tingay et al. 2013a). Figure 9. Visibility amplitude vs baseline length for a 2 minute snapshot pointing at the giant radio galaxy Centaurus A. Centre frequency 120 MHz. Only 1 polarisation is shown for clarity. The source has structure on a wide range of scales and does not dominate the visibilities as a point source. 4.2 Verification Experiments The MWA Array and correlator is also the verification platform for the Aperture Array Verification System (AAVS) within the SKA reconstruction activities pursued by the Low Frequency Aperture Array (LFAA) consortium(bij de Vaate et al. 2011). This group have recently performed a successful verification experiment, using both the MWA and the AAVS telescopes. Using an interferometric observation of the radio galaxy Hydra A taken with the MWA system, they have obtained a measurement of antenna sensitivity (A/T) and compared this with a full-wave electromagnetic simulation (FEKO3 ). The measurements and simulation show good agreement at all frequencies within the MWA observing band and are presented in detail in Colegate et al. (2014). 3 www.feko.info PASA (2015) doi:10.1017/pas.2015.xxx 4.3 Commissioning Science In order to verify the instrumental performance of the array, correlator and archive as a whole, the MWA Science Commissioning Team have performed a 4300 deg2 survey, and have published a catalogue of flux densities and spectral indices from 14,121 compact sources. The survey covered approximately 21 h < Right Ascension < 8 h, -55◦ < Declination < -10◦ over three frequency bands centred on 119, 150 and 180 MHz. This survey will be detailed in Hurley-Walker et al. (2014). Data taken during and shortly after the commisioning phase of the instrument has also been used to demonstrate the tracking of space debris with the MWA (Tingay et al. 2013b), novel imaging and deconvolution schemes (Offringa et al. 2014), and to present multi-frequency observations of the Fornax radio galaxy (McKinley et al. 2013) and the galaxy cluster A3667 (Hindson et al. 2014). The MWA Correlator 5 The Future of the Correlator 5.1 Upgrade Path We do not fully utilise the GPU in the MWA correlator and we estimate that the X-Stage of the correlator could currently support a factor of 2 increase in array size (to 256 dual polarisation elements). As discussed in Tingay et al. (2013a) the operational life-span of the MWA is intended to be approximately five years. The GPUs (NVIDIA M2070s) the MWA correlator are from the Fermi family of NVIDIA GPU and are already almost obsolete. One huge advantage of off-the-shelf signal processing solutions is that we can easily benefit from improvements in technology. We could swap out the GPU in the current MWA cluster, replace them with cards from the Kepler series (K20X) with no code alteration, and would benefit from a factor of 2.5 increase in performance (and a threefold improvement in power efficiency) as not only are the number of FLOPS provided by the GPUs increasing, but also their efficiency (in FLOPS/Watt) is improving rapidly. This would permit the MWA to be scaled to 512 elements. However, not all of our problem is with the correlation step and increasing the array to 512 elements would probably require an upgrade to the networking capability of the correlator. 5.2 SKA Activities The MRO is the proposed site of the low-frequency portion of the Square Kilometre Array. Curtin University is a recipient of grants from the Australian government to support the design and pre-construction effort associated with the construction and verification of the Low-Frequency Aperture Array (LFAA) and software correlation systems for the SKA project. The MWA correlator will therefore be used as a verification platform within the prototype for the LFAA, known as the Aperture Array Verification System (AAVS). One of the benefits of a software based signal processing system is flexibility. We have been able to easily incorporate AAVS antennas into the MWA processing chain to facilitate these verification activities, which have been of benefit to both LFAA and the MWA (Colegate et al. 2014). Furthermore we will be developing and deploying SKA software correlator technologies throughout the pre-construction phase of the SKA using the MWA correlator for both testing and verification. 13 eration radio telescope. We have outlined the various stages in the correlator signal path and detailed the form of all internal and external interfaces. 7 Acknowledgements We acknowledge the Wajarri Yamatji people as the traditional owners of the Observatory site. Initial correlator development was enabled by equipment supplied by an IBM Shared University Research Grant (VUW & Curtin University), and by an Internal Research and Development Grant from the Smithsonian Astrophysical Observatory. Support for the MWA comes from the U.S. National Science Foundation (grants AST CAREER-0847753, AST-0457585, AST-0908884 and PHY-0835713), the Australian Research Council (LIEF grants LE0775621 and LE0882938), the U.S. Air Force Office of Scientific Research (grant FA9550-0510247), the Centre for All-sky Astrophysics (an Australian Research Council Centre of Excellence funded by grant CE110001020), New Zealand Ministry of Economic Development (grant MED-E1799), an IBM Shared University Research Grant (via VUW & Curtin), the Smithsonian Astrophysical Observatory, the MIT School of Science, the Raman Research Institute, the Australian National University, the Victoria University of Wellington, the Australian Federal government via the National Collaborative Research Infrastructure Strategy, Education Investment Fund and the Australia India Strategic Research Fund and Astronomy Australia Limited, under contract to Curtin University, the iVEC Petabyte Data Store, the Initiative in Innovative Computing and NVIDIA sponsored CUDA Center for Excellence at Harvard, and the International Centre for Radio Astronomy Research, a Joint Venture of Curtin University and The University of Western Australia, funded by the Western Australian State government. A MWA F-Stage (PFB) to Voltage Capture System (VCS) The contents of this Appendix are extended from the original MWA ICD for the polyphase filterbank written by R. Cappallo. We have incorporated the changes made to the physical mappings, electrical connections and header contents to enable capture of the PFB output by general purpose computers. 6 Summary This paper outlines the structure, interfaces, operations and data formats of the MWA Hybrid FPGA/GPU correlator. This system combines off-the-shelf computer hardware with bespoke digital electronics to provide a flexible and extensible correlator solution for a next genPASA (2015) doi:10.1017/pas.2015.xxx A.1 Physical • PFB presents data on two CX-4 connectors. ALL pins are wired with transmit drivers, there are no receivers on any pins 14 Ord et al. A.2 Interface Details • Two custom made CX4 to SFP breakout cables. This cable breaks a CX4 connector into 4 1X transmit and receive pairs on individual SFP terminated cables. • Data flows only in a single direction (simplex) from PFB to CB. Each (normally Tx/Rx) pair of differential pairs is wired as two one-way data paths (Tx /Tx). We have distributed these one-way data paths to occupy every other CX-4 pin. Therefore all cables are wired correctly as Tx/Rx but the Rx channels are not utilised. • The serial protocol to be used a custom protocol as described below. The interface to the Xilinx Rocket I/O MGTs is GT11 CUSTOM, which is a lean protocol. The word width will be 16 bits. • The mean data rate per 1X cable will be 2.01216 Gb/s, carried on a high speed serial channel of burst rate of 2.08 Gb/s formatted, or 2.6 Gb/s including the 10B/8B encoding overhead. A.3 Data Format • Each data stream carries all of the antenna information for 384 fine frequency channels. In the entire 32T correlation system there are 8 such data streams going from the PFB to the CB, each carrying the channels making up a 3.84 MHz segment of the processed spectrum. • Each sample in the stream is an 8-bit (4R+4I) complex number, 2s complement with 8 denoting invalid data, representing the voltage in a 10 kHz fine frequency channel. • Data are packetised and put in a strictly defined sequence, in f1t[f2a] (frequency-time-frequency-antenna) order. The most rapidly varying index, a, is the antenna number (0, 16, 32, 48, 1, 17, 33, 49, 2,18, , 15, 31, 47, 63), followed by f2, the fine frequency channel (n..n+3), then time (0..499), and most slowly the fine frequency channel group index (0, 4, 8, 12, 128, 132, 136, 140, ,, 2944, 2948, 2952, 2956 for fibre 0; increment by 16n for fibre n). The brackets indicate the portion of the stream that is contained within a single packet. The antenna ordering is non intuitive as for historical reasons each PFB combines its inputs into an order originally considered conducive to its interface to a full mesh backplane and a hardware FPGA based correlator. • A single packet consists of all antenna data for a group of four fine channels for a single time point. Thus there are 500 sequential time packets for each of the 96 frequency channel groups. Over the interval of 50 ms there are 48,000 (=96channel groups x 500 time samples) packets sent per data stream, so there are 960,000 packets/second. • Using a packet size of 264 bytes allows a 16-bit packet header (0x0800), two 16-bit words carrying the second of time tick and packet counter, 256 bytes of antenna data, finally followed by a 16-bit checksum (see Table 1). PASA (2015) doi:10.1017/pas.2015.xxx • The header word is a 16-bit field with value 0x0800, used to denote the first word in a packet. Note that it cannot be confused with the data words, since the value 8 is not a legal voltage sample code. • The second tick in word two is in bit 0, and has the value 0 at all times, except for the first packet of a new second, when it is 1. • The leading bits of word two, and all of word three contains the following counter values that can be decoded to determine the precise input and channel that a given packet belongs to. – sec tick (1 bit): Is this the first packet for this data lane, for this one second of data? 0=No, 1=Yes. Only found on the very first packet of that second. If set, then the mgt bank, mgt channel, mgt group and mgt frame will always be 0. The preceding 3 bits are unused. – pfb id (2 bits): Which physical PFB board generated this stream [0-3]. This defines the set of receivers and tiles the data refers to. A lane’s pfb id will remain constant unless physically shifted to a different PFB via a cable swap. – mgt id (3 bits): Which 1/8 of coarse channels this Rocket–IO lane contains. Should be masked with 0x7, not 0xf. Contains [0-7] inclusive. A lane’s mgt id will remain constant unless physically shifted to a different port on the PFB via a cable swap. Within an individual data lane, the data packets cycle in the following order, listed from slowest to fastest. – mgt bank (5 bits): Which one of the twenty 50ms time banks in the current second is this one? [0-19] [0-0x13]. – mgt channel (5 bits): Which coarse channel [0-23] [0-0x17] does the packet relate to? – mgt group (2 bits): Which 40KHz wide packet of the contiguous 160KHz does this packet contain the 4 x 10KHz samples for? [0-3] – mgt frame (5 bits): Which time stamp within a 50ms block this packet is. [0-499] or [0-0x1F3]. Cycles fastest. Loops back to 0 after 0x1F3. There are 20 complete cycles in a second. • The last word of the packet is a 16-bit checksum, formed by taking the bitwise XOR of all 128 (16-bit) words of antenna samples in the packet. B VCS to XMAC Server B.1 Physical • Data presented on either fibre optic or direct attach copper cables terminated with SFP pluggable transceivers. Note that all optical transceivers used in the CISCO UCS servers must be supplied by CISCO, the firmware within the 10Gb ethernet cards requires it. • A single 10GbE interface is sufficient to handle the data rate The MWA Correlator B.2 Interface Details • Ethernet IEEE 802.3 frames, with TCP/IPv4 • The packet format is precisely as described in the PFB to VCS interface • The communication is from the VCS to the XMAC is uni-directional and mediated by a switch. • Each XMAC requires a data packet from all VCS machines. This requires 32 open connections mediated by TCP • Data from all sources is stripped of header information and assembled into a common 1 second buffer which requires 20 blocks of 2000 packets from each of the 32 connections to be assembled. • As the packets for four PFB are being combined the antenna ordering is also being concatenated. The order within each packet is maintained with the 64 inputs concatenated into a final block of 256 inputs. C XMAC to GPU Interface 15 Therefore the correlation products cannot be simply processed without a remapping. The remapping is performed by a utility that has been supplied by the builders to the data analysis teams that simply reorders the data products into one that would be expected if no PFB reordering had taken place. It is important to keep track of which products have been generated but the XMAC as conjugates of the desired products, and which need conjugating. It should further be noted that this correction is performed to the order as presented to the PFB and may not the order as expected by the ordering of the receiver inputs. Care should be taken in mapping antennas on the ground as the order of the receiver processing within a PFB is not only function of the physical wiring but the firmware mapping. We have carefully determined this mapping and the antenna mapping tables are held within the same database as the observing metadata. For historical reasons the files are transferred into an intermediate file format that was originally used during instrument commissioning before subsequent transformation to UVFITS files (or measurement sets) by the research teams. C.1 Physical The interface is internal to the CPU host, being a section of memory shared between the GPU device driver and the host. D XMAC Server to NGAS (Next Generation Archiving System) D.1 Physical C.2 Interface details C.2.1 GPU Input The data ordering in the assembly buffer for input buffers, running from slowest to fastest index is time(t), channel(f), station(s), polarisation(p), complexity(i). The data is an 8 bit integer, promoted from 4-bit twos-complement sample via a lookup table. The correlator is a dual polarisation correlator as implemented, but the input station/polarisation ordering is not in a convenient order as we have concatenated 4 PFB outputs during the assembly of this buffer. Two options presented themselves. One that we re-order the input stations and polarisation to undo the partial corner turn. The disadvantage begin that each input packet would need to be broken open and the stations reordered - which would have been extremely compute intensive. Or to correlate without changing the order and remapping the output products to the desired order. This is preferable as although there are now N2 products instead of N stations, the products are integrated in time and can be reordered in post-processing. C.2.2 GPU Output The data are formated as 32-bit complex floating point numbers. An individual visibility set has the order (from slowest index to fastest index): channel(f), station(s1), station(s2), polarisation(p1), polarisation(p2), complexity(i). The full cross-correaltion matrix is Hermitian so only the lower, or upper, triangular elements need to be calculated, along with the on-diagonal elements which are the autocorrelation products. Therefore only a packed triangular matrix is actually transferred from the GPU to the host. The GPU processing kernel is agnostic to the ordering of the antenna inputs and the PFB output order is maintained. PASA (2015) doi:10.1017/pas.2015.xxx The interface is internal to the CPU host, being a section of memory shared between the XMAC application and an NGAS application running on the same host. D.2 Interface details The data are handed over as a packed triangular matrix with the same ordering as was produced by the GPU. It has a FITS header added and is padded to the correct size as expected by a FITS extension. The FITS header includes a time-tag. Once the buffer is presented to the NGAS system it is buffered locally and presented to a central archive server, subsequently it is added to a database and mirrored to multiple sites across the world. REFERENCES bij de Vaate, J. G., de Lera Acedo, E., Virone, G., Jiwani, A., Razavi, N., Perini, F., Zarb-Adami, K., Monari, J., Padhi, S., Addamo, G., Peverini, O., Montebugnoli, S., Gunst, A., Hall, P., Faulkner, A., & van Ardenne, A. 2011, General Assembly and Scientific Symposium, 2011 XXXth URSI, 1 Bowman, J. D., Cairns, I., Kaplan, D. L., Murphy, T., Oberoi, D., Staveley-Smith, L., Arcus, W., Barnes, D. G., Bernardi, G., Briggs, F. H., Brown, S., Bunton, J. D., Burgasser, A. J., Cappallo, R. J., Chatterjee, S., Corey, B. E., Coster, A., Deshpande, A., Desouza, L., Emrich, D., Erickson, P., Goeke, R. F., Gaensler, B. M., Greenhill, L., Harvey-Smith, L., Hazelton, B. J., Herne, D. E., Hewitt, J. N., Johnston-Hollitt, M., Kasper, J. C., Kincaid, B. B., Koeing, R., Kratzenberg, E., Lonsdale, C. J., Lynch, 16 M. J., Matthews, L. D., McWhirter, S. R., Mitchell, D., Morales, M. F., Morgan, E. H., Ord, S. M., Pathikulangara, J., Prabu, T., Remillard, R. A., Robishaw, T., Rogers, A. E. E., Roshi, A. A., Salah, J. E., Sault, R. J., Shankar, N. U., Srivani, K. S., Stevens, J. B., Subrahmanyan, R., Tingay, S. J., Wayth, R. B., Waterson, M., Webster, R. L., Whitney, A. R., Williams, A. J., Williams, C. L., & Wyithe, J. S. B. 2013, Publications of the Astronomical Society of Australia, 30, 31 Bunton, J. D. 2003, ALMA Memo Series, 1 Clark, M. A., La Plante, P. C., & Greenhill, L. J. 2012, International Journal of High Performance Computing Applications, 27(2), 178 Colegate, T. M., Sutinjo, A. T., Hall, P. J., Padhi, S. K., Wayth, R. B., de Vaate, J. G. B., Crosse, B. W., Emrich, D., Faulkner, A. J., Hurley-Walker, N., de Lera Acedo, E., Juswardy, B., Razavi-Ghods, N., Tingay, S. J., & Williams, A. J. 2014, in Antenna Measurements & Applications (CAMA), 2014 IEEE Conference on (IEEE), 1–4 Crochiere, R. E. & Rabiner, L. R. 1983, Multirate Digital Signal Processing (Prentice-Hall Processing Series), 1st edn. (Prentice-Hall) de Souza, L., Bunton, J. D., Campbell-Wilson, D., Cappallo, R. J., & Kincaid, B. 2007, in FPL, ed. K. Bertels, W. A. Najjar, A. J. van Genderen, & S. Vassiliadis (IEEE), 62– 67 Hindson, L., Johnston-Hollitt, M., Hurley-Walker, N., Buckley, K., Morgan, J., Carretti, E., Dwarakanath, K. S., Bell, M., Bernardi, G., Bhat, N. D. R., Bowman, J. D., Briggs, F., Cappallo, R. J., Corey, B. E., Deshpande, A. A., Emrich, D., Ewall-Wice, A., Feng, L., Gaensler, B. M., Goeke, R., Greenhill, L. J., Hazelton, B. J., Jacobs, D., Kaplan, D. L., Kasper, J. C., Kratzenberg, E., Kudryavtseva, N., Lenc, E., Lonsdale, C. J., Lynch, M. J., McWhirter, S. R., McKinley, B., Mitchell, D. A., Morales, M. F., Morgan, E., Oberoi, D., Ord, S. M., Pindor, B., Prabu, T., Procopio, P., Offringa, A. R., Riding, J., Rogers, A. E. E., Roshi, A., Udaya Shankar, N., Srivani, K. S., Subrahmanyan, R., Tingay, S. J., Waterson, M., Wayth, R. B., Webster, R. L., Whitney, A. R., Williams, A., & Williams, C. L. 2014, ArXiv e-prints Hurley-Walker, N. 2014, submitted for publication. Kocz, J., Greenhill, L. J., Barsdell, B. R., Bernardi, G., Jameson, A., Clark, M. A., Craig, J., Price, D., Taylor, G. B., Schinzel, F., & Werthimer, D. 2014, Journal of Astronomical Instrumentation, 3, 50002 Lonsdale, C. J., Cappallo, R. J., Morales, M. F., Briggs, F. H., Benkevitch, L., Bowman, J. D., Bunton, J. D., Burns, S., Corey, B. E., Desouza, L., Doeleman, S. S., Derome, M., Deshpande, A., Gopala, M. R., Greenhill, L. J., Herne, D. E., Hewitt, J. N., Kamini, P. A., Kasper, J. C., Kincaid, B. B., Kocz, J., Kowald, E., Kratzenberg, E., Kumar, D., Lynch, M. J., Madhavi, S., Matejek, M., Mitchell, D. A., Morgan, E., Oberoi, D., Ord, S., Pathikulangara, J., Prabu, T., Rogers, A., Roshi, A., Salah, J. E., Sault, R. J., Shankar, N. U., Srivani, K. S., Stevens, J., Tingay, S., Vaccarella, A., Waterson, M., Wayth, R. B., Webster, R. L., Whitney, A. R., Williams, A., & Williams, C. 2009, IEEE Proceedings, 97, 1497 PASA (2015) doi:10.1017/pas.2015.xxx Ord et al. McKinley, B., Briggs, F., Gaensler, B. M., Feain, I. J., Bernardi, G., Wayth, R. B., Johnston-Hollitt, M., Offringa, A. R., Arcus, W., Barnes, D. G., Bowman, J. D., Bunton, J. D., Cappallo, R. J., Corey, B. E., Deshpande, A. A., deSouza, L., Emrich, D., Goeke, R., Greenhill, L. J., Hazelton, B. J., Herne, D., Hewitt, J. N., Kaplan, D. L., Kasper, J. C., Kincaid, B. B., Koenig, R., Kratzenberg, E., Lonsdale, C. J., Lynch, M. J., McWhirter, S. R., Mitchell, D. A., Morales, M. F., Morgan, E., Oberoi, D., Ord, S. M., Pathikulangara, J., Prabu, T., Remillard, R. A., Rogers, A. E. E., Roshi, D. A., Salah, J. E., Sault, R. J., Shankar, N. U., Srivani, K. S., Stevens, J., Subrahmanyan, R., Tingay, S. J., Waterson, M., Webster, R. L., Whitney, A. R., Williams, A., Williams, C. L., & Wyithe, J. S. B. 2013, MNRAS, 436, 1286 Offringa, A. R., McKinley, B., Hurley-Walker, N., Briggs, F. H., Wayth, R. B., Kaplan, D. L., Bell, M. E., Feng, L., Neben, A. R., Hughes, J. D., Rhee, J., Murphy, T., Bhat, N. D. R., Bernardi, G., Bowman, J. D., Cappallo, R. J., Corey, B. E., Deshpande, A. A., Emrich, D., Ewall-Wice, A., Gaensler, B. M., Goeke, R., Greenhill, L. J., Hazelton, B. J., Hindson, L., Johnston-Hollitt, M., Jacobs, D. C., Kasper, J. C., Kratzenberg, E., Lenc, E., Lonsdale, C. J., Lynch, M. J., McWhirter, S. R., Mitchell, D. A., Morales, M. F., Morgan, E., Kudryavtseva, N., Oberoi, D., Ord, S. M., Pindor, B., Procopio, P., Prabu, T., Riding, J., Roshi, D. A., Udaya Shankar, N., Srivani, K. S., Subrahmanyan, R., Tingay, S. J., Waterson, M., Webster, R. L., Whitney, A. R., Williams, A., & Williams, C. L. 2014, ArXiv e-prints Parsons, A. R., Backer, D. C., Foster, G. S., Wright, M. C. H., Bradley, R. F., Gugliucci, N. E., Parashare, C. R., Benoit, E. E., Aguirre, J. E., Jacobs, D. C., Carilli, C. L., Herne, D. E., Lynch, M. J., Manley, J. R., & Werthimer, D. J. 2010, The Astronomical Journal, 139, 1468 Prabu, T., Srivani, K., & Anish, R. 2014, in prep. Sanders, J. & Kandrot, E. 2010, CUDA by Example, An Introduction to General-Purpose GPU Programming (Addison-Wesley Professional) Thompson, A. R., Moran, J. M., & Swenson, Jr., G. W. 2001, Interferometry and Synthesis in Radio Astronomy, 2nd Edition (John Wiley and Sons) Tingay, S. J., Goeke, R., Bowman, J. D., Emrich, D., Ord, S. M., Mitchell, D. A., Morales, M. F., Booler, T., Crosse, B., Wayth, R. B., Lonsdale, C. J., Tremblay, S., Pallot, D., Colegate, T., Wicenec, A., Kudryavtseva, N., Arcus, W., Barnes, D., Bernardi, G., Briggs, F., Burns, S., Bunton, J. D., Cappallo, R. J., Corey, B. E., Deshpande, A., Desouza, L., Gaensler, B. M., Greenhill, L. J., Hall, P. J., Hazelton, B. J., Herne, D., Hewitt, J. N., JohnstonHollitt, M., Kaplan, D. L., Kasper, J. C., Kincaid, B. B., Koenig, R., Kratzenberg, E., Lynch, M. J., Mckinley, B., Mcwhirter, S. R., Morgan, E., Oberoi, D., Pathikulangara, J., Prabu, T., Remillard, R. A., Rogers, A. E. E., Roshi, A., Salah, J. E., Sault, R. J., Udaya-Shankar, N., Schlagenhaufer, F., Srivani, K. S., Stevens, J., Subrahmanyan, R., Waterson, M., Webster, R. L., Whitney, A. R., Williams, A., Williams, C. L., & Wyithe, J. S. B. 2013a, Publications of the Astronomical Society of Australia, 30, 7 The MWA Correlator Tingay, S. J., Kaplan, D. L., McKinley, B., Briggs, F., Wayth, R. B., Hurley-Walker, N., Kennewell, J., Smith, C., Zhang, K., Arcus, W., Bhat, N. D. R., Emrich, D., Herne, D., Kudryavtseva, N., Lynch, M., Ord, S. M., Waterson, M., Barnes, D. G., Bell, M., Gaensler, B. M., Lenc, E., Bernardi, G., Greenhill, L. J., Kasper, J. C., Bowman, J. D., Jacobs, D., Bunton, J. D., deSouza, L., Koenig, R., Pathikulangara, J., Stevens, J., Cappallo, R. J., Corey, B. E., Kincaid, B. B., Kratzenberg, E., Lonsdale, C. J., McWhirter, S. R., Rogers, A. E. E., Salah, J. E., Whitney, A. R., Deshpande, A., Prabu, T., Udaya Shankar, N., Srivani, K. S., Subrahmanyan, R., Ewall-Wice, A., Feng, L., Goeke, R., Morgan, E., Remillard, R. A., Williams, C. L., Hazelton, B. J., Morales, M. F., Johnston-Hollitt, M., Mitchell, D. A., Procopio, P., Riding, J., Webster, R. L., Wyithe, J. S. B., Oberoi, D., Roshi, A., Sault, R. J., & Williams, A. 2013b, AJ, 146, 103 Tremblay, S., Ord, S., Bhat, N., Tingay, S., Crosse, B., Pallotand S. Oronsaye, D., Bernardi, G., Bowman, J. D., Briggs, F., Cappallo, R. J., Corey, B. E., Deshpande, A. A., Emrich, D., Gaensler, B. M., Goeke, R., Greenhill, L. J., Hazelton, B. J., Johnston-Hollitt, M., Kaplan, D. L., Kasper, J. C., Kratzenberg, E., Lonsdale, C. J., Lynch, M. J., McWhirter, S. R., Mitchell, D. A., Morales, M. F., Morgan, E., Oberoi, D., Prabu, T., Rogers, A. E. E., Roshi, A., Shankar, N. U., Srivani, K. S., Subrahmanyan, R., Waterson, M., Wayth, R. B., Webster, R. L., Whitney, A. R., Williams, A., & Williams, C. L. 2014, in preparation. van Haarlem, M. P., Wise, M. W., Gunst, A. W., Heald, G., McKean, J. P., Hessels, J. W. T., de Bruyn, A. G., Nijboer, R., Swinbank, J., Fallows, R., Brentjens, M., Nelles, A., Beck, R., Falcke, H., Fender, R., Hörandel, J., Koopmans, L. V. E., Mann, G., Miley, G., Röttgering, H., Stappers, B. W., Wijers, R. A. M. J., Zaroubi, S., van den Akker, M., Alexov, A., Anderson, J., Anderson, K., van Ardenne, A., Arts, M., Asgekar, A., Avruch, I. M., Batejat, F., Bähren, L., Bell, M. E., Bell, M. R., van Bemmel, I., Bennema, P., Bentum, M. J., Bernardi, G., Best, P., Bı̂rzan, L., Bonafede, A., Boonstra, A.-J., Braun, R., Bregman, J., Breitling, F., van de Brink, R. H., Broderick, J., Broekema, P. C., Brouw, W. N., Brüggen, M., Butcher, H. R., van Cappellen, W., Ciardi, B., Coenen, T., Conway, J., Coolen, A., Corstanje, A., Damstra, S., Davies, O., Deller, A. T., Dettmar, R.-J., van Diepen, G., Dijkstra, K., Donker, P., Doorduin, A., Dromer, J., Drost, M., van Duin, A., Eislöffel, J., van Enst, J., Ferrari, C., Frieswijk, W., Gankema, H., Garrett, M. A., de Gasperin, F., Gerbers, M., de Geus, E., Grießmeier, J.-M., Grit, T., Gruppen, P., Hamaker, J. P., Hassall, T., Hoeft, M., Holties, H. A., Horneffer, A., van der Horst, A., van Houwelingen, A., Huijgen, A., Iacobelli, M., Intema, H., Jackson, N., Jelic, V., de Jong, A., Juette, E., Kant, D., Karastergiou, A., Koers, A., Kollen, H., Kondratiev, V. I., Kooistra, E., Koopman, Y., Koster, A., Kuniyoshi, M., Kramer, M., Kuper, G., Lambropoulos, P., Law, C., van Leeuwen, J., Lemaitre, J., Loose, M., Maat, P., Macario, G., Markoff, S., Masters, J., McFadden, R. A., McKay-Bukowski, D., Meijering, H., Meulman, H., Mevius, M., Middelberg, E., Millenaar, R., Miller-Jones, J. C. A., Mohan, R. N., Mol, PASA (2015) doi:10.1017/pas.2015.xxx 17 J. D., Morawietz, J., Morganti, R., Mulcahy, D. D., Mulder, E., Munk, H., Nieuwenhuis, L., van Nieuwpoort, R., Noordam, J. E., Norden, M., Noutsos, A., Offringa, A. R., Olofsson, H., Omar, A., Orrú, E., Overeem, R., Paas, H., Pandey-Pommier, M., Pandey, V. N., Pizzo, R., Polatidis, A., Rafferty, D., Rawlings, S., Reich, W., de Reijer, J.-P., Reitsma, J., Renting, G. A., Riemers, P., Rol, E., Romein, J. W., Roosjen, J., Ruiter, M., Scaife, A., van der Schaaf, K., Scheers, B., Schellart, P., Schoenmakers, A., Schoonderbeek, G., Serylak, M., Shulevski, A., Sluman, J., Smirnov, O., Sobey, C., Spreeuw, H., Steinmetz, M., Sterks, C. G. M., Stiepel, H.-J., Stuurwold, K., Tagger, M., Tang, Y., Tasse, C., Thomas, I., Thoudam, S., Toribio, M. C., van der Tol, B., Usov, O., van Veelen, M., van der Veen, A.-J., ter Veen, S., Verbiest, J. P. W., Vermeulen, R., Vermaas, N., Vocks, C., Vogt, C., de Vos, M., van der Wal, E., van Weeren, R., Weggemans, H., Weltevrede, P., White, S., Wijnholds, S. J., Wilhelmsson, T., Wucknitz, O., Yatawatta, S., Zarka, P., Zensus, A., & van Zwieten, J. 2013, Astronomy & Astrophysics, 556, A2 Wayth, R. B., Greenhill, L. J., & Briggs, F. H. 2009, Publications of the Astronomical Society of Australia, 121, 857 Wells, D. C., Greisen, E. W., & Harten, R. H. 1981, Astronomy & Astrophysics Supplement, 44, 363 Wicenec, A. & Knudstrup, J. 2007, The Messenger, 129, 27 Wu, C., Wicenec, A., Pallot, D., & Checcucci, A. 2013, Experimental Astronomy, 36, 679
5cs.CE
GENERALIZED IRREDUCIBLE DIVISOR GRAPHS CHRISTOPHER PARK MOONEY arXiv:1312.7406v1 [math.AC] 28 Dec 2013 Abstract. In 1988, I. Beck introduced the notion of a zero-divisor graph of a commutative rings with 1. There have been several generalizations in recent years. In particular, in 2007 J. Coykendall and J. Maney developed the irreducible divisor graph. Much work has been done on generalized factorization, especially τ -factorization. The goal of this paper is to synthesize the notions of τ -factorization and irreducible divisor graphs in domains. We will define a τ -irreducible divisor graph for non-zero non-unit elements of a domain. We show that by studying τ -irreducible divisor graphs, we find equivalent characterizations of several finite τ -factorization properties. 2010 AMS Subject Classification: 13A05, 13E99, 13F15, 5C25 1. Introduction In this article, D will denote an integral domain. We will always assume that all rings have an identity which is not zero. We will use G = (V, E) to denote a graph with V the set of vertices and E the set of edges. In 1988, I. Beck in [8], introduced for a commutative ring R, the notion of a zero-divisor graph Γ(R). The vertices of Γ(R) are the set of zero-divisors, and there is an edge between a, b ∈ Z(R) if ab = 0. This has been studied and developed by many authors including, but not limited to D.D. Anderson, D.F. Anderson, A. Frazier, A. Lauve, P.S. Livingston, and M. Naseer in [3, 4, 5]. There have been several generalizations and extensions of this concept. In this paper, we Date: November 21, 2017. Key words and phrases. factorization, commutative rings, zero-divisor graphs, irreducible divisor graphs. 1 2 CHRISTOPHER PARK MOONEY focus on the notion of an irreducible divisor graph first formulated by J. Coykendall and J. Maney in [9]. Instead of looking exclusively at divisors of zero in a ring, they restrict to a domain D and choose any non-zero, non-unit x ∈ D and study the relationships between the irreducible divisors of x. In [7, 9], M. Axtell, N. Baeth, J. Coykendall, J. Maney, and J. Stickles present several nice results about factorization properties of domains based on their associated irreducible divisor graphs. M. Axtell and J. Stickles have also studied irreducible divisor graphs in commutative rings with zero-divisors in [6]. Unique factorization domains are well known and widely studied. Lesser known are other finite factorization properties that domains might possess which are weaker than UFDs. These come in the form of half factorization domains or half factorial domains (HFDs), finite factorization domains (FFDs) and bounded factorization domains (BFDs). See [1] for more information on the developments in the theory of factorization in integral domains. More recently, these concepts have been further generalized by way of τ -factorization in several papers, especially by D.D. Anderson and A. Frazier in [2] as well as the author in [12, 13]. In this paper, we seek to take the notion of τ -factorization and apply it to irreducible divisor graphs. We will find that many equivalent characterizations of τ -finite factorization properties given in the aforementioned papers can be given by studying τ -irreducible divisor graphs. Section Two gives the necessary preliminary background information and definitions from the study of irreducible and zero-divisor graphs as well as τ -factorization. In Section Three, we define the τ -irreducible divisor graph of a domain D with a fixed relation τ . We give a few examples of τ -irreducible divisor graphs, especially in comparison with the irreducible divisor graphs of [6, 9]. In Section Four, we prove several theorems illustrating how τ -irreducible GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 3 divisor graphs give us another way to characterize various τ -finite factorization properties domains may possess as defined in [2]. 2. Preliminary Definitions 2.1. Irreducible Divisor Graph Definitions. We begin with some definitions from J. Coykendall and J. Maney [9]. Let Irr(D) be the set of all irreducible elements in a domain D. We will let Irr(D) be a (pre-chosen) set of coset representatives of the collection {aU(D) | a ∈ Irr(D)}. Let x ∈ D # have a factorization into irreducibles. The irreducible divisor graph of x ∈ D # , will be the graph G(x) = (V, E) where V = {a ∈ Irr(D) | a | x}, i.e. the set of irreducible divisors of x up to associate. Given a1 , a2 ∈ Irr(D), a1 a2 ∈ E if and only if a1 a2 | x. Furthermore, n − 1 loops will be attached to a if an | x. If arbitrarily large powers of a divide x, we allow an infinite number of loops. They define the reduced irreducible divisor graph of x to be the subgraph of G(x) which is formed by deleting all the loops and denote it as G(x). A clique will refer to a simple (no loops or multiple edges), complete (all vertices are pairwise adjacent) graph. A clique on n ∈ N vertices will be denoted Kn . We will call a graph G a pseudoclique if G is a complete graph having some number of loops (possibly zero). This means a clique is still considered a pseudoclique. Let G be a graph, possibly with loops, and let a ∈ V (G). We have two ways of counting the degree of this vertex. We define deg(a) := |{a1 ∈ V (G) | a1 6= a, a1 a ∈ E(G)}|, i.e. the number of distinct vertices adjacent to a. Suppose a vertex a has n loops. We define degl (a) := n + deg(a), the sum of the degree and the number of loops. Given a, b ∈ V (G), we 4 CHRISTOPHER PARK MOONEY define d(a, b) to be the shortest path between a and b. If no such path exists, i.e. a and b are in disconnected components of G, or the shortest path is infinite, then we say d(a, b) = ∞. We define Diam(G) :=sup({d(a, b) | a, b ∈ V (G)}). 2.2. τ -Factorization Definitions. Let D be a domain. Let D ∗ = D − {0}, let U(D) be the set of units of D, and let D # = D ∗ − U(D) be the non-zero, non-units of D. We will say a and b are associates if a = λb for some λ ∈ U(D), and denote this a ∼ b. Let τ be a relation on D # , that is, τ ⊆ D # × D # . We will always assume further that τ is symmetric. Let a be a non-unit. A factorization of the form a = λa1 · · · an is said to be a τ -factorization if ai ∈ D # , λ ∈ U(D) and ai τ aj for all i 6= j. If n = 1, then this is said to be a trivial τ -factorization. Each ai is said to be a τ -factor, or that ai τ -divides a, written ai |τ a. We say that τ is multiplicative (resp. divisive) if for a, b, c ∈ D # (resp. a, b, b′ ∈ D # ), aτ b and aτ c imply aτ bc (resp. aτ b and b′ | b imply aτ b′ ). We say τ is associate preserving if for a, b, b′ ∈ D # with b ∼ b′ , aτ b implies aτ b′ . We define a τ -refinement of a τ -factorization λa1 · · · an to be a factorization of the form (λλ1 · · · λn ) · b11 · · · b1m1 · b21 · · · b2m2 · · · bn1 · · · bnmn where ai = λi bi1 · · · bimi is a τ -factorization for each i. This is slightly different from the original definition in [2] where no unit factor was allowed. One can see they are equivalent when τ is associate preserving. We then say that τ is refinable if every τ -refinement of a τ -factorization is a τ -factorization. We say τ is combinable if whenever λa1 · · · an is a τ factorization, then so is each λa1 · · · ai−1 (ai ai+1 )ai+2 · · · an . We pause briefly to give some examples of particular relations τ . GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 5 Example 2.1. Let D be a domain and let τ = D # × D # . This yields the usual factorizations in D and |τ is the same as the usual divides. Moreover, τ is multiplicative and divisive (hence associate preserving). Example 2.2. Let D be a domain and let τ = ∅. For every a ∈ D # , there is only the trivial factorization. Furthermore, all τ -divisors of a are associate to a. If b | τ a, then the factorization is forced to be of the form a = λb = λ(λ−1 (a)) for λ ∈ U(D). That is, a ∼ b. Again τ is both multiplicative and divisive (vacuously). Example 2.3. Let D be a domain and let S be a non-empty subset of D # . Let τ = S × S. Define aτ b ⇔ a, b ∈ S. In this case, τ is multiplicative (resp. divisive) if and only if S is multiplicatively closed (resp. closed under non-unit factors). A non-trivial τ -factorization is (up to unit factors) a factorization into elements from S. Some examples of nice sets S might be the set of primes or irreducibles, then a τ -factorization is a prime decomposition or an atomic factorization respectively. Example 2.4. Let D be a domain and let aτ b if and only if (a, b) = D In this case we get the comaximal factorizations studied by S. McAdam and R. Swan in [11]. More generally, as in J. Juett in [10], we could let ⋆ be a star-operation on D and define aτ b ⇔ (a, b)⋆ = D, that is a and b are ⋆-coprime or ⋆-comaximal. Let a ∈ D # . As in [2], we will say a is τ -irreducible or a τ -atom if factorizations of the form a = λ(λ−1 a) are the only τ -factorizations of a. Then D is said to be τ -atomic if every 6 CHRISTOPHER PARK MOONEY a ∈ D # has a τ -factorization a = λa1 · · · an with ai being τ -atomic for all 1 ≤ i ≤ n. We will call such a factorization a τ -atomic-factorization. We say D satisfies τ -ascending chain condition on principal ideals (τ -ACCP) if for every chain (a0 ) ⊆ (a1 ) ⊆ · · · ⊆ (ai ) ⊆ · · · with ai+1 |τ ai , there exists an N ∈ N such that (ai ) = (aN ) for all i > N. A domain D is said to be a τ -unique factorization domain (τ -UFD) if (1) D is τ -atomic and (2) for every a ∈ D # any two τ -atomic factorizations a = λ1 a1 · · · an = λ2 b1 · · · bm have m = n and there is a rearrangement so that ai and bi are associate for each 1 ≤ i ≤ n. A domain D is said to be a τ -half factorization domain (τ -HFD) if (1) D is τ -atomic and (2) for every a ∈ D # any two τ -atomic-factorizations have the same length. A domain D is said to be a τ -finite factorization domain (τ -FFD) if for every a ∈ D # there are only a finite number of τ -factorizations up to rearrangement and associate. A domain D is said to be a τ -weak finite factorization domain (τ -WFFD) if for every a ∈ D # , there are only finitely many b ∈ D such that b is a τ -divisor of a up to associate. A domain D is said to be a τ -irreducible divisor finite domain (idf-domain) if for every a ∈ D # , there are only finitely many τ -atomic τ -divisors of a up to associate. A domain D is said to be a τ -bounded factorization domain (τ -BFD) if for every a ∈ D # , there exists a natural number N(a) such that for any τ -factorization a = λa1 · · · an , n ≤ N(a). We have the following set of relationships between the above finite factorization properties from [2], where ∇ indicates the relationship requires τ to be refinable and associate GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 7 preserving. 2: ❧❧❧ ❧❧❧ ❧ ❧ ❧❧❧ ❧❧❧ τ -UFD ❘❘❘❘ ❘❘❘ ∇ ❘❘❘❘ ❘❘❘ $, τ -HFD ❙ ❙❙❙ ❙❙❙❙∇ ❙❙❙ ❙❙❙❙ %- τ -FFD KS ∇ ∇ τ -BFD 19 ❦❦❦ ❦❦❦ ❦ ❦ ❦ ❦❦❦ ❦❦❦ +3 τ -WFFD ❧ ❧ ❧ ❧❧❧ ❧❧❧ ❧ ❧ qy ❧❧ ∇ +3 τ -ACCP +3 τ -atomic τ -atomic τ -idf domain 3. The τ -Irreducible Divisor Graph and Examples Let D be a domain and let τ be a symmetric and associate preserving relation on D # . Let Irrτ (D) be the collection of τ -irreducible elements. We will let Irrτ (D) be fixed, pre-chosen coset representatives of the cosets {aU(D) | a ∈ Irrτ (D)}. Given an element a ∈ D # with a τ -atomic factorization, we define the τ -irreducible divisor graph of x to be Gτ (x) = (V, E) with V = {a ∈ Irrτ (D) | a |τ x}, and given a1 , a2 ∈ Irrτ (D), a1 a2 ∈ E if and only if there is a τ -factorization of the form x = λa1 a2 · · · an . Furthermore, n − 1 loops will be attached to the vertex corresponding to a if there is a τ -atomic factorization of the form x = λa · · · aa1 · · · an where a occurs n times. Again, if this occurs for arbitrarily large powers of a, we allow the possibility of an infinite number of loops. We then define the reduced τ -irreducible divisor graph of x to be the subgraph of Gτ (x) formed by removing all loops, and denote it Gτ (x). If there are no τ -atoms in D, then D is said to be a τ -antimatter domain. In this case, we define Gτ (x) = Gτ (x) = ∅ for all x ∈ D # . Example 3.1. Let D be a domain. Suppose τ = ∅. 8 CHRISTOPHER PARK MOONEY By letting τ = ∅, we have eliminated all non-trivial τ -factorizations. This has the effect of making every non-zero, non-unit a τ -atom. This means for every x ∈ D # , Gτ (x) = ({x}, ∅). The τ -irreducible divisor graph of x consists of the single vertex, x itself (or whichever associate of x chosen initially in Irrτ (D)). Example 3.2. Let D be a domain. Suppose τ = D # × D # . In this case, we are looking at the usual factorizations in D. This means a | b if and only if a |τ b. Every τ -factorization is a usual factorization and conversely. Moreover, x ∈ D # is τ -atomic if and only if x is atomic. This results in the irreducible divisor graphs being identical. Hence, we have Gτ (x) = G(x) and Gτ (x) = G(x) as defined in Coykendall and Maney [9]. Example 3.3. (Inspired by [9, Example 2.4]) Let D = Q[x2 , x3 ] and let f (x) = x8 − x9 and consider the relation τ defined by g(x)τ g ′ (x) if and only if deg(g(x)) = deg(g ′(x)). The irreducible factorizations of f (x) are f (x) = x8 − x9 = x2 · x2 · x2 · (x2 − x3 ) = (x3 − x4 ) · x2 · x3 = (x2 − x3 ) · x3 · x3 . It is clear that only the last factorization above is a τ -factorization. It is the only factorization in which all of the factors have the same degree. Every irreducible is certainly τ -irreducible, but the question is: are there any additional τ -atomic elements which τ -divide f (x)? For instance, g(x) = x5 is τ -atomic since the only non-trivial factorization up to associates and rearrangement is g(x) = x2 · x3 is thrown out due to the factors having different degrees. Any τ -factorization of f (x) must have τ -factors of the same degree. This amounts to finding a proper partition of deg(f (x)) = 9 into parts of equal size. This is done only by nine degree GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 9 1 parts, or three degree 3 parts. Since all non-units in D have degree at least 2, the former is not possible in this ring. This leaves only one possible τ -atomic factorization up to associates and rearrangement: f (x) = (x2 − x3 ) · x3 · x3 . We show both G(f (x)) and Gτ (f (x)) below in Figure 1 for the sake of comparison. x3 x3 x3-x2 x4-x3 x2 x3-x2 (a) (b) Figure 1. (a) G(f (x)), (b) Gτ (f (x)) This yields the following corresponding reduced irreducible divisor graphs G(f (x)) and Gτ (f (x)) in Figure 2. x3 x3 x3-x2 x4-x3 x2 (a) x3-x2 (b) Figure 2. (a) G(f (x)), (b) Gτ (f (x)) Remark. This above partition argument shows that any polynomial of prime degree p is a τ -atom. The only way to non-trivially partition a prime integer p into equal parts is p parts of degree 1 each. But all non-unit elements have degree at least 2. Hence there can only be the trivial factorization. Thus we know the τ -irreducible divisor graph of any polynomial of prime degree, p(x) consists of the single vertex, p(x) (or possibly whichever associate of p(x) 10 CHRISTOPHER PARK MOONEY was taken in Irrτ (D)). It is perhaps worth noting that the converse is false as conveniently demonstrated above by x4 − x3 being irreducible and hence τ -irreducible, despite having composite degree. 4. The τ -Irreducible Divisor Graph and τ -Finite Factorization Properties We first observe that the τ -irreducible divisor graph yields a new equivalent characterization of a τ -irreducible element of [2]. This formalizes something we observed in Example 3.1. Theorem 4.1. Let D be a domain and τ a symmetric, associate preserving relation on D # . If D is τ -atomic, then a non-unit x is τ -irreducible if and only if Gτ (x) ∼ = K1 , the complete graph on a single vertex which is some associate of x. Proof. If x is τ -irreducible, then the only τ -factorizations are of the form x = λ(λ−1 x), hence the only τ -divisors of x are associates of x. Moreover, x is a non-zero, non-unit, so x2 does not divide x, hence there are no loops. Thus, Gτ (x) is a single isolated vertex generated by whichever associate of x was chosen in Irrτ (D). Conversely, suppose x ∈ R is a non-unit such that Gτ (x) ∼ = K1 . We suppose x were not τ -irreducible. Then there is a non-trivial τ -atomic factorization of the form x = λa1 · · · an with n ≥ 2. This yields a1 , a2 ∈ V (Gτ (x)), but there is only one vertex and no loops in Gτ (x), contradicting the hypothesis and completing the proof.  Theorem 4.2. Let D be a domain and τ a symmetric, refinable and associate preserving relation on D # . If D is τ -atomic such that for all x ∈ D # , and for all a ∈ V (Gτ (x)), degl(a) < ∞, then D satisfies τ -ACCP. GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 11 Proof. Suppose D did not satisfy τ -ACCP. Then there exists a chain of principal ideals (x1 ) ( (x2 ) ( (x3 ) ( · · · such that xi+1 |τ xi . Say xi = λi xi+1 · ai1 · · · aini (1) is a τ -factorization for each i. Because D is τ -atomic and τ is refinable and associate preserving, we may replace each aij with a τ -atomic factorization. This allows us to assume each factor in Equation (1) is a τ -atom. Since τ is associate preserving, we may assume further that each aij ∈ Irrτ (D). Because τ is refinable, (2) x1 = λ1 x2 · a11 · · · a1n1 = (λ1 λ2 )x3 · a21 · · · a2n2 · a11 · · · a1n1 = · · · are all τ -factorizations with aij τ -atomic. Because xi ( xi+1 , we must have in Equation (1) that ni ≥ 1 or else xi ∼ xi+1 . This means the factorizations in each iteration of Equation (2) increase in length. If {aij } is infinite, then a11 has an infinite number of adjacent vertices in Gτ (x1 ), i.e degl(a11 ) ≥ deg(a11 ) = ∞. Otherwise, if {aij } is finite, then one of the ai0 j0 for some i0 and j0 occurs an infinite number of times. Hence degl(ai0 j0 ) = ∞ in Gτ (x1 ) since arbitrarily high powers of ai0 j0 τ -divide x1 . This is a contradiction and D must satisfy τ -ACCP as desired.  Theorem 4.3. Let D be a domain and τ a symmetric and associate preserving relation on D # . If D is τ -atomic, then the following are equivalent. (1) D is a τ -UFD. (2) Gτ (x) is a pseudoclique for every x ∈ D # . (3) Gτ (x) is a clique for every x ∈ D # . 12 CHRISTOPHER PARK MOONEY (4) Gτ (x) is connected and Diam(Gτ (x)) = 1 for every x ∈ D # . (5) Gτ (x) is connected and Diam(Gτ (x)) = 1 for every x ∈ D # . (6) Gτ (x) is connected for every x ∈ D # . (7) Gτ (x) is connected for every x ∈ D # . Proof. (1) ⇒ (2) Let x ∈ D # . Let x = λa1 · · · am be the unique τ -atomic factorization of x up to rearrangement and associates. Because τ is associate preserving, one may adjust the unit factor in front if necessary, to assume without loss of generality ai ∈ Irr(D) for each i. After rearrangement, we may take the first n τ -factors to be distinct up to associate, and assume the last m − n τ -factors are repeated associates of a1 , . . . , an . Since these are the only irreducible τ -divisors of x, V (Gτ (x)) = {a1 , . . . , an }. It is clear that given any two vertices, ai , aj ∈ V (Gτ (x)), ai aj ∈ E(Gτ (x)), because ai τ aj and ai aj |τ x. If there are repeated associates in the τ -factorization, say x = λae11 · · · aenn with n ≤ m is a factorization with e1 + e2 + . . . + en = m. Then if ei > 1, we have ai τ ai and ai ai |τ x, so we have ei − 1 loops attached to ai . Hence Gτ (x) is a pseudoclique. It is immediate from the definition of the reduced τ -irreducible divisor graph that (2) ⇔ (3) and (6) ⇔ (7). Furthermore, (2) ⇔ (4) and (3) ⇔ (5) respectively since a connected graph is complete if and only if the diameter is 1. If Gτ (x) is complete it is certainly connected, so (2) ⇒ (6). It now suffices to show that (6) ⇒ (1). The following is a modification of the proof of [6, Theorem 2.1]. Let A be the set of all non-zero, non-units which admit at least two distinct τ -atomic factorizations. We show A = ∅. Suppose otherwise and let n := minx∈A {k | x = λa1 · · · ak is a τ -atomic factorization}. Clearly, n ≥ 2. Let y ∈ A such that y = λa1 · · · an . Then there is a distinct τ -atomic factorization y = µb1 · · · bt with t ≥ n. There is a path in Gτ (x) connecting b1 and a1 , GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 13 so without loss of generality we may as well have picked at τ -atomic factorization such that b1 and a1 are actually adjacent in Gτ (x). If ai and bj were associates for any 1 ≤ i ≤ n, 1 ≤ j ≤ t, then y ai = λ′ a1 · · · abi · · · an = µ′ b1 · · · bbk · · · bt provides two distinct τ - atomic factorizations of a non-zero, non-unit but contradicts the minimality of n. Since we chose a1 and b1 to be adjacent, we know there is a τ -atomic factorization of the form y = γa1 b1 c1 · · · cm = λa1 · · · an . But this again yields two distinct τ -atomic factorizations of y : a1 y = γb1 c1 · · · cm = λa2 · · · an a1 again contradicting the minimality of n. Hence, A must be empty as desired, completing the proof.  Theorem 4.4. Let D be a domain and τ a symmetric, refinable and associate preserving relation on D # . If D is τ -atomic, then consider the following statements. (1) Gτ (x) is finite for every x ∈ D # . (2) Gτ (x) is finite for every x ∈ D # . (3) D is a τ -irreducible divisor finite domain. (4) D is a τ -weak finite factorization domain. (5) D is a τ -finite factorization domain. (6) For all x ∈ D # , degl(a) < ∞ for all a ∈ V (Gτ (x)). (7) For all x ∈ D # , deg(a) < ∞ for all a ∈ V (Gτ (x)). We have (1)-(5) are equivalent, (3) ⇒ (6) ⇒ (7), and if we assume further that τ is reflexive, then (7) ⇒ (3) and all are equivalent. Proof. We begin by showing (1)-(5) are equivalent. (1) ⇔ (2) and (3) ⇔ (1) are immediate from the definitions. (5) ⇒ (4) is clear since every every τ -divisor up to associate must 14 CHRISTOPHER PARK MOONEY appear as a τ -factor in one of the finitely many τ -factorizations. (4) ⇒ (3) every τ -atomic divisor up to associate is certainly among the τ -divisors. We need only prove (3) ⇒ (5). We modify the proof of [1, Theorem 5.1]. Let a ∈ D # . Let a1 , a2 , . . . an be the collection of all non-associate τ -irreducible divisors of a. Because D is τ -atomic and τ is refinable and associate preserving, given any τ -factorization, we could τ -refine it into a τ -atomic factorization. In this way, every τ -factorization corresponds to a τ -factorization of the form a = λas11 · · · asnn with 0 ≤ si . If we can show that the set of factorizations of this form is finite, then every τ -factorization occurs as some grouping of these τ -atomic factors. We suppose first that for each i, there is a bound Ni such that every τ -refinement of a τ -factorization as above has 0 ≤ si ≤ Ni . Then this set is finite, with N1 · N2 · · · Nn elements in it. So now we must have some si which is unbounded, say s1 is unbounded. Then for each k ≥ 1, we can write x = λk as1k1 · · · asnkn τ -factorizations with sk1 < sk2 < sk3 < · · · . Suppose that in the set of factorizations, {ski } is bounded for 1 < i ≤ n. Then there are only finitely many choices for sk2 , . . . , skn , we must have sk2 = sj2 , sk3 = sj3, . . . , skn = sjn for some j > k. But then we have s x = λj a1j1 · · · asnjn = λk as1k1 · · · asnkn . s Since D is a domain, we can cancel leaving λj a1j1 = λk as1k1 with sj1 > sk1 , a contradiction. This means some set {ski } is unbounded for a fixed i with 1 < i ≤ n. Without loss of generality suppose it is i = 2. We continue in this manner until we get subsequences with GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 15 s11 < s21 < s31 < · · · and s21 < s22 < s32 < · · · . But this means we have x = λ1 as111 · · · asn1n = λ2 as121 · · · asn2n with s1i < s2i for each i, a contradiction. Thus this set must be finite, and the proof is complete. (5) ⇒ (6) ⇒ (7) is immediate. We now suppose in addition that τ is reflexive and show (7) ⇒ (3). Suppose there is a a ∈ D # such that {ai }i∈I is an infinite collection of non-associate τ -atomic divisors of a. Suppose for each i ∈ I, that a = λi ai ai1 · · · aini are the given τ -factorizations showing ai is a τ -atomic divisor of a. But then since τ is reflexive, we have aτ a, so a2 = a · a = (λi ai ai1 · · · aini ) λj aj aj1 · · · ajnj  is a τ -factorization for any choice of i, j ∈ I. Because τ -is refinable and associate preserving, we have a2 = (λi λj )ai aj ai1 · · · aini aj1 · · · ajnj is a τ -factorization, showing ai and aj are adjacent in Gτ (a2 ), for any choice of i, j ∈ I. Thus when we fix i = i0 , and let j range over all possible choices of aj ∈ {ai }i∈I , we see ai0 aj ∈ E(Gτ (a2 )) for all j ∈ I, j 6= i0 . Hence deg(ai0 ) = ∞ in Gτ (a2 ).  Corollary 4.5. Let D be a domain and τ a symmetric, refinable and associate preserving relation on D # . If D is τ -atomic and if Gτ (x) (resp. Gτ (x)) is connected for every x ∈ D # , then Gτ (x) (resp. Gτ (x)) is a finite pseudoclique for every x ∈ D # . Furthermore, Gτ (x) = Kn for some finite n. 16 CHRISTOPHER PARK MOONEY Proof. If Gτ (x) is connected for every x ∈ D # , then by Theorem 4.3 D is a τ -UFD which implies D is a τ -atomic τ -irreducible divisor finite ring. Theorem 4.4 shows Gτ (x) has a finite number of vertices. Moreover, by Theorem 4.3, each of these vertices is adjacent to every other vertex, i.e. Gτ (x) is a finite a pseudoclique. The last statement is immediate.  The following result is well known and was proven in [2], but we include it since the τ -irreducible divisor graph results yield a nice proof. Corollary 4.6. Let D be a domain and τ a symmetric, refinable and associate preserving relation on D # . If D is a τ -atomic, τ -irreducible divisor finite domain, then D satisfies τ -ACCP. Proof. Theorem 4.4 shows for an associate preserving and refinable τ , a τ -atomic τ -idf domain has the property that for all x ∈ D # , degl(a) < ∞ for any vertex a ∈ V (Gτ (x)). By Theorem 4.2, this shows D satisfies τ -ACCP.  Acknowledgment I would like to thank the referee for their helpful comments and careful reading which have improved the quality of this article. This research was conducted as a research fellow under the supervision of Professor Daniel D. Anderson while at The University of Iowa. References [1] D.D. Anderson, D.F. Anderson, and M. Zafrullah, Factorization in Integral Domains, J. Pure Appl. Algebra., 69 (1990), 1-19. [2] D. D. Anderson and Andrea M. Frazier, On a general theory of factorization in integral domains, Rocky Mountain J. Math., 41 (2011), 663–705. [3] D.D. Anderson and M. Naseer, Beck’s coloring of a commutative ring, J. Algebra, 159 (1993), 500–514. GENERALIZED IRREDUCIBLE DIVISOR GRAPHS 17 [4] D.F. Anderson, A. Frazier, A. Lauve, and P.S. Livingston, The zero-divisor graph of a commutative ring. II, Ideal theoretic methods in commutative algebra (Columbia,MO, 1999), Lecture Notes in Pure and Appl. Math., 220, Dekker, New York, (2001), 61–72. [5] D.F. Anderson and P.S. Livingston, The zero-divisor graph of a commutative ring, J. Algebra, 217 (1999), 434–447. [6] M. Axtell, N. Baeth, and J. Stickles, Irreducible divisor graphs and factorization properties of domains, Comm. Algebra, 39 (2011), 4148–4162. [7] M. Axtell and J. Stickles, Irreducible divisor graphs in commutative rings with zero-divisors, Comm. Algebra, 36 (2008), 1883–1893. [8] I. Beck, Coloring of commutative rings, J. Algebra, 116 (1988), 208–226. [9] J. Coykendall and J. Maney, Irreducible divisor graphs, Comm. Algebra, 35 (2007), 885–895. [10] J. Juett, Generalized comaximal factorization of ideals, J. Algebra, 352 (2012), 141–166. [11] S. McAdam and R. Swan, Unique comaximal factorization, J. Algebra, 276 (2004), 180–192. [12] C.P. Mooney, Generalized factorization in commutative rings with zero-divisors, Houston J. Math., to appear. [13] C.P. Mooney, Generalized u-factorization in commutative rings with zero-divisors, Rocky Mountain J. Math., to appear. Reinhart Center, Viterbo University, 900 Viterbo Drive, La Crosse, WI 54601 E-mail address: [email protected]
0math.AC
Lecture Notes on the ARV Algorithm for Sparsest Cut Thomas Rothvoss∗ University of Washington, Seattle arXiv:1607.00854v1 [cs.DS] 4 Jul 2016 July 5, 2016 Abstract p One of the landmarks in approximation algorithms is the O( log n)-approximation algorithm for the Uniform Sparsest Cut problem by Arora, Rao and Vazirani from 2004. The algorithm is based on a semidefinite program that finds an embedding of the nodes respecting the triangle inequality. Their core argument shows that a random p hyperplane approach will find two large sets of Θ(n) many nodes each that have a distance of Θ(1/ log n) to each other if measured in terms of k · k22 . Here we give a detailed set of lecture notes describing the algorithm. For the proof of the Structure Theorem we use a cleaner argument based on expected maxima over k-neighborhoods that significantly simplifies the analysis. 1 Introduction Let G = (V, E ) be a complete, undirected graph on |V | = n nodes and let c : E → R≥0 be a cost function on the edges. For a subset S ⊆ V of nodes, let δ(S) := {{i , j } ∈ E | |{i , j } ∩ S| = 1} be the induced cut. We P abbreviate c(δ(S)) := e∈δ(S) c(e) as the cost of the cut. The (Uniform) Sparsest Cut problem is then to find the cut that minimizes the cost-over-separated-pairs ratio: ½ ¾ c(δ(U )) min | ; ⊂U ⊂ V . |U | · |V \U | There is also a non-uniform version of the problem where each pair i , j ∈ V has an associated demand d (i , j ) ≥ 0 and one aims for the cut minimizing the ratio c(δ(S))/d (δ(S)). We will now see the celebrated p algorithm by Arora, Rao and Vazirani [ARV04] that finds a O( log n)-approximation in polynomial time. For the algorithm we will not try to optimize any constant. To fix some notation, we will denote any vector in bold font, like v i ∈ Rm . If we write i ∼ V , then we mean that i is a uniform random node from V . We denote N (0, 1) as the 1-dimensional Gaussian distribution with mean 0 and variance 1. In particular, 2 a random variable g ∼ N (0, 1) has density p1 e −x /2 . If we write g ∼ N m (0, 1), then we mean that g is 2π an m-dimensional Gaussian. Recall that the vector g = (g 1 , . . . , g m ) can be generated by sampling each coordinate independently with g i ∼ N (0, 1). In reverse, for any pair of orthonormal vectors u, v ∈ Rm , the inner products 〈g , u〉 , 〈g , v 〉 are independently distributed from N (0, 1). ∗ Email: [email protected]. Supported by NSF grant 1420180 with title “Limitations of convex relaxations in combinatorial optimization” and an Alfred P. Sloan Research Fellowship. 1 2 A semidefinite program Sparsest Cut is an unusual problem in the sense that it minimizes the ratio of two functions. Let us assume for the sake of simplicity that we guessed the cost C ∗ and the size S ∗ of an optimum cut, say with S ∗ ≤ n2 . Then we define a semidefinite programming relaxation X X i ∈V V 2 {i , j }∈( X {i , j }∈E ) kv i k22 kv i − v j k22 c i j kv i − v j k22 kv i − v j k22 kv i k22 kv 0 k22 = S∗ (I ) = S ∗ · (n − S ∗ ) (I I ) = C∗ (I I I ) ≤ kv i − v k k22 + kv k − v j k22 ≤ 1 = 0 ∀i , j , k ∈ V ∪ {0} ∀i ∈ V (I V ) (V ) (V I ) where we use an artificial index 0 with v 0 := 0, so that the triangle inequality also holds for the origin. Lemma 1. If there is cut U ∗ ⊆ V of cost C ∗ and size S ∗ , then the above SDP has a solution. Proof. One could choose 1-dimensional vectors by defining ( 1 if i ∈ U ∗ v i := 0 if i ∉ U ∗ . Then the only non-trivial case is verifying the triangle inequalities in (I V ). These are satisfied by our choice of v i ∈ {0, 1} since if kv i − v j k22 = 1, then i and j have to be on different sides of the cut U ∗ and any node k has to be either not on the side of i or not on the side of j . We can solve the semi-definite program (SDP) in polynomial time [GLS93]; let {v i }i ∈V ⊆ Rm be the solution. Due to the triangle inequalities (IV) we can define a metric d : V × V → R≥0 by setting d (i , j ) := kv i − v j k22 . Note that while k·k2 is always a metric, k·k22 is not a metric on all points sets. For sets of nodes A, B ⊆ V we define d (i , A) := min{d (i , j ) : j ∈ A} and d (A, B ) := min{d (i , j ) : i ∈ A, j ∈ B }. 3 A ball rounding scheme Given that family {v i }i ∈V of SDP vectors, there are several natural rounding procedures that would come to mind. For example one could try the hyperplane rounding that Goemans and Williamson [GW94] have used for MaxCut. The natural algorithm for Sparsest Cut would be to take a random Gaussian g ∼ N m (0, 1) and set U := {i ∈ V | 〈g , v i 〉 ≥ 0}. Assume for the sake of simplicity that we are in the balanced case of Sparsest Cut with S ∗ = Θ(n). Then an edge (i , j ) ∈ E has a contribution to the objective function of Θ(d (i , j )/n 2 ). On the other hand, the probability that (i , j ) is separated is roughly proportional to the Euclidean distance kv i − v j k2 and even if the hyperplane generates p perfectly balanced cuts, the expected contribution of an edge (i , j ) to the hyperplane cut would be Θ( d (i , j )/n 2 ). In other words, short edges would be separated far too likely. The second best idea that one might have, would be to select a node i ∈ V and take a random cut U := { j ∈ V | d (i , j ) ≤ r } where r ∼ [0, 1]. Now every edge is cut with a probability not exceeding d (i , j ). On the other hand, this argument seems to not give any guarantee on the size of U and V \U , hence the 2 objective function can be arbitrarily bad again. But a slight fix of this rounding argument can work. We only need a large “core” of nodes so that the remaining nodes still have a decently large distance to it. Lemma 2. Suppose we have a set of nodes A ⊆ V with |A| ≥ αn and 2 cut of the form {i ∈ V | d (i , A) ≤ r } is a αβ -approximation. Proof. Recall that the optimum value of the objective function is and take U := U (r ) := {i ∈ V | d (i , A) ≤ r } as a random cut. P i ∈V d (i , A) ≥ β · S ∗ . Then the best C∗ . S ∗ ·(n−S ∗ ) Suppose we sample r ∼ [0, 1] U := U (r ) r A Then for an edge (i , j ) ∈ E , say with d (i , A) ≤ d ( j , A), we have Pr [(i , j ) ∈ δ(U )] = Pr [d (i , A) ≤ r ≤ d ( j , A)] r ∼[0,1] triangle inequality r ∼[0,1] ≤ d (i , j ). Hence the expected cost of the cut U is E [c(δ(U ))] ≤ r ∼[0,1] X (i , j )∈E d (i , j ) = C ∗ . Note that in any case |U | ≥ |A| ≥ αn. We know that d (i , A) ≤ 2 for all i ∈ V and hence Prr ∼[0,1] [i ∉ U ] = Prr ∼[0,1] [r < d (i , A)] ≥ 12 d (i , A). Hence E [|V \U |] ≥ r ∼[0,1] 1X β d (i , A) ≥ · S ∗ . 2 i ∈V 2 αβ Then Er ∼[0,1] [|U | · |V \U |] ≥ 2 · S ∗ · n. In other words, the random cut seems to have the right expected nominator and denominator to satisfy the claim. But this is not enough to argue that their ratio satisfies c(δ(U )) 2 C∗ · S ∗ ·(n−S Er ∼[0,1] [ |U |·|V \U | ] ≤ αβ ∗ ) . The following insight comes to rescue: Fact. Let a, b ∈ Rm ≥0 be non-negative numbers and D be a distribution over indices in [m]. Then ½ ¾ ai Ei ∼D [a i ] . ≤ min i ∈{1,...,m} b i Ei ∼D [b i ] Now, this fact implies that best choice of U (over all r ∈ [0, 1]) will indeed satisfy the claim and the lemma is proven. We should also remark that if A is given, we can find the cut U in polynomial time as we only need to try out at most n 2 many values of r . 3 4 The case of heavy clusters Let B (i , r ) := { j ∈ V | d (i , j ) ≤ r } be the “ball” of radius r around node i . A slight annoyance of the ARV algorithm is that it requires a case split. If we can find a cluster center i ∗ ∈ V , then we can use Lemma 2 to get a constant factor approximation by just taking a ball around the center i ∗ . ∗ Lemma 3. Suppose there is a node i ∗ ∈ V ∪ {0} with |B (i ∗ , 18 · Sn )| ≥ n4 . Then in polynomial time one can find a cut that gives a O(1)-approximation. ∗ Proof. We set A := B (i ∗ , 18 · Sn ). Then by assumption |A| ≥ n4 . Moreover, bounding the average distance of pairs of nodes from above and from below gives ³ triangle ineq. 1 S ∗ S ∗ n − S ∗ (I I ) 1 S∗ ´ . · ≤ · ≤ E [d (i , j )] ≤ 2 · E d (i , A) + · 2 n n | {z n } 8 n i , j ∼V i ∼V ≥1/2 ∗ This can be rearranged to Ei ∼V [d (i , A)] ≥ 81 · Sn . We obtain a 64-approximation by applying Lemma 2. 5 An algorithm for the main case From now on we make the assumption that no cluster exists: ¯ ³ ∗ ´¯¯ ¯ ¯B i , 1 · S ¯ < n ∀i ∈ V ∪ {0}. ¯ 8 n ¯ 4 ∗ We will prove that in this case, there are sets L, R ⊆ V of size |L|, |R| ≥ Ω(n) with d (L, R) ≥ ∆ · Sn for ∆ := p Θ(1/ log n). Then choosing Lemma 2 with A := L will give a O( ∆1 )-approximation. Before we start prov∗ ing this, we want to further simplify the situation. Note that by (I ) we have Ei ∼V [d (i , 0)] = Sn , and hence ∗ ∗ at most half the nodes can have a distance of more than 2 · Sn to 0. Moreover we have |B (0, 18 · Sn )| ≤ n4 . ∗ ∗ Then we only loose a constant factor if we delete those nodes and assume that 18 · Sn ≤ d (i , 0) ≤ 2 · Sn for p all remaining nodes. Next we scale the vectors v i by a factor of n/S ∗ , which scales the distances d (i , j ) by a factor of Sn∗ . After this transformation it suffices to prove the following structure theorem: Theorem 4 (ARV Structure Theorem). Given any set of |V | = n vectors {v i }i ∈V ⊆ Rm with and |B (i , 18 )| ≤ 43 n for all i ∈ V that satisfy the triangle inequalities 1 8 ≤ kv i k22 ≤ 2 kv i − v j k22 ≤ kv i − v k k22 + kv k − v j k22 ∀i , j , k ∈ V. Then there is a polynomial time algorithm pthat with constant probability finds sets L, R ⊆ V of size |L|, |R| ≥ Ω(n) with d (L, R) ≥ ∆ for ∆ := Θ(1/ log n). From now on, we complete ignore the cost function and only use the properties given in the Structure Theorem. Such sets L and R with d (L, R) ≥ ∆ are called ∆-separated. Let c ′ > 0 be a small enough constants. The algorithm to produce the ∆-separated sets is as follows: 4 Well-separated sets algorithm Input: Vectors {v i }i ∈V ⊆ Rm satisfying the triangle inequality with 3 4 n for all i ∈ V ∪ {0}. Output: Either ∆-separated sets L ′ , R ′ of size |L ′ |, |R ′ | ≥ (1) (2) (3) (4) (5) (6) c′ 2n 1 8 ≤ kv i k22 ≤ 2 and |B (i , 18 )| ≤ or FAIL m Pick a random Gaussian g ∼ N (0, 1) Set L := {i ∈ V | 〈v i , g 〉 ≤ −1} and R := {i ∈ V | 〈v i , g 〉 ≥ 1} If either |L| ≤ c ′ n or |R| ≤ c ′ n then FAIL Compute any inclusion-wise maximal matching M (g ) ⊆ {(i , j ) ∈ L × R | d (i , j ) ≤ ∆} ′ If |M (g )| > c2 n then FAIL Return L ′ := {i ∈ L | i not covered by M (g )} and R ′ := {i ∈ V | i not covered by M (g )} Observe that any pair i ∈ L ′ and j ∈ R ′ that remains will have d (i , j ) > ∆ as otherwise the matching M (g ) ′ would not have been maximal. Also, if the algorithm reaches (6), then min{|L ′ |, |R ′ |} ≥ c2 n. L R L′ R′ i ∈ M (g ) j d (i , j ) ≤ ∆ g The first step is to argue that with constant probability both L and R have size at least Ω(n). Lemma 5. There is an absolute constant c ′ > 0 so that Prg ∼N m (0,1) [min{|L|, |R|} ≥ c ′ n] ≥ c ′ . Proof. We will prove that E[|L| · |R|] ≥ Ω(n 2 ) which then implies the claim. Fix any i ∈ V and select one of the at least 41 n nodes j with d (i , j ) ≥ 81 . Let w be the orthogonal projection of v j on v i , see figure below. Let α ∈ [0, π2 ] be the angle between v i − v j and w and let β ∈ [0, π2 ] be the angle between v j and w . Due to the triangle inequalities, the angle spanned by the points 0, v i and v j is non-obtuse and α + β ≤ π2 . Then we have either α ≤ π4 and 1 kw k2 = cos(α) · kv i − v j k2 ≥ | {z } | {z } 4 p p ≥1/ 8 ≥1/ 2 or otherwise we have β ≤ π 4 and 1 kw k2 = cos(β) · kv j k2 ≥ | {z } | {z } 4 p ≥1/ 2 5 p ≥1/ 8 Either way, kw k2 ≥ 41 . Since v i ⊥ w , the inner products 〈g , v i 〉 and 〈g , w 〉 are independent random variables and we can estimate Pr[i ∈ L and j ∈ R] ≥ Pr[−2 ≤ 〈g , v i 〉 ≤ −1 and 〈g , w 〉 ≥ 3] h h vi 1 2 i 3 i w 〉≤− 〉≥ ≤ 〈g , = Pr − >0 · Pr 〈g , kv i k2 kv i k2 kv i k2 kw k2 kw k | {z 2} | {z } ∈[ p1 , p1 ] 8 ≤12 2 which is some tiny, yet absolute constant. Note that in case the latter event happens, then indeed 〈v i , v j 〉 〈g , v j 〉 = 〈g , v i 〉 · + 〈g , w 〉 ≥ 1. | {z } kv i k2 | {z } 2 | {z } ≥−2 ≥3 ∈[0,1] vi w p 2 0 α β vj p1 8 This implies that with a constant probability, the algorithm does not fail in (3). The main technical part lies in proving that Eg ∼N m (0,1) [|M (g )|] ≤ cn where we can make the constant c as small as we want, ′ ′ ′ at the expense of a smaller value of ∆. If we choose c := ( c2 )2 , then Pr[|M (g )| > c2 ] ≤ c2 and the success probability of the algorithm is at least c′ . 2 6 The proof of the Structure Theorem p The following geometric theorem by Arora, Rao and Vazirani is the heart of their O( log n)-approximation −2/3 for Sparsest Cut. To be precise, the original ARV ) p result [ARV04] only showed this theorem for ∆ = Θ((log n) and needed a lot of extra work to get the O( log n)-approximation. The claim as it is stated here was first proven by Lee [Lee05]. For an edge set E ′ , let β(E ′ ) be the size of the maximum matching. p Theorem 6 ([ARV04, Lee05]). For any constant c > 0 there is a choice of ∆ := Θc (1/ log n) so that the following holds: Let {v i }i ∈V ⊆ Rm be a set of |V | = n vectors satisfying the triangle inequality kv i − v j k22 ≤ kv i − v k k22 + kv k − v j k22 ∀i , j , k ∈ V. For a vector g ∈ Rm define © ª E (g ) := (i , j ) ∈ V × V | 〈v j − v i , g 〉 ≥ 2 and kv i − v j k22 ≤ ∆ . Then Eg ∼N m (0,1) [β(E (g ))] ≤ cn . 6 Here we think of E (g ) as directed edges. Let M (g ) be a maximum matching attaining β(E (g )). We will assume the existence of such a matching M (g ) and lead this to a contradiction. By inducing on a subgraph and reducing the constant c one can even assume that for every node the probability of having an outgoing edge is at least c and the same is true for ingoing edges. First, there is no harm in assuming that M (g ) has the reverse edges of M (−g ), which implies that each node has an outgoing edge with the same probability as it has an incoming edge. Lemma 7. Assume that Theorem 6 is false for vectors {v i }i ∈V ⊆ Rm . Then there is a subset V ′ ⊆ V of size |V ′ | ≥ cn and a matching M ′ (g ) ⊆ M (g ) on V ′ so that every node i ∈ V ′ has an outgoing edge in M ′ (g ) with probability at least c8 and an ingoing edge with probability at least c8 . Proof. For each node i ∈ V define p(i ) := Prg ∼N m (0,1) [i has outgoing edge in M (g )]. If there is a node i with p(i ) ≤ 8c , then we imagine to delete the node from the graph and remove from M (g ) any edge containing node i . Note that this decreases the expected size of the matching by at most 2· 8c . We continue this procedure until no such node exists anymore. Let V ′ be the remaining set of nodes with M ′ (g ) := M (g ) ∩ (V ′ × V ′ ). Then Eg ∼N m (0,1) [|M ′ (g )|] ≥ Eg ∼N m (0,1) [|M (g )|] − n · 4c ≥ c2 n. Then there must be at least |V ′ | ≥ cn many nodes left. After changing the constants and adapting the value of n, we assume to have n nodes and for every node i ∈ V , the matching M (g ) has an outgoing and an incoming edge with probability at least c. We call an edge (i , j ) ∆-short if d (i , j ) ≤ ∆. For a node i ∈ V , let Γ(i ) := { j ∈ V | d (i , j ) ≤ ∆} be the neighborhood of i with respect to the graph of ∆-short edges. Moreover, let Γk (i ) := Γk−1 (Γ(i )) be the nodes that can be reached from i via at most k many ∆-short edges. Lemma 8. For any k ∈ Z≥0 and i ′ ∈ Γk (i ) one has kv i − v i ′ k2 ≤ p k∆. Proof. We have kv i − v i ′ k22 = d (i , i ′ ) ≤ k · ∆ by the SDP triangle inequality. Taking square roots gives the claim. At the heart of the arguments lies the fact that the value of Lipschitz functions is well concentrated. Recall that a function F : Rm → R is called L-Lipschitz, if |F (x) − F (y )| ≤ L · kx − y k2 for all x, y ∈ Rm . Lemma 9 (Concentration for Lipschitz Functions (Sudakov-Tsirelson, Borrell)). Let F : Rm → R be an L 1 2 Lipschitz function with Gaussian mean µ := Eg ∼N m (0,1) [F (g )]. Then Prg ∼N m (0,1) [|F (g )−µ| ≥ α] ≤ 2e − 2 ·(α/L) for any α ≥ 0. We define a function F i ,k (g ) := max{〈g , v i − v j 〉 | j ∈ Γk (i )}. In other words, F i ,k (g ) gives the maximum inner product 〈g , v i − v j 〉 over all nodes j ∈ V that are within k many ∆-short edges of node i . Note that F i ,k (g ) ≥ 〈g , v i − v i 〉 = 0 for all g ∈ Rm as i ∈ Γk (i ). Lemma 10. The function F i ,k : Rm → R is p k · ∆-Lipschitz. Proof. Fix g , g ′ ∈ Rm and assume for the sake of symmetry that F (g ) ≥ F (g ′ ). Let j , j ′ ∈ Γk (i ) be the nodes 7 attaining F (g ) and F (g ′ ), resp. Then Cauchy-Schwarz |F (g ) − F (g ′ )| = 〈g , v i − v j 〉 − 〈g ′ , v i − v j ′ 〉 ≤ 〈g − g ′ , v i − v j 〉 ≤ kg − g ′ k2 · kv i − v j k2 . | {z } p ≤ k·∆ by Lem. 8 Here we used in the first inequality that j ′ ∈ Γk (i ) maximizes 〈g ′ , v i − v j ′ 〉. Now, let µi ,k := Eg ∼N m (0,1) [F i ,k (g )] be the expected maximum inner product over k-neighbors of node i ∈ V . One useful argument will be a nice relation between expectations of neighbors: Lemma 11. For any node i ∈ V and i ′ ∈ Γ(i ) and k ∈ Z≥0 one has µi ′ ,k+1 ≥ µi ,k . Proof. We have µi ′ ,k+1 = Em g ∼N (0,1) ′ Γk+1 (i )⊇Γk (i ) ≥ Em g ∼N (0,1) h £ n oi max 〈v i ′ − v i , g 〉 + 〈v i − v j , g 〉 | j ∈ Γk+1 (i ′ ) © ª¤ max 〈v i − v j , g 〉 | j ∈ Γk (i ) + E [〈v i ′ − v i , g 〉] = µi ,k . {z } g ∼N m (0,1) | =0 On the other hand, we can get the following upper bound: p p Lemma 12. For any k ∈ Z≥0 and any i ∈ V one has µi ,k ≤ 10 log n · k∆. Proof. For any j ∈ Γk (i ) we have kv i − v j k2 ≤ Pr g ∼N m (0,1) h p k∆ and generously q p i Z∞ 〈v i − v j , g 〉 ≥ 8 log n · k∆ ≤ p 8 logn 2 1 1 . p e −x /2 d x ≤ 2n 2π p p p m (0,1) [F i ,k (g ) ≤ 8 That means log n· k∆] ≥ 1/2. Again, F i ,k is k∆-Lipschitz, hence Prg ∼N m (0,1) [|F i ,k (g )− p Prg ∼N p µi ,k | ≥ 2 k∆] ≤ 12 and 2 ≤ 2 log(n) for n ≥ 2. 6.1 Extend or expand The core argument to get to a contradiction is the following: 1 log(1/c) · ∆1 } be parameters and U ⊆ {i ∈ V | µi ,k ≥ δ} be a set Lemma 13. Let ∆ > 0, δ ∈ R and k ∈ {0, . . . , 100 of nodes. Then (A) either there is a subset U ′ ⊆ Γ(U ) so that |U ′ | ≥ 4c · |U | and µi ,k+1 ≥ δ + 1 for all i ∈ U ′ . (B) or the neighborhood U ′ := Γ(U ) satisfies |U ′ | ≥ c4 · |U | and µi ,k+1 ≥ δ for all i ∈ U ′ . Proof. If |Γ(U )| ≥ 4c · |U |, then every node in i ∈ Γ(U ) has µi ,k+1 ≥ δ by Lemma 11 and we are in case (B). So suppose that |Γ(U )| < c4 · |U |. Consider the random matching n 1o M̃(g ) := (i , j ) ∈ M (g ) | i ∈ U and F i ,k (g ) ≥ δ − 2 8 that is the restriction of M (g ) to edges that are going out p of U and where F i ,k (g ) is large enough. Note m that µi ,k = Eg ∼N (0,1) [F i ,k (g )] ≥ δ for all i ∈ U and F i ,k is k∆-Lipschitz. Hence by Lemma 10 we have ³ h 1 ´ c 1i ≤ 2 exp − < F i ,k (g ) < δ − (0,1) 2 8k∆ 2 Pr m g ∼N ∀i ∈ U . This implies that each node in U will have an outgoing edge in M̃ (g ) with probability at least 2c . Now, 2 c define U ′ := { j ∈ Γ(U ) | Pr[ j has incoming edge from M̃ (g )] ≥ 16 }. Since M̃(g ) is a matching we have c c2 c · |U | ≤ E[|M̃ (g )|] ≤ · |Γ(U ) \U ′ | +|U ′ | ≤ · |U | + |U ′ | | {z } 2 16 4 ≤(4/c)·|U | which implies that |U ′ | ≥ 4c · |U |. Now fix a node j ∈ U ′ . It remains to argue that µ j ,k+1 ≥ δ + 1 for all j ∈ U ′ . First, condition on the event that M̃ (g ) has an edge incoming to j . We denote that edge by (i (g ), j ) ∈ M̃ (g ) with i (g ) ∈ U 1 . We know by the definition of M̃ (g ) that 〈v j − v i (g ) , g 〉 ≥ 2. Moreover, we know that there is a node h(g ) ∈ Γk (i (g )) so that 〈v i (g ) − v h(g ) , g 〉 ≥ δ − 12 . Γ(U ) U Γk (i (g )) U′ M̃ (g ) h(g ) i (g ) j Then 〈v j − v h(g ) , g 〉 = 〈v j − v i (g ) , g 〉 + 〈v i (g ) − v h(g ) , g 〉 ≥ δ + 32 . In other words, Prg ∼N m (0,1) [F j ,k+1(g ) ≥ δ + p 3 c2 2 ] ≥ 16 . Again, the function F j ,k+1 is (k + 1)∆-Lipschitz and ´ c2 ³ h 1 1 i Lem. 9 < ≤ 2 exp − |F j ,k+1(g ) − µ j ,k+1 | ≥ (0,1) 2 8(k + 1)∆ 16 Pr m g ∼N and hence µ j ,k+1 ≥ δ + 1. This shows the claim. Now, suppose we run Lemma 13 iteratively, starting with U := V and in each iteration we replace the current U by the set U ′ . We iterate this until the upper bound on k is reached. Note that case (B) 1 cannot happen more often than case (A) as always |Γ(U )| ≤ n. Then after being k = 100∆ log(1/c) times in Case (A) and ℓ ∈ {0, . . . k} times in Case (B), we end up with a set U ⊆ V with |U | ≥ n · ( 4c )k−ℓ ≥ n · ( 4c )k p p and µi ,2k ≥ µi ,k+ℓ ≥ k for allp i ∈ U . On the other hand, µi ,2k ≤ 10 log n · 2k∆ by Lemma 12. Choosing ∆ := Θc ( p 1 ) and k := Θc ( log n) with proper choice of constants, then gives a contradiction. logn Acknowledgement. The author is very grateful to James R. Lee, Harishchandra Ramadas, Rebecca Hoberg and Alireza Rezaei for helpful discussion and comments. 1 Here we write i (g ) to indicate that this node will depend on the choice of g . 9 References [ARV04] Sanjeev Arora, Satish Rao, and Umesh V. Vazirani. Expander flows, geometric embeddings and graph partitioning. In László Babai, editor, Proceedings of the 36th Annual ACM Symposium on Theory of Computing, Chicago, IL, USA, June 13-16, 2004, pages 222–231. ACM, 2004. [GLS93] Martin Grötschel, László Lovász, and Alexander Schrijver. Geometric algorithms and combinatorial optimization, volume 2 of Algorithms and Combinatorics. Springer-Verlag, Berlin, second edition, 1993. [GW94] Michel X. Goemans and David P. Williamson. .879-approximation algorithms for MAX CUT and MAX 2sat. In Frank Thomson Leighton and Michael T. Goodrich, editors, Proceedings of the Twenty-Sixth Annual ACM Symposium on Theory of Computing, 23-25 May 1994, Montréal, Québec, Canada, pages 422–431. ACM, 1994. [Lee05] James R. Lee. On distance scales, embeddings, and efficient relaxations of the cut cone. In Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2005, Vancouver, British Columbia, Canada, January 23-25, 2005, pages 92–101. SIAM, 2005. 10
8cs.DS
arXiv:1707.07184v2 [cs.CV] 24 Nov 2017 A survey of exemplar-based texture synthesis Lara Raad∗1 , Axel Davy†2 , Agnès Desolneux‡2 , and Jean-Michel Morel§2 1 Dept. of Information & Communications Technologies, Universitat Pompeu Fabra 2 CMLA, École normale supérieure Paris-Saclay November 28, 2017 Abstract Exemplar-based texture synthesis is the process of generating, from an input sample, new texture images of arbitrary size and which are perceptually equivalent to the sample. The two main approaches are statisticsbased methods and patch re-arrangement methods. In the first class, a texture is characterized by a statistical signature; then, a random sampling conditioned to this signature produces genuinely different texture images. The second class boils down to a clever “copy-paste” procedure, which stitches together large regions of the sample. Hybrid methods try to combine ideas from both approaches to avoid their hurdles. The recent approaches using convolutional neural networks fit to this classification, some being statistical and others performing patch re-arrangement in the feature space. They produce impressive synthesis on various kinds of textures. Nevertheless, we found that most real textures are organized at multiple scales, with global structures revealed at coarse scales and highly varying details at finer ones. Thus, when confronted with large natural images of textures the results of state-of-the-art methods degrade rapidly, and the problem of modeling them remains wide open. 1 Introduction This paper proposes a review of exemplar-based texture theory, a topic that occupied David Mumford at the end of the last century [97, 98], and again in ∗ [email protected][email protected][email protected] § [email protected] The images in this document are lossy compressed. To compare the zoomed-in images, please refer to the uncompressed pdf, which can be found at http://desolneux.perso.math. cnrs.fr/papers/exemplar-based-texture-synthesis-v2-full-res.pdf 1 his book on pattern theory [62]. Textures are ubiquitous in our visual environment. In the past fifty years their definition has occupied psychophysicists, mathematicians and computer scientists who have built increasingly sophisticated models. The main progress on the elusive topic of defining textures has come from computer graphics with the problem of reproducing other examples of the same texture given a sample. There is so far no complete mathematical theory that would, first, give a formal axiomatic of texture, and then prove that some texture synthesis algorithm matches this definition. Rather, each exemplar-based texture method formulates its own definition of texture and sometimes (but rarely) convergence or consistency proofs. The method to work on texture modeling still relies on a visual exploration of synthesized textures, their defects and successes being linked to some improvement or shortcoming of the mathematical model. All the more, texture modeling remains a valid challenge for mathematicians, as textures represent arguably the vaster and most common class of observable functions. They indeed cover a majority of the area of most digital images. This article accounts for the very rapid and impressive recent apparition of new texture synthesis methods with striking results. We shall retrace their theoretical roots. By performing objective experiments and not hiding the failures of each method, this paper will uncover some flaws in the current definition of exemplar-based texture modeling. This will lead us to propose a slightly different definition of the problem that seems to address better its challenges. The Oxford Dictionary of English defines texture as the feel, appearance, or consistency of a surface or a substance. Focusing on visual appearance, texture is analog to color, a perceived quality of a surface, where the RGB bands are replaced by the output of a specific bank of filters [62, p.215]. Julesz defined textures as classes of pictures that cannot be discriminated in preattentive vision and advanced two statistical hypotheses to characterize them [41, 38, 40]. Grenander proposed to use the term “texture” for strictly stationary stochastic processes [31, p.398]. Giving a precise definition of textures is a slippery task; in a sense, each model implicitly proposes one and as we will see the jury is still out. Exemplar-based texture synthesis is the process of generating, from an input texture sample, new texture images of arbitrary size and which are perceptually equivalent to the input. It is common to classify them under the two classical statistical estimation categories: parametric methods and non-parametric methods. The parametric methods aim at characterizing a given texture sample by estimating a set of statistics which will define an underlying stochastic process. The new images will then be samples of this stochastic process, i.e. they will have the same statistics as the input sample. The question here is: what would be the appropriate set of statistics to yield a correct synthesis for the wide variety of texture images? The results of these methods are satisfying but only on a small group of textures, and often fail when important structures are visible in the input. The non-parametric methods reorganize local neighbourhoods from the input sample in a consistent way to create new texture images. These methods return impressive visual results. Nevertheless, they of2 ten yield verbatim copies of large parts of the input sample. Furthermore, they can diverge, starting to reproduce iteratively one part of the input sample and neglecting the rest of it, thus growing what experts call “garbage”. Because “non-parametric” methods are not completely parameter-free, and “parametric” methods can have a reduced set of parameters, in this paper we will denote by patch re-arrangement methods the former and by statistics-based methods the latter. What constitutes a texture? The answer depends of course on human perception. But a mathematical formulation can be used to characterize patterns that are perceived as textures. The statistical characterization of texture images was initiated by Béla Julesz [38, 42]. Julesz was the first to point out that texture images could be reliably organized according to their N-th order statistics into groups of textures that are preattentively indistinguishable by humans [38]. (Focusing on pre-attentive vision helps to reduce the subjective impact of high level processing.) Julesz [42] demonstrated that many texture pairs sharing the same second-order statistics would not be discerned by human preattentive vision. This hypothesis constitutes the first Julesz axiom for texture perception. One consequence of this axiom is that two textures sharing the same Fourier modulus but with different phase should be perceptually equivalent. Indeed, the square Fourier modulus of an image corresponds to its spatial auto-correlation, thus the second-order statistics. This motivates a class of algorithms (the random phase methods) aiming at creating textures with a given second-order statistic. An example of such algorithms is [87]. In a more recent extension [23], a texture is generated by randomizing the Fourier phase while maintaining the Fourier modulus. The Random Phase Noise method in [23] correctly synthesizes textures with no salient details, namely microtexture, which adapt well to a Gaussian distribution, but it fails for more structured ones, macrotextures, as can be experimented in the executable paper [22]. Indeed, textures may share the same second and even third order statistics while being visually different [43, 11]. This led Julesz [40, 39] to propose a second theory to explain texture preattentive discrimination by introducing the notion of textons. Textons are local conspicuous features like bars or corners. Giving a mathematical definition for textons is far from trivial and was studied in for example [95, 17]. Julesz’ second theory states that only the first order statistics of these textons are relevant for texture perception: images having the same texton densities (thus, just a first order statistic) could not be discriminated. Texton theory proposes the main axiom that texture perception is invariant to random shifts of the textons [40]. This axiom is extensively used in the stochastic dead leaves models [61, 77, 8]. Several models of the early visual processing in mammals are based on a multiscale analysis with Gabor kernels, and are used in particular for modeling the perception of texture [5, 82, 59]. Wavelet analysis provided a natural frame for these models and resulted in effective methods for texture classification and segmentation [12, 48, 84, 60]. Heeger and Bergen [33] extended Julesz’ approach to multiscale statistics. They characterized a texture sample by the histograms of its wavelet coefficients. By enforcing the same histograms on a 3 white noise image they obtained a new multiscale exemplar-based texture synthesis method. Yet this method only measures marginal statistics. It misses important correlations between pixels across scales and orientations which are crucial to generate edges and conspicuous patterns. We refer to the on-line execution of this method [9] where some successes but many failures are evident, as is also the case for RPN [22]. Within a similar range of results, the De Bonet [14] method randomizes the initial texture image and preserves only a few statistics, namely the dependencies across scales of a multi-resolution filter bench response. Other methods are also based on statistics of wavelet coefficients or more involved multiscale image representations [69, 67, 72]. The Heeger-Bergen method was extended by Portilla and Simoncelli [69] who proposed to evaluate on the sample some 700 cross-correlations, autocorrelations and statistical moments of the wavelet coefficients. Enforcing the same statistics on synthetic images, starting from white noise, achieves striking results for a wide range of texture examples. This method, which for a decade represented the state-of-the-art for psychophysically and statistically founded algorithms is nevertheless computationally heavy, and its convergence is not guaranteed. Its results, though generally indiscernible from the original samples in a pre-attentive examination, often present blur and phantoms. Earlier, Zhu, Wu and Mumford [98] proposed to model texture images by inferring a probability distribution on a set of images with the same texture appearances and then to sample from it. To infer this probability distribution, the set of images is filtered by a pre-selected set of filters (which capture the important features of a given texture image) and their histograms are extracted. These are estimates of the marginals of the probability distribution sought for. Then the maximum entropy probability distribution is constructed matching the previous marginals. To sample from this probability distribution the Gibbs sampler is adopted, thus generating new texture images. The resulting model is a Markov random field. The limitation of this method is its practical aspect. Inferring the probability distribution and sampling from it are complex tasks. More recent work by Zhu et al. [96, 92] advanced the Julesz ensembles texture model based on a common set of statistics; they proved that this model is equivalent to FRAME in the limit of an infinite image grid. An efficient MCMC sampling method was also proposed. These two texture generators have been recently revisited with neural networks. Gatys’ texture generator [27] and DeepFrame [58] can be seen respectively as extended versions of [69] and [98], and get significantly better results. Some new neural network methods, based on generative neural networks, also get notable results [36]. All these recent methods show that the Julesz program of seeking the right statistics to characterize a texture is still well alive. It is worth mentioning that texture models can be used to complete missing parts of an image or texture inpainting. These methods rely on the definition of texture images as the realization of a random field. For inpainting this boils down to the estimation of a random texture model on the masked input image (a set of valid pixels of the image) from which a new image is sampled conditioned to some of the known values of input image. The method presented in [26, 25, 24] is particularly well adapted for micro-textures. A Gaussian model 4 is estimated on the masked input image; then the result is generated by a conditional sampling from the estimated model using the kriging estimation framework. Patch re-arrangement methods constitute a totally different category of texture synthesis algorithms. This category started by pixel re-arrangement using square patches as context. The initial Efros and Leung [19] method was inspired by Shannon’s Markov random field model for the English language [78]. In analogy with Shannon’s algorithm for synthesizing sentences, the texture is constructed pixel by pixel. For each new pixel in the reconstructed image, a patch centered in the pixel is compared to all the patches of the input sample. The patches in the sample that are similar help predict the pixel value in the synthetic image. Several optimizations have been proposed to accelerate this algorithm. Among them Wei and Levoy [90] managed to fix the shape and size of the learning patch, and Ashikhmin [3] proposed to extend existing patches whenever possible instead of searching in the entire sample texture. Yet, as already pointed out in the original paper [19], an iterative procedure may fail by producing “garbage” when the neighborhood’s size is too small. On the other hand, it can lead to a trivial verbatim reproduction of big pieces of the sample when the neighborhood is too large. This can be experimented in the online executable paper [1]. Many extensions of [19] have been proposed that manage to accelerate the procedure and reduce the “garbage” problem by stitching entire patches instead of pixels. Among the first methods proposing to re-arrange whole patches, Xu et al. [32] proposed to synthesize a texture by picking random patches from the sample texture and placing them randomly in the output texture image. A blending step is applied across the overlapping blocks to avoid edge artifacts. In [54] the authors proposed to synthesize the image by quilting together patches that were taken from the input image among those who best match the patch under construction. A blending step was also added to overcome some edge artifacts. Efros and Freeman [20] proposed an extension of the latter introducing the quilting method (a blending step) that computes a path with minimal contrast across overlapping patches, thus mitigating the transition effect from patch to patch. Kwatra et al. [47] extended [20] by using a graph-cut algorithm to define the edges of the patch to quilt in the synthesis image. Another extension of [19] was proposed by Kwatra et al. [46] where to synthesize a texture image they improve the quality of the synthesis image sequentially by minimizing a patchbased energy function. In the same spirit as [46], where texture optimization is performed, the authors in [50] proposed to synthesize textures in a multiscale framework using the coordinate maps of the sample texture at different scales. They introduced spatial randomness by applying a jitter function to the coordinates at each level, combined to a correction step inspired by [3]. One of the key strengths of the method is that it is a parallel synthesis algorithm which makes it extremely fast. These patch-based approaches often present satisfactory visual results. In particular they have the ability to reproduce highly structured textures (macrotextures). However, the risk remains of copying even several times verbatim large parts of the input sample. For practical applica5 tions this may result in the appearance of repeated patterns in the synthesized image. Furthermore, a fidelity to the global statistics of the initial sample is not guaranteed, in particular when the texture sample is not stationary. We refer to [89] for an extensive overview of the different patch re-arrangement methods. Recent research tries to revisit the use of previous methods. Using neural networks has seen some success, as well as combining patch re-arrangement and statistics-based methods to overcome the drawbacks mentioned previously [66, 81]. These approaches will be called hybrid methods. Peyré [66] proposed to use a patch-based approach where all the patches of the synthesized image are created from a sparse dictionary learnt on the input sample. Tartavel et al. [81] extended [66] by minimizing an energy that involves a sparse dictionary of patches combined to constraints on the Fourier spectrum of the input sample in a multiscale framework. Raad et al. [70] proposed to model the self-similarities of a given input texture with conditional multivariate Gaussian distributions in the patch space in a multiscale framework. A new image is generated patch by patch, where for each given patch a multivariate Gaussian model is inferred from its nearest neighbours in the patch space of the input sample, and hereafter sampled from this model. The academic literature shows that current methods are able to produce impressive texture synthesis on various kinds of textures. Our experiments will illustrate this, and the opposite. Indeed, this literature is still working, in a sense, on toy examples. Most textures are defined by texture samples of relatively small size and the structures are present in a small range of scales. When confronting the methods with more challenging data, the quality of the results degrades rapidly. This can be seen for most natural images of textures, which are non-stationary, due for example to the presence of illumination changes and perspective. As a matter of fact large photographs of textures are non-stationary because even homogeneous material always shows an internal variation of structure. Thus the classic exemplar-based texture synthesis problem can be seen in this light as an almost impossible Fourier spectrum extrapolation, given a very small texture example. Hence our exploration not only of the solutions, but of the problem itself will illustrate the limitations of the current question, and introduce a more general question: how to emulate the real, non-stationary textures, for which we dispose of large samples? Then the question is no longer to “extend” a small patch into a larger texture of the same kind, but rather to be able to fabricate other examples of a given large and complex texture, given only one sample of it. This survey concentrates on the problem of texture synthesis on flat 2D domains. There are several interesting extensions and applications of the basic problem which are not discussed here. These include surface texture synthesis, in which a texture is to be placed onto a curved surface, dynamic texture synthesis, when the goal is to generate textures whose appearance evolves over time such as for videos of time-variant materials, or solid texture synthesis, where the aim is to generate the color content of 3D blocks of synthesized materials from which, for example, computer graphics objects can be carved out. Other related problems include image completion and resolution enhancement by texture syn6 thesis. Also, the computational cost in real-time applications (e.g. games) or when the data volume is large (e.g. film production) impose further restrictions leading to particular algorithms. For a discussion of these topics, we refer the reader to Wei et al. [89] and the references therein. We now sketch our plan. We shall present the main trends in exemplarbased texture synthesis by describing in detail several methods illustrating the three main families. In each case, the strength and limitations will be commented as well as some relevant variations. Section 2 introduces the statisticsbased methods which perform statistical optimization and describes several algorithms. Then Section 3 focuses on patch re-arrangement methods, presenting three works. The third main class of hybrid methods is discussed in Section 4. The experimental Section 5 first compares the main families of algorithms in a varied set of textures; then, the limitations of all current methods are revealed with high-resolution and non-stationary examples. Finally, Section 6 concludes the paper. All the results displayed were generated for this paper, with the original code published with the methods [9, 22, 68, 28, 57, 37, 1, 71, 52] or with the modifications mentioned in this paper. 2 Statistics-based methods Statistics-based texture synthesis methods follow the general approach proposed by Julesz, illustrated in Figure 1. The synthesis is performed in two steps: first, a set of statistics is estimated from the sample texture; second, a random image is generated, subject to these statistical constraints. Methods in this class differ in the set of statistics considered and in the optimization method used to impose them on a random image. We will describe several algorithms of this class with increasing sophistication. It will appear that the number of statistics enforced plays a key role in the success. 2.1 Micro-texture synthesis by phase randomization The Random Phase Noise (RPN) method synthesizes a new texture from a rectangular sample by simply randomizing the phase of the Fourier coefficients of the input sample. The results are very satisfying for textures that are characterized by their Fourier modulus, a class called micro-texture by some authors. This method is also able to create a random texture from any input image, not necessarily a texture sample. It is in spirit quite close to the noise generators from computer graphics [65, 87]. The rest of this section describes the main ideas of this method and we refer the reader to [22] for more details and a catalog of several synthesis examples. The RPN of an image u defined on a domain Ω is obtained by adding a random phase θ to the Fourier phase of the input sample image. The random phase is a white noise image uniformly distributed over (−π, π] and is constrained to be symmetric. In the case of an RGB color image u = (uR , uG , uB ), the RPN image is obtained by adding the same random phase to the Fourier transform 7 Input Noise statistics optimization Output Figure 1: Statistics-based methods. A set of statistics is extracted from an input sample (analysis step). Then, starting with a noise image, an optimization procedure is applied to enforce these statistics on the output image (synthesis step). of each color channel. Adding the same random phase to the original phases of each color channel preserves the phase displacements between channels. This is important as it permits to create new textures without creating false colors [23]. More precisely, a uniform random phase is defined as a random image θ ∈ RM ×N satisfying the following conditions: • θ is odd: ∀m, n ∈ Ω, θ(−m, −n) = −θ(m, n); • θ(m, n) is uniform on the interval (−π, π] for (m, n) 6∈ {(0, 0), (M/2, 0), (0, N/2), (M/2, N/2)}; • θ(m, n) is uniform on the set {0, π} for (m, n) ∈ {(0, 0), (M/2, 0), (0, N/2), (M/2, N/2)}; • for every subset S of the Fourier domain which does not contain distinct symmetric points, the family of random variables {θ(m, n)|(m, n) ∈ S} is independent. The RPN of an image u ∈ RM ×N is defined as the random image X where there exists a uniform random phase θ such that X̂(ξ, η) = û(ξ, η)eiθ(ξ,η) , (ξ, η) ∈ Ω, (1) where û denotes the Fourier transform of u. An equivalent definition is X̂(ξ, η) = |û(ξ, η)|eiθ(ξ,η) , 8 (2) output output input input Figure 2: Synthesis results of the RPN method [87, 23]. This method works extremely well for micro-textures including tissues and granular textures with no geometric structures [22]. For more structured texture images it fails. Two examples are shown: a successful synthesis on the left and a failure case on the right. where θ is a uniform random phase. Given the phase φ of a real-valued image and a uniform random phase θ, the random image (θ + φ) mod 2π is also a uniform random phase, which proves this equivalence. The first definition (1) leads to a natural extension of RPN to color images [23], while the second definition (2) highlights the fact that the RPN depends only on the Fourier modulus of the sample image u. Similarly, an Asymptotic Discrete Spot Noise (ADSN) associated with an image u is defined as the convolution of a normalized zero-mean copy of u with a Gaussian white noise. A Gaussian white noise image has a uniform random phase and its Fourier modulus is a white Rayleigh noise; the phase and modulus are independent. Thus, the phase of the ADSN is a uniform random phase whereas its Fourier modulus is the pointwise multiplication of the Fourier modulus of u by a Rayleigh noise [23]. Both ADSN and RPN have uniform random phases, but the modulus distributions are different. RPN keeps the Fourier modulus of the original image, while for ADSN the Fourier modulus is degraded by a pointwise multiplication by a white Rayleigh noise. Regardless of their theoretical differences, ADSN and RPN produce results that are perceptually very similar [23]. The RPN method is the fastest method presented in this review since it basically needs the computation of two FFTs. Nevertheless, this method is limited to micro-textures and it will fail synthesizing structured textures, namely macro-textures. In Figure 2 two synthesis examples are shown. The first synthesis (left example in Figure 2) shows outstanding results. This micro-texture is indeed well represented by its Fourier modulus. However this is not at all the case for the second texture synthesis (right example in Figure 2). Clearly, the knowledge of the modulus of the Fourier coefficients of this texture is not sufficient to recover the strong contrast of the input. 9 2.2 The Heeger and Bergen pyramid based texture synthesis Heeger and Bergen [33] proposed to characterize a texture by the first order statistics of both its color and its responses to multiscale and multi-orientation filters organized in a steerable pyramid [21]. This proposition, motivated by the study of human texture perception, focuses on the synthesis of microtextures defined as images that don’t have conspicuous patterns (e.g., granite, bark, sand). Let us describe the input texture image u and the synthesized texture v using the Heeger and Bergen method. First the image u is filtered using a steerable pyramid decomposition [21, 79] with S scales and Q orientations at each scale. The steerable pyramid is a linear multiscale and multi-orientation image decomposition. Given an input image, it is first filtered to provide a high frequency image and a low frequency image. Band-pass oriented filters are then sequentially applied to the low frequency image which is also down-sampled. These band-pass oriented filters are applied S times to the corresponding low frequency image. This decomposition yields images of different sizes corresponding to the different scales and orientations on which the gray level histograms are extracted as well as the gray level histogram of u. These histograms define the set of statistics that characterize u. The second step consists in generating the output image v, which is initialized with a noise image. Its pixel values are iteratively modified to match the histograms of u and of its steerable decomposition. These histogram matchings are performed on v alternately in the image domain and in the multiscale transform domain, until all the output histograms match the ones of u. A third parameter is introduced here and it is the number of iterations used to achieve a stabilization of the histogram matching. To the best of our knowledge, no theorem guarantees that this iteration will end with an image respecting all statistics; there is of course one solution to it, namely the example image. But the goal is to create an image different from the example. Hence the random initialization, which is supposed to lead always to different samples of the same texture. This remark applies to all texture synthesis methods we will consider: their success will mainly be judged visually and experimentally. To treat RGB color images, instead of applying the method to each color channel of the input image which are highly correlated, the authors proposed to change the color space RGB to a more adapted color space. This new color space is obtained by principal component analysis of the RGB values of the input image u. In [9] a detailed explanation of the original method of Heeger and Bergen [33] is provided with a complete analysis of the steerable pyramid decomposition and the histogram matching step. The authors also provide in [9] a minor improvement in the edge handling of the convolutions as well as an experimental section illustrating the influence of the parameters, namely the number of iterations, the number of scales and the number of orientations. As we said, there is no theoretical proof of convergence of the method but 10 output output input input Figure 3: Synthesis results of the Heeger and Bergen method [33]. This method works for microtextures. For more structured texture images it fails. Two examples are shown: a successful synthesis on the left and a failure case on the right. an experimental study shows that the results tend to stabilize after five to ten iterations [9]. Increasing the number of orientations changes the results slightly, but four orientations are enough in general. The number of scales is very important. Taking the highest number permits to take into account all the scales of the texture. When the input texture has no evident structure then this parameter has less influence in the result. As our experiments here will show, the results yielded by this approach are convincing for some stochastic textures, but the method fails for most complex texture images. In particular it generally fails (visually) for quasi-periodic textures, random mosaic textures, textures having more than one dominant orientation, and textures having correlations of high frequency content over large distances. This demonstrates experimentally that all the spatial information characterizing a texture is not captured by the first order statistics of a set of linear filter outputs. In Figure 3 two synthesis examples are shown: a successful synthesis and a failure case. 2.3 FRAME: a mathematical model for textures FRAME, which stands for Filters, Random fields And Maximum Entropy, is a mathematical model of textures developed by Zhu, Wu and Mumford in [97] and [98]. It is the most mathematical solid work among the stream of work on texture modeling during that period. It puts the graphics method of Heeger and Bergen [33] in a mathematical sound setting, i.e., it has a formal statistical model, and it can match the marginal statistics. It also answers the Julesz quest by pursuing the minimum statistical constraint that are necessary. The FRAME model is based on the maximum entropy principle. It starts with a set of filters that are selected from a general filter bank to capture features of the texture. These filters are applied to observed texture images, and the histograms of the filtered images are extracted. Then, the maximum entropy principle is employed to derive a distribution f , which has in expectation the same filter responses as the original image, while being of maximum entropy. 11 More precisely, let u be an observed texture image and let F k , k = 1, . . . , K be a set of filters. Let Huk be the (discrete) histograms of the filter responses F k ∗ u, and for any image v, let Hvk be the histograms of the filter responses F k ∗ v. Zhu, Wu and Mumford seek for a distribution f (v) on images v such that Ef (Hvk ) = Huk , (3) while being of maximum entropy (i.e. while being “as random as possible”). By Lagrange Multipliers (maximization under constraints), the solution has the form ! L X K X 1 k k exp − f (v; λ) = λi Hu (i) , Z(λ) i=1 k=1 where L is the number of bins of the discrete histograms. To find the value of the parameters λ satisfying Equation (3), Zhu, Wu and Mumford use a gradient descent to find the right λ and the Gibbs sampler algorithm to sample random images v from a distribution f (·; λ). The distribution f (·; λ) defines a Markov Random Field (MRF). Finally, a stepwise algorithm is proposed to choose the filters from a general filter bank. This “filter pursuit” step is achieved thanks to the minimax entropy principle: find the set of filters such that the associated distribution f is of minimum entropy, since it is equivalent to be of minimal Kullback-Leibler divergence from the “true” underlying distribution. A detailed explanation of this fact can be found in [98]. The FRAME model was later extended, in particular with non linear filters, using the output of some layers of a neural network. It is then called DeepFrame [58], and we will talk again about it in Section 2.5. 2.4 The Portilla and Simoncelli algorithm The key issue in FRAME and in the method of Heeger and Bergen is to choose the “right” filters and the statistics that will be matched. In [69], Portilla and Simoncelli proposed an important improvement on Heeger and Bergen’s method [33]. The texture is again synthesized starting from a noise image and coercing it to have the same statistics as the input image. As we have seen, marginal statistics are not enough to capture the relations across scales and orientations. Portilla and Simoncelli proposed to match a set of joint statistics measurements of the coefficients of the steerable pyramid decomposition of the input texture. The statistics used to characterize the input texture are the autocorrelation and cross-correlation coefficients (inner and intra scales), as well as the statistical moments of order one, two, three and four of the input sample’s values. To enforce these statistics on the result, the image under construction is projected iteratively into the subspace of constraints using a gradient projection approach until stabilization. The final output image may not have exactly the same statistics as the input sample. It merely represents a local minimum. Again there is no proof of a convergence of the method anyway. 12 Portilla and Simoncelli’s technique is based on the theories of human visual perception, in particular Julesz’ hypothesis stating that two images are perceptually equivalent if and only if they agree on a set of statistic measurements. The goal is to establish the minimal set of measurements in a way that all types of textures are correctly synthesized using that set of measurements. In the same way as Heeger and Bergen’s method, the input texture sample is decomposed with a multiscale oriented linear basis: the steerable pyramid [21, 79]. For each pair of coefficients at nearby positions, orientations and scales, the average value of their product, of their magnitude product and their relative phase is measured. In addition to these parameters, some marginal statistics on the input image pixels distribution are kept: the mean, the variance, the skewness, the kurtosis and the range. The number of parameters will depend on the number of sub-band images and on the size of the neighbourhood considered to estimate the statistical constraints of the example texture. The second part of the algorithm is the synthesis step coercing to a random noise image, the measurements previously computed. The synthesized image is initialized with a Gaussian white noise image and then iteratively the algorithm alternates between: 1) constructing the steerable pyramid and enforcing the sample statistics of each sub-band image matching those of the corresponding sub-bands of the target image; 2) reconstructing an image from the pyramid and then forcing it to have the same marginal statistics as the input texture. A texture is defined as a two-dimensional stationary random field X(m, n) on a finite lattice (m, n) ∈ Ω ⊂ Z2 . Julesz’ hypothesis is the basis to connect this statistical definition to perception: there exists a set of constraint functions {φk , k = 1, . . . , K} such as if two random fields, X and Y , are identical in expectation over this set of functions then any two samples drawn from X and Y will be perceptually equivalent under some fixed comparison conditions. The importance of human perception as a fundamental criterion of equivalence between textures can be seen through this hypothesis, as well as the existence of such a set of statistical measurements capable of capturing this equivalence. To choose the set of constraint functions Portilla and Simoncelli proceeded as follows: 1. Set an initial set of constraints and synthesize a large library of texture examples; 2. Group the synthesis failures classifying them according to visual features that distinguish them from their original texture examples and keep the group with the poorest results; 3. Add a new statistical constraint to the set capturing the missing feature of the failure group; 4. Re-synthesize the failure group and verify the wanted feature is captured; otherwise go back to the previous point; 5. Verify that the original constraints are still needed; for each constraint, 13 find a texture example that fails when the constraint is removed from the set; 6. Delete the unnecessary constraint, re-synthesize the library and go back to the second point. Following this strategy, the constraint set is adapted to a reference set of textures and not just to one texture, and it is driven by perceptual criteria. The set of constraints is composed of: 1. Marginal statistics formed by: skewness and kurtosis of the low-pass images of each level of the pyramid, variance of the high-pass image of the pyramid, skewness, kurtosis, variance, mean and range of the image. The marginal statistics set the general degree of pixel intensity and their distribution. This is why they cannot be discarded from the statistics set [69]. 2. Autocorrelation of the low-band coefficients. This allows to capture the periodic structures of a texture as well as long-range correlation. Omitting this constraint from the original set yields unsatisfying results for textures having periodic or long-range correlation patterns [69]. 3. Autocorrelation and cross-correlation of the magnitude of the sub-bands. These statistics appear to be relevant because observation reveals that oriented bands have a particular behaviour concerning certain pattern and their periodicity whatever the orientation [69]. The cross-correlations kept are of each sub-band image with others of the same scale (inner cross-correlation) and of each sub-band with sub-bands at the coarser scale (intra cross-correlation). 4. Cross-correlation of the real part of the sub-bands with the real and imaginary parts of the coefficients’ phase of the coarser scale. This statistic is important to capture the strong illumination effects present in some texture images. In particular, the synthesized image looses its threedimensional effect and the shadows structure if they are not considered [69]. The set of statistics is summarized in Table 1. As mentioned previously, the number of parameters used depends on the number of scales S and orientations Q of the steerable decomposition as well as the size of the neighbourhood Na used to compute the auto-correlations. The total number of parameters is 6+1+ 2(S+1)+(S+1)(Na2 +1)/2+SQ(Na2 +1)/2+SQ(Q−1)/2+(S−1)Q2 +2(S−1)Q2 , where the terms correspond (from left to right) to: the marginal statistics of u, the variance of high pass image, the skewness and kurtosis of the low band images, the auto-correlation of the low band images, the auto-correlation of the sub band images, the inner cross-correlation of the sub band images, the intra cross-correlation of the low band images and the cross correlation of the real part of the sub band images with the real and imaginary part of the phase sub band images. In general S = 4, Q = 4 and Na = 7 are used, leading to a total of 710 parameters. 14 range of u max(u) and min(u) mean of u µ1 (u) variance of u µ2 (u) skewness of u µ3 (u)/(µ2 (u))1.5 kurtosis of u µ4 (u)/(µ2 (u))2 lowband’s skewness µ3 (ls )/(µ2 (ls ))1.5 , 1 ≤ s ≤ S + 1 lowband’s kurtosis µ4 (ls )/(µ2 (ls ))2 , 1 ≤ s ≤ S + 1 highband’s variance µ2 (h) <{ls } auto-correlation Γ<{ls } (m, n) , 1 ≤ s ≤ S + 1 |us,q | auto-correlation inner cross-correlation intra cross-correlation cross-correlation with the real part of the phase cross-correlation with the imaginary part of the phase Γ|us,q | (m, n) , 1 ≤ s ≤ S, 0 ≤ q ≤ Q − 1   0 C |us,q | , us,q , 1 ≤ s ≤ S, 0 ≤ q, q 0 ≤ Q − 1   0 C |us,q | , us+1,q , 1 ≤ s ≤ S − 1, 0 ≤ q, q 0 ≤ Q − 1 n o  0 < us+1,q s,q C < {u } , us+1,q0 , 1 ≤ s ≤ S − 1, 0 ≤ q, q 0 ≤ | | Q−1 n o  0 = us+1,q s,q C < {u } , us+1,q0 , 1 ≤ s ≤ S − 1, 0 ≤ q, q 0 ≤ | | Q−1 ( Central sample mo- µn (u) = ment 1 MN 1 MN PM −1 PN −1 j=0 u(i, j) Pi=0 M −1 PN −1 n i=0 j=0 (u(i, j) − µ1 (u)) if n = 1 if n > 1 Correlation τx,y (u) : u(m, n) 7→ u(bm − xcM , bn − ycN ) 0 ≤ m ≤ M − 1, 0 ≤ n ≤ N − 1, (x, y) ∈ Ω PM −1 PN −1 ∗ C(u, v) = M1N i=0 j=0 (u(i, j) − m(u)) (v(i, j) − m(v)) Auto-correlation Γu (x, y) = C (u, τx,y (u)) Translation operator Table 1: Summary of the set of statistical constraints for the Portilla-Simoncelli method. 15 After setting the set of statistical constraints, a sample verifying them has to be generated. Let ck be the corresponding estimated values of the constraint functions for a particular texture image. Portilla and Simoncelli [69] “samples” an image from the set of images that yield the same estimated constraints values Aφ,~ ~ c = {u : φk (u) = ck , ∀k}. To pick at random from this set the authors proposed to select at random a sample u0 from R|Ω| and then project it sequentially onto subsets of Aφ,~ ~ c . To emulate this the authors proposed a gradient projection. That is moving in the direction of the gradient of the constraint φk (v): → − v 0 = v + λk ∇φk (v) choosing λk such that φk (v 0 ) = ck . (4) → − Computing ∇φk (v) is usually simple, and it remains to find the λk that solves (4). When there are multiple solutions for λk , the one with smaller amplitude is chosen, modifying as little as possible the image. In that way, we stay as close as possible to the already projected set. When there is no solution, the λk is the one that comes closest to satisfying (4). Finally this method can be extended to the adjustment of a subset of constraints. Once the set of statistical measurements is defined and a method to sample from the Julesz’ ensemble of textures, the synthesis can be performed as explained previously. In a pre-attentive examination, the results are in general indistinct from the original texture samples. Nevertheless, on attentive examination the synthesis of structured textures often present blurry and jammed results. Long range structures are missed and the method tends to homogenize the output texture. Figure 4 shows two synthesis results. The first example (left in Figure 4) represents a quasi-periodic image where the method yields excellent results although it contains some global structures. In the second example (right in Figure 4), even though we recognize the nature of the input sample, one can observe that strong structures are missing. It is impossible to recover the lined up tiles. Increasing the number of orientations Q will improve the results since more information is captured. However for Q > 4 the improvement is hardly noticeable. The number of levels S of the steerable pyramid is the most influential parameter. Depending on the nature of the texture, it will need to be increased to capture the details at all scales. Once again, for microtextures this parameter is less influential. Finally, the size of the neighborhood Na used to compute the autocorrelation is important whenever the texture has periodic information. As we will see in Section 5, even though imperfect, the results are very impressive, as they succeed modeling most textures using a moderately large set of global statistics. This brings us to the following two questions. Is the set of statistics considered enough to describe any kind of textures? Is the optimization step enough to enforce these statistics? Fifteen years later, Gatys et al. [27] proposed a texture synthesis method based on Convolutional Neural Networks (CNN) which can be seen as an extension of Portilla and Simoncelli’s work, 16 output output input input Figure 4: Synthesis results of the Portilla and Simoncelli method [69]. It is satisfactory for many small grain textures (left) but may miss the global structure (right). where the set of statistics used is much larger and unknown; also, the optimization is performed by the backpropagation method. 2.5 Texture synthesis using CNN It is hard to define metrics to determine if two textures are similar or not according to human taste. Julesz’ conjecture that humans cannot distinguish two textures with same second order statistics was invalidated. Yet this does not rule out a more general hypothesis, according to which there is a set of low-level filters such that if two textures respect the same statistics for these filters, they are indistinguishable. Portilla and Simoncelli’s approach [69] and Zhu, Wu, and Mumford’s FRAME (Filters, Random field, And Maximum Entropy) [97, 98] can be seen as fixing a set of hand-picked filters and synthesing new textures by enforcing the response to the filters to have similar statistics. The set of filters is chosen to match human expectations about textures. However determining the exact set of filters equivalent to human vision is very hard, and both approaches use only a subset of them. Portilla and Simoncelli achieve similar statistics by iterating specific projections, starting from white noise, while FRAME achieves that with a Gibbs Sampler and some simplifications (quantizing the image intensities, etc). Recently, Convolutional Neural Networks (CNNs) have given a breath of fresh air to these approaches. CNNs are compositions of layers of convolutions, non-linearities and pooling. In the past few years, CNNs have been successfully applied in a wide variety of domains, in particular in image related tasks. Arguably, the win by a large margin of CNNs [45] in the 2012 ILSVRC challenge [75], an image classification challenge, helped spark interest of the global community to these methods. We refer the reader to the corresponding literature for more details on the working of CNNs. By taking a fully trained CNN on some visual classification task, and restricting to lower layers, one gets a set of low level filters which can directly be used for synthesizing texture, as shown in several works. The topic is quite active recently, and the question “how to best synthesize a texture with the help of neural networks” is far from being solved. In the following, we will focus 17 on two different approaches: Gatys’ texture generator [27] and DeepFrame [58]. Gatys’ approach is to minimize the distance between the Gram matrices defined by the local filter responses of the network layers, while DeepFrame generates textures by sampling from an exponential model. The use of CNNs by these new approaches solves the issues of their ancestors: first the filters do not need to be handpicked anymore, they are encoded directly by the CNN. A pre-trained CNN successful on some image-related tasks can be selected for the texture generation. The choice of the CNN and whether it is pre-trained or the weights are random, affect the result. Second, the architecture of Neural Networks eases the generation process. The statistics of all the filters can be handled at the same time, via backpropagation for example. DeepFrame needs no quantization, unlike its predecessor, and synthesizes textures at a faster speed. Because the filter responses at a given Neural Network layer also encode the image content, texture transfer – also named style transfer – can be achieved by applying the statistics of the filter responses of a source image to a target image while keeping overall the filter responses similar [29]. While initially both Gatys’ texture generator and DeepFrame used the VGG network [80] trained on ImageNet [15], more recent work obtained good results with networks with random weights [85] or by integrating the network training with the generation process [93]. The success of VGG for texture generation seems to stem from its training on an object classification task. This implies that its trained features are valuable “textons” able to discriminate shape and object features. One could imagine using a network trained to distinguish textures directly, instead of VGG. But, to the best of our knowledge, no network has been trained on an ImageNet equivalent to textures. We now take a closer look at Gatys’ texture generator and at DeepFrame. Gatys’ texture model is a generalization of Julesz’ model. It postulates that textures are described by the correlations between the neural network activations (features). Thus, by starting from random noise and imposing the correlations between the features to be the same as for a given input texture, one should get a new sample of this texture. More precisely, Gatys’s texture generator seeks to minimize the cost X E= wl ||Gl − T l ||2F l where ||.||F is the Frobenius norm, wl are weights and Gl , T l are the Gram matrices, respectively for the image and the target texture, of the feature maps of a pretrained neural network at a layer l. In [27], a custom 19-layer VGG network was used where max pooling was replaced by average pooling and the network weights were rescaled. Let Nl be the number of feature maps at layer l (this usually corresponds to the number of “channels”), and Ml the size of each feature map at layer l (Ml × Nl is the number of outputs of layer l). If we denote by Fijl , i ∈ {1 · · · , Nl }, j ∈ {1 · · · , Ml }, the j-th output with the i-th 18 feature map at layer l, then Gl  ij = M 1 Xl l l Fik Fjk . Ml k=0 The texture generator minimizes the cost via backpropagation in the network, and thus falls into a local minimum. Starting from white noise, several thousand iterations can be needed to reach visual convergence. While in [27] the features were extracted from VGG [80], a Deep Convolutional Neural Network trained on image classification tasks, in [85] it is noted that taking a pre-trained network is not necessary and a network with random weights can give satisfying results. The minimization of E is done with L-BFGS-B [94] and the bounds are set to the minima and maxima of the source texture. After convergence, the histogram of the source is enforced. To generate the results in this article, we made a few changes compared to [27]. The 19-layer VGG network used in [27] pads the outputs at every convolution layer with zeros on each layer (to have the layer outputs be the same size as the layer inputs). That, plus the fact that pixels on the border are “seen” by fewer features than the pixels in the center, means that all pixels on the image are not imposed the same distribution. If we take the same layers than in [27] (conv1_1, pool1, pool2, pool3, pool4) the top layer’s outputs (pool4) depend each on a 124 × 124 area of the source. Thus 123 pixels should be removed on each border in order to have all remaining pixels seen by the same number of features. Removing 123 pixels on each border is not sufficient however to get the same constraints on the border and the center since the neighbouring pixels affect the features, and those neighbouring pixels are not affected by the same features. Thus to generate the results in this article, we decided to both remove the padding and generate bigger images – 256 pixels more on each border – which we then crop. The impact of this change can be seen on Figure 5. Other than that, we took the same parameters. In [2] the method solves the same problem by removing the network padding and enforcing periodicity. With the default network and parameters of Gatys’ texture generator, except for the boundaries, a pixel is seen by 37504 filters. In Gatys’ method, textures are only described by the Gram matrices. The number of elements in the Gram matrices totals 352256, 176640 if we remove the redundant values (the matrices are symmetric). This number of parameters doesn’t depend on the image size, and once the Gram matrices of the source computed, the output texture can be any size. To fix some of the shortcomings of Gatys’ texture generator [27], several works complete the objective function. The method in [55] incorporates spectrum constraints to significantly improve the generation of textures with low frequency patterns. In [6] the proposed method considers spatial co-occurences of features to help handling long-range consistency constraints. In [91] it is noticed that the Gram matrices have several particularities that decrease the quality of the texture obtained in several cases with instabilities, particularly visible when generating a texture with a size different from the source. In our 19 input no padding + crop no padding padding Figure 5: This figure shows the impact of the padding in the neural network. The second image shows the result of a 1024 × 1024 generated texture without the network padding, cropped to 512 × 512, while the figures on the right show 512 × 512 sized generated results without or with padding. The same random initialization was used for all three results (and cropped for the last two results). The differences are particularly visible on the border of the pictures, since it is where each variant imposes different statistics. experiments we didn’t notice such an instability problem, although we observed some instabilities (see for example the fourth column of figure 20 and the first column of figure 22). It is possible that the instabilities are affected by the parameter choice. To solve the instability problem, the authors added to the objective function a term to force the feature maps histograms to be the same as for the source. The authors of [63] also discussed some insufficiencies of Gram matrices in the case of style transfer, and in particular proposed to shift the activations to avoid sparsity. To accelerate the speed of the texture generation, the method of [83] trains for a given texture a new CNN, which outputs new samples of the texture. The CNN is trained with the same objective function as for Gatys’ texture generator. Once the CNN is trained, generation is fast. DeepFrame’s texture generator samples from an exponential model. The model is defined by the probability density function "K # XX 1 f (u; w) = exp wk Fk (u)(x) g(u), Z(w) k=1 x∈Ω where Fk corresponds to a filter map extracted from a CNN, Ω is the image domain of u the image, Z(w) is a normalizing constant and g(u) is a reference distribution, like   1 1 2 g(u) = exp − ||u|| . 2σ 2 (2πσ 2 )|Ω|/2 In contrast, the FRAME model defined the probability density function "K # XX 1 f (u; λ) = exp λk [Fk ∗ u(x)] Z(λ) k=1 x∈Ω 20 where the (Fk )k=1..K were kernels, such as Gabor filters, or Difference of Gaussian filters, and λk was a discretization function with finite number of possible outputs. In a first phase, the DeepFrame parameters w = (wk ) are tuned for the source texture, then in a second phase new samples of the texture are generated via Langevin dynamics. While in [58] a pre-trained network is used, in the method of [93] its own network is trained on the source. While both Gatys’ texture generator and DeepFrame have a fixed texture model used to generate new samples, for which they learn parameters, a third successful CNN method to synthesize texture learns directly its model: in [36] a generative CNN is trained to synthesize new images from one or several samples of a source. The training is based on the adversarial model: a discriminator tries to distinguish the fake generated samples from true ones, while a generator creates new samples. Spatial invariance assumptions are encoded in the networks, but else, the texture model is in some sense learned by the two networks. This method can still be considered as a statistics-based method, because in some sense the discriminator checks the statistics of the texture are correct. To generate samples with this method (“SGAN” for Spatial Generative Adversarial Networks), we took the default network parameters, and applied the source histogram. We stopped after a few hundred epochs. The outputs suffer from a sort of noise pattern, which changes after every epoch. When the noise pattern was too important, we decided to select among the last twenty epochs the generator’s result with the less noise. SGAN is a recent method, and there are certainly ways to better select the parameters and reduce this noise, but this goes beyond our goals here. Recently a new extension called PSGAN (for Periodic Spatial Generative Adversarial Networks) [7] was introduced to fix some shortcomings of SGAN, in particular to improve the generation result for textures with periodic patterns. CNNs are also successful in the synthesis of images more general than textures [64, 86, 76, 18], in particular with methods relying on Generative Adversarial Networks (GAN) [30, 16, 73, 35, 88], but these methods are out of the scope of this study, which focuses on synthesizing new texture samples based on a single reference sample. These methods generally need a database of images. 3 Patch re-arrangement methods In contrast to the statistics-based methods, the patch re-arrangement methods do not attempt to characterize textures by a statistical model. Spanning from the groundbreaking work by Efros and Leung [19], this family of algorithms consists of clever heuristics to re-arrange parts of the sample texture in a random way in order to create a new texture. By copying directly from the sample image, these methods often are able to keep complex structures from the input. By the same token, the process is frequently limited to copying and the results show little innovation relative to the sample. We will illustrate the family here by the original Efros and Leung [19] algorithm, a further extension by Efros and 21 input Gatys DeepFrame SGAN input Gatys DeepFrame SGAN Figure 6: Comparison between Gatys’ texture generator [27], DeepFrame [58] and SGAN [36]. For all three methods, we used the default parameters, except that in the case of Gatys we used the method we described above where we remove the network padding and crop the result and in case of DeepFrame and SGAN, we specified the result’s histogram on the source histogram. Overall, SGAN looks the best when looking from far, but when zoomed in, Gatys seems to respect the best the local structures. Freeman [20] which incorporate more recent techniques, and a more recent CNN based method [53]. 3.1 The Efros and Leung algorithm In his foundational paper of information theory [78], Claude E. Shannon proposed to approximate the information contents of natural languages by the entropy of generative stochastic processes. He used a Markov chain to generate English text sequentially, letter by letter. Given a piece of already generated text, the next letter is sampled from the probability distribution of English text conditioned to the previous n letters. The following sequence was generated by Shannon using a third-order model: in no ist lat whey cratict froure birs grocid pondenome of demonstures of the reptagin is regoactiona of cre Although very few words are real English words, this simple model produces surprisingly good English “textures”. Inspired by Shannon’s method, Efros and Leung [19] proposed to adapt the same ideas for image texture synthesis. Efros and Leung in [19] synthesize a new texture image by considering that a pixel value depends on the values of its neighbouring pixels. The method is illustrated in Figure 7 and works as follows. For a given input texture, a 22 output input (1) (2) Figure 7: Overview of the Efros and Leung algorithm [19]. Given a texture image (left) a new image (right) is being synthesized a pixel at a time. For a pixel (m, n) (red point in the output) being synthesized the method finds all neighbourhoods in the left image that match the neighbourhood of (m, n) (dashed squares) and then chooses randomly one of the neighbourhoods (yellow square) and assigns its central pixel value to (m, n). new image is synthesized sequentially, pixel by pixel. For a pixel (m, n) being synthesized, the algorithm finds all the neighbourhoods in the input image that are similar to the neighbourhood of (m, n) up to a patch distance tolerance. Then one of these neighbourhoods is randomly chosen and its central pixel value is affected to the pixel (m, n). The neighbourhood of (m, n) is a square patch but only the known pixels (coming from the seed or already synthetized) of this patch are considered when comparing to the neighbourhoods of the input. Denoting p1 and p2 two patches of size P × P , the comparison is made using a Gaussian-weighted distance defined as 2 X 1 p1 (i, j) − p2 (i, j) Gσ (i, j), i,j Gσ (i, j) i,j  d p1 , p2 = P (5) where Gσ is a Gaussian kernel with standard deviation σ. Levina and Bickel in [51] provided a theoretical justification of Efros and Leung’s work. The Efros and Leung algorithm is based on resampling from the random field directly, without constructing an explicit model for the distribution. The authors of [51] formalized this algorithm in the framework of resampling from random fields and proved that it provides consistent estimates of the joint distribution of pixels in a window of specified size. In general the visual results are very impressive, especially for structured textures. Nevertheless this algorithm suffers from two important drawbacks: verbatim copies of the input and garbage growing (the algorithm starts reproducing iteratively one part of the example and neglects the rest). Figure 8 shows two synthesis examples. The first synthesis result illustrates a failure case. In particular one can observe the effect of garbage growing, which reproduces incoherently the right side of the wood sample texture. The second example shows 23 output output input input Figure 8: Synthesis results of the Efros and Leung method [19]. Left: the example shows the garbage growing effect. Right: the example shows the strength of this method to synthesize macrotextures. The patch size used for both synthesis is P = 40. the strength of this method when it comes to synthesize textures with conspicuous patterns as in this case the brick patterns. To illustrate the verbatim-copy regions, position and synthesis maps are used to visualize from which regions of the input texture each synthetized pixel comes from. A synthesis and the corresponding map are shown in Figure 9 (obtained with the online demo [1]). Large continuous zones are identified in the synthesis maps which corresponds to the verbatim copies produced by the method. This representation also shows that the synthesized image is indeed a re-arrangement of pieces of the input sample. Increasing the patch size P results in increasing the verbatim copied regions. However if the patch size is too small the local aspect of this method fails in recovering the global configuration of the input texture in particular for macrotextures. A second parameter of the method is the tolerance parameter ε which is used to select the most similar patches in the input image. Large tolerance values increase the garbage growing effect. The Efros and Leung method also suffers from its high computational complexity. Several optimizations have been proposed to accelerate this algorithm. Among them Wei and Levoy [90] managed to fix the shape and size of the learning patch and Ashikhmin [3] proposed to extend existing patches whenever possible instead of searching in the entire sample texture. The following section describes a particularly important extension of the method. 3.2 The Efros and Freeman algorithm Efros and Freeman’s method [20] is an extension of Efros and Leung’s. It is based on the same principle where the pixel values are conditioned to their neighbourhood values. Efros and Freeman proposed to generate a new image sequentially, patch by patch (instead of pixel by pixel) in a raster scan order as illustrated in Figure 10. At each step a patch that is only partially defined on a region called overlap region is completed. This overlap region is of width wo . This is the patch under construction. To do so a patch of the input image among 24 Figure 9: From left to right: texture sample, position map, synthesized image and synthesis map. The synthesis map shows for each synthesized patch its initial position in the texture sample. It allows then to identify exactly the verbatim copy regions (they correspond to continuous color areas of the map). This method reveals the verbatim copies of the input in the generated texture and the repetitions (garbage). those who match the patch under construction on its overlap region is randomly selected (patch selection step). An optimal boundary cut between the chosen patch (pin ) and the one under construction (pold ) is then computed across the overlap region (stitching step). This optimal boundary cut is used to construct a new patch (pnew ) by blending the (pin ) and (pold ) along the cut. There are three possible overlap regions: vertical overlap for the first row, horizontal overlap for the first column, and L-shaped overlap everywhere else (Figure 10). In the patch selection step, to select a patch pin of an input image u one computes the square distance between the overlap region of the patch pold and the corresponding regions of all the patches of u. The minimal distance Dmin is determined and pin is randomly picked among all patches whose distance to pold is lower than (1 + ε)Dmin where ε is the tolerance parameter. The squared distance image d contains at each position (m, n) the distance between pold and the patch from u according to some binary weight t that equals one in the overlap region and zero otherwise. More precisely, one has X d(m, n) = t(i, j)(pold (i, j) − u(m + i, n + j))2 . (6) i,j The patch pin of u having coordinates (m, n) is similar to the partially defined patch pold on their overlap region. To get the final patch pnew one must combine the patches pold and pin . Denoting t the binary weight for the overlap regions as in (6), then, for any binary image r such that 0 ≤ r(i, j) ≤ t(i, j), (i, j) ∈ {1, . . . , P }2 , P can be defined as the combination pnew = t pold + (1 − t) pin . The main contribution of Efros and Freeman [20] is to look for a binary shape M where the transition between pold and pnew along the boundary of the shape is 25 Vertical overlap Horizontal overlap L-shape overlap Iteration 10 Iteration 115 Iteration 239 Figure 10: Three different iterations of the synthesis process are shown. At each iteration a patch is being synthesized. This patch is represented by the pink square in the three iterations shown. From left to right the three overlap cases are represented: vertical, horizontal and L-shape. minimal. For simplicity, and to be able to use linear programming, the authors do not allow for any shape, but only for the ones whose boundaries are simple forward paths from one end to the other of the overlap region. This results in two pieces of image being sewn together along some general boundary path, hence the algorithm’s name “quilting”. This method yields very impressive visual results, in particular for highly structured textures. In terms of speed the gain is truly significant with respect to the methods which synthesize an image pixel by pixel. The patch size being larger, the risk of garbage growing is reduced compared to the Efros-Leung algorithm. Nevertheless the risk of verbatim copies remains and is even amplified. Moreover, the respect of the global statistics of the input is not guaranteed and this is quite visible when the input texture is not stationary (for example if there is a change of illumination across the image). Figure 11 shows two synthesis examples. The first one (left) shows an excellent synthesis result where the strong structures of the input are perfectly recovered. The second one (right) puts in evidence the verbatim copy of parts of the input and the garbage growing effect. To illustrate this the synthesis map of the second example is shown in Figure 12. The parameters P and ε play the same role as in Efros and Leung’s method. A third parameter, the overlap size O is used. Increasing this value tends to increase the verbatim copies of large regions. However if this value is too small then garbage growing increases. The value O = 0.25P is generally satisfactory. 3.3 High level patch re-arrangement with Convolutional Neural Networks The CNNs texture synthesis methods presented in Section 2.5 typically generated new texture samples by enforcing similar statistics on the feature maps of a pre-trained CNN. At the crossroad of patch re-arrangement methods and CNNs, lies CNNMRF [53]. What distinguishes this method to those of Section 2.5 is 26 output output input input Figure 11: Synthesis results of the Efros and Freeman method [20]. It works for microtextures but risks losing the example’s global statistics. It works for macrotextures too, but risks verbatim copies. Two examples are shown: a success (left) and a failure (right). The parameters used for are P = 80 and O = P/4. Figure 12: From left to right: texture sample, position map, synthesized image and synthesis map. The synthesis map shows for each synthesized patch its initial position in the texture sample. It puts in evidence the verbatim copy regions (they correspond to continuous color areas of the map) and the repetitions (corresponding to repeated continuous patches of the same color). that the texture samples are generated by enforcing similar patches of feature maps on selected upper layers of a pre-trained CNN. The image is then obtained with backpropagation and a smoothness constraint. More precisely, starting from random noise, an image is generated by minimizing the energy: XX E= ||ψi (F l ) − ψN N (i) (Fsl )||2 + R l i where l goes among the selected layers (relu3_1 and relu4_1 of the VGG network [80]), i goes among all the positions in the layer, ψi (F l ) represents the patch at the i-th position and ψN N (i) (Fsl ) is its best matching patch in the source according to the normalized cross-correlation. The default patch size is 3 × 3 times the number of feature maps (often referred as the number of “channels” of the layer). R is a regularizer term to impose smoothness of the resulting image. In [53], the energy also contains a term to enforce the content of the source if doing texture transfer. This term isn’t used for texture synthesis. As noted by the author, a natural seamless patch blending is obtained by 27 input no padding + crop no padding padding Figure 13: This figure shows the impact of the padding in the neural network when generating images with CNNMRF [53]. The second image shows the result of a 1024 × 1024 generated texture without the network padding, cropped to 512 × 512, while the figures on the right show 512 × 512 sized generated results without or with padding. The same random initialization was used for all three results (and cropped for the last two results). performing a patch re-arrangement on the levels of the CNN instead of doing it directly on the image, like in the other methods of this section. Similarly to what was done in Section 2.5, we removed the padding of the VGG network to generate the results of this method. Indeed if the padding is kept, the spatial invariance assumption is violated. Moreover pixels on the border of the generated images are seen by fewer features, which reinforces the violation of the spatial invariance. Thus in addition to removing the network padding, we generated bigger images and then cropped the result. On figure 13, the generated texture with the network padding and no border crop kept tends to reproduce exactly significant parts of the input on the borders. This problem doesn’t appear on the image with the padding removed and the border cropped. To generate the figures in Section 5 which features images of size 1024 × 1024, we couldn’t add 256 pixels more on each border, as was done in Section 2.5, due to memory constraints. Instead we generated images of size 1280 × 1280, which were then cropped. 4 Hybrid methods The two main approaches to texture synthesis are the statistics-based methods and the patch re-arrangement methods. In the first class, a texture is characterized by a statistical signature; then, a random sampling conditioned to this signature produces genuinely different texture images. Nevertheless, these methods often fail for macrotextures. The second class boils down to a clever “copy-paste” procedure, which stitches together verbatim copies of large regions of the example. A third kind of hybrid methods combines ideas from both approaches, leading to synthesized textures that are everywhere different from the original but with better quality than the purely statistics-based methods. We will describe one such method, its multiscale extension and the explicit combination of complementary algorithms. 28 4.1 Local Gaussian models for texture synthesis Raad et al.’s method [70] uses locally Gaussian (LG) texture model in the patch space. Each texture patch is modeled by a multivariate Gaussian distribution learned from its similar patches. Inspired by [20], the idea of searching for patches to stitch together in the original sample is maintained. However, instead of using the exact patch taken in the input texture, the stitched patch is sampled from its Gaussian model. Locally Gaussian patch models have been proved very useful in image denoising [10]. This approach permits to maintain the coherence between patches with respect to the input sample, while creating new patches that do not exist in the sample texture but are still perceptually equivalent to it. The multivariate Gaussian models involved are defined by their mean vector µ and their covariance matrix Σ. For a given patch p, of size P × P pixels, these parameters are estimated from the set of the R nearest patches Upu (nearest neighbours of p taken in u) as defined P µ = R1 ρ∈Upu ρ, (7) P t 1 Σ = R−1 (ρ − µ) (ρ − µ) . u ρ∈U p The sampled vector p0 is defined as p0 = √ X 1 aρ (ρ − µ) + µ, R − 1 ρ∈U u aρ ∼ N (0, 1), (8) p where aρ are scalar random variables associated to each patch and following a normal distribution. Note that p0 follows the distribution N (µ, Σ). These models have reasonable variances, confirming that effectively the patches simulated have an acceptable degree of innovation [70]. The new texture image is synthesized by stitching together patches sampled from multivariate Gaussian distributions (8) in the input sample patch space. The method is iterative: the patches are synthesized in a raster-scan order (top to bottom and left to right). The goal of each iteration is to generate a new patch pm,n (patch in v placed at (m, n)) that is partially defined on a region v called the overlap area (see Figure 10). The known part of the patch defines the set of patches Upum,n from which its Gaussian model is inferred. The generated v patch pm,n is then sampled as defined in (8). The last step consists in stitching v the patch into the output texture using the quilting method of [20]. This synthesis algorithm generates a texture that is perceptually equivalent to the sample texture yet not composed of patches existing in the input texture. Thus, this method reduces some of the drawbacks of the statistics-based and the patch-based methods. Indeed the method yields satisfying results for microand macro-textures, and reduces the verbatim copies of the input. However, this method remains local and is (like all patch based approaches) not forced to respect the global statistics of the texture sample. 29 output output input input Figure 14: Synthesis results of the locally Gaussian method [70]. It works well for macrotextures. As one can observe in both examples the result is slightly blurry, a characteristics of the Gaussian model. The parameters used for are P = 40, R = 30 and O = P/2. Figure 14 shows two results of the method. The algorithm remains dependent on the choice of the patch size P and of the number of nearest neighbours R as illustrated in Figure 15. These values may have to be adjusted for each texture sample. As for the overlap size a convenient value is O = P/2. If this value is too small then the region used to infer the Gaussian models is not enough. The patches used to infer the model can be very different on a high portion of the patch. The algorithm has a low computational complexity, compared for instance with classic patch-based denoising algorithms [49, 13]. An alternative to reduce the dependency of the method to the patch size is to work in a multiscale approach. 4.2 Multiscale texture synthesis methods Most real textures are organized at multiple scales: the global structure is revealed at coarse scales but important detail are present at finer ones. As we have seen, the results of patch-based methods depend strongly on the patch size. Small patch sizes may capture the finer details of the input but the resulting texture will lack global coherence. On the other hand, using large patches will maintain the global structures at the risk of a “copy-paste” effect. Furthermore, with large patches it becomes impossible to model the patch variability due to the lack of sufficient samples. This is apparent in the examples of Figure 14, where modeling patches as multivariate Gaussian vectors leads to a slightly blurry texture. A natural solution is to use a multiscale approach [46, 81, 50, 34, 70] using several patch sizes for a single texture synthesis, capturing different levels of details. This section illustrates the ideas and difficulties of a multiscale extension using as example the local Gaussian models for texture synthesis presented in the previous section [70]. The Multi-Scale Locally Gaussian (MSLG) method works at S scales and can be summarized in a few sentences. The synthesis begins at the coarsest scale (s = S − 1) using the local Gaussian method where the quilting step is replaced by a simple average of the overlapping patches. For 30 input R = 10, P = 20 R = 10, P = 30 R = 20, P = 10 R = 20, P = 20 R = 20, P = 30 R = 30, P = 10 R = 30, P = 20 R = 30, P = 30 Figure 15: Texture synthesis result for the left top corner texture image. We show the results obtained for different values of R (the number of similar patches) and P (the side patch size). From left to right P = 10, 20, 30. From top to bottom, the number of nearest neighbours is R = 10, 20, 30. All the results are obtained for an overlap of a half patch size O = P/2. 31 the remaining scales (s = S − 2, . . . , 0), a synthesis is performed by using the result of the previous scale (s + 1) and the sample image at the corresponding resolution. At each scale the synthesis is done patch by patch in a raster-scan order. Each new patch, added to the synthesized image, overlaps part of the previously synthesized patch and it is the combination of a low resolution patch and a high resolution one sampled from a multivariate Gaussian distribution. The Gaussian distribution of the high frequencies of a given patch is estimated from the high frequencies of its m nearest neighbours in the corresponding scale input image. The synthesis result of the finer scale is the desired output image. Let us denote the sample texture by u and us , s = 1, . . . , S − 1 are the zoomed out versions by a factor 2s , s = 1, . . . , S − 1. The synthesis result at each scale is denoted by vs , s = 1, . . . , S − 1 and v is the synthesis result returned by the multiscale algorithm. An additional image ṽs is needed at each scale, corresponding to a low resolution version of vs obtained by interpolating vs+1 . To estimate the parameters of the Gaussian distribution of the patch 0 0 pvms ,n being processed, the set U ums 0 ,n0 of R nearest patches in us is considered. pv s The R nearest neighbours in us to the current patch are those minimizing the L2 distance restricted to the overlap area: 0 0 m ,n 2 d(pm,n ) = us , pvs 1 X (us (m + i, n + j) − vs (m0 + i, n0 + j))2 |O| (i,j)∈O + 1 P2 P −1 X (ũs (m + i, n + j) − ṽs (m0 + i, n0 + j))2 , (9) i,j=0 where ũs denotes the low resolution of the image us , ũs = us ∗ Gσ and ṽS−1 = uS−1 ∗Gσ . In (9), the overlap area is denoted as O and the size of patch overlap is i,j fixed to P/2. On the set U ums 0 ,n0 only the high frequency of the patches pi,j us −pũs pv s is considered to infer the multivariate Gaussian distribution N (µH , ΣH ). The patch pm,n is synthesized as the combination of a low resolution patch pm,n vs ṽs yield from the previous scale with a high resolution one p ∼ N (µH , ΣH ), thus m,n pm,n vs = pṽs + p. For more details please refer to [70]. Figure 16 shows two synthesis examples. In both cases the result is satisfyingly recovering the details of the different scales for reasonable values of the patch size P = 20. However one can notice that the results are blurry with respect to the input and this effect is increased with respect to the single scale approach. 4.3 Combination of methods A smart combination of complementary methods may keep the advantages of each one. We will illustrate the methodology by combining a multiscale approach with three other methods: MSLG+EF The Multi-Scale Locally Gaussian method combined with the Efros and Freeman method. 32 output output input input Figure 16: Synthesis results of the multiscale locally Gaussian method [70]. Both examples show that the details of different scales are correctly synthesized when using a patch size P = 20. However the results are slightly blurred with respect to the input. The number of scales is S = 3 for the first example (left) and S = 2 for the second example (right). MSLG+PS The Multi-Scale Locally Gaussian method combined with the Portilla and Simoncelli method. MSLG+Gatys The Multi-Scale Locally Gaussian method combined with the Gatys et al. method. The combination of the Multi-Scale Locally Gaussian method with the Efros and Freeman method (MSLG+EF) consists of two steps. The first step synthesizes the given input u with the Multi-Scale Locally Gaussian method generating a new texture image that we denote umslg . The second step consists in applying the Efros and Freeman algorithm to the given input sample, initializing the output image that we denote uef with the image umslg . The method is basically the same as the one described in section 3.2. The only step of the algorithm that is modified is the patch selection step. In the method described in [20] at each iteration the added patch was chosen among those (in the input sample) whose overlap region was similar to the one of the patch under construction. When combining the methods, instead of only comparing the overlap areas, the entire patches are compared. Initializing the output with a first synthesis umslg enables the method to use the whole patch under construction to find a candidate in the input sample u. The candidate patch taken from u is then quilted in uef at the corresponding position with the same stitching step as in [20]. This combination allows to recover the lost resolution of the MSLG synthesis as illustrated in Figure 17. However it is not capable of masking the garbage growing effects as effectively MSLG+PS combination does. The combination of the Multi-Scale Locally Gaussian method with the Portilla and Simoncelli method (MSLG+PS) consists of two steps. In the first step, given the input image u, a new texture umslg is generated using MSLG. The second step uses PS where the initialization “noise image” is replaced by umslg generating the output image that we denote ups . As explained in section 2.4, the statistics to impose are learnt on the input u. What follows is a synthesis step where the output image is projected on the subspaces of constraints. There exist several local solutions to this projection step. When initializing PS 33 MSLG MSLG+EF input Figure 17: Synthesis results of the combination of the Multi-Scale Locally Gaussian method with the Efros and Freeman (MSLG+EF). MSLG MSLG+PS input Figure 18: Synthesis results of the combination of the Multi-Scale Locally Gaussian method with the Portilla and Simoncelli methods (MSLG+PS). with the result of MSLG, the initialization image is generally quite close to the images living in the sub-space of the whole set of constraints. Thus the result obtained is improved compared to PS images starting from a random noise image. Naturally fixing the initialization of the PS algorithm removes the randomness of the generated texture. But this is not the case since the initialization is itself random as it is generated from another random process. This combination is illustrated in Figure 18. The combination of the Multi-Scale Locally Gaussian method with Gatys’ texture generator (MSLG+Gatys) is very similar to its combination with the Portilla and Simoncelli method. The texture generator is initialized with the result of MSLG umslg , and the statistics of the target image are enforced via several iterations of backpropagation generating the output image denoted as ugatys. This combination is illustrated in Figure 19. 34 MSLG MSLG+Gatys input Figure 19: Synthesis results of the combination of the Multi-Scale Locally Gaussian method with Gatys’ texture generator (MSLG+Gatys). 5 Experiments The first part of this section compares the exemplar-based texture synthesis methods described before on a set of standard textures. These results illustrate the advantages and limitations of each one. Then, the second part attempts at the synthesis of real life and more complex textured images, revealing the shortcomings still present in all the methods when confronted with such a demanding task. 5.1 Comparative evaluation We will compare the results of the following texture synthesis methods: Random Phase Noise (RPN) [87, 23], Heeger and Bergen (HB) [33], Portilla and Simoncelli (PS) [69], Gatys (Gatys) [27], SGAN [36], Efros and Leung (EL) [19], Efros and Freeman (EF) [20], CNNMRF [53] and MSLG [70]. Figures 20 to 23 show results for various texture samples, one per column; in each figure, the first row shows the sample image and the following rows correspond, as indicated, to one of the algorithms. We focus on these original texture synthesis algorithms, and do not show the numerous variants. For several of our sample textures, these variants could get better results, but we think that showing the results of the original algorithms better underlines their intrinsic strengths and weaknesses. Similarly we won’t present the results of all the combinations of the different methods. The second to sixth rows correspond to statistics-based methods described in Section 2, namely Random Phase Noise, Heeger-Bergen, Portilla-Simoncellli, Gatys and SGAN. Early statistics-based methods: Heeger and Bergen (1995), Portilla and Simoncelli (2000) and Random Phase Noise (1991) yield good results for microtextures, i.e. textures with no conspicuous structures, as can be seen in the first texture example of Figure 20 and to a lesser extent for the second and third example. The Heeger and Bergen’s method is inspired on a model of the early visual cortex; it provides satisfying results in some cases but 35 input RPN [23] HB [33] PS [69] Gatys [27] SGAN [36] Figure 20: Comparison of texture synthesis methods. From top to bottom: input sample, Random Phase Noise (RPN) [23], Heeger and Bergen (HB) [33], Portilla and Simoncelli (PS) [69], Gatys (Gatys) [27] and SGAN [36]. 36 input EL [19] EF [20] CNNMRF [53] MSLG [70] Figure 21: Comparison of texture synthesis methods. From top to bottom: input sample, Efros and Leung (EL) [19], Efros and Freeman (EF) [20], CNNMRF [53] and MSLG [70]. 37 input RPN [23] HB [33] PS [69] Gatys [27] SGAN [36] Figure 22: Comparison of texture synthesis methods. From top to bottom: input sample, Random Phase Noise (RPN) [23], Heeger and Bergen (HB) [33], Portilla and Simoncelli (PS) [69], Gatys (Gatys) [27] and SGAN [36]. 38 input EL [19] EF [20] CNNMRF [53] MSLG [70] Figure 23: Comparison of texture synthesis methods. From top to bottom: input sample Efros and Leung (EL) [19], Efros and Freeman (EF) [20], CNNMRF [53] and MSLG [70]. 39 there is no theoretical proof of the convergence of the method. On the other hand, the RPN method yields a simple and elegant theory with no convergence issue. The visual results yield by both methods are in general satisfying for microtextures. However, for textures with local structures, the results are blurry and unsatisfying. Among these three methods, the results obtained by Portilla and Simoncelli are by far the most remarkable. These results contain recognizable configurations from the sample. This can be observed for the last texture example in Figure 20 and the first two examples in Figure 22. Notice that the Heeger and Bergen and RPN methods yield unsatisfying results for these three examples. Clearly the global statistics considered by these methods are not enough to characterize these highly structured textures. The second and third rows of the Figures 21 and 23 correspond to the patch re-arrangement methods Efros-Leung (1999) and Efros-Freeman (2001) described in Sections 3. The first three textures in Figure 21 have no conspicuous structures but are not stationary (for example, there are small changes of illumination). The Efros and Leung method, being too local, fails to recover the global characteristics of these textures. A similar and attenuated behavior is observed in Efros-Freeman’s results. The methods are significantly better than their predecessors in the presence of local structure, but have their specific problems. Efros and Leung’s results for the third and fourth texture in Figure 21 show two clear examples of garbage growing. The method has repeated a very small part of the input in an inconsistent way creating “garbage”. In general this phenomenon is more evident in Efros and Leung’s results, compared to those of Efros and Freeman. The results of Efros-Leung and Efros-Freeman for the first texture in Figure 23 show that the global organization is sometimes missed, mostly due to the fact that these methods work at a single scale. The second texture example in Figure 23 yields impressive results in the case of EfrosFreeman’s method. Nevertheless, looking carefully one can notice the verbatim copies of the piece of chalks in the input image. The hybrid method MSLG (2016) described in Section 4, whose results are on the fifth row of Figures 21 and 23, faces the same issues for the three first examples in Figure 21. This is less visible though, since the Gaussian models tend to smooth slightly the result. However, the original granularity of the input sample is lost in MSLG. As mentioned in Section 3, Efros and Leung’s and Efros and Freeman’s results depend on the patch size, while the multiscale approach (MSLG) is more robust to that parameter. When the former two methods fail to preserve global organization, MSLG, working at multiple scales, manages to preserve this organization. In the second texture example in Figure 23, MSLG avoids the verbatim copy since the patches are being sampled from their Gaussian model and therefore are different from their original patches. Nevertheless, the Gaussian model strongly smooths the output. The synthesis of the flower texture (Figure 23 third row) is very satisfying for the three methods. Finally, the pumpkin texture shows a clear example of the verbatim copy effect in the Efros-Leung and Efros-Freeman methods. The fourth row of the Figures 21 and 23 corresponds to the CNN patch re-arrangement method CNNMRF (2016) described in Section 3. By bringing the patch re-arrangement to CNN features, the blending between the patches 40 is improved. For example on the fourth texture of Figure 23, the separation between the patches are visible on the results of Efros-Freeman, which is not the case for CNNMRF. However CNNMRF suffers particularly from verbatim copies and fails to recover the global statistics of the image. Efros-Leung and Efros-Freeman do suffer less from these problems because the patch selection step for these methods picks randomly among a selection of patches, whereas CNNMRF takes the most likely patch. The recent statistics-based CNN methods, discussed in Section 2.5, show significant improvement over their predecessors. Gatys (2015) is the best statisticsbased method at respecting the fine details for all the textures of Figures 20 and 22, which can be well noticed with a zoom-in. However, some low frequencies or structure organizations are missed, as seen on the fourth texture of Figure 20, and some contrast instabilities can be noticed, for example on the first texture of Figure 22. As discussed in Section 2.5, some variants were proposed to fix these problems. SGAN (2016), on the other hand, better respects the low frequencies, and the results often look better than Gatys when zoomedout. However on the fine scale, the results are incomplete and noisy, as seen on all the textures of the Figures 20 and 22. SGAN fails to generate correctly the first texture of Figure 20, possibly because this texture has no structure and is a microtexture. It is likely that better results can be obtained by tuning the parameters, but as said in Section 2.5, the default parameters were used. Among all these methods, the CNN based methods are the most expensive in computational time. Pixel based methods, like Efros-Leung, are more expensive than patch based methods like Efros-Freeman or MSLG. The speed of statisticsbased methods depends on how global the optimization is, and on the number of iterations needed. Portilla-Simoncelli’s and Heeger-Bergen’s speeds are comparable to patch based methods, while Random Phase Noise is the cheapest of the methods reviewed here. These comparative evaluations show the strengths and weaknesses of the different original methods described in this survey. As said previously, some variants of these methods can get better results on some pictures. For example, a better result for the fourth texture of the Figure 20 can be seen on Figure 19. For this texture, first generating with MSLG, then refining with Gatys’ texture generator, enables to combine the best of both algorithms: The fabric elements are well aligned, and look good at a fine scale. Overall, over the last three decades, tremendous progress was made to generate convincing new texture samples from a small and stationary texture sample. However one could argue that the samples used in this comparison are toy examples. Indeed, except for the third texture of Figure 20, and fourth texture of Figure 22, the samples do not suffer much of illumination changes or perspective, and are essentially stationary. Nevertheless, most textures are not stationary. Think for example of a wood texture. This leads us to wonder whether the presented algorithms get acceptable results on these complex scenarios. 41 crop 1 crop 2 Figure 24: Two crops of different parts of a larger wood texture. The cropped images are of size 500 × 500 pixels. Each one represents a different texture belonging to a single “big texture”. 5.2 Getting out of toy examples The previous examples present some quite impressive texture synthesis results by several algorithms. The texture synthesis problem seems to be almost solved for “academic” textures. Still, those results were obtained for pictures of relatively small size and taken in almost ideal conditions, in order to get almost stationary textures. In this section, we discuss the situation for more complex textures: When the same methods are applied to sample images of real and non-stationary textures, where long-range structure is present as well as varying detail at every scale. Figures 24 and 25 show some realistic examples of real world images that nobody would hesitate calling textures. Nevertheless on second thoughts they do have a complex, non-stationary structures, because every large enough image has it. But these are precisely the examples that need being emulated! In this endeavor, we can relax the requirement that the synthesis must make a larger image. Let’s just ask if a method is able to reproduce a perceptually similar texture at the very same size. Each of textures in Figures 24 and 25 show different salient sub-textures within the same image. Since the methods in Section 5.1 usually assume that the texture is stationary, it is not completely fair to use these methods on these samples. Several works have investigated ways to handle these complex cases [74, 4, 44, 56]. In this section we show the results of the state of the art algorithms presented in this paper, and will show that they are still far from emulating to real world textures, even without the requirement of building a larger texture patch from the sample. Figures 26 and 27 show the results of the presented statistics-based, patch rearrangement and hybrid methods on some of these more complex examples. The best results are Gatys’ texture generator on the second texture and MSLG+PS and MSLG+Gatys on the first texture and fourth texture. When applying RPN or PS to them the results obtained are often too blurry. Gatys’ texture 42 crop 1 crop 2 Figure 25: Two crops of different parts of a larger stone texture. The cropped images are of size 512 × 512 pixels. Each one represents a different texture belonging to a single “big texture”. generator fails to catch the low frequency structures for the last two textures. EF, CNNMRF and MSLG suffer from garbage growing and verbatim copies on the first three textures. This is true especially when the input is not stationary. SGAN fails to generate properly on the first two textures, and while the global organization of the third and fourth pictures is good, it suffers from the noise at small scale mentioned previously. As noticed in the previous section, the MSLG results are slightly blurry. These results show that while some methods can get good results on some of these challenging texture samples, no method manages to get satisfying results for all four textures. 6 Conclusion With the multiplication of applications in computer graphics to the entertainment industry, the interest in the generation of synthetic objects with realistic texture has grown rapidly. High budget film sets, computer games, and in some cases digital art, spend intensive human efforts to imitate the appearance and feel of real world items. For this reason, exemplar-based texture synthesis has been the focus of intensive work for three decades. And as the available computational power increased, so has the sophistication of these methods. In the end of the last millennium, statistics-based methods, such as RPN, Heeger-Bergen and Portilla-Simoncelli focused on a reduced set of statistics. The results were quite satisfactory on micro-textures, but could be blurry and far from the originals for more complex structures. Patch re-arrangement methods, such as Efros-Leung and Efros-Freeman, managed to respect significantly better the feel and the low level structures of these textures, but could have issues, such as discontinuities, verbatim copy, garbage growing or simply not respecting some essential statistics of the textures, such as the average intensity. Hybrid 43 input RPN [23] PS [69] Gatys [27] SGAN [36] EF [20] CNNMRF [53] Figure 26: Synthesis results for statistical based and patch re-arrangement methods on complex texture. They show the current limitations of all best methods. RPN scrambles the textures. PS loses long range coherence of the wood veins. EF and CNNMRF’s copy paste is quite visible for all textures and incurs in garbage growing. PS and Gatys have satisfying results on the left hand two textures, but miss to emulate long range interactions on the wood textures. SGAN grows periodic noise patterns. 44 input MSLG MSLG+EF MSLG+PS MSLG+Gatys Figure 27: Synthesis results for the hybrid methods. In columns 2) and 3), MSLG has repetitions and garbage growing; thus all the generated results based on the MSLG outputs keep this defect. In columns 1) and 4), MSLG respects well the global statistics of the textures, and the combination with other methods indeed improves the result. MSLG+PS and MSLG+Gatys perform better on these examples than MSLG+EF. 45 methods, such as MSLG, fix some of the issues of patch re-arrangement methods, but still share some of their issues. Very recently, statistics-based methods have been revisited with Convolutional Neural Networks (CNNs). CNN based methods significantly increase the number of texture statistics involved in their model, for example by a factor of 25 approximately in the case of Gatys’ texture generator compared to Portilla-Simoncelli. The results show a spectacular progress over their predecessors, but no method is perfect yet. Patch rearrangement methods were revisited as well by CNNs. CNNMRF improves the blending between the image patches, but the results still suffer from the problems mentioned above for patch re-arrangement methods. In this review, we presented three statistics-based neural methods with different models: Gatys’ texture generator, DeepFrame and SGAN. When zoomed-in, the outputs of Gatys’ texture generator are the best among the statistics-based methods, but miss some important low frequency constraints of the texture when zoomed-out. Some variants aim at fixing this shortcoming. SGAN succeeds better on several examples to respect the global structure of the texture, but the details of the texture are poor. While all the other statistics-based methods have an explicit texture model, the SGAN model is more implicit. Our experimental results look no doubt sometimes worse than in the original papers, but precisely we did not select the best examples. Our examination of the history of the method leads to the following conclusions. - The exemplar-based texture synthesis problem is implicitly ill-posed, as it requires to extrapolate a Fourier spectrum by enlarging the image given a very small sample of it. Having very small samples may have been historically interesting in computer graphics, but is no longer a technical issue, given the available memories and computational power in all computers. - By working on small texture examples the literature has somehow unrealistically restricted the problem. Indeed it is simply not true that textures are as stationary as those examples suggest. - When trying to work on larger examples, we have seen that no texture sample is really stationary. A realistically large texture sample in fact contains smaller patches of very different textures. - This explains first why patch based copy-paste methods are doomed in spite of some apparent success in some quasi-periodic texture with no conspicuous detail. On more involved samples, they cannot but reproduce recognizable details. - This also explains why progress in this topic is linked to the design of methods enforcing more and more statistical parameters. The number of statistics enforced by statistical models is growing fast: 710 for Portilla-Simoncelli, 176640 for the default model in Gatys’ texture generator. With some results showing that the filters can be chosen with random weights [85], one can wonder if the solution is not to just use the highest number of statistics possible to emulate a texture. One may also wonder where to draw a reasonable limit between synthesizing complex textures and rendering scenes containing textured objects. - Thus, the Portilla-Simoncelli method, of enforcing a high number of statistics, wins, but it is somewhat a Pyrrhic victory. Indeed, the more random statis46 tics we pile up, the better the exemplar-based results. But it remains to find numerical tools applying automatically an Occam’s razor as Portilla and Simoncelli did manually. This is still needed to realize the goal of Julesz’ program, which was to find the minimal sufficient set of statistics rendering two textures indistinguishable. Acknowledgements We thank Rafael Grompone von Gioi for valuable corrections and suggestions, Arthur Leclaire and Yang Lu for their feedback and for helping produce some of the experiments, and the anonymous referees for valuable advice. References [1] Cecilia Aguerrebere, Yann Gousseau, and Guillaume Tartavel. Exemplarbased texture synthesis: the Efros-Leung algorithm. Image Processing On Line, 2013:213–231, 2013. [2] Miika Aittala, Timo Aila, and Jaakko Lehtinen. Reflectance modeling by neural texture synthesis. ACM Transactions on Graphics, 35(4), 2016. [3] Michael Ashikhmin. Synthesizing natural textures. In Proceedings of the 2001 symposium on Interactive 3D graphics, pages 217–226. ACM, 2001. [4] Abdourrahmane M. Atto, Zhangyun Tan, Olivier Alata, and Maxime Moreaud. Non-stationary texture synthesis from random field modeling. In Image Processing (ICIP), 2014 IEEE International Conference on, pages 4266–4270. IEEE, 2014. [5] James R. Bergen and Edward H. Adelson. Visual texture segmentation based on energy measures (a). Journal of the Optical Society of America A, 3, 1986. [6] Guillaume Berger and Roland Memisevic. Incorporating long-range consistency in cnn-based texture generation. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. [7] Urs Bergmann, Nikolay Jetchev, and Roland Vollgraf. Learning texture manifolds with the periodic spatial gan. arXiv preprint arXiv:1705.06566, 2017. [8] Charles Bordenave, Yann Gousseau, and François Roueff. The dead leaves model: a general tessellation modeling occlusion. Advances in Applied Probability, pages 31–46, 2006. [9] Thibaud Briand, Jonathan Vacher, Bruno Galerne, and Julien Rabin. The Heeger & Bergen pyramid based texture synthesis algorithm. Image Processing On Line, 4:276–299, 2014. 47 [10] Antoni Buades, Marc Lebrun, and Jean-Michel Morel. Implementation of the “Non-Local Bayes” (NL-Bayes) Image Denoising Algorithm. Image Processing On Line, 2013:1–42, 2013. [11] Terry Caelli and Béla Julesz. Experiments in the visual perception of texture. Biol. Cybernetics, 28:167–175, 1978. [12] Tianhorng Chang and C. C. Jay Kuo. Texture analysis and classification with tree-structured wavelet transform. IEEE Transactions on Image Processing, 2(4):429–441, 1993. [13] Kostadin Dabov, Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Image denoising by sparse 3-D transform-domain collaborative filtering. Image Processing, IEEE Transactions on, 16(8):2080–2095, 2007. [14] Jeremy S. De Bonet. Multiresolution sampling procedure for analysis and synthesis of texture images. In Proceedings of the 24th annual conference on Computer graphics and interactive techniques, pages 361–368. ACM Press/Addison-Wesley Publishing Co., 1997. [15] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. [16] Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in neural information processing systems, pages 1486–1494, 2015. [17] Agnès Desolneux, Lionel Moisan, and Samuel Ronsin. A compact representation of random phase and Gaussian textures. In 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2012. [18] Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. In Advances in Neural Information Processing Systems, pages 658–666, 2016. [19] Alexei Efros, Thomas K. Leung, et al. Texture synthesis by non-parametric sampling. In Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, volume 2, pages 1033–1038. IEEE, 1999. [20] Alexei A. Efros and William 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. [21] William T. Freeman and Edward H. Adelson. The design and use of steerable filters. IEEE Transactions on Pattern analysis and machine intelligence, 13(9):891–906, 1991. 48 [22] Bruno Galerne, Yann Gousseau, and Jean-Michel Morel. Micro-texture synthesis by phase randomization. Image Processing On Line, 2011, 2011. [23] Bruno Galerne, Yann Gousseau, and Jean-Michel Morel. Random phase textures: Theory and synthesis. Image Processing, IEEE Transactions on, 20(1):257–267, 2011. [24] Bruno Galerne and Arthur Leclaire. An Algorithm for Gaussian Texture Inpainting. submitted to Image Processing Online, (7):1–16, 2017. https: //doi.org/10.5201/ipol.2017.198. [25] Bruno Galerne and Arthur Leclaire. Texture Inpainting using Efficient Gaussian Conditional Simulation. SIAM Journal on Imaging Sciences, 10:1446–1474, 2017. https://doi.org/10.1137/16M1109047. [26] Bruno Galerne, Arthur Leclaire, and Lionel Moisan. Microtexture inpainting through Gaussian conditional simulation. In 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1204–1208. IEEE, 2016. [27] Leon Gatys, Alexander S. Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. In Advances in Neural Information Processing Systems, pages 262–270, 2015. [28] Leon Gatys, Alexander S. Ecker, and Matthias Bethge. Code to synthesise textures using convolutional neural networks as described in gatys et al. 2015. https://github.com/leongatys/DeepTextures, 2015–2016. [29] Leon Gatys, Alexander S. Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2414–2423, 2016. [30] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David WardeFarley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [31] Ulf Grenander. General Pattern Theory. Oxford University Press, 1993. [32] Baining Guo, Harry Shum, and Ying-Qing Xu. Chaos mosaic: Fast and memory efficient texture synthesis. Microsoft research paper MSR-TR2000-32, 2000. [33] David J. Heeger and James R. Bergen. Pyramid-based texture analysis/synthesis. In Proceedings of the 22nd annual conference on Computer graphics and interactive techniques, pages 229–238. ACM, 1995. [34] Aaron Hertzmann, Charles E. Jacobs, Nuria Oliver, Brian Curless, and David H. Salesin. Image analogies. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pages 327– 340. ACM, 2001. 49 [35] Daniel Jiwoong Im, Chris Dongjoo Kim, Hui Jiang, and Roland Memisevic. Generating images with recurrent adversarial networks. arXiv preprint arXiv:1602.05110, 2016. [36] Nikolay Jetchev, Urs Bergmann, and Roland Vollgraf. Texture synthesis with spatial generative adversarial networks. arXiv preprint arXiv:1611.08207, 2016. [37] Nikolay Jetchev, Urs Bergmann, and Roland Vollgraf. Spatial generative adversarial networks. https://github.com/zalandoresearch/spatial_ gan, 2016–2017. [38] Béla Julesz. Visual pattern discrimination. Transactions on, 8(2):84–92, 1962. Information Theory, IRE [39] Béla Julesz. Textons, the elements of texture perception, and their interactions. Nature, 290(5802):91–97, 1981. [40] Béla Julesz. A theory of preattentive texture discrimination based on firstorder statistics of textons. Biological cybernetics, 41(2):131–138, 1981. [41] Béla Julesz. Dialogues on Perception. The MIT Press, 1995. [42] Béla Julesz, Edgar N. Gilbert, Larry A. Shepp, and Harry L. Frisch. Inability of humans to discriminate between visual textures that agree in second-order statistics—revisited. Perception, 2(4):391–405, 1973. [43] Béla Julesz, Edgar N. Gilbert, and Jonathan D. Victor. Visual discrimination of textures with identical third-order statistics. Biological Cybernetics, 31(3):137–140, 1978. [44] Alexandre Kaspar, Boris Neubert, Dani Lischinski, Mark Pauly, and Johannes Kopf. Self tuning texture optimization. In Computer Graphics Forum, volume 34, pages 349–359. Wiley Online Library, 2015. [45] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [46] Vivek Kwatra, Irfan Essa, Aaron Bobick, and Nipun Kwatra. Texture optimization for example-based synthesis. In ACM Transactions on Graphics (TOG), volume 24, pages 795–802. ACM, 2005. [47] Vivek Kwatra, Arno Schödl, Irfan Essa, Greg Turk, and Aaron Bobick. Graphcut textures: image and video synthesis using graph cuts. In ACM Transactions on Graphics (ToG), volume 22, pages 277–286. ACM, 2003. [48] Andrew Laine and Jian Fan. Texture classification by wavelet packet signatures. IEEE Transactions on Pattern Analysis and Machine Intelligence, 15(11):1186–1191, 1993. 50 [49] Marc Lebrun, Antoni Buades, and Jean-Michel Morel. A nonlocal Bayesian image denoising algorithm. SIAM Journal on Imaging Sciences, 6(3):1665– 1688, 2013. [50] Sylvain Lefebvre and Hugues Hoppe. Parallel controllable texture synthesis. ACM Transactions on Graphics (TOG), 24(3):777–786, 2005. [51] Elizaveta Levina and Peter J. Bickel. Texture synthesis and nonparametric resampling of random fields. The Annals of Statistics, 34(4):1751–1773, 2006. [52] Chuan Li and Michael Wand. Code for paper ”combining markov random fields and convolutional neural networks for image synthesis”. https:// github.com/chuanli11/CNNMRF, 2015–2016. [53] Chuan Li and Michael Wand. Combining markov random fields and convolutional neural networks for image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2479–2486, 2016. [54] Lin Liang, Ce Liu, Ying-Qing Xu, Baining Guo, and Heung-Yeung Shum. Real-time texture synthesis by patch-based sampling. ACM Transactions on Graphics (ToG), 20(3):127–150, 2001. [55] Gang Liu, Yann Gousseau, and Gui-Song Xia. Texture synthesis through convolutional neural networks and spectrum constraints. In 23rd International Conference on Pattern Recognition, ICPR 2016, Cancún, Mexico, December 4-8, 2016, pages 3234–3239. IEEE, 2016. [56] Yitzchak David Lockerman, Basile Sauvage, Rémi Allègre, Jean-Michel Dischler, Julie Dorsey, and Holly E Rushmeier. Multi-scale label-map extraction for texture synthesis. ACM Trans. Graph., 35(4):140–1, 2016. [57] Yang Lu, Song-Chun Zhu, and Ying Nian Wu. Code for Learning FRAME Models Using CNN Filters. http://www.stat.ucla.edu/~yang. lu/project/deepFrame/main.html. [58] Yang Lu, Song-Chun Zhu, and Ying Nian Wu. Learning FRAME Models Using CNN Filters. In Thirtieth AAAI Conference on Artificial Intelligence, 2016. [59] Jitendra Malik and Pietro Perona. Preattentive texture discrimination with early vision mechanisms. Journal of the Optical Society of America A, 7(5):923–932, 1990. [60] B.S. Manjunathi and W. Y. Ma. Texture features for browsing and retrieval of image data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(8):837–842, 1996. 51 [61] Georges Matheron. Schéma booléen séquentiel de partition aléatoire. Rapport technique N-83, Centre de Morphologie Mathématique, École des Mines de Paris, 214, 1968. [62] David Mumford and Agnès Desolneux. Pattern Theory: The Stochastic Analysis of Real-World Signals. A K Peters, Ltd., 2010. [63] Roman Novak and Yaroslav Nikulin. Improving the neural algorithm of artistic style. arXiv preprint arXiv:1605.04603, 2016. [64] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. [65] Ken Perlin. An image synthesizer. ACM Siggraph Computer Graphics, 19(3):287–296, 1985. [66] Gabriel Peyré. Sparse modeling of textures. Journal of Mathematical Imaging and Vision, 34(1):17–31, 2009. [67] Gabriel Peyré. Texture synthesis with grouplets. IEEE Trans. Pattern. Anal. Mach. Intell., 4(32):733–746, 2010. [68] Javier Portilla and Eero P. Simoncelli. Representation and synthesis of visual texture. http://www.cns.nyu.edu/~lcv/texture/. [69] Javier Portilla and Eero P. Simoncelli. A parametric texture model based on joint statistics of complex wavelet coefficients. International Journal of Computer Vision, 40(1):49–70, 2000. [70] Lara Raad, Agnès Desolneux, and Jean-Michel Morel. A conditional multiscale locally Gaussian texture synthesis algorithm. Journal of Mathematical Imaging and Vision, 56(2):260–279, 2016. [71] Lara Raad and Bruno Galerne. Efros and freeman image quilting algorithm for texture synthesis. IPOL Journal, 7:1–22, 2017. [72] Julien Rabin, Gabriel Peyré, Julie Delon, and Marc Bernot. Wasserstein barycenter and its application to texture mixing. In Scale Space and Variational Methods in Computer Vision, volume 6667 of Lecture Notes in Computer Science, pages 435–446. Springer Berlin / Heidelberg, 2012. [73] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [74] Amir Rosenberger, Daniel Cohen-Or, and Dani Lischinski. Layered shape synthesis: automatic generation of control maps for non-stationary textures. In ACM Transactions on Graphics (TOG), volume 28, page 107. ACM, 2009. 52 [75] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. [76] Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. Pixelcnn++: Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. [77] Jean Serra. Image analysis and mathematical morphology, v. 1. Academic press, 1982. [78] Claude E. Shannon. A mathematical theory of communication. Bell System Technical Journal, 27(3):379–423, 1948. [79] Eero P. Simoncelli and William T. Freeman. The steerable pyramid: a flexible architecture for multi-scale derivative computation. In ICIP (3), pages 444–447, 1995. [80] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [81] Guillaume Tartavel, Yann Gousseau, and Gabriel Peyré. Variational texture synthesis with sparsity and spectrum constraints. Journal of Mathematical Imaging and Vision, 52(1):124–144, 2014. [82] M. R. Turner. Texture discrimination by Gabor functions. Biological Cybernetics, 55:71–82, 1986. [83] Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, and Victor Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In Int. Conf. on Machine Learning (ICML), 2016. [84] M. Unser. Texture classification and segmentation using wavelet frames. IEEE Transactions on Image Processing, 4(11):1549–1560, 1995. [85] Ivan Ustyuzhaninov, Wieland Brendel, Leon Gatys, and Matthias Bethge. What does it take to generate natural textures? In Proceedings of the International Conference on Learning Representations (ICLR), 2017. [86] Aaron van den Oord, Nal Kalchbrenner, Lasse Espeholt, koray kavukcuoglu, Oriol Vinyals, and Alex Graves. Conditional image generation with pixelcnn decoders. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 4790–4798. Curran Associates, Inc., 2016. [87] Jarke J. van Wijk. Spot noise texture synthesis for data visualization. In SIGGRAPH ’91, pages 309–318, New York, NY, USA, 1991. ACM. 53 [88] Xiaolong Wang and Abhinav Gupta. Generative image modeling using style and structure adversarial networks. In European Conference on Computer Vision, pages 318–335. Springer, 2016. [89] Li-Yi Wei, Sylvain Lefebvre, Vivek Kwatra, and Greg Turk. State of the art in example-based texture synthesis. In Eurographics 2009, State of the Art Report, EG-STAR, pages 93–117. Eurographics Association, 2009. [90] Li-Yi Wei and Marc Levoy. Fast texture synthesis using tree-structured vector quantization. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 479–488. ACM Press/AddisonWesley Publishing Co., 2000. [91] Pierre Wilmot, Eric Risser, and Connelly Barnes. Stable and controllable neural texture synthesis and style transfer using histogram losses. arXiv preprint arXiv:1701.08893, 2017. [92] Ying Nian Wu, Song-Chun Zhu, and Xiuwen Liu. Equivalence of Julesz ensembles and FRAME models. International Journal of Computer Vision, 38(3):247–265, 2000. [93] Jianwen Xie, Yang Lu, Song-Chun Zhu, and Ying Nian Wu. A theory of generative convnet. In International Conference on Machine Learning, pages 2635–2644, 2016. [94] Ciyou Zhu, Richard H. Byrd, Peihuang Lu, and Jorge Nocedal. Lbfgs-b: Fortran subroutines for large-scale bound constrained optimization. Report NAM-11, EECS Department, Northwestern University, 1994. [95] Song-Chun Zhu, Cheng-en Guo, Yizhou Wang, and Zijian Xu. What are Textons? International Journal of Computer Vision, 62(1–2):121–143, 2005. [96] Song-Chun Zhu, Xiu Wen Liu, and Ying Nian Wu. Exploring texture ensembles by efficient Markov Chain Monte Carlo – toward a “trichromacy” theory of texture. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(6):554–569, 2000. [97] Song-Chun Zhu, Ying Nian Wu, and David Mumford. Minimax entropy principle and its application to texture modeling. Neural computation, 9(8):1627–1660, 1997. [98] Song-Chun Zhu, Ying Nian Wu, and David Mumford. Filters, random fields and maximum entropy (frame): Towards a unified theory for texture modeling. International Journal of Computer Vision, 27(2):107–126, 1998. 54
1cs.CV
TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS arXiv:1705.03047v2 [math.AP] 31 Jul 2017 MICHAEL RUZHANSKY AND CHIARA TARANTO Abstract. In this paper we consider the wave equations for hypoelliptic homogeneous left-invariant operators on graded Lie groups with time-dependent Hölder (or more regular) non-negative propagation speeds. The examples are the timedependent wave equation for the sub-Laplacian on the Heisenberg group or on general stratified Lie groups, or p-evolution equations for higher order operators on Rn or on groups, already in all these cases our results being new. We establish sharp well-posedness results in the spirit of the classical result by Colombini, de Giorgi and Spagnolo. In particular, we describe an interesting local loss of regularity phenomenon depending on the step of the group (for stratified groups) and on the order of the considered operator. 1. Introduction In this paper we are interested in the well-posedness of the following Cauchy problem:  2  ∂t u(t, x) + a(t)Ru(t, x) = 0, (t, x) ∈ [0, T ] × G, (1.1) u(0, x) = u0 (x), x ∈ G,  ∂ u(0, x) = u (x), x ∈ G, t 1 for the time-dependent propagation speed a = a(t) ≥ 0. In the case of G = Rn and R = −∆, the equation (1.1) is the usual wave equation with the time-dependent propagation speed and its well-posedness results for Hölder regular functions a have been obtained by Colombini, de Giorgi and Spagnolo in their seminal paper [7]. Moreover, it has been shown by Colombini and Spagnolo in [13] and by Colombini, Jannelli and Spagnolo in [8] that even in the case of G = R and d2 ∞ if a ∈ C ∞ R = − dx 2 the Cauchy problem (1.1) does not have to be well-posed in C is not strictly positive or if it is in the Hölder class a ∈ C α for 0 < α < 1. In this paper we obtain new results for the following situations: (i) G = Hn is the Heisenberg group and R is the positive Kohn-Laplacian on G. (ii) G is a stratified Lie group and R is a (positive) sub-Laplacian on G. (iii) G is a graded Lie group in the sense of Folland and Stein [24] and R is any positive Rockland operator on G, i.e. any positive left-invariant homogeneous hypoelliptic differential operator on G. 2010 Mathematics Subject Classification. 35L05, 35L30, 43A70, 42A80. Key words and phrases. Sub-Laplacian, Rockland operator, Gevrey spaces, wave equation, Heisenberg group, graded groups. The first author was supported in parts by the EPSRC grant EP/K039407/1 and by the Leverhulme Grant RPG-2014-02. No new data was collected or generated during the course of research. 1 2 M. RUZHANSKY AND C. TARANTO In fact, our results are for the latter case (iii), the former two cases (i) and (ii) being its special cases. In particular, already in the cases of G being the Euclidean space Rn , the Heisenberg group Hn , or any stratified Lie group, the case (iii) above allows one to consider R to be an operator of any order, as long as it is a positive left(or right-) invariant homogeneous hypoelliptic differential operator. In the case of Rn these cases of so-called p-evolution equations have been studied in e.g. [4, 5, 6], however, for more restrictive conditions on a(t) than those considered in this paper. For a(t) ≡ 1 and G being the Heisenberg group Hn with R being the positive subLaplacian, the wave equation (1.1) was studied by Müller and Stein [36] and Nachman [37]. Other noncommutative settings with a(t) ≡ 1 have been analysed as well, see e.g. Helgason [30]. For G being a compact Lie group and −R any Hörmander’s sum of squares on G the problem (1.1) was studied in [27], and so the results of the present paper provide a nilpotent counterpart of the results there. Apart from an independent interest of the subelliptic setting of stratified or graded Lie groups, these settings are the model cases for many corresponding problems for general partial differential operators on manifolds in view of the celebrated lifting theorem of Rothschild and Stein [41]. From the point of view of the time-dependent coefficient a(t), we aim at carrying out the comprehensive analysis, thus distinguishing between the following four cases: Case 1: a ∈ Lip([0, T ]), a(t) ≥ a0 > 0; Case 2: a ∈ C α ([0, T ]), 0 < α < 1, a(t) ≥ a0 > 0; Case 3: a ∈ C l ([0, T ]), l ≥ 2, a(t) ≥ 0; Case 4: a ∈ C α ([0, T ]), with 0 < α < 2, a(t) ≥ 0. The first case is the simplest situation while in the forth case we have an irregular coefficient that is allowed to be zero at some points. The second and third situations are ‘intermediate’ cases, in the sense that we have either the regularity or the strict positivity. We distinguish between these cases because the results and methods of proofs are rather different. We note that if the operator R is not elliptic, the local approach to the Cauchy problem (1.1) is problematic since the equation is only weakly hyperbolic already in Case 1 above. Consequently, since the equation (1.1) in local coordinates is the space-dependent variable multiplicities problem, very little is known about its wellposedness. In this direction, only very special results for some second order operators are available, see e.g. Nishitani [38] or Melrose [34]. Non-Lipschitz coefficients have been also much analysed, see e.g. Colombini and Métivier [11] or Colombini and Lerner [10]. In addition to already mentioned restrictions for the well-posedness, see also Colombini and Métivier [12] for a recent overview from the point of view of systems. In the case of Rn and −R being the Laplacian, the regularity of a less than Hölder such as discontinuous or measure-valued a have been considered in [28]. However, such low regularity requires very different methods, and this problem for the general Cauchy problem (1.1) will be considered elsewhere. Wave equations with time dependent coefficients for general densely defined operators with discrete spectrum acting in Hilbert spaces have been considered in [42]. However, that setting is different from the present one since the spectrum in our situation is continuous. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 3 To formulate our results, let us briefly introduce some necessary notation following, for example, Folland and Stein [24]. Let G be a graded Lie group, i.e. a connected simply connected Lie group such that its Lie algebra g has a vector space decomposition g = ⊕∞ j=1 Vj , (1.2) such that all but finitely many of the Vj ’s are {0} and [Vi , Vj ] ⊂ Vi+j . A special case analysed in detail by Folland [21] is of stratified Lie groups when the first stratum V1 generates g as an algebra, see also Folland and Stein [23]. A typical example of such Lie group is the Heisenberg group. In general, graded Lie groups are necessarily homogeneous and nilpotent. Moreover, any graded Lie group can be viewed as some Rn with a polynomial group law. We can also refer to [19, Section 3.1] for a detailed discussion of graded Lie groups and their properties. Let R be a positive Rockland operator on G, that is, a positive (in the operator sense) left-invariant differential operator which is homogeneous of degree ν > 0 and which satisfies the so-called Rockland condition. This means that for each represenb except for the trivial one, the operator π(R) is injective on the space tation π ∈ G, of smooth vectors Hπ∞ , i.e. ∀v ∈ Hπ∞ π(R)v = 0 =⇒ v = 0. (1.3) Alternative characterisations of such operators have been considered by Rockland [40] and Beals [1], until the definitive result of Helffer and Nourrigat [29] saying that Rockland operators are precisely the left-invariant homogeneous hypoelliptic differential operators on G. The existence of Rockland operators on general nilpotent Lie groups characterises precisely the class of graded Lie groups [35, 45]. An example of a positive Rockland operator is the positive sub-Laplacian on a stratified Lie group: if G is a stratified Lie group and {X1 , . . . , Xk } is a basis for the first stratum of its Lie algebra, then the positive sub-Laplacian L=− k X Xj2 j=1 is a positive Rockland operator. Moreover, for any m ∈ N, the operator R = (−1) m k X Xj2m j=1 is a positive Rockland operator on the stratified Lie group G. More generally, for any graded Lie group G ∼ Rn , if X1 , . . . , Xn is the basis of its Lie algebra g with dilation weights ν1 , . . . , νn , i.e. with Dr X j = r ν j X j , j = 1, . . . , n, r > 0, where Dr are dilations on g, then the operator R= n X j=1 ν0 νj ν 2 ν0 (−1) aj Xj j , aj > 0, (1.4) 4 M. RUZHANSKY AND C. TARANTO is a Rockland operator of homogeneous degree 2ν0 , if ν0 is any common multiple of ν1 , . . . , νn . We refer to [19, Section 4.1.2] for other examples and a detailed discussion of Rockland operators and graded Lie groups. In the case of Rn , all elliptic homogeneous differential operators with constant coefficients are Rockland operators. To formulate our results we will need two scales of spaces, namely, Sobolev and Gevrey spaces, adapted to the setting of graded Lie groups. Thus, let G be a graded Lie group and let R be a positive Rockland operator of homogeneous degree ν. For s any real number s ∈ R, the Sobolev space HR (G) is the subspace of S ′ (G) obtained as the completion of the Schwartz space S(G) with respect to the Sobolev norm s kf kHRs (G) := k(I + R) ν f kL2 (G) . (1.5) For stratified Lie groups such spaces and their properties have been extensively analysed by Folland in [21] and on general graded Lie groups they have been investigated in [18, 19]. In particular, these spaces do not depend on a particular choice of the Rockland operartor R used in the definition (1.5), see [19, Theorem 4.4.20]). These spaces perfectly suit Case 1 described above but already in the Euclidian case, with the elliptic Laplace operator instead of the hypoelliptic Rockland operator in the wave equation (1.1), if the coefficient a(t) is not Lipschitz regular or may become zero, the Gevrey spaces appear naturally (see e.g. Bronshtein [3]) since we can not expect anymore the well-posedness in C ∞ (G) or D ′ (G). Indeed, Colombini and Spagnolo exhibited a concrete example in [13] of a Cauchy problem for the time-dependent wave equation on R with smooth a ≥ 0 which is not well-posed in C ∞ (R) or D ′ (R). Thus, given s ≥ 1, we define the Gevrey type space 1 s GR (G) := {f ∈ C ∞ (G) | ∃A > 0 : keAR 2s f kL2 (G) < ∞}. (1.6) These spaces provide for a subelliptic version of the usual Gevrey spaces. For example, for G = Hn being the Heisenberg group with the basis X1 , . . . , X2n of the first stratum, s (Hn ) if and only if there exist two constants B, C > 0 it was shown in [20] that f ∈ GR 2n such that for every α ∈ N0 the following inequality holds k∂ α f kL2 (Hn ) ≤ CB |α| (α!)s , P (1.7) where ∂ α = Y1 . . . Y|α| , with Yj ∈ {X1 , . . . , X2n } for every j = 1, . . . , |α| and Yj =Xk 1 = αk for every k = 1, . . . , 2n. Gevrey spaces (1.6) and the corresponding spaces of ultradistributions have been considered on compact Lie groups and on compact manifolds in [16] and in [17], respectively. By an argument similar to that in [20] for the sub-Laplacian or in [16, Theorem 2.4] for elliptic operators, it can be shown that if R is a positive Rockland operator of s homogeneous degree ν, then f ∈ GR (G) if and only if there exist constants B, C > 0 such that for every k ∈ N ∪ {0} we have kRk f kL2 (G) ≤ CB νk ((νk)!)s . (1.8) Since Sobolev spaces do not depend on a particular choice of the Rockland operator used in their definition, the characterisation (1.8) of the Gevrey spaces implies that s the same is true for GR (G). s s Thus, we may drop the subscript R in HR and GR but we may also keep using it to refer to the norms that we may be using. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 5 Let us now formulate the main theorem of our paper, where we consider the following four cases: Case Case Case Case 1: 2: 3: 4: a ∈ Lip([0, T ]), a(t) ≥ a0 > 0; a ∈ C α ([0, T ]), 0 < α < 1, a(t) ≥ a0 > 0; a ∈ C l ([0, T ]), l ≥ 2, a(t) ≥ 0; a ∈ C α ([0, T ]), with 0 < α < 2, a(t) ≥ 0. These are the four cases to which we refer repeatedly throughout this paper. Theorem 1.1. Let G be a graded Lie group and let R be a positive Rockland operator of homogeneous degree ν. Let T > 0. Then the following holds, referring respectively to Cases 1-4 above: s+ ν s (G), Case 1: Given s ∈ R, if the initial Cauchy data (u0 , u1) are in HR 2 (G) × HR ν s+ 2 then there exists a unique solution of (1.1) in the space C([0, T ], HR (G)) ∩ s C 1 ([0, T ], HR (G)), satisfying the following inequality for all values of t ∈ [0, T ]: ku(t, ·)k2 s+ ν2 + k∂t u(t, ·)k2HRs ≤ C(ku0 k2 s+ ν2 + ku1 k2HRs ); HR HR (1.9) s s Case 2: If the initial Cauchy data (u0 , u1) are in GR (G) × GR (G), then there exists a 2 s unique solution of (1.1) in C ([0, T ], GR(G)), provided that α 1≤s<1+ ; 1−α s s (G) × GR (G), then there exists a Case 3: If the initial Cauchy data (u0 , u1) are in GR 2 s unique solution of (1.1) in C ([0, T ], GR(G)), provided that l 1≤s<1+ ; 2 s s Case 4: If the initial Cauchy data (u0 , u1 ) are in GR (G) × GR (G) then there exists a 2 s unique solution of (1.1) in C ([0, T ], GR(G)), provided that 1 ≤ s < 1 + α. As it will follow from the proof, in Cases 2 and 4, one can take the equalities α and s = 1 + α, respectively, provided that T > 0 is small enough. We s = 1 + 1−α refer to [25, 26] concerning the sharpness of the above Gevrey indices in the case of G = Rn and R = −∆, and for further relevant references for that case. Let us formulate a corollary from Theorem 1.1 showing the local loss of regularity for the Cauchy problem (1.1). We recall that any graded Lie group G can be identified, for example through the exponential mapping, with the Euclidean space Rn where n is the topological dimension of G. Then, if ν1 , . . . , νn are the dilation weights on G as in (1.4), for any s ∈ R we have the local Sobolev embedding theorems: s/ν s/ν s Hloc 1 (Rn ) ⊂ HR,loc (G) ⊂ Hloc n (Rn ), (1.10) see [19, Theorem 4.4.24]. If G is a stratified Lie group, we have ν1 = 1 and νn is the step of G, i.e. the number of steps in the stratification of its Lie algebra. In other 6 M. RUZHANSKY AND C. TARANTO words, if G is a stratified Lie group of step r and H s (G) is the Sobolev space defined using (any) sub-Laplacian on G, then the embeddings (1.10) are reduced to s/r s s Hloc (Rn ) ⊂ Hloc (G) ⊂ Hloc (Rn ). (1.11) These embeddings are sharp, see Folland [21]. Consequently, using the characterisas tion (1.8) of GR (G), we also obtain the embeddings ν1 s sνn s (Rn ), (Rn ) ⊂ GR,loc (G) ⊂ Gloc Gloc (1.12) σ where the space Gloc (Rn ) is the usual Euclidean Gevrey space, namely, the space of all smooth functions f ∈ C ∞ (Rn ) such that for every compact set K ⊂ Rn there exist two constants B, C > 0 such that for every α we have |∂ α f (x)| ≤ CB |α| (α!)σ for all x ∈ K. (1.13) Consequently, if G is a stratified Lie group of step r we have the embeddings s s sr Gloc (Rn ) ⊂ GR,loc (G) ⊂ Gloc (Rn ). (1.14) Consequently, using these embeddings, we obtain the following local in space wellposedness result using the usual Euclidean Gevrey spaces. Here we may also assume that the Cauchy data are compactly supported due to the finite propagation speed of singularities. To emphasise the appearing phenomenon of local loss of Euclidean regularity we formulate it in the simplified setting of stratified Lie groups, with topological identification G ∼ Rn . Corollary 1.2. Let G ∼ Rn be a stratified Lie group of step r and let R be a positive Rockland operator of homogeneous degree ν (for example, R can be a positive subLaplacian in which case we have ν = 2). Assume that the Cauchy data (u0 , u1 ) are compactly supported. Then the following holds, referring respectively to Cases 1-4 above: ν Case 1: Given s ∈ R, if (u0 , u1) are in H s+ 2 (Rn )×H s (Rn ), then there exists a unique ν solution of (1.1) in C([0, T ], H (s+ 2 )/r (Rn )) ∩ C 1 ([0, T ], H s/r (Rn )), satisfying the following inequality for all values of t ∈ [0, T ]: ku(t, ·)k2H (s+ ν2 )/r + k∂t u(t, ·)k2H s/r ≤ C(ku0k2H s+ ν2 + ku1k2H s ); (1.15) Case 2: If (u0 , u1 ) are in G s (Rn )×G s (Rn ), then there exists a unique solution of (1.1) in C 2 ([0, T ], G sr (Rn )), provided that α ; 1<s<1+ 1−α Case 3: If (u0 , u1 ) are in G s (Rn )×G s (Rn ), then there exists a unique solution of (1.1) in C 2 ([0, T ], G sr (Rn )), provided that l 1<s<1+ ; 2 s n s n Case 4: If (u0 , u1 ) are in G (R ) × G (R ) then there exists a unique solution of (1.1) in C 2 ([0, T ], G sr (Rn )), provided that 1 < s < 1 + α. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 7 The statements in Cases 2-4 for s = 1 are not so interesting, with the analytic well-posedness known in these case anyway, see Bony and Shapira [2]. For G = Rn and R being the Laplacian, we have r = 1 and there is no loss of regularity in any of the Cases 1-4, when the results are known from [7, 9, 25, 26, 33]. However, already on the Heisenberg group with step r = 2, we observe the local loss of regularity in Euclidean Sobolev and Gevrey spaces in all statements of Cases 1-4 in Corollary 1.2. We also note that using local Sobolev and Gevrey embeddings (1.10) and (1.12), it is easy to formulate an extension of Corollary 1.2 to general graded Lie groups. 2. Preliminaries on graded Lie groups and Rockland operators In this section we recall some preliminaries and fix the notation concerning the Fourier analysis on graded Lie groups. We refer to [24] and to [19, Chapter 5] for further details. Thus, a connected and simply connected Lie group G is called graded when its Lie algebra is graded in the sense of the decomposition (1.2). A Lie algebra g is stratified if it is graded and if its first stratum V1 generates g as an algebra. Thus, in this case every element of the Lie algebra can be written as a linear combination of elements in V1 and their iterated commutators. A Lie group is stratified when it is connected, simply connected and its Lie algebra is stratified. Furthermore, if there are r non zero Vj ’s in the vector space decomposition (1.2), then the group (respectively the algebra) is said to be stratified of step r. From the definition of a stratified Lie algebra, it follows that, assuming that V1 has dimension k, any basis {X1 , . . . , Xk } for V1 forms a Hörmander system, see [31], and we can consider its associated sub-Laplacian operator that is also a positive Rockland operator:  L := − X12 + · · · + Xk2 . (2.1) Example 2.1 (The Heisenberg group). A classical example of a graded (stratified) Lie group is the Heisenberg group Hn that might be seen as the manifold R2n+1 endowed with the group law 1 (x, y, t)(x′, y ′ , t′ ) := (x + x′ , y + y ′ , t + t′ + (x · y ′ − x′ · y)), 2 where (x, y, t), (x′ , y ′ , t′ ) ∈ Rn × Rn × R ∼ Hn . The Heisenberg Lie algebra hn associated with the Heisenberg group is the space of all the left-invariant vector fields of Hn and it admits the following canonical basis: yj Xj = ∂xj − ∂t , 2 xj Yj = ∂yj + ∂t , 2 T = ∂t . The former vector fields satisfy the canonical commutation relations [Xj , Yj ] = T, ∀ j = 1, . . . , n, 8 M. RUZHANSKY AND C. TARANTO and all the other possible commutators are zero. Therefore, the Heisenberg group is a graded (stratified) Lie group of step 2, whose Lie algebra admits the vector space decomposition hn = V 1 ⊕ V 2 , where V1 = n X j=1 RXj ⊕ RYj and V2 = RT. Hypoellipticity and other questions on the Heisenberg group have a long history, see e.g. Taylor [44], Folland [22], or Thangavelu [46], and many references therein. From now on, we consider G to be a graded Lie group, even if some of the following definitions and remarks hold in a more general setting. Let π be a representation of G on the separable Hilbert space Hπ . A vector v ∈ Hπ is said to be smooth or of type C ∞ if the function G ∋ x 7→ π(x)v ∈ Hπ is of class C ∞ . The space of all smooth vectors of a representation π is denoted by Hπ∞ . Let g be the Lie algebra of G and let π be a strongly continuous representation of G on a Hilbert space Hπ . For every X ∈ g and v ∈ Hπ∞ we define   1 dπ(X)v := lim π expG (tX) v − v . t→0 t Then dπ is a representation of g on Hπ∞ (see e.g. [19, Proposition 1.7.3]) called the infinitesimal representation associated to π. By abuse of notation, we will often still denote it by π, therefore, for any X ∈ g, we write π(X) meaning dπ(X). Any left-invariant differential operator T on G, according to the Poincaré-BirkhoffWitt theorem, can be written in a unique way as a finite sum X T = cα X α , (2.2) |α|≤M where all but finitely many of the coefficients cα ∈ C are zero and X α = X1 . . . X|α| , with Xj ∈ g. This allows one to look at any left-invariant differential operator T on G as an element of the universal enveloping algebra U(g) of the Lie algebra of G.  b yields a field of Therefore, the family of infinitesimal representations π(T ), π ∈ G operators that turns to be the symbol associated with the operator T . b and let R be a positive Rockland operator of homogeneous degree ν > 0, Let π ∈ G then using formula (2.2), the infinitesimal representation of R associated to π is X π(R) = cα π(X)α , [α]=ν α α π(X1α1 · · · Xnαn ) and [α] = ν1 α1 + · · · + νn αn is the homogewhere π(X) = π(X ) = neous degree of the multiindex α, with Xj being homogeneous of degree νj . The operator R and its infinitesimal representations π(R) are densely defined on D(G) ⊂ L2 (G) and Hπ∞ ⊂ Hπ , respectively, see e.g. [19, Proposition 4.1.15]. We denote by R2 the self-adjoint extension of R on L2 (G) and we keep the same notation π(R) for the self-adjoint extensions on Hπ of the infinitesimal representations. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 9 Recalling the spectral theorem for unbounded operators [39, Theorem VIII.6], we can consider the spectral measures E and Eπ corresponding to R2 and π(R), so that we have Z Z R2 = λdE(λ) and π(R) = λdEπ (λ). R R Furthermore, for any f ∈ L2 (G) we have     F φ R f (π) = φ π(R) fb(π), (2.3) for any measurable bounded function φ on R, see e.g. [19, Corollary 4.1.16]. The infinitesimal representations π(R) of a positive Rockland operator are also positive, due to the relations between their spectral measures. In particular, Hulanicki, Jenkins b \ {1}, is discrete and Ludwig showed in [32] that the spectrum of π(R), with π ∈ G and lies in (0, ∞). This implies that we can choose an orthonormal basis for Hπ such that the infinite matrix associated to the self-adjoint operator π(R) has the form   2 π1 0 . . . . . .  0 π22 0 . . .   .. (2.4) π(R) =  .. , .  . 0 .. .. .. . . . b \ {1}. where πj are strictly positive real numbers and π ∈ G 3. Parameter dependent energy estimates In this section we prove certain energy estimates for second order ordinary differential equations with explicit dependence on parameters. This will be crucial in the proof of Theorem 1.1 where the parameters will correspond to the spectral decomposition (2.4) of the infinitesimal representations of the Rockland operators. Results of the following type have been of use in different estimates related to weakly hyperbolic partial differential equations, such as [9] and [27]. However, in those papers the conclusions rely on more general results, see [25]. We partly follow the argument in [27] based on a standard reduction to a first order system. Consequently, we carry out different types of arguments depending on assumptions in each of the cases, altogether allowing us to formulate the precise dependence on parameters for ordinary differential equations corresponding to the propagation coefficient a(t) as in Cases 1-4 of Theorem 1.1, to which we refer in the following statement. Proposition 3.1. Let β > 0 be a positive constant and let a(t) be a function that behaves according to Cases 1, 2, 3 and 4 in Theorem 1.1. Let T > 0. Consider the following Cauchy problem:  ′′ 2  v (t) + β a(t)v(t) = 0 with t ∈ (0, T ], (3.1) v(0) = v0 ∈ C,  v ′ (0) = v ∈ C. 1 Then the following holds: 10 M. RUZHANSKY AND C. TARANTO Case 1: There exists a positive constant C > 0 such that for all t ∈ [0, T ] we have β 2 |v(t)|2 + |v ′(t)|2 ≤ C(β 2 |v0 |2 + |v1 |2 ). Case 2: There exist two positive constants C, K > 0 such that for all t ∈ [0, T ] we have 1 (3.2) β 2 |v(t)|2 + |v ′ (t)|2 ≤ CeKtβ s (β 2 |v0 |2 + |v1 |2 ), α for any 1 ≤ s < 1 + 1−α . Moreover, there exists a constant k > 0 such that 1−α− 1 s for any β0 ≥ 1 the estimate (3.2) holds for K = kβ0 for all β ≥ β0 . Case 3: There exist two positive constants C, K > 0 such that for all t ∈ [0, T ] we have 1  l β 2 |v(t)|2 + |v ′ (t)|2 ≤ C(1 + β σ )eKβ σ β 2 |v0 |2 + |v1 |2 , with σ = 1 + 2l . Case 4: There exist two positive constants C, K > 0 such that α 1 β 2 |v(t)|2 + |v ′ (t)|2 ≤ C(1 + β α+1 )eKtβ s (β 2 |v0 |2 + |v1 |2 ), (3.3) for any 1 ≤ s < 1 + α. Moreover, there exists a constant k > 0 such that for 1 −1 any β0 ≥ 1 the estimate (3.3) holds for K = kβ01+α s for all β ≥ β0 . The constants C in the above inequalities may depend on T but not on β. Proof. First we reduce the problem (3.1) to a first order system. In order to do this we rewrite it in a standard way as a matrix-valued equation. Thus we define the column vectors     iβv0 iβv(t) , , V0 := V (t) := v1 ∂t v(t) and the matrix   0 1 A(t) := , a(t) 0 that allow us to reformulate the second order system (3.1) as the first order system ( Vt (t) = iβA(t)V (t), (3.4) V (0) = V0 . We will now treat each case separately. 3.1. Case 1: a ∈ Lip([0, T]), a(t) ≥ a0 > 0. This is the simplest case that can be treated by a classical argument. We observe that the eigenvalues of our matrix A(t) p are given by ± a(t). The symmetriser S of A, i.e. the matrix such that is given by Thus we define the energy as SA − A∗ S = 0,   2a(t) 0 S(t) = . 0 2   E(t) := S(t)V (t), V (t) , TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 11 and we want to estimate its variations in time. A straightforward calculation yields the following inequality that will help us to get such estimate: 2|V |2 min {a(t), 1} ≤ E(t) ≤ 2|V |2 max {a(t), 1}. t∈[0,T ] (3.5) t∈[0,T ] In particular, in this case the continuity of a(t) ensures the existence of two strictly positive constants a0 and a1 such that a0 = min a(t) and a1 = max a(t). t∈[0,T ] t∈[0,T ] Thus setting c0 := 2 min{a0 , 1} and c1 := 2 max{a1 , 1}, the inequality (3.5) becomes c0 |V (t)|2 ≤ E(t) ≤ c1 |V (t)|2 . (3.6) A straightforward calculation, together with (3.6), gives the following estimate:    Et (t) = St (t)V (t), V (t) + S(t)Vt (t), V (t) + S(t)V (t), Vt (t) =    = St (t)V (t), V (t) + iβ S(t)A(t)V (t), V (t) − iβ S(t)V (t), A(t)V (t) =     = St (t)V (t), V (t) + iβ S(t)A(t) − A∗ (t)S(t) V (t), V (t) =  = St (t)V (t), V (t) ≤ kSt (t)k|V (t)|2 , (3.7) thus setting c′ := c−1 0 supt∈[0,T ] kSt (t)k, we get from (3.7) using (3.6) that Et (t) ≤ c′ E(t). (3.8) Applying the Gronwall lemma to (3.8), we deduce that there exists a constant c > 0 independent of t ∈ [0, T ] such that E(t) ≤ cE(0). (3.9) Therefore, putting together (3.9) and (3.6) we obtain c0 |V (t)|2 ≤ E(t) ≤ cE(0) ≤ cc1 |V (0)|2. We can then rephrase this, asserting that there exists a constant C > 0 independent of t such that |V (t)|2 ≤ C|V (0)|2. Then we write this inequality going back to the definition of V (t), yielding  β 2 |v(t)|2 + |∂t v(t)|2 ≤ C β 2 |v0 |2 + |v1 |2 , as required. 3.2. Case 2: a ∈ C α ([0, T]), with 0 < α < 1, a(t) ≥ a0 > 0. Here we follow the method developed by Colombini and Kinoshita [9] for n = 1 and subsequently extended [25] for any n ∈ N. We look for solutions of the form 1 V (t) = e−ρ(t)β s (det H(t))−1 H(t)W (t), (3.10) where • s ∈ R depends on α as will be determined in the argument; • the function ρ = ρ(t) ∈ C 1 ([0, T ]) is real-valued and will be chosen later; • W (t) is the energy; 12 M. RUZHANSKY AND C. TARANTO • H(t) is the matrix defined by H(t) :=   1 1 , λǫ1 (t) λǫ2 (t) where for all ǫ > 0, λǫ1 (t) and λǫ2 (t) are regularisations of the eigenvalues of the matrix A(t) of the form √ λǫ1 (t) := (− a ∗ ϕǫ )(t), √ λǫ2 (t) := (+ a ∗ ϕǫ )(t), with {ϕǫ (t)}ǫ>0 being a family of cut-off R functions defined starting from a non-negative function ϕ ∈ Cc∞ (R), with R ϕ = 1, by setting ϕǫ (t) := 1ǫ ϕ ǫt . By construction, it follows that λǫ1 , λǫ2 ∈ C ∞ ([0, T ]). Furthermore,p we can easily check, using the Hölder regularity of a(t) of order α and, therefore, of a(t) of the same order α, the following inequalities: p √ (3.11) det H(t) = λǫ2 (t) − λǫ1 (t) ≥ 2 a(0) ≥ 2 a0 , and for all t ∈ [0, T ] and ǫ > 0 there exist two constants c1 , c2 > 0 such that p |λǫ1 (t) + a(t)| ≤ c1 ǫα , p |λǫ2 (t) − a(t)| ≤ c2 ǫα , (3.12) uniformly in t and ǫ. Now we substitute our suggested solution (3.10) in (3.4) yielding 1 H (t)W (t) 1 H(t)W (t) H(t)W (t) t t + e−ρ(t)β s + e−ρ(t)β s + det H(t) det H(t) det H(t) 1 1 H(t)W (t) −ρ(t)β s H(t)W (t) . − e−ρ(t)β s (det H)t (t) 2 = iβA(t)e det H(t) det H(t) 1 1 − ρ′ (t)β s e−ρ(t)β s 1 Multiplying both sides of this equality by eρ(t)β s det H(t)H −1(t) we get −1 1 Wt (t) = ρ′ (t)β s W (t) − H −1 (t)Ht (t)W (t) + (det H)t (t) det H(t) W (t)+ + iβH −1 (t)A(t)H(t)W (t). (3.13) This leads to the estimate    d |W (t)|2 = Wt (t), W (t) + W (t), Wt (t) = 2Re Wt (t), W (t) = dt   1 = 2 ρ′ (t)β s |W (t)|2 − Re H −1 (t)Ht (t)W (t), W (t) + −1  + det H(t) (det H)t (t)|W (t)|2 + βIm H −1 (t)A(t)H(t)W (t), W (t) . We observe that    2Im H −1AHW, W = H −1 AHW, W − H −1AHW, W =     = H −1AHW, W − W, H −1 AHW = H −1AHW, W − (H −1 AH)∗ W, W =    = H −1 AH − (H −1 AH)∗ W, W ≤ kH −1AH − (H −1 AH)∗ kkW k2. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 13 Thus we obtain  −1 1 d |W (t)|2 ≤ 2ρ′ (t)β s + 2kH −1(t)Ht (t)k + 2 det H(t) (det H)t (t) + dt  +βkH −1AH − (H −1 AH)∗ k |W (t)|2 . (3.14) To proceed we need to estimate the following quantities: I) kH −1(t)Ht (t)k; −1 II) det H(t) (det H)t (t) ; III) kH −1AH − (H −1AH)∗ k. In [25] and [9], the authors determine estimates for similar functions in a more general setting, i.e. starting from an equation of arbitrary order m. In this particular case, we can proceed by straightforward calculations without relying on the mentioned works. We deal with these three terms as follows:   ǫ   λ2 −1 0 0 1 −1 I) Since H (t) = λǫ −λǫ , it follows that and Ht (t) = 2 1 −λǫ1 1 ∂t λǫ1 ∂t λǫ2 ∂t λǫ the entries of the matrix H −1 Ht are given by the functions λǫ −λj ǫ . We have, for 2 1 example for λ2 ,   1Z p √ 1√ ′ t ǫ = a(t − ρǫ)ϕ′ (ρ)dρ = ∂t λ2 (t) = a ∗ ∂t ϕǫ (t) = 2 a ∗ ϕ ǫ ǫ ǫ Z p Z p  ′ 1p 1 a(t − ρǫ) − a(t) ϕ (ρ)dρ + a(t) ϕ′ (ρ)dρ ≤ kǫα−1 , (3.15) = ǫ ǫ √ where we are using the Hölder continuity R ′ of a for the first term and the fact that the second term is zero, since ϕ = 0. Combining the inequalities (3.11) and (3.15), we get for a suitable positive constant k1 that kH −1 (t)Ht (t)k ≤ k1 ǫα−1 . II) First we can estimate det H(t) therefore, −1 (det H)t (t) = det H(t) −1 ∂t λǫ2 − ∂t λǫ1 2∂t λǫ2 2kǫα−1 = ≤ √ , λǫ2 − λǫ1 λǫ2 − λǫ1 2 a0 (det H)t (t) ≤ k2 ǫα−1 , for a constant k2 > 0. III) Also in this case, we write explicitly the matrix we are interested in, that is   −2a(t)+(λǫ1 )2 +(λǫ2 )2 0 ∗ λǫ1 −λǫ2 . H −1 AH − H −1 AH =  2a(t)− (λǫ )2 +(λǫ )2  1 2 0 λǫ −λǫ 1 2 Observing that, by definition, (λǫ1 )2 = (λǫ2 )2 , and recalling inequality (3.11), to get the desired norm estimate, it is enough to consider the function |a(t)−(λǫ2 )2 |. 14 M. RUZHANSKY AND C. TARANTO A straightforward calculation, using inequality (3.12), shows that p  p  a(t) + λǫ2 | ≤ |a(t) − (λǫ2 )2 | = | a(t) − λǫ2 Z p p  α ≤ c2 ǫ a(t) + a(t − s)ϕǫ (s)ds = Z p p  √ α a(t) + a(t − sǫ) ϕ(s)ds ≤ 2c2 k akL∞ ǫα . = c2 ǫ + It follows that kH −1AH − (H −1 AH)∗ k ≤ k3 ǫα . Going back to (3.14), combining it with estimates I), II) and III), we get an estimate for the derivative of the energy, that is   1 d |W (t)|2 ≤ 2ρ′ (t)β s + 2k1 ǫα−1 + 2k2 ǫα−1 + k3 βǫα |W (t)|2. (3.16) dt At this point we choose ǫ = β1 , observing that we can always consider β large enough, say β > 1, in order to have a small ǫ ∈ (0, 1]. Indeed, for β ≤ β0 for some fixed β0 > 0, a modification of the argument below gives estimate (3.2) with constants depending only on β0 and T . So we may assume that β > β0 for β0 to be specified. We define also ρ(t) := ρ(0) − Kt for some K > 0 to be specified. Substituting this in (3.16) we get for a suitable constant k > 0 that   1 1 1 d 1−α 2 ′ s |W (t)|2 = − 2K + 2kβ 1−α− s β s |W (t)|2. |W (t)| ≤ 2ρ (t)β + 2kβ dt If we have α 1 >1−α ⇐⇒ s<1+ , s 1−α and then also 1 1−α− 1s K := kβ0 (3.17) ≥ kβ 1−α− s , then for all t ∈ [0, T ] we have d |W (t)|2 ≤ 0. dt This monotonicity of the energy W (t) yields the following boundedness for the solution vector V (t): 1 −1 |V (t)| = e−ρ(t)β s det H(t) kH(t)k|W (t)| ≤ 1 det H(0) kH(t)k 1 −1 |V (0)|. (3.18) ≤ e−ρ(t)β s det H(t) kH(t)k|W (0)| = eKtβ s det H(t) kH(0)k −1 Note that, according to property (3.11), the function det H (t) is bounded. Furthermore, the behaviour of the convolution and the definition of H(t) guarantee the existence of suitable constants c, c′ > 0 such that kH(t)k ≤ c and kH −1 (0)k ≤ c′ . Therefore, there exists a constant C > 0 such that 1 |V (t)| ≤ CeKtβ s |V (0)|, that means, by definition of V (t), that 1  β 2 |v(t)|2 + |vt (t)| ≤ CeKtβ s β 2 |v0 |2 + |v1 |2 , TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 15 proving the statement of Case 2. 3.3. Case 3: a ∈ C l ([0, T]), with l ≥ 2, a(t) ≥ 0. In this case we extend the technique developed for Case 1. First we perturb the symmetriser of the matrix A(t). This is done considering the so-called quasi-symmetriser of A(t), the idea introduced for such problems by D’Ancona and Spagnolo in [15]. Consider the quasi-symmetriser of A(t), that is, a family of coercive, Hermitian matrices of the form       2a(t) 0 (2) 2 1 0 2 1 0 = Qǫ (t) := S(t) + 2ǫ , + 2ǫ 0 0 0 0 0 2 (2) (2)  for all ǫ ∈ (0, 1], and such that Qǫ A − A∗ Qǫ goes to zero as ǫ goes to zero. The associated perturbed energy is given by   Eǫ (t) := Q(2) V (t), V (t) . ǫ We proceed estimating the energy, calculating its derivatives in time, so that d  d (2) Eǫ (t) = Q(2) (t)V (t), V (t) + (Q(2) ǫ Vt (t), V (t)) + (Qǫ V (t), Vt (t)) = dt dt ǫ    d  (2) ∗ (2) Q(2) (t)V (t), V (t) + iβ Q A(t) − A (t)Q V (t), V (t) . (3.19) = ǫ ǫ dt ǫ To estimate the second term in the right hand side, we set     iβv(t) v V (t) = =: 1 . ∂t v v2 Algebraic calculations give Q(2) ǫ (t)A(t) ∗ −A (t)Q(2) ǫ (t) 2 = 2ǫ   0 1 , −1 0 therefore Z Z    (2) ∗ (2) 2 2Im(v2 v1 )dt ≤ 2ǫ 2|ǫv1 ||v2 |dt ≤ i Qǫ (t)A(t) − A (t)Qǫ (t) V (t), V (t) ≤ 2ǫ Z Z   ≤ 2ǫ (ǫ2 |v1 |2 + |v2 |2 )dt ≤ 2ǫ ǫ2 + a(t) |v1 |2 + |v2 |2 dt = 2ǫ Q(2) ǫ (t)V (t), V (t) . Using this estimate in (3.19), we get d     d (2) ∗ (2) Eǫ (t) = Q(2) (t)V (t), V (t) + iβ Q A(t) − A (t)Q V (t), V (t) ≤ ǫ ǫ dt dt ǫ  d (2) Q (t)V (t), V (t) + 2βǫEǫ (t) ≤ dt ǫ   # " d (2) Q (t)V (t), V (t) ǫ dt (3.20) =  + 2βǫ Eǫ (t). (2) Qǫ (t)V (t), V (t) In order to apply the Gronwall lemma, we first estimate the integral  Z T d (2) Q (t)V (t), V (t) dt ǫ  dt. (2) Qǫ (t)V (t), V (t) 0 (3.21) 16 M. RUZHANSKY AND C. TARANTO Let us recall that from the definition of the quasi-symmetriser, it follows that Z     (2) Qǫ V, V = 2 a(t) + ǫ2 β 2 |v|2 + |∂t v|2 dt. (3.22)  Thus, setting c1 := max 1, 2(kakL∞ + ǫ2 ) , we obtain a bound from above for (3.22), that is   Q(2) V, V ≤ c1 |V |2 . ǫ 2 −1 Observing that ǫ2 c−1 1 ≤ 1 and ǫ c1 ≤ c1 for small enough ǫ, we can also deduce an inequality from below of the form   2 −1 2 (2) ǫ c1 |V | ≤ Qǫ V, V . Hence, there exists a constant c1 ≥ 1 such that for t ∈ [0, T ] we have  2 2 (2) 2 c−1 1 ǫ |V (t)| ≤ Qǫ (t)V (t), V (t) ≤ c1 |V (t)| . (3.23) The lower bound, together with [26, Lemma 2] (see [33, Lemma 2] for a detailed proof), allows us to estimate the integral (3.21) as follows   Z T Z T d (2) (2) d Q (t)V (t), V (t) Q (t)V (t), V (t) dt ǫ dt ǫ  dt ≤  1 dt ≤ 1− 1l (2) (2) (2) Qǫ (t)V (t), V (t) 0 0 (Qǫ (t)V (t), V (t) l Qǫ (t)V (t), V (t)  Z T (2) d 1 1 1 Q (t)V (t), V (t) 2 2 (2) l − 2l dt ǫ l −l l −l c kQ k . ǫ dt ≤ c ≤ c1 ǫ T l ([0,T ]) ≤ c3 ǫ 1 1 ǫ  C 2 1− l (2) 0 |V (t)| l Qǫ (t)V (t), V (t) Thus, by the Gronwall lemma and the estimates for the quasi-symmetriser just derived, we obtain Eǫ (t) ≤ Eǫ (0)ec3 ǫ −2 l +2βǫT . Combining the latter inequality with (3.23) we obtain 2 2 cT (ǫ c−1 1 ǫ |V (t)| ≤ Eǫ (t) ≤ Eǫ (0)e −2 l +βǫ) ≤ c1 |V (0)|2 ecT (ǫ 2 l 2 −2 l +βǫ) . We choose ǫ such that ǫ− l = βǫ, thus ǫ = β − 2+l and ǫβ = β 2+l . We can assume β is large enough with a remark for small β similar to Case 2. Setting σ = 1 + 2l , for a suitable constant K ∈ C it follows that l 1 |V (t)|2 ≤ Cβ σ eKβ σ |V (0)|2 . This means that as required. 1  l β 2 |v(t)|2 + |v ′ (t)|2 ≤ Cβ σ eKβ σ β 2 |v0 |2 + |v1 |2 , TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 17 3.4. Case 4: a ∈ C α ([0, T]), with 0 < α < 2, a(t) ≥ 0. In this last case we extend the proof ofp Case 2. However, under these assumptions the roots of the matrix A(t), that are, ± a(t) might coincide, and hence they are Hölder of order α2 instead of α. In order to adapt this proof to the one for Case 2 we without loss of √ will assume 2α α generality that a ∈ C ([0, T ]) with 0 < α < 1, so that a ∈ C ([0, T ]). Following the argument developed for Case 2, we look again for solutions of the form 1 −1 V (t) = e−ρ(t)β s det H(t) H(t)W (t), with the real-valued function ρ(t), the exponent s and the energy W (t) to be chosen later, while H(t) is the matrix given by   1 1 H(t) = , λǫ1,α (t) λǫ2,α (t) where the regularised eigenvalues of A(t), λǫ1,α (t) and λǫ2,α (t) differ from the ones defined in the previous case in the following way √ λǫ1,α (t) := (− a ∗ ϕǫ )(t) + ǫα , √ λǫ2,α (t) := (+ a ∗ ϕǫ )(t) + 2ǫα . Arguing as in Case 2, we can easily see that the smooth functions λǫ1 (t) and λǫ2 (t) satisfy uniformly in t and ǫ the following inequalities • det H(t) = λǫ2,α (t) − λǫ1,α (t) ≥ c1 ǫα ; p • |λǫ1,α (t) + a(t)| ≤ c2 ǫα ; p • |λǫ2,α (t) − a(t)| ≤ c3 ǫα . We now look for the energy estimates. In order to do this, recalling the calculations done before (3.13) and (3.14), we obtain   ′ 1 d 2 W (t) = 2Re Wt (t), W (t) ≤ 2ρ (t)β s + 2kH −1(t)Ht (t)k+ dt  −1 (3.24) det Ht (t) + βkH −1AH − (H −1 AH)∗ k |W (t)|2. + 2 det H(t) The same arguments as in Case 2 allow us to get the following bounds I) kH −1(t)Ht (t)k ≤ k1 ǫ−1 ; −1 det Ht (t) ≤ k2 ǫ−1 ; II) det H(t) III) kH −1AH − (H −1AH)∗ k ≤ k3 ǫα . Combining (3.24) with I), II) and III) we obtain   1 d |W (t)|2 ≤ 2ρ′ (t)β s + 2k1 ǫ−1 + 2k2 ǫ−1 + k3 βǫα |W (t)|2 . dt 1 We choose ǫ−1 = βǫα which yields ǫ = β − α+1 . Thus, setting γ := a constant c > 0 the estimate   1 d |W (t)|2 ≤ 2ρ′ (t)β s + 2cβ γ |W (t)|2. dt 1 , α+1 we obtain for 18 M. RUZHANSKY AND C. TARANTO We take ρ(t) := ρ(0) − Kt with K > 0 to be chosen later. Considering 1 >γ ⇐⇒ s < 1 + α, s we get 1 1 d |W (t)|2 ≤ (−2K + 2cβ γ− s )β s |W (t)|2 ≤ 0, dt provided that β is large enough. Similarly to Case 2, we then get 1 −1 −1 |V (t)| ≤ eKtβ s det H(t) det H(0)kH(t)k kH(0)k |V (0)|. (3.25) Since −1 −1 α det H(t) det H(0)kH(t)k kH(0)k ≤ cǫ−α = cβ α+1 , the inequality (3.25) becomes α which means 1 |V (t)| ≤ cβ α+1 eKtβ s |V (0)|, 1  α β 2 |v(t)|2 + |v ′ (t)|2 ≤ cβ α+1 eKtβ s β 2 |v0 |2 + |v1 |2 . Combining this with a remark for small β similar to Case 2 yields the result. Thus Proposition 3.1 is proved.  4. Proof of Theorem 1.1 In this section we combine the things from Section 2 and Section 3 to prove Theorem 1.1. However, we will need one more ingredient, the Fourier transform on G, that we now briefly describe. b By a usual abuse of notation we will identify Let f ∈ L1 (G) and let π ∈ G. irreducible unitary representations with their equivalence classes. The group Fourier transform of f at π is defined by Z b FG f (π) ≡ f (π) ≡ π(f ) := f (x)π(x)∗ dx, G with integration against the biinvariant Haar measure on G. This gives a linear mapping fb(π) : Hπ → Hπ that can be represented by an infinite matrix once we choose a basis for the Hilbert space Hπ . Consequently, we can write  FG Rf (π) = π(R)fb(π). By Kirillov’s orbit method (see e.g. [14]), one can explicitly construct the Plancherel b Therefore we can have the Fourier inversion formula. In measure µ on the dual G. addition, the operator π(f ) = fb(π) is Hilbert-Schmidt:  kπ(f )k2HS = Tr π(f )π(f )∗ < ∞, b ∋ π 7→ kπ(f )k2 in integrable with respect to µ. Furthermore, and the function G HS the Plancherel formula holds: Z Z 2 |f (x)| dx = kπ(f )k2HS dµ(π), (4.1) G see e.g. [14] or [19]. b G TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 19 Proof of Theorem 1.1. Our aim is to reduce the Cauchy problem (1.1) to a form allowing us to apply Proposition 3.1. In order to do this, we take the group Fourier b that is, transform of (1.1) with respect to x ∈ G for all π ∈ G, ∂t2 u b(t, π) + a(t)π(R)b u(t, π) = 0. (4.2) 2 ∂t2 u b(t, π)m,k + a(t)πm u b(t, π)m,k = 0, (4.3) Keeping in mind the form (2.4) of the infinitesimal representation π(R) the equation (4.2) can be seen componentwise as an infinite system of equations of the form b and any m, k ∈ N. The key point of the where we are considering any π ∈ G, following argument is to decouple the system given by the matrix equation (4.2). In order to do this, we fix an arbitrary representation π, and a general entry (m, k) and b(t, π)m,k we treat each equation given by (4.3) individually. Note that eventually u is a function only of t. Formally, recalling the notation used in Proposition 3.1, we write 2 v(t) := u b(t, π)m,k , β 2 := πm , and v0 := u b0(π)m,k , v1 := u b1 (π)m,k . Therefore, equation (4.3) becomes v ′′ (t) + a(t)β 2 v(t) = 0. We proceed discussing implications of Proposition 3.1 separately in each case. Case 1: a ∈ Lip([0, T]), a(t) ≥ a0 > 0. Applying Proposition 3.1, we get that there exists a positive constant C > 0 such that β 2 |v(t)|2 + |v ′(t)|2 ≤ C(β 2 |v0 |2 + |v1 |2 ), which is equivalent to  |πm u b(t, π)m,k |2 + |b u′ (t, π)m,k |2 ≤ C |πm u b0 (π)m,k |2 + |b u1 (π)m,k |2 . (4.4) b and m, k ∈ N. We multiply the inequality (4.4) by This holds uniformly in π ∈ G 4s/ν πm yielding 2s 2s  1+ 2s 1+ 2s b(t, π)m,k |2 + |πmν u b′(t, π)m,k |2 ≤ C |πm ν u b0 (π)m,k |2 + |πmν u b1 (π)m,k |2 . (4.5) |πm ν u Thus, recalling that for any Hilbert-Schmidt operator A we have X kAk2HS = |(Aϕm , ϕk )|2 m,k for any orthonormal basis {ϕ1 , ϕ2 , . . . }, we can consider the infinite sum over m, k of the inequalities provided by (4.5), to get 1 s s kπ(R) 2 + ν u b(t, π)k2HS + kπ(R) ν ∂t u b(t, π)k2HS ≤ ≤ C kπ(R) 1 +s 2 ν s ν  (4.6) u b0 (π)k2HS + kπ(R) u b1 (π)k2HS . b so We can now integrate both sides of (4.6) against the Plancherel measure µ on G, that the Plancherel identity yields estimate (1.15). Case 2: a ∈ C α ([0, T]), with 0 < α < 1, a(t) ≥ a0 > 0. 20 M. RUZHANSKY AND C. TARANTO The application of Proposition 3.1 implies the existence of two positive constants b we have C, K > 0 such that for all m, k ∈ N and for every representation π ∈ G 1 s b0 (π)m,k |2 + |b u1(π)m,k |2 ), |πm u b(t, π)m,k |2 + |b u′(t, π)m,k |2 ≤ CeKtπm (|πm u (4.7) where α . 1−α s s If the Cauchy data (u0 , u1) are in GR (G) × GR (G) then there exist two positive constants A0 and A1 such that s<1+ 1 1 keA0 R 2s u0 kL2 < ∞ and keA1 R 2s u1 kL2 < ∞. We note that we can restrict to consider πm large enough since the cut-off to bounded πm produces functions in any Gevrey spaces. Indeed, if a cut-off χ : R → C has a compact support, then by the same energy estimate, since χ(R) and R commute, the problem is reduced to the solution χ(R)u(t, x) to the Cauchy problem  2  ∂t (χ(R)u(t, x)) + a(t)R(χ(R)u(t, x)) = 0, (t, x) ∈ [0, T ] × G, (4.8) χ(R)u(0, x) = χ(R)u0 (x), x ∈ G,  ∂ (χ(R)u(0, x)) = χ(R)u (x), x ∈ G, t 1 with data χ(R)u0 and χ(R)u1 , so it is in any Gevrey class. Take now A = min{A0 , A1 }, then we can always assume K in Case 2 of Proposition 3.1 is small enough, so that we have some B > 0 such that KT = A − B. Therefore, we can rewrite inequality (4.7) as 1 1  2s s b(t, π)m,k |2 + |b u′(t, π)m,k |2 ≤ CeAπm (|πm u b0 (t)m,k |2 + |b u1 (t)m,k |2 ). (4.9) eBπm |πm u b and applying Summing over m, k, integrating against the Plancherel measure of G the Plancherel identity, inequality (4.9) becomes 1 1 1 1 1 keBR 2s ukL2 (G) + keBR 2s ∂t ukL2 (G) ≤ keBR 2s R 2 ukL2 (G) + keBR 2s ∂t ukL2 (G) ≤ 1 1 1 ≤ keBR 2s R 2 u0 kL2 (G) + keBR 2s u1 kL2 (G) . (4.10) 1 s s (G). Therefore, from (4.10) If a function f belongs to GR (G), then also R 2 f is in GR we get the desired well-posedness result. Case 3 : a ∈ C l ([0, T]), with l ≥ 2, a(t) ≥ 0. Similarly to the previous cases, the application of Proposition 3.1 yields the existence of two positive constants C, K > 0 such that l +2 1 σ l 1 σ u0 (π)m,k |2 + Cπmσ eKT πm |b u1 (π)m,k |2 ≤ |πm u b(t, π)m,k (t)|2 + |b u′(t, π)m,k |2 ≤ Cπmσ eKT πm |b 1 s K ′ πm ≤ Ce 1 2 s K ′ πm |b u0(π)m.k | + Ce |b u1 (π)m,k |2 , with 1 ≤ s < σ = 1 + 2l , for some K ′ > 0 small enough. Proceeding as in Case 2, we obtain the desired inequality. Case 4: a ∈ C α ([0, T]), with 0 < α < 2, a(t) ≥ 0. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS 21 In this last case, applying Proposition 3.1 we have that there exist two positive constants C, K > 0 such that 1 1 s 2 2 |b u0 (π)m,k |2 + |b u1 (π)m,k |2 ), πm |b u(t.π)m.k |2 + |b u′(t, π)m,k |2 ≤ Cπmα+1 eKT πm (πm with 1 ≤ s < α + 1. Arguing as above, the result follows.  References [1] R. Beals. Opérateurs invariants hypoelliptiques sur un groupe de Lie nilpotent. Séminaire Goulaouic-Schwartz 1976/1977: Équations aux dérivées partielles et analyse fonctionnelle, Exp. No. 19:8pp, 1977. [2] J.-M. Bony, P. Schapira. Existence et prolongement des solutions holomorphes des équations aux dérivées partielles. Invent. Math., 17:95–105, 1972. [3] M. D. Bronšteı̆n. The Cauchy problem for hyperbolic operators with characteristics of variable multiplicity. Trudy Moskov. Mat. Obshch., 41:83–99, 1980. [4] M. Cicognani, F. Hirosawa, M. Reissig. The Log-effect for p-evolution type models. J. Math. Soc. Japan, 60:819–863, 2008. [5] M. Cicognani, F. Hirosawa, M. Reissig. Loss of regularity for p-evolution type models. J. Math. Anal. Appl., 347:35–58, 2008. [6] M. Cicognani, F. Colombini. The Cauchy problem for p-evolution equations, Trans. Amer. Math. Soc., 362:4853–4869, 2010. [7] F. Colombini, E. De Giorgi, S. Spagnolo. Sur les équations hyperboliques avec des coefficients qui ne dépendent que du temps, Ann. Scuola Norm. Sup. Pisa Cl. Sci., 6:511–559, 1979. [8] F. Colombini, E. Jannelli, S. Spagnolo. Nonuniqueness in hyperbolic Cauchy problems. Ann. of Math. (2), 126(3):495–524, 1987. [9] F. Colombini, T. Kinoshita. On the Gevrey well-posedness of the Cauchy problem for weakly hyperbolic equations of higher order, J. Differential Equations, 186:394–419, 2002. [10] F. Colombini, N. Lerner. Hyperbolic operators with non-Lipschitz coefficients. Duke Math. J., 77:657–698, 1995. [11] F. Colombini, G. Métivier. The Cauchy problem for wave equations with non Lipschitz coefficients; application to continuation of solutions of some nonlinear wave equations. Ann. Sci. Éc. Norm. Supér., (4) 41:177–220, 2008. [12] F. Colombini, G. Métivier. Counterexamples to the well posedness of the Cauchy problem for hyperbolic systems. Anal. PDE, 8:499–511, 2015. [13] F. Colombini, S. Spagnolo. An example of a weakly hyperbolic Cauchy problem not well posed in C ∞ , Acta Math., 148:243–253, 1982. [14] L. J. Corwin, F. P. Greenleaf. Representations of nilpotent Lie groups and their applications, Cambridge Studies in Advanced Mathematics, Cambridge University Press, Cambridge, 18 (1990). Basic theory and examples. [15] P. D’Ancona, S. Spagnolo. Quasi-symmetrization of hyperbolic systems and propagation of the analytic regularity, Bollettino della Unione Matematica Italiana, 1 B:169–186, 1998. [16] D. Dasgupta, M. Ruzhansky. Gevrey functions and ultradistributions on compact Lie groups and homogeneous spaces, Bull. Sci. Math., 756–782, 2014. [17] D. Dasgupta, M. Ruzhansky. Eigenfunction expansions of ultradifferentiable functions and ultradistributions, Trans. Amer. Math. Soc., 368:8481–8498, 2016. [18] V. Fischer, M. Ruzhansky. Sobolev spaces on graded groups. to appear in Ann. Inst. Fourier, https://arxiv.org/abs/1311.0192, 2013. [19] V. Fischer, M. Ruzhansky. Quantization on nilpotent Lie groups, Progress in Mathematics, vol. 314, Birkhäuser, 2016. (open access book) [20] V. Fischer, M. Ruzhansky, C. Taranto. On the sub-Laplacian Gevrey spaces, preprint. [21] G. B. Folland. Subelliptic estimates and function spaces on nilpotent Lie groups. Ark. Mat., 13(2):161–207, 1975. 22 M. RUZHANSKY AND C. TARANTO [22] G. B. Folland. Harmonic Analysis in Phase Space, Princeton, Princeton University Press, 2nd ed., 1989. [23] G. B. Folland, E. M. Stein. Estimates for the ∂b complex and analysis on the Heisenberg group. Comm. Pure Appl. Math., 27:429–522, 1974. [24] G. B. Folland, E. M. Stein. Hardy spaces on homogeneous groups, volume 28 of Mathematical Notes. Princeton University Press, Princeton, N.J.; University of Tokyo Press, Tokyo, 1982. [25] C. Garetto, M. Ruzhansky. On the well-posedness of weakly hyperbolic equations with timedependent coefficients, J. Differential Equations, 253:1317–1340, 2012. [26] C. Garetto, M. Ruzhansky. Weakly hyperbolic equations with non-analytic coefficients and lower order terms, Math. Ann., 357:401–440, 2013. [27] C. Garetto, M. Ruzhansky. Wave equation for sum of squares on compact Lie groups, J. Differential Equations, 258:4324–4347, 2015. [28] C. Garetto, M. Ruzhansky. Hyperbolic second order equations with non-regular time dependent coefficients. Arch. Rational Mech. Anal., 217:113–154, 2015. [29] B. Helffer, J. Nourrigat. Caracterisation des opérateurs hypoelliptiques homogènes invariants à gauche sur un groupe de Lie nilpotent gradué. Comm. Partial Differential Equations, 4(8):899– 958, 1979. [30] S. Helgason. Wave equations on homogeneous spaces. In Lie group representations, III (College Park, Md., 1982/1983), volume 1077 of Lecture Notes in Math., pages 254–287. Springer, Berlin, 1984. [31] L. Hörmander. Hypoelliptic second order differential equations, Acta Math., 119:147–171, 1967. [32] A. Hulanicki, J. W. Jenkins, J. Ludwig. Minimum eigenvalues for positive, Rockland operators, Proc. Amer. Math. Soc., 94:718–720, 1985. [33] T. Kinoshita, S. Spagnolo. Hyperbolic equations with non-analytic coefficients, Math. Ann., 336:551–569, 2006. [34] R. Melrose. Propagation for the wave group of a positive subelliptic second-order differential operator. In Hyperbolic equations and related topics (Katata/Kyoto, 1984), pages 181–192. Academic Press, Boston, MA, 1986. [35] K. G. Miller. Parametrices for hypoelliptic operators on step two nilpotent Lie groups. Comm. Partial Differential Equations, 5(11):1153–1184, 1980. [36] D. Müller, E. M. Stein. Lp -estimates for the wave equation on the Heisenberg group. Rev. Mat. Iberoamericana, 15(2):297–334, 1999. [37] A. I. Nachman. The wave equation on the Heisenberg group. Comm. Partial Differential Equations, 7(6):675–714, 1982. [38] T. Nishitani. Sur les équations hyperboliques à coefficients höldériens en t et de classe de Gevrey en x. Bull. Sci. Math. (2), 107(2):113–138, 1983. [39] M. Reed, B. Simon. Methods of Modern Mathematical Physics, Vol. 1: Functional Analysis, revised and enlarged edition, Academic Press, 1980. [40] C. Rockland. Hypoellipticity on the Heisenberg group-representation-theoretic criteria. Trans. Amer. Math. Soc., 240:1–52, 1978. [41] L. P. Rothschild, E. M. Stein. Hypoelliptic differential operators and nilpotent groups. Acta Math., 137(3-4):247–320, 1976. [42] M. Ruzhansky, N. Tokmagambetov. Wave equation for operators with discrete spectrum and irregular propagation speed. to appear in Arch. Rational Mech. Anal. https://arxiv.org/abs/1705.01418 [43] M. Ruzhansky, V. Turunen. Pseudo-Differential Operators and Symmetries: Background Analysis and Advanced Topics, Basel, Birkhäuser, 2009. [44] M. E. Taylor. Noncommutative harmonic analysis, volume 22 of Mathematical Surveys and Monographs, American Mathematical Society, 1986. [45] A. F. M. ter Elst, D. W. Robinson. Spectral estimates for positive Rockland operators. In Algebraic groups and Lie groups, volume 9 of Austral. Math. Soc. Lect. Ser., pages 195–213. Cambridge Univ. Press, Cambridge, 1997. [46] S. Thangavelu. Harmonic analysis on the Heisenberg group, Boston, Birkhäuser, 1998. TIME-DEPENDENT WAVE EQUATIONS ON GRADED GROUPS Michael Ruzhansky: Department of Mathematics Imperial College London 180 Queen’s Gate, London SW7 2AZ United Kingdom E-mail address [email protected] Chiara Taranto: Department of Mathematics Imperial College London 180 Queen’s Gate, London SW7 2AZ United Kingdom E-mail address [email protected] 23
4math.GR
1 Green Data Centers: A Survey, Perspectives, and Future Directions Xibo Jin1,2 , Fa Zhang1 , Athanasios V. Vasilakos3 and Zhiyong Liu1 of Computing Technology, Chinese Academy of Sciences 2 University of Chinese Academy of Sciences, Beijing, China 3 University of Western Macedonia, Greece 1,2 Email: {jinxibo, zhangfa, zyliu}@ict.ac.cn 3 [email protected] arXiv:1608.00687v1 [cs.DC] 2 Aug 2016 1 Institute Abstract—At present, a major concern regarding data centers is their extremely high energy consumption and carbon dioxide emissions. However, because of the over-provisioning of resources, the utilization of existing data centers is, in fact, remarkably low, leading to considerable energy waste. Therefore, over the past few years, many research efforts have been devoted to increasing efficiency for the construction of green data centers. The goal of these efforts is to efficiently utilize available resources and to reduce energy consumption and thermal cooling costs. In this paper, we provide a survey of the state-of-the-art research on green data center techniques, including energy efficiency, resource management, thermal control and green metrics. Additionally, we present a detailed comparison of the reviewed proposals. We further discuss the key challenges for future research and highlight some future research issues for addressing the problem of building green data centers. Keywords—Green data center; Energy efficiency; Resource management; Thermal control; Green metrics, monitoring and experimental techniques I. I NTRODUCTION As hosts of large-scale service applications, data centers now play a crucial role in modern Information Technology (IT) infrastructures. With the development of cloud computing, data centers are growing exponentially in number and size. A new study from International Data Corporation (IDC) predicts that the total number of data centers deployed worldwide will peak at 8.6 million in 2017 [1]. Consequently, the extremely high energy consumption and carbon dioxide emissions of data centers are becoming a major concern worldwide. The Natural Resources Defense Council (NRDC) reported that 91 billion KWh of electricity was consumed by U.S. data centers in 2013. Continuing this trend, NRDC estimates that the electricity usage will reach 140 billion KWh by 2020. As a result, data center electricity consumption will cost American businesses $13 billion annually in electricity bills and result in the emission of nearly 100 million metric tons of carbon pollution per year [2]. Globally, it had revealed that power requirements grew by 63% to 38 Gigawatts in 2012, up from 24 Gigawatts in 2011 [3]. Moreover, data centers will consume 8% of the worldwide electricity supply by 2020 while this fraction was about 1.3% in 2010 [4]. Therefore, making data centers “green” can reduce both costs for energy consumption and carbon dioxide emissions. Existing data centers often operate at low utilization because of over-provisioning and fragmentation of resources [5], [6], leading to considerable energy waste. According to a McKinsey study in 2008 [7], the typical utilization ratio is approximately 6%. A Gartner report from 2012 [8] found the typical utilization rates to be in the 7% to 12% range, slightly better than the result of the 2008 McKinsey study. Recently, Google Inc. reported that they can improve the utilization of their servers to relatively high rates of 20-40% [9]. Many studies [10], [11], [12] have also shown that data center networks experience high underutilization, with typical utilization ranging between 5% and 25%. What makes the matter worse is that the low utilization of these servers and network resources also cause the waste of other supporting infrastructure, such as power distribution and cooling. From these data, we can see that the present energy efficiency of data centers is extremely low and that there is great potential for reducing energy consumption in data centers. Motivated by the high energy consumption and low utilization of data centers, many research efforts over the past few years have focused on the design of green data center infrastructures and services. Generally, these approaches can be categorized into two major classes [13]: 1) those that adopt “green” equipment in the preliminary design and building phase of the data centers, and 2) those that increase the efficiency of the daily expenditures incurred during the operation of the data centers. In this paper, we focus on the latter class of methods, i.e., those that emphasize managing the procedures for running and operating data centers in a “green” manner. To this end, research studies on the development of green data centers have concentrated on the following aspects: 1) decreasing the power consumption of data center resources, 2) increasing the utilization of data centers, 3) controlling the thermal behavior of data centers, and 4) developing green metrics, monitoring and experimental techniques. From the perspective of data center architecture, the fundamental components of data centers are 1) computing servers, 2) connection networks, and 3) cooling equipment. Correspondingly, green data center technologies can be applied to a individual component or to a hybrid scheme of components. Although obvious progress has been made in the construction of green data centers over the past decade, there is still a large gap, and therefore a large opportunity for savings, between the current average and the characteristics of a bestpractice green data center [14]. In this paper, we present a survey of the current state-of-the-art research on green data centers, as summarized in Fig. 1. Some recent surveys have conducted on energy-aware resource allocation for cloud computing [15] or green data center networks [16]. Different from them, our survey covers many aspects of the development of green data centers. Our main contributions are two-fold: 1) we discuss the key insights underlying recent strategies and compare the relevant proposals, and 2) we note the future research challenges and directions for various aspects of the design of green data centers. The remainder of this paper is organized as follows. First, we discuss the studies on and challenges of decreasing power consumption in Section II. We introduce efforts toward and opportunities for the efficient utilization of data center re- 2 Green Data Center Energy Efficiency Resource Management Virtual Machine Assignment Dynamic Speed Scaling Network Traffic Engineering Power-Down Mechanism Power Distribution Hybrid Technology Green Metrics Thermal Control Cooling and Workload Distribution Green Metrics TemperatureReliability Trade-off Green Monitoring and Experimental Techniques Renewable Energy Access Fig. 1: An overview of green data center techniques sources in Section III. We explore studies and potential cooling issues related to data center temperature and thermal control in Section IV, and we describe the development of and guidelines for green metrics, monitoring and experimental techniques in Section V. Finally, we conclude the paper in Section VI. II. E NERGY E FFICIENCY The direct approach to the development of green data centers is to curb their energy use by employing energy efficiency techniques. The fundamental concept is to exploit power management technology in the Information and Communication Technology (ICT) devices of data centers. In this regard, the research community has proposed a number of possible approaches in recent years. A. Dynamic Speed Scaling (SS) This scheme, which is also known as Dynamic Voltage and Frequency Scaling (DVFS), focuses on lowering the frequency/speed of devices to save energy. Dynamic speed scaling allows for power savings as power consumption is approximately proportional to the supply voltage or the device speed s (e.g., following the cube-root rule, s3 , or a more general function f (s, α), where α is a constant power parameter) [17], [18], [19]. The goal is to determine the processing speeds and job assignment to minimize the total energy cost and guarantee the prescribed performance constraints. Intensive research, initiated by Yao et al. [17], has been conducted in pursuit of saving energy by speed scaling. Some efforts address the problem of scheduling via job deadlines [20] and the optimization of job flow times [21]. Other approaches consider the problem of makespan minimization [22], incorporate precedence constraints defined between jobs [23] and account for affinities between jobs and processors [24]. The research on variablespeed architectures includes single processors [17], [25], parallel processors [26], [27], and network devices [28], [29], [35] with preemption or nonpreemption settings [30], [31]. Some studies also have addressed realistic speed models in which only a finite set of discrete speed levels is available [32], [33] or in which the speeds are bounded on an interval [34]. In addition, Bampis et al. [35] studied a heterogeneous multiprocessor preemptive problem, in which it was assumed that each processor had a different speed-to-power function. We can present all these efforts in a consistent fashion by extending the standard threefield notation of [55]; we summarize the algorithmic results obtained for dynamic speed scaling in Tables I and II, and the symbols used are defined in Table III. When a large-scale warehouse is considered, speed scaling is adopted to seek solutions for optimizing the energy consumption based on the current load [56], [57], [58]. Higher speeds allow for faster execution but also result in higher power consumption. Gandhi et al. [56] studied the problem of finding the optimal power allocating in terms of determining the optimal frequencies of the servers in a server farm to minimize mean response time after measuring the power-to-frequency relationship of each server for a given workload. The authors noted that use of the optimal power allocation significantly improved the response time, by a factor of typically 1.4 and, in some cases, as much as a factor of 5. In [57], the authors considered how to balance the mean response time and mean energy consumption in processor sharing scheduling when dynamic speed scaling is applied to reduce energy consumption. They identified a scheme that provided results that were nearly identical to the optimal objective of dynamic speed scaling, i.e., that simultaneously minimized energy consumption and response time. Speed scaling has also been studied in the arbitration of power consumption and system throughput. In [58], the authors provided a probabilistic framework in which online decisions were made on request for admission control, routing, and virtual machine (VM) allocation. They modeled a unified objective function to balance the power consumption of the servers and the system throughput for application requests. At the network level, an Adaptive Link Rate (ALR) can be applied on links to reduce energy consumption [59], [28], [60], [61]. Gunaratne et al. [28] proposed a Markovian model to reduce the energy consumption of a typical Ethernet link by adaptively varying the link data rate in response to utilization. The authors found that their scheme allows an Ethernet link to operate at a lower data rate for more than 80% of the time, yielding approximately $70 million in energy savings per year TABLE I: Algorithmic results for speed scaling approaches based on the minimization of energy subject to deadline feasibility constraints. Speed Mode Environment Problem 1|r j , d j , pmtn | E Algorithm Type Offline Complexity Approximation/Competitive Ratio O ( n3 ) [17], O ( n2 log n ) [20] -α α α αα [17], 2( α− 1 ) e [25] Online Single processor Continuous speed scaling Multiple homogeneous processors 1| agreeable, pmtn | E 1|r j , d j , w j = 1, non-pmtn | E 1| agreeable, non-pmtn | E 1|laminar, non-pmtn | E 1|r j , d j , non-pmtn | E Offline P | agreeable, w j = 1, pmtn, non-mig| E Offline P | agreeable, pmtn, non-mig| E P |r j = 0, d j = d, w j = 1, M j , pmtn, non-mig| E P |r j = 0, d j = d, pmtn, non-mig| E P |r j , d j , w j = 1, pmtn, non-mig| E P |r j = 0, d j = 1, w i,j , pmtn, non-mig| E Single processor Discrete speed scaling Multiple homogeneous processors Offline P |r j = 0, d j = d, pmtn, mig| E P |r j , d j , pmtn, mig| E P |r j = 0, d j , pmtn, non-mig| E P |r j , d j , pmtn, non-mig| E Multiple heterogeneous processors Offline 1 O ( n2 ) [37] Polynomial [38] Polynomial [17], [30] NP-hard [30] NP-hard O ( n log n ) [40] O ( n2 f ( n )) [41] O ( n f ( n ) log K ) [42] O ( n log n ) [26] Online Offline Online Offline Online Offline O ( m f ( n ) log n ) [24] NP-hard [24], [26] NP-hard ( m ≥2) [26] NP-hard NP-hard APX-hard [39] P |r j , d j , non-pmtn, non-mig| E Offline R|r ij , dij , w ij , pmtn, mig| E R|r ij , dij , w ij , pmtn, non-mig| E Offline Polynomial ( 1ǫ ) NP-hard Offline O ( dn log n ) [32] 1|r j , d j , pmtn | E P |r j = 0, d j = d, M j , pmtn, non −mig| E NP-hard Offline (12(1 + ǫ)) α−1 [39] ----α α α 2( α − 1 ) e [26] αα 24α [26] -PTAS [24], [26] αα 24α [26], B⌈α⌉ [27] αα 24α [26] 2(2 − m1 ) α [26], B⌈α⌉ [27] B⌈α⌉ [27] α α α 2( α − 1 ) e B⌈α ⌉ [27] 1 m α ( n m ) α−1 [31] ( 25 ) α−1 Beα ((1 + ǫ)(1 + wwmax )) α [39] min OPT + ǫ [35] (1 + ǫ) α Beα [35] -2 α − 1 ( α −1 ) α − 1 ( δ α −1 ) α ( δ −1)( δ α− δ ) α −1 Online NP-hard [33] 1 4α /(2e 2 α 2 ) [36] ---QPTAS [38] 25α−4 [30] (1 + wwmax ) α [31] min eα [35] 2α −1 ( 1 + ǫ ) α B + 1 (δ = maxi sis+i 1 ) [43] (2∆ ) α−1 ( ∆ = maxi ( s i +1 /s i )) [33] 3 TABLE II: Algorithmic results for speed scaling approaches based on flow time, makespan, and throughput. Speed Mode Environment Problem 1|r j , w j = 1, non-pmtn, E | F 1|r j , non-pmtn, E | F 1|r j , w j = 1, non-pmtn | E + F Single processor Continuous speed scaling Single processor (speed bounded) 1|r j , w j = 1, pmtn | E + F 1|r j , pmtn | E + W F 1|r j , pmtn, E | F 1|r j , pmtn | E + F 1|r j , pmtn/non-pmtn, E |Cmax 1|r j , d j , pmtn, E |U 1|r j , d j , pmtn, E |WU 1|r j , w j = 1, pmtn | E + F 1|r j , pmtn | E + F Algorithm Type Complexity O ( n2 log L ) [44] Offline O ( n3 log K ) [21] Online Online Offline O ( n log n ) [22] 9 ) [49] Pseudo-poly, O ( n6 T 9 Vmax 2 4 9 9 ) [49] Pseudo-poly, O ( n S T Vmax Online Multiple homogeneous processors Multiple heterogeneous processors Discrete speed scaling Single processor P = 2|r j , d j , pmtn, mig|U, E P |r j , pmtn, mig| E + F P |r j , pmtn, non-mig| E + F P |r j , w j = 1, pmtn/non-pmtn, non-mig, E | F P |r j , pmtn, non-mig| E + F P |r j , w j = 1, pmtn/non-pmtn, non-mig, E |Cmax P |r j = 0, non-pmtn, non-mig, E |Cmax P |r j = 0, non-pmtn, non-mig, prec, E |Cmax P |r j , d j , w j = 1, m, non-pmtn, non-mig, E |WU P | agreeable, w j , m, non-pmtn, non-mig, E |WU R|r j , pmtn, non-mig| E + F R|r j , Pi ( s ) = s αi , pmtn, non-mig| E + W F R|r j , Pi ( s ) = s αi , pmtn, non-mig| E + F R|r ij , dij , w ij , Pi ( s ) = s αi , pmtn, non-mig, E |WU 1|r j , pmtn/non-pmtn, E |Cmax 1|r j , d j , pmtn |U, E -(1 + ǫ) α -energy O ( ǫ1 )-approximate [44] -√ 8.3e ((3 + 5) /2) α [21] 4 [45] O ( α2 / ln2 α) [45] not O (1)-competitive [45] O ( lnαα ) [46] 3 + ǫ [47] 2 + ǫ [48] ---4 [34] α −1 2( α + 1) / ( α − 1/ ( α −1) ) [46] ( α +1 ) 14-competitive ( αα + α2 4α )-competitive [50] 4-competitive ( αα + α2 4α )-competitive [34] 3-approximate O (1)-approximate [43] 3-competitive O (1)-competitive [51] O (1) [52] O (1) [52] arbitrarily good [22] (3 + ǫ) B⌈α⌉ [27] arbitrarily good [22] 1|r j , d j , pmtn, |U, E Offline Multiple homogeneous processors (speed bounded) Approximation/Competitive Ratio Online Offline Online NP-hard [22] Offline NP-hard pseudo, O ( n12m +7 S2 ) [53] O ( n2m +2V 2m +1 Sm ) [53] O ( 1ǫ )-competitive (1 + ǫ )-speedup [54] O ( α2 ) ( α = maxi αi ) [54] O ( α) ( α = maxi αi ) [54] 2( Γ + 1)(1 + ǫ ) ( Γ = maxi αi ) [53] Online Offline Offline Online 2 O (log1+ α m ) [23] O ( n log n ) [22] -14-competitive ( ∆ α ( αα + αα 4α ) + 1)-competitive [50] 4 5 TABLE III: Definitions of symbols for dynamic speed scaling Symbol Definition 1 P R m n d Single process Homogeneous parallel (multiple) processors Heterogeneous parallel (multiple) processors Number of processors Number of jobs Number of available discrete speeds e α ǫ B⌈ α ⌉ eα B A mathematical constant, e ≃2.71828 A constant power parameter An arbitrary parameter ⌈ α⌉-th Bell number Generalized version of the Bell number Ω(( e lnα α ) α ) The largest ratio of two consecutive (non-zero) speed levels ∆ f (n) Time complexity of computing a maximum flow in a layered graph with n vertices K The range of all possible values of speeds divided by the desired accuracy L The range of all possible values of power divided by the desired accuracy T Vmax V S The The The The span length max j,j ′ ( d j − r j ′ ) maximum processing volume sum of processing volumes Σ j w j sum of weights rj dj wj w max ( w min ) Job j’s release date Job j’s deadline Job j’s processing volume Maximum (Minimum) processing volume of all jobs r ij Job j’s release date on processor i Job j’s deadline on processor i dij w ij Job j’s processing volume on processor i Mj Job j’s eligible processor set Energy consumption E (W ) F (Weight) Flow time Makespan Cmax (W )U (Weight) Throughput pre Precedence constraints defined between jobs ( non−) pmtn (Not) Allow jobs to be interrupted ( non−) mig (Not) Allow jobs to be interrupted and resumed on the same or another processor agreeable laminar For any two jobs j and j′ , if r j ≤r j ′ , then d j ≤ d j ′ If r j ≤r j ′ , then d j ≥d j ′ or d j ≤r j ′ in the U.S. with only a very small increase in packet delay. Abts et al. [60] proposed a power-optimizing mechanism for links with the capabilities of a network with the flattened butterfly topology. The authors scaled down the network links with a data rate proportional to the traffic intensity while accepting a trade-off of additional mean latency. They reported an energy savings of approximately 42%. Wang et al. [61] presented a rate-adaptation-based solution with the intent of approaching network-wide energy proportionality via routing optimization. The simulation results indicated that the scheme could achieve up to 40% energy savings while introducing a very slight increase in network delay. B. Power-Down Mechanism (PDM) In this scheme, devices are transitioned into a low-power standby or sleep mode while they are idle to save energy. One must determine when idle periods exist that are of sufficient duration to outweigh the costs incurred by the scheme (such as the cost for transitioning from the sleep state and the delay cost) and decide when to wake the devices from the powersaving mode to satisfy the workload demand. When a single device is considered and the transition delay is ignored, the problem of managing power in a two-state situation (active state and sleep state) is equivalent to the ski-rental problem. A competition analysis of this problem was presented by [62], [63]. Irani et al. [64] extended the study to devices with multiple states. The authors presented a deterministic algorithm that achieved 2-competitive performance when the transition energies were assumed to be additive. In [65], the authors investigated the generalized case in which the state transition energies could take √ arbitrary values and achieved a competitiveness of 3 + 2 2. With preemptions allowed and the process of waking up assumed to require a certain fixed amount of energy, Baptiste et al. [67] provided an O(n5 )-time algorithm for offline operation. For the case in which the tasks have agreeable deadlines, i.e., later-released tasks also have later deadlines, [68] and [69] proposed algorithms to improve the time complexity. Given a single processor, tasks with arbitrary processing time and unit transition costs, [68] proposed an O(n log n ) greedy algorithm. Later, Angel et al. [69] proposed an O(n2 ) algorithm for tasks with arbitrary processing time and arbitrary transition costs in a single-processor environment. For tasks with unit processing time and unit transition cost in the multiprocessor case, the authors of [69] also provided an O(n2 m) algorithm. In [70], Demaine et al. considered the powersaving problem in which each task must be executed within a specified set of time intervals and proposed a (1 + 32 L c )approximation algorithm, where L c is the transition cost. In [71], the authors studied the problem of online dynamic power management in a three-state situation (busy state, standby state and off state). They first considered the case in which the set of tasks that could feasibly be scheduled on a single processor was known in advance (packable) and, for this case, proposed a 4competitive online algorithm that used at most two processors. The competitive ratio was improved to 3.59 for tasks with unit processing time. For the general case of tasks with unit processing time and multiple processors, an O(1)-competitive algorithm was provided. In Table IV, we summarize all the algorithmic results mentioned above regarding power-down mechanisms; the definitions of the symbols are the same as those given in Table III. For large hosting centers, several studies recommend energyproportional computing [72], [73], [74], [75], [76], [77], [78], [79]. Here, “proportional” refers to the concept that the size of the data center should be proportional to its workload demand [80]. In [72], the authors proposed energy-conscious provisioning to concentrate the request load on a minimal active set of servers appropriate to the current aggregate load level. The excess servers would be transitioned into a power-saving state to reduce the energy cost during periods of light load. These authors reported that their system could reduce server energy usage by 29% or more for a typical Web workload. Lin et al. [73] investigated the energy-saving problem by dynamically “right-sizing” the target data center by turning off servers during lighter periods in both offline and online cases. They 6 TABLE IV: Algorithmic results for power-down mechanisms. The definitions of the symbols are the same as those given in Table III, and the term packable means that the set of tasks that can feasibly be scheduled on a single processor is known in advance. Environment Task Model Algorithm Type rj , wj Two states (active state and sleep state), transition cost Lc is arbitrary Online -- rj , wj Multiple states ({s0 , ..., s k }), transition cost Lc is additive Online -- 2 [64] rj , wj Multiple states ({s0 , ..., s k }), transition cost Lc is arbitrary Online -- √ 3 + 2 2 [65] rj , dj , wj = 1 Two states (active state and sleep state), transition cost Lc is arbitrary Offline O ( n7 ) [66], O ( n4 ) [67] -- r j , d j , w j , pmtn Two states (active state and sleep state), transition cost Lc is arbitrary Offline O ( n5 ) [67] -- agreeable, w j , pmtn Two states (active state and sleep state), transition cost Lc is unit Offline O ( n log n) [68] -- Single processor Multiple homogeneous processors Multiple homogeneous processors, m=2 Multiple homogeneous processors Complexity Approximation/Competitive Ratio Transition Cost 2 [62], e/ ( e − 1) [63] 3 agreeable, w j = 1 Two states (active state and sleep state), transition cost Lc is arbitrary Offline O ( n ) [68], O ( n2 ) [69] -- agreeable, w j , pmtn Two states (active state and sleep state), transition cost Lc is arbitrary Offline O ( n2 ) [69] -- agreeable, w j = 1 Two states (active state and sleep state), transition cost Lc is unit Offline O ( m2 n3 ) [68], O ( mn2 ) [69] -- r j , d j , w j = 1, r j ∈N, d j ∈N Two states (active state and sleep state), transition cost Lc is arbitrary Offline O ( m5 n7 ) [70] -- Execute in a specified set of time intervals, wj = 1 Two states (active state and sleep state), transition cost Lc is arbitrary Offline NP-hard [70] 1 + 23 Lc [70] r j , d j , w j = 1, pmtn, non − mig, packable Three states (busy, standby and off), transition cost Lc is arbitrary Online -- 3.59 [71] r j , d j , w j , pmtn, non − mig, packable Three states (busy, standby and off), transition cost Lc is arbitrary Online -- 4 [71] r j , d j , w j = 1, pmtn, non − mig Three states (busy, standby and off), transition cost Lc is arbitrary Online -- modeled the cost of toggling a server back and forth between the active and power-saving modes as a switching cost. The authors reported a 50% energy savings for a peak-to-mean ratio (PMR) of 5. Azar et al. [74] considered turning off machines to save on computation costs. The authors accounted for the delay cost as the duration required to turn the machines on or off. They proposed a bi-objective algorithm to address the problem of minimizing both the maximum task delay and the total cost. On the network-device level, power-down mechanisms redirect network traffic to aggregate traffic on only a few network devices and links while allowing idle devices to sleep for energy conservation [81]. In [75], the authors investigated poweraware network design and routing to dynamically power on/off line cards and chassis. They modeled the minimization of network-wide power consumption as a mixed-integer optimization problem and solved it using a branch-and-cut solver that incorporated several practical considerations (such as the network structure). They demonstrated that their results were within 11% of the optimal result. Bolla et al. [76] used energyaware traffic engineering on backbone networks to manage the standby and wakeup behavior of network devices with respect to the IP layer. The basic concept driving their work was to periodically reconfigure the network nodes and links to accommodate incoming traffic volumes and operational constraints (e.g., quality of service and reconvergence times). The authors noted that the energy savings depended on the level of traffic O (1)-competitive [71] load; specifically, the energy savings was approximately 40% when the traffic load was less than 50%. Andrews et al. [77] studied routing and scheduling in a power-down model and captured the trade-off between energy savings and provisioning performance guarantees such as end-to-end delays. The authors proposed scheduling algorithms for line and arbitrary topologies. In the case of periodic scheduling, the schedule determined the active period per element within each frame and prioritized the packets within each active period. Zhang et al. [78] proposed GreenTE, an intra-domain energy-aware traffic engineering mechanism that maximizes the number of links that can be placed in sleep mode while satisfying performance constraints (e.g., link utilization and packet delay). The authors reported an energy savings of 27-42% for a maximum link utilization below 50%. ElasticTree [79] dynamically adjusts the set of active network elements to achieve a trade-off between energy efficiency and performance. The authors used methods including a formal model, a greedy bin-packer, a topologyaware heuristic and prediction to determine which subset of links and switches to use. The authors reported a network energy savings of 50%. C. Hybrid Technology Various studies of hybrid technology have also been reported that have explored both speed scaling and power-down mechanisms to fully exploit the potential for energy savings. In 7 a standard speed scaling setting, there is a tendency to use low speed levels, subject to prescribed deadline constraints. By contrast, in combination with the power-down approach, it can be beneficial to speed up the processing of tasks to generate idle intervals in which devices can be transitioned to the power-saving mode. Irani et al. [82] performed the first theoretical analysis of reducing energy usage by combining placing the system in a sleep state if it is idle with varying the speed at which tasks are processed. Assuming that all tasks could be preempted and resumed at no cost, the authors proposed a 2-approximation offline algorithm and a constantcompetitive-ratio online algorithm. Several subsequent studies presented algorithms that improved on these result [83], [84], [85], [86]. In [83], the authors considered online scheduling of a processor to manage its energy consumption using both speed scaling and a sleep state. They proposed an algorithm called SOA to improve the competitive ratio for energy minimization from 22α −2 αα + 2α −1 + 2 [82] to max {4, αα + 2}, under the assumption that the speed could be arbitrarily high. They also showed that when the maximum speed of the processor was bounded, their algorithm was 4-competitive for throughput and (αα + α2 4α + 2)-competitive for energy. In [84], the authors presented an algorithm called SqOA to further improve the competitive ratio of SOA [83] in the unbounded-speed setting to max {4, (2 − 1/α)α 2α −1 + 2}. The authors of [85] designed superior approximation algorithms for the offline case. They proposed a 4/3-approximation algorithm for general convex power and a 137/117-approximation algorithm for power functions of the form P (s) = βsα + γ. Recently, Antoniadis et al. [86] closed the gap in the approximation factor by presenting a fully polynomial-time approximation scheme for the deadline-based preemptive offline scheduling problem. In [87], the authors extended the study of this strategy to minimize the sum of energy and flow on a processor with one or multiple levels of sleep states. They designed O(1)-competitive clairvoyant and non-clairvoyant algorithms in the unlimited-speed setting (note: the terms “clairvoyant” and “non-clairvoyant” indicate that the sizes of the tasks are either known or not known, respectively, when the tasks arrive). Under a maximum-speed constraint, they enhanced their algorithm to again achieve O(1)-competitive performance. Chen et al. [88] proposed a framework to allow the employment of both approaches to enhance energy savings in hosting centers. Their solutions were based on queuing models and control theory and did not require compromise in enduser Service Level Agreements (SLAs). In [89], the authors considered reducing the power consumed in geographically distributed data centers. They proposed an approach that incorporated selecting the number of active servers and their service rates to minimize the time-averaged power cost incurred when handling delay-tolerant workloads. Liu et al. [90] developed SleepScale, a power management tool to manage data centers for power efficiency while fulfilling quality-of-service (QoS) agreements. They exploited the low-power states and operating frequency that are built into modern CPUs and proposed a joint optimization of speed scaling and sleep-state selection to reduce energy consumption. [91], [92] and [93] presented studies of network elements. Nedevschi et al. [91] explored the use of hybrid technology to reduce network energy consumption by putting network components to sleep during idle periods and adapting the rate of network operation to the requested workload. They showed that the effect depended on the power profile of the network equipment and the utilization of the net- work itself. Using real-world traffic workloads, topologies and power constants, they reported an energy savings of 50% for a network utilization of 10-20%, accompanied by a very slight increase in latency. The developers of EATe [92] formulated a method of online traffic management to spread the load across multiple paths while minimizing energy consumption. Their approach leveraged the rate adaptation and power-down of links and routers to configure an energy-proportional network hardware structure. Extensive ns-2 simulations demonstrated that EATe could place 21% of the links in the sleep state, lower the link energy levels to achieve 8% energy savings and put 16% of the active routers to sleep. Wang et al. [93] studied the problem of flow scheduling and routing while meeting flow deadlines in data center networks. They combined speed scaling and power-down mechanisms to determine routing paths and schedules as well as the transmission rate for each flow. D. Challenges and Research Issues The studies discussed above demonstrate that energyefficient mechanisms can assist in making data centers green and reducing energy usage. Furthermore, they reveal that there is a trade-off between performance and energy consumption. The aforementioned efforts also have demonstrated that a considerable amount of the energy consumed as a result of overprovisioning can be saved while still satisfying performance constraints. However, there are still several other issues to be addressed concerning the design of energy-efficient algorithms: • Most studies that have been conducted on energy efficiency thus far have focused on ideal power models. However, future investigations should consider scenarios that more closely resemble real systems. For example, some overhead is incurred when switching speeds because the processor must stop while the voltage is changing, and frequent changes in speed can also harm a processor’s lifetime reliability [94]. An interesting question is how to incorporate these aspects of real systems into performance studies. • In classical parallel scheduling problems, the number of servers is fixed, and the scheduler primarily decides which task to process on which processor and determines the speed of each processor at a given time. However, data centers operate on a different model in which servers can be activated and released on demand [95] and in which it is necessary to exploit an appropriate number of servers to process the submitted tasks. Thus, the characteristics of data centers pose new challenges and open problems, of which the key underlying requirements are scalability, uncertainty and efficiency. • As mentioned earlier, the latency time and power consumption incurred in the process of rebooting means that the effects of turning servers or switches off and on cannot be overlooked. Moreover, these effects are more serious at the network level because communication data can be lost after a certain threshold latency time [96]. Fortunately, data center network architectures typically provide multiple paths for communication among their servers. The question of how to efficiently manage energy consumption in data center networks is still a major concern that is worthy of investigation. The well-structured topology of data center networks can be investigated to address this issue. A good mechanism design should 8 minimize the effects on the network throughput, latency, congestion and packet loss while incorporating the structure of the data center network architecture. • Current results for multiple processors (servers) mostly focus on environments that consist of homogeneous collections of identical processors (servers). However, many computer architects believe that architectures based on heterogeneous processors will dominate future architectural design [97], [98]. The primary advantage of heterogeneous architectures is that the design can include certain processors that are specialized for particular types of tasks, with the intent of assigning tasks to those processors that are best suited for them [99]. It is also natural to consider the possibility of heterogeneity in data centers, as the various servers contained in data centers often differ from each other in their power-performance relationships. At this time, few results for heterogeneous environments are extant in energy-efficient algorithm design. We believe that addressing the above challenges and research issues will lead to significant advances in the current level of energy efficiency of data centers. III. D ATA C ENTER R ESOURCE M ANAGEMENT Whereas the previous section discussed schemes to increase the energy efficiency of computing and communication devices, in this section, we present prominent research works that exploit virtualization and cloud computing to efficiently utilize data center resources. The concept of virtualization is in contrast to the traditional architecture, which leads to low utilization rates and, in turn, wastes resources because servers continue to run although they are not processing applications to their full potential. Through virtualization, the power of servers can be multiplexed to address many applications, and with the help of virtualization, more than one application can be assigned to one server. Thus, this technique enables significant and cost-effective gains in resource utilization and associated energy savings. A second innovation that can greatly increase utilization rates is the development and maturation of cloud computing. The shift to the cloud encourages economies of scale because servers can be run on virtual platforms, which offer higher utilization rates, and these large cloud providers are highly incentivized to optimize the utilization of data centers and reduce energy consumption to maximize productivity. In this section, we analyze methods that adopt these two approaches for virtual machine assignment, network traffic engineering, power distribution and renewable energy access with a view to providing better energy management for green data centers, and we consider the corresponding directions for future research. A. Energy-Aware Virtual Machine Assignment Underutilization in data centers is a major cause of excessive energy consumption. Moreover, modern servers are sufficiently powerful to use virtualization to present the illusion of many smaller virtual machines (VMs), each running independent applications [100]. Therefore, optimal virtual machine management (including allocation, consolidation, and migration) is an important technique for data centers that can facilitate the improvement of resource utilization and the reduction of energy consumption. The general idea is to efficiently map VMs to servers based on resource matching and improved performance metrics. An early study [101] extended virtualization solutions to support rich and effective policies for active power management, which had not been done before. The authors integrated “hard” and “soft” power states to achieve high power savings and showed that substantial benefits could be derived from the coordination of online methods for server consolidation using their proposed management techniques. In [102], Raghavendra et al. proposed a power management solution that coordinated various individual approaches, including a virtual machine controller. Their design used techniques and actuators to optimize power at multiple system levels across both hardware and software. Hermenier et al. [103] proposed Entropy, a consolidation manager that performed dynamic consolidation of VMs based on constraint programming and accounted for migration overhead. The authors showed that their approach could significantly reduce the number of nodes and the migration time compared with results obtained using the FFD heuristic. They reported that the consumption of nodes per hour could be reduced by 25%. When exploiting the ability to consolidate several virtual machines on the same physical server, a key challenge is to explicitly account for the specified QoS in the optimization problem [104], [105]. Van et al. [106] defined the condition of SLA fulfillment and the resource management cost as a global utility function. The authors adopted the Constraint Programming approach to formulate and solve the considered problem. Kusic et al. [107] considered the problem of consolidating services into a smaller number of computing resources to achieve higher server utilization and energy efficiency while maintaining the desired QoS. The authors implemented a dynamic resource provisioning framework to treat this problem as a problem of sequential optimization and solve it using a lookahead control scheme. They reported 22% power savings compared with a system without dynamic control. Several other efforts have also been directed toward the online assignment of virtual machines to fewer servers. Beloglazov et al. [108] proposed novel adaptive heuristics for the dynamic consolidation of VMs based on an analysis of historical data related to VM resource usage. They applied a modification of the Best Fit Decreasing algorithm to perform the VM assignment, and they achieved significant reduction of energy consumption while ensuring a high level of adherence to the SLA. In [109], the authors considered the problem of consolidating virtual machines when the network bandwidth demands of the VMs are dynamic. They converted the problem into a Stochastic Bin Packing problem and proposed an online packing algorithm. √ They reported that the performance ratio was within (1 + ǫ)( 2 + 1) for any ǫ > 0 and that the number of required servers was reduced by 30% compared with the results of the HARMONIC algorithm [110]. In [111], policies that minimized the total number of occupied servers in the system were studied. The authors presented Greedy with sublinear Safety Stocks (GSS) and Modified GSS (GSS-M) policies. Generally speaking, these GSS and GSS-M policies scheduled incoming virtual machines in a manner that greedily minimized the total number of occupied physical servers. The authors demonstrated the asymptotic optimality and convergence rate of their policies. However, such beneficial consolidation also introduces an SLA violation risk. In [112], the authors presented a risk management framework to address the problem of consolidating virtual machines for energy efficiency in data centers. They suggested a two-step approach to virtual machine scheduling: 1) they solved the problem of resource allocation for virtual machines using a stochastic program, and 9 2) they proposed an algorithm for dynamic virtual machine consolidation at run time. Using real-world workloads, they showed that SLA violations were reduced by a factor of four, from 25% to 2-5%, compared with other virtual machine consolidation algorithms that do not consider the SLA violation risk. Table V summarizes the various approaches to energy-aware virtual machine assignment and presents a comparison of the common features identified among the different proposals mentioned above. The features selected for comparison are as follows: 1) the resources considered, 2) the techniques used in the proposals, 3) the traces used for the experiments, 4) the performance metrics considered, and 5) the results of the proposals. B. Data Center Network Traffic Engineering Traffic engineering is a highly effective approach to making data centers green based on different traffic patterns and network architectures [113]. Several solutions have been proposed for achieving energy proportionality by applying traffic aggregation and virtual machine assignment techniques. In [114], the authors demonstrated that the minimization of network power consumption for any general data center topology is NP-complete. They proposed a centralized network power controller program that gathered traffic data and server statistics from all switches and servers and used this information to perform traffic aggregation and virtual machine assignment and migration in the target data center. They demonstrated the optimal placement for the virtual machines and the bandwidth savings through trace evaluation. In [115], the authors developed REsPoNse, a framework based on identifying and using energy-critical paths to redirect traffic to allow large portions of the network to enter a low-power state. They demonstrated that energy savings were achieved without frequent recomputation and deployment of new routing tables, and they showed that REsPoNse had marginal impact on the application-level throughput and latency. Their results yielded energy savings of approximately 30% and 42%. Jiang et al. [116] considered a joint design incorporating virtual machine assignment and routing for data centers. They considered the optimization of both energy cost and network congestion, then proposed an offline algorithm based on a Markov chain model and an incremental online solution for a dynamic environment. The authors reported performance analysis results for various topologies, including clique, fat-tree, HyperX and BCube topologies, under a spectrum of elephant and mice workloads. Given that the bandwidth demands of different flows do not peak at exactly the same time, the authors [117] proposed a correlation-aware power optimization scheme that dynamically consolidated traffic flows onto a small set of switches and links and then shut down unused network devices. They designed a heuristic algorithm to determine the consolidation and rate configuration, which was fundamentally based on a bin-packing algorithm. They reported an energy savings of 46% in network energy for a data center network with only a negligible increase in delay. To exploit the well-structured topology of data centers, Zhang et al. [118] adopted a hierarchical perspective to study the task of optimizing power usage in data center networks while guaranteeing connectivity and maximum link utilization. They divided their discussion into two levels: 1) the core level, for the determination of the core switches that must be powered to carry outgoing traffic and the aggregation switches to serve the out-pod traffic in each pod, and 2) the pod level, for the determination of the aggregation switches that must be active to carry intra-pod traffic. They designed a hierarchical energy optimization algorithm and evaluated it on various traffic patterns, including large traffic flow only, small traffic flow only, and random traffic patterns. In [119], the authors adopted the routing perspective to consider reducing the power consumption of high-density data center networks while satisfying network performance requirements. They proposed a routing algorithm that used as little network power as possible to provide routing services, and they reported a 39% energy savings for a link load of 20% and a reliability requirement of 2 (i.e., the threshold for the ratio of the network throughput that the data center operator could tolerate after switch and link elimination to the basic throughput achievable using all switches was 2). In [120], the authors proposed a new framework to embrace the new opportunities offered by combining certain unique features of data centers with traffic engineering. They solved the problem in two steps: first, by allocating virtual machines to servers to reduce the amount of traffic and to generate favorable conditions for traffic engineering, and then, by reducing the number of active switches and balancing traffic flows to reduce energy consumption. The experimental results indicated an energy savings of up to 50%. In addition to considering the network level, the authors of [121] considered a joint host-network energy optimization scheme involving the simultaneous optimization of virtual machine assignment and network flow routing. They modeled the joint optimization problem as an integer linear program. Because this problem is NP-complete, they proposed a series of techniques to address the associated challenges: 1) they converted the problem to one that considered a single optimization solution, 2) they proposed a parallelization approach for rapid completion, and 3) they quickly identified efficient routing paths for the flows. The authors reported that their optimization method reduced energy consumption by 40% for a system load of 30%. By utilizing correlation analysis in the joint power optimization of a data center network and servers, the authors of [122] proposed PowerNetS to achieve improved energy savings. Their approach featured a well-designed heuristic algorithm to incrementally perform virtual machine and traffic consolidation with lower virtual machine migration overheads, thereby optimizing power consumption while guaranteeing the fulfillment of network constraint. They reported that their method could achieve 51.6% energy savings for a data center. In Table VI, we summarize and compare the proposals mentioned above. The features presented for comparison are 1) the traffic patterns, 2) the network architectures, 3) the techniques used in the proposals, 4) the considered QoS specifications, and 5) the results of the proposals. C. Power Distribution Whereas virtual machine consolidation allows the total number of active physical servers to be reduced, power distribution approaches have also been proposed to reduce the high energy costs of idle systems. Driven by increasing power density, the increasing number of IT devices, and the capability of ondemand addition and removal of IT devices, there have been dramatic changes in how power is utilized in data centers [123]. In general, power distribution is over-provisioned in data centers to accommodate peaks and to allow for future expansion. However, based on the assumption that simultaneous 10 TABLE V: Comparison of the proposals regarding virtual machine assignment Proposal VM Resources VirtualPower [101] Cores on chip No “Power” Struggles [102] CPU Entropy [103] Processing unit, memory Resource management [106] Techniques VM consolidation, DVFS, resource (time slice) scheduling, server power-down VM consolidation, DVFS, server power-down Traces Performance Result RUBiS tiered web service, transactional load Processing rate, throughput 34% reduction in power Trace from enterprise deployment Throughput, power budget 64% reduction in power VM consolidation NASGrid benchmark suite Migration time 25% reduction in nodes per hour CPU, memory VM provisioning, VM packing Multiplayer online game, web application Response time, throughput Trade-off between SLA and energy Power & SLA management [107] CPU VM consolidation, DVFS, server power-down Web workload, Trade6 enterprise application Response time 22% reduction in power Consolidation of VM [108] CPU Dynamic consolidation of VMs Trace from PlanetLab Capacity violation, VM migration Consolidation VMs [109] Bandwidth VM consolidation Trace from IBM Global service and cluster Capacity violation Minimize occupied servers [111] CPU, memory VM placement with packing constraints -- -- Risk management for VMs [112] CPU, memory Resource allocation, VM consolidation Trace from CoMon project Capacity violation Significant reduction in energy 30% reduction in required number of servers Reduced number of servers Factor of 4 reduction in SLA violations TABLE VI: Comparison of the proposals regarding network traffic engineering Proposal Network Architectures Techniques QoS Result E-commerce trace Fat tree Traffic aggregation, VM placement Bandwidth, connectivity guarantees 55% network power reduction REsPoNse [115] Media stream, web workload Fat tree Energy critical-path detection Throughput, latency 40% network energy savings Joint controller [116] Parallel workload Fat tree, clique, HyperX, BCube Route selection, VM placement Congestion Data center cost improvement CARPO [117] Wikipedia trace Fat tree Traffic consolidation, link-rate adaptation Packet delay 46% network energy savings HERO [118] Large, small and random traffic Fat tree Switching off network switches Connectivity, maximum link utilization network power savings PRP [119] one-to-one, one-to-many, all-to-all Fat tree, BCube Switch and link elimination Throughput 39% network energy savings GreenDCN [120] Communicationintensive Fat tree VM assignment, switch and link engineering Connectivity 50% network energy savings Joint optimization [121] Iperf UDP Fat tree VM placement, flow routing -- 40% energy savings PowerNetS [122] Wikipedia, Yahoo! and IBM traces Fat tree VM and flow consolidation Packet delay 51.6% energy savings Network power controller [114] Traffic Patterns peak draw across all equipment will occur only rarely, power over-subscription is intentionally exploited to improve power utilization in modern data centers [9], [124], [126], [127]. Fan et al. [124] were the first to study power usage at the scale of data center workloads, and they reported the use of power modeling for power provisioning. Their work yielded several key findings: 1) The gap between the maximum power actually used by large groups of servers and their aggregate theoretical peak usage can be as large as 40% in data centers, which suggests a significant opportunity to host additional servers under the same power budget; 2) power capping is more useful as a safety mechanism to prevent overload situations; 3) large groups of servers are operating near peak power levels in certain time intervals, which suggests that power gaps and power management techniques can be more easily exploited at the data center level than at the rack level; and 4) when large groups of servers are considered, frequency scaling has the potential to be moderately effective at reducing peak power consumption. Their evaluation results indicated energy savings of 35-40%. Meisner et al. [125] proposed PowerNap, an energy-conservation approach that supported an entire system in transitioning rapidly between a high-performance active state and a near-zero-power idle state in response to instantaneous variations in load. Based on the PowerNap concept, the authors developed requirements and mechanisms to eliminate idle power waste in enterprise blade servers. The 11 authors also introduced another power provisioning approach named RAILS to be applied when PowerNap was operating in the low-efficiency regions of current blade center power supplies with the intent of providing high conversion efficiency throughout the entire range. They reported that PowerNap and RAILS could reduce the average server power consumption by 74%. To overcome local utilization spikes that could force the throttling of server performance to enforce safe power budgets, Pelley et al. [126] developed mechanisms to better utilize the installed power infrastructure. They proposed Power Routing to centrally schedule servers dynamically across redundant power feeds, and they proved that the problem of assigning servers to power distribution units (PDUs) was NPcomplete. The authors first optimally solved the relaxation problem through linear programming, assuming the servers to be assigned fractionally across feeds, and then constructed an approximate solution to the original problem. Using traces from production systems, they demonstrated that capital costs could be reduced by 32% without performance degradation. For the case in which servers are shared by virtual machines belonging to different applications, a power budgeting solution named VPS was presented by [127] to guarantee the quality of service. VPS dynamically shifted power among various distributed components as workloads and power availability varied to efficiently utilize the power budget. The authors combined hardware-based and software-based power control knobs to optimize the performance. They used traces to evaluate the following performance metrics: data-center-level and application-level power budgeting errors, application performance differentiation, and performance achieved within the power budget. In [128], the authors explored the feasibility of low-latency power states for enterprise server systems and proposed an end-to-end virtualization power management solution. They implemented the capability of a low-power and low-latency state for virtualization servers and demonstrated this technology could overcome the traditional barriers (e.g., incurred latencies) to achieve substantial energy savings via dynamic consolidation. Based on real-system evaluations, they reported that data center power efficiency could be improved by 30%. In addition to power capping, several studies have introduced Uninterruptible Power Supplies (UPSs) to store energy and reduce power budget violations [129], [130], [131]. In [129], the authors pioneered the leveraging of a UPS in a data center as an energy buffer (eBuff) to address the peak power draw problem. They used the energy stored in UPS batteries to provide energy during peak demand, resulting in a reduction in capital expenses and operating expenses without performance degradation. They reported that eBuff yielded a 15-45% peak reduction, which corresponded to a 6-18% savings in operation expenses. Because eBuff was centralized and limited by the capacity of the UPS battery, Kontorinis et al. [130] presented an architecture for distributed per-server UPSs that stored energy during low-activity periods and used this energy during power spikes. They proposed details regarding the sizing as well as technological alternatives and approaches that managed battery charging and discharging behavior while addressing reliability and availability concerns. They demonstrated that their policies prolonged the duration of UPS batteries’ usage and reduced their total cost of ownership per server by 6.3%. In [131], the authors studied the possibility of leveraging stored energy to address power emergencies. Their work demonstrated that mechanisms for power capping had performance-degrading ramifications, and they proposed an offline theoretical framework and several online heuristics to temporarily augment utility supplies during emergencies. They reported that battery-based solutions 1) could cope with emergencies of short duration, 2) supplemented existing reaction strategies to enhance efficacy for longer emergencies, and 3) provided feasible options when other strategies (power states, migration, etc.) did not suffice. In the case of aggressive over-subscription, whereas the aforementioned work suggested power capping and stored energy to reduce the risk of power peaks, the authors of [132] suggested that the power hierarchy should be treated as a data center resource of comparable importance to that of other computing resources. To this end, the authors proposed vPower, a software system to virtualize power distribution. vPower combined computing parameters (such as DVFS, consolidation, etc.) and energy storage devices to establish a virtual power hierarchy for each application. The primary advantages of vPower were that it 1) allowed applications to specify their power needs, 2) performed admission control and assignment, 3) dynamically monitored power usage, and 4) enforced the allocation of power for fairness and system efficiency. The results of a power hierarchy prototype indicated the achieved improvement in system utilization was over 50% compared with the conservative scheduling approach based on peak load requirements. D. Renewable Energy Access Expanding the use of renewable energy is another route toward green data centers. Some data center owners have already investigated and accepted alternative energies, such as solar, geothermal and wind energy [133], [134]. However, utilizing these green energies is challenging because of their restricted, intermittent and unstable nature. Therefore, the main question that must be addressed is how to exploit renewable energy and overcome the associated hindrances by exploiting the unique features of data centers. Sharma et al. [135] developed Blink to address intermittent power constraints. Based on workload characteristics and energy constraints, Blink determined the power state of the servers and minimized performance degradation. Because the power varied and the energy stored in the batteries was for short-term use, Blink’s policy had potential benefits for distributed applications. The authors constructed a cluster of 10 low-power motherboards powered by an array of micro wind turbines and solar panels to evaluate the performance under intermittent power constraints. They demonstrated that an asymmetric load-proportional policy could increase fairness without significantly sacrificing the cache’s hit rate to achieve a blinking version of memcached. Considering the location restrictions of renewable energy, Akoush et al. [136] proposed a computation architecture to avoid the necessity of expensive infrastructure investment. Their design consisted of three relevant components: 1) data centers collocated with renewable energy sources, 2) data centers linked together over a dedicated communication network, and 3) a software framework that supported the seamless execution and migration of virtual machines depending on power availability. Although they demonstrated the viability of the design in a case study, the authors also noted the technical challenges and inherent limitations of their approach, such as the efficiency of virtual machine migration between data centers and suitable workload concerns. In [137], the authors leveraged tunable energy, such as that provided by fuel cells and gas turbines, 12 to propose a power management approach that enabled data center operation with high performance and low overhead. Unlike previous work, in which the workload had been forced to track the variable power budget, their approach explored the possibility of achieving a renewable energy supply to follow the data center power demand. To overcome issues of performance degradation, they proposed two adaptive load tuning schemes, named DGR Boost and UPS Boost, based on mature computer tuning approaches (such as DVFS and UPS batteries). Evaluations performed on real-world data center traces and industry data on distributed generation systems indicated that their technique achieved a 37% improvement in performance over existing supply-tracking-based designs and saved 100 metric tons of carbon emissions annually, given that the power consumption of the data center was 10MW. If powered only by variable sources of green energy, a data center will experience unpredictable performance for applications. The most reasonable approach is to incorporate renewable energy into the electrical grid. In [138] and [139], the authors considered a data center powered by a solar array and the electrical grid. Two scheduler frameworks, named GreenSlot and GreenHadoop, were proposed for parallel batch jobs and data-processing jobs, respectively. Both schedulers used historical data and weather forecasts to predict the amount of solar energy that would be available in the future, with the intent of maximizing the use of green energy. Because of the inherent natural variability in the availability of solar energy, grid energy was used to avoid deadline violations. The results obtained using a real-world trace demonstrated that GreenSlot could increase green energy consumption by up to 117% compared with a conventional backfilling scheduler, whereas GreenHadoop could increase green energy consumption by up to 31% compared with the Hadoop algorithm. However, the inefficient and redundant load-matching activities of these algorithms can incur performance losses. iSwith [140] explored the design trade-offs between energy utilization and load tuning (e.g., DVFS and CPU power states) for a data center partially powered by intermittent renewable energy. iSwith combined optimization of the supply-side fluctuation with minimization of the load-fluctuation-induced overhead to mitigate performance loss. This system could reduce job waiting time by 80% and also mitigate peak network traffic by 95% and average network traffic by 75% while still maintaining 96% renewable energy utilization. To avoid transmitting renewable energy over long distances, which leads to significant attenuation losses [136], several proposed solutions have suggest dispatching traffic to multiple data centers in different geographical locations to use the renewable energy available nearby [141], [142], [4], [143]. In [141], the authors noted that geographical traffic routing could significantly reduce the use of brown energy if the price of energy was dynamically determined in proportion to the instantaneous fraction of the total energy that was brown. Moreover, the degree of use of renewable energy was dependent on the form of the pricing model and the acceptability of this dynamic energy pricing. In [142], the authors exploited multiple uncorrelated wind energy sources to significantly reduce the effects of intermittency and to achieve almost entirely green Internet-scale data centers (IDCs). They proposed WPA, a policy that routed jobs based on the current states of the workloads and wind power availabilities at different data centers. The authors showed that more than 95% of the energy consumption in IDCs could be satisfied by wind power without delaying the processing of jobs. Similarly, Gao et al. [4] dynamically controlled the fraction of user traffic directed to each geographically distributed data center with the objective of navigating the three-way trade-off among carbon footprint, access latency and electricity cost. The authors showed that carbon emissions could be reduced by 10% without increasing either the mean latency or the electricity cost. However, at present, renewable energy is more expensive to use than is brown energy produced with fossil-based fuel. Zhang et al. [143] considered the problem of maximizing the percentage of renewable energy used to reduce the negative environmental implications given certain operation budgets. They proposed a novel middleware system that dynamically distributed requests among different data centers. The authors formulated their objective as a constrained optimization problem and solved it via linear-fractional programming. The authors experimentally demonstrated that their system could significantly increase the use of renewable energy without violating the desired operational cost budget, despite the intermittent nature of the supplies of renewable energy at different locations and the time variation in electricity prices and workload traces. E. Future Research Directions To reduce the energy consumption of data centers through efficient utilization of resources, many proposals have been put forward for the green implementation data centers. Because of their exponential growth and underutilization, data centers still pose several challenges, and several inadequately addressed research directions remain with regard to resource management: • A major reason why the resource utilization of data centers remains low is that operators are concerned about potential QoS violations. Recently, several studies have suggested the existence of interference between collocated applications [144], [145] when servers are virtualized and shared to improve utilization. The challenge of virtual machine management and data center right-sizing is to improve resource utilization while preserving QoS guarantees, which benefits both data center operators and users. • In a multi-tenant data center environment, different tenants may desire different levels of application performance. This characteristic requires heterogeneous resource management mechanisms, which will introduce additional complexity and overhead. Moreover, tenants possess their own resources, which may not be controlled by the data center operators in a centralized manner. Thus far, few studies have focused on energy-aware resource management in multi-tenant data centers, and the task of providing efficient polices for such scenarios requires future exploration. • Although traffic consolidation technologies offer considerable energy savings, they can also have severe effects on network performance. The virtualization of network functions is a promising approach to providing efficient support for the deployment and management of network services. However, current implementations such as CloudNaaS [146] do not account for energy consumption. Finding a good balance between energy consumption and network performance remains a challenging problem for current data center networks. • Most existing studies concerning power distribution are focused on intra-data-center networking. However, geo- 13 • graphically distributed data centers can also offer opportunities for power distribution. For example, a workload can be preferentially scheduled to data centers with high power capping or a greater amount of stored energy by virtue of being located nearer to power stations. The question of how to reduce energy consumption by combining power distribution, application performance and workload scheduling remains an open research problem. A demand-response mechanism is an energy-efficient method of overcoming the instability that is characteristic of renewable energy [141]. In SaaS data centers, such a mechanism also causes service providers to lose users in response to supply conditions. A promising solution is to design beneficial pricing schemes to incentivize service providers to reduce brown energy consumption. IV. T EMPERATURE AND T HERMAL C ONTROL A large portion of the energy used in computing devices is converted into heat. In chip design, the heat problem is extremely important, as it can threaten to cause the chips to fracture at extreme temperatures [147]. An ambient temperature range of 68◦ F to 75◦ F is optimal for device reliability [148]. Data centers house tens of thousands of servers and communication networks, which causes their cooling costs for heat removal to increase exponentially with increasing energy consumption. It is reported that more than a third and sometimes as much as one half of the total cost of a data center consists of cooling costs [149]. As mentioned earlier, virtualizing and consolidating servers can increase processor utilization rates. To reduce management expenses and floor-space requirements, operators prefer to install many multi-core-processor server blades in a single rack-mounted enclosure. These trends toward concentration and higher-density computing in combination with the abovementioned issues mean that the problem of temperature and thermal control must play a critical role in the attempt to establish green data centers. A. Cooling and Workload Distribution Optimization of the delivery of cooling is one strategy for temperature control [150]. Patel et al. [150] proposed a system to fully control a data center environment by linking all its attributes together, including distributed sensing, variable air conditioning and data aggregation. In addition, they exploited variable opening plenum tiles to assist in achieving more flexible control of the cooling distribution and in directing cooling resources where and when needed. The authors reported an energy savings of 50%. In [151], the authors proposed TE-Shave, a generalized framework that exploited thermal energy storage (TES) tanks to reduce data center power. TE-Shave switched to the TES for stored cold water or ice to supplement the chillers and for heat exchange during peak power periods. Moreover, TE-Shave charged the TES through the preparation of cold water or ice by increasing the cooling power when the data center experienced power valleys. The authors demonstrated that their proposed framework could lead to a 28% savings in operational expenses compared with existing work that focused only on reducing the server-side power demand. Another approach to addressing temperature modulation is based on workload assignment and migration between servers to achieve thermal balance [152], [153], [154]. In [153], the authors presented temperature-aware workload assignment algorithms to minimize the energy expended by the cooling infrastructure. Their algorithms produced the recommended theoretical heat distribution to maximize cooling efficiency and minimize the amount of heat recirculating within a data center. The proposed algorithms achieved cooling savings of more than 25%. Heath et al. [154] developed Freon, a user-space system to achieve thermal management without introducing unnecessary performance degradation. The main policy driving the operation of Freon was periodic temperature monitoring and the exertion of feedback control over the utilization of the servers by distributing requests based on load weights. Generally speaking, Freon dynamically shifted load away from hot servers and increased the load on other, “cool” servers. An extended version named Freon-EC was proposed to combine energy conservation and thermal management. Freon-EC turned off servers based on their temperatures and physical locations in the computer room. In fact, Freon-EC turned hot servers off and replaced them with servers from different regions that were unaffected by the thermal threat. Through experiments, Freon was proven to manage temperature with as little potential throughput degradation as possible. In [155], the authors considered the problem of temperature-aware workload distribution in geo-distributed data centers. They explored two key aspects: 1) utilizing the geographical diversity of temperature to reduce cooling energy consumption and 2) exploiting the elastic nature of batch workloads to dynamically adjust capacity allocation. The problem was formulated as a joint optimization of request routing for interactive workloads and capacity allocation for batch workloads, and it was solved using a distributed m-block Alternating Direction Method of Multipliers (ADMM) algorithm. Extensive simulations using real-world traces revealed that their approach saved 15-20% in cooling energy and 5-20% in overall energy cost. In addition to these job-allocation-centric techniques, T ∗ [156] provided a data-centric approach to reducing cooling energy costs in big data analytics cloud computing. Files were proactively allocated in a thermal- and energy-aware manner based on knowledge of server-profile, data-semantics, and cluster information. T ∗ proposed predictive and non-predictive temperature-aware file allocation algorithms to reduce cooling energy costs and ensure high data-local performance. Evaluations using onemonth-long real-world traces demonstrated a reduction of up to 42% in cooling energy costs and a 9× better average response time compared with techniques that were data-allocationagnostic in nature. B. Temperature-Reliability Trade-off Several other efforts have focused on supplying data centers with relatively warm air to reduce cooling costs, i.e., increasing/controlling the temperature setpoint. Studies show that increasing the temperature setpoint by merely one degree can yield an energy savings of 2-5% [157]. However, raising the temperature of the server’s components can reduce the system reliability. Based on the critical observation that hot spots can be selectively cooled, [158] proposed a cooling-power management mechanism to allow global data center coolers to operate at a higher temperature while achieving the same level of chip reliability. The authors integrated thermal models of various components, such as the silicon in the chip, embedded thermo-electric coolers, and air conditioners, and quantified the expected savings in cooling power for the entire data center. Upon evaluating over 43 applications from the SPECcup 2000 benchmark, they reported a cooling power savings of 12% on 14 average. However, there is a limited understanding of how higher temperatures will affect data center systems. In [159], the authors presented a multi-faceted study of temperature management in data centers. By analyzing a large collection of field data from different production environments, the authors studied the influence of higher temperatures on 1) hardware reliability, such as storage subsystem reliability, memory subsystem reliability, and server reliability as a whole, as well as 2) server performance and power consumption. They concluded that the operators could run their data centers hotter than they currently were to save energy while still limiting the resultant negative effects on system reliability and performance. C. Open Questions and Research Directions The continued growth of data centers is resulting in sharply increasing levels of energy consumption required for both powering these data centers and their thermal management. Several methodologies have recently been introduced that offer promising approaches to reducing the escalating energy costs associated with meeting their cooling requirements. However, there are still several challenges and research issues that must be addressed regarding the temperature and thermal control of data centers: • Most existing studies have focused on heat dissipation and cooling load management within data centers. Chillers are used to cool the hot water that returns from the Computer Room Air Conditioners (CRACs) via mechanical refrigeration cycles, and the compressors for these chillers consume large amounts of energy [160]. Recently, various so-called free cooling technologies, such as air-side economizing and water-side economizing, have been adopted to reduce the dependence on mechanical chillers. Air-side economizing refers to directing cold outside air into the data center to cool the servers and ejecting the hot exhaust air back outside instead of cooling and recirculating it. Water-side economizing refers to cooling down the warmer chilled water from the computer room using water streams. However, these free cooling technologies heavily depend on air conditions and geographical locations. An interesting question is whether and how these technologies can be coupled to address power and cooling demands. A related study has already been performed [155], but more thorough theoretical and practical studies are needed to explore this possibility. • As mentioned earlier, service providers may own geographically distributed data centers to better meet their QoS needs, such as delay guarantees. Many of these providers, such as Google [161], have been relying upon fresh air for cooling to reduce the energy costs of operating their data centers. When renewable energy is considered, the problem becomes more interesting and sophisticated. For example, for systems that rely on airside economization, it is typically preferable to operate in a cold-temperature environment. However, the generation of renewable energy using solar panels requires hot, sunny days, which will adversely affect the cooling energy consumption. Addressing this issue will require holistic methods that simultaneously consider cooling energy costs, the availability of renewable energy, and performance requirements. • In the current thermal control approaches implemented in most data centers, the CRAC fans are operating at their peak speed. Lowering CRAC fan speeds allows energy consumption to be reduced. However, the challenge is to develop CRAC fan speed controllers that can supply a data center with only the necessary cooling demands. The existing work of [162] represents an initial effort to address the problem of fan speed management. V. G REEN M ETRICS , M ONITORING AND E XPERIMENTAL T ECHNIQUES In this section, we present the metrics relevant to building a “green” data center and practical efforts to monitor and test data centers for the optimization of energy consumption and carbon emissions. The primary goals of developing green metrics are to 1) quantitatively describe the degree of greenness of a data center, 2) track and report the energy usage and carbon emissions of a data center to increase its green efficiency, and 3) provide a clear visualization of the efficiency of a data center to help its operators to reduce their electricity bills and carbon taxes. In the meantime, monitoring efforts provide data center operators with a real-time, detailed understanding of operation parameters, including green metrics. As a result, operators can adopt appropriate green measures based on the output parameters, for example, the consolidation of virtual machines when the monitoring data indicate that the data center is experiencing low utilization. Moreover, experimentation and simulation techniques are also critical for designing test tools and demonstrating energy-efficient policies. A. Green Data Center Metrics Various metrics focused on data center energy efficiency have arisen over the past years. We summarize the most popular green metrics below: 1) Power Usage Effectiveness (PUE): PUE = Total Facility Power IT Equipment Power The IT equipment power is the power consumed by the servers, network, storage, and supplemental equipment (i.e., workstations/laptops used for monitoring); the total facility power includes the aforementioned power plus auxiliary consumption in the data center [163]. 2) Data Center infrastructure Efficiency (DCiE): DCiE = IT Equipment Power 1 = PUE Total Facility Power This metric is simply the inverse of the PUE [163], and both were developed by The Green Grid to measure energy efficiency in data centers. Barroso et al. [9] suggested that the average value of the PUE is 1.83, i.e., the DCiE is 0.54. 3) Data Center energy Productivity (DCeP): DCeP = Use f ul Work Produced Total Energy Consumed to Per f orm that Work This is a metric to characterize the computing efficiency of a data center [164]. Useful work refers to the jobs performed by the IT equipment during the time period. The denominator is the total energy consumed during the assessment window. 15 Set benchmarking goals Share results Prioritize metrics Create follow-up action plan Identify required data and develop data collection plan Benchmark metrics and identify potential actions Obtain and install monitoring equipment Analyze data and compute metrics Collect data Fig. 2: The benchmarking process for data center metrics [165] 4) Heating, Ventilation, and Air Conditioning (HVAC): HVAC = IT Electrical Energy HVAC + ( Fuel + Steam + Chilled)×293 The HVAC system energy is the sum of the electrical energy used for cooling, fan movement, and any other HVAC energy usage such as steam or chilled water, and it can be reduced via free cooling with air economizers and/or high-efficiency chillers [165]. When the value of this metric is high, it suggests a high potential to reduce HVAC energy usage. 5) Carbon Usage Effectiveness (CUE): CUE = Total CO2 Emissions IT Equipment Energy The total carbon emissions include direct greenhouse gas emissions and indirect greenhouse gas emissions from the consumption of purchased electricity, heat, and steam. The denominator is the energy consumption of the IT equipment [166]. In addition to these metrics, many other metrics have been proposed by The Green Grid and Lawrence Berkeley National Laboratory that have different practical uses, such as the CEF (Carbon Emission Factor), AEU (Air Economizer Utilization), WEU (Water Economizer Utilization) and CSE (Cooling System Efficiency) [165], [166]. Table VII presents the taxonomy of the green metrics listed above. Note that the present values shown in the table were obtained from [165], [166] if no other reference is indicated. Now, we focus on works that have studied how to measure these metrics. A technical report [165] provided an approach for obtaining the particular values of the metrics. The specific implementation process for benchmarking a data center is illustrated in Fig. 2. The authors of this report also provided guidance for calculating the required data. For example, electrical energy use can be derived from meter data or utility bills. In [169], the authors’ intent was to present the “what” and “how” for the measurement of metrics of energy efficiency. They attempted to introduce a cheap and effective continuous measurement method based on the power demand profiles recorded at various points in a facility. Their power measuring point system is illustrated in Fig. 3. When the required data have been obtained from the various registries, the metrics can be calculated based on the power consumed integrated over 15minute or 1-hour periods. By using standard measuring equipment, the reliability and accuracy of the results can be guaranteed. Another work [170] adopted machine learning techniques to study the PUE. The authors developed a neural network framework that learned from actual operations data to predict the PUE. They reported that the PUE was within 0.004+/-0.005, with an error of approximately 0.4% for a PUE of 1.1. DCeP, the metric of energy productivity, was studied in [171]. The authors presented an approach to calculating the DCeP by designing an experiment using a highly instrumented, high-performance computing data center. Their evaluation results demonstrated that the DCeP could be used to successfully distinguish among different operational states in the data center and validated its utility as a metric for identifying the configurations of hardware and software that could improve energy productivity. Unfortunately, the improvement of one specific green metric may lead to the worsening of another metric. Therefore, holistic frameworks for addressing all metrics have also been proposed in recent works [172], [173]. These approaches offer a combined visualization of all metrics to guide data center operators in worst-metric improvement. Main Power Input Cooling Cooling System UPS UPS System Lighting Lighting Others Others IT Equipment Load Servers Network Storage Supplemental Equipment Fig. 3: Power measuring point registries B. Green Monitoring and Experimental Technique Monitoring is an effective method of detecting and proactively mitigating the failure of data centers. Moreover, we will explore efforts that yield the tracks and traces of energy usage, thermal emission, and power distribution for individual devices. Based on the collected information, intelligent mechanisms can then react to increase the energy efficiency and productivity of a data center. In [174], the authors presented a comprehensive online monitoring service in their GreenCloud architecture. The monitoring service monitored and collected data concerning resource utilization, application workloads directed through virtual machine hypervisors, and power usage using an intelligent power distribution unit. Analyzing and mining this collected information provided a clear understanding of the data center energy usage and temperature behavior. Furthermore, the monitoring service helped to consolidate the 16 TABLE VII: Green metrics taxonomy Metric Definition Total Facility Power I T Equipment Power PUE = 1 PUE DCiE = = I T Equipment Power Total Facility Power DCeP = Use f ul Work Produced Total Energy Consumed to Per f orm that Work HVAC = CEF = I T Electrical Energy HVAC +( Fuel + Steam+ Chilled)×293 Total CO2 Emissions Total Facility Energy CUE = CEF× PUE = CSE = Total CO2 Emissions I T Equipment Energy Average Cooling System Power Usage Average Cooling Load Objective Proposer Ideal Present Value Characterize the total energy efficiency of a data center Green Grid, 2008 →1 1.83 Characterize the total energy efficiency of a data center Green Grid, 2008 →1 0.54 Characterize the IT computing efficiency Green Grid, 2008 Larger 866658( NormalizedTasks ) KWhr Characterize the energy efficiency of the HVAC system Lawrence Berkeley National Laboratory, 2009 Higher -- Assess the carbon emissions per unit of energy used Green Grid, 2010 Lower 0.147 (Washington) [167] Characterize the overall efficiency of the cooling system Green Grid, 2010 Lower 0.27 (Washington) Represent the carbon emission efficiency of IT energy use Lawrence Berkeley National Laboratory, 2009 Lower 0.6-0.8( KW Ton ) AEU = Air Economizer Hours 24 ×365 Measure the percentage of hours in a year that an air-side economizer system is used to provide “free cooling” Lawrence Berkeley National Laboratory, 2009 →100% 76% (New York) W EU = Water Economizer Hours 24 ×365 Measure the percentage of hours in a year that a water-side economizer system is used to provide “free cooling” Lawrence Berkeley National Laboratory, 2009 →100% 33% = virtual machine workload and achieve significant energy savings while guaranteeing the real-time performance required for sensitive applications. Using a different approach, the authors of [175] developed PowerTracer, a request-tracing strategy for diagnosing energy inefficiencies in multi-tier service systems. They first profiled the patterns of requests through kernel instrumentation and then measured the server-side latency and service time of each tier. Finally, PowerTracer collected the resource consumption information for individual requests and analyzed the features of each tier and each pattern. By thus gaining insights into the root causes of energy inefficiency, the authors could devise efficient power-saving methods for multitier applications. Even in the initial phases of the design and development of a data center, an effective experimental and simulation platform enables the operator to identify and understand the design aspects that are critical to energy and resource efficiency. EEFSim, a virtualized data center simulator for cloud computing research, was designed and developed in [176]. The simulator was demonstrated to be suitable for testing, as it reproduced the behavior of a real cloud framework and the execution information that it offered. Another advantage of this simulator was that it could be easily used to evaluate the power performance of a system by testing different solutions and approaches within merely a few minutes. As a result, the simulator offered the possibility to validate different scheduling and migration policies for their power consumption associated with virtual machines in a cloud data center. Eliazovich et al. [177] presented GreenCloud, a packet-level simulator for energy-aware studies of cloud computing data centers. This simulator could be used to capture the details of the energy consumption of various data center components (e.g., servers, switches, and links) as well as packet-level communication patterns. Its effectiveness in utilizing power management schemes was demonstrated for two-tier, three-tier, and three-tier high-speed data center architectures. A more powerful tool for analyzing green data center design and resource management, named GDCSim, was proposed in [178]. This simulation tool was used for the 2900 24 ×365 [168] iterative design of green data centers. Specifically, it captured the interdependencies between online resource management schemes and the physical behavior of data centers. The objective of the simulator was to generate data center configurations for particular purposes, such as CPU sleep-state transitions and DVFS for power management, as well as thermal behavior characterization. In [179], the authors proposed a simulator, named SimWare, to analyze the power consumption of servers, cooling units, and fans as well as the effects of heat recirculation and air supply timing. SimWare considered the time required for air to travel from the CRACs to the servers and could evaluate user-defined job scheduling and virtual machine management algorithms. Data center designers could use this simulator to evaluate energy-conserving policies and to assess mechanical design options such as server placement, airflow management and CRAC control strategies. C. Challenges and Design Guidelines Currently, the PUE is a widely accepted and measured metric in data centers, whereas the use of other green metrics is much less widespread. There is no doubt that green efficiency metrics will continue to be developed and drive improvements in sustainability and environmental friendliness. However, an effective metric to characterize the energy and resource usage efficiency of a data center must satisfy the following design guidelines: • able to track the important and actionable parameters to assist operators in making data centers more green; • consistent, easy and cost effective to implement and report for management purposes; • feasible, simple and inexpensive to monitor. Thus, developing metrics that are well suited for reducing energy consumption is a challenging task with a significant contribution to the construction of “green” data centers. Moreover, the monitoring of green metrics in data centers assists in diagnosing energy inefficiencies and in the implementation of proactive mechanisms to improve energy efficiency. 17 However, this issue has received little attention thus far, and existing monitors have been proposed for either particular architectures [174] or special applications [175]. The challenges are the large number of hosted servers or virtual machines and the availability of communication resources in data centers. Consequently, centralized monitoring techniques suffer from low scalability and elasticity. Monitoring techniques adopted from cooperative monitoring [180] can be applied to overcome these drawbacks by enabling distributed and robust monitoring solutions for large-scale, complex data centers. The key research question of interest is how to minimize the costs incurred while guaranteeing monitoring accuracy. Finally, although platforms such as GreenCloud [177] and GDCSim [178] have provided data center energy-aware simulation environments, the primary disadvantage of these platforms is that most of them are coarse grained and focused only on certain components or functions. For example, when a simulation of virtual machine migration considers only CPU resources, the results for virtual machine allocation may suffer from a failure to consider the bandwidth requirements. Therefore, the task of designing a system-wide experimental and simulation platform that integrates all components of a data center, such as the CPU, memory, cache, I/O, disk and communication network, requires further exploration. [11] D. Abts, M. Marty, P. Wells, P. Klausler and H. Liu. Energy proportional datacenter networks. In Proceedings of ISCA’10, pages 338-347, 2010. [12] T. Benson, A. Akella and D. Maltz. Network traffic characteristics of data centers in the wild. In Proceedings of IMC’10, pages 267280, 2010. [13] S. Rivoire, M. A. Shah, P. Ranganathan, C. Kozyrakis and J. Meza. Models and metrics to enable energy-efficiency optimizations. In Computer, 40(12), pages 39-48, 2007. [14] Natural Resources Defense Council. Data center efficiency assessment. Issue paper, 2014. [15] A. Beloglazov, J. Abawajy and R. Buyya. Energy-aware resource allocation heuristics for efficient management of data centers for cloud computing. In Future Generation Computer Systems, 28(5), pages 755-768, 2012. [16] K. Bilal, S.U.R. Malik, O. Khalid, A. Hameed, E. Alvarez, V. Wijaysekara, R. Irfan, S. Shrestha, D. Dwivedy, M. Ali, U.S. Khan, A. Abbas, N. Jalil and S.U. Khan. A taxonomy and survey on green data center networks. In Future Generation Computer Systems, 36, pages 189-208, 2014. [17] F. Yao, A. Demers, and S. Shenker. A scheduling model for reduced CPU energy. In Proceedings of FOCS’95, pages 374–382, 1995. [18] T. Mudge. Power: A first-class architecture design constraint. Computer, 34(4), pages 52–58, 2001. [19] S. Albers. Energy-efficient algorithms. In Communications of the ACM, 53(5), pages 86-96, 2010. [20] M. Li, A. C. Yao and F. F. Yao. Discrete and continuous minenergy schedules for variable voltage processors. In Proceedings of the National Academy of Sciences of USA, 103(11), pages 39833987, 2006. VI. C ONCLUSION [21] S. Albers and H. Fujiwara. Energy-efficient algorithms for flow time minimization. In ACM Transactions on Algorithms, 3(4):49, The development of green data centers has garnered consid2007. erable attention because of their financial and environmental [22] D. P. Bunde. Power-aware scheduling for makespan and flow. In impact. Extensive research is being conducted in an attempt Scheduling, 12(5), pages 489-500, 2009. [23] K. Pruhs, R. V. Stee and P. Uthaisombut. Speed scaling of tasks to reduce energy consumption and carbon emissions. In this with precedence constraints. In Theory of Computing Systems, article, we present a comprehensive review of the current state43(1), pages 67-80, 2008. of-the-art research in the area of green data center management. [24] X. Jin, F. Zhang, Y. Song, L. Fan and Z. Liu. Energy-efficient This survey offers significant insights into various aspects of scheduling with time and processors eligibility restrictions. In the problem, including energy efficiency, resource management, Proceedings of EuroPar’13, pages 66-77, 2013. [25] N. Bansal, T. Kimbrel and K. Pruhs. Speed scaling to manage thermal control and green metrics. We summarize and compare energy and temperature. In Journal of the ACM, 54(1):3, 2007. the existing schemes and highlight the challenges and potential [26] S. Albers, F. Müller, and S. Schmelzer. Speed scaling on parallel directions for future research with regard to each of these processors. In Proceedings of SPAA’07, pages 289–298, 2007. aspects. [27] G. Greiner, T. Nonner, and A. Souza. The bell is ringing in speedscaled multiprocessor scheduling. In Proceedings of SPAA’09, pages 11–18, 2009. R EFERENCES [28] C. Gunaratne, K. Christensen, B. Nordman and S. Suen. Reducing the energy consumption of ethernet with adaptive link rate [1] R. L. Villars. Worldwide datacenter census and construction 2014(ALR). In IEEE Transactions on Computers, 57(4), pages 448-461, 2018 forecast: aging enterprise datacenters and the accelerating 2008. service provider buildout. 2014. [2] http://www.nrdc.org/energy/data-center-efficiency-assessment.asp. [29] M. Andrews, A. F. Anta, L. Zhang and W. Zhao. Routing for power minimization in the speed scaling model. In IEEE/ACM [3] A. Venkatraman. Global census shows datacentre power demand Transactions on Networking, 20(1), pages 285-294, 2012. grew 63% in 2012. [30] A. Antoniadis and C. C. Huang. Non-preemptive speed scaling. http://www.computerweekly.com/news/2240164589/Datacentre-power-demand-grew-63-in-2012-Global-datacentre-census. In Scheduling, 16(4), pages 385-394, 2013. 2012. [31] E. Bampis, A. Kononov, D. Letsios, G. Lucarelli and I. Nemparis. [4] P.X. Gao, A.R. Curtis, B. Wong and S. Keshav. It’s not easy being From preemptive to non-preemptive speed-scaling scheduling. In green. In Proceedings of SIGCOMM’12, pages 211-222, 2012. Journal of Discrete Applied Mathematics, 181, pages 11-20, 2015. [5] A. Greenberg, J. Hamilton, D. A. Maltz and P. Patel. The cost [32] M. Li and F. F. Yao. An efficient algorithm for computing optimal of a cloud: research problems in data center networks. In ACM discrete voltage schedules. In SIAM Journal on Computing, 35(3), SIGCOMM Computer Communication Review, 39(1), pages 68-73, pages 658-671, 2005. 2009. [33] X. Jin, F. Zhang and Z. Liu. Discrete Min-Energy Scheduling on [6] P. Patel-Predd. Energy-efficient ethernet. In IEEE Spectrum, pages Restricted Parallel Processors. In Proceedings of IPDPS’13, pages 13, 2008. 2226-2229, 2013. [7] J. M. Kaplan, W. Forrest and N. Kindler. Revolutionizing data [34] N. Bansal, H. Chan, T. Lam and L. Lee. Scheduling for speed center energy efficiency. Technical report, McKinsey&Company, bounded processors. In Proceedings of ICALP’08, pages 409-420, 2008. 2008. [8] G. James. Power, pollution, and the internet. New York Times, [35] E. Bampis, A. Kononov, D. Letsios, G. Lucarelli and M. Sviri2012. denko. Energy efficient scheduling and routing via randomized [9] L. A. Barroso, J. Clidaras and U. Holzle. The data center as rounding. In Proceedings of FSTTCS’13, pages 449-460, 2013. a computer: an introduction to the design of warehouse-scale [36] N. Bansal, H.-L. Chan, K. Pruhs and D. Katz. Improved Bounds machines. Morgan&Claypool publish, 2013. for speed scaling in devices obeying the cube-root rule. In [10] A. Carrega, S. Singh, R. Bruschi and R. Bolla. Traffic merging for Proceedings of ICALP’09, pages 144-155, 2009. energy-efficient datacenter networks. In Proceedings of SPECTS’12, [37] W. Wu, M. Li and E. Chen. Min-energy scheduling for aligned pages 1-5, 2012. 18 [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] jobs in accelerate model. In Theoretical Computer Science, 412(1214), pages 1122-1139, 2011. C.-C. Huang and S. Ott. New results for non-preemptive speed scaling. In Proceedings of MFCS’14, pages 360-371, 2014. V. Cohen-Addad, Z. Li, C. Mathieu and I. Milis. Energy-efficient algorithms for non-preemptive speed-scaling. In WAOA’14, 2014. J.-J. Chen, H.-R. Hsu, K.-H. Chuang, C.-L. Yang, A.-C. Pang and T.-W. Kuo. Multiprocessor energy-efficient scheduling with task migration considerations. In Proceedings of ECRTS’04, pages 101108, 2004. S. Albers, A. Antoniadis and G. Greiner. On multi-processor speed scaling with migration: extended abstract. In Proceedings of SPAA’11, pages 279-288, 2011. E. Angel, E. Bampis, F. Kacem and D. Letsios. Speed scaling on parallel processors with migration. In Proceedings of EuroPar’12, pages 128-140, 2012. M. Li. Approximation algorithms for variable voltage processors: min energy, max throughput and online heuristics. In Theoretical Computer Science, 412(32), pages 4074-4080, 2011. K. Pruhs, P. Uthaisombut and G. Woeginger. Getting the best response for your erg. In Proceedings of SWAT’04, pages 14-25, 2004. N. Bansal, K. Pruhs and C. Stein. Speed scaling for weighted flow time. In Proceedings of SODA’07, pages 805-813, 2007. T.-W. Lam, L.-K. Lee, I.K. To and P.W. Wong. Speed scaling functions for flow time scheduling based on active job count. In Proceedings of ESA’08, pages 647-659, 2008. N. Bansal, H.-L. Chan and K. Pruhs. Speed scaling with an arbitrary power function. In Proceedings of SODA’09, pages 693701, 2009. L.L.H. Andrew, A. Wierman and A. Tang. Optimal speed scaling under arbitrary power functions. In ACM SIGMETRICS Performance Evaluation Review, 37(2), pages 39-41, 2009. E. Angel, E. Bampis and V. Chau. Throughput maximization in the speed-scaling setting. In Proceedings of STACS’14, pages 53-62, 2014. H.-L. Chan, W.-T. Chan, T.-W. Lam, L.-K. Lee, K.-S. Mak and P.W.H. Wong. Energy efficient online deadline scheduling. In Proceedings of SODA’07, pages 795-804, 2007. T.-W. Lam, L.-K. Lee, I.K.K. To and P.W.H. Wong. Energy efficient deadline scheduling in two processor systems. In Proceedings of ISAAC’07, pages 476-487, 2007. T.-W. Lam, L.-K. Lee, I.K.K. To and P.W.H. Wong. Improved multi-processor scheduling for flow time and energy. In Scheduling, 15(1), pages 105-116, 2012. E. Angle, E. Bampis, V. Chau and N.K. Thang. Throughput maximization in multiprocessor speed-scaling. In Proceedings of ISAAC’14, pages 247-258, 2014. A. Gupta, R. Krishnaswamy and K. Pruhs. Scalably scheduling power-heterogeneous processors. In Proceedings of ICALP’10, pages 312-323, 2010. R.L. Graham, E.L. Lawler, J.K. Lenstra and A.H.G. Rinnooy Kan. Optimization and approximation in deterministic sequencing and scheduling: a survey. In Annals of Discrete Mathematics, vol.5, pages 287-326, 1979. A. Gandhi, M. Harchol-Balter, R. Das and C. Lefurgy. Optimal power allocation in server farms. In Proceedings of SIGMETRICS’09, pages 157-168, 2009. A. Wierman, L. L. Andrew and A. Tang. Power-aware speed scaling in processor sharing systems. In Proceedings of INFOCOM’09, pages 2007-2015, 2009. F. Liu, Z. Zhou, H. Jin, B. Li, B. Li and H. Jiang. On Arbitrating the Power-Performance Tradeoff in SaaS Clouds. In IEEE Transactions on Parallel and Distributed Systems, 25(10), pages 2648-2658, 2014. K. Bilal, S. U. Khan, S. A. Madani, K. Hayat, M. I. Khan, N. MinAllah, J. Kologziej, L. Wang, S. Zeadally and D. Chen. A survey on green communications using adaptive link rate. In Journal of Cluster Computing, 16(3), pages 575-589, 2013. D. Abts, M. R. Marty, P. M. Wells, P. Klausler and H. Liu. Energy proportional datacenter networks. In Proceedings of ISCA’10, pages 338-347, 2010. L. Wang, F. Zhang, C. Hou, J. A. Aroca and Z. Liu. Incorporating rate adaptation into green networking for future data centers. In Proceedings of NCA’13, pages 106-109, 2013. S. Irani and A.R. Karlin. On online computation. In Approximation Algorithms for NP-Hard Problems, chapter 13, pages 521-564, 1997. A.R. Karlin, M.S. Manasse, L.A. McGeoch and S. Owicki. Com- [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] petitive randomized algorithms for nonuniform problems. In Algorithmica, 11(6), pages 542-571, 1994. S. Irani, S. Shukla and R. Gupta. Online strategies for dynamic power management in systems with multiple power-saving states. In ACM Transaction on Embedded Computing Systems, 2(3), pages 325-346, 2003. J. Augustine, S. Irani and C. Swamy. Optimal power-down strategies. In SIAM Journal on Computing, 37(5), pages 1499-1516, 2008. P. Baptiste. Scheduling unit tasks to minimize the number of idle periods: a polynomial time algorithm for offline dynamic power management. In SODA’06, pages 364-367, 2006. P. Baptiste, M. Chrobak and C. Dürr. Polynomial time algorithms for minimum energy scheduling. In Proceedings of ESA’07, pages 136-150, 2007. Gururaj et al.. See survey of Marek Chrobak. http://www.cs.pitt.edu/ kirk/cs3150spring2010 /10071.ChrobakMarek.Slides.pdf, 2010. E. Angel, E. Bampis and Vincent Chau. Low complexity scheduling algorithms minimizing the energy for tasks with agreeable deadlines. In Discrete Applied Mathematics, 175, pages 1-10, 2014. E.D. Demaine, M. Ghodsi, M.T. Hajiaghayi, A.S. Sayedi-Roshkhar and M. Zadimoghaddam. Scheduling to minimize gaps and power consumption. In Scheduling, 16(2), pages 151-160, 2013. J.-J. Chen, M.-J. Kao, D.T. Lee, I. Rutter and D. Wagner. Online dynamic power management with hard real-time guarantees. In STACS’14, pages 226-238, 2014. J. S. Chase, D. C. Anderson, P. N. Thakar, A. M. Vahdat and R. P. Doyle. Managing energy and server resources in hosting centers. In Proceedings of SOSP’01, pages 103-116, 2001. M. Lin, A. Wierman, L. Andrew and E. Thereska. Dynamic right-sizing for power-proportional data centers. In Proceedings of INFOCOM’11, pages 1098-1106, 2011. Y. Azar, N. Ben-Aroya, N. R. Devanur and N. Jain. Cloud scheduling with setup cost. In Proceedings of SPAA’13, pages 298304, 2013. J. Chabarek, J. Sommers, P. Barford, C. Estan, D. Tsiang and S. Wright. Power awareness in network design and routing. In Proceedings of INFOCOM’08, pages 1130-1138, 2008. R. Bolla, R. Bruschi, A. Cianfrani and M. Listanti. Enabling backbone networks to sleep. In IEEE Network, 25(2), pages 2631, 2011. M. Andrews, A. F. Anta, L. Zhang and W. Zhao. Routing and scheduling for energy and delay minimization in the powerdown model. In Proceedings of INFOCOM’10, pages 21-25, 2010. M. Zhang, C. Yi, B. Liu and B. Zhang. GreenTE: power-aware traffic engineering. In Proceeding of ICNP’10, pages 21-30, 2010. B. Heller, S. Seetharaman, P. Mahadevan, Y. Yiakoumis, P. Sharma, S. Banerjee and N. McKeown. ElasticTree: saving energy in data center networks. In Proceedings of NSDI’10, pages 249-264, 2010. J. Shuja, S. A. Madani, K. Bilal, K. Hayat, S. U. Khan and S. Sarwar. Energy-efficient data centers. In Computing, 94(12), pages 973-994, 2012. M. Gupta and S. Singh. Greening of the internet. In Proceedings of SIGCOMM’03, pages 19-26, 2003. S. Irani, S. Shukla and R. Gupta. Algorithms for power savings. In ACM Transactions on Algorithms, 2(4):41, 2007. X. Han, T.-W. Lam, L.-K. Lee, I.K.K. To and P.W.H. Wong. Deadline scheduling and power management for speed bounded processors. In Theoretical Computer Science, 411(40-42), pages 35873600, 2010. G. Kumar and S. Shannigrahi. New online algorithm for dynamic speed scaling with sleep state. In arXiv:1303.0377, 2013. S. Albers and A. Antoniadis. Race to idle: new algorithms for speed scaling with a sleep state. In ACM Transactions on Algorithms 10(2):9, 2014. A. Antoniadis, C.-C. Huang and S. Ott. A fully polynomialtime approximation scheme for speed scaling with sleep state. In arXiv:1407.0892, 2014. T.W. Lam, L.-K. Lee, H.-F. Ting, I.K.-K. To and P.W.H Wong. Sleep with guilt and work faster to minimize flow plus energy. In Proceedings of ICALP’09, pages 665-676, 2009. Y. Chen, A. Das, W. Qin, A. Sivasubramaniam, Q. Wang and N. Gautam. Managing server energy and operation costs in hosting centers. In Proceedings of SIGMETRICS’05, pages 303-314, 2005. Y. Yao, L. Huang, A.B. Sharma, L. Golubchik and M.J. Neely. Data 19 [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] centers power reduction: a two time scale approach for delay tolerant workloads. In Proceedings of INFOCOM’12, pages 14311439, 2012. Y. Liu, S.C. Draper and N.S. Kim. SleepScale: runtime joint speed scaling and sleep states management for power efficient data centers. In Proceedings of ISCA’14, pages 313-324, 2014. S. Nedevschi, L. Popa, G. Iannaccone, S. Ratnasamy and D. Wetherall. Reducing network energy consumption via sleeping and rate-adaptation. In Proceedings of NSDI’08, pages 323-336, 2008. N. Vasić and D. Kostić. Energy-aware traffic engineering. In Proceedings of e-Energy’10, pages 169-178, 2010. L. Wang, F. Zhang, K. Zheng, A. V. Vasilakos, S. Ren and Z. Liu. Energy-efficient flow scheduling and routing with hard deadlines in data centers networks. In Proceedings of ICDCS’14, pages 248257, 2014. A.K. Coskun, R. Strong, D.M. Tullsen and T. S. Rosing. Evaluating the impact of job scheduling and power management on processor lifetime for chip multiprocessors. In Proceedings of SIGMETRICS’09, pages 169-180, 2009. R. Buyya, C.S. Yeo and S. Venugopal. Market-oriented cloud computing: vision, hype, and reality for delivering IT services as computing utilities. In Proceedings of HPCC’08, pages 5-13, 2008. J. F. Kurose and K. W. Ross. Computer networking: a top-down approach. Addison-Wesley publish, 2013. R. Kumar, D. M. Tullsen and N. P. Jouppi. Core architecture optimization for heterogeneous chip multiprocessors. In Proceedings of PACT’06, pages 23-32, 2006. F. A. Bower, D. J. Sorin and L. P. Cox. The impact of dynamically heterogeneous multicore processors on thread scheduling. In IEEE Micro, 28(3), pages 17-25, 2008. A. Gupta, S. Im, R. Krishnaswamy, B. Moseley and K. Pruhs. Scheduling heterogeneous processors isn’t as easy as you think. In Proceedings of SODA’12, pages 1242-1253, 2012. P. Barham, B. Dragovic, K. Fraser, S. Hand, T. Harris, A. Ho, R. Neugebauer, I. Pratt and A. Warfield. Xen and the art of virtualization. In Proceedings of SOSP’03, pages 164-177, 2003. R. Nathuji, K. Schwan. VirtualPower: coordinated power management in virtualized enterprise systems. In Proceedings of SOSP’07, pages 265-278, 2007. R. Raghavendra, P. Ranganathan, V. Talwar, Z. Wang and X. Zhu. No “power” struggles: coordinated multi-level power management for the data center. In Proceedings of ASPLOS’08, pages 48-59, 2008. F. Hermenier, X. Lorca, J. M. Menaud, G. Muller and J. Lawall. Entropy: a consolidation manager for clusters. In Proceedings of VEE’09, pages 41-50, 2009. N. Bobroff, A. Kochut and K. Beaty. Dynamic placement of virtual machines for managing SLA violations. In Proceedings of IM’07, pages 119-128, 2007. T. Wood, P. Shenoy, A. Venkataramani and M. Yousif. Blackbox and gray-box strategies for virtual machine migration. In Proceedings of NSDI’07, pages 229-242, 2007. H.N. Van, F.D. Tran and J.M. Menaud. SLA-aware virtual resource management for cloud infrastructures. In Proceedings of CIT’09, pages 357-362, 2009. D. Kusic, J. O. kephart, J. E. Hanson, N. Kandasamy and G. Jiang. Power and performance management of virtualized computing environments via lookahead control. Journal of Cluster Computing, 12(1), pages 1-15, 2009. A. Beloglazov and R. Buyya. Optimal online deterministic algorithms and adaptive heuristics for energy and performance efficient dynamic consolidation of virtual machines in cloud data centers. In Journal of Concurrency and Computation: Practice and Experience, 24(3), pages 1397-1420, 2011. M. Wang, X. Meng and L. Zhang. Consolidating virtual machines with dynamic bandwidth demand in data centers. In Proceedings of INFOCOM’11, pages 71-75, 2011. C. C. Lee and D. T. Lee. A simple on-line bin-packing algorithm. In Journal of the ACM, 32(3), pages 562-572, 1985. A.L. Stolyar and Y. Zhong. A large-scale service system with packing constraints: minimizing the number of occupied servers. In ACM SIGMETRICS Performance Evaluation Review, 41(1), pages 41-52, 2013. X. Jin, F, Zhang, S. Hu and Z. Liu. Risk management for virtual machines consolidation in data centers. In Proceedings of Globecom’13, pages 2872-2878, 2013. [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] P. Mahadevan, P. Alto, S. Banerjee, P. Sharma, A. Shah and P. Ranganathan. On energy efficiency for enterprise and data center networks. In IEEE Communications Magazine, 49(8), pages 94-100, 2011. R. McGeer, P. Mahadevan and S. Banerjee. On the complexity of power minimization schemes in data center networks. In Proceedings of Globecom’10, pages 1-5, 2010. N. Vasić, P. Bhurat, D. Novaković, M. Canini, S. Shekhar and D. Kostić. Identifying and using energy-critical paths. In Proceedings of CoNEXT’11, No. 18, 2011. J. Jiang, T. Lan, S. Ha, M. Chen and M. Chiang. Joint VM placement and routing for data center traffic engineering. In Proceedings of INFOCOM’12, pages 2876-2880, 2012. X. Wang, Y. Yao, X. Wang, K. Lu and Q. Cao. CARPO: correlation-aware power optimization in data center networks. In Proceedings of INFOCOM’12, pages 1125-1133, 2012. Y. Zhang and N. Ansari. HERO: hierarchical energy optimization for data center networks. In Proceedings of ICC’12, pages 29242928, 2012. M. Xu, Y. Shang, D. Li and X. Wang. Greening data center networks with throughput-guaranteed power-aware routing. In Computer Networks, 57(15), pages 2880-2899, 2013. L. Wang, F. Zhang, J.A. Aroca, A.V. Vasilakos, K. Zheng, C. Hou, D. Li and Z. Liu. GreenDCN: a general framework for achieving energy efficiency in data center networks. In IEEE Journal on Selected Areas in Communications, 32(1), pages 4-15, 2014. H. Jin, T. Cheocherngngarn, D. Levy, A. Smith, D. Pan, J. Liu and N. Pissinou. Joint host-network optimization for energy-efficient data center networking. In Proceedings of IPDPS’13, pages 623-634, 2013. K. Zheng, X. Wang, L. Li and X. Wang. Joint power optimization of data center network and servers with correlation analysis. In Proceedings of INFOCOM’14, 2014. N. Rasmussen. A scalable, reconfigurable, and efficient data center power distribution architecture. American Power Conversion, White paper #129, 2009. X. Fan, W.-D. Weber and L.A. Barroso. Power provisioning for a warehouse-sized computer. In Proceedings of ISCA’07, pages 1323, 2007. D. Meisner, B.T. Gold and T.F. Wenisch. PowerNap: eliminating server idle power. In Proceedings of ASPLOS’09, pages 205-216, 2009. S. Pelley, D. Meisner, P. Zandevakili, T.F. Wenisch and J. Underwood. Power routing: dynamic power provisioning in the data center. In Proceedings of ASPLOS’10, pages 231-242, 2010. H. Lim, A. Kansal and J. Liu. Power budgeting for virtualized data centers. In Proceedings of USENIX ATC’11, 2011. C. Isci, S. McIntosh, J. Kephart, R. Das, J. Hanson, S. Piper, R. Wolford, T. Brey, R. Kantner, A. Ng, J. Norris, A. Traore and M. Frissora. Agile, efficient virtualization power management with low-latency server power states. In Proceedings of ISCA’13, pages 96-107, 2013. S. Govindan, A. Sivasubramaniam and B. Urgaonkar. Benefits and limitations of trapping into stored energy for datacenters. In Proceedings of ISCA’11, pages 341-352, 2011. V. Kontorinis, L.E. Zhang, B. Aksanli, J. Sampson, H. Homayoun, E. Pettis, D.M. Tullsen and T. S. Rosing. Managing distributed ups energy for effective power capping in data centers. In Proceedings of ISCA’12, pages 488-499, 2012. S. Govindan, D. Wang, A. Sivasubramaniam and B. Urgaonkar. Leveraging stored energy for handling power emergencies in aggressively provisioned datacenters. In Proceedings of ASPLOS’12, pages 75-86, 2012. D. Wang, C. Ren and A. Sivasubramaniam. Virtualizing power distribution in datacenters. In Proceedings of ISCA’13, pages 595606, 2013. B. Stone. Google’s next frontier: renewable energy. In New York Times, 2007. P. Gupta. Google to use wind energy to power data centers. In New York Times, 2010. N. Sharma, S. Barker, D. Irwin and P. Shenoy. Blink: managing server clusters on intermittent power. In Proceedings of ASPLOS’11, pages 185-198, 2011. S. Akoush, R. Sohan, A. Rice, A.W. Moore and A. Hopper. Free lunch: exploiting renewable energy for computing. In Proceedings of HotOS’11, 2011. C. Li, R. Zhou and T. Li. Enabling distributed generation pow- 20 [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [157] [158] [159] [160] [161] ered sustainable high-performance data center. In Proceedings of ming. http://tinyurl.com/89ros64, 2012. HPCA’13, pages 35-46, 2013. [162] V. Sundaralingam, P. Kumar and Y. Joshi. Server heat load based CRAC fan controller paired with rear door heat exchanger. In Í. Goiri, K. Le, M.E. Haque, R. Beauchea, T.D. Nguyen, J. Proceedings of the ASME 2011 Pacific Rim Technical Conference and Guitart, J. Torres and R. Bianchini. GreenSlot: scheduling energy Exhibition on Packaging and Integration of Electronic and Photonic consumption in green datacenters. In Proceedings of SC’11, pages Systems, pages 489-496, 2011. 1-11, 2011. [163] C. Belady, A. Rawson, D. Pfleuger and S. Cader. The green grid Í. Goiri, K. Le, T.D. Nguyen, J. Guitart, J. Torres and R. Biandata center power efficiency metrics: PUE and DCiE. Consortium chini. GreenHadoop: leveraging green energy in data-processing Green Grid, 2008. frameworks. In Proceedings of EuroSys’12, pages 57-70, 2012. [164] D. Anderson et al.. A framework for data center energy producC. Li, A. Qouneh and T. Li. iSwitch: coordinating and optimiztivity. The Green Grid, 2008. ing renewable energy powered server clusters. In Proceedings of [165] P. Mathew, S. Ganguly, S. Greenberg and D. Sartor. SelfISCA’12, pages 512-523, 2012. benchmarking guide for data centers: metrics, benchmarks, acZ. Liu, M. Lin, A. Wierman, S.H. Low and L.L.H. Andrew. tions. The Lawrence Berkeley National Laboratory, 2009. Greening geographical load balancing. In Proceedings of SIGMET[166] D. Azevedo et al.. Carbon usage effectiveness (CUE): A green RICS’11, pages 233-244, 2011. grid data center sustainability metric. The Green Grid, 2010. Y. Gao, Z. Zeng, X. Liu and P.R. Kumar. The answer is blowing [167] U.S. Department of Energy, Energy Information Administration. in the wind: analysis of powering Internet data centers with wind Appendix F. Electricity emission factors. EIA-1605, 2007. energy. In Proceedings of INFOCOM’13, pages 520-524, 2013. [168] 42U. WEU: Water-side economizers utilization. Y. Zhang, Y. Wang and X. Wang. GreenWare: greening cloudhttp://www.42u.com/cooling/water-side-economizers.htm, scale data centers to maximize the use of renewable energy. In 2011. Proceedings of Middleware’11, pages 143-164, 2011. [169] E. Jaureguialzo. PUE: the green grid metric for evaluating the J. Mars, L. Tang, R. Hundt, K. Skadron and M. L. Soffa. Bubbleenergy efficiency in DC (Data Center). Measurement method Up:increasing utilization in modern warehouse scale computers using the power demand. In Proceedings of INTELEC’11, pages via sensible co-locations. In Proceedings of MICRO’11, pages 2481-8, 2011. 259, 2011. [170] J. Gao. Machine learning applications for data center optimizaH. Yang, A. Breslow, J. Mars and L. Tang. Bubble-flux: precise tion. Google Report, 2014. online QoS management for increased utilization in warehouse [171] L.H. Sego, A. Márquez, A. Rawson, T. Cader, K. Fox, W.I. scale computers. In Proceedings of ISCA’13, pages 607-618, 2013. Gustafson JR. and C.J. Mundy. Implementing the data center enT. Benson, A. Akella, A. Shaikh and S. Sahu. CloudNaaS: a cloud ergy productivity metric. In ACM Journal on Emerging Technologies networking platform for enterprise applications. In Proceedings of in Computing System, 8(4):30, 2012. SOCC’11, No.8, 2011. [172] Green IT Promotion Council. DPPE: holistic framework for data K. Skadron, M.R. Stan, K. Sankaranarayanan, W. Huang, S. center energy efficiency. 2012. Velusamy and D. Tarjan. Temperature-aware microarchitecture: [173] Harmonizing global metrics for data center energy efficiency. In modeling and implementation. In ACM Transactions on ArchitecMetrics and measurements, 2014. ture and Code Optimization, 1(1), pages 94-125, 2004. [174] L. Liu, H. Wang, X. Liu, X. Jin, W. He, Q. Wang and Y. R. Grundy. Recommended data center temperature & humidity. Chen. GreenCloud: a new architecture for green data center. In Computer Room Temperature Humidity.htm, http://www.avtech.com/About/Articles/AVT/NA/All/-/DD-NN-AN-TN/Recommended Proceedings of ICAC-INDST’09, pages 29-38, 2009. 2005. [175] G. Lu, J. Zhang, H. Wang, L. Yuan and C. Weng. PowerTracer: C. Belady, A. Rawson, J. Pfleuger and T. Cader. The green grid tracing requests in multi-tier services to diagnose energy ineffidata center power efficiency metrics: PUE & DCiE. Green Grid, ciency. In Proceedings of ICAC’12, pages 97-102, 2012. Technical Report, 2008. C.D. Patel, C.E. Bash, R. Sharma and M. Beitelmal. Smart cooling [176] F. Julià, J. Roldan, R. Nou, J.O. Fitó, A. Vaqué, Í. Goiri and of data centers. In Proceedings of IPACK’03, pages 129-137, 2003. J.L. Berral. EEFSim: energy efficiency simulator. Research Report: W. Zheng, K. Ma and X. Wang. Exploiting thermal energy UPC-DAC-RR-CAP-2010-15, 2010. storage to reduce data center capital and operating expenses. In [177] D. Kliazovich, P. Bouvry, Y. Audzevich and S.U. Khan. GreenProceedings of HPCA’14, pages 132-141, 2014. Cloud: a packet-level simulator of energy-aware cloud computR.K. Sharma, C.L. Bash, C.D. Patel, R.J. Friedrich and J.S. Chase. ing data centers. In Proceedings of Globecom’10, pages 1-5, 2010. Balance of power: dynamic thermal management for Internet [178] S.K.S. Gupta, R.R. Gilbert, A. Banerjee, Z. Abbasi, T. Mukherjee Data centers. In IEEE Internet Computing, 9(1), pages 42-49, 2005. and G. Varsamopoulos. GDCSim: a tool for analyzing green J. Moore, J. Chase, P. Ranganathan and R. Sharma. Making data center design and resource management techniques. In scheduling “cool”: temperature-aware workload placement in Proceedings of IGCC’11, pages 1-8, 2011. data centers. In Proceedings of ATEC’05, pages 61-74, 2005. [179] S. Yeo and H.-H.S. Li. SimWare: a holistic warehouse-scale T. Heath, A.P. Centeno, P. George, L. Ramos, Y. Jaluria and computer simulator. In Computer, 45(9), pages 48-55, 2012. R. Bianchini. Mercury and freon: temperature emulation and [180] K. Xu and F. Wang. Cooperative monitoring for internet data management for server systems. In Proceedings of ASPLOS’06, centers. In Proceedings of IPCCC’08, pages 111-118, 2008. pages 106-116, 2006. H. Xu, C. Feng and B. Li. Temperature aware workload management in geo-distributed datacenters. In Proceedings of ICAC’13, pages 303-314, 2013. R.T. Kaushik and K. Nahrstedt. T ∗ : a data-centric cooling energy costs reduction approach for big data analytics cloud. In Proceedings of SC’12, pages 1-11, 2012. J. Brandon. Going green in the data center: practical steps for your sme to become more environmentally friendly. In Processor, 29(39), pages 1-30, 2007. S. Biswas, M. Tiwari, T. Sherwood, L. Theogarajan and F.T. Chong. Fighting fire with fire: modeling the datacenter-scale effects of targeted superlattice thermal management. In Proceedings of ISCA’11, pages 331-340, 2011. N. El-Sayed, I.A. Stefanovici, G. Amvrosiadis, A.A. Hwang and B. Schroeder. Temperature management in data centers: why some (might) like it hot. In Proceedings of SIGMETRICS’12, pages 163-174, 2012. R. Zhou, Z. Wang, A. McReynolds, C.E. Bash, T.W. Christian and R. Shih. Optimization and control of cooling microgrids for data centers. In Proceedings of ITherm’12, pages 338-343, 2012. R. Miller. Too hot for humans, but Google servers keep hum-
8cs.DS
CELLULAR RESOLUTIONS FROM MAPPING CONES arXiv:1311.4599v1 [math.AC] 19 Nov 2013 ANTON DOCHTERMANN AND FATEMEH MOHAMMADI Abstract. One can iteratively obtain a free resolution of any monomial ideal I by considering the mapping cone of the map of complexes associated to adding one generator at a time. Herzog and Takayama have shown that this procedure yields a minimal resolution if I has linear quotients, in which case the mapping cone in each step cones a Koszul complex onto the previously constructed resolution. Here we consider cellular realizations of these resolutions. Extending a construction of Mermin we describe a regular CW-complex that supports the resolutions of Herzog and Takayama in the case that I has a ‘regular decomposition function’. By varying the choice of chain map we recover other known cellular resolutions, including the ‘box of complexes’ resolutions of Corso, Nagel, and Reiner and the related ‘homomorphism complex’ resolutions of Dochtermann and Engström. Other choices yield combinatorially distinct complexes with interesting structure, and suggests a notion of a ‘space of cellular resolutions’. 1. Introduction Let R = k[x1 , x2 , . . . , xn ] be the graded polynomial ring over a field k, and let I ⊂ R be an ideal generated by monomials I = hm1 , m2 , . . . , mk i. A popular game in combinatorial commutative algebra is to understand minimal graded resolutions of the monomial ideal I under various restrictions. In [HT02] Herzog and Takayama describe a general ‘mapping cone’ procedure for constructing a free resolution of a monomial ideal I. The basic idea is to utilize the short exact sequences that arise from adding one generator of I at a time, and to iteratively build the resolution as a mapping cone of an appropriate map between previously constructed complexes. If the ideal I has linear quotients with respect to some ordering of its generators, the complexes and maps in question are particularly well-behaved, and this case the mapping cone construction leads to a minimal resolution of I. The class of ideals with linear quotients includes stable ideals, squarefree stable ideals, as well as matroidal ideals (relevant definitions below). Stable monomial ideals themselves have a well-known minimal resolution first described in [EK90], and the mapping cone construction generalizes this so-called EliahouKervaire (EK) resolution. In this context there is a natural choice of homogeneous basis for each free module in the resolution of I. In the case that the ideal I has linear quotients, and furthermore has a regular decomposition function, the differentials in the free resolution can also be described explicitly. We review these concepts in Section 2.1. One way to describe the resolution of a (monomial) ideal is through the construction of a CW-complex whose vertices index the generators of I, and whose higher dimensional faces index the syzygies. These so-called cellular resolutions were first introduced by Bayer and Sturmfels in [BS98]. A natural question to ask is if the mapping cone construction can be Date: March 22, 2018. Key words and phrases. cellular resolution, mapping cone, linear quotients. 1 realized cellularly. In [Mer10] Mermin shows that the EK resolution is indeed cellular, and in the case that I is generated in a fixed degree d, is in fact supported on a subcomplex of a suitably subdivided dilated simplex. In this paper we combine methods from [HT02] and [Mer10] to show that one can obtain a larger class of cellular resolutions via the mapping cone construction. Although the mapping cones of [HT02] are purely algebraic objects, they have a geometric interpretation which, in the context of ideals with linear quotients, we seek to combine with the decomposition function approach from [HT02]. The basic idea is that if I is an ideal with linear quotients then the mapping cone construction can be realized as an iterative procedure where in each step a geometric simplex is glued in a certain way onto the existing cellular resolution. In Section 3 we extend Mermin’s result to the case of ideals with linear quotients. Our main result from that section is the following1. Theorem 1.1. (Theorem 3.10) Suppose I has linear quotients with respect to some ordering (m1 , . . . , mk ) of the generators, and furthermore suppose that I has a regular decomposition function. Then the minimal resolution of I obtained as an iterated mapping cone is cellular and supported on a regular CW -complex. In Section 4 we investigate other combinatorial types of cellular resolutions that can be recovered from the mapping cone construction. In particular, we are interested in a family of cellular resolutions in the literature ([CN09], [NR09], [Sin08], [DE12]) that all have similar combinatorial structure. These complexes go by various names and are applied to different classes of ideals, including the complexes of boxes resolutions of strongly stable and squarefree strongly stable ideals from [NR09], as well as the homomorphism complex resolutions of cointerval hypergraph edge ideals of [DE12]. For a fixed ideal I the combinatorial types of these complexes more or less coincide, but they look much different than the polyhedral complex obtained as the realization of the EK resolution described above (see examples below). We seek to relate these constructions. In Section 4 we show that the homomorphism complex resolution can be obtained as an iterated mapping cone with a different choice of ‘decomposition function’; in essence a different way to glue in the simplex at each step in the construction. In this way we provide a uniform description of various cellular cellular resolutions from the literature, answering a question of Mermin from [Mer10]. Our main result from that section is the following (see Section 4 for definitions). Theorem 1.2. (Theorem 4.13) Suppose I = IH is a cointerval ideal associated to a cointerval hypergraph H, and let XH be the homomorphism complex supporting its minimal resolution. Then under the lexicographic ordering of the generators of I, the iterated mapping cone resolution of I is supported on XH . The choices involved in realizing the mapping cone as a cellular resolution lead to a natural question of what all possible realizations look like. In Section 4.2 we fix a choice of basis for each free module in the mapping cone construction and consider the family of geometric 1While preparing this paper we learned of the recent preprint [Goo13] of Goodarzi, where similar results were independently obtained. 2 realizations obtained by choosing different regular decomposition functions. The gluing of the simplex at each step amounts to the choice of a map of chain complexes that lifts the given map of R-modules. Finally, in Section 4.3 we investigate the extent to which these choices can be realized as a single space of resolutions. Acknowledgments. The authors would like to thank Alexander Engström, Jürgen Herzog, and Volkmar Welker for helpful conversations. 2. Preliminaries For some fixed field k, we let R = k[x1 , . . . , xn ] denote the polynomial ring on n variables with its usual Zn -grading, and let I ⊂ R be a monomial ideal. We will be interested in describing (minimal) graded free resolutions of the ideal I. 2.1. Mapping cones and linear quotients. We begin by recalling the mapping cone resolutions from [HT02]. For this, let I ⊂ R be a monomial ideal with an ordered set of generators G(I) = (m1 , . . . , mk ) and define Ij = (m1 , . . . , mj ). Then for each j there are exact sequences 0 → R/(Ij−1 : mj ) → R/Ij−1 → R/Ij → 0. Suppose we have we have resolutions G and F of, respectively, the R-modules in the first two positions of the sequence. We then obtain a resolution of R/Ij as a mapping cone of a homomorphism of complexes ψ : G → F , where ψ is a lift of the map of R-modules R/(Ij−1 : mj ) → R/Ij−1 . Recall that if ψ : G → F is a map of chain complexes then C(ψ), the mapping cone of ψ, is the chain complex defined by C(ψ) = G[1] ⊕ F, with differential  dC(ψ) (g n+1 , f n ) = − dG (g n+1 ), ψ(g n+1 ) + dF (f n ) . In general the resolution of R/Ij obtained from a mapping cone is not minimal, and so we search for a class of ideals where one can inductively describe both the resolution of R/(Ij−1 : mj ) as well as the comparison map ψ. In [HT02] the authors restrict to a class of ideals for which each of the colon ideals Ij−1 : mj are generated by subsets of the variables, in which case the resolution of R/(Ij−1 : mj ) is resolved by a Koszul complex. This motivates the following. Definition 2.1. A monomial ideal I ⊂ R is said to have linear quotients if there exists an ordering of the generators I = (m1 , . . . , mk ) such that for each j the colon ideal Ij : mj is generated by a subset of the variables, so that Ij : mj = hxj1 , . . . , xjr i. One can check (see [HT02], attributed to Skölberg) that an ideal I has linear quotients if and only if the first syzygy module of I has a quadratic Gröbner basis. In the case that I is squarefree, and hence I is the Stanley-Reisner ideal I∆ of a simplicial complex ∆, this is equivalent to the Alexander dual ∆∗ being (nonpure) shellable. 3 The property of having linear quotients is itself a generalization of the notion of a stable ideal, as introduced in [EK90]. If w is a monomial in the polynomial ring R = k[x1 , . . . , xn ] we let max(w) denote the largest index of the variables dividing w. A monomial ideal I ⊂ R is called stable if for every monomial w ∈ I and index i < m = max(w), we have that the monomial xi w/xm belongs to I. Stable ideals are in turn generalizations of strongly stable (or sometimes shifted, or 0-Borel fixed ) ideals. An ideal I is strongly stable if whenever w ∈ I with xj dividing I, we have xi w/xj ∈ I for all i < j. Note that j is not required to be the largest index of variables dividing w, as in the definition of stable ideals. To summarize, we have the following hierarchy of ideal containments: {strongly stable} ⊂ {stable} ⊂ {having linear quotients}. In [HT02] the authors seek minimal resolutions of ideals obtained from the mapping cone construction; this amounts to finding an explicit description of the comparison maps ψ : G → F introduced above. The approach taken in [HT02] is to first restrict to ideals with linear quotients since in this case one can provide a description of the bases of the free modules in a free resolution. We first establish some terminology. Definition 2.2. Suppose I has linear quotients with respect to the sequence (m1 , . . . , mk ) of its generators, and for each j with 1 ≤ j ≤ k let Ij = hm1 , . . . , mj i. Let M (I) denote the set of all monomials in I. For each generator mj , with j = 1, . . . , k, we define set(mj ) = {k ∈ [n] : xk ∈ hm1 , . . . , mj−1 i : mj }. In the case that I has linear quotients, it is shown in [HT02] that the mapping cone construction produces a minimal free resolution of I, and furthermore that a basis for each free module Fi in the minimal free resolution can be explicitly described as follows. Lemma 2.3. [HT02, Lemma 1.5] Let I be a monomial ideal with linear quotients. Then the iterated mapping cone F , derived from the sequence m1 , . . . , mk , is a minimal graded free resolution of R/I, and for all i > 0, the symbols (m; α), where m ∈ G(I) α ⊂ set(m), |α| = i − 1, , form a homogeneous basis of the ith module in the minimal resolution of R/I. In [HT02] the authors also provide an explicit description of the differentials in these resolutions for a certain subclass of ideals that satisfy an extra condition. In this context, let M (I) denote the set of all monomials in I, and define the decomposition function of I to be the assignment b : M (I) → G(I) given by: define b(m) = mj if j is the smallest number such that m ∈ hm1 , . . . , mj i. The decomposition function is similar to the description of the differentials in the EK resolution of stable ideals introduced in [EK90]. Indeed, when restricted to the class of stable ideals, the mapping cone construction recovers the EK resolution. To describe the differentials from [HT02] we will need to assume one further condition. Definition 2.4. The decomposition function of I is said to be regular if for each m ∈ G(I) and every t ∈ set(m) we have set(b(xt m)) ⊆ set(m). In this case for each m ∈ G(I) and t, s ∈ set(m) we have (∗) b(xs b(xt m)) = b(xt b(xs m)). 4 Note that in degree two for t, s ∈ set(m), in the case that b(xt b(xs m)) 6= b(xt m), we have b(xt b(xs m)) = b(xs b(xt m)) = xt xs . Example 2.5. Consider the ideal I = hx1 x3 x4 , x1 x3 x5 , x1 x2 x4 , x1 x4 x5 , x2 x3 x4 , x2 x3 x5 i. Then I has linear quotients with respect to this order of generators, where for instance I5 : (x2 x3 x5 ) = hx1 , x4 i. In addition, one can check that the decomposition function b for this ideal is regular, where for example b(x2 x3 (x1 x4 x5 )) = b(x3 x2 (x1 x4 x5 )). One can also check that I is not stable and also not cointerval (see Section 4.1 for a definition of the latter). For the class of ideals with linear quotients and regular decomposition functions we have the following result. Theorem 2.6. [HT02, Theorem 1.12.] Let I be a monomial ideal with linear quotients, and F the graded minimal free resolution of R/I. Suppose the decomposition function b : M (I) → G(I) is regular. Then the chain map d of F is given by X X xj i m (b(xji m); α \ ji ) d(m; α) = − (−1)i−1 xji (m; α \ ji ) + (−1)i−1 b(xji m) ji ∈α ji ∈α X X xj i m = (−1)i xji (m; α \ ji ) − (−1)i (b(xji m); α \ ji ) b(xji m) j ∈α j ∈α i i if σ 6= ∅, where α = {j1 , . . . , jp } ⊂ set(m) with j1 < · · · < jp , and d(m, ∅) = m otherwise. There are several classes of ideals that are known to have linear quotients that admit regular decomposition functions. These include stable ideals and matroidal ideals (as shown in ([HT02]), as well as completely lexsegment ideals [EOS10] and the Alexander dual of the generalized Hibi ideals from [EHM11]. 2.2. Cellular resolutions. One natural way to describe a resolution of an ideal I is through the construction of a polyhedral (or more general CW-) complex XI whose faces (vertices, edges, and higher dimensional cells) are labeled by monomials in such a way that the chain complex determining the cellular homology of X realizes a graded free resolution of I. The study of cellular resolutions was first explicitly initiated in [BS98] (to where we refer for further details). Cellular resolutions have the advantage that algebraic resolutions can in some sense be given a global description, and they also lead to combinatorially interesting geometric complexes. The well-known Taylor resolution [Tay66] guarantees that all monomial ideals have a (usually far from minimal) cellular resolution supported on a simplex. In this case that I is generated by variables, the Taylor resolution is in fact minimal, and recovers the Koszul resolution of I. This fact will be used heavily in our construction of the resolution of ideals with linear quotients, where by definition certain colon ideals are generated by variables. Not all minimal free resolutions of monomial ideals are supported by a CW-complex, as is shown in [Vel08], but a natural question to ask is which algebraic complexes can be realized cellularly (and to provide a geometric/combinatorial description). In [BW02] Batzies and Welker develop an algebraic version of Discrete Morse theory and construct CW complexes that support minimal cellular resolutions of shellable ideals (which can be seen to coincide with the class of ideals with linear quotients). However, there construction is not explicit and they make no claims regarding the regularity of their complexes. 5 As mentioned in the introduction, Mermin [Mer10] has shown that the Eliahou-Kervaire resolution of a stable ideal I is cellular and supported on a regular CW-complex. In the case that I is generated in a fixed degree one can realize the supporting complex as a subcomplex of a certain subdivision of a dilated simplex (see the next section for details). In [Sin08] Sinefakopoulos describes cellular resolutions of the class of strongly stable ideals generated in a fixed degree but obtains combinatorially distinct complexes. In the case that I = hx1 , . . . xn id , the dth power of the maximal graded ideal in R, the complexes are different subdivisions of a dilated simplex. In [DE12] the authors describe cellular resolutions of what they call cointerval ideals via spaces of graph homomorphisms, extending the ‘complexes of boxes’ constructions from [NR09] and [CN09]. In [NPS02] the authors construct minimal cellular resolutions of monomial ideals arising from matroids and oriented matroids. In [DJS12] methods from tropical convexity are employed to build cellular resolutions of a certain class of monomial ideals. For a particular ideal, these constructions can lead to (geometric) complexes with different combinatorial structure. As we will see in Section 4, many of these constructions can be realized as different instances of the cellular mapping cone construction. 3. The generalized Eliahou Kervaire cellular resolution In this section we show that the generalized Eliahou-Kervaire (EK) resolution described in Theorem 2.6 is supported on a cellular complex. We will extend the construction of Mermin [Mer10] (where the case of stable ideals was considered) to realize the supporting space as a CW -complex obtained by gluing together certain simplices corresponding to data coming from the generators of I. Throughout this section we will use the notation and terminology from Section 2.1. In particular we assume that our ideal I is a monomial ideal with linear quotients with respect to the sequence of generators G(I) = (m1 , . . . , mk ), where we use m1 > m2 > · · · > mk to denote the ordering of the generators defining the linear quotient (this will be convenient when we no longer have indices on the generators). We furthermore assume that its decomposition function b : M (I) → G(I) is regular (see 2.4). 3.1. Cellular construction. In a description of any cellular resolution we need to label the 0-cells of a CW-complex with monomials corresponding to generators of I. We first note that each monomial m = xa11 xa22 · · · xann ∈ G(I) can be regarded as a point (a1 , a2 , . . . an ) ∈ Rn by considering its exponent vector. We will often abuse notation and use m to denote this point in Rn . Now, for each m ∈ G(I) and α = {j1 , . . . , jp } ⊂ set(m) with j1 < · · · < jp , we let σ = (σ1 , . . . , σp ) be a permutation of {j1 , . . . , jp }. We define ch(m, α, σ) to be the subset of Rn obtained as the convex hull of the subset of generators of I that we reach by applying the decomposition function in the order prescribed by the permutation σ:  ch(m, α, σ) = Conv m, b(xσ1 m), b(xσ2 xσ1 m), . . . , b(xσp · · · xσ1 m) Here we use the shorthand notation b(xσ2 xσ1 m) = b(xσ2 b(xσ1 m)). We say that ch(m, α, σ) is nondegenerate if there are no repetitions of monomials involved in the description of ch(m, α, σ); otherwise we say that ch(m, α, σ) is degenerate (see Example 3.2). We will see in Corollary 3.4 that in this case ch(m, α, σ) is in fact a p-dimensional simplex. 6 x1x4x5 3 2 x1x4x5 x1x2x4 3 x1x3x4 x1x3x4 Figure 1. The degenerate simplex ch(x1 x4 x5 , {2, 3}, (32)) on the left, and the nondegenerate ch(x1 x4 x5 , {2, 3}, (23)) on the right. Lemma 3.1. Let m ∈ G(I), α ⊂ set(m), and σ a permutation of α. If ch(m, α, σ) is degenerate then there exists a permutation σ 0 of α such that ch(m, α, σ 0 ) is nondegenerate and ch(m, α, σ) is a face of ch(m, α, σ 0 ). Proof. Suppose that ch(m, α, σ) is degenerate. Let s be the first index with the property that applying b does not lead to a new generator, so that b(xσs+1 b(xσs · · · xσ1 m)) = b(xσs · · · xσ1 m). Let σ 0 = (σ1 , . . . , σs−1 , σs+1 , σs , . . . , σp ) be the permutation obtained from σ from switching positions s and s + 1. If b(xσs+1 b(xσs−1 · · · xσ1 m)) 6= b(xσs−1 · · · xσ1 m) then we get that ch(m, α, σ) is a face of ch(m, α, σ 0 ). Otherwise we push σs+1 further back by switching σs−1 and σs+1 to get the permutation σ 00 = (σ1 , . . . , σs+1 , σs−1 , σs , . . . , σp ). We then apply the above argument for s − 1 (instead of s) and in order to find a permutation σ 00 such that ch(m, α, σ 00 ) contains ch(m, α, σ 0 ) as a face. In the worst case we consider the permutation (σs+1 , σ1 , . . . , σp ) and we have b(xσs+1 m) 6= m as desired. By continuing the same argument, we keep increasing dimensions and we get a nondegenerate ch(m, α, σ 0 ) containing ch(m, α, σ) as a face.  Example 3.2. We return to the ideal I from Example 2.5, where I = hx1 x3 x4 , x1 x3 x5 , x1 x2 x4 , x1 x4 x5 , x2 x3 x4 , x2 x3 x5 i has linear quotients with respect to the given ordering of the generators. One can check that set(x1 x4 x5 ) = {2, 3}. The simplices corresponding to the permutations σ = (23) and σ 0 = (32) are described below. (i) The simplex ch(x1 x4 x5 , {2, 3}, (32)) is degenerate since it is the convex hull of the vectors corresponding to x1 x4 x5 and x1 x3 x4 = b(x3 (x1 x4 x5 )). Here the fact that 2 6∈ set(x1 x3 x4 ) implies degeneracy (see Figure 3.1). (ii) Switching the positions of 2 and 3 gives us the permutation σ 0 = (32). The resulting simplex ch(x1 x4 x5 , {2, 3}, (32)) is then nondegenerate since it is the convex hull of the vectors corresponding to x1 x4 x5 , x1 x2 x4 = b(x2 (x1 x4 x5 )), and x1 x3 x4 = b(x3 (x1 x2 x4 )). Note that ch(x1 x4 x5 , {2, 3}, σ) is a face of ch(x1 x4 x5 , {2, 3}, σ 0 ). 7 Lemma 3.3. Suppose ch(m, α, σ) is nondegenerate. Then for each ` and j with j < ` we have b(xσj xσj−1 · · · xσ1 m) 6= xσj b(xσj−1 · · · xσ1 m)/xσ` . Proof. By contradiction assume that for some j < ` we have b(xσj m0 ) = xσj m0 /xσ` , where m0 = b(xσj−1 · · · xσ1 m). Then by our assumption of regularity (∗) we can push σ` back until it meets σj as follows: b(xσ` · · · xσ1 m) = b(xσ` b(xσ`−1 · · · xσj+1 b(xσj m0 ))) = b(xσ`−1 b(xσ` xσ`−2 · · · xσj+1 b(xσj m0 ))) = ··· = b(xσ`−1 b(xσ`−2 · · · xσj+1 xσ` b(xσj m0 ))) = b(xσ`−1 · · · xσj+1 xσ` (xσj m0 /xσ` )) = b(xσ`−1 · · · xσ1 m), which is a contradiction by our assumption that ch(m, α, σ) is nondegenerate.  As a consequence of Lemma 3.3 we have Corollary 3.4. Suppose that | set(m)| = p and ch(m, set(m), σ) is nondegenerate. Then ch(m, set(m), σ) is a simplex of dimension p. Proof. Let v0 = (v0,1 , v0,2 , . . . , v0,n ) be the exponent vector of m and vi = (vi,1 , vi,2 , . . . , vi,n ) be the exponent vector of b(xσi · · · xσ1 m) for each i > 0. We will show that v0 , v1 , . . . , vp are affinely independent. Assume that λ0 v0 + λ1 v1 + · · · + λp vp = 0 and λ0 + λ1 + · · · + λp = 0. Then by Lemma 3.3 we know that for each `, ( v`−1,σ` , if i < `; vi,σ` = v`−1,σ` + 1, if i ≥ `. In particular vp,σp = v`,σp + 1 for all ` < p. Therefore, we have (vp,σp − 1)(λ0 + λ1 + · · · + λp−1 ) + vp,σp λp = 0 which implies that λp = 0. A similar argument shows that λi = 0 for all i.  As we have seen, for each subset α ⊂ set(m) of size q we have some permutation σ of α such that the simplex ch(m, α, σ) is of dimension q − 1. Definition 3.5. Suppose m is a generator of I and α ⊂ set(m). Let F be a facet of the (possibly degenerate) simplex ch(m, α, σ). We say that F is an exterior facet if it is not a facet of ch(m, α, σ 0 ) for some other permutation σ 0 of α. Otherwise we say that F is an interior facet. Corollary 3.6. Let α ∈ set(m), let σ be some permutation of α, and suppose F is a facet of the simplex ch(m, α, σ) = Conv{m, m1 , . . . , mp }. Then F is exterior if and only if m` 6∈ F for some 1 < ` < p and σ` ∈ set(b(xσ`+1 m`−1 )). If F is interior, then there exist exactly two nondegenerate simplices containing F : the simplex ch(m, α, σ) and the simplex ch(m, α, σ 0 ), where σ 0 = (σ1 , . . . , σ`−1 , σ`+1 , σ` , . . . , σp ). 8 Proof. Let ch(m, α, σ) = hm, m1 , . . . , mp i be a nondegenerate simplex which contains F as a facet with m` 6∈ F for some 1 < ` < p. Now we consider the following two cases: Case (i). Suppose σ` ∈ set(b(xσ`+1 m`−1 )). Then b(xσ` xσ`+1 m`−1 ) 6= b(xσ`+1 m`−1 ) and so F is also a facet of ch(m, set(m), σ 0 ), where σ 0 = (σ1 , . . . , σ`−1 , σ`+1 , σ` , . . . , σp ). Therefore F is an interior facet. By contradicton assume that ch(m, set(m), σ 00 ) is another nondegenerate simplex containing F as a facet such that σi00 = σ` . If i < `, then the corresponding simplex does not contain m`−1 . If i > `, then m`+1 does not appear among the vertices, a contradiction. Case (ii). Suppose σ` 6∈ set(b(xσ`+1 m`−1 )). In this case we have b(xσ` xσ`+1 m`−1 ) = b(xσ`+1 m`−1 ). Assume that ch(m, set(m), σ 0 ) = hw0 , w1 , . . . , wp i is another simplex containing F as a facet and let wi 6∈ {m, m1 , . . . , mp }. We wish to show that i = 0. By contradiction we suppose i ≥ 1 and note that b(xσ` wi−1 ) = wi . Our assumption that b(xσ` xσ`+1 m`−1 ) = b(xσ`+1 m`−1 ) implies that σ` ∈ set(mi ) for all i ≤ ` and σ` 6∈ set(mi ) for all i > `. On the other hand, σ` ∈ set(wi−1 ) which implies that i < ` and σ`+1 ∈ set(wi ). Thus wi+1 = b(xσ`+1 wi ) is not equal to m`+1 which implies that wi , wi+1 6∈ F , a contradiction. Therefore we have ` = 0 so that F = hm1 , . . . , mp i is the facet of ch(m, α, σ) obtained by removing the vertex m. We conclude that F is not a facet of any other simplex of the form ch(m, α, σ 0 ) = hm, m01 , . . . , m0p i, and hence F is exterior.  We next construct the cells that will serve as basis elements of the free modules in our resolution. We obtain these by gluing together the simplices ch(m, α, σ) corresponding to the different choices of the permutation σ. For this we define the cell U (m, α) as the union over all permutations σ of α. [ U (m, α) = ch(m, α, σ). σ a permutation of α Note that by Lemma 3.1, U (m, α) can be written (as a subset of Rn ) as the union of nondegenerate simplices ch(m, α, σ). 3.2. Orientation of ch(m, set(m), σ): Definition 3.7. For each p ≥ 1 we fix the permutation (p, . . . , 1). Then for each permutation σ of {1, . . . , p} we define (σ) = sgn(σ, (p, . . . , 1)) where sgn(−, −) denotes the standard sign function for permutations. Lemma 3.8. There exists an orientation on the simplices ch(m, set(m), σ) such if F in an interior facet belonging to both ch(m, set(m), σ) and ch(m, set(m), σ 0 ), then F has the same induced orientation if and only if the the simplices themselves have opposite orientations. Proof. By Lemma 3.6 each interior facet F belongs to exactly two simplices ch(m, set(m), σ) and ch(m, set(m), σ 0 ). Therefore the orientation of each interior facet F can be determined uniquely by the simplices containing F . For each two nondegenerate simploices G = ch(m, set(m), σ) and G0 = ch(m, set(m), σ 0 ) there exists a chain G0 = G, G1 , . . . , Gr = G0 such that Gi+1 is obtained from Gi by swapping two suitable indices. 9 These two facts show that the orientations on the simplices can be determined uniquely.  Notation. Assume that F is a facet of ch(m, set(m), σ) = hm = m0 , m1 , . . . , mp i. When F is an exterior facet, or when the simplex containing F is clear, we denote o(F ) to denote the the orientation of F that is determined by sgn(σ) and the missing vertex in F . The following is our main technical lemma regarding the differential maps. Lemma 3.9. The topological differentials of each cell U (m, α) with subset α = {j1 , . . . , jp } of set(m) are X X d(U (m, α)) = (−1)i U (m, α\ji ) − (−1)i U (b(xji m), α\ji ) . i i Proof. For the simplex hm0 , m1 , . . . , mp i, the boundary map is given by d(hm0 , m1 , . . . , mp i) = p X (−1)p−i hm0 , . . . , m ci , . . . , mp i i=0 For α ⊂ set(m), the cell U (m, α) for α ⊆ set(m) is the union of all nondegenerate simplices ch(m, α, σ), and is oriented as X U (m, α) = o(F )F, F =ch(m,α,σ) nondegenerate where o(F ) denotes the unique orientation given by Lemma 3.8. So the topological differentials of the cell α ⊆ set(m) are given by X d(U (m, α)) = o(F )d(F ). F =ch(m,α,σ) nondegenerate Now corresponding to the fixed simplex ch(m, α, σ) = hm0 , m1 , . . . , mp i we have the following terms in the differential of U (m, α): Case 1. i = 0. The term corresponding to i = 0 is (−1)p sgn(σ)hm1 , . . . , mp i. Let σ 0 = (σ2 , . . . , σp ) and π be the permutation such that πσ 0 = (p, . . . , σb1 , . . . , 1). Then (σ1 , p)(σ1 , p − 1) · · · (σ1 , σ1 + 1)πσ 0 = (p, . . . , 1) shows that sgn(σ) = sgn(σ 0 )(−1)p−σ1 . Thus the corresponding term is (−1)σ1 sgn(σ 0 ) ch(b(xjσ1 m), α\jσ1 , σ 0 ). This face can not be obtained from the differential of any other simplex in U (m, α) by Lemma 3.6. Case 2. i = p. In this case the term corresponding to i = p is sgn(σ)hm0 , . . . , mp−1 i. Then again this face can not be obtained from the differential of any other simplex in U (m, α). As in Case 1 we have sgn(σ) = sgn(σ 0 )(−1)σp +1 , where σ 0 = (σ1 , . . . , σp−1 ). Thus this term can be written as (−1)σp +1 sgn(σ 0 ) ch(m, α\jσp , σ 0 ). 10 Case 3. 0 < i < p. The corresponding term is (−1)p−i sgn(σ)hm0 , . . . , m ci , . . . , mp i. Now we have two subcases: Case 3.1. First suppose σi ∈ set(b(xjσi+1 mi−1 )). Thus b(xσi b(xjσi+1 mi−1 )) 6= b(xjσi+1 mi−1 ). We set σ 0 = (σ1 , . . . , σi−1 , σi+1 , σi , . . . , σp ). Our condition guarantees that ch(m, α, σ 0 ) is nondegenerate. Note that ch(m, α, σ 0 ) = hm0 , . . . , mi−1 , m0i , mi+1 , . . . , mp i for some m0i . Now by removing the ith vertex of ch(m, α, σ 0 ) we get c0 , . . . , mp i. (−1)p−i sgn(σ 0 )hm0 , . . . , m i Since sgn(σ 0 ) = − sgn(σ), when we take the sum over all possible permutations of α given nondegenerate cells, these two terms will be canceled. Case 3.2. Next suppose σi 6∈ set(b(xjσi+1 mi−1 )). Then b(xσi b(xjσi+1 mi−1 )) = b(xjσi+1 mi−1 ) and the corresponding term is (−1)p−i sgn(σ) ch(m, α\jσi , σ 0 ), where σ 0 = (σ1 , . . . , σbi , . . . , σp ). Since (−1)p−i−σi +1 sgn(σ 0 ) = sgn(σ), we can write this term as (−1)σi +1 ch(m, α\jσi , σ 0 ). P Now by considering d(o(F )F ) over all non-degenerate cells F we find that the remaining terms are the sum of o(σ 0 ) ch(b(xji m), α\ji , σ 0 ), (1) P i (2) P i+1 i (−1) (3.2) i (−1) o(σ 0 ) ch(m, α\ji , σ 0 ), where ji ∈ set(b(xji+1 b(xji−1 · · · xj1 m))), i+1 o(σ 0 ) ch(m, α\ji , σ 0 ), i (−1) P where ji 6∈ set(b(xji+1 b(xji−1 · · · xj1 m))) over all σ 0 P where the corresponding facet is nondegenerate. Then the first sum can be i written P as i+1i (−1) U (b(xji m), α\ji ) and the sums coming from (2) and (3.2) can be written as i (−1) U (m, α\ji ). Therefore X X d(U (m, α)) = (−1)i U (b(xji m), α\ji ) + (−1)i+1 U (m, α\ji ), i i as desired. This completes the proof. With these preliminaries in place we can establish the main result of this section. Theorem 3.10. Suppose I has linear quotients with respect to some ordering (m1 , . . . , mk ) of the generators, and furthermore suppose that I has a regular decomposition function. Then the minimal resolution of I obtained as an iterated mapping cone is cellular and supported on a regular CW -complex. 11 x3x5 x2x5 2 1 x1x5 x1x5 2 x1x2 2 x1x3 x2x3 x1x5 x2x5 3 3 x2x3 1 x1x3 x1x2 x1x3 x1x2 x4x5 2 x1x5 1 3 1 x3x5 x2x5 x1x2 x1x3 x2x3 x1x5 x1x3 x1x2 x2x3 x1x2 x1x3 Figure 2. The resolution of I = hx1 x2 , x1 x3 , x1 x5 , x2 x3 , x2 x5 , x3 x5 , x4 x5 i built from an iterated mapping cone. At each step we have labeled the newly added edges with the elements of set(mj ). Proof. Adding the monomial coefficients to the differential map from Lemma 3.9 we obtain X X xj i m d(U (m, α)) = (−1)i ( (−1)i xji U (m, α\ji ). )U (b(xji m), α\ji ) − b(x m) j i i i This is precisely the minimal free resolution of I described in Theorem 2.6. Therefore the complex constructed as the union of the cells U (m, α) supports the minimal free resolution of I, as desired. Moreover this resolution in the closed form looks like the Eliahou-Kervaire resolution. Note that for any two simplices G = ch(m, set(m), σ) and G0 = ch(m, set(m), σ 0 ) there exists the chain G0 = G, G1 , . . . , Gr = G0 where Gi+1 can be obtained from Gi by swapping two suitable indices. This implies that U (m, set(m)) is a shellable for all m. Hence the constructed resolution is regular, by Lemma 3.6 and [DK73, Proposition 1.2].  Remark 3.11. We note that in the proofs of Theorem 3.10 and the related lemmas, the only property of the decomposition function that we use is its regularity, and not its definition in terms of assigning a particular generator to a monomial. Hence we obtain similar results for any decomposition type function that satisfies the regularity property. We return to this point in Section 4.2 where we vary the decomposition function to obtain combinatorially distinct cellular resolutions. 4. Other cellular realizations of the mapping cone In each step of the mapping cone construction we need to choose the homomorphism of complexes ψ : G → F that lifts the map of R-modules R/(Ij−1 : fj ) → R/Ij−1 . In the context of the generalized EK resolution described above, this choice was encoded in the definition of 12 the decomposition function ψ. We will see that varying the decomposition function leads to combinatorially distinct geometric complexes supporting cellular resolutions, recovering the results from the papers mentioned above. We view the cellular mapping cone construction as a means of unifying the various constructions of cellular resolutions from the literature. 4.1. The complex of boxes (homomorphism) resolution. In this section we show how a different choice of decomposition function in the mapping cone construction recovers the cellular resolutions of [Sin08], of [CN09] and [NR09] (where they are called ‘complex of boxes’ resolutions), and of [DE12] (where they are constructed as ‘homomorphism complex’ resolutions). In this context we restrict our attention to cointerval ideals, a class of hypergraph edge ideals introduced in [DE12] and [MKM10] that generalize squarefree strongly stable ideals. Recall that a (regular) d–graph H on vertex set [n] is a collection of subsets of [n] = {1, 2, . . . , }, each of cardinality d. A d-graph H naturally gives rise to a (square-free) monomial ideal IH by taking generators to be the edges of H. To describe the class of cointerval graphs we need the following notion. Definition 4.1. Let H be a d–graph and let v ∈ V (H) ⊆ Z be some vertex. Then the v–layer of H is a (d − 1)–graph on V \ v with edge set {v1 v2 · · · vd−1 | vv1 v2 · · · vd−1 ∈ E(H) and v < v1 , v2 , . . . , vd−1 }. Definition 4.2. The class of cointerval d–graphs is defined recursively as follows. Any 1–graph is cointerval. For d > 1, a finite regular d–graph H with vertex set V (H) ⊆ Z is cointerval if (1) for every i ∈ V (H) the i–layer of H is cointerval; (2) for every pair i < j of vertices, the j–layer of H is a subgraph of the i–layer of H. When d = 2 the class of cointerval graphs can be seen to coincide with the well-studied complements of interval graphs of structural graph theory (hence the name). One can see that cointerval d–graphs generalize the class of (pure) shifted simplicial complexes. Given a cointerval d-graph H, we will often refer to the associated edge ideal IH as a cointerval ideal. In [MKM10] the authors work with a class of ideals they call generalized Ferrers ideals which can be seen to coincide with the class of cointerval ideals. We recall the equivalent definition here. Lemma 4.3. A squarefree monomial ideal I (generated by monomials of degree d) is cointerval if and only if for any monomial m = xi1 xi2 · · · xid ∈ I we also have xj1 xj2 · · · xjt xit+1 · · · xid ∈ I, where (i1 , i2 , . . . , id ) and (j1 , j2 , . . . , jd ) are such that j1 ≤ i1 , j2 ≤ i2 , . . . , jt ≤ it for some t ≤ d. From [MKM10] we also take the following result. Theorem 4.4. [MKM10, Theorem 2.5] Let IH be the edge ideal of a generalized d-Ferrers hypergraph H, so that IH is a cointerval ideal. Then IH is weakly polymatroidal, and in particular has linear quotients with respect to lexicographic order on its generators. 13 Next we recall the construction of the polyhedral complex XH that supports a minimal free resolution of the cointerval ideal associated to the hypergraph H. For subsets σi , σj ⊂ [n] = {1, 2, . . . , n} we say that σi < σj if x < y for all x ∈ σi and y ∈ σj . We use the notation ∆S to denote the simplex with vertex set S. Definition 4.5. Let H be a d–graph on vertex set V (H) = {v1 , v2 . . . , vn }. The polyhedral complex XH is defined to be the subcomplex of the product d Y ∆V (H) i=1 satisfying (1) The vertices of XH are vi1 × vi2 × · · · × vid , where vi1 vi2 · · · vid is an edge of H; (2) For σi ⊆ V (H), the cells σ1 × σ2 × · · · × σd satisfy σ1 < σ2 < · · · < σd . Note that for any d-graph H, the faces of the complex XH are naturally labeled by monomials. In particular, the vertices are labeled by monomials corresponding to the edges of H (i.e. the generators of IH ), and the higher dimensional faces F = σ1 × σ2 × · · · × σd are labeled by d Y Y xj , i=1 vj ∈σi which can be seen as equal to the least common multiple of the monomial labels on the vertices of F . Remark 4.6. Viewing H as a directed d-graph (with orientation on the edges given by the integer labels on the vertices), one can regard XH as a ‘space of directed edges’ of H. Indeed, if we let E denote the d-graph with vertex set [d] consisting of a single edge {1, 2, . . . , d}, then XH = Hom(E, H), a space of directed graph homomorphisms from E to H analogous to the undirected Hom complexes of [BK06]. This perspective was also employed in [BBK12] where the authors study ideals arising from more general (nondegenerate) simplicial homomorphisms. The main result from [DE12] is that these complexes support minimal cellular resolutions of cointerval ideals. Theorem 4.7. [DE12, Theorem 4.1] Let H be a cointerval d–graph on vertex set [n]. Then the polyhedral complex XH supports a minimal cellular resolution of the edge ideal IH . One nice thing about the spaces XH is tdhat the differential maps are so easy to describe. Indeed, if σ1 × σ2 × · · · × σd is a cell of XH , we can write d σ1 × σ2 × · · · × σd as: (1) d X `=1 (−1)`−1 X (−1)j+|σ1 |+···+|σ`−1 | σ1 × σ2 × · · · × {σ`1 , σ`2 , . . . , σc `j , . . . , σ`k } × · · · × σd . j Here we remove the element σij only if it leaves a nonempty subset, that is if |σi | ≥ 2. These are the differential maps we wish to recover in Theorem 4.13, where we show that the homomorphism complex XH can in fact also be realized as an iterated geometric mapping cone construction. We first need another description of the basis elements. 14 Lemma 4.8. Let I = IH be a cointerval ideal associated to the cointerval d–graph H, and let F be its minimal free resolution. Then the basis elements for each free R-module Fi determined by the cellular resolution XH correspond to the symbols (m; α), where m ∈ G(I), α ⊂ set(m), |α| = i − 1. Proof. Suppose IH is a cointerval ideal with monomial generators m1 , m2 , . . . , mk listed in lexicographical order. From Lemma 4.3 we see that for any generator m = xi1 xi2 · · · xid we have set(m) = {j ∈ [n] : j < i1 or for some t ≥ 1 we have it < j < it+1 , xi1 · · · xit xj xit+2 · · · xid ∈ I}. Since XH supports a minimal cellular resolution of IH , we have that a basis for Fi is given by the number of i − 1 dimensional faces of XH . From Definition 4.5 we have an explicit description of these faces, which we now want to show are naturally labeled by the symbols (m; α). Suppose m = xi1 xi2 · · · xid ∈ G(I) and α ⊂ set(m). We associate the symbol (m; α) to the face σ1 × σ2 × · · · × σd , where for 1 ≤ ` ≤ d we define σ` = {i` } ∪ {j ∈ α : i`−1 < j < i` } (by convention we set i0 = 0). To see that this assignment defines a bijection we describe the inverse. For this, suppose σ1 × σ2 × · · · × σd is a face of XH . Define m = xi1 xi2 · · · xid , where for each ` with 1 ≤ ` ≤ d we set i` = max(σ` ). Then define α= [ (σ` \i` ). ` One can check that these assignments are inverses of one another.  The differentials of the resolution supported on the homomorphism complex are described by the incidence face structure of the polyhedral complex XH . To recover these differentials as an iterated mapping cone, we need a new notion of decomposition function. Let I be a cointerval monomial ideal with the sequence of generators m1 , m2 , . . . , mk listed in lexicographical order. As above let G(I) be the set of all monomials in I. Let xG(I) be the set of all products xi mj , where mj ∈ G(I) is a generator of I, and xi is a variable in the polynomial ring such that i ∈ set(mj ). Definition 4.9. With the notation established a above, the map c : xG(I) → G(I) is defined as follows. Suppose mj = xj1 xj2 · · · xjd , with j1 < j2 < · · · < jd and let xi such that i ∈ set(m). Pick the minimum jk such that jk−1 < i ≤ jk , and define c(xi m) = xi m/xjk . We note that this assignment is different than the decomposition function from [HT02]. In particular, our assignment does not in general satisfy c(xs c(xt m)) = c(xt c(xs m)) (the edge ideal of the complete 3-graph on n = 5 vertices provides a counterexample, where set(x3 x4 x5 ) = {1, 2}). We will use this new decomposition function c to encode the map of chain complexes ψ involved in the mapping cone construction. We first set up some further notation. For any generator m = xi1 xi2 · · · xid of I we decompose set(m) as set(m) = A1 ∪ A2 ∪ · · · ∪ Ad , 15 where A` = {j ∈ [n] : i`−1 < j < i` such that we have xi1 · · · xi`−1 xj xi`+1 · · · xid ∈ I}. Notation. Let α ⊂ set(m). For each 1 ≤ ` ≤ d, let s` denote the maximum element of α ∩ A` , and s0` denote the maximum element of α ∩ (A` \{s` }). Let T (α) = {s1 , . . . , sd }. Example 4.10. Consider again our running example I = hx1 x2 , x1 x3 , x1 x5 , x2 x3 , x2 x5 , x3 x5 , x4 x5 i. We see that for m = x2 x5 and α = set(x2 x5 ) = {1, 3}, we have T (α) = {1, 3}. On the other hand, for m = x3 x5 and α = set(x3 x5 ) = {1, 2}, we get T (α) = {2}. Remark 4.11. Let t, s ∈ A` for some ` and t > s. Then c(xs (xt m)) = c(xs m), since i`−1 < s < t < j` . Here we again employ the shorthand notation c(xs (xt m)) = c(xs c(xt m)). Remark 4.12. Note that (1) can be written as d X `=1 `−1 (−1) s X̀ (−1)j+|σ1 |+···+|σ`−1 | σ1 × σ2 × · · · × {σ`1 , σ`2 , . . . , σc `j , . . . , σ`k } × · · · × σd j=1 + d X (−1)`−1+|σ1 |+···+|σ` | σ1 × σ2 × · · · × σ` \ max(σ` ) × · · · × σd . `=1 |A` |>0 Recall from Lemma 4.8 that each σ1 × σ2 × · · · × σd corresponds to a symbol (m; α). The first summand above is taken over all elements of α and the second summand is over the indices of the elements of supp(m). The second summand can be also considered over the elements of T (α) since in case that |T (α) ∩ A` | > 0 we have that c(xs` m) = xs` m/xmax(σ` ) . Theorem 4.13. Let I = IH be the monomial edge ideal associated to a cointerval d-graph H, and F the graded minimal free resolution of R/I obtained from the homomorphism complex XH . Then F is realized as an iterated mapping cone, with the basis for each module Fi as above. The chain map d of F is given by X X xj i m (c(xji m); α \ ji ) d(m; α) = (−1)i xji (m; α \ ji ) + (−1)i−1 c(xji m) j ∈α ji ∈T (α) i if σ 6= ∅, where α = {j1 , . . . , jp } ⊂ set(m) with j1 < · · · < jp , and d(m, ∅) = m otherwise. Proof. We follow the strategy of the proof of Theorem 1.12 in [HT02]. Let I = IH be a cointerval interval ideal associated to the cointerval d-graph H, and let XH be its homomorphism complex. We show by induction on j that the complex F (j) has the desired boundary map. By definition F (j+1) is the mapping cone of ψ (j) : K (j) → F (j) so that F (j) is a subcomplex of F (j+1) and hence it is enough to check the formula on the basis elements (m, α). The definition of the mapping cone differential gives d(mj+1 ; α) = −dK (mj+1 ; α)+ψ (j) (mj+1 ; α), where dK is the differential of the relevant Koszul complex K (j) . Hence it is enough to show that we can define ψ (j) according to X xji mj+1 ψ (j) (mj+1 ; α) = (−1)i−1 (c(xji mj+1 ); α \ ji ), c(xji mj+1 ) ji ∈T (α) 16 x3x5 2 x2x5 1 x1x5 x1x5 x2x3 x1x3 x1x2 x1x3 x2x3 1 2 x1x3 x1x2 x4x5 x1x2 x1x5 2 3 x2x5 3 1 x3x5 3 x1x2 2 x1x5 1 x2x5 x1x3 x2x3 x1x5 x1x3 x2x3 x1x2 x1x3 x1x2 Figure 3. The resolution of I = hx1 x2 , x1 x3 , x1 x5 , x2 x3 , x2 x5 , x3 x5 , x4 x5 i built from an iterated mapping cone as a realization of the homomorphism complex. if α 6= ∅, and otherwise ψ (j) (mj+1 ; ∅) = mj+1 . For this we must verify that ψ (j) ◦ dK = d ◦ ψ (j) . To simplify notation we let m = mj+1 and ψ = ψj+1 . For t ∈ set(m) a singleton element we have ψ ◦ dK    (m; {t}) = ψ xt (m; ∅) = xt m, and on the other hand  xt m xt m (c(xt m); ∅) = c(xt m) = xt m. c(xt m) c(xt m) For larger subsets of set(m), next consider σ ⊂ set(m) with |σ| ≥ 2. In this case we have   d ◦ ψ (m; {t}) = d   X  ψ ◦ dk (m; α) = (−1)(α;t) xt ψ (m; α\t) t∈α (2) = X = X X (−1)(α;t) xt ( t∈α X (−1)(α\t;s) s∈T (α\t) (−1)(α;t)+(α\t;s) t∈α s∈T (α\t) 17 xs m (c(xs m); α\{s, t}) c(xs m) xt xs m (c(xs m); α\{s, t}). c(xs m) Here we use the notation (α; t) = |{s ∈ α : s < t}|. The other composition gives us X   xt m d ◦ ψ) (m; α) = (−1)(α;t) d (c(xt m); α\t) , c(xt m) (3) t∈T (α) where X  d (c(xt m); α\t) = (−1)(α\t;s) xs (c(xt m); α\{s, t}) s∈α\t X +  xs c(xt m) c(xs c(xt m)); α\{s, t} . c(xs c(xt m)) (−1)(α\t;s) s∈T (α\t) Therefore Equation 3 becomes X (4) (−1)(α;t) t∈T (α) X  xt m xs c(xt m) (−1)(α\t;s) c(xs c(xt m)); α\{t, s} c(xt m) c(xs c(xt m)) s∈T (α\{t}) X  xt m X + (−1)(α;t) (−1)(α\t;s) xs c(xt m); α\{t, s} . c(xt m) t∈T (α) s∈α\{t}  Now note that the first summand expressing d ◦ ψ) (m; α) in Equation (4) can be written X X  xs xt m c(xs c(xt m)); α\{t, s} , (−1)(α;t)+(α\t;s) c(xs c(xt m)) t∈T (α) s∈T (α\{t}) which can be expanded as d XX X `=1 t=s` (5) + (−1)(α;t)+(α\t;s) s=sk k6=` d XX X (−1)(α;t)+(α\t;s) `=1 t=s` s=s0`  xs xt m c(xs c(xt m)); α\{t, s} c(xs c(xt m))  xs xt m c(xs c(xt m)); α\{t, s} . c(xs c(xt m)) Exchanging the role of ` and k in the first summand of 5 shows that it is ‘zero’. The second summand of 4 can be written X X  xt xs m (−1)(α;t)+(α\t;s) c(xt m); α\{t, s} , c(xt m) t∈T (α) s∈α\{t} and after applying the observation from Remark 4.11 we obtain (6) d XX   X xs x t m d ◦ ψ) (m; α) = (−1)(α;t)+(α\t;s) c(xs m); α\{t, s} c(xs m) `=1 t=s` s=s0` X X  xt xs m + (−1)(α;t)+(α\t;s) c(xt m); α\{t, s} . c(xt m) t∈T (α) s∈α\{t} 18 Next we compare the indices appearing in the non-zero summands corresponding to Equa  tion 2 for ψ ◦ dk ) (m; α) and Equation 6 for d ◦ ψ) (m; α) , The indices appearing in the  non-zero summands of ψ ◦ dk ) (m; α) consist of [  [   (t, sk ) : t ∈ A` , ` 6= k (t, s` ) : t ∈ A` \s` (s` , s0` )}. Recall our notation, here sk denotes the maximum element of α ∩ Ak , and s0` denotes the maximum element of α ∩ A` \s` .  On the other hand the indices appearing in the non-zero summands of d ◦ ψ) (m; α) consist of [  [   (sk , j) : j ∈ A` , ` 6= k (s` , j) : j ∈ A` \s` . (s` , s0` ) Exchanging the roles of s and t completes the proof.  Remark 4.14. The cells that serve as basis elements of the free modules in the resolution constructed in Theorem 4.13 can also be obtained by gluing together the simplices ch(m, α, σ) corresponding to the different choices of permutations σ of α from the set A, where A = {σ = (σ1 , . . . , σp ) : if σi , σj ∈ A` for some ` and σi > σj then i < j}. For this we define the cell U (m, α) as the union over all permutations σ ∈ A of α. U (m, α) = [ ch(m, α, σ). σ∈A 4.2. Other regular decomposition functions. Describing all possible cellular realizations of the mapping cone resolution of an ideal I with linear quotients seems to be difficult (even for a fixed ordering of the generators). Perhaps a more manageable task would be to restrict to those cellular resolutions one obtains from regular decomposition functions. For an ideal I with linear quotients and a regular decomposition function, Herzog and Takayama in [HT02, Theorem 1.12] provide an explicit description of the differential map of the resolution of an ideal I obtained from an iterated mapping cone. One can check that the proof of the theorem (and the related lemmas) relies only on the regularity of the decomposition function b, and not the definition of b in terms of assigning a particular generator of I to every monomial. Similarly, our cellular realization in Theorem 3.10 only relies on the regularity property. Hence we can vary the decomposition function in each step and apply those results to obtain combinatorially distinct geometric complexes that support resolutions, as the next example illustrates. Example 4.15. Consider the ideal given by I = hx1 x2 , x1 x3 , x1 x5 , x2 x3 , x2 x5 , x3 x5 , x4 x5 i. One can check that I has linear quotients with respect to this ordering. We construct a resolution of I via the iterated mapping cone procedure, and by choosing different regular decomposition functions at each step we arrive at a family of combinatorially distinct complexes supporting the resolution. 19 45 45 35 35 25 23 15 13 12 35 25 23 15 23 15 13 13 12 45 35 15 12 25 45 35 23 13 12 45 25 45 35 25 15 23 13 12 25 15 23 13 12 Figure 4. The family of cellular resolutions obtained by considering all possible regular decompositions of the ideal I with linear quotient order (x1 x2 , x1 x3 , x1 x5 , x2 x3 , x2 x5 , x3 x5 , x4 x5 ). Here we use the notation ij to denote the variable xi xj . The first complex is the generalized EK resolution from Section 3 and the last is the homomorphism complex of Section 4. 4.3. Further questions - a space of resolutions? In each step of the mapping cone construction we have a choice of homomorphism of complexes ψ : G → F that lifts the map of R-modules R/(Ij−1 : fj ) → R/Ij−1 . As we have seen, this choice of homomorphism can be encoded in the cellular structure of the Koszul simplex that is glued onto the previously constructed resolution. After fixing a basis the collection of all such choices of bluings forms a finite set, but can we understand them as comprising some geometric object and hence obtain a ‘space of mapping cone resolutions’ ? We note that if I = hx1 , x2 , . . . , xn id is a power of the graded maximal ideal, a certain space of cellular resolutions of I is in fact described in [DJS12]. In this context a cellular resolution of I is obtained by a generic arrangement of tropical hyperplanes, which in turn corresponds to a regular triangulation of the product of simplices ∆n−1 × ∆d−1 . The collection of all regular triangulations of ∆n−1 × ∆d−1 (or any polytope) has a natural polyhedral structure known as a secondary polytope. A natural question arrises: if we fix the linear quotient order on the generators of an ideal I, what are the possible combinatorial types of complexes that we see as we attach a simplex in each step of the cellular mapping cone construction? How many different choices do we have to glue in the simplex? At one extreme sits the maximal ideal I = hx1 , x2 , . . . xn i, where 20 we have no choice but to build another simplex of one more dimension in each step. The space of resolutions in this case is a single point. As seen in [DJS12], already for the square of the maximal ideal in 4 variables we see distinct complexes arising. References [BBK12] Benjamin Braun, Jonathan Browder, and Steven Klee, Cellular resolutions of ideals defined by nondegenerate simplicial homomorphisms, Israel Journal of Mathematics (2012), 1–24. ↑4.6 [BK06] Eric Babson and Dmitry N. Kozlov, Complexes of graph homomorphisms, Israel Journal of Mathematics 152 (2006), no. 1, 285–312. ↑4.6 [BS98] Dave Bayer and Bernd Sturmfels, Cellular resolutions of monomial modules, J. Reine Angew. Math. 502 (1998), 123–140. MR1647559 (99g:13018) ↑1, 2.2 [BW02] Ekkehard Batzies and Volkmar Welker, Discrete Morse theory for cellular resolutions, J. Reine Angew. Math. 543 (2002), 147–168. MR1887881 (2003b:13017) ↑2.2 [CN09] Alberto Corso and Uwe Nagel, Monomial and toric ideals associated to Ferrers graphs, Transactions of the American Mathematical Society 361 (2009), no. 3, 1371–1395. ↑1, 2.2, 4.1 [DE12] Anton Dochtermann and Alexander Engström, Cellular resolutions of cointerval ideals, Mathematische Zeitschrift 270 (2012), no. 1-2, 145–163. ↑1, 2.2, 4.1, 4.1, 4.7 [DJS12] Anton Dochtermann, Michael Joswig, and Raman Sanyal, Tropical types and associated cellular resolutions, Journal of Algebra 356 (2012), no. 1, 304–324. ↑2.2, 4.3 [DK73] Gopal Danaraj and Victor Klee, Shellings of spheres and polytopes, DTIC Document, 1973. ↑3.2 [EHM11] Viviana Ene, Jürgen Herzog, and Fatemeh Mohammadi, Monomial ideals and toric rings of Hibi type arising from a finite poset, Eur. J. Comb. 32 (2011), no. 3, 404–421. ↑2.1 [EK90] Shalom Eliahou and Michel Kervaire, Minimal resolutions of some monomial ideals, J. Algebra 129 (1990), no. 1, 1–25. MR1037391 (91b:13019) ↑1, 2.1, 2.1 [EOS10] Viviana Ene, Anda Olteanu, and Loredana Sorrenti, Properties of lexsegment ideals, Osaka J. Math. 47 (2010), no. 1, 67–87. ↑2.1 [Goo13] Afshin Goodarzi, Cellular structure for the Herzog–Takayama Resolution, 2013. Preprint available at arXiv:1305.4302. ↑1 [HT02] Jürgen Herzog and Yukihide Takayama, Resolutions by mapping cones, Homology, Homotopy and Applications 4 (2002), no. 2, 277–294. ↑1, 2.1, 2.1, 2.1, 2.3, 2.1, 2.6, 2.1, 4.1, 4.1, 4.2 [Mer10] Jeffrey Mermin, The Eliahou-Kervaire resolution is cellular, Journal of Commutative Algebra 2 (2010), no. 1, 55–78. ↑1, 1, 2.2, 3 [MKM10] Fatemeh Mohammadi, Dariush Kiani, and Somayeh Moradi, On the Betti numbers of the edge ideals of some hypergraphs, Contributions to Algebra and Geometry 51 (2010), no. 2, 467–475. ↑4.1, 4.1, 4.1, 4.4 [NPS02] Isabella Novik, Alexander Postnikov, and Bernd Sturmfels, Syzygies of oriented matroids, Duke Math. J. 111 (2002), no. 2, 287–317. MR1882136 (2003b:13023) ↑2.2 [NR09] Uwe Nagel and Victor Reiner, Betti numbers of monomial ideals and shifted skew shapes, Electron. J. Combin 16 (2009), no. 2, 59. ↑1, 2.2, 4.1 [Sin08] Achilleas Sinefakopoulos, On Borel fixed ideals generated in one degree, Journal of Algebra 319 (2008), no. 7, 2739–2760. ↑1, 2.2, 4.1 [Tay66] Diana K. Taylor, Ideals generated by monomials in an R-sequence, Ph.D. thesis, University of Chicago, Department of Mathematics, 1966. ↑2.2 [Vel08] Mauricio Velasco, Minimal free resolutions that are not supported by a CW-complex, Journal of Algebra 319 (2008), no. 1, 102–114. ↑2.2 Department of Mathematics, University of Miami, USA E-mail address: [email protected] Institut für Mathematik, Universität Osnabrück, Germany E-mail address: [email protected] 21
0math.AC
MapReduce Algorithms for Inferring Gene Regulatory Networks from Time‐Series Microarray Data Using an Information‐Theoretic Approach Yasser Abduallah, Turki Turki, Kevin Byron, Zongxuan Du, Miguel Cervantes-Cervantes Jason T. L. Wang Computer Science Department, New Jersey Institute of Technology, Newark, NJ 07102, USA 1 Abstract Gene regulation is a series of processes that control gene expression and its extent. The connections among genes and their regulatory molecules, usually transcription factors, and a descriptive model of such connections, are known as gene regulatory networks (GRNs). Elucidating GRNs is crucial to understand the inner workings of the cell and the complexity of gene interactions. To date, numerous algorithms have been developed to infer gene regulatory networks. However, as the number of identified genes increases and the complexity of their interactions is uncovered, networks and their regulatory mechanisms become cumbersome to test. Furthermore, prodding through experimental results requires an enormous amount of computation, resulting in slow data processing. Therefore, new approaches are needed to expeditiously analyze copious amounts of experimental data resulting from cellular GRNs. To meet this need, cloud computing is promising as reported in the literature. Here we propose new MapReduce algorithms for inferring gene regulatory networks on a Hadoop cluster in a cloud environment. These algorithms employ an information-theoretic approach to infer GRNs using time-series microarray data. Experimental results show that our MapReduce program is much faster than an existing tool while achieving slightly better prediction accuracy than the existing tool. 2 1. Introduction Current biotechnology has allowed researchers in various fields to obtain immense amounts of experimental information, ranging from macromolecular sequences, gene expression data to proteomics and metabolomics. In addition to large-scale genomic information obtained through such methods as third generation DNA sequencing, newer technology, such as RNA-seq and ChIP-seq, has allowed researchers to fine tune the analysis of gene expression patterns [1-3]. More information on interactions between transcription factors and DNA, both qualitative and quantitative, is increasingly emerging from microarray data [4-6]. Although microarrays alone do not provide direct evidence of functional connections among genes, the attachment of transcription factors (TFs) and their binding sites (TFBSs), located at specific gene promoters, influences transcription and modulates RNA production from a particular gene, thus establishing a first level of functional interaction. Since the TFs are gene-encoded polypeptides and the target TFBSs belong to different genes, analyses of TFs-TFBSs interactions could reveal gene networks and may even contribute to elucidate unknown GRNs [7]. Besides contributing to infer and understand these interactions, determining GRNs also provides models of such connections [8]. GRNs could be the basis to infer more complex networks, encompassing gene, protein, and metabolic spaces, as well as the entangled and often overlooked signaling pathways that interconnect them [9-13]. The core GRN apparatus consists of the sum of cis-regulatory modular DNA sequence elements that interact with TFs. These sequences read and process information incoming from the cell, transducing it into the formation of gene products while modulating their abundance [14]. To make them easier to understand, GRN models must be genome-oriented and viewable at different levels, from global patterns of gene expression, down to cis-regulatory DNA and nucleotide sequences [15]. Interactions among genes are mediated by gene products such as DNA-binding proteins (including TFs) and miRNAs. The analyses of gene interactions can be difficult if time-series data are part of the experimental design [16]. Analysis of genes, gene products and metabolism (the Three Spaces of gene networks) would require additional computing resources. Among the previously ignored components of gene networking are miRNAs [17, 18]. In addition to their 3 importance as regulatory elements in gene expression, the capacity of miRNAs to be transported from cell to cell implicates them in a panoply of pathophysiological processes that include antiviral defense, tumorigenesis, lipometabolism and glucose metabolism [16]. This role in disease complicates our understanding of translational regulation via endogenous miRNAs. In addition, miRNAs seem to be present in different types of foods [19] with potential implications on human health and disease. Understanding the biogenesis, transport and mechanisms of action of miRNAs on their target RNA would result in possible therapies, requiring large amounts of computational power, which can be attained by cloud computing and process parallelizing. Detailed experimental analysis of several functional regulatory elements has revealed that they consist of dense clusters of unique, short DNA sequences specifically recognized by a range of TFs. Biochemically, protein-binding to these sequences controls the regulatory output of the clusters and, from an informational perspective, clustered specific target sites determine the type of regulatory outcome and the cellular functions that will be performed. GRNs are encoded in the DNA and can be thought of as a sequence-dependent regulatory genome, given that TFs recognize specific short DNA motifs. The small length of these motifs means that they will occur frequently but randomly within the enormity of the total genome of a particular organism [2022]. Therefore, to parse functional regulatory elements using bioinformatics requires the analysis of copious amounts of genomic data. Analyses of time-series data from microarrays can show the chronological expression of specific genes or groups of genes. These temporal patterns can be used to infer or propose causal relationships in gene regulation [23]. Thus, genes in logical networks can modulate the extent of each other’s gene expression over the life span of a cell or a whole organism. Time-series microarray data sheds light on a complex but measurable regulatory system, allowing for a more precise inference of gene interaction. Numerous algorithms have been developed for inferring GRNs [24-27]. In this paper, we present a new approach, tailored to cloud computing, to infer GRNs using time-series microarray data. Using time as a variable in the analysis of GRNs permits the study of changes in cellular phenotype, as opposed to a snapshot in a limited time frame that may reveal static interactions but not progression of gene expression phenomena. The time-series datasets used in this work 4 come from DREAM4 challenges [28-31] and an Affymetrix Yeast Genome 2.0 Array downloaded from NCBI’s Gene Expression Omnibus. The array contains 5,744 probe sets and includes 10,928 Saccharomyces cerevisiae genes with 49 time points and transcriptional oscillations of about 4 hours. These oscillations reveal cell redox states, which in turn result from changes in metabolic fluxes and cell cycle phases [32]. As knowledge in several biological fields leads to an ever-expanding accumulation in gene expression data, the main consideration in data processing is that analysis of information becomes increasingly time-consuming, thus creating a demand to speed up the analytical process. In order to obtain results more expeditiously, we develop information-theoretic algorithms using MapReduce that run on a distributed, multi-node Apache Hadoop cluster in a cloud environment. Cloud resources are increasingly more flexible and affordable compared with local traditional computing resources. Cloud computing advantages in the field of bioinformatics research are well known [33-39]. 2. Materials and Methods 2.1. Framework Previous information-theoretic algorithms for network inference were implemented in the R programming language using steady state data [40] and time-series data [23]. The tool using steady state data is named ARACNE [40] and the tool using time-series data is named TimeDelay-ARACNE [23]. ARACNE infers an undirected network, which basically shows whether two genes are mutually dependent rather than the regulatory relationship between the genes. In contrast, TimeDelay-ARACNE infers a directed network, in which an edge from gene A to gene B indicates that A regulates the expression of B. In contrast to the R-based ARACNE and TimeDelay-ARACNE, our proposed informationtheoretic framework is tailored to the MapReduce programming paradigm. Like TimeDelayARACNE [23], the input of our framework is a set of time-series gene expression data and the output is an inferred gene regulatory network. The input dataset contains m genes, and each gene has n expression values recorded at n different time points respectively. Our framework consists of three steps. Step 1 aims to detect, for each gene g, the first time point t ( t  1 ) at which a 5 substantial change in the gene expression of g with respect to the gene expression of g at time point 1 takes place. This t is referred to as the time point of Substantial Change of Expression (ScE) of gene g, denoted ScE ( g ). Step 2 calculates, for two genes g x and g y , the influence of g x on g y , denoted influence( g x , g y ), based on the ScE values of the genes. Step 3 determines the edges between genes using their influence values. Below we present details of the proposed framework. Step 1. Calculation of ScE Let g(t) be the expression value of gene g at time point t. We say g is activated (or induced) at time point t ( t  1 ) if g (t )   where   1 is a threshold. We say g is inhibited (or repressed) at g (1) time point t ( t  1 ) if g (t ) 1  . For each gene g, we maintain two sets of time points: g  (t ) and g (1)  g  (t ); g  (t ) contains all time points at which g is induced and g  (t ) contains all time points at which g is repressed. Initially, g  (t )   and g  (t )  . The two sets of time points are then updated as follows. For each time point t ( t  1 ), If 1   if g (t )     , then g (t )  g (t )  {t}, g (1) if g (t ) 1  , then g  (t )  g  (t )  {t}. g (1)  g (t )   , then g is neither induced nor repressed at time point t. In this case, we simply g (1) ignore this time point t without adding t to g  (t ) or g  (t). The value of  used in this study is set to 1.2. With this threshold value and datasets used in the study (DREAM4 [28-31]), there is a significant difference between the mean of the gene expression values of the time points at which g is induced and the mean of the gene expression values of the time points at which g is repressed according to Student’s t-test (p < 0.05). Let ScE ( g ) represent the first time point t ( t  1 ) at which g is either induced or repressed, i.e., ScE( g )  min{g  (t )  g  (t )} . 6 For any two genes ga and gb , there are three cases to be considered. Case 1: ScE ( ga )  ScE ( gb ). We send the ordered pair ( ga , gb ) and the expression values of the two genes to step 2. Case 2: ScE ( gb )  ScE ( ga ). We send the ordered pair ( gb , ga ) and the expression values of the two genes to step 2. Case 3: ScE ( ga )  ScE ( gb ). We send ga , gb with a tag indicating both of the ordered pairs ( ga , gb ) and ( gb , ga ) should be considered, together with their gene expression values. Step 2. Calculation of influence values For each pair of genes ( g x , g y ) received from step 1, we calculate the time-delayed mutual information [41] between the genes as follows: I k (k ) (gx , g y )   1 i  n  k p ( g ix , g iy k ) log i i k p(g x , g y i ) i k p(g x ) p(g y ) (1) where n is the total number of time points, p( g ix ) is the marginal distribution of g ix , and p( g ix , g iyk ) is the joint distribution of g ix and g iy k . (In our implementation, a hash table is used to calculate the joint distribution to save time and space.) The parameter k, 1  k  h, represents the length of delayed time and h is the maximum length of delayed time. (In the study presented here, h is set to 3.) The notation g ix denotes the gene expression of g x at time point i and g iy k is the gene expression of g y at time point i + k. Figure 1 illustrates how to calculate time-delayed mutual information. There are 21 time points in Figure 1. The length of delayed time is 2 (i.e., k = 2). Each rectangle represents the gene expression value obtained at some time point. Mutual 7 Figure 1: Illustration of how to calculate time-delayed mutual information. information of rectangles with the same color is computed. Then, the influence of g x on g y is calculated as follows: k (k ) influence ( g x , g y )  max { I ( g x , g y )} . 1 k  h (2) Referring to the three cases in step 1, for case 1, we calculate influence( ga , gb ), and send ( ga , gb ) and influence( ga , gb ) to step 3. For case 2, we calculate influence( gb , ga ), and send ( gb , ga ) and influence( gb , ga ) to step 3. For case 3, if influence( ga , gb )  influence( gb , ga ), then we send ( ga , gb ) and influence( ga , gb ) to step 3; otherwise we send ( gb , ga ) and influence( gb , ga ) to step 3. Step 3. Determination of edges between genes Let  be a threshold. For each pair ( g x , g y ) received from step 2, if influence( g x , g y )   then we create an edge from g x to g y indicating g x substantially influences g y or g x regulates the expression of gy , i.e., there is a predicted present edge from g x to g y . If influence( g x , g y )   then we do not create an edge from g x to gy , i.e., there is a predicted absent edge from g x to g y . With the predicted present and absent edges, we are able to infer or reconstruct a gene regulatory network. The value of  used in this study is set to 0.96. With this threshold value and datasets used in the study (DREAM4 [28-31]), there is a significant difference between the 8 mean of the influence values of the predicted present edges and the mean of the influence values of the predicted absent edges according to Student’s t-test (p < 0.05). 2.2. MapReduce Algorithms Figure 2 presents a high-level conceptual description of the Hadoop MapReduce implementation of our proposed framework. The system includes a driver, and one or more mappers and reducers. The driver takes the input from the user, including the locations of input and output files, as well as algorithm parameters and thresholds. The driver prepares a job with the required configuration, sends the job to Hadoop to start it, and calculates the time the job takes to complete. The mappers are user-defined programs (UDPs), which prepare data and perform calculations, if needed, and then send the processed data (key-value pairs) to the reducers. The reducers are also UDPs, which perform the final processing and write the results into the output file. Hadoop optimizes the number of mappers for a job. The user can control the number of reducers needed for completing the job. The Hadoop distributed file system (HDFS) is a global repository for storage of the input flat file (in plain text format) with gene expression data and the output file with an inferred gene regulatory network. Each gene has an identifier. (We use g x to represent both a gene and its identifier when the context is clear.) Each line in the input file contains a pair of genes and their expression values. Genes are sorted based on their identifiers. Each pair of genes g x , g y occurs in the input file only once; specifically, the gene pair in which the identifier of g x is less than the identifier of g y occurs in the input file. Suppose there are m genes. There are (m × m−1)/2 lines in the input file. We develop four MapReduce algorithms, named M0, M1, M2, and M3 respectively. These algorithms differ in which steps, as described in Section 2.1, are performed by mappers. Algorithm M0. In this algorithm, mappers perform zero steps. Reducers have to do steps 1, 2 and 3. In the key-value pairs transmitted between mappers and reducers, the key is a pair of genes, and the value contains the expression profiles of the genes. 9 Figure 2: Conceptual description of the Hadoop MapReduce implementation of our proposed algorithms. Algorithm M1. In this algorithm, mappers perform step 1. Reducers have to do steps 2 and 3. In the key-value pairs transmitted between mappers and reducers, the key is a pair of genes and the value contains the expression profiles of the genes. Part of the value is a tag indicating which case in step 1 applies to the pair of genes. Algorithm M2. In this algorithm, mappers have to do steps 1 and 2. Reducers perform step 3. In the key-value pairs transmitted between mappers and reducers, the key is an ordered pair of genes ( g x , g y ) and the value is influence( gx , g y ). Algorithm M3. In this algorithm, mappers have to do steps 1, 2 and 3. Reducers perform zero steps. In the key-value pairs transmitted between mappers and reducers, the key is the edge gx  g y and the value is the influence of g x on g y that exceeds the threshold  . 10 The time needed by mappers is bounded by O(m2 / M ) and the time needed by reducers is bounded by O(m2 / R), where m is the number of genes, M is the number of mappers and R is the number of reducers. Thus, the time complexity of our MapReduce algorithms is O(m2 / M ) + O(m2 / R) . Note that this is a very pessimistic upper bound since reducers often work in parallel with mappers, and hence the actual time needed by the algorithms is much less. Note also that, in practice, M > R, and hence the time complexity of our algorithms is bounded by O(m2 / R) . 3. Results and Discussion 3.1. Experimental Results The four algorithms described in Section 2.2 were implemented in MapReduce and Java on a Hadoop infrastructure (cloud), which is a virtual environment based on VMware Big Data Extensions (BDE). The infrastructure hardware cluster associated with BDE is comprised of two IBM iDataPlex dx360 M4 servers. Each dx360 M4 server is comprised of two Intel Xeon 2.7GHz E5-2680 (8 Core) CPUs for a total of 16 cores per server. With the enabling of hyperthreading, the number of logical processors is doubled to provide 32 logical processors per server. Each server has 128 GB RAM. The dataset used in the experiments was GSE30052 [32], downloaded from the Gene Expression Omnibus (GEO) at http://www.ncbi.nlm.nih.gov/geo/. This dataset was created using an Affymetrix Yeast Genome 2.0 Array containing 5,744 probe sets for S. cerevisiae gene expression analysis. The dataset contains 10,928 genes with 49 time points. The dataset is split into key-value pairs as described in Section 2.2 and the input file has (10,928 × 10,927)/2 lines, taking up 26.8 GB of disk space. Hadoop assigns 254 mappers to this dataset. The default value for the number of reducers is set to 20. We divided GSE30052 into smaller datasets that were subsets of GSE30052 with varying numbers of genes. Figure 3 compares the running times of the four MapReduce algorithms described in Section 2.2 for varying dataset sizes. It can be seen from the figure that all the four algorithms scale well when the dataset size becomes large (i.e., the number of genes increases). Algorithm M2 performs the best. This happens because with M2, the mappers, working in 11 Figure 3: Performance comparison of the four MapReduce algorithms. parallel, share some workload with the reducers, which perform a relatively smaller amount of computation while writing results into the output file. It is worth noting that M2 is better than M3, in which the mappers have to do all the computation. Algorithm M0 performs the worst. With M0, the reducers have to do all the calculations and become too busy to quickly complete the job. We then fixed the algorithm and used M2 in all subsequent experiments. Figure 4 shows running times of the M2 algorithm with 1, 20, and 100 reducers respectively. It can be seen that the optimal number of reducers is 20. With this configuration, the reducers work at their maximum limit. When there are too many (e.g., 100) reducers, the overhead is too large, and as a consequence the system is slowed down. On the other hand, when only one reducer is employed, the reducer is overloaded and the overall performance of the system degrades. Finally, we conducted experiments to compare the MapReduce implementation of the M2 algorithm running on the Hadoop cluster (denoted MRC), the MapReduce implementation of the M2 algorithm running on a standalone single-node server (denoted MRS), the Java implementation of the M2 algorithm running on a single-node server, and the R implementation 12 Figure 4: Effect of the number of reducers on the performance of the M2 algorithm. of the related time-delayed mutual information algorithm, TimeDelay-ARACNE [23]. In Figure 5, it can be seen that MRC is highly scalable and that it outperforms the other three programs. Notably, due to Hadoop’s overhead, MRS is even slower than the Java program. The R program is not scalable; its running time dramatically increases as the dataset becomes large. 3.2. Discussion Our information-theoretic algorithms for inferring gene regulatory networks are implemented in MapReduce and run on a Hadoop cluster. A tool that is closely related to our work is the TimeDelay-ARACNE program in R [23], which also infers gene regulatory networks from timeseries gene expression profiles using an information-theoretic approach. As shown in Figure 5, the TimeDelay-ARACNE program in R does not scale well whereas our MapReduce program is highly scalable when running on the Hadoop cluster. Furthermore, our MapReduce program differs from the TimeDelay-ARACNE R program in that our algorithm is deterministic whereas the R program is implemented based on a non-deterministic algorithm, specifically Markov random fields. For the same dataset and parameter values, the R program produces different results in different executions. In contrast, our MapReduce program always produces 13 Figure 5: Performance comparison of the MapReduce algorithm (M2) and related programs. the same result, in different executions, for the same dataset. To evaluate the accuracy of these programs, we adopted the five time-series gene expression datasets available in the DREAM4 100-gene in silico network inference challenge [28-31]. Each dataset contains 10 times series, where each time series has 21 time points, for 100 genes. Thus, in each time series, each gene has 21 gene expression values. Totally, there are 50 time series in the five datasets. Each time-series dataset is associated with a gold standard file, where the gold standard represents the ground truth of the network structure for the time-series data. Each edge in the gold standard represents a true regulatory relationship between two genes. Our experimental results showed that the average accuracy of TimeDelay-ARACNE on the five datasets is approximately 92.4%. The average accuracy of our deterministic algorithm (M2) is about 93.1%, which is slightly better than TimeDelay-ARACNE. It was observed that, in a dataset, when M2 is better than TimeDelay-ARACNE, it has a higher accuracy than TimeDelayARACNE for every execution of TimeDelay-ARACNE on the dataset. Furthermore, our MapReduce program (M2) takes, on average, 20 seconds to infer a gene regulatory network on a DREAM4 dataset while the average time used by the TimeDelay-ARACNE R program is 3,500 seconds. 14 We also tested on different values for the parameters  ,  , and the maximum length of delayed time, h, used in the proposed algorithms. Experimental results showed that the default values for these parameters (   1.2,   0.96, h  3 ) achieve the highest accuracy. When compared with other parameter values (e.g., the maximum length of delayed time h  6,   0.35 or   2 ), the accuracy achieved by the default parameter values is significantly higher than the accuracy achieved by the other parameter values according to Wilcoxon signed rank tests [42] (p < 0.05). 4. Conclusions We have presented four MapReduce algorithms for reconstructing gene regulatory networks from time-series microarray data using an information-theoretic approach. Our experimental results showed that the algorithm (M2) that uses mappers to perform a large portion of work and reducers to perform a relatively small amount of computation achieves the best performance. This M2 algorithm is faster than an algorithm in which the mappers have to do all the computation. Moreover, the M2 algorithm is much faster than another algorithm in which the reducers have to do all the computation and become too busy to quickly complete the job. When tested on DREAM4 datasets with 100 genes in each dataset, our MapReduce program (M2) is slightly better than a closely related R program (TimeDelay-ARACNE [23]) in terms of accuracy; furthermore, our MapReduce program is much faster than the existing R program. When tested on a big dataset (GSE30052 [32]) with 10,928 genes, our MapReduce program was found to be highly scalable whereas the R program was not (cf. Figure 5). It should be pointed out, however, that the comparison with the TimeDelay-ARACNE R program is not completely fair. Our MapReduce program is based on a parallel algorithm whereas the TimeDelayARACNE R program is based on a sequential algorithm. Further study would be needed to investigate parallel versions of the R program or a new TimeDelay-ARACNE R package that supports parallelization. The work presented here shows that distributing highly parallel tasks in a cloud environment achieves higher performance than running the tasks in a standalone or non-cloud environments. In general, cloud computing can provide the power to integrate the ever-increasing information about the Three Spaces of gene networks [8] as well as the multi-pronged signal transduction 15 pathways traversing these spaces. Comprehending systems biology and functional genomics could eventually contribute to a better grasp of organismal physiology. Thus, the cloud would provide computing power that is needed as the analysis of multilevel processes becomes more complicated. Cloud computing will enable genome-scale network inference as demonstrated in this study. Epigenetics [43] is an emerging aspect of gene regulation whose study would require enormous computing capacity. This type of posttranslational regulation cross-talk involves chemical modifications of DNA and histones in a process known as chromatin remodeling. The role of genetic and epigenetic networks in a variety of health conditions is now coming into view. For example, there are at least 450 different genes associated with intellectual disability and related cognitive disorders. Some of these genes are involved in synaptic plasticity and cell signaling whereas others are epigenetic genes involved in chromatin modifications [44]. Analysis of the interactions across these genes and networks, as well as finding new mutations, will require the development of highly expeditious bioinformatics tools to mine the anticipated high amounts of data. Genome-scale metabolic models are becoming essential in biomedical applications, and researchers are moving towards building such models [45]. MapReduce algorithms could become a powerful tool in the analyses of all aspects of gene networking in the Three Spaces paradigm. In general, cloud computing could facilitate the handling of the vast amounts of information (big data) that such analyses require. Acknowledgments The authors thank N. Patel and L. Zhong for useful conversations concerning gene network inference. 16 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Schadt, E.E., S. Turner, and A. Kasarskis, A window into third-generation sequencing. Hum Mol Genet, 2010. 19(R2): p. R227-40. Angelini, C. and V. Costa, Understanding gene regulatory mechanisms by integrating ChIP-seq and RNA-seq data: statistical solutions to biological problems. Front Cell Dev Biol, 2014. 2: p. 51. Qin, J., Y. Hu, F. Xu, H.K. Yalamanchili, and J. Wang, Inferring gene regulatory networks by integrating ChIP-seq/chip and transcriptome data via LASSO-type regularization methods. Methods, 2014. 67(3): p. 294-303. Brown, J.B. and S.E. Celniker, Lessons from modENCODE. Annu Rev Genomics Hum Genet, 2015. 16: p. 31-53. Filkov, V., S. Skiena, and J. Zhi, Analysis techniques for microarray time-series data. J Comput Biol, 2002. 9(2): p. 317-30. Zhu, F., L. Shi, J.D. Engel, and Y. Guan, Regulatory network inferred using expression data of small sample size: application and validation in erythroid system. Bioinformatics, 2015. 31(15): p. 2537-44. Werner, T., S.M. Dombrowski, C. Zgheib, F.A. Zouein, H.L. Keen, M. Kurdi, and G.W. Booz, Elucidating functional context within microarray data by integrated transcription factor-focused gene-interaction and regulatory network analysis. Eur Cytokine Netw, 2013. 24(2): p. 75-90. Brazhnik, P., A. de la Fuente, and P. Mendes, Gene networks: how to put the function in genomics. Trends Biotechnol, 2002. 20(11): p. 467-72. Ideker, T. and N.J. Krogan, Differential network biology. Mol Syst Biol, 2012. 8: p. 565. Margolin, A.A., K. Wang, W.K. Lim, M. Kustagi, I. Nemenman, and A. Califano, Reverse engineering cellular networks. Nat Protoc, 2006. 1(2): p. 662-71. Kibinge, N., N. Ono, M. Horie, T. Sato, T. Sugiura, M. Altaf-Ul-Amin, A. Saito, and S. Kanaya, Integrated pathway-based transcription regulation network mining and visualization based on gene expression profiles. J Biomed Inform, 2016. 61: p. 194-202. Altaf-Ul-Amin, M., F.M. Afendi, S.K. Kiboi, and S. Kanaya, Systems biology in the context of big data and networks. Biomed Res Int, 2014. 2014: p. 428570. Altaf-Ul-Amin, M., T. Katsuragi, T. Sato, and S. Kanaya, A glimpse to background and characteristics of major molecular biological networks. Biomed Res Int, 2015. 2015: p. 540297. Karlebach, G. and R. Shamir, Modelling and analysis of gene regulatory networks. Nat Rev Mol Cell Biol, 2008. 9(10): p. 770-80. Longabaugh, W.J., E.H. Davidson, and H. Bolouri, Visualization, documentation, analysis, and communication of large-scale gene regulatory networks. Biochim Biophys Acta, 2009. 1789(4): p. 363-74. Xu, L., B.F. Yang, and J. Ai, MicroRNA transport: a new way in cell communication. J Cell Physiol, 2013. 228(8): p. 1713-9. Chen, K. and N. Rajewsky, The evolution of gene regulation by transcription factors and microRNAs. Nat Rev Genet, 2007. 8(2): p. 93-103. 17 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. Zhong, L., J.T.L. Wang, D. Wen, V. Aris, P. Soteropoulos, and B.A. Shapiro, Effective classification of microRNA precursors using feature mining and AdaBoost algorithms. OMICS, 2013. 17(9): p. 486-93. Wagner, A.E., S. Piegholdt, M. Ferraro, K. Pallauf, and G. Rimbach, Food derived microRNAs. Food Funct, 2015. 6(3): p. 714-8. Longabaugh, W.J., E.H. Davidson, and H. Bolouri, Computational representation of developmental genetic regulatory networks. Dev Biol, 2005. 283(1): p. 1-16. Levine, M. and E.H. Davidson, Gene regulatory networks for development. Proc Natl Acad Sci U S A, 2005. 102(14): p. 4936-42. Davidson, E.H. and D.H. Erwin, Gene regulatory networks and the evolution of animal body plans. Science, 2006. 311(5762): p. 796-800. Zoppoli, P., S. Morganella, and M. Ceccarelli, TimeDelay-ARACNE: reverse engineering of gene networks from time-course data by an information theoretic approach. BMC Bioinformatics, 2010. 11: p. 154. Maetschke, S.R., P.B. Madhamshettiwar, M.J. Davis, and M.A. Ragan, Supervised, semisupervised and unsupervised inference of gene regulatory networks. Brief Bioinform, 2014. 15(2): p. 195-211. Marbach, D., R.J. Prill, T. Schaffter, C. Mattiussi, D. Floreano, and G. Stolovitzky, Revealing strengths and weaknesses of methods for gene network inference. Proc Natl Acad Sci U S A, 2010. 107(14): p. 6286-91. Patel, N. and J.T.L. Wang, Semi-supervised prediction of gene regulatory networks using machine learning algorithms. J Biosci, 2015. 40(4): p. 731-40. Turki, T. and J.T.L. Wang. A new approach to link prediction in gene regulatory networks. in Proceedings of the 16th International Conference on Intelligent Data Engineering and Automated Learning. 2015. Greenfield, A., A. Madar, H. Ostrer, and R. Bonneau, DREAM4: combining genetic and dynamic information to identify biological networks and dynamical models. PLoS One, 2010. 5(10): p. e13397. Marbach, D., T. Schaffter, C. Mattiussi, and D. Floreano, Generating realistic in silico gene networks for performance assessment of reverse engineering methods. J Comput Biol, 2009. 16(2): p. 229-39. Prill, R.J., D. Marbach, J. Saez-Rodriguez, P.K. Sorger, L.G. Alexopoulos, X. Xue, N.D. Clarke, G. Altan-Bonnet, and G. Stolovitzky, Towards a rigorous assessment of systems biology models: the DREAM3 challenges. PLoS One, 2010. 5(2): p. e9202. Schaffter, T., D. Marbach, and D. Floreano, GeneNetWeaver: in silico benchmark generation and performance profiling of network inference methods. Bioinformatics, 2011. 27(16): p. 2263-70. Chin, S.L., I.M. Marcus, R.R. Klevecz, and C.M. Li, Dynamics of oscillatory phenotypes in Saccharomyces cerevisiae reveal a network of genome-wide transcriptional oscillators. FEBS J, 2012. 279(6): p. 1119-30. Langmead, B., K.D. Hansen, and J.T. Leek, Cloud-scale RNA-sequencing differential expression analysis with Myrna. Genome Biol, 2010. 11(8): p. R83. Nguyen, T., W. Shi, and D. Ruden, CloudAligner: A fast and full-featured MapReduce based tool for sequence mapping. BMC Res Notes, 2011. 4: p. 171. 18 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. Schatz, M.C., CloudBurst: highly sensitive read mapping with MapReduce. Bioinformatics, 2009. 25(11): p. 1363-9. Zhao, S., K. Prenger, L. Smith, T. Messina, H. Fan, E. Jaeger, and S. Stephens, Rainbow: a tool for large-scale whole-genome sequencing data analysis using cloud computing. BMC Genomics, 2013. 14: p. 425. Mohammed, E.A., B.H. Far, and C. Naugler, Applications of the MapReduce programming framework to clinical big data analysis: current landscape and future trends. BioData Min, 2014. 7: p. 22. Zou, Q., X.B. Li, W.R. Jiang, Z.Y. Lin, G.L. Li, and K. Chen, Survey of MapReduce frame operation in bioinformatics. Brief Bioinform, 2014. 15(4): p. 637-47. O'Driscoll, A., V. Belogrudov, J. Carroll, K. Kropp, P. Walsh, P. Ghazal, and R.D. Sleator, HBLAST: Parallelised sequence similarity--A Hadoop MapReducable basic local alignment search tool. J Biomed Inform, 2015. 54: p. 58-64. Margolin, A.A., I. Nemenman, K. Basso, C. Wiggins, G. Stolovitzky, R. Dalla Favera, and A. Califano, ARACNE: an algorithm for the reconstruction of gene regulatory networks in a mammalian cellular context. BMC Bioinformatics, 2006. 7 Suppl 1: p. S7. Fraser, A.M. and H.L. Swinney, Independent coordinates for strange attractors from mutual information. Phys Rev A 1986. 33: p. 1134. Song, Y., L. Hua, B.A. Shapiro, and J.T.L. Wang, Effective alignment of RNA pseudoknot structures using partition function posterior log-odds scores. BMC Bioinformatics, 2015. 16: p. 39. Li, E., Chromatin modification and epigenetic reprogramming in mammalian development. Nat Rev Genet, 2002. 3(9): p. 662-73. van Bokhoven, H., Genetic and epigenetic networks in intellectual disabilities. Annu Rev Genet, 2011. 45: p. 81-104. Zhang, C., B. Ji, A. Mardinoglu, J. Nielsen, and Q. Hua, Logical transformation of genome-scale metabolic models for gene level applications and analysis. Bioinformatics, 2015. 31(14): p. 2324-31. 19
5cs.CE
arXiv:1706.08329v3 [cs.LO] 18 Dec 2017 Faculty of Computer Science Institute of Artificial Intelligence Knowledge Representation and Reasoning The Boolean Solution Problem from the Perspective of Predicate Logic – Extended Version – Christoph Wernhard KRR Report 17-01 Mail to Technische Universität Dresden 01062 Dresden Office Room 2006 Nöthnitzer Straße 46 01187 Dresden Internet http://www.wv.inf.tu-dresden.de The Boolean Solution Problem from the Perspective of Predicate Logic – Extended Version – Christoph Wernhard Technische Universität Dresden Abstract. Finding solution values for unknowns in Boolean equations was a principal reasoning mode in the Algebra of Logic of the 19th century. Schröder investigated it as Auflösungsproblem (solution problem). It is closely related to the modern notion of Boolean unification. Today it is commonly presented in an algebraic setting, but seems potentially useful also in knowledge representation based on predicate logic. We show that it can be modeled on the basis of first-order logic extended by secondorder quantification. A wealth of classical results transfers, foundations for algorithms unfold, and connections with second-order quantifier elimination and Craig interpolation show up. Although for first-order inputs the set of solutions is recursively enumerable, the development of constructive methods remains a challenge. We identify some cases that allow constructions, most of them based on Craig interpolation, and show a method to take vocabulary restrictions on solution components into account. Revision: December 18, 2017 2 TABLE OF CONTENTS Table of Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Notation and Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 2.2 Notational Conventions . . . . . . . . . . . . . . . . . . . . . . . Substitution with Terms and Formulas . . . . . . . . . . . . . . . 4 5 The Solution Problem from Different Angles . . . . . . . . . . . . . . . 6 3.1 3.2 3.3 3.4 . . . . 6 8 8 9 The Method of Successive Eliminations – Abstracted . . . . . . . . . . 10 3 4 4.1 4.2 4.3 4.4 Basic Formal Modeling . . . . . . . . . . . . . . View as Unification . . . . . . . . . . . . . . . . View as Construction of Elimination Witnesses View as Related to Definientia and Interpolants . . . . . . . . . . . . Reducing n-ary to 1-ary Solution Problems . . . . . Solving on the Basis of Second-Order Formulas . . . Solving with the Method of Successive Eliminations Solving by Inside-Out Witness Construction . . . . . . . . . 5.1 5.2 5.3 Conditions for the Existence of Solutions . . . . . . . . . . . . . . Characterization of SOL-Witnessed in Terms of ELIM-Witness . The Elimination Result as Precondition of Solution Existence . . 15 17 17 Reproductive Solutions as Most General Solutions . . . . . . . . . . . 18 6.1 6.2 6.3 6.4 . . . . 19 23 26 28 Approaching Constructive Solution Techniques . . . . . . . . . . . . . 29 7.1 7.2 7.3 7.4 Background: Craig Interpolation, Definability and Independence Cases Related to Definability and Interpolation . . . . . . . . . . The EHW-Combination of ELIM-Witnesses for Disjuncts . . . . Relational Monadic Formulas and Relaxed Substitutibility . . . . 30 31 32 34 Solutions in Restricted Vocabularies . . . . . . . . . . . . . . . . . . . 35 8.1 8.2 8.3 An Example: Synthesizing Definitional Equivalence . . . . . . . . Modeling with Two Consecutive Solution Problems . . . . . . . . Expressing a Vocabulary Restriction on all Unknowns . . . . . . 35 35 36 A Herbrand View on the Solution Problem . . . . . . . . . . . . . . . 36 10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7 8 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 . . . . . . . . . . . . Existence of Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . Parametric, General and Reproductive Solutions The Rigorous Solution . . . . . . . . . . . . . . . Schröder’s Reproductive Interpolant . . . . . . . From Unary to n-ary Reproductive Solutions . . . . . . . . . . 10 12 13 14 6 . . . . . . . . . . . . 5 . . . . . . . . . . . . . . . . . . . . Introduction 1 3 Introduction Finding solution values for unknowns in Boolean equations was a principal reasoning mode in the Algebra of Logic of the 19th century. Schröder [34] investigated it as Auflösungsproblem (solution problem). It is closely related to the modern notion of Boolean unification. For a given formula that contains unknowns formulas are sought such that after substituting the unknowns with them the given formula becomes valid or, dually, unsatisfiable. Of interest are also most general solutions, condensed representations of all solution substitutions. A central technique there is the method of successive eliminations, which traces back to Boole. Schröder investigated reproductive solutions as most general solutions, anticipating the concept of most general unifier. A comprehensive modern formalization based on this material, along with historic remarks, is presented by Rudeanu [30] in the framework of Boolean algebra. In automated reasoning variants of these techniques have been considered mainly in the late 80s and early 90s with the motivation to enrich Prolog and constraint processing by Boolean unification with respect to propositional formulas handled as terms [26,9,27,28,21,22]. An early implementation based on [30] has been also described in [37]. An implementation with BDDs of the algorithm from [9] is reported in [10]. The ΠP 2 -completeness of Boolean unification with constants was proven only later in [21,22] and seemingly independently in [2]. Schröder’s results were developed further by Löwenheim [24,25]. A generalization of Boole’s method beyond propositional logic to relational monadic formulas has been presented by Behmann in the early 1950s [6,7]. Recently the complexity of Boolean unification in a predicate logic setting has been investigated for some formula classes, in particular for quantifier-free first-order formulas [16]. A brief discussion of Boolean reasoning in comparison with predicate logic can be found in [8]. Here we remodel the solution problem formally along with basic classical results and some new generalizations in the framework of first-order logic extended by second-order quantification. The main thesis of this work is that it is possible and useful to apply second-order quantification consequently throughout the formalization. What otherwise would require meta-level notation is then expressed just with formulas. As will be shown, classical results can be reproduced in this framework in a way such that applicability beyond propositional logic, possible algorithmic variations, as well as connections with second-order quantifier elimination and Craig interpolation become visible. Of course, methods to solve Boolean equations on first-order formulas do not necessarily terminate. However, the set of solutions is recursively enumerable. By the modeling in predicate logic we try to pin down the essential points of divergence from propositional logic. Special cases that allow solution construction are identified, most of them related to definiens computation by Craig interpolation. In addition, a way to express a generalization of the solution problem where vocabulary restrictions are taken into account in terms of two related solution problems is shown. The envisaged application scenario is to let solving “solution problems”, or Boolean equation solving, on the basis of predicate logic join reasoning modes like second-order quantifier elimination (or “semantic forgetting”), Craig interpo- 4 Section 2 lation and abduction to support the mechanized reasoning about relationships between theories and the extraction or synthesis of subtheories with given properties. On the practical side, the aim is to relate it to reasoning techniques such as Craig interpolation on the basis of first-order provers, SAT and QBF solving, and second-order quantifier elimination based on resolution [19] and the Ackermann approach [15]. Numerous applications of Boolean equation solving in various fields are summarized in [31, Chap. 14]. Applications in automated theorem proving and proof compression are mentioned in [16, Sect. 7]. The prevention of certain redundancies has been described as application of (concept) unification in description logics [4]. Here the synthesis of definitional equivalences is sketched as an application. The rest of the paper is structured as follows: Notation, in particular for substitution in formulas, is introduced in Sect. 2. In Sect. 3 a formalization of the solution problem is presented and related to different points of view. Section 4 is concerned with abstract properties of and algorithmic approaches to solution problems with several unknowns. Conditions under which solutions exist are discussed in Sect. 5. Adaptions of classical material on reproductive solutions are given in Sect. 6. In Sect. 7 various techniques for solution construction in particular cases are discussed. The solution problem with vocabulary restrictions is discussed in Sect. 8. The solution problem is displayed in Sect. 9 as embedded in a setting with Skolemization and Herbrand expansion. Section 10 closes the paper with concluding remarks. The material in Sect. 2–5 has also been published as [40]. 2 2.1 Notation and Preliminaries Notational Conventions We consider formulas in first-order logic with equality extended by second-order quantification upon predicates. They are constructed from atoms (including equality atoms), constant operators >, ⊥, the unary operator ¬, binary operators ∧, ∨ and quantifiers ∀, ∃ with their usual meaning. Further binary operators →, ←, ↔, as well as n-ary versions of ∧ and ∨ can be understood as meta-level notation. The operators ∧ and ∨ bind stronger than →, ← and ↔. The scope of ¬, the quantifiers, and the n-ary connectives is the immediate subformula to the right. A subformula occurrence has in a given formula positive (negative) polarity if it is in the scope of an even (odd) number of negations. A vocabulary is a set of symbols, that is, predicate symbols (briefly predicates), function symbols (briefly functions) and individual symbols. (Individual symbols are not partitioned into variables and constants. Thus, an individual symbol is – like a predicate – considered as variable if and only if it is bound by a quantifier.) The arity of a predicate or function s is denoted by arity(s). The set of symbols that occur free in a formula F is denoted by free(F ). The property that no member of free(F ) is bound by a quantifier occurrence in F is expressed as CLEAN(F ). Symbols not present in the formulas and other items under discussion Notation and Preliminaries 5 are called fresh. The clean variant of a given formula F is the formula G obtained from F by successively replacing all bound symbols with fresh symbols such that CLEAN(G). The replacement is done in some way not specified here further such that each formula has a unique clean variant. We write F |= G for F entails G; |= F for F is valid ; and F ≡ G for F is equivalent to G, that is, F |= G and G |= F . We write sequences of symbols, of terms and of formulas by juxtaposition. Their length is assumed to be finite. The empty sequence is written . A sequence with length 1 is not distinguished from its sole member. In contexts where a set is expected, a sequence stands for the set of its members. Atoms are written in the form p(t), where t is a sequence of terms whose length is the arity of the predicate p. Atoms of the form p(), that is, with a nullary predicate p, are written also as p. For a sequence of fresh symbols we assume that its members are distinct. A sequence p1 . . . pn of predicates is said to match another sequence q1 . . . qm if and only if n = m and for all i ∈ {1, . . . , n} it holds that arity(pi ) = arity(qi ). If s = s1 . . . sn is a sequence of symbols, then ∀s stands for ∀s1 . . . ∀sn and ∃s for ∃s1 . . . ∃sn . If F = F1 . . . Fn is a sequence of formulas, then CLEAN(F ) states CLEAN(Fi ) Sn for all i ∈ {1, . . . , n}, and free(F ) = i=1 free(Fi ). If G = G1 . . . Gn is a second sequence of formulas, then F ≡ G stands for F1 ≡ G1 and . . . and Fn ≡ Gn . As explained below, in certain contexts the individual symbols in the set X = {xi | i ≥ 1} play a special role. For example in the following shorthands for a predicate p, a formula F and x = x1 . . . xarity(p) : p ⇔ F stands for ∀x (p(x) ↔ F ); p 6⇔ F for ¬(p ⇔ F ); p ⇒ F for ∀x (p(x) → F ); and p ⇐ F for ∀x (p(x) ← F ). 2.2 Substitution with Terms and Formulas To express systematic substitution of individual symbols and predicates concisely we use the following notation: – F (c) and F (t) – Notational Context for Substitution of Individual Symbols. Let c = c1 . . . cn be a sequence of distinct individual symbols. We write F as F (c) to declare that for a sequence t = t1 . . . tn of terms the expression F (t) denotes F with, for i ∈ {1, . . . , n}, all free occurrences of ci replaced by ti . – F [p], F [G] and F [q] – Notational Context for Substitution of Predicates. Let p = p1 . . . pn be a sequence of distinct predicates and let F be a formula. We write F as F [p] to declare the following: • For a sequence G = G1 (x1 . . . xarity(p1 ) ) . . . Gn (x1 . . . xarity(pn ) ) of formulas the expression F [G] denotes F with, for i ∈ {1, . . . , n}, each atom occurrence pi (t1 . . . tarity(pi ) ) where pi is free in F replaced by Gi (t1 . . . tarity(pi ) ). • For a sequence q = q1 . . . qn of predicates that matches p the expression F [q] denotes F with, for i ∈ {1, . . . , n}, each free occurrence of pi replaced by qi . • The above notation F [S], where S is a sequence of formulas or of predicates, is generalized to allow also pi at the ith position of S, for example F [G1 . . . Gi−1 pi . . . pn ]. The formula F [S] then denotes F with only those 6 Section 3 predicates pi with i ∈ {1, . . . , n} that are not present at the ith position in S replaced by the ith component of S as described above (in the example only p1 , . . . , pi−1 would be replaced). – F [p] – Notational Context for Substitution in a Sequence of Formulas. If F = F1 . . . Fn is a sequence of formulas, then F [p] declares that F [S], where S is a sequence with the same length as p, is to be understood as the sequence F1 [S] . . . Fn [S] with the meaning of the members as described above. In the above notation for substitution of predicates by formulas the members x1 , . . . , xarity(p) of X play a special role: F [G] can be alternatively considered as obtained by replacing predicates pi with λ-expressions λx1 . . . λxarity(pi ) .Gi followed by β-conversion. The shorthand p ⇔ F can be correspondingly considered as p ↔ λx1 . . . λxarity(p) .G. The following property substitutible specifies preconditions for meaningful simultaneous substitution of formulas for predicates: Definition 1 (SUBST(G, p, F ) – Substitutible Sequence of Formulas). A sequence G = G1 . . . Gm of formulas is called substitutible for a sequence p = p1 . . . pn of distinct predicates in a formula F , written SUBST(G, p, F ), if and only if m = n and for all i ∈ {1, . . . , n} it holds that (1.) No free occurrence of pi in F is in the scope of a quantifier occurrence that binds a member of free(Gi ); (2.) free(Gi ) ∩ p = ∅; and (3.) free(Gi ) ∩ {xj | j > arity(pi )} = ∅. The following propositions demonstrate the introduced notation for formula substitution. It is well known that terms can be “pulled out of” and “pushed in to” atoms, justified by the equivalences p(t1 . .W. tn ) ≡ ∃x1 . . . ∃xn (p(x1 . . . xn ) ∧ Vn n x i=1 i = ti ) ≡ ∀x1 . . . ∀xn (p(x1 . . . xn ) ∨ i=1 xi 6= ti ), which hold if no member of {x1 , . . . , xn } does occur in the terms t1 , . . . , tn . Analogously, substitutible subformulas can be “pulled out of” and “pushed in to” formulas: Proposition 2 (Pulling-Out and Pushing-In of Subformulas). Let G = G1 . . . Gn be a sequence of formulas, let p = p1 . . . pn be a sequence of distinct predicates and let F = F [p] be a formula such that SUBST(G, p, F ). Then Vn Wn (i) F [G] ≡ ∃p (F ∧ i=1 (pi ⇔ Gi )) ≡ ∀p (F ∨ i=1 (pi 6⇔ Gi )). (ii) ∀p F |= F [G] |= ∃p F. Ackermann’s Lemma [1] can be applied in certain cases to eliminate second-order quantifiers, that is, to compute for a given second-order formula an equivalent first-order formula. It plays an important role in many modern methods for elimination and semantic forgetting – see, e.g., [15,12,18,33,23,41]: Proposition 3 (Ackermann’s Lemma, Positive Version). Let F, G be formulas and let p be a predicate such that SUBST(G, p, F ), p ∈ / free(G) and all free occurrences of p in F have negative polarity. Then ∃p ((p ⇐ G) ∧ F [p]) ≡ F [G]. 3 3.1 The Solution Problem from Different Angles Basic Formal Modeling Our formal modeling of the Boolean solution problem is based on two concepts, solution problem and particular solution: The Solution Problem from Different Angles 7 Definition 4 (F [p] – Solution Problem (SP), Unary Solution Problem (1-SP)). A solution problem (SP) F [p] is a pair of a formula F and a sequence p of distinct predicates. The members of p are called the unknowns of the SP. The length of p is called the arity of the SP. A SP with arity 1 is also called unary solution problem (1-SP). The notation F [p] for solution problems establishes as a “side effect” a context for specifying substitutions of p in F by formulas as specified in Sect. 2.2. Definition 5 (Particular Solution). A particular solution (briefly solution) of a SP F [p] is defined as a sequence G of formulas such that SUBST(G, p, F ) and |= F [G]. The property SUBST(G, p, F ) in this definition implies that no member of p occurs free in a solution. Of course, particular solution can also be defined on the basis of unsatisfiability instead of validity, justified by the equivalence of |= F [G] and ¬F [G] |= ⊥. The variant based on validity has been chosen here because then the associated second-order quantifications are existential, matching the usual presentation of elimination techniques. Being a solution is aside of the substitutibility condition a semantic property, that is, applying to formulas modulo equivalence: If G is a solution of F [p], then all sequences H of formulas such that SUBST(H, p, F ) and G ≡ H (that is, if G = G1 . . . Gn and H = H1 . . . Hn , then Hi ≡ Gi holds for all i ∈ {1, . . . , n}) are also solutions of F [p]. Solution problem and solution as defined here provide abstractions of computational problems in a technical sense that would be suitable, e.g., for complexity analysis. Problems in the latter sense can be obtained by fixing involved formula and predicate classes. The abstract notions are adequate to develop much of the material on the “Boolean solution problem” shown here. On occasion, however, we consider restrictions, in particular to propositional and to first-order formulas, as well as to nullary predicates. As shown in Sect. 6, further variants of solution, general representations of several particular solutions, can be introduced on the basis of the notions defined here. Example 6 (A Solution Problem and its Particular Solutions). As an example of a solution problem consider F [p1 p2 ] where F = ∀x (a(x ) → b(x )) → (∀x (p1 (x ) → p2 (x )) ∧ ∀x (a(x ) → p2 (x )) ∧ ∀x (p2 (x ) → b(x ))). The intuition is that the antecedent ∀x (a(x ) → b(x )) specifies the “background theory”, and w.r.t. that theory the unknown p1 is “stronger” than the other unknown p2 , which, in addition, is “between” a and b. Examples of solutions are: a(x1 )a(x1 ); a(x1 )b(x1 ); ⊥a(x1 ); b(x1 )b(x1 ); and (a(x1 ) ∧ b(x1 ))(a(x1 ) ∨ b(x1 )). No solutions are for example b(x1 )a(x1 ); a(x1 )⊥; and all members of {>, ⊥} × {>, ⊥}. Assuming a countable vocabulary, the set of valid first-order formulas is recursively enumerable. It follows that for an n-ary SP F [p] where F is first-order the 8 Section 3 set of those of its particular solutions that are sequences of first-order formulas is also recursively enumerable: An n-ary sequence G of well-formed first-order formulas that satisfies the syntactic restriction SUBST(G, p, F ) is a solution of F [p] if and only if F [G] is valid. In the following subsections further views on the solution problem will be discussed: as unification or equation solving, as a special case of second-order quantifier elimination, and as related to determining definientia and interpolants. 3.2 View as Unification Because |= F [G] if and only if F [G] ≡ >, a particular solution of F [p] can be seen as a unifier of the two formulas F [p] and > modulo logical equivalence as equational theory. From the perspective of unification the two formulas appear as terms, the members of p play the role of variables and the other predicates play the role of constants. Vice versa, a unifier of two formulas can be seen as a particular solution, justified by the equivalence of L[G] ≡ R[G] and |= (L ↔ R)[G], which holds for sequences G and p of formulas and predicates, respectively, and formulas L = L[p], R = R[p], (L ↔ R) = (L ↔ R)[p] such that SUBST(G, p, L) and SUBST(G, p, R). This view of formula unification can be generalized to sets with a finite cardinality k of equivalences, since for all i ∈ {1, . . . , k} it holds Vk that Li ≡ Ri can be expressed as |= i=1 (Li ↔ Ri ). An exact correspondence between solving a solution problem F [p1 . . . pn ] where F is a propositional formula with ∨, ∧, ¬, ⊥, > as logic operators and E-unification with constants in the theory of Boolean algebra (with the mentioned logic operators as signature) applied to F =E > can be established: Unknowns p1 , . . . , pn correspond to variables and propositional atoms in F correspond to constants. A particular solution G1 . . . Gn corresponds to a unifier {p1 ← G1 , . . . , pn ← Gn } that is a ground substitution. The restriction to ground substitutions is due to the requirement that unknowns do not occur in solutions. General solutions Sect. 6 are expressed with further special parameter atoms, different from the unknowns. These correspond to fresh variables in unifiers. A generalization of Boolean unification to predicate logic with various specific problems characterized by the involved formula classes has been investigated in [16]. The material presented here is largely orthogonal to that work, but a technique from [16] has been adapted to more general cases in Sect. 7.3. 3.3 View as Construction of Elimination Witnesses Another view on the solution problem is related to eliminating second-order quantifiers by replacing the quantified predicates with “witness formulas”. Definition 7 (ELIM-Witness). Let p = p1 . . . pn be a sequence of distinct predicates. An ELIM-witness of p in a formula ∃p F [p] is defined as a sequence G of formulas such that SUBST(G, p, F ) and ∃p F [p] ≡ F [G]. The Solution Problem from Different Angles 9 The condition ∃p F [p] ≡ F [G] in this definition is equivalent to |= ¬F [p] ∨ F [G]. If F [p] and the considered G are first-order, then finding an ELIM-witness is second-order quantifier elimination on a first-order argument formula, restricted by the condition that the result is of the form F [G]. Differently from the general case of second-order quantifier elimination on first-order arguments, the set of formulas for which elimination succeeds and, for a given formula, the set of its elimination results, are then recursively enumerable. Some well-known elimination methods yield ELIM-witnesses, for example rewriting a formula that matches the left side of Ackermann’s Lemma (Prop. 3) with its right side, which becomes evident when considering that the right side F [G] is equivalent to ∀x1 . . . ∀xarity(p) (G ← G) ∧ F [G]. Finding particular solutions and finding ELIM-witnesses can be expressed in terms of each other: Proposition 8 (Solutions and ELIM-Witnesses). Let F [p] be a SP and let G be a sequence of formulas. Then: (i) G is an ELIM-witness of p in ∃p F if and only if G is a solution of the SP (¬F [q] ∨ F )[p], where q is a sequence of fresh predicates matching p. (ii) G is a solution of F [p] if and only if G is an ELIM-witness of p in ∃p F and it holds that |= ∃p F . Proof (Sketch). Assume SUBST(G, p, F ). (8.i) Follows since ∃p F [p] ≡ F [G] iff ∃p F [p] |= F [G] iff F [p] |= F [G] iff |= ¬F [q] ∨ F [G]. (8.ii) Left-To-Right: Follows since |= F [G] implies |= ∃p F [p] and |= F [G], which implies ∃p F [p] ≡ > ≡ F [G]. Right-to-left: Follows since ∃p F [p] ≡ F [G] and |= ∃p F [p] together imply |= F [G]. t u 3.4 View as Related to Definientia and Interpolants The following proposition shows a further view on the solution problem that relates it to definitions of the unknown predicates: Proposition 9 (Solution as Entailed by a Definition). A sequence G = G1 . . . Gn of formulas is a particular solution of a SP F [p = p1 . . . pn ] if and Vn only if SUBST(G, p, F ) and i=1 (pi ⇔ Gi ) |= F . Proof. Follows from the definition of particular solution and Prop. 2.i. t u In the special case where F [p] is a 1-SP with a nullary unknown p, the characterization of a solution G according to Prop. 9 can be expressed with an entailment where a definition of the unknown p appears on the right instead of the left side: If p is nullary, then ¬(p ⇔ G) ≡ p ⇔ ¬G. Thus, the statement p ⇔ G |= F is for nullary p equivalent to ¬F |= p ⇔ ¬G. (i) The second condition of the characterization of solution according to Prop. 9, that is, SUBST(G, p, F ), holds if it is assumed that p is not in free(G), that free(G) ⊆ free(F ) and that no member of free(F ) is bound by a quantifier occurrence in F . A solution is then characterized as negated definiens of p in the 10 Section 4 negation of F . Another way to express (i) along with the condition that G is semantically independent from p is as follows: ∃p (¬F ∧ ¬p) |= G |= ¬∃p (¬F ∧ p). (ii) The second-order quantifiers upon the nullary p can be eliminated, yielding the following equivalent statement: ¬F [⊥] |= G |= F [>]. (iii) Solutions G then appear as the formulas in a range, between ¬F [⊥] and F [>]. This view is reflected in [30, Thm. 2.2], which goes back to work by Schröder. If F is first-order, then Craig interpolation can be applied to compute formulas G that also meet the requirements free(G) ⊆ free(F ) and p ∈ / free(F ) to ensure SUBST(G, p, F ). Further connections to Craig interpolation are discussed in Sect. 7. 4 The Method of Successive Eliminations – Abstracted 4.1 Reducing n-ary to 1-ary Solution Problems The method of successive eliminations to solve an n-ary solution problem by reducing it to unary solution problems is attributed to Boole and has been formally described in a modern algebraic setting in [30, Chapter 2, § 4]. It has been rediscovered in the context of Boolean unification in the late 1980s, notably with [9]. Rudeanu notes in [30, p. 72] that variants described by several authors in the 19th century are discussed by Schröder [34, vol. 1, §§ 26,27]. To research and compare all variants up to now seems to be a major undertaking on its own. Our aim is here to provide a foundation to derive and analyze related methods. The following proposition formally states the core property underlying the method in a way that, compared to the Boolean algebra version in [30, Chapter 2, § 4], is more abstract in several aspects: Second-order quantification upon predicates that represent unknowns plays the role of meta-level shorthands that encode expansions; no commitment to a particular formula class is made, thus the proposition applies to second-order formulas with first-order and propositional formulas as special cases; it is not specified how solutions of the arising unary solution problems are constructed; and it is not specified how intermediate second-order formulas (that occur also for inputs without second-order quantifiers) are handled. The algorithm descriptions in the following subsections show different possibilities to instantiate these abstracted aspects. Proposition 10 (Characterization of Solution Underlying the Method of Successive Eliminations). Let F [p = p1 . . . pn ] be a SP and let G = G1 . . . Gn be a sequence of formulas. Then the following statements are equivalent: (a) G is a solution of F [p]. The Method of Successive Eliminations – Abstracted 11 (b) For i ∈ {1, . . . , n}: Gi is a solution of the 1-SP (∃pi+1 . . . ∃pn F [G1 . . . Gi−1 pi . . . pn ])[pi ] such that free(Gi ) ∩ p = ∅. Proof. Left-to-right: From (a) it follows that |= F [G]. Hence, for all i ∈ {1, . . . , n} by Prop. 2.ii it follows that |= ∃pi+1 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ]. From (a) it also follows that SUBST(G, p, F ). This implies that for all i ∈ {1, . . . , n} it holds that SUBST(Gi , pi , ∃pi+1 . . . ∃pn F [G1 . . . Gi−1 pi . . . pn ]) and free(Gi ) ∩ p = ∅. We thus have derived for all i ∈ {1, . . . , n} the two properties that characterize Gi as a solution of the 1-SP as stated in (b). Right-to-left: From (b) it follows that Gn is a solution of the 1-SP (F [G1 . . . Gn−1 pn ])[pn ]. Hence, by the characteristics of solution it follows that |= F [G1 . . . Gn ]. The property SUBST(G, p, F ) can be derived from free(G)∩p = ∅ and the fact that for all i ∈ {1, . . . , n} it holds that SUBST(Gi , pi , (∃pi+1 . . . ∃pn F [G1 . . . Gi−1 pi . . . pn ])). The properties |= F [G1 . . . Gn ] and SUBST(G, p, F ) characterize G as a solution of the SP F [p]. t u This proposition states an equivalence between the solutions of an n-ary SP and the solutions of n 1-SPs. These 1-SPs are on formulas with an existential second-order prefix. The following gives an example of this decomposition: Example 11 (Reducing an n-ary Solution Problem to Unary Solution Problems). Consider the SP F [p1 p2 ] of Examp. 6. The 1-SP with unknown p1 according to Prop. 10 is (∃p2 F [p1 p2 ])[p1 ], whose formula is, by second-order quantifier elimination, equivalent to ∀x (a(x ) → b(x )) → ∀x (p1 (x ) → b(x )). Take a(x1 ) as solution G1 of that 1-SP. The 1-SP with unknown p2 according to Prop. 10 is (F [G1 p2 ])[p2 ]. Its formula is then, by replacing p1 in F as specified in Examp. 6 with a and removing the duplicate conjunct obtained then, equivalent to ∀x (a(x ) → b(x )) → (∀x (a(x ) → p2 (x )) ∧ ∀x (p2 (x ) → b(x ))). A solution of that second 1-SP is, for example, b(x1 ), yielding the pair a(x1 )b(x1 ) as solution of the originally considered SP F [p1 p2 ]. 12 4.2 Section 4 Solving on the Basis of Second-Order Formulas The following algorithm to compute particular solutions is an immediate transfer of Prop. 10. Actually, it is more an “algorithm template”, since it is parameterized with a method to compute 1-SPs and covers a nondeterministic as well as a deterministic variant: Algorithm 12 (SOLVE-ON-SECOND-ORDER). Let F be a class of formulas and let 1 -SOLVE be a nondeterministic or a deterministic algorithm that outputs for 1-SPs of the form (∃p1 . . . ∃pn F [p])[p] with F ∈ F solutions G such that free(G) ∩ {p1 , . . . , pn } = ∅ and F [G] ∈ F. Input: A SP F [p1 . . . pn ], where F ∈ F, that has a solution. Method: For i := 1 to n do: Assign to Gi an output of 1 -SOLVE applied to the 1-SP (∃pi+1 . . . ∃pn F [G1 . . . Gi−1 pi . . . pn ])[pi ]. Output: The sequence G1 . . . Gn of formulas, which is a particular solution of F [p1 . . . pn ]. The solution components Gi are successively assigned to some solution of the 1-SP given in Prop. 10, on the basis of the previously assigned components G1 . . . Gi−1 . Even if the formula F of the input problem does not involve secondorder quantification, these 1-SPs are on second-order formulas with an existential prefix ∃pi+1 . . . ∃pn upon the yet “unprocessed” unknowns. The algorithm comes in a nondeterministic and a deterministic variant, just depending on whether 1 -SOLVE is instantiated by a nondeterministic or a deterministic algorithm. Thus, in the nondeterministic variant the nondeterminism of 1 -SOLVE is the only source of nondeterminism. With Prop. 10 it can be verified that if a nondeterministic 1 -SOLVE is “complete” in the sense that for each solution there is an execution path that leads to the output of that solution, then also SOLVE-ON-SECOND-ORDER based on it enjoys that property, with respect to the n-ary solutions G1 . . . Gn . For the deterministic variant, from Prop. 10 it follows that if 1 -SOLVE is “complete” in the sense that it outputs some solution whenever a solution exists, then, given that F [p1 . . . pn ] has a solution, which is ensured by the specification of the input, also SOLVE-ON-SECOND-ORDER outputs some solution G1 . . . Gn . This method applies 1 -SOLVE to existential second-order formulas, which prompts some issues for future research: As indicated in Sect. 3.4 (and elaborated in Sect. 7) Craig interpolation can in certain cases be applied to compute solutions of 1-SPs. Can QBF solvers, perhaps those that encode QBF into predicate logic [35], be utilized to compute Craig interpolants? Can it be useful to allow second-order quantifiers in solution formulas because they make these smaller and can be passed between different calls to 1 -SOLVE ? As shown in Sect. 6, if 1 -SOLVE is a method that outputs so-called reproductive solutions, that is, most general solutions that represent all particular solutions, then also SOLVE-ON-SECOND-ORDER outputs reproductive solutions. Thus, there are two ways to obtain representations of all particular solutions whose comparison might be potentially interesting: A deterministic method that The Method of Successive Eliminations – Abstracted 13 outputs a single reproductive solution and the nondeterministic method with an execution path to each particular solution. 4.3 Solving with the Method of Successive Eliminations The method of successive eliminations in a narrower sense is applied in a Boolean algebra setting that corresponds to propositional logic and outputs reproductive solutions. The consideration of reproductive solutions belongs to the classical material on Boolean reasoning [34,25,30] and is modeled in the present framework in Sect. 6. Compared to SOLVE-ON-SECOND-ORDER, the method handles the second-order quantification by eliminating quantifiers one-by-one, inside-out, with a specific method and applies a specific method to solve 1-SPs, which actually yields reproductive solutions. These incorporated methods apply to propositional input formulas (and to first-order input formulas if the unknowns are nullary). Second-order quantifiers are eliminated by rewriting with the equivalence ∃p F [p] ≡ F [>] ∨ F [⊥]. As solution of an 1-SP F [p] the formula (¬F [⊥] ∧ t) ∨ (F [>] ∧ ¬t) is taken, where t is a fresh nullary predicate that is considered specially. The intuition is that particular solutions are obtained by replacing t with arbitrary formulas in which p does not occur (see Sect. 6 for a more in-depth discussion). The following algorithm is an iterative presentation of the method of successive eliminations, also called Boole’s method, in the variant due to [9]. The presentation in [28, Sect. 3.1], where apparently minor corrections compared to [9] have been made, has been taken here as technical basis. We stay in the validity-based setting, whereas [30,9,28] use the unsatisfiability-based setting. Also differently from [9,28] we do not make use of the xor operator. Algorithm 13 (SOLVE-SUCC-ELIM). Input: A SP F [p1 . . . pn ], where F is propositional, that has a solution and a sequence t1 . . . tn of fresh nullary predicates. Method: 1. Initialize Fn [p1 . . . pn ] with F . 2. For i := n to 1 do: Assign to Fi−1 [p1 . . . pi−1 ] the formula Fi [p1 . . . pi−1 >] ∨ Fi [p1 . . . pi−1 ⊥]. 3. For i := 1 to n do: Assign to Gi the formula (¬Fi [G1 . . . Gi−1 ⊥] ∧ ti ) ∨ (Fi [G1 . . . Gi−1 >] ∧ ¬ti ). Output: The sequence G1 . . . Gn of formulas, which is a reproductive solution of F [p1 . . . pn ] with respect to the special predicates t1 . . . tn . The formula assigned to Fi−1 in step (2.) is the result of eliminating ∃pi in ∃pi Fi [p1 . . . pi ] and the formula assigned to Gi in step (3.) is the reproductive solution of the 1-SP (Fi [G1 . . . Gi−1 pi ])[pi ], obtained with the respective incorporated methods indicated above. The recursion in the presentations of [9,28] is translated here into two iterations that proceed in opposite directions: First, 14 Section 4 existential quantifiers of ∃p1 . . . ∃pn F are eliminated inside-out and the intermediate results, which do not involve second-order quantifiers, are stored. Solutions of 1-SPs are computed in the second phase on the basis of the stored formulas. In this presentation it is easy to identify two “hooks” where it is possible to plug-in alternate methods that produce other outputs or apply to further formula classes: In step (2.) the elimination method and in step (3.) the method to determine solutions of 1-SPs. If the plugged-in method to compute 1-SPs outputs particular solutions, then SOLVE-SUCC-ELIM computes particular instead of reproductive solutions. 4.4 Solving by Inside-Out Witness Construction Like SOLVE-SUCC-ELIM, the following algorithm eliminates second-order quantifiers one-by-one, inside-out, avoiding intermediate formulas with existential second-order prefixes of length greater than 1, which arise with SOLVE-ONSECOND-ORDER. In contrast to SOLVE-SUCC-ELIM, it performs elimination by the computation of ELIM-witnesses. Algorithm 14 (SOLVE-BY-WITNESSES). Let F be a class of formulas and ELIM -WITNESS be an algorithm that computes for formulas F ∈ F and predicates p an ELIM-witness G of p in ∃p F [p] such that F [G] ∈ F. Input: A SP F [p1 . . . pn ], where F ∈ F, that has a solution. Method: For i := n to 1 do: 1. Assign to Gi [p1 . . . pi−1 ] the output of ELIM -WITNESS applied to ∃pi F [p1 . . . pi Gi+1 . . . Gn ]. 2. For j := n to i+1 do: Re-assign to Gj [p1 . . . pi−1 ] the formula Gj [p1 . . . pi−1 Gi ]. Output: : The sequence G1 . . . Gn of formulas, which provides a particular solution of F [p1 . . . pn ]. Step (2.) in the algorithm expresses that a new value is assigned to Gj and that Gj can be designated by Gj [p1 . . . pi−1 ], justified because the new value does not contain free occurrences of pi , . . . , pn . In step (1.) the respective current values of Gi+1 . . . Gn are used to instantiate F . It is not hard to see from the specification of the algorithm that for input F [p] and output G it holds that ∃p F ≡ F [G] and that SUBST(G, p, F ). By Prop. 8.ii, G is then a solution if |= ∃p F . This holds indeed if F [p] has a solution, as shown below with Prop. 15. If ELIM -WITNESS is “complete” in the sense that it computes an elimination witness for all input formulas in F, then SOLVE-BY-WITNESSES outputs a solution. Whether all solutions of the input SP can be obtained as outputs for different execution paths of a nondeterministic version of SOLVE-BY-WITNESSES obtained through a nondeterministic ELIM -WITNESS , in analogy to the nondeterministic variant of SOLVE-ON-SECOND-ORDER, appears to be an open problem. 15 Existence of Solutions 5 5.1 Existence of Solutions Conditions for the Existence of Solutions We now turn to the question under which conditions there exists a solution of a given SP, or, in the terminology of [30], the SP is consistent. A necessary condition is easy to see: Proposition 15 (Necessary Condition for the Existence of a Solution). If a SP F [p] has a solution, then it holds that |= ∃p F . Proof. Follows from the definition of particular solution and Prop. 2.ii. t u Under certain presumptions that hold for propositional logic this condition is also sufficient. To express these abstractly we use the following concept: Definition 16 (SOL-Witnessed Formula Class). A formula class F is called SOL-witnessed for a predicate class P if and only if for all p ∈ P and F [p] ∈ F the following statements are equivalent: (a) |= ∃p F . (b) There exists a solution G of the 1-SP F [p] such that F [G] ∈ F. Since the right-to-left direction of that equivalence holds in general, the leftto-right direction alone would provide an alternate characterization. The class of propositional formulas is SOL-witnessed (for the class of nullary predicates). This follows since in propositional logic it holds that ∃p F [p] ≡ F [F [>]], (iv) which can be derived in the following steps: F [F [>]] ≡ ∃p (F [p]∧(p ↔ F [>])) ≡ (F [>] ∧ (> ↔ F [>])) ∨ (F [⊥] ∧ (⊥ ↔ F [>])) ≡ F [>] ∨ F [⊥] ≡ ∃p F [p]. The following definition adds closedness under existential second-order quantification and dropping of void second-order quantification to the notion of SOLwitnessed, to allow the application on 1-SPs matching with item (b) in Prop. 10: Definition 17 (MSE-SOL-Witnessed Formula Class). A formula class F is called MSE-SOL-witnessed for a predicate class P if and only if it is SOLwitnessed for P, for all predicates in p ∈ P and F ∈ F it holds that ∃p F ∈ F, and, if ∃p F ∈ F and p ∈ / free(F ), then F ∈ F. The class of existential QBFs (formulas of the form ∃p F where F is propositional) is MSE-SOL-witnessed (like the more general class of QBFs – secondorder formulas with only nullary predicates). Another example is the class of first-order formulas extended by second-order quantification upon nullary predicates, which is MSE-SOL-witnessed for the class of nullary predicates. The following proposition can be seen as expressing an invariant of the method of successive eliminations that holds for formulas in an MSE-SOL-witnessed class: 16 Section 5 Proposition 18 (Solution Existence Lemma). Let F be a formula class that is MSE-SOL-witnessed for predicate class P. Let F [p = p1 . . . pn ] ∈ F with p ∈ P n . If |= ∃p F [p], then for all i ∈ {0, . . . , n} there exists a sequence G1 . . . Gi of formulas such that free(G1 . . . Gi ) ∩ p = ∅, SUBST(G1 . . . Gi , p1 . . . pi , F ), |= ∃pi+1 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ] and ∃pi+1 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ] ∈ F. Proof. By induction on the length i of the sequence G1 . . . Gi . The conclusion of the proposition holds for the base case i = 0: The statement SUBST(, , F ) holds trivially, |= ∃p F is given as precondition, and ∃p F ∈ F follows from F ∈ F. For the induction step, assume that the conclusion of the proposition holds for some i ∈ {0, . . . n − 1}. That is, there exists a sequence G1 . . . Gi of formulas such that free(G1 . . . Gi ) ∩ p = ∅, SUBST(G1 . . . Gi , p1 . . . pi , F ), |= ∃pi+1 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ] and ∃pi+1 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ] ∈ F. Since F is MSE-SOL-witnessed for P and p1 , . . . , pi ∈ P it follows that there exists a solution Gi+1 of the 1-SP (∃p1 . . . ∃pi ∃pi+2 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ])[pi+1 ] such that ∃p1 . . . ∃pi ∃pi+2 . . . ∃pn F [G1 . . . Gi+1 pi+2 . . . pn ] ∈ F. From the characteristics of solution it follows that SUBST(Gi+1 , pi+1 , ∃p1 . . . ∃pi ∃pi+2 . . . ∃pn F [G1 . . . Gi pi+1 . . . pn ]), which implies (since all members of p with exception of pi+1 are in the quantifier prefix of the problem formula) that free(Gi+1 ) ∩ p = ∅, hence free(G1 . . . Gi+1 ) ∩ p = ∅. Given the induction hypothesis SUBST(G1 . . . Gi , p1 . . . pi , F ), it also implies SUBST(G1 . . . Gi+1 , p1 . . . pi+1 , F ). From the characteristics of solution it follows in addition that |= ∃p1 . . . ∃pi ∃pi+2 . . . ∃pn F [G1 . . . Gi+1 pi+2 . . . pn ], which, since free(G1 . . . Gi+1 ) ∩ p = ∅, is equivalent to |= ∃pi+2 . . . ∃pn F [G1 . . . Gi+1 pi+2 . . . pn ]. Finally, we conclude from ∃p1 . . . ∃pi ∃pi+2 . . . ∃pn F [G1 . . . Gi+1 pi+2 . . . pn ] ∈ F, established above, and the definition of MSE-SOL-witnessed that ∃pi+2 . . . ∃pn F [G1 . . . Gi+1 pi+2 . . . pn ] ∈ F, which completes the proof of the induction step. t u A sufficient and necessary condition for the existence of a solution of formulas in MSE-SOL-witnessed classes now follows from Prop. 18 and Prop. 15: Existence of Solutions 17 Proposition 19 (Existence of a Solution). Let F be a formula class that is MSE-SOL-witnessed on predicate class P. Then for all F [p] ∈ F where the members of p are in P the following statements are equivalent: (a) |= ∃p F . (b) There exists a solution G of the SP F [p] such that F [G] ∈ F. Proof. Follows from Prop. 18 and Prop. 15. t u From that proposition it is easy to see that for SPs with propositional formulas the complexity of determining the existence of a solution is the same as the complexity of deciding validity of existential QBFs, as proven in [21,22,2], that is, ΠP 2 -completeness: By Prop. 19, a SP F [p] where F is propositional has a solution if and only if the existential QBF ∃p F [p] is valid and, vice versa, an arbitrary existential QBF ∃p F [p] (where F is quantifier-free) is valid if and only if the SP F [p] has a solution. 5.2 Characterization of SOL-Witnessed in Terms of ELIM-Witness The following proposition shows that under a minor syntactic precondition on formula classes, SOL-witnessed can also be characterized in terms of ELIMwitness instead of solution as in Def. 16: Proposition 20 (SOL-Witnessed in Terms of ELIM-Witness). Let F be a class of formulas that satisfies the following properties: For all F [p] ∈ F and predicates q with the same arity of p it holds that F [p] ∨ ¬F [q] ∈ F, and for all F ∨ G ∈ F it holds that F ∈ F. The class F is SOL-witnessed for a predicate class P if and only if for all p ∈ P and F [p] ∈ F there exists an ELIM-witness G of p in F [p] such that F [G] ∈ F. Proof. Left-to-right: Assume that F is meets the specified closedness conditions and is SOL-witnessed for P, p ∈ P and F [p] ∈ F. Let q be a fresh predicate with the arity of p. The obviously true statement |= ∃p F [p] ∨ ¬∃p F [p] is equivalent to |= ∃p F [p]∨¬F [q] and thus to |= ∃p (F [p]∨¬F [q]). By the closedness properties of F it holds that F [p] ∨ ¬F [q] ∈ F. Since F is SOL-witnessed for P it thus follows from Def. 16 that there exists a solution G of the SP (F [p] ∨ ¬F [q])[p] such that (F [G] ∨ ¬F [q]) ∈ F, and, by the closedness properties, also F [G] ∈ F. From the definition of solution it follows that |= F [G] ∨ ¬F [q], which is equivalent to ∃p F [p] ≡ F [G], and also that SUBST(G, p, F [G] ∨ ¬F [q]), which implies SUBST(G, p, F [G]). Thus G is an SO-witness of p in F [p] such that F [G] ∈ F. Right-to-left: Easy to see from Prop. 8.ii. t u 5.3 The Elimination Result as Precondition of Solution Existence Proposition 19 makes an interesting relationship between the existence of a solution and second-order quantifier elimination apparent that has been pointed out by Schröder [34, vol. 1, § 21] and Behmann [6], and is briefly reflected in 18 Section 6 [30, p. 62]: The formula ∃p F is valid if and only if the result of eliminating the existential second-order prefix (called Resultante by Schröder [34, vol. 1, § 21]) is valid. If it is not valid, then, by Prop. 19, the SP F [p] has no solution, however, in that case the elimination result represents the unique (modulo equivalence) weakest precondition under which the SP would have a solution. The following proposition shows a way to make this precise: Proposition 21 (The Elimination Result is the Unique Weakest Precondition of Solution Existence). Let F be a formula class and let P be a predicate class such that F is MSE-SOL-witnessed on P. Let F [p] be a solution problem where F ∈ F and all members of p are in P. Let A be a formula such that (A → F ) ∈ F, A ≡ ∃p F , and no member of p does occur in A. Then (i) The SP (A → F )[p] has a solution. (ii) If B is a formula such that (B → F ) ∈ F, no member of p occurs in B, and the SP (B → F )[p] has a solution, then B |= A. Proof. (21.i) From the specification of A it follows that |= A → ∃pF and thus |= ∃p (A → F ). Hence, by Prop. 19, the SP (A → F )[p] has a solution. (21.ii) Let B be a formula such that the left side of holds. With Prop. 19 it follows that |= B → ∃pF . Hence B |= ∃pF . Hence B |= A. t u The following example illustrates Prop. 21: Example 22 (Elimination Result as Precondition for Solvability). Consider the SP F [p1 p2 ] where F = ∀x (p1 (x ) → p2 (x )) ∧ ∀x (a(x ) → p2 (x )) ∧ ∀x (p2 (x ) → b(x )). Its formula is the consequent of the SP considered in Examp. 6. Since ∃p1 ∃p2 F ≡ ∀x (a(x ) → b(x )) 6≡ >, from Prop. 19 it follows that F [p1 p2 ] has no solution. If, however, the elimination result ∀x (a(x ) → b(x )) is added as an antecedent to F , then the resulting SP, which is the SP of Examp. 6, has a solution. 6 Reproductive Solutions as Most General Solutions Traditionally, concise representations of all particular solutions have been central to investigations of the solution problem. This section presents adaptions of classic material to this end, due in particular to Schröder and Löwenheim, and presented in a modern algebraic formalization by Rudeanu [30]. The idea is that a general solution G[t] has parameter predicates t such that each instantiation G[T ] with a sequence T of formulas is a particular solution and that for all particular solutions H there exists a sequence T of formulas such that H ≡ G[T ]. In this way, a general solution represents all solutions. A remaining difficulty is to determine for a given particular solution H the associated T . This is remedied with so-called reproductive solutions, for which H itself can be taken as T , that is, it holds that G[H] ≡ H. Reproductive Solutions as Most General Solutions 19 We give formal adaptions in the framework of predicate logic that center around the notion of reproductive solution. This includes precise specifications of reproductive solution and two further auxiliary types of solution. A technique to construct a reproductive solution from a given particular solution, known as Schröder’s rigorous solution or Löwenheim’s theorem and a construction of reproductive solutions due to Schröder, which succeeds on propositional formulas in general, is adapted. Finally, a way to express reproductive solutions of n-ary SPs in terms of reproductive solutions of 1-SPs in the manner of the method of successive eliminations is shown. 6.1 Parametric, General and Reproductive Solutions The following definitions give adaptions of the notions of parametric, general and reproductive solution for predicate logic, based on the modern algebraic notions in [30,14] as starting point. Definition 23 (Parametric and Reproductive Solution Problem (PSP, RSP, 1-RSP)). A parametric solution problem (PSP) F [p]:t is a pair of a solution problem F [p] and a sequence t of distinct predicates such that (free(F )∪ p) ∩ t = ∅. The members of t are called the solution parameters of the PSP. If the sequences of predicates p and t are matching, then the PSP is called a reproductive solution problem (RSP). A RSP with arity 1 is also called unary reproductive solution problem (1-RSP). Definition 24 (Parametric, General and Reproductive Solution). Define the following notions: (i) A parametric solution of a PSP F [p]:t is a sequence G[t] of formulas such that CLEAN(G), SUBST(G, p, F ) and for all sequences of formulas H such that SUBST(H, t, G) and SUBST(H, p, F ) it holds that if there exists a sequence T of formulas such that SUBST(T , t, G), SUBST(G[T ], p, F ) and H ≡ G[T ], then |= F [H]. (ii) A general solution of a PSP F [p]:t is a sequence G[t] of formulas such that the characterization of parametric solution (Def. 24.i) applies, with the if-then implication supplemented by its converse. (iii) A reproductive solution of a RSP F [p]:t is a sequence G[t] of formulas such that 1. G is a parametric solution of F [p]:t and 2. For all sequences H of formulas such that SUBST(H, t, G) and SUBST(H, p, F ) it holds that if |= F [H], then H ≡ G[H]. 20 Section 6 Parametric solution can be characterized more concisely than in Def. 24.i, but not showing the syntactic correspondence to the characterization of general solution in Def. 24.ii: Proposition 25 (Compacted Characterization of Parametric Solution). A parametric solution of a PSP F [p]:t is a sequence G[t] of formulas such that CLEAN(G), SUBST(G, p, F ) and for all sequences T of formulas such that SUBST(T , t, G), SUBST(G[T ], p, F ) it holds that |= F [G[T ]]. Proof. The left side of the proposition can be expressed as: (1) CLEAN(G), (2) SUBST(G, p, F ), and for all sequences H, T of formulas it holds that if (3) SUBST(H, t, G), (III) (4) SUBST(H, p, F ), (5) SUBST(T , t, G), (6) SUBST(G[T ], p, F ) and (7) H ≡ G[T ], then (8) |= F [H]. The right side of the proposition can be expressed as: (9) CLEAN(G), (10) SUBST(G, p, F ), and for all sequences T of formulas it holds that if (11) SUBST(T , t, G) and (12) SUBST(G[T ], p, F ), then (13) |= F [G[T ]]. Left-to-right: If H = G[T ], then H ≡ G[T ]. Thus, this direction of the proposition follows if statements (9)–(12) imply (1)–(6), with H instantiated to G[T ]. Statements (1), (2), (5) and (6) are (9), (10), (11) and (12), respectively. The instantiation of (3), that is, SUBST(G[T ], t, G), follows from (10) and (11). The instantiation of (4) is SUBST(G[T ], p, F ), which is, like (6), identical to (12). Right-to-left: Statements (1)–(7) imply (9)–(12). This holds since (1), (2), (5) and (6) are (9), (10), (11) and (12), respectively. Hence, assuming the right side of the proposition, statements (1)–(7) then imply (13), that is, |= F [G[T ]]. Statement (13), (7) and (6) imply (8), that is |= F [H], which concludes the proof. t u The essential relationships between particular, parametric, general and reproductive solutions, as well as an alternate characterization of reproductive solution implied by these, are gathered in the following proposition: Reproductive Solutions as Most General Solutions 21 Proposition 26 (Relationships Between the Solution Types). Let G = G[t] be a sequence of formulas. Then: (i) G is a parametric solution of the PSP F [p]:t if and only if CLEAN(G) and G is a particular solution of the SP F [p]. (ii) If G is a parametric solution of the PSP F [p]:t and T is sequence of formulas such that SUBST(T , t, G), SUBST(G[T ], p, F ), then G[T ] is a particular solution of the SP F [p]. (iii) A general solution of a PSP is also a parametric solution of that PSP. (iv) If G is a general solution of the PSP F [p]:t and H is a particular solution of the SP F [p] such that SUBST(H, t, G), then there exists a sequence T of formulas such that SUBST(T , t, G), SUBST(G[T ], p, F ) and H ≡ G[T ]. (v) A reproductive solution of a RSP is also a general solution of that RSP. (vi) If G is a parametric solution of the RSP F [p]:t, then for all sequences H of formulas such that SUBST(H, t, G) and SUBST(H, p, F ) it holds that if H ≡ G[H], then |= F [H]. (vii) G is a reproductive solution of the RSP F [p]:t if and only if 1. G is a parametric solution of F [p]:t and 2. For all sequences H of formulas such that SUBST(H, t, G) and SUBST(H, p, F ) it holds that |= F [H] if and only if H ≡ G[H]. Before we come to the proof of Prop. 26, let us observe that the conclusion of Prop. 26.vi is item (2.) of the definiens of reproductive solution (Def. 24.iii) after replacing the if-then implication there by its converse, and that Prop. 26.vii characterizes reproductive solution like its definition (Def. 24.iii), except that the definiens is strengthened by turning the if-then implication in item (2.) into an equivalence. Proof (Proposition 26). (26.i) Left-to-right: Let q be a sequence of fresh predicates that matches t and assume that G[t] is a parametric solution of F [p]:t. Hence SUBST(G, p, F ) and |= F [G[q]], which implies |= F [G]. Thus G is a particular solution of F [p]. Note that this direction of the proposition requires the availability of fresh predicates 22 Section 6 in the vocabulary. Right-to-left: Can be derived in the following steps explained below: (1) G[t] is a particular solution of F [p]. (2) CLEAN(G) (3) SUBST(G, p, F ) (4) |= F [G]. (5) SUBST(T , t, G). (6) SUBST(G[T ], p, F ). (7) SUBST(T , t, F [G]). (8) |= ∀t F [G]. (9) |= F [G[T ]]. (10) G is a parametric solution of F [p]:t. Step (1) and (2), where t is some sequence of distinct predicates such that (free(F ) ∪ p) ∩ t = ∅, form the left side of the proposition. Steps (3) and (4) follow from (1) and the characteristics of particular solution. Let T be a sequence of formulas such that (5) and (6) hold, conditions on the left side of Prop. 25. Step (7) follows from (5) and (6). Step (8) follows from (4). Step (9) follows from (7) and (8) by Prop. 2.ii. Finally, step (10), the right side of the proposition, follows from Prop. 25 with (9), (2) and (3). (26.ii) The left side of the proposition includes SUBST(G[T ], p, F ) and, by Prop. 25, implies |= F [G[T ]], from which the right side follows. (26.iii) Immediate from the definition of general solution (Def. 24.ii). (26.iv) The left side of the proposition implies SUBST(H, t, G), SUBST(H, p, F ) and |= F [H]. The right side then follows from the definition of general solution (Def. 24.ii). (26.v) By definition, a reproductive solution is also a parametric solution. Let G be a reproductive solution of F [p]:t. Let COND stand for the following conjunction of three statements: SUBST(H, t, G), SUBST(H, p, F ) and |= F [H]. From the definition of reproductive solution it immediately follows that for all sequences H of formulas such that COND it holds that H ≡ G[H]. From this it follows that for all sequences H of formulas such that COND it holds that SUBST(H, t, G), SUBST(G[H], p, F ) and H ≡ G[H], which can be derived as follows: The first of the statements on the right, SUBST(H, t, G), is included directly in the left side, that is, COND. The second one, SUBST(G[H], p, F ), follows from SUBST(H, t, G) and SUBST(H, p, F ) that are in COND together with SUBST(G, p, F ), which holds since G is a parametric solution. The above implication also holds if H on its right side is replaced by a supposedly existing T . It then forms the remaining requirement to show that G is a general solution: For all sequences H of formulas such that COND there exists a sequence T of formulas such that SUBST(T , t, G), SUBST(G[T ], p, F ) and H ≡ G[T ]. Reproductive Solutions as Most General Solutions 23 (26.vi) Can be shown in the following steps, explained below: (1) (2) (3) (4) (5) (6) (7) SUBST(G, p, F ). SUBST(H, t, G). SUBST(H, p, F ). H ≡ G[H]. SUBST(G[H], p, F ). F [G[H]] |= ⊥. F [H] |= ⊥. Assume that G is a parametric solution of the RSP F [p]:t, which implies (1). Let H be a sequence of formulas such that (2) and (3), the preconditions of the converse of (as well as the unmodified) item (2.) in the definition of reproductive solution (Def. 24.iii), hold. Further assume (4), the right side of item (2.). We prove the proposition by deriving the left side of item (2.). Step (5) follows from (1), (2) and (3). Step (6) follows from (2) and (5) by Prop. 25 since G is a parametric solution. Finally, step (7), the left side of item (2.), follows from (6) and (4) with (3) and (5). (26.vii) Follows from Prop. 26.vi. t u Rudeanu [30] notes that the concept of reproductive solution seems to have been introduced by Schröder [34], while the term reproductive is due to Löwenheim [25]. Schröder calls the additional requirement that a reproductive solution must satisfy in comparison with general solution Adventivforderung (adventitious requirement) and discusses it at length in [34, vol. 3, § 12], describing it with reproduzirt. [34, vol. 3, p. 171]. 6.2 The Rigorous Solution From any given particular solution G, a reproductive solution can be constructed, called here, following Schröder’s terminology [34, vol. 3, § 12], the rigorous solution associated with G. In the framework of Boolean algebra, the analogous construction is [30, Theorem 2.11]. Proposition 27 (The Rigorous Solution). Let F [p]:t = t1 . . . tn be a RSP. For i ∈ {1, . . . , n} let xi stand for x1 . . . xarity(ti ) . Assume free(F ) ∩ X = ∅, SUBST(t1 (x1 ) . . . tn (xn ), p, F ) and SUBST(F [t], p, F ). If G = G1 . . . Gn is a particular solution of that RSP , then the sequence R = R1 . . . Rn of formulas defined as follows is a reproductive solution of that RSP: Ri is the clean variant of (Gi (x) ∧ ¬F [t]) ∨ (ti (xi ) ∧ F [t]). In the specification of Ri the formula Gi is written as Gi (x) to indicate that members of X may occur there literally without being replaced. In the unsatisfiabilitybased setting, the Ri would be characterized as the clean variant of (Gi (x) ∧ F [t]) ∨ (ti (xi ) ∧ ¬F [t]). (v) 24 Section 6 The proof of this proposition is based on the following lemma, a predicate logic analog to [30, Lemma 2.3] for the special case n = 1, which is sufficient to prove Prop. 27: The effect of the lemma for arbitrary n is achieved by an application of Prop. 27 within an induction. Proposition 28 (Subformula Distribution Lemma). Let p be a predicate (with arbitrary arity ≥ 0), let F [p] be a formula and let V, W, A be formulas such that SUBST(V, p, F ), SUBST(W, p, F ), SUBST(A, p, F ) and, in addition, free(A) ∩ X = ∅. It then holds that F [(A ∧ V ) ∨ (¬A ∧ W )] ≡ (A ∧ F [V ]) ∨ (¬A ∧ F [W ]). Proof. Assume the preconditions of the proposition. It follows that SUBST((A ∧ V ) ∨ (¬A ∧ W ), p, F ). Making use of Prop. 2.i, the conclusion of the proposition can be then be shown in the following steps: Left side ≡ ∃p (F [p] ∧ (p ⇔ ((A ∧ V ) ∨ (¬A ∧ W )))) ≡ (A ∧ ∃p (F [p] ∧ (p ⇔ ((A ∧ V ) ∨ (¬A ∧ W ))))) ∨ (¬A ∧ ∃p (F [p] ∧ (p ⇔ ((A ∧ V ) ∨ (¬A ∧ W ))))) ≡ (A ∧ ∃p (F [p] ∧ (p ⇔ ((> ∧ V ) ∨ (⊥ ∧ W ))))) ∨ (¬A ∧ ∃p (F [p] ∧ (p ⇔ ((⊥ ∧ V ) ∨ (> ∧ W ))))) ≡ (A ∧ ∃p (F [p] ∧ (p ⇔ V ))) ∨ (¬A ∧ ∃p (F [p] ∧ (p ⇔ W ))) ≡ Right side. t u The preconditions in Prop. 28 permit that x1 , . . . , xarity(p) may occur free in V and W , whereas in A no member of X is allowed to occur free. We are now ready to prove Prop. 27: Proof (Proposition 27). By item (1.) of the definition of reproductive solution (Def. 24.iii), R[t] = R1 [t] . . . Rn [t] is required to be a parametric solution for which by Prop. 25 three properties have to be shown: The first one, CLEAN(R), is immediate since each member of R is the clean variant of some formula. The second one, SUBST(R, p, F ), is easy to derive from the preconditions and the definition of R. The third one is an implication that can be shown in the following steps, explained below: (1) (2) (3) (4) (5) (6) (7) (8) SUBST(T , t, R). SUBST(R[T ], p, F ). SUBST(G, p, F ). |= F [G]. ¬F [T ] ∧ ¬F [R[T ]] |= ¬F [G]. F [T ] ∧ ¬F [R[T ]] |= ¬F [T ]. F [G] |= F [R[T ]]. |= F [R[T ]]. Let T be a sequence of formulas such that statements (1) and (2), which are on the left side of the implication to show, do hold. We derive the right side of the Reproductive Solutions as Most General Solutions 25 implication, that is |= F [R[T ]]. Steps (3) and (4) hold since G is a particular solution. Steps (5) and (6) can be shown by induction based on the equivalences (9) and (10), respectively, below, which hold for all i ∈ {0, . . . , n − 1} and follow from Prop. 28: (9) ¬F [G1 . . . Gi Ri+1 [T ] . . . Rn [T ]] ≡ ¬F [G1 . . . Gi ((Gi+1 ∧ ¬F [T ]) ∨ (Ti+1 ∧ F [T ])) Ri+2 [T ] . . . Rn [T ]] ≡ (¬F [T ] ∧ ¬F [G1 . . . Gi+1 Ri+2 [T ] . . . Rn [T ]]) ∨ (F [T ] ∧ ¬F [G1 . . . Gi Ti+1 Ri+2 [T ] . . . Rn [T ]]). (10) ¬F [T1 . . . Ti Ri+1 [T ] . . . Rn [T ]] ≡ ¬F [T1 . . . Ti ((Gi+1 ∧ ¬F [T ]) ∨ (Ti+1 ∧ F [T ])) Ri+2 [T ] . . . Rn [T ]] ≡ (¬F [T ] ∧ ¬F [T1 . . . Ti Gi+1 Ri+2 [T ] . . . Rn [T ]]) ∨ (F [T ] ∧ F [T1 . . . Ti+1 Ri+2 [T ] . . . Rn [T ]]). The required preconditions of Prop. 28 are justified there as follows, where F 0 stands for F after the substitutions indicated in (9) or (10), that is, the formula matched with the left side of Prop. 28: – SUBST(Gi+1 , pi+1 , ¬F 0 ): Follows from (3). – SUBST(Ti+1 , pi+1 , ¬F 0 ): Follows from (1) and (2). – SUBST(F [T ], pi+1 , ¬F 0 ): Follows from (1), (2) and the precondition SUBST(F [t], p, F ). – free(F [T ]) ∩ X = ∅: Follows from (1), (2) and the precondition free(F ) ∩ X = ∅. Step (7) follows from (6) and (5) and, finally, step (8) follows from (7) and (4). Item (2.) of the definition of reproductive solution follows since for all sequences of formulas H such that SUBST(H, t, R) and SUBST(H, p, F ) (note that SUBST(H, t, G) is implied by SUBST(H, t, R)) it holds that if |= F [H], then H ≡ R[H], or, equivalently, but more explicated, it holds for all i ∈ {1, . . . , n} that Ri [H] ≡ (Gi [H] ∧ ¬F [H]) ∨ (Hi ∧ F [H]) ≡ (Gi [H] ∧ ⊥) ∨ (Hi ∧ >) ≡ Hi . t u The algebraic version [30, Theorem 2.11] is attributed there and in most of the later literature to Löwenheim [24,25], thus known as Löwenheim’s theorem for Boolean equations. However, at least the construction for unary problems appears to be in essence Schröder’s rigorose Lösung [34, vol. 3, § 12]. (Löwenheim remarks in [24] that the rigorose Lösung can be derived as a special case of his theorem.) Behmann comments that Schröder’s discussion of rigorose Lösung starts only in a late chapter of Algebra der Logik mainly for the reason that only then suitable notation was available [6, Footnotes on p. 22f]. Schröder [34, vol. 3, p. 168] explains his term rigoros as adaption of à la rigueur, that is, if need be, because he does not consider the rigorous solution as a satisfying representation 26 Section 6 of all particular solutions. He notes that to detect all particular solutions on the basis of the rigorose Lösung, one would have to test all possible formulas T as parameter value. As remarked in [27, p. 382], Löwenheim’s theorem has been rediscovered many times, for example in [26]. 6.3 Schröder’s Reproductive Interpolant For 1-RSPs of the form ((A ⇒ p) ∧ (p ⇒ B))[p]:t, (vi) A ∨ (B ∧ t(x)), (vii) the formula where xs = x1 . . . xarity(p) , is a reproductive solution. This construction has been shown by Schröder and is also discussed in [6]. For the notion of solution based on unsatisfiability instead of validity, the analogous construction applies to 1-RSPs of the form ((A ∧ p) ∨ (B ∧ ¬p))[p]:t (viii) and yields B ∨ (¬A ∧ t). (ix) We call the solution interpolant because with the validity-based notion of solution assumed here the unknown p, and thus also the solution, is “between” A and B, that is, implied by A and implying B. The following proposition makes the construction precise and shows its justification. The proposition is an adaption of [30, Lemma 2.2], where [34, vol. 1, § 21] is given as source. Proposition 29 (Schröder’s Reproductive Interpolant). Let (F = ∀y (A(y) → p(y)) ∧ ∀y (p(y) → B(y)))[p]:t, where y is a sequence with the arity of p as length of distinct individual symbols not in X , be a 1-RSP that has a solution. Let x = x1 . . . xarity(p) . Assume SUBST(A(x), p, F ), SUBST(B(x), p, F ) and SUBST(t(x), p, F ). Then the clean variant of following formula is a reproductive solution of that 1-RSP: A(x) ∨ (B(x) ∧ t(x)). That p does not occur free in A or in B is ensured by the preconditions SUBST(A, p, F ) and SUBST(B, p, F ). The symbols y for the quantified variables indicate that these are independent from the special meaning of the symbols in X . Proof (Proposition 29). Assume the preconditions of the proposition and let G[t] stand for the clean variant of A(x) ∨ (B(x) ∧ t(x)). By item (1.) of the definition of reproductive solution (Def. 24.iii), G is required to be a parametric solution for which by Prop. 25 three properties have to be shown: The first one, Reproductive Solutions as Most General Solutions 27 CLEAN(G), is immediate since G is a clean variant of some formula. The second one, SUBST(G, p, F ), easily follows from the preconditions. The third one is an implication that can be shown in the following steps, explained below: SUBST(A(x) ∨ (B(x) ∧ T (x)), p, F ). |= ∃p (∀y (A(y) → p(y)) ∧ ∀y (p(y) → B(y))). |= ∀y (A(y) → B(y)). |= ∀y (A(y) → (A(y) ∨ (B(y) ∧ T (y)))) ∧ ∀y ((A(y) ∨ (B(y) ∧ T (y))) → B(y)). (4) |= F [A(x) ∨ (B(x) ∧ T (x))]. (1) (2) (3) (4) Let T (x) be a formula such that statement (1), which is on the left side of the implication to show, does hold. We derive the right side of the implication, that is, |= F [B(x) ∨ (A(x) ∧ T (x))]: Step (2) follows with Prop. 15 from the precondition that the considered 1-RSP has a solution. Step (3) follows from (2) by secondorder quantifier elimination, for example with Ackermann’s lemma (Prop. 3). The formulas to the right of |= in both statements are equivalent. Step (4) follows from (3) by logic. Justified by (1), we can express (4) as (5), the right side of the implication to show. Item (2.) of the definition of reproductive solution follows since for all formulas H(x) such that SUBST(H(x), t, G), SUBST(H(x), p, F ), it holds that |= F [H(x)] implies H(x) ≡ G[H(x)], which can be derived in the following steps: iff iff implies implies iff |= F [H(x)] |= ∀y (A(y) → H(y)) ∧ ∀y (H(y) → B(y)) |= ∀y (H(y) ↔ (A(y) ∨ H(y))) and |= ∀y (H(y) ↔ (B(y) ∧ H(y))) H(x) ≡ A(x) ∨ H(x) and H(x) ≡ B(x) ∧ H(x) H(x) ≡ A(x) ∨ (B(x) ∧ H(x)) H(x) ≡ G[H(x)]. t u As shown by Schröder, the (clean variants of the) following two formulas are further reproductive solutions in the setting of Prop. 29: B(x) ∧ (A(x) ∨ t(x)) (x) (A(x) ∧ t(x)) ∨ (B(x) ∧ ¬t(x)). (xi) and These two formulas and the solution according to Prop. 29 are all equivalent under the assumption that a solution exists, that is, |= ∃p F , which, by secondorder quantifier elimination, is equivalent to |= ∀y (A(y) → B(y)). (xii) Any 1-RSP F [p]:t where F is a propositional formula or, more generally, where the unknown p is nullary, can be brought into the form matching Prop. 29 28 Section 6 by systematically renaming bound symbols and rewriting F [p] with the equivalence F [p] ≡ (¬F [⊥] → p) ∧ (p → F [>]). (xiii) For the notion of solution based on unsatisfiability, the required form can be obtained with the Shannon expansion F [p] ≡ (F [>] ∧ p) ∨ (F [⊥] ∧ ¬p). 6.4 (xiv) From Unary to n-ary Reproductive Solutions If the solution of a RSP is composed as suggested by Prop. 10 from reproductive solutions of unary solution problems, then it is itself a reproductive solution: Proposition 30 (Composing a Reproductive Solution from Unary Reproductive Solutions). Let F [p = p1 . . . pn ]:t = t1 . . . tn be a RSP. If G[t] = G1 [t] . . . Gn [t] is a sequence of formulas such that for all i ∈ {1, . . . , n} it holds that Gi is a reproductive solution of the 1-RSP (∃pi+1 . . . ∃pn F [G1 . . . Gi−1 pi . . . pn ])[pi ]:ti and free(Gi ) ∩ (p ∪ ti+1 . . . tn ) = ∅, then G is a reproductive solution of the considered RSP F [p]:t. Proof. Assume the preconditions and the left side of the proposition. We show the two items of the definition of reproductive solution (Def. 24.iii) for G. Item (1.), that is, G is a parametric solution of F [p]:t, can be derived as follows: Each Gi , for i ∈ {1, . . . , n}, is a reproductive solution of the associated 1-RSP. Hence, by Prop. 26 it is a general, hence parametric, hence particular solution. By Prop. 10 it follows that G is a particular solution of F [p]. By Prop. 26.i it is then also a parametric solution of F [p]:t. Item (2.) of the definition of reproductive solution can be shown as follows: First we note the following statement that was given as precondition: (1) For i ∈ {1, . . . , n} it holds that free(Gi ) ∩ ti+1 . . . tn = ∅. For i ∈ {1, . . . , n} let Fi [pi t] def = ∃pi+1 . . . ∃pn F [G1 [t] . . . Gi−1 [t]pi . . . pn ], that is, Fi is the formula of the 1-SP of which Gi is a reproductive solution. By the definition of reproductive solution and the left side of the proposition it holds for all formulas Hi that if (2) SUBST(Hi , ti , Gi ) SUBST(Hi , pi , Fi [pi t]), and |= Fi [Hi t], then (3) Hi ≡ Gi [t1 . . . ti−1 Hi ti+1 . . . tn ]. Approaching Constructive Solution Techniques 29 From this and (1) it follows that all for all sequences of formulas H1 . . . Hi it holds that if (4) SUBST(Hi , ti , Gi ) SUBST(Hi , pi , Fi [pi H1 . . . Hi−1 ti . . . tn ]), and |= Fi [Hi H1 . . . Hi−1 ti . . . tn ], then (5) Hi ≡ Gi [H1 . . . Hi ti+1 . . . tn ]. Now let H ≡ H1 . . . Hn be a sequence of formulas such that (6) SUBST(H, t, G) SUBST(H, p, F ), and |= F [H]. We prove the item (2) of Def. 24.iii by showing H ≡ G[H], which is equivalent to the statement that for all i ∈ {1, . . . , n} it holds that Hi ≡ Gi [H], and, because of (1), to the statement that for all i ∈ {1, . . . , n} it holds that Hi ≡ Gi [H1 . . . Hi ti+1 . . . tn ], which matches (5). We thus can prove H ≡ G[H] by showing that (4), which implies (5), holds for all i ∈ {1, . . . , n}. The substitutivity conditions in (4) follow from the substitutivity conditions in (6). The remaining condition |= Fi [Hi H1 . . . Hi−1 ti . . . tn ] can be proven by induction. As induction hypothesis assume that for all j ∈ {1, . . . i − 1} it holds that Hj ≡ Gj [H]. From |= F [H] in (6) it follows by Prop. 2.ii that |= ∃pi+1 . . . ∃pn F [H1 . . . Hi pi+1 . . . pn ]. With the induction hypothesis it follows that |= ∃pi+1 . . . ∃pn F [G1 [H] . . . Gi−1 [H]Hi pi+1 . . . pn ], which, given the substitutivity conditions of (6) and SUBST(G, p, F ), which holds since G is a parametric solution, can be expressed as |= Fi [Hi H1 . . . Hi−1 ti . . . tn ], such that all conditions of (4) are satisfied and Hi ≡ Gi [H] can be concluded. t u This suggests to compute reproductive solutions of propositional formulas for a n-ary SP by constructing Schröder interpolants for 1-SPs. Since second-order quantifier elimination on propositional formulas succeeds in general, the construction of the Schröder interpolant can there be performed on the basis of formulas that are just propositional, without second-order quantifiers. 7 Approaching Constructive Solution Techniques On the basis of first-order logic it seems that so far there is no general constructive method for the computation of solutions. We discuss various special cases where a construction is possible. Some of these relate to applications of Craig interpolation. Recent work by Eberhard, Hetzl and Weller [16] shows a constructive method for quantifier-free first-order formulas. A generalization of their technique to relational monadic formulas is shown, which, however, produces solutions that would be acceptable only under a relaxed notion of substitutibility. 30 7.1 Section 7 Background: Craig Interpolation, Definability and Independence By Craig’s interpolation theorem [13], if F and G are first-order formulas such that F |= G, then there exists an a Craig interpolant of F and G, that is, a first-order formula H such that free(H) ⊆ free(F ) ∩ free(G) (xv) F |= H |= G. (xvi) and Craig interpolants can be constructed from proofs of |= F → G, as, for example, shown for tableaux in [36,17]. Lyndon’s interpolation theorem strengthens Craig’s theorem by considering in addition that predicates in the interpolant H occur only in polarities in which they occur in both side formulas, F and G. In fact, practical methods for the construction of interpolants from proofs typically compute such Craig-Lyndon interpolants. One of the many applications of Craig interpolation is the construction of a definiens for a given predicate: Let F [pq1 . . . qk ] be a first-order formula such that free(F ) ∩ X = ∅ and pq1 , . . . qk is a sequence of distinct predicates and let x stand for x1 . . . xarity(p) . Then p is definable in terms of (free(F ) \ {q1 , . . . , qk }) within F , that is, there exists a first-order formula G such that free(G) ⊆ (free(F ) \ {p, q1 , . . . qk }) ∪ x (xvii) F |= p ⇔ G, (xviii) ∃p∃q1 . . . ∃qk (F ∧ p(x)) |= ¬∃p∃q1 . . . ∃qk (F ∧ ¬p(x)). (xix) and if and only if That entailment holds if and only if the following first-order formula is valid: F ∧ p(x) → ¬(F [p0 q10 . . . qk0 ] ∧ ¬p0 (x)), (xx) where p0 q 0 . . . qk0 is a sequence of fresh predicates that matches pq . . . qk . The definientia G of p with the stated characteristics are exactly the Craig interpolants of the two sides of that implication. Substitutibility SUBST(G, p, F ) can be ensured by presupposing CLEAN(F ) and that no members of X are bound by a quantifier occurrence in F . Another application of Craig interpolation concerns the independence of formulas from given predicates: Second-order quantification allows to express that a formula F [p] is semantically independent from the set of the predicates in p as ∃p F ≡ F, (xxi) which is equivalent to ∃p F |= F , and thus, if q is a sequence of fresh predicates that matches p, also equivalent to |= F [q] → F. (xxii) 31 Approaching Constructive Solution Techniques As observed in [29], any interpolant of F [q] and F is then equivalent to F but its free symbols do not contain members of p, that is, it is syntactically independent of p. Thus, for a given first-order formula semantic independence from a set of predicates can be expressed as first-order validity and, if it holds, an equivalent formula that is also syntactically independent can be constructed by Craig interpolation. With Craig-Lyndon interpolation this technique can be generalized to take also polarity into account, based on encoding of polarity sensitive independence as shown here for negative polarity: That F [p] is independent from predicate p in negative polarity but may well depend on p in positive polarity can be expressed as ∃q (F [q] ∧ ∀x (q(x) → p(x))), (xxiii) where x = x1 . . . xarity(p) and q is a fresh predicate with the same arity as p. 7.2 Cases Related to Definability and Interpolation The following list shows cases where for an n-ary SP F [p = p1 . . . pn ] with firstorder F and which has a solution a particular solution can be constructed. Each of the properties that characterize these cases is “semantic” in the sense that if it holds for F , then it also holds for any first-order formula equivalent to F . In addition, each property is at least “semi-decidable”, that is, the set of first-order formulas with the property is recursively enumerable. Actually in the considered cases, for each property a first-order formula can be constructed from F that is valid if and only if F has the property. For two of the listed cases, (3.) and (5.), the characterizing property implies the existence of a solution. 1. Each unknown occurs free in F only with a single polarity. A sequence of > and ⊥, depending on whether the respective unknown occurs positively or negatively, is then a solution. That F is semantically independent of unknowns in certain polarities, that is, is equivalent to a formula in which the unknowns do not occur in these polarities, can be expressed as first-order validity and a corresponding formula that is syntactically independent can be constructed by Craig-Lyndon interpolation. 2. Each unknown is definable in the formula. A sequence of definientia, which can be constructed with Craig interpolation, is then a solution. Rationale: Let G1 . . . Gn be definientia of p1 . . . pn , respectively, in F . Under the assumption that there exists a solution H of F [p] it holds that > |= F [H] |= ∃p F [p] ≡ ∃p (F [p] ∧ n ^ (pi ⇔ Gi )) ≡ F [G]. i=1 3. Each unknown is definable in the negated formula. The sequence of negated definientia, which can be constructed with Craig interpolation, is then a solution. Rationale: It holds in general that p ⇔ G |= p 6⇔ ¬G. Hence, if G1 . . . Gn are definientia of p1 . . . pn , respectively, in ¬F , then ¬F |= 32 Section 7 Vn i=1 (pi ⇔ Gi ) |= Wn i=1 (pi ⇔ Gi ) ≡ n ^ Wn i=1 (pi 6⇔ ¬Gi ). Thus (pi ⇔ ¬Gi ) |= F, i=1 matching the characterization of solution in Prop. 9. 4. Each unknown is nullary. This specializes case (3.): If a solution exists, then a nullary unknown is definable in the negated formula: For nullary predicates p it holds in general that p ⇔ ¬G ≡ p 6⇔ G. Thus p ⇔ ¬G |= F (which matches Prop. 9) holds if and only if ¬F |= p ⇔ G. 5. Each unknown has a ground instance that is definable in the negated formula. The sequence of negated definientia is a solution. If p1 (t1 ) . . . pn (tn ) are the definable ground instances, then optionally in each solution component Gi , under the assumption CLEAN(Gi ), each member tij of ti = ti1 . . . tiarity(pi ) can be replaced by xj . The construction of the definientia can be performed with Craig interpolation, as described above for predicate definientia, except that an instance p(t) takes the place of p(x). The difficulty is to find suitable instantiations t1 . . . tn . A way to avoid guessing might be to let the formula whose proof serves as basis for interpolant extraction follow the schema ∃y (F ∧ p(y) → ¬(F [p0 ] ∧ ¬p0 (y))), where y = y1 . . . yarity(p) and take the instantiation of y found by the prover. If the proof involves different instantiations of y it has to be rejected. Rationale: Similar to the case (4.) since for ground atoms p(t) it holds in general that p(t) ↔ G ≡ ¬(p(t) ↔ ¬G). These cases suggest to compute particular solutions based on Prop. 10 by computing solutions for 1-SPs for each unknown, which is inspected for matching the listed cases or other types of solvable cases, for example the forms required by Schröder’s interpolant or by Ackermann’s lemma. If that fails for an unknown, an attempt with the unknowns re-ordered is made. For propositional problems, an interpolating QBF solver would be a candidate to compute solutions. Encodings of QBF into predicate logic, e.g., [35], could possibly be applied for general first-order formulas with nullary unknowns. 7.3 The EHW-Combination of ELIM-Witnesses for Disjuncts Eberhard, Hetzl and Weller show in [16] that determining the existence of a Boolean unifier (or, in, our terms, particular solution) for quantifier-free predicate logic is ΠP 2 -complete, as for propositional logic [2]. Their proof rests on the existence of an EXPTIME function wit from quantifier-free formulas to quantifierfree formulas such that ∃pF [p] ≡ F [wit(F [p])]. The specification of wit(F [p]) 33 Approaching Constructive Solution Techniques is presented there as a variant of the DLS algorithm [15,11] for second-order quantifier elimination: The input is converted to disjunctive normal form and a specialization of Ackermann’s lemma is applied separately to each disjunct. The results for each disjunct are then combined in a specific way to yield the overall witness formula. The following proposition states a generalized variant of this technique that is applicable also to other classes of inputs, beyond the quantifier-free case. Proposition Wn31 (EHW-Combination of ELIM-Witnesses for Disjuncts). Let F [p] = i=1 Fi be a formula and let G1 , . . . , Gn be formulas such that for i ∈ {1, . . . n} it holds that SUBST(Gi , pi , Fi ) and ∃p Fi [p] ≡ Fi [Gi ]. Assume that there are no free occurrences of X in F and, w.l.o.g, that no members of free(F ) ∪ X are bound by a quantifier occurrence in F . Let G(x) def = n ^ (( i=1 i−1 ^ ¬Fj [Gj ]) ∧ Fi [Gi ] → Gi (x)). j=1 Then it holds that SUBST(G, p, F ) and ∃p F [p] ≡ F [G]. Formulas G and Gi are written as Gi (x) and G(x) where they occur as formula constituents instead of substituents to emphasize that x may occur free in them. Proof (Proposition 31). This proof is an adaption of the proof of Theorem 2 in [16]. We write here I is a model of F symbolically as I |= F . That SUBST(G, p, F ) follows from the preconditions of the proposition and the construction of G. The right-to-left direction of the stated equivalence, that is, n _ i=1 Fi [G] |= ∃p n _ Fi [p], i=1 then follows from Prop. 2.ii. The left-to-right direction of the equivalence can be show in the following steps, explained below. Wn (1) I |= ∃p Wn i=1 Fi [p]. (2) I |= Wi=1 ∃p Fi [p]. n (3) I |= i=1 Fi [Gi ]. Vk−1 (4) I |= ( j=1 ¬Fj [Gj ]) ∧ Fk [Gk ]. (5) I |= ∀x (G(x) ↔ Gk (x)). (6) I |= F Wkn[G]. (7) I |= i=1 Fi [G]. Let I be an interpretation such that (1) holds. Step (2) is equivalent to (1). Assume the precondition of the proposition that for all i ∈ {1, . . . n} it holds Wn that ∃p Fi [p] ≡ i=1 Fi [Gi ]. Step (3) follows from this and (1). By (3) there is a smallest member k of {1, . . . , n} such that I |= Fk [Gk ]. This implies (4). The left-to-right direction of the equivalence in (5) follows since if I |= G(x) then by (4) and the definition of G(x) it is immediate that I |= Gk (x). The 34 Section 7 right-to-left direction of the equivalence in (5) can be shown as follows: Assume I |= Gk (x). Then I is a model of the kth conjunct of G(x) since Gk (x) is in the conclusion of that conjunct, and I is a model of each jth conjunct of G(x) with j 6= k, because the antecedent of such a conjunct contradicts with (4). Step (6) follows from (4) and (5). Step (7) follows from (6). t u The following proposition is another variant of the EHW-combination of witnesses for disjuncts. It can be proven similarly to Prop. 31. Proposition 32 (Alternate Variant of EHW-Combination). Let F [p] be a 1-SP and let G1 , . . . , Gn be formulas such Wn that for i ∈ {1, . . . , n} it holds that SUBST(Gi , p, F ) and such that ∃p F ≡ i=1 F [Gi ]. Assume that there are no free occurrences of {xi | i ≥ 1} in F and, w.l.o.g, that no members of free(F ) ∪ x are bound in by a quantifier occurrence in F . Let G def = n ^ i=1 (( i−1 ^ ¬F [Gj ]) ∧ F [Gi ] → Gi ). j=1 Then SUBST(G, p, F ) and ∃p F ≡ F [G]. Proposition 32 is also applicable to 1-SPs of the form handled by Prop. 31, but for this case leads to a more clumsy result G: Assume the additional preWn condition that for all j ∈ {1, . . . , n} it holds that SUBST(G , p, F ). Let j i=1 i Wn F [p] def F [p]. Then ∃pF [p] ≡ F [G ] ∨ . . . ∨ F [G ] ≡ F [G ] ∨ . . . ∨ F [G = i=1 i 1 1 n n 1 n ]. 7.4 Relational Monadic Formulas and Relaxed Substitutibility The class of relational monadic formulas with equality, called here MON= , is the class of first-order formulas with equality, with unary predicates and with individual constants but no other functions (without equality it is the Löwenheim class). It is decidable and permits second-order quantifier elimination, that is, each formula in MON= extended by predicate quantification is equivalent to a formula in MON= . As shown in [39] it has interesting relationships with ALC. Behmann [5] gave a decision method for MON= that performs second-order quantifier elimination by equivalence preserving formula rewriting [39,38]. Almost three decades later he published an adaption of these techniques to the solution problem for Klassenlogik [6,7], which in essence seems to be MON= . It still remains open to assess this and apparently related works by Löwenheim [25]. Under a relaxed notion of substitutibility the construction of ELIM-witnesses for MON= is possible by joining Behmann’s rewriting technique [5] with the EHW-combination (Prop. 31). Let F [p] be a MON= formula and let p be a unary predicate. Assume that free(F ) ∩ X = ∅. The reconstruction of Behmann’s normalization shown in the proofs of LemmaW14 and Lemma 16 of [38] can be n slightly modified to construct a formula F 0 = i=1 Fi00 that is equivalent to ∃p F and such that each Fi00 is of the form Fi00 = Ci ∧∃ui (Di (ui )∧∃p (∀y (Ai (ui y) → p(y))∧∀y (p(y) → Bi (ui y)))), (xxiv) 35 Solutions in Restricted Vocabularies where ui is a sequence of individual symbols such that ui ∩ free(Ci ) = ∅, predicate p has only the two indicated occurrences and free(Fi0 ) ⊆ free(∃p F ). Let Fi000 [p] = Ci ∧ Di (ui ) ∧ ∀y (Ai (ui y) → p(y)) ∧ ∀y (p(y) → Bi (ui y)). (xxv) Then Fi00 ≡ ∃ui ∃p Fi000 ≡ ∃ui Fi00 [A(ui x1 )], where the last equivalence follows from Ackermann’s lemma (Prop. 3). It holds that SUBST(Fi00 , p, A(ui x1 )) but, since the quantified symbols u may occur in A(ui x1 ), the substitutibility condition SUBST(∃u Fi00 , p, A(ui x1 )) does not hold in general. The variables ui can be gathered to a single global prefix u (assuming w.l.o.g. that noneWof them ocn curs free in any of the Ci ) such that F ≡ ∃u F 0000 [p] where F 0000 = i=1 Fi000 . By Prop. 31 we can construct a formula G(u) such that SUBST(G(u), p, F 0000 ) and ∃p F 0000 [p] ≡ F 0000 [G(u)]. This implies ∃p F [p] ≡ F [G(u)]. However, substitutibility of G(u) holds only with respect to F 0000 , while SUBST(G(u), p, F ) does not hold in general. Thus, under a relaxed notion of substitutibility that permits the existentially quantified u in the witness the EHW-combination can be applied to construct witnesses for MON= formulas. 8 Solutions in Restricted Vocabularies 8.1 An Example: Synthesizing Definitional Equivalence In some applications it is useful to restrict the allowed vocabulary of the solution components. Consider for example the task of finding a mapping that establishes a definitional equivalence [20] between two formulas A and B where the predicates occurring free in A are in a set VA = {a1 , . . . , an } and those occurring in B are in another set VB = {b1 , . . . , bm }, disjoint with VA . The objective is then to find a solution GH of the SP F [pq] where G = G1 . . . Gm , H = H1 . . . Hn , p = p1 . . . pm , q = q1 . . . qn , F = (A ∧ m ^ i=1 ∀y i (bi (y i ) ↔ pi (y i ))) ↔ (B ∧ n ^ ∀z i (ai (z i ) ↔ qi (z i ))), (xxvi) i=1 y i = y1 . . . yarity(bi ) , z i = z1 . . . zarity(ai ) , and the restriction is satisfied that all predicates in free(G) are in VA and all predicates in free(H) are in VB . 8.2 Modeling with Two Consecutive Solution Problems This can be achieved by solving consecutively two SPs followed by interpolant computation: First, compute a reproductive solution R[t] of F [pq]:t. Since it is a most general solution, if there is a particular solution, say GH, that meets the vocabulary restrictions, there must be a sequence T of “instantiation formulas” such that R[T ] ≡ GH. Each member of R[T ] is then “semantically” in the required predicate vocabulary, that is, equivalent to a formula in which all free predicates are members of the given set of predicates. Craig-Lyndon interpolation can be applied on each of these formulas, if they are first-order, to construct 36 Section 9 equivalent formulas that are also syntactically in the required vocabulary as explained in Sect. 7.1. The remaining issue is to find suitable instantiation formulas T . These can again be determined as solutions of a SP: Consider, for example, the case where for a formula R[tb] a sequence T of formulas should be found such that Ri [T b] is semantically independent from the members of b, that is, it should hold that ∃b R[T b] ≡ R[T b]. This is equivalent to R[T c] |= R[T b], where c is a sequence of fresh predicates matching b, and hence also equivalent to |= R[T c] → R[T b]. Thus, suitable T can be obtained as solutions of the SP (R[tc] → R[tb])[t]. (xxvii) For an n-ary solution problem where R1 [tb1 ] . . . Rn [tbn ] is given and the requirement is that for all i ∈ {1, . . . , n} it holds that ∃bi Ri [T bi ] ≡ Ri [T bi ], a single SP that combines the requirements can be used: ( n ^ (Ri [tci ] → Ri [tbi ]))[t], (xxviii) i=1 where, for i ∈ {1, . . . , n}, ci is a sequence of fresh predicates that matches bi . In fact, if m, n ≥ 1 the first SP of this method can be trivially solved: As reproductive solution take the rigorous solution based on a particular solution where G1 = ¬b1 (x1 . . . xarity(p1 ) ), H1 = ¬q1 (x1 . . . xarity(q1 ) ), and G2 . . . Gm and H2 . . . Hn have arbitrary values, for example >. The actual effort to construct the vocabulary restricted solution is then required for the second SP. 8.3 Expressing a Vocabulary Restriction on all Unknowns A different technique applies to solution problems where there is only a single set of predicates, say the set of members of the sequence b of predicates, that are not permitted to occur free in the solution components: The vocabulary restriction can then be directly encoded into the solution problem by means of secondorder quantification, justified by the equivalence of the following statements, which follows from the requirement of substitutibility for solutions: 9 G is a solution of the SP F [p] and free(G) ∩ b = ∅. (xxix) G is a solution of the SP (∀b F )[p]. (xxx) A Herbrand View on the Solution Problem The characterization of solution in Prop. 9 is by an entailment of F . In presence of the result of [16] for quantifier free predicate logic this brings up the question whether Skolemization and Herbrand’s theorem justify some “instance-based” technique for computing solutions that succeed on large enough quantifier expansions. The following is a formal account of that scenario which, so far, shows no positive result but might be useful as a basis for further investigations. Conclusion 37 Consider a 1-SP F [p] that has a solution G. By Prop. 9 it then holds that p ⇔ G |= F . Let D stand for p ⇔ G. By Herbrand’s theorem we know that there are formulas D0 , F 0 , Dh and F h and sequences of fresh functions d and f such that p ⇔ G = D ≡ ∀f ∃d D0 |= ∀f ∃d Dh |= ∀f ∃d F h |= ∀f ∃d F 0 ≡ F, (xxxi) and Dh |= F h . The functions d and f are the functions introduced by Skolemizing D (w.r.t. ∃) and F (w.r.t. ∀), respectively (this is the only place in the paper where we consider second-order quantification upon functions). Formulas D0 and F 0 are the universal and existential, resp., first-order formulas, obtained from Skolemizing D0 and F 0 , respectively. Formulas Dh and F h are quantifier free, obtained from D0 and F 0 , resp., by instantiating their matrices with terms constructed from d, f and the free individual symbols in D or F (it is assumed w.l.o.g. that at least one individual symbol is among the symbols available for term construction). We thus know p ⇔ G |= ∀f ∃d F h , or, equivalently, p ⇔ G |= ∃ d F h . Thus G must be the solution to the 1-SP (∀f ∃d F h )[p], where F h is quantifier-free and ∀f ∃d is a second-order prefix with quantifiers upon functions. As a sufficient condition for solutions it can be derived from this setting that a solution H of the quantifier-free formula F h in which no member of f occurs free is, under the assumption CLEAN(F ), also a solution of F , which follows since p ⇔ H |= F h |= ∃dF h |= ∀f ∃dF h |= F . 10 Conclusion The solution problem and second-order quantifier elimination were interrelated tools in the early mathematical logic. Today elimination has entered automatization with applications in the computation of circumscription, in modal logics, and for semantic forgetting and modularizing knowledge bases, in particular for description logics. Since the solution problem on the basis of first-order logic is, like first-order validity, recursively enumerable there seems some hope to adapt techniques from first-order theorem proving. The paper makes the relevant scenario accessible from the perspective of predicate logic and theorem proving. It shows that a wealth of classical material on Boolean equation solving can be transferred to predicate logic and only few essential diverging points crystallize, like the constructability of witness formulas for quantified predicates, and “Schröder’s reproductive interpolant” that does not apply in general to first-order logic. An abstracted version of the core property underlying the classical method of successive eliminations provides a foundation for systematizing and generalizing algorithms that reduce n-ary solution problems to unary solution problems. Special cases based on Craig interpolation have been identified as first steps towards methods for solution construction. Beyond the presented core framework there seem to be many results from different communities that are potentially relevant for further investigation. This includes the vast amount of techniques for equation solving on the basis of Boolean 38 Section 10 algebra and its variants, developed over the last 150 years. For description logics there are several results on concept unification, e.g., [4,3]. Variants of Craig interpolation such as disjunctive interpolation [32] share with the solution problem at least the objective to find substitution formulas such that the overall formula becomes valid (or, dually, unsatisfiable). Among the issues that immediately suggest themselves for further research are the parallel between nondeterministic methods with execution paths for each particular solution and methods that compute a most general solution, the exploration of formula simplifications and techniques such as definitional normal forms to make constructions like rigorous solution and reproductive interpolant feasible, and the investigation of the relaxed notion of substitutibility under which solutions for relational monadic formulas can be constructed. The possible characterization of solution by an entailment also brings up the question whether Skolemization and Herbrand’s theorem justify some “instance-based” technique for computing solutions that succeeds on large enough quantifier expansions. Acknowledgments The author thanks anonymous reviewers for their helpful comments. This work was supported by DFG grant WE 5641/1-1. References 39 References 1. Ackermann, W.: Untersuchungen über das Eliminationsproblem der mathematischen Logik. Math. Ann. 110, 390–413 (1935) 2. Baader, F.: On the complexity of Boolean unification. Inf. Process. Lett. 67(4), 215–220 (Aug 1998) 3. Baader, F., Morawska, B.: Unification in the description logic EL. Logical Methods in Computer Science 6(3), 1–31 (2010) 4. Baader, F., Narendran, P.: Unification of concept terms in description logics. J. Symb. Comput. 31, 277–305 (2001) 5. Behmann, H.: Beiträge zur Algebra der Logik, insbesondere zum Entscheidungsproblem. Math. Ann. 86(3–4), 163–229 (1922) 6. Behmann, H.: Das Auflösungsproblem in der Klassenlogik. Archiv für Philosophie 4(1), 97–109 (1950), (First of two parts, also published in Archiv für mathematische Logik und Grundlagenforschung, 1.1 (1950), pp. 17-29) 7. Behmann, H.: Das Auflösungsproblem in der Klassenlogik. Archiv für Philosophie 4(2), 193–211 (1951), (Second of two parts, also published in Archiv für mathematische Logik und Grundlagenforschung, 1.2 (1951), pp. 33-51) 8. Brown, F.M.: Boolean Reasoning. Dover Publications, second edn. (2003) 9. Büttner, W., Simonis, H.: Embedding Boolean expressions into logic programming. J. Symb. Comput. 4(2), 191–205 (1987) 10. Carlsson, M.: Boolean constraints in SICStus Prolog. Tech. Rep. SICS T91:09, Swedish Institute of Computer Science, Kista (1991) 11. Conradie, W.: On the strength and scope of DLS. J. Applied Non-Classical Logic 16(3–4), 279–296 (2006) 12. Conradie, W., Goranko, V., Vakarelov, D.: Algorithmic correspondence and completeness in modal logic. I. The core algorithm SQEMA. LMCS 2(1:5), 1–26 (2006) 13. Craig, W.: Linear reasoning. A new form of the Herbrand-Gentzen theorem. J. Symb. Log. 22(3), 250–268 (1957) 14. Deschamps, J.P.: Parametric solutions of Boolean equations. Discrete Mathematics 3, 333–342 (1972) 15. Doherty, P., Łukaszewicz, W., Szałas, A.: Computing circumscription revisited: A reduction algorithm. J. Autom. Reasoning 18(3), 297–338 (1997) 16. Eberhard, S., Hetzl, S., Weller, D.: Boolean unification with predicates. J. Logic and Computation 27(1), 109–128 (2017) 17. Fitting, M.: First-Order Logic and Automated Theorem Proving. Springer, 2nd edn. (1995) 18. Gabbay, D.M., Schmidt, R.A., Szałas, A.: Second-Order Quantifier Elimination: Foundations, Computational Aspects and Applications. College Publications (2008) 19. Gabbay, D., Ohlbach, H.J.: Quantifier elimination in second-order predicate logic. In: KR’92. pp. 425–435. Morgan Kaufmann (1992) 20. Hodges, W.: A Shorter Model Theory. Cambridge University Press (1997) 21. Kanellakis, P.C., Kuper, G.M., Revesz, P.Z.: Constraint query languages. In: PODS’90. pp. 299–313. ACM Press (1990) 22. Kanellakis, P.C., Kuper, G.M., Revesz, P.Z.: Constraint query languages. J. Comput. Syst. Sci. 51(1), 26–52 (1995) 23. Koopmann, P., Schmidt, R.A.: Uniform interpolation of ALC-ontologies using fixpoints. In: FroCoS 2013. LNCS (LNAI), vol. 8152, pp. 87–102. Springer (2013) 40 24. Löwenheim, L.: Über das Auflösungsproblem im logischen Klassenkalkül. In: Sitzungsberichte der Berliner Mathematischen Gesellschaft. vol. 7, pp. 89–94. Teubner (1908) 25. Löwenheim, L.: Über die Auflösung von Gleichungen im logischen Gebietekalkül. Math. Ann. 68, 169–207 (1910) 26. Martin, U., Nipkow, T.: Unification in Boolean rings. In: CADE-8. LNCS (LNAI), vol. 230, pp. 506–513. Springer (1986) 27. Martin, U., Nipkow, T.: Unification in Boolean rings. J. Autom. Reasoning 4(4), 381–396 (1988) 28. Martin, U., Nipkow, T.: Boolean unification – The story so far. J. Symb. Comput. 7, 275–293 (1989) 29. Otto, M.: An interpolation theorem. Bulletin of Symbolic Logic 6, 447–462 (2000) 30. Rudeanu, S.: Boolean Functions and Equations. Elsevier (1974) 31. Rudeanu, S.: Lattice Functions and Equations. Springer (2001) 32. Rümmer, P., Hojjat, H., Kuncak, V.: Disjunctive interpolants for Horn-clause verification. In: CAV 2013. LNCS, vol. 8044, pp. 347–363. Springer (2013) 33. Schmidt, R.A.: The Ackermann approach for modal logic, correspondence theory and second-order reduction. J. Applied Logic 10(1), 52–74 (2012) 34. Schröder, E.: Vorlesungen über die Algebra der Logik. Teubner (vol. 1, 1890; vol. 2, pt. 1, 1891; vol. 2, pt. 2, 1905; vol. 3, 1895) 35. Seidl, M., Lonsing, F., Biere, A.: bf2epr: A tool for generating EPR formulas from QBF. In: PAAR-2012. EPiC, vol. 21, pp. 139–148 (2012) 36. Smullyan, R.M.: First-Order Logic. Springer, New York (1968), also republished with corrections by Dover publications, New York, 1995 37. Sofronie, V.: Formula-handling computer solution of Boolean equations. I. Ring equations. Bull. of the EATCS 37, 181–186 (1989) 38. Wernhard, C.: Heinrich Behmann’s contributions to second-order quantifier elimination. Tech. Rep. KRR 15–05, TU Dresden (2015) 39. Wernhard, C.: Second-order quantifier elimination on relational monadic formulas – A basic method and some less expected applications. In: TABLEAUX 2015. LNCS (LNAI), vol. 9323, pp. 253–269. Springer (2015) 40. Wernhard, C.: The Boolean solution problem from the perspective of predicate logic. In: FroCoS 2017. LNCS (LNAI), vol. 10483, pp. 333–350 (2017) 41. Zhao, Y., Schmidt, R.A.: Concept forgetting in ALCOI-ontologies using an Ackermann approach. In: ISWC 2015. LNCS, vol. 9366, pp. 587–602. Springer (2015)
2cs.AI
arXiv:1709.03028v2 [cs.CV] 23 Oct 2017 Convolutional Neural Networks: Ensemble Modeling, Fine-Tuning and Unsupervised Semantic Localization for Intraoperative CLE Images Mohammadhassan Izadyyazdanabadia,b,∗, Evgenii Belykha,b,c , Michael Mooneyb , Nikolay Martirosyanb , Jennifer Eschbacherb , Peter Nakajib , Mark C. Preulb , Yezhou Yanga a Arizona State University, Tempe AZ 85281, USA of Neurosurgery, Barrow Neurological Institute, St Joseph’s Hospital and Medical Center, Phoenix, AZ 85013 c Irkutsk State Medical University, Krassnogo vosstaniya 1, Irkutsk, Russia 664003 b Department Abstract Confocal laser endomicroscopy (CLE) is an advanced optical fluorescence technology undergoing assessment for applications in brain tumor surgery. Many of the CLE images can be distorted and interpreted as nondiagnostic. However, just one neat CLE image might suffice for intraoperative diagnosis of the tumor. While manual examination of thousands of nondiagnostic images during surgery would be impractical, this creates an opportunity for a model to select diagnostic images for the pathologists or surgeons review. In this study, we sought to develop a deep learning model to automatically detect the diagnostic images. We explored the effect of training regimes and ensemble modeling and localized histological features from diagnostic CLE images. The developed model could achieve higher agreement with the ground truth than the other human observers. With the speed and precision of the proposed method, it has potential to be integrated into the operative workflow in the brain tumor surgery. Keywords: Neural network, Unsupervised localization, Ensemble Modeling, Brain, Confocal Laser Endomicroscopy, Surgical vision. ∗ Corresponding author: Email address: [email protected] (Mohammadhassan Izadyyazdanabadi) Preprint submitted to Journal of Visual Communication and Image Representation October 25, 2017 1. Introduction Handheld, portable Confocal Laser Endomicroscopy (CLE) is being explored in neurosurgery because of its ability to image histopathological features of tissue in real time [1, 2, 3, 4]. CLE provides cellular resolution imaging during brain tumor surgery and thus may provide the surgeon with precise histopathological information during tumor resection in order to interrogate regions that may harbor malignant or spreading tumor, especially at the tumor border. (a) (b) (c) (d) Figure 1: Diagnostic and nondiagnostic CLE images (field of view = 475 × 475 µm). (a,b) Diagnostic images from glioma cases. (b) Unsupervisd localization of histopathological features of gliomas such as pleomorphism and hypercellularity detected by our model. For more results see Fig. 5. (c,d) Nondiagnostic images from meningioma cases occluded with motion (c) and blood artifact (d). Current CLE systems are able to image more than one image per second, and 2 thus over the course of examination of the surgical tumor resection or inspection area, hundreds to thousands of images may be collected. The number of images may become rapidly overwhelming for the neurosurgeon and neuropathologist when trying to quickly select a diagnostic or meaningful image or group of images as the surgical inspection progresses. CLE is designed to be used on the fly in real time while the surgeon operates the brain. Thus overcoming the barriers involved in image selection is a key component for making CLE a practical and advantageous technology for the neurosurgical operating room. A wide range of fluorophores are able to be used for CLE in gastroenterology, but fluorophore options are limited for in vivo human brain use due to potential toxicity [1, 3, 5]. In addition, motion and blood artifacts that are present in many of the images acquired with CLE using fluorescein sodium (FNa) are a barrier for revealing underlying meaningful histology. The display of suboptimal images or nondiagnostic frames interferes with the selection of and focus upon diagnostic images by the neurosurgeon and pathologist throughout the operation in order to make a correct intraoperative diagnosis. Previous assessment [6] of CLE in human brain tumor surgery found that about half of the acquired images were interpreted as nondiagnostic due to abundance of motion and blood artifacts or lack of discernible or characteristic histopathological features. Filtering out the nondiagnostic images before making an intraoperative diagnosis is challenging due to the high number of images acquired, the novel and frequently unfamiliar appearance of tissue features compared to conventional histology, great variability among images from the same tumor type, and potential similarity between images from other tumor types for the untrained interpreter (Fig. 1). Applications of machine learning in medical imaging have greatly increased in the last ten years, resulting in numerous computer-aided detection(CADe) and diagnosis(CADx) systems in ultrasound, magnetic resonance imaging (MRI), and computed tomography (CT) [7]. Applications of machine learning for CLE imaging in neurosurgery are yet to be performed. In this study, we developed an ensemble of deep convolutional neural networks that can automatically evaluate 3 the diagnostic value of CLE frames within milliseconds. Due to the limited number of images in our dataset, we sought to transfer learning benefits by using pretrained models, fine-tuning them in shallow and deep manner and compare results with the models trained from scratch. Our results demonstrated that a shallow fine-tuned model, although performs better than trained from scratch, is not enough for the optimal performance and that a deep fine-tuned model detects the diagnostic CLE frames better. We also investigated the effect of ensemble modeling by creating an ensemble of models which were crafted at the development stage and produced the minimum loss on validation dataset. Finally, we compared the performance among the ensemble of models and each single model. 2. Related Works 2.1. Convolutional Neural Networks Convolutional neural networks (CNNs), a subcategory of deep learning methods, have proven useful in visual imagery analysis from numerous fields, including medical images. This is mainly due to the deep multilayer architecture of CNNs which enables extracting abstract discriminant features, both local and global, present in the images. In the recent years, deep learning has been vastly applied in medical image or exam classification. According to a survey done by Litjens et al. [8], exam and object classification together make up the number one task of interest in medical image analysis followed by object detection and organ segmentation (exam classification alone is the third task of interest). Most of these studies in medical imaging field use one of the three following imaging modalities: MRI, microscopy or CT. Histopathological microscopic images and brain MRI scans were the first two areas where deep learning has been explored in medical imaging [8]. In histopathology, deep learning has been used for mitosis detection [9], classification of leukocytes [10] and nuclei detection and classification [11]. In brain MRI, 4 several studies have concluded that CNN benefits the diagnosis of Alzheimers disease [12, 13] as well as brain extraction [14] and lesion detection, classification, and tumor grading [15, 16]. No-reference image quality assessment has been formulated as a classification problem as employed in retinal [17] and echocardiographic[18] images. CNNs may also be exercised in the detection of key frames from a temporal sequence of frames in a video. Two studies demonstrated the use of classification scheme on ultrasound (US) stream video to label the frames [19, 20]. 2.2. Transfer Learning vs. Deep Training One of the major limitations in medical imaging is the small size of datasets. The number of images employed for deep learning applications in medical imaging is usually much smaller than those in computer vision. Therefore, two forms of transfer learning have gained great interest: 1. Application of a pretrained network on large-size natural images (i.e. ImageNet) as a feature extractor. 2. Initializing model parameters (weights and biases) using the data from a pretrained model [21] instead of random initialization. A previous study by Tajbaksh et al. [22] showed that a sufficiently fine-tuned AlexNet model could produce equal or better results than a deeply trained one for colonoscopy image quality assessment and few other medical applications. Here, we’ll study the fine tuning effect by extending it to Inception network architectures in single and ensemble mode. 2.3. Ensemble Modeling Ensemble modeling is a well established method for increasing the model performance and reducing its variance in machine learning [23, 24, 25]. Kumar et al. [26] created an ensemble of 5 different models to classify the image modality from ImageCLEF 2016 medical image dataset. Specifically, 2 classifiers were created by fine-tuning AlexNet and GoogLeNet with softmax and 3 other classifiers by training an SVM on top of the features extracted by AlexNet, GoogLeNet, and their combination. Their results showed the ensemble could 5 improve the top-1 accuracy of the classifier compared to single models, however it is not clear that how much of the improvement was because of the AlexNet and GoogLeNet combination or the 5 classifiers ensemble. Christodoulidis et al. [27] created an ensemble of multi-source transfer learning using an automatic model selection approach described in [ensembleselection]. After creating a pool of pretrained CNNs on several public texture datasets and fine-tuning them on the lung CT dataset, the top models which iterative grouping would produce the highest F-scores on the validation dataset were aggregated, creating an ensemble model. 5 ensemble models were developed and their output was then averaged to make the final output. Despite its computational complexity, it enhanced the lung disease pattern classification accuracy only by 2%. To generate diversity in our models while using the whole training dataset, we trained different neural networks on different data using cross-validation. Although previous studies have tried to create variant deep learning models using different network architectures, none of them have employed training data diversification through cross-validation as described in [28]. Our proposed ensemble employed model diversification both in the network architectures and in the training and validation datasets following [28]. 2.4. Confocal Laser Endomicroscopy in Neurosurgery Handheld, portable CLE has demonstrated its value for brain tumor surgery due to its ability to provide rapid intraoperative information regarding histopathological features of the tumor tissue [6]. Convenience, portability, and speed of CLE are significant advantages in surgery. A decision support system aiding and accelerating analysis of CLE images by the neuropathologist or neurosurgeon would improve the workflow in the neurosurgical operating room [29]. Potentially used at any time during the surgery, CLE interrogation of the tissue generates images with a speed of 0.8 - 1.2 frames per second. The frames are considered nondiagnostic when the histological features are obscured by the red blood cells or motion artifacts, are out of focus, or lack any useful 6 histopathological information. Acquired images are then exported from the instrument as JPEG or TIFF files for review. Currently, the pathologist reviews all images, including nondiagnostic ones, trying to explore the diagnostic frames for the diagnosis. Manual selection and review of thousands of images acquired at some point in surgery by the CLE operator is tedious and impractical for widespread use. Previously, we have presented [29] the first deeply trained CNN model for automatic detection of diagnostic CLE frames. In this work, we extend our previous work with the following contributions and advancements: 1. Dataset. Our dataset contains CLE images which is a novel technology in contrast to commonly used MRI or CT scans. The dataset used includes 20,734 CLE images from intracranial neoplasms. 2. Deep training, shallow fine-tuning or deep fine-tuning? The CNN architectures were trained in three regimes: I. deeply trained (train the network from scratch with model weights randomly initialized) II. shallow fine-tuned (fine-tune only the fully connected layer(s) of the model which are responsible for the classification) III. deeply fine-tuned (fine-tune the whole network using our dataset). In this study we report model accuracy on the test dataset for the best 5 models from each network architecture and training regime. Our work is different from [22] since it considers the fine tuning effect on two different network architectures and its effect on the ensemble models. 3. Ensemble modeling. Prior to the test phase, we created an ensemble of the best 5 models from each network and training regime. We explored the effect of ensemble modeling in all circumstances by comparing the ensemble performance with the average of single models. Our work is different from [26] since our ensemble generates diversity in single models by using different training and validation data achieved from nested-cross validation. Further, we studied the effect of ensemble modeling on different training scenarios rather than one. 7 4. Unsupervised localizing of histological features. We visualized the shallow neurons’ activation to depict the broad histological patterns; visualization of deep neurons activation could localize specific histopathological lesions for diagnostic images. The neural response of convolutional layers to the diagnostic images are visualized and analyzed by a neurosurgeon. We also extracted the CNN’s deepest neural activation in response to patches of the diagnostic images using a sliding-window. Qualitative assessment of the localized regions was performed by a neurosurgeon with further analysis of the histopathological features. 5. Interobserver study. We compared the interobserver agreement between physician-physician and ensemble of models-physician to compare our ensemble model performance with human performance. We also reported the kappa statistic for this observer study. 3. Methods 3.1. Image Acquisition In the following sections we briefly explain the confocal imaging instrument instrument specifications and the intraoperative data collection process. 3.1.1. Instrument specifications The CLE image acquisition system (Optiscan 5.1, Optiscan Pty, Ltd.) included a rigid pen-sized optical laser scanner with a 6.3 mm outer diameter and a working length of 150 mm. A 488 nm diode laser provided excitation light and the fluorescent emission signal was detected with a 505-585 nm band-pass filter. A single optical fiber acted as both the excitation pinhole and the detection pinhole for confocal isolation of the image plane. The detector signal was digitized synchronously with the scanning to construct images parallel to the tissue surface (en face optical sections). 8 Laser power was typically set to 550-900 µW and maximum power was limited to 1000 µW when applied to the brain tissue. A field of view of 475 × 475 µm was scanned at 1024 × 1024 pixels (1.2/second frame rate), with a lateral resolution of 0.7 µm and an axial resolution (i.e., effective optical slice thickness) of approximately 4.5 µm. 3.1.2. Intraoperative CLE imaging Seventy-four adult patients (31 male and 43 female) were enrolled in the study (mean age 47.5 years). Intraoperative CLE images were acquired both in vivo and ex vivo by 4 neurosurgeons. For in vivo imaging, multiple locations of the tissue around the lesion were imaged and excised from the patient. For ex vivo imaging, tissue samples suspicious for tumor were excised, placed on gauze and imaged on a separate work station in the operating room. Multiple images were obtained from each biopsy location. Co-registration of the CLE probe with the image guided surgical system allowed precise intraoperative mapping of CLE images with regard to the site of the biopsy. The only fluorophore administered was FNa (5mL, 10%) that was injected intravenously during the surgery. Precise location of the areas imaged with the CLE was marked with tissue ink. Imaged tissue was sent to the pathology laboratory for formalin fixation, paraffin embedding and histological sections preparation. Final histopathological assessment was performed by standard light microscopic evaluation of 10µm-thick hematoxylin and eosin (H & E)-stained sections. 3.2. Image annotation The image annotation process was done in two distinct stages: initial review and . 3.2.1. Initial review Initially all images were reviewed. A neuropathologist and 2 neurosurgeons who were not involved in the surgeries reviewed the CLE images. For each patient, the histopathological features of corresponding CLE images and H 9 & E-stained frozen and permanent sections were reviewed and the diagnostic value of each image was examined. When CLE image revealed clear identifiable histopathological feature, it was labeled as diagnostic; otherwise it was labeled as nondiagnostic. 3.2.2. Validation review The database of images was divided into development and test datasets (explained in dataset preparation 4.1). Test dataset composed of 4171 CLE images randomly chosen from various patients. The validation review (val review) dataset consists of 540 images randomly chosen from the test dataset. Following this separation, two neurosurgeons reviewed val-review dataset without having access to the corresponding H & E-stained slides and labeled them as diagnostic or nondiagnostic . 3.3. Convolutional Neural Networks Convolutional Neural Networks (CNNs) are multilayer learning frameworks and may consist of an input layer, a few convolutional layers, pooling layers, fully connected layers and the output. The goal of a CNN is to learn the hierarchy of underlying feature representations. We explain the fundamental elements of a CNN below. 3.3.1. Convolutional layer Convolutional layers, first introduced in [30] are the substitute of previous hand-crafted feature extractors. At each convolutional layer three dimensional matrices (kernels) are slid over the input and set the dot product of kernel weights with the receptive field of the input as the corresponding local output. This helps to retain the relative position of features to each other. The multi-kernel characteristic of convolutional layers enables them to prospectively extract several distinct feature maps from the same input image. 10 3.3.2. Activation layer The convolutional layer output then goes through an activation function to adjust the negative values. We employed the rectified linear unit (ReLU) which is usually the preferred choice because of its simplicity, higher speed, reduced likelihood of vanishing gradients (especially in deep networks) and tendency to add sparsity over other nonlinear functions such as sigmoid function. The in output of j th ReLU layer (aout j ), given its input (aj ), was calculated in-place (to consume less memory) by following: aout = max (ain j j , 0) (1) 3.3.3. Normalization layer Following the ReLU layer, a local response normalization (LRN) map is applied after the initial convolutional layers. This layer inhibits the local ReLU neurons’ activations since there’s no bound to limit them (Eq. 1). By using the Caffe implemented [31] LRN, the local regions are expanded across neighbor feature maps at each spatial location. The output of j th LRN layer (aout j ), given its input (ain j ), is calculated as: aout = j ain j (1 + α L PL n=1 2 β ain j (n) ) (2) th in where ain element of the ain j (n) is the n j and L is the length of aj vector (number of neighbor maps employed in the normalization). α, β and L are the layer’s hyperparameters and are set to their default values obtained from [32](α = 1, β = 0.75 and L = 5). 3.3.4. Pooling layer After rectification and normalization of convolutional layer output, it’s further down-sampled by pooling operations. Pooling operations accumulate values in a smaller region by subsampling operations such as max, min, and average sampling. Here, max pooling was applied. 11 3.3.5. Fully connected Layer Following several convolutional and pooling layers, the network lateral layers are fully connected. Each neuron of the layer’s output is greedily connected to all the layer’s input neurons. It can be thought of as a convolutional layer with kernel size of the layer input. The layer output is also passed through a ReLU layer. The fully connected layers are generally thought of as the classifier of a CNN model because they intake the most abstract features extracted in convolutional layers and make the output, which is the model prediction. 3.3.6. Dropout Layer Fully connected layers are usually followed by a dropout layer, except the last fully connected layer that produces the class-specific probabilities. In dropout layers, a subset of input neurons as well as all their connections are temporarily removed from the network. Srivastava et al.[33] have demonstrated this method efficiency at improving the CNN performance in numerous computer vision tasks through reducing the overfitting. 3.3.7. Learning The learning of a CNN is through Stochastic Gradient Descent (SGD) which stands on two major menhirs: Forward and Back Propagation. In forward propagation, the model makes predictions using the images in the training batch and the current model parameters. Once the prediction for all training images is made, the loss is calculated using the truth label provided by the experts in the initial review (explained in 3.2.1). In this work we adopt the softmax loss function given by: L(t, y) = − n N C 1 XX n eyk tk log( PC ) n ym N n=1 m=1 e (3) k=1 where tnk is the nth training image’s k th ground truth output, and ykn is the value of the k th output layer unit in response to the nth input training image. N is the number of training images in the minibatch, and since we consider 2 diagnostic value categories, C = 2. 12 Through the back propagation, the loss gradient with respect to all model weights aids upgrading the weights as follows: W (j, i + 1) = W (j, i) + µ∆W (j, i) − α(j, i) ∂L ∂W (j) (4) where W (j, i), W (j, i + 1) and ∆W (j, i) are the weights of j th convolutional layer at iteration i and i + 1 and the weight update of iteration i, µ is the momentum and α(j, i) is the learning rate and is dynamically lowered as the training progresses. 3.4. Evaluation Metrics In model performance estimation (explained in 4.3) we calculated the loss, accuracy, sensitivity, specificity and area under receiver operating characteristics (ROC) curve (AUC). Here, we assumed the state of being a diagnostic image as positive and being nondiagnostic as negative. This way, sensitivity determines the model ability to detect diagnostic images and specificity determines its ability to detect nondiagnostic images. Accuracy determines general capability of a model to detect diagnostic and nondiagnostic images correctly [34]. 4. Experimental Setup 4.1. Dataset Preparation Our dataset included 20,734 CLE images from 74 brain tumor cases. For each CLE image, the diagnostic quality was determined by the experts in the initial review. The dataset was divided into two main subsets on patient level: development (dev) and test. Our pilot study revealed that when the division is on image level (mixing the images from all the patients and dividing them randomly) the model would produce poor results on images from new patients. The total number of patients and images used at each stage are presented in Table 1. Each subset contains images from various tumor types (mainly from gliomas and meningiomas). The dev set will be available online. The test set was isolated all through the model development and was accessed only in the test phase. 13 4.2. Model Development After the initial data split, we employed a patient-based k-fold cross validation for model development. Fifty nine cases that were allocated for model development were divided into 5 groups. Since CNNs require a large set of hyperparameters to be defined optimally (i.e. initial value of the learning rate and its lowering policy, momentum, batch size, etc.), we used different values with grid searching throughout the model development process. For every set of feasible parameters, we trained the model on 4 folds and validated on the fifth left-out group of patients. The set of hyperparameters which produced the minimum average loss was employed for each set of experiments. The small dataset size was a main limitation of our study for using CNNs, especially with the patient-level data preparation. Therefore, we counterbalanced this limitation by fine-tuning the pretrained publicly available CNN architectures trained on large computer vision datasets (i.e. ImageNet). Though the question about how deep should we fine-tune the pretrained models for optimal results still remains unanswered, one study tried to answer this question using endoscopy and ultrasound images[22]. Due to the substantial intrinsic dissimilarities between the images in the 2 studies, we performed a similar Table 1: Dataset preparation: Patient-based allocation of diagnostic and nondiagnostic images from various neoplasms to model development and testing. Number of patients for each tumor type is also provided. Development Test 59 15 Gliomas 16 5 Meningiomas 24 6 Other neoplasms 19 4 16,366 4,171 Diagnostic 8,023 2,071 Nondiagnostic 8,343 2,100 No. of Patients (total) No. of Images (total) 14 Figure 2: Ensemble effect on network 1 (top) and network 2 (bottom) while using diverse training regimes. For both networks, the improvement was more noticeable with DT and DFT regimes. The arithmetic and geometric ensemble performed similarly. Neither of the two ensembles could improve network 2 trained with SFT. investigation. Our confocal images have a much higher spatial resolution and are fluorescent images from the brain. In total, we developed 42 models (30 single models and 12 ensemble models) using two network architectures and three training regimes (deep training, shallow fine-tuning and deep fine-tuning). The experiments are designed in order to practically find the optimal model development pathway that produces the highest performance in the considered clinical application. 4.2.1. Network architectures Two CNN architectures were applied in this study. Network 1 had 5 convolutional layers. The first two convolutional layers had 96 and 256 filters of size 11 × 11 and 5 × 5 with maximum pooling. The third, fourth and fifth convolu- 15 tional layers were connected back to back without any pooling in between. The third convolutional layer had 384 filters of size 3 × 3 × 256, the fourth layer had 384 filters of size 3 × 3 × 192 and the fifth layer had 256 filters of size 3 × 3 × 192 with maximum pooling. For more details please refer to [32]. Network 2 had 22 layers with parameters and 9 inception modules. Each inception module was a combination of filters of size 1×1, 3×3, 5×5 and a 3×3 max pooling, put together in parallel and the output filter banks concatenated into an input single vector for the next stage. For more details please refer to [35]. The pretrained model for network 1, exploited in fine-tuning experiments, was the iteration 360,000 snapshot of training the model on ImageNet classification with 1000 classes. The pretrained model for network 2 was iteration 2,400,000 of training on ImageNet classification dataset. Both models are publicly available in Caffe libraries [31]. 4.2.2. Training regimes We exercised various training regimes to see how deep fine-tuning should be done in CLE image classification for optimal results. Depending on which layers of the network are being learned through training, we had three regimes. In regime 1, deep training (DT), the whole model weights were initialized randomly (training from scratch) and got modified all through the training with nonzero learning rates. In regime 2, shallow fine-tuning (SFT), the whole model weights, except the last fully connected layer, were initialized with the corresponding values from the pretrained model and their values were fixed for the period of training. The last fully connected layer was initialized randomly and got tuned during training. In regime 3, deep fine-tuning (DFT), all model weights, except for the last fully connected layer, were initialized with the corresponding values from the pretrained model and last fully connected layer was initialized randomly. Throughout the training, all the CNN layers, including the last fully connected 16 layer, were tuned with nonzero learning rates. Our hyperparameter optimization showed that the SFT and DFT experiments required 10 times smaller initial learning rates (0.001) compared to the DT regime (0.01). To avoid overfitting, the training process was stopped after 3 epochs of consistent loss increment on the validation dataset. We also used dropout layer (ratio = 0.5) and L2 regularization (λ = 0.005). 4.2.3. Ensemble Modeling Let’s assume ykn (j) is the the value of the k th output layer unit of the j th CNN model in response to the nth input test image. The linear and log-linear ensemble classifier output for the same input would be: Ensnlinear = arg max k l X ykn (j) (5) j=1 Ensnlog−linear = arg max k l Y ykn (j) (6) j=1 where l is the number of CNN models combined to generate the ensemble models. Model selection was done in two forms: single models and ensemble of models. We selected the top model (with minimum loss on the validation dataset) from each fold of the 5-fold cross validation (Model 1-5 in Table 2). In each network architecture and training regime, we combined the top-5 developed single models to produce two ensembles of models using the arithmetic (5) and geometric mean (6) of their outputs. We created 12 ensemble models (2network architectures × 3training regimes × 2ensemble types ) in total and compared their performance with single models. 4.3. Interobserver Study Each solo and ensemble model developed was tested on the test dataset. The ensemble of network 2 models trained with DFT was also tested on the 17 val review images (3.2.2) to compare human-human and model-human interobserver agreements. The resulting agreement rate (val-rater 1 and 2) was further compared with the initial image review results. The agreement of the model prediction with the initial review was also calculated. The general agreements are compared and discussed in section 5.4. Kappa analysis was also done for further validation. Gold standard ground truth for the val review images was defined by majority voting (see Fig. 3). The agreements of the third rater with the gold standard and the proposed ensemble model with the gold standard is calculated and compared as well in Table 3. 4.4. Unsupervised Histological Feature Localization For localization of the histological features, we examined the neural activation at two sites. First, the activation of neurons in the first convolutional layer of the network 1 were visualized and the 96 feature planes were saved for review by a neurosurgeon. Neurons that presented high activation to the location of cellular structures in the input image were selected and seemed to be consistent with diverse diagnostic images. Secondly, we applied a sliding window of size 227 × 227 pixels (size of network 1 input after input cropping) with stride of 79 pixels over the diagnostic CLE images (1024 × 1024 pixels). The result was a 10 × 10 matrix that provided the diagnostic value of different locations of the input image (diagnostic map). The locations of input images corresponding to the highest activations of the diagnostic map were detected and marked with a bounding box. The detected features using each of these two ways were further reviewed by a neurosurgeon. 5. Results and Discussion We developed 42 models and tested them on 4,171 test images; accuracy rates (agreement with the initial review) are presented in Table 2. We found that network 2 resulted in more precise predictions about the diagnostic quality of 18 Figure 3: Interobserver study using gold standard ground truth. Gold standard was defined using the initial review and one of the val-raters (here val-rater 1). Then, the agreement of the ensemble model and the other val-rater (here val-rater 2) with the gold standard is calculated to compare the human-human with model-human agreement. *If the initial review and the val-rater 1 agreed on an image, it is added to the gold standard, otherwise it is disregarded. images than network 1 when DT and DFT training regimes were used, while SFT training regime resulted in slightly better accuracy of network 1, compared to network 2. Therefore, network 2 architecture is a better feature extraction tool for CLE images, since it concatenates multi-scale features inside its inception modules. 5.1. Ensemble or solo model? We did an ROC analysis for each of the two networks and three training regimes to see how the ensemble of models performed compared to the single 19 Table 2: The accuracy of different models on the test dataset. The top-5 models crafted from each training regime, as well as their arithmetic and geometric ensembles, were exerted. For each network, the ensemble of DFT models makes the most accurate predictions. The difference between arithmetic and geometric ensemble AUC was negligible. Network Training Network 1 Network 2 DT SFT DFT DT SFT DFT Model 1 0.685 0.760 0.760 0.731 0.746 0.746 Model 2 0.658 0.749 0.755 0.750 0.746 0.805 Model 3 0.677 0.751 0.765 0.715 0.747 0.797 Model 4 0.681 0.754 0.771 0.739 0.743 0.811 Model 5 0.699 0.753 0.775 0.721 0.747 0.777 Mean 0.680 0.753 0.765 0.731 0.746 0.787 0.704 0.755 0.788 0.754 0.750 0.816 0.703 0.758 0.786 0.755 0.751 0.818 Regime Arithmatic Ensemble Geometric Ensemble models. Fig. 2 presents the ROC curves and corresponding AUC values for each ensemble model and the mean of single models. The AUC value increased by 2% for both networks with DT and DFT when the ensemble is applied instead of the single model. This effect gets smaller with network 1 SFT and becomes negligible with network 2 SFT. The two arithmetic and geometric ensemble models produced roughly similar results (paired t-test: P value < 0.05 ). SFT models display less sensitivity to the ensemble effect compared to DT and DFT. This is not surprising since they represent identical models except in the softmax classifier layer which has been adjusted through training. 5.2. Which training regime: DT, SFT and DFT? Fig. 4 displays the results of ROC analysis when comparing the three training regimes in each network architecture and single/ensemble states. In all 20 Figure 4: Training regime effect on network 1 (left) and network 2 (right) while using single (top) or ensemble of models (bottom). In all circumstances the AUC for DFT regime was greater than the SFT and SFT is greater than DT, although the effect size varied. paired comparisons, DFT outperformed SFT and SFT outperformed the DT regime (paired t-test: P value < 0.05 ). We traced the AUC elevation from DT to DFT regime to see how much of it corresponded to the transformation of DT to SFT and SFT to DFT. For network 1, 70-80 % of the improvement occurred in the DT to SFT transformation, depending on whether it’s a single or ensemble model. For network 2 ensemble model (right bottom of Fig. 4), however, the AUC improvement caused by transforming the training regime from DT to SFT (2%) is only 25% of the total improvement from DT to DFT. For network 2 single model the AUC improvement was evenly divided between the two transformations. Our results from this experiment indicated that for our dataset, network 1 mainly required fine-tuning the classification layer and fine-tuning other layers 21 (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (k) (l) Figure 5: Unsupervised localization of the histopathological features from shallow and deep neurons inside the network. First column (a, e, i) shows the input CLE images from human glioblastoma obtained intraoperatively. Second column (b, f, j) displays activation of neurons from the first layer (conv1, neuron 24) (shallow features); it highlights some of the cellular areas present in the image. Third column (c, g, k) illustrates diagnostic regions of interest identified with sliding window approach. The boxed regions represent high activation of the deepest network neuron. Fourth column (d, h, l) contains images extracted from conv1 activation (neuron 22), representative of the high fluorescence signal, a diagnostic sign of blood-brain barrier disruption and leakage of fluorescent agent from the vessels into the extracellular space. 22 (feature extractors) had a smaller contribution. However, for network 2, finetuning the feature extractors was more important than modifying the classifier layer. Though, further experiments on more datasets are necessary to generalize this observation. 5.3. Histological features localization 8 out of total 384 reviewed colored neuron activation maps from the first layer were selected for 4 diagnostic CLE images representative for glioma. Selected activation maps highlighted diagnostic tissue architecture patterns in warm colors. Particularly, several maps emphasized regions of optimal image contrast, where hypercellular and abnormal nuclear features could be identified, and would serve as diagnostic features for image classification (Fig. 5, columns 2 and 4). Additionally, sliding window method was able to identify diagnostic aggregates of abnormally large malignant glioma cells and atypically hypercellular areas (Fig. 5, third column). Activation of the neurons in the first convolutional layer (conv1) were found to highlight areas with increased fluorescein signal, a sign specific to brain tumor regions. Increased fluorescent signal on CLE images represent areas with blood brain barrier disruption which correspond to the tumor areas visible on a contrast enhanced MR imaging. Interestingly, sliding window method and selected colored activation maps were not distracted or deceived by the red blood cells contamination, as they mostly highlighted tumor and brain cells rather then hypercellular areas due to bleeding. The proposed feature localization approach may be useful in the future to aid in the identification of not only the diagnostic frames, but also directing the surgeon’s attention to the image parts containing major histopathological features. 5.4. Inter-rater agreement Table 3 demonstrates the agreement between each of the val-raters and the initial review on the whole val review dataset and the gold standard subset (explained in Fig. 3). The model agreement with the initial review is larger 23 Table 3: Interobserver study results. The model-human agreement was higher than the human-human agreement both on whole val review dataset and the gold standard subset. Dataset Whole Val Gold-Standard Review Rater Val-Rater 1 General Cohen’s General Agreement Kappa Agreement 0.32, 66 % 67% Fair Val-Rater 2 0.47, 73 % 75 % Moderate Model 0.47, 76 % 85 % Moderate than each val-rater’s agreement with the initial review. This suggests that the model has successfully learned the histological features of the CLE images that are more probable to be noticed by the neurosurgeons when the corresponding H & E-stained histological slides were also provided for reference. To consider images from the val review set that the majority of raters agreed on, that is one of the val-raters agreed on with the initial review, we used the gold standard subset. The gap between the model-human and human-human agreements became even more evident (19% for val-rater 1 and 9% for val-rater 2) with the gold standard subset (Table 3, column 4). 6. Conclusion and future work This paper presents a deep CNN based approach that can automatically detect the diagnostic CLE images from brain tumor surgery. We used a manually annotated in-house dataset to train and test this approach. Our results showed that both deep fine-tuning and creating an ensemble of models could enhance the performance; but only their combination could reach the maximum accuracy. The ensemble effect was stronger in DT and DFT than SFT devel- 24 oped models. The proposed method was also able to localize some histological features of diagnostic images. Ultimately, Table 3 indicates that the proposed ensemble of deeply fine-tuned models could detect the diagnostic images with a higher agreement than the trained human observers. Other confocal imaging techniques may be aided by such deep learning models. Confocal reflectance microscopy (CRM) has been studied [36] for rapid, fluorophore-free evaluation of pitutary adenoma biopsy specimens ex vivo. CRM allows preserving the biopsy tissue for future permanent analysis, immunohistochemical studies, and molecular studies. Continued use of unsupervised image segmentation methods to detect meaningful histological features from confocal brain tumor images will likely allow for more rapid and detailed diagnosis. Acknowledgement This work was supported by the Newsome Family Endowed Chair of Neurosurgery Research at the Barrow Neurological Institute held by Dr. Preul and by funds from the Barrow Neurological Foundation. References [1] E. Belykh, N. L. Martirosyan, K. Yagmurlu, E. J. Miller, J. M. Eschbacher, M. Izadyyazdanabadi, L. A. Bardonova, V. A. Byvaltsev, P. Nakaji, M. C. Preul, Intraoperative fluorescence imaging for personalized brain tumor resection: Current state and future directions, Frontiers in Surgery 3. [2] P. Charalampaki, M. Javed, S. Daali, H.-J. Heiroth, A. Igressa, F. Weber, Confocal laser endomicroscopy for real-time histomorphological diagnosis: Our clinical experience with 150 brain and spinal tumor cases, Neurosurgery 62 (2015) 171–176. [3] S. Foersch, A. Heimann, A. Ayyad, G. A. Spoden, L. Florin, K. Mpoukouvalas, R. Kiesslich, O. Kempski, M. Goetz, P. Charalampaki, Confocal 25 laser endomicroscopy for diagnosis and histomorphologic imaging of brain tumors in vivo, PLoS One 7 (7) (2012) e41760. [4] N. Sanai, J. Eschbacher, G. Hattendorf, S. W. Coons, M. C. Preul, K. A. Smith, P. Nakaji, R. F. Spetzler, Intraoperative confocal microscopy for brain tumors: a feasibility analysis in humans, Neurosurgery 68 (2011) ons282–ons290. [5] A. Zehri, W. Ramey, J. Georges, M. Mooney, N. Martirosyan, M. Preul, P. Nakaji, Neurosurgical confocal endomicroscopy: A review of contrast agents, confocal systems, and future imaging modalities, Surgical neurology international 5 (2014) 60. [6] N. L. Martirosyan, J. M. Eschbacher, M. Y. S. Kalani, J. D. Turner, E. Belykh, R. F. Spetzler, P. Nakaji, M. C. Preul, Prospective evaluation of the utility of intraoperative confocal laser endomicroscopy in patients with brain neoplasms using fluorescein sodium: experience with 74 cases, Neurosurgical focus 40 (3) (2016) E11. [7] H. Greenspan, B. van Ginneken, R. M. Summers, Guest editorial deep learning in medical imaging: Overview and future promise of an exciting new technique, IEEE Transactions on Medical Imaging 35 (5) (2016) 1153– 1159. [8] G. Litjens, T. Kooi, B. E. Bejnordi, A. A. A. Setio, F. Ciompi, M. Ghafoorian, J. A. van der Laak, B. van Ginneken, C. I. Sánchez, A survey on deep learning in medical image analysis, arXiv preprint arXiv:1702.05747. [9] D. Ciresan, A. Giusti, L. M. Gambardella, J. Schmidhuber, Deep neural networks segment neuronal membranes in electron microscopy images, in: Advances in neural information processing systems, 2012, pp. 2843–2851. [10] J. Zhao, M. Zhang, Z. Zhou, J. Chu, F. Cao, Automatic detection and classification of leukocytes using convolutional neural networks, Medical & biological engineering & computing (2016) 1–15. 26 [11] K. Sirinukunwattana, S. E. A. Raza, Y.-W. Tsang, D. R. Snead, I. A. Cree, N. M. Rajpoot, Locality sensitive deep learning for detection and classification of nuclei in routine colon cancer histology images, IEEE transactions on medical imaging 35 (5) (2016) 1196–1206. [12] H.-I. Suk, D. Shen, Deep ensemble sparse regression network for alzheimers disease diagnosis, in: International Workshop on Machine Learning in Medical Imaging, Springer, 2016, pp. 113–121. [13] J. Shi, X. Zheng, Y. Li, Q. Zhang, S. Ying, Multimodal neuroimaging feature learning with multimodal stacked deep polynomial networks for diagnosis of alzheimer’s disease, IEEE journal of biomedical and health informatics. [14] S. S. M. Salehi, D. Erdogmus, A. Gholipour, Auto-context convolutional neural network (auto-net) for brain extraction in magnetic resonance imaging, IEEE Transactions on Medical Imaging. [15] M. Ghafoorian, N. Karssemeijer, T. Heskes, M. Bergkamp, J. Wissink, J. Obels, K. Keizer, F.-E. de Leeuw, B. van Ginneken, E. Marchiori, et al., Deep multi-scale location-aware 3d convolutional neural networks for automated detection of lacunes of presumed vascular origin, NeuroImage: Clinical 14 (2017) 391–399. [16] L. Zhao, K. Jia, Multiscale cnns for brain tumor segmentation and diagnosis, Computational and mathematical methods in medicine 2016. [17] D. Mahapatra, P. K. Roy, S. Sedai, R. Garnavi, Retinal image quality classification using saliency maps and cnns, in: International Workshop on Machine Learning in Medical Imaging, Springer, 2016, pp. 172–179. [18] A. Abdi, C. Luong, T. Tsang, J. Jue, D. Hawley, S. Fleming, K. Gin, J. Swift, R. Rohling, P. Abolmaesumi, Automatic quality assessment of echocardiograms using convolutional neural networks: Feasibility on the apical four-chamber view, IEEE Transactions on Medical Imaging. 27 [19] Y. Gao, M. A. Maraci, J. A. Noble, Describing ultrasound video content using deep convolutional neural networks, in: Biomedical Imaging (ISBI), 2016 IEEE 13th International Symposium on, IEEE, 2016, pp. 787–790. [20] A. Kumar, P. Sridar, A. Quinton, R. K. Kumar, D. Feng, R. Nanan, J. Kim, Plane identification in fetal ultrasound images using saliency maps and convolutional neural networks, in: Biomedical Imaging (ISBI), 2016 IEEE 13th International Symposium on, IEEE, 2016, pp. 791–794. [21] J. Yosinski, J. Clune, Y. Bengio, H. Lipson, How transferable are features in deep neural networks?, in: Advances in neural information processing systems, 2014, pp. 3320–3328. [22] N. Tajbakhsh, J. Y. Shin, S. R. Gurudu, R. T. Hurst, C. B. Kendall, M. B. Gotway, J. Liang, Convolutional neural networks for medical image analysis: full training or fine tuning?, IEEE transactions on medical imaging 35 (5) (2016) 1299–1312. [23] T. G. Dietterich, et al., Ensemble methods in machine learning, Multiple classifier systems 1857 (2000) 1–15. [24] Z.-H. Zhou, J. Wu, W. Tang, Ensembling neural networks: many could be better than all, Artificial intelligence 137 (1-2) (2002) 239–263. [25] D. Ciregan, U. Meier, J. Schmidhuber, Multi-column deep neural networks for image classification, in: Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, IEEE, 2012, pp. 3642–3649. [26] A. Kumar, J. Kim, D. Lyndon, M. Fulham, D. Feng, An ensemble of finetuned convolutional neural networks for medical image classification, IEEE journal of biomedical and health informatics 21 (1) (2017) 31–40. [27] S. Christodoulidis, S. Mougiakakou, M. Anthimopoulos, L. Ebner, A. Christe, Multisource transfer learning with convolutional neural networks for lung pattern analysis, IEEE journal of biomedical and health informatics 21 (1) (2017) 76–84. 28 [28] A. Krogh, J. Vedelsby, Neural network ensembles, cross validation, and active learning, in: Advances in neural information processing systems, 1995, pp. 231–238. [29] M. Izadyyazdanabadi, E. Belykh, N. Martirosyan, J. Eschbacher, P. Nakaji, Y. Yang, M. C. Preul, Improving utility of brain tumor confocal laser endomicroscopy: objective value assessment and diagnostic frame detection with convolutional neural networks, in: SPIE Medical Imaging, International Society for Optics and Photonics, 2017, pp. 101342J–101342J. [30] Y. LeCun, Y. Bengio, The handbook of brain theory and neural networks, MIT Press, Cambridge, MA, USA, 1998, Ch. Convolutional networks for images, speech, and time series, pp. 255–258. URL http://dl.acm.org/citation.cfm?id=303568.303704 [31] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, T. Darrell, Caffe: Convolutional architecture for fast feature embedding, arXiv preprint arXiv:1408.5093. [32] A. Krizhevsky, I. Sutskever, G. E. Hinton, Imagenet classification with deep convolutional neural networks, in: Advances in neural information processing systems, 2012, pp. 1097–1105. [33] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, R. Salakhutdinov, Dropout: A simple way to prevent neural networks from overfitting, The Journal of Machine Learning Research 15 (1) (2014) 1929–1958. [34] C. E. Metz, Basic principles of roc analysis, in: Seminars in nuclear medicine, Vol. 8, Elsevier, 1978, pp. 283–298. [35] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, A. Rabinovich, Going deeper with convolutions, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 1–9. 29 [36] M. A. Mooney, J. Georges, M. I. Yazdanabadi, K. Y. Goehring, W. L. White, A. S. Little, M. C. Preul, S. W. Coons, P. Nakaji, J. M. Eschbacher, Immediate ex-vivo diagnosis of pituitary adenomas using confocal reflectance microscopy: a proof-of-principle study, Journal of Neurosurgery. 30
1cs.CV
T HE LOSS SURFACE AND EXPRESSIVITY OF DEEP CONVOLUTIONAL NEURAL NETWORKS Quynh Nguyen and Matthias Hein Department of Mathematics and Computer Science Saarland Informatics Campus, Saarland University, Germany arXiv:1710.10928v1 [cs.LG] 30 Oct 2017 A BSTRACT We analyze the expressiveness and loss surface of practical deep convolutional neural networks (CNNs) with shared weights and max pooling layers. We show that such CNNs produce linearly independent features at a “wide” layer which has more neurons than the number of training samples. This condition holds e.g. for the VGG network. Furthermore, we provide for such wide CNNs necessary and sufficient conditions for global minima with zero training error. For the case where the wide layer is followed by a fully connected layer we show that almost every critical point of the empirical loss is a global minimum with zero training error. Our analysis suggests that both depth and width are very important in deep learning. While depth brings more representational power and allows the network to learn high level features, width smoothes the optimization landscape of the loss function in the sense that a sufficiently wide network has a well-behaved loss surface with potentially no bad local minima. 1 I NTRODUCTION It is well known that the optimization problem for training neural networks can have exponentially many local minima (Auer et al., 1996; Safran & Shamir, 2016) and NP-hardness has been shown in many cases (Blum & Rivest., 1989; Sima, 2002; Livni et al., 2014; Shamir, 2017; Shalev-Shwartz et al., 2017). However, it has been empirically observed (Dauphin et al., 2014; Goodfellow et al., 2015) that the training of state-of-the-art deep CNNs (LeCun et al., 1990; Krizhevsky et al., 2012), which are often overparameterized, is not hampered by suboptimal local minima. In order to explain the apparent gap between hardness results and practical performance, many interesting theoretical results have been recently developed (Andoni et al., 2014; Sedghi & Anandkumar, 2015; Janzamin et al., 2016; Haeffele & Vidal, 2015; Gautier et al., 2016; Brutzkus & Globerson, 2017; Soltanolkotabi, 2017; Soudry & Hoffer, 2017; Goel & Klivans, 2017; Du et al., 2017; Zhong et al., 2017; Tian, 2017; Li & Yuan, 2017) in order to identify conditions under which one can guarantee that local search algorithms like gradient descent converge to the globally optimal solution. However, it turns out that these approaches are either not practical as they require e.g. knowledge about the data generating measure, or a modification of network structure and objective, or they are for quite restricted network structures, mostly one hidden layer networks, and thus are not able to explain the success of deep networks in general. For deep linear networks one has achieved a quite complete picture of the loss surface as it has been shown that every local minimum is a global minimum (Baldi & Hornik, 1988; Kawaguchi, 2016; Freeman & Bruna, 2017; Hardt & Ma, 2017; Yun et al., 2017). By randomizing the nonlinear part of a feedforward network with ReLU activation function and making some additional simplifying assumptions, Choromanska et al. (2015a) can relate the loss surface of neural networks to a certain spin glass model. In this model the objective of local minima is close to the global optimum and the number of bad local minima decreases quickly with the distance to the global optimum. This is a very interesting result but is based on a number of unrealistic assumptions (Choromanska et al., 2015b). More recently, Nguyen & Hein (2017) have analyzed deep fully connected networks with general activation functions and could show that almost every critical point is a global minimum if one layer has more neurons than the number of training points. While this result holds for networks in practice, it requires a quite extensively overparameterized network. 1 In this paper we overcome the restriction of previous work in several ways. This paper is one of the first ones, which studies deep CNNs. CNNs are of high practical interest as they learn very useful representations (Zeiler & Fergus, 2014; Mahendran & Vedaldi, 2015; Yosinski et al., 2015) with a small number of parameters. We are only aware of Cohen & Shashua (2016) who study the expressiveness of CNNs with max-pooling layer and ReLU activation but with rather unrealistic filters (just 1 × 1) and no shared weights. In our setting we allow as well max pooling and general activation functions. Moreover, we can have an arbitrary number of filters and we study general convolutions as the filters need not be applied to regular structures like 3 × 3 but can be patch-based where the only condition is that all the patches have the size of the filter. Convolutional layers, fully connected layers and max-pooling layers can be combined in almost arbitrary order. We study in this paper the expressiveness and loss surface of such a CNN where one layer is wide, in the sense that it has more neurons than the number of training points. While this assumption sounds at first quite strong, we want to emphasize that the VGG network (Simonyan & Zisserman, 2015) and other CNNs, see Table 1, fulfills this condition. We show that such wide CNNs produce linearly independent feature representations at the wide layer and thus are able to fit the training data exactly (universal finite sample expressivity). This is even true if the bottom layers (from input to the wide layer) are chosen randomly with probability one. We think that this explains partially the results of Zhang et al. (2017) where they show experimentally for several CNNs that they are able to fit random labels. Moreover, we provide necessary and sufficient conditions for global minima with zero squared loss and show for a particular class of CNNs that almost all critical points are globally optimal, which to some extent explains why such wide CNNs can be optimized so efficiently. 2 D EEP C ONVOLUTIONAL N EURAL N ETWORKS We first introduce our notation and definition of CNNs. Let N be the number of training samples and denote by X = [x1 , . . . , xN ]T ∈ RN ×d , Y = [y1 , . . . , yN ]T ∈ RN ×m the input resp. output matrix for the training data (xi , yi )N i=1 , where d is the input dimension and m the number of classes. Let L be the number of layers of the network, where each layer is either a convolutional, maxpooling or fully connected layer. The layers are indexed from k = 0, 1, . . . , L which corresponds to input layer, 1st hidden layer, . . ., and output layer. Let nk be the width of layer k and fk : Rd → Rnk the function that computes for every input its feature vector at layer k. The convolutional layer consists of a set of patches of equal length where every patch is a subset of neurons from the same layer. Throughout this paper, we assume that the patches of every layer cover the whole layer, i.e. every neuron belongs to at least one of the patches, and that there are no patches that contain exactly the same subset of neurons. This means that if one patch covers the whole layer then it must be the only patch of the layer. Let Pk and lk be the number of  patches resp. the size of each patch at layer k for every 0 ≤ k <nL. For every input o x ∈ Rd , let x1 , . . . , xP0 ∈ Rl0 denote the set of patches at input layer and fk1 (x), . . . , fkPk (x) ∈ Rlk the set of patches at layer k. We denote by Tk the number of convolutional filters and by Wk = [wk1 , . . . , wkTk ] ∈ Rlk−1 ×Tk the corresponding parameter matrix of the convolutional layer k for every 1 ≤ k < L. Each column of Wk corresponds to one filter whose size is equal to the patch size of previous layer, that is, lk−1 . Furthermore, bk ∈ Rnk denotes the bias vector and σk : R → R the activation function for each layer. Note that one can use the same activation function for all layers but we use the general form to highlight the role of different layers. In this paper, all functions are applied componentwise, and we denote by [a] the set of integers {1, 2, . . . , a} and by [a, b] the set of integers from a to b. Definition 2.1 (Convolutional layer) A layer k is called a convolutional layer if its output fk (x) ∈ Rnk is defined for every x ∈ Rd as   p fk (x)h = σk wkt , fk−1 (x) + (bk )h (1) for every p ∈ [Pk−1 ], t ∈ [Tk ], h := (p − 1)Tk + t. The value of each neuron at layer k is computed by first taking the inner product between a filter of layer k and a patch at layer k − 1, adding the bias and then applying the activation function. The number of neurons at layer k is thus nk = Tk Pk−1 , which we denote as the width of layer k. 2 Our definition of a convolutional layer is quite general as every patch can be an arbitrary subset of neurons of the same layer and thus covers most of existing variants in practice. Definition 2.1 includes the fully connected layer as a special case by using Pk−1 = 1, lk−1 = 1 nk−1 , fk−1 (x) = fk−1 (x) ∈ Rnk−1 , Tk = nk , Wk ∈ Rnk−1 ×nk , bk ∈ Rnk . Thus we have only one patch which is the whole feature vector at this layer. Definition 2.2 (Fully connected layer) A layer k is called a fully connected layer if its output fk (x) ∈ Rnk is defined for every x ∈ Rd as   fk (x) = σk WkT fk−1 (x) + bk . (2) For some results we also allow max-pooling layers. Definition 2.3 (Max-pooling layer) A layer k is called a max-pooling layer if its output fk (x) ∈ Rnk is defined for every x ∈ Rd and p ∈ [Pk−1 ] as   p p fk (x)p = max (fk−1 (x))1 , . . . , (fk−1 (x))l . (3) k−1 A max-pooling layer just computes the maximum element of every patch from the previous layer. Since there are Pk−1 patches at layer k − 1, the number of output neurons at layer k is nk = Pk−1 . Reformulation of Convolutional Layers: For each convolutional or fully connected layer, we denote by Mk : Rlk−1 ×Tk → Rnk−1 ×nk the linear map that returns for every parameter matrix Wk ∈ Rlk−1 ×Tk the corresponding full weight matrix Uk = Mk (Wk ) ∈ Rnk−1 ×nk . For convolutional layers, Uk can be seen as the counterpart of the weight matrix Wk in fully connected layers. We define Uk = Mk (Wk ) = Wk if layer k is fully connected. Note that the mapping Mk depends on the patch structure of each convolutional layer k. For example, suppose that layer k has " # a d 1 2 two filters of length 3, that is, Wk = [wk , wk ] = b e , and nk−1 = 5 and patches given by c f   a b c 0 0 d e f 0 0    0 a b c 0  T T a 1D-convolution with stride 1 and no padding then: Uk = Mk (Wk ) =  , 0 d e f 0  0 0 a b c  0 0 d e f The above ordering of the rows of UkT of a convolutional layer is determined by Equation (1), in particular, the row index h of UkT is calculated as h = (p − 1)Tk + t, which means for every given patch p one has to loop over all the filters t and compute the corresponding value of the output unit by taking the inner product of the h-th row of UkT with the whole feature vector of the previous layer. We assume throughout this paper that that there is no non-linearity at the output layer. By ignoring max-pooling layers for the moment, the feature maps fk : Rd → Rnk can be written as  f0 (x) = x, fk (x) = σk gk (x) , where gk (x) = UkT fk−1 (x) + bk , ∀ 1 ≤ k ≤ L − 1 fL (x) = gL (x) = ULT fL−1 (x) + bL , where gk : Rd → Rnk is the pre-activation output at layer k. By stacking the feature vectors of layer k of all training samples, before and after applying the activation function, into a matrix, we define: Fk = [fk (x1 ), . . . , fk (xN )]T ∈ RN ×nk , and Gk = [gk (x1 ), . . . , gk (xN )]T ∈ RN ×nk . In this paper, we refer to Fk as the output matrix at layer k. It follows from above that F0 = X, Fk = σk (Gk ), where Gk = Fk−1 Uk + 1N bTk , FL = GL = FL−1 UL + 1N bTL . ∀1 ≤ k ≤ L − 1 (4) (5) In this paper, we assume the following general condition on the structure of convolutional layers. 3 Assumption 2.4 (Convolutional Structure) For every convolutional layer k, there exists at least one parameter matrix Wk ∈ Rlk−1 ×Tk for which the corresponding weight matrix Uk = Mk (Wk ) ∈ Rnk−1 ×nk has full rank. It is straightforward to see that Assumption 2.4 is satisfied if every neuron of a convolutional layer belongs to at least one patch and there are no identical patches. Lemma 2.5 If Assumption 2.4 holds, then for every convolutional layer k, the set of Wk ∈ Rlk−1 ×Tk for which Uk = Mk (Wk ) ∈ Rnk−1 ×nk does not have full rank has Lebesgue measure zero. Proof: Since Uk = Mk (Wk ) ∈ Rnk−1 ×nk and Mk is a linear map, every entry of Uk is a linear function of the entries of Wk . Let m = min(nk−1 , nk ), then the set of low rank matrices Uk  k−1 ,nk ) is characterized by a system of equations where the max(nm determinants of all m × m sub-matrices of Uk are zero. As the determinant is a polynomial in the entries of the matrix and thus a real analytic function, and the composition of analytic functions is again analytic, we get that each determinant is a real analytic function of Wk . By Assumption 2.4, there exists at least one Wk such that one of these determinants is non-zero. Thus by Lemma A.2, the set of Wk where this determinant is zero has Lebesgue measure zero. As all the sub-matrices need to have low rank in order that Uk has low rank, we get that the set of Wk where Uk has low rank has Lebesgue measure zero.  3 W IDE CNN S CAN LEARN LINEARLY INDEPENDENT FEATURES In this section, we show that a class of standard CNN architectures with convolutional layers, fully connected layers and max-pooling layers plus standard activation functions like ReLU, sigmoid, softplus, etc are able to learn linearly independent features at any hidden layer if that layer has more neurons than the number of training samples. Our assumption on training data is the following. Assumption 3.1 (Training data) The patches of different training samples are non-identical, that is, xpi 6= xqj for every p, q ∈ [P0 ], i, j ∈ [N ], i 6= j. Assumption 3.1 is quite weak, especially if the size of the input patches is larger. If the assumption does not hold, one can add a small perturbation to the training samples: {x1 + 1 , . . . , xN + N } . N The set of {i }i=1 where Assumption 3.1 is not fulfilled for the new dataset has Lebesgue measure N zero. Moreover, {i }i=1 can be chosen arbitrarily small so that the influence of the perturbation is negligible. Our main assumptions on the activation function of the hidden layers is the following. Assumption 3.2 (Activation function) The activation function σ is continuous, non-constant, and satisfies one of the following conditions: • ∃µ+ , µ− ∈ R s.t. lim σk (t) = µ− and lim σk (t) = µ+ and µ+ µ− = 0 t→−∞ t→∞ • ∃ρ1 , ρ2 , ρ3 , ρ4 ∈ R+ s.t. |σ(t)| ≤ ρ1 eρ2 t for t < 0 and |σ(t)| ≤ ρ3 t + ρ4 for t ≥ 0 Assumption 3.2 covers several standard activation functions. Lemma 3.3 The following activation functions satisfy Assumption 3.2: ReLU: σ(t) = max(0, t), Sigmoid: σ(t) = 1 1 , Softplus: σα (t) = ln(1 + eαt ) for α > 0. 1 + e−t α The softplus function is a smooth approximation of ReLU. It holds: 1 ln(1 + eαt ) = max(0, t). α The first main result of this paper is the following. lim σα (t) = lim α→∞ α→∞ (6) Theorem 3.4 (Linearly Independent Features) Let Assumption 3.1 hold for the training sample. Consider a deep CNN architecture for which there exists some layer 1 ≤ k ≤ L − 1 such that 4 1. Layer 1 and layer k are convolutional or fully connected while all the other layers can be convolutional, fully connected or max-pooling 2. The width of layer k is larger than the number of training samples, nk = Tk Pk−1 ≥ N 3. (σ1 , . . . , σk ) satisfy Assumption 3.2 Then there exist a set of parameters of the first k layers (Wl , bl )kl=1 such that the set of feature vectors {fk (x1 ), . . . , fk (xN )} are linearly independent. Moreover, (Wl , bl )kl=1 can be chosen in such a way that all the weight matrices Ul = Ml (Wl ) have full rank for every 1 ≤ l ≤ k. Theorem 3.4 implies that a large class of CNNs employed in practice with convolutional, fully connected and max-pooling layers and standard activation functions like ReLU, sigmoid or softplus can produce linearly independent features at any hidden layer if its width is larger than the number of training samples. Figure 1 shows an example of a CNN architecture that satisfies the conditions of Theorem 3.4 at the first convolutional layer (i.e. k = 1). Note that if a set of vectors are linearly independent then they are also linearly separable. In this sense, Theorem 3.4 suggests that deep and wide CNNs can produce linearly separable features at every wide hidden layer. Linear separability in neural networks has been recently studied by An et al. (2015), where the authors show that a two-hidden-layer fully connected network with ReLU activation function can transform any training set to be linearly separable while approximately preserving the distances of the training data at the output layer. Compared to An et al. (2015) our Theorem 3.4 is derived for CNNs with a wider range of activation functions. Moreover, our result shows even linear independence of features which is stronger than linear separability. Recently, Nguyen & Hein (2017) have shown a similar result for deep fully connected networks and analytic activation functions. We note that, in contrast to fully connected networks, for CNNs the condition nk ≥ N of Theorem 3.4 does not necessarily imply that the network has a huge number of parameters as the layers k and k + 1 can be chosen to be convolutional. In particular, the condition nk = Tk Pk−1 ≥ N can be fulfilled by increasing the number of filters Tk or by using a large number of patches Pk−1 (however Pk−1 is upper bounded by nk ), which is however only possible if lk−1 is small as otherwise our condition on the patches cannot be fulfilled. Interestingly, such a architecture has been used in the VGG-Net (Simonyan & Zisserman, 2015), where they use small 3 × 3 filters and minimal stride 1 in the first layer and thus they fulfill the condition nk ≥ N for k = 1, see Table 1, for ImageNet. Also note that other state-of-the-art-networks fulfill the condition in Table 1. Overall, Theorem 3.4 can be seen as a theoretical support for the usage of small filters and strides in practical CNN architectures as it increases the chance of achieving linear separability at early hidden layers in the network and also reduces the total number of training parameters. The reason why linear separability helps will be discussed in Section 4 when we analyze the loss surface of the CNNs. Note also that the condition nk ≥ N is a sufficient condition but not necessary to prove our results. In particular, we conjecture that linear separability might hold with far less number of neurons in practical applications. One might ask now how difficult it is to find such parameters which generate linearly independent features at a hidden layer? Our next result shows that once analytic activation functions 1 , e.g. sigmoid or softplus, are used at the first k hidden layers of the network, the linear independence of features at layer k holds with probability 1 even if one draws the parameters of the first k layers (Wl , bl )k randomly for any distribution which is absolutely continuous w.r.t. the Lebesgue measure. Theorem 3.5 Let Assumption 3.1 hold for the training samples. Consider a deep CNN for which there exists some layer 1 ≤ k ≤ L − 1 such that 1. Every layer from 1 to k is convolutional or fully connected 2. The width of layer k is larger than number of training samples, that is, nk = Tk Pk−1 ≥ N 3. (σ1 , . . . , σk ) are real analytic functions and satisfy Assumption 3.2. Then the set of parameters of the first k layers (Wl , bl )kl=1 for which the set of feature vectors {fk (x1 ), . . . , fk (xN )} of layer k are not linearly independent has Lebesgue measure zero. 1 A function σ : R → R is real analytic if its Taylor series about x0 converges to σ(x0 ) on some neighborhood of x0 for every x0 ∈ R (Krantz & Parks, 2002). 5 Note that Theorem 3.5 is a much stronger statement than Theorem 3.4, as it shows that for almost all weight configurations one gets linearly independent features at the wide layer. While Theorem 3.5 does not hold for the ReLU activation function as it is not an analytic function, we want to note again that one can approximate the ReLU function arbitrarily well using the softplus function (see Equation 6), which is an analytic function for any α > 0 and thus Theorem 3.5 applies. It is an open question if the result holds also for the ReLU activation function itself. It is very interesting to note that Theorem 3.5 explains previous empirical observations. In particular, Czarnecki et al. (2017) have shown empirically that linear separability is often obtained already in the first few hidden layers of the trained networks. This is done by attaching a linear classifier probe (Alain & Bengio, 2016) to every hidden layer in the network after training the whole network with backpropagation. The fact that Theorem 3.5 holds even if the parameters of the bottom layers up to the wide layer k are chosen randomly is also in line with recent empirical observations for CNN architectures that one has little loss in performance if the weights of the initial layers are chosen randomly without training (Jarrett et al., 2009; Saxe et al., 2011; Yosinski et al., 2014). An application of Theorem 3.4 yields the following universal finite sample expressivity for CNNs. In particular, a deep CNN architecture with scalar output can perfectly express the values of any scalar-valued function over a finite number of inputs as long as the width of the last hidden layer is larger than the number of training samples. Corollary 3.6 (Finite Sample Expressivity) Let Assumption 3.1 hold for the training samples. Consider a standard CNN with scalar output which satisfies the conditions of Theorem 3.4 at the last hidden layer k = L − 1. Let fL : Rd → R be the output of the network given as fL (x) = m X λj f(L−1)j (x) ∀x ∈ Rd j=1 where λ ∈ RnL−1 is the weight vector of the last layer. Then for every target output y ∈ RN , there always exist λ, (Wl , bl )L−1 so that it holds fL (xi ) = yi for every i ∈ [N ]. l=1 Proof: Since the network satisfies the conditions of Theorem 3.4 for k = L − 1, there exist a set of T N parameters (Wl , bl )L−1 l=1 such that rank(FL−1 ) = N. Let FL = [fL (x1 ), . . . , fL (xN )] ∈ R then −1 T T it follows that FL = FL−1 λ. Pick λ = FL−1 (FL−1 FL−1 ) y then it holds FL = FL−1 λ = y.  The expressivity of neural networks have been well-studied in the literature, in particular in the universal approximation theorems for one hidden layer networks (Cybenko, 1989; Hornik et al., 1989). Recently, many results have be shown why deep networks are superior to shallow networks in terms of expressiveness (Delalleau & Bengio, 2011; Telgarsky, 2016; 2015; Eldan & Shamir, 2016; Safran & Shamir, 2017; Yarotsky, 2016; Poggio et al., 2016; Liang & Srikant, 2017; Mhaskar & Poggio, 2016; Montufar et al., 2014; Pascanu et al., 2014; Raghu et al., 2017). While most of these results are derived for fully connected networks, it seems that Cohen & Shashua (2016) are the first ones who study expressivity of CNNs. In particular, they show that CNNs with max-pooling and ReLU units are universal in the sense that they can approximate any given function if the size of the networks is unlimited. However, the number of convolutional filters in this result has to grow exponentially with the number of patches and they do not allow shared weights in their result, which is a standard feature of CNNs. Our Corollary 3.6 shows universal finite sample expressivity, instead of universal function approximation, even for L = 2 and k = 1, that is a single convolutional layer network can perfectly fit the training data as long as the number of hidden units is not smaller than the number of samples. To the best of our knowledge, this is the first result on universal finite sample expressivity for a large class of practical CNNs. For fully connected networks, universal finite sample expressivity has been studied by Zhang et al. (2017); Nguyen & Hein (2017); Hardt & Ma (2017). They show that a network with a single hidden layer with N hidden units can express any training set of size N . While the number of training parameters of a single hidden layer CNN with N hidden units and scalar output is just T1 l0 + 2N , where T1 is the number of convolutional filters and l0 is the length of each filter, it is N d + 2N for fully connected networks. If we set the width of the hidden layer of the CNN as n1 = T1 P0 = N in order to fulfill the condition of Corollary 3.6, then the number of training parameters of the CNN becomes 2N + N l0 /P0 , which is less than 3N if l0 ≤ P0 compared to (d + 2)N for the fully connected case. In practice one almost always has l0 ≤ P0 as l0 is typically a small integer and P0 6 Figure 1: An example of CNN for a given training set of size N ≤ 100 × 26 × 26 = 67600. The width of each layer is d = n0 = 784, n1 = 67600, n2 = 16900, n3 = 2880, n4 = 720, n5 = 100, n6 = m = 10. One can see that n1 ≥ N and the network has pyramidal structure from layer 2 till the output layer, that is, n2 ≥ . . . ≥ n6 . Table 1: The width of the first convolutional layer (n1 ) and the maximum width of all the hidden layers (max1≤k≤L−1 nk ) of state-of-the-art CNN architectures in comparison with the size of ImageNet (N ≈ 1200K). All numbers are lower bounds on the true width. CNN Architecture VGG(A-E) (Simonyan & Zisserman, 2015) InceptionV3 (Szegedy et al., 2015b) InceptionV4 (Szegedy et al., 2016) SqueezeNet (Iandola et al., 2016) Enet (Paszke et al., 2016) GoogLeNet (Szegedy et al., 2015a) ResNet (He et al., 2016) Xception (Chollet, 2016) n1 3000K 700K 700K 1180K 1000K 800K 800K 700K maxk nk 3000K 1300K 1300K 1180K 1000K 800K 800K 700K is on the order of the dimension of the input. Thus, the number of parameters of the CNN to achieve universal finite sample expressivity is significantly smaller than that of fully connected networks. Obviously, in practice it is more important that the network generalizes rather than just fitting the training data. By using shared weights and sparsity structure, CNNs seem to implicitly regularize the model class in order to achieve good generalization performance. Thus even though they can fit also random labels or noise (Zhang et al., 2017) due to the universal finite sample expressivity shown in Corollary 3.6, they seem still to be able to generalize well (Zhang et al., 2017). 4 T HE L OSS S URFACE OF C ONVOLUTIONAL N EURAL N ETWORKS In this section, we restrict our analysis to the use of least squares loss. However, as we show later that the network can produce exactly the target output (i.e. FL = Y ) for some choice of parameters, all our results can also be extended to any other loss function where the global minimum is attained at FL = Y , for instance the squared Hinge-loss analyzed in Nguyen & Hein (2017). Let P denote the space of all parameters of the network. The final training objective Φ : P → R is given as   1 2 kFL − Y kF (7) Φ (Wl , bl )L l=1 = 2 where FL is defined as in (5), which is also the same as FL = σL−1 (. . . σ1 (XU1 + b1 ) . . .)UL + bL , where Ul = Ml (Wl ) for every 1 ≤ l ≤ L. Our assumptions on the architecture of CNNs is given below. Assumption 4.1 (CNN Architecture) Every layer in the network is a convolutional layer or fully connected layer and the output layer is fully connected. Moreover, there exists some hidden layer 1 ≤ k ≤ L − 1 such that the following holds: 7 • The width of layer k is larger than number of training samples, that is, nk = Tk Pk−1 ≥ N • All the activation functions of the hidden layers (σ1 , . . . , σL−1 ) satisfy Assumption 3.2 • (σk+1 , . . . , σL−1 ) are strictly increasing or strictly decreasing, and differentiable • The network is pyramidal from layer k + 1 till the output layer, that is, nk+1 ≥ . . . ≥ nL A typical example that satisfies Assumption 4.1 is the following (see Figure 1 for an illustration): • • • • • The first layer is a convolutional layer with n1 = T1 P0 ≥ N Every layer from layer 2 till the output layer is convolutional or fully connected (σ1 , . . . , σk ) can be ReLU, sigmoid or softplus (σk+1 , . . . , σL−1 ) can be sigmoid or softplus n2 ≥ n3 ≥ . . . ≥ nL One can easily check that the above example satisfies Assumption 4.1 for k = 1. In the following, let us define for every 1 ≤ k ≤ L − 1 the subset Sk ⊆ P such that  Sk := (Wl , bl )L rank(Fk ) = N and Ul has full rank for every l ∈ [k + 2, L] . l=1 The set Sk is the set of parameters where the feature vectors at layer k are linearly independent and all the weight matrices from layer k + 2 till the output layer have full rank. In the following, we examine conditions for global optimality in Sk . It is important to note that Sk covers almost the whole parameter space under an additional mild condition on the activation function. Lemma 4.2 Let Assumption 3.1 hold for the training sample and let the CNN architecture satisfy Assumption 4.1 for some layer 1 ≤ k ≤ L − 1. We assume further that the activation functions of the first k layers (σ1 , . . . , σk ) are real analytic. Then the set P \ Sk has Lebesgue measure zero. Proof: One can see that  P \ Sk ⊆ (Wl , bl )L l=1  rank(Fk ) < N ∪ (Wl , bl )L Ul has low rank for some layer l . l=1  By Theorem 3.5, it holds that the set (Wl , bl )L l=1 rank(Fk ) < N has Lebesgue measure zero. Moreover, it follows from Lemma 2.5 that the set (Wl , bl )L Ul has low rank for some layer l l=1 also has measure zero. Thus, P \ Sk has Lebesgue measure zero.  In the next key lemma, we bound the objective function in terms of its gradient magnitude w.r.t. the weight matrix of layer k for which nk ≥ N. For every matrix A ∈qRm×n , let σmin (A) and σmax (A) P 2 denote the smallest and largest singular value of A. Let kAkF = i,j Aij , kAkmin := min |Aij | i,j and kAkmax := max |Aij |. From Equations (4), (5) and (7), it follows that Φ can be seen as a function i,j of (Ul , bl )L l=1 , and thus we can use ∇Uk Φ. If layer k is fully connected then Uk = Mk (Wk ) = Wk and thus ∇Uk Φ = ∇Wk Φ. Otherwise, if layer k is convolutional then we note that ∇Uk Φ is “not” the true gradient of the training objective because Uk is not the true optimization parameter but Wk . In this case, the true gradient of Φ w.r.t. to the true parameter matrix Wk which consists of convolutional filters can be computed via chain rule as X ∂Φ ∂(Uk )ij ∂Φ = ∂(Wk )rs ∂(Uk )ij ∂(Wk )rs i,j Please note that even though we write the partial derivatives with respect to the matrix elements, ∇Wk Φ resp. ∇Uk Φ are the matrices of the same dimension as Wk resp. Uk in the following. Lemma 4.3 Consider a standard deep CNN which satisfies Assumption 4.1 for some hidden layer 1 ≤ k ≤ L − 1. Then it holds ∇Uk+1 Φ F ≥ σmin (Fk )  L−1 Y  σmin (Ul+1 ) kσl0 (Gl )kmin kFL − Y kF l=k+1 8 and ∇Uk+1 Φ F  L−1  Y ≤ σmax (Fk ) σmax (Ul+1 ) kσl0 (Gl )kmax kFL − Y kF . l=k+1 Our next main result is motivated by the fact that empirically when training over-parameterized neural networks with shared weights and sparsity structure like CNNs, there seem to be no problems with sub-optimal local minima. In many cases, even when training labels are completely random, local search algorithms like stochastic gradient descent can converge to a solution with almost zero training error (Zhang et al., 2017). To understand better this phenomenon, we first characterize in the following Theorem 4.4 the set of points in parameter space with zero loss, and then analyze in Theorem 4.5 the loss surface for a special case of the network. We emphasize that our results hold for standard deep CNNs with convolutional layers with shared weights and fully connected layers. Theorem 4.4 (Necessary and Sufficient Condition for Zero Training Error) Let Assumption 3.1 hold for the training sample and suppose that the CNN architecture satisfies Assumption 4.1 for some hidden layer 1 ≤ k ≤ L −1. Let Φ :  P → R be defined as in (7). Given any point L L (Wl , bl )l=1 ∈ Sk . Then it holds that Φ (Wl , bl )l=1 = 0 if and only if ∇Uk+1 Φ = 0. L (Wl ,bl )l=1   Proof: If Φ (Wl , bl )L l=1 = 0 then it follows from the upper bound of Lemma 4.3 that ∇Uk+1 Φ = 0. Now, we suppose that ∇Uk+1 Φ = 0. Since (Wl , bl )L l=1 ∈ Sk it holds rank(Fk ) = N and Ul has full rank for every l ∈ [k + 2, L]. Thus it holds σmin (Fk ) > 0 and σmin (Ul ) > 0 for every l ∈ [k + 2, L]. Moreover, (σk+1 , . . . , σL−1 ) have non-zero derivative by Assumption 4.1 and thus kσl0 (Gl )kmin > 0 for every l ∈ [k +  1, L − 1]. This  combined with the lower bound in Lemma 4.3 leads to kFL − Y kF = 0 and thus Φ Wl , bl )L l=1 = 0.  Lemma 4.2 shows that the set of points which are not covered by Theorem 4.4 has just measure zero under a mild condition. The necessary and sufficient condition of Theorem 4.4 is rather intuitive as it requires the gradient of the training objective to vanish w.r.t. the full weight matrix of layer k + 1 regardless of the architecture of this layer. It turns out that if layer k + 1 is fully connected, then this condition is always satisfied at a critical point, in which case we obtain that every critical point in Sk is a global minimum with exact zero training error. This is shown in the next Theorem 4.5, where we consider a classification task with m classes. Z ∈ Rm×m is the full rank class encoding matrix e.g. the identity matrix and (X, Y ) the training sample such that Yi: = Zj: whenever xi belongs to class j for every i ∈ [N ], j ∈ [m]. Theorem 4.5 (Loss Surface of CNNs) Let (X, Y, Z) be a training set for which Assumption 3.1 holds, the CNN architecture satisfies Assumption 4.1 for some hidden layer 1 ≤ k ≤ L − 1, and layer k + 1 is fully connected. Let Φ : P → R be defined as in (7). Then   L • Every critical point (Wl , bl )L ∈ S is a global minimum with Φ (W , b ) k l l l=1 l=1 = 0   L • There exist infinitely many global minima (Wl , bl )L l=1 ∈ Sk with Φ (Wl , bl )l=1 = 0 Theorem 4.5 indicates that the loss surface for this type of CNNs has a rather simple structure in the sense that almost every critical point is a global minimum with zero training error. It remains an interesting open problem if this result can be transferred to the case where layer k + 1 is also convolutional. In any case whether layer k + 1 is fully connected or not, one might still assume that a solution with zero training error still exists. However, note that Theorem 4.4 shows that at those points where the loss is zero, the gradient of Φ w.r.t. Uk+1 must be zero as well. An interesting special case of Theorem 4.5 is when the network is fully connected, in which case all the results of Theorem 4.5 hold without any modifications. Corollary 4.6 (Loss Surface of Fully Connected Nets) Let (X, Y, Z) be a training set with nonidentical training samples, i.e. xi 6= xj for every i 6= j and the fully connected network satisfies Assumption 4.1 for some layer 1 ≤ k ≤ L − 1. Let Φ : P → R be defined as in (7). Then the following holds 9   L • Every critical point (Wl , bl )L ∈ S is a global minimum with Φ (W , b ) k l l l=1 l=1 = 0   L • There exist infinitely many global minima (Wl , bl )L l=1 ∈ Sk with Φ (Wl , bl )l=1 = 0 Corollary 4.6 can be seen as a formal proof for the implicit assumption used in the recent work (Nguyen & Hein, 2017) that there exists a global minimum with zero training error for the class of fully connected, deep and wide networks. 5 C ONCLUSION We have analyzed the expressiveness and loss surface of CNNs in realistic and practically relevant settings. As state-of-the-art networks fulfill exactly or approximately the condition to have a sufficiently wide convolutional layer, we think that our results help to understand why current CNNs can be trained so effectively. It would be interesting to discuss the loss surface for cross-entropy loss, which currently does not fit into our analysis as the global minimum does not exist when the data is linearly separable. R EFERENCES G. Alain and Y. Bengio. Understanding intermediate layers using linear classifier probes. In ICLR Workshop, 2016. S. An, F. Boussaid, and M. Bennamoun. How can deep rectifier networks achieve linear separability and preserve distances? In ICML, 2015. A. Andoni, R. Panigrahy, G. Valiant, and L. Zhang. Learning polynomials with neural networks. In ICML, 2014. P. Auer, M. Herbster, and M. K. Warmuth. Exponentially many local minima for single neurons. In NIPS, 1996. P. Baldi and K. Hornik. Neural networks and principle component analysis: Learning from examples without local minima. Neural Networks, 2:53–58, 1988. A. Blum and R. L Rivest. Training a 3-node neural network is np-complete. In NIPS, 1989. A. Brutzkus and A. Globerson. Globally optimal gradient descent for a convnet with gaussian inputs, 2017. arXiv:1702.07966. F. Chollet. Xception: arXiv:1610.02357. Deep learning with depthwise separable convolutions, 2016. A. Choromanska, M. Hena, M. Mathieu, G. B. Arous, and Y. LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015a. A. Choromanska, Y. LeCun, and G. B. Arous. Open problem: The landscape of the loss surfaces of multilayer networks. COLT, 2015b. N. Cohen and A. Shashua. Convolutional rectifier networks as generalized tensor decompositions. In ICML, 2016. G. Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals, and Systems, 2:303–314, 1989. W. M. Czarnecki, G. Swirszcz, M. Jaderberg, S. Osindero, O. Vinyals, and K. Kavukcuoglu. Understanding synthetic gradients and decoupled neural interfaces. In ICML, 2017. Y. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli, and Y. Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In NIPS, 2014. O. Delalleau and Y. Bengio. Shallow vs. deep sum-product networks. In NIPS, 2011. 10 S. S. Du, J. D. Lee, and Y. Tian. arXiv:1709.06129. When is a convolutional filter easy to learn?, 2017. R. Eldan and O. Shamir. The power of depth for feedforward neural networks. In COLT, 2016. C. D. Freeman and J. Bruna. Topology and geometry of half-rectified network optimization. In ICLR, 2017. A. Gautier, Q. Nguyen, and M. Hein. Globally optimal training of generalized polynomial neural networks with nonlinear spectral methods. In NIPS, 2016. S. Goel and A. Klivans. arXiv:1709.06010. Learning depth-three neural networks in polynomial time, 2017. I. J. Goodfellow, O. Vinyals, and A. M. Saxe. Qualitatively characterizing neural network optimization problems. In ICLR, 2015. B. D. Haeffele and R. Vidal. Global optimality in tensor factorization, deep learning, and beyond, 2015. arXiv:1506.07540v1. M. Hardt and T. Ma. Identity matters in deep learning. In ICLR, 2017. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 2:359–366, 1989. F. N. Iandola, S. Han, M. W. Moskewicz, K. Ashraf, W. J. Dally, and K. Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and < 0.5mb model size, 2016. arXiv:1602.07360. M. Janzamin, H. Sedghi, and A. Anandkumar. Beating the perils of non-convexity: Guaranteed training of neural networks using tensor methods. arXiv:1506.08473, 2016. K. Jarrett, K. Kavukcuoglu, and Y. LeCun. What is the best multi-stage architecture for object recognition? In CVPR, 2009. K. Kawaguchi. Deep learning without poor local minima. In NIPS, 2016. S. G. Krantz and H. R. Parks. A Primer of Real Analytic Functions. Birkhäuser, Boston, second edition, 2002. A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. Y. LeCun, B. Boser, J.S. Denker, D. Henderson, R.E. Howard, W. Hubbard, and L.D. Jackel. Handwritten digit recognition with a back-propagation network. In NIPS, 1990. Y. Li and Y. Yuan. Convergence analysis of two-layer neural networks with relu activation, 2017. arXiv:1705.09886. S. Liang and R. Srikant. Why deep neural networks for function approximation? In ICLR, 2017. R. Livni, S. Shalev-Shwartz, and O. Shamir. On the computational efficiency of training neural networks. In NIPS, 2014. A. Mahendran and A. Vedaldi. Understanding deep image representations by inverting them. In CVPR, 2015. H. Mhaskar and T. Poggio. Deep vs. shallow networks : An approximation theory perspective, 2016. arXiv:1608.03287. B. Mityagin. The zero set of a real analytic function, 2015. arXiv:1512.07276. G. Montufar, R. Pascanu, K. Cho, and Y. Bengio. On the number of linear regions of deep neural networks. In NIPS, 2014. 11 Q. Nguyen and M. Hein. The loss surface of deep and wide neural networks. In ICML, 2017. V. D. Nguyen. Complex powers of analytic functions and meromorphic renormalization in qft, 2015. arXiv:1503.00995. R. Pascanu, G. Montufar, and Y. Bengio. On the number of response regions of deep feedforward networks with piecewise linear activations. In ICLR, 2014. A. Paszke, A. Chaurasia, S. Kim, and E. Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation, 2016. arXiv:1606.02147. T. Poggio, H. Mhaskar, L. Rosasco, B. Miranda, and Q. Liao. Why and when can deep – but not shallow – networks avoid the curse of dimensionality: a review, 2016. arXiv:1611.00740. M. Raghu, B. Poole, J. Kleinberg, S. Ganguli, and J. Sohl-Dickstein. On the expressive power of deep neural networks. In ICML, 2017. I. Safran and O. Shamir. On the quality of the initial basin in overspecified networks. In ICML, 2016. I. Safran and O. Shamir. Depth-width tradeoffs in approximating natural functions with neural networks. In ICML, 2017. A. Saxe, P. W. Koh, Z. Chen, M. Bhand, B. Suresh, and A. Y. Ng. On random weights and unsupervised feature learning. In ICML, 2011. H. Sedghi and A. Anandkumar. Provable methods for training neural networks with sparse connectivity. In ICLR Workshop, 2015. S. Shalev-Shwartz, O. Shamir, and S. Shammah. Failures of gradient-based deep learning. In ICML, 2017. O. Shamir. Distribution-specific hardness of learning neural networks, 2017. arXiv:1609.01037. J. Sima. Training a single sigmoidal neuron is hard. Neural Computation, 14:2709–2728, 2002. K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. M. Soltanolkotabi. Learning relus via gradient descent, 2017. arXiv:1705.04591. D. Soudry and E. Hoffer. Exponentially vanishing sub-optimal local minima in multilayer neural networks, 2017. arXiv:1702.05777. C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015a. C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision, 2015b. arXiv:1512.00567. C. Szegedy, S. Ioffe, V. Vanhoucke, and A. Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning, 2016. arXiv:1602.07261. M. Telgarsky. Representation benefits of deep feedforward networks, 2015. arXiv:1509.08101v2. M. Telgarsky. Benefits of depth in neural networks. In COLT, 2016. Y. Tian. An analytical formula of population gradient for two-layered relu network and its applications in convergence and critical point analysis. In ICML, 2017. D. Yarotsky. Error bounds for approximations with deep relu networks, 2016. arXiv:1610.01145. J. Yosinski, J. Clune, Y. Bengio, and H. Lipson. How transferable are features in deep neural networks? In NIPS, 2014. 12 J. Yosinski, J. Clune, A. Nguyen, T. Fuchs, and H. Lipson. Understanding neural networks through deep visualization. In ICML, 2015. C. Yun, S. Sra, and A. Jadbabaie. Global optimality conditions for deep neural networks, 2017. arXiv:1707.02444. M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014. C. Zhang, S. Bengio, M. Hardt, B. Recht, and Oriol Vinyals. Understanding deep learning requires re-thinking generalization. In ICLR, 2017. K. Zhong, Z. Song, P. Jain, P. Bartlett, and I. Dhillon. Recovery guarantees for one-hidden-layer neural networks. In ICML, 2017. A A.1 M ISSING P ROOFS OF S ECTION 3 P ROOF OF L EMMA 3.3 • ReLU: It holds for every t < 0 that σ(t) = max(0, t) = 0 < et , and for t ≥ 0 that σ(t) = t < t + 1. Thus ReLU satisfies the second condition of Assumption 3.2. • Sigmoid: It holds that lim t→−∞ 1 = 0, 1 + e−t lim t→∞ 1 = 1. 1 + e−t Thus σ satisfies the first condition of Assumption 3.2. • Softplus: Since 1 + eαt ≤ 2eαt for every t ≥ 0, it holds for every t ≥ 0 that 0 ≤ σα (t) = 1 log(2) 1 log(1 + eαt ) ≤ log(2eαt ) = + t. α α α Moreover, since log(1 + t) ≤ t for t > 0, it holds log(1 + eαt ) ≤ eαt for every t ∈ R. Thus αt it holds that 0 ≤ σα (t) ≤ eα for every t < 0. Therefore σα satisfies the second condition of Assumption 3.2 for ρ1 = 1/α, ρ2 = α, ρ3 = 1, ρ4 = log(2)/α. A.2 P ROOF OF T HEOREM 3.4 To prove Theorem 3.4, we first show that Assumption 3.1 can be transported from the input to the output layer. Lemma A.1 Let Assumption 3.1 hold for the training sample. Consider a standard deep CNN architecture which satisfies the following 1. The first layer is either convolutional or fully connected while all the other layers can be convolutional, fully connected or max-pooling 2. (σ1 , . . . , σL ) are continuous and non-constant activation functions Then for every layer 1 ≤ k ≤ L, there exist a set of parameters of the first k layers (Wl , bl )kl=1 such that it holds fkp (xi ) 6= fkq (xj ) for every p, q ∈ [Pk ], i, j ∈ [N ], i 6= j. Moreover, (Wl , bl )kl=1 can be chosen in such a way that, except for max-pooling layers, all the weight matrices Ul = Ml (Wl ) have full rank for every 1 ≤ l ≤ k. Proof: Since Assumption 3.1 holds for the training inputs, one can first pick (W1 , b1 ) such that Assumption 3.1 holds at the first layer. Then given that Assumption 3.1 is satisfied at the first layer, the selection of the parameters of the higher layers can be done similarly. Since our definition of a convolutional layer includes fully connected layer as a special case, it is sufficient to prove the result for the general convolutional structure. Since the first layer is a convolutional layer by our assumption, we denote by Q = [a1 , . . . , aT1 ] ∈ Rl0 ×T1 a matrix that 13 contains the set of convolutional filters of the first layer. Note here that there are T1 filters, namely  a1 , . . . , aT1 , where each filter at ∈ Rl0 for every t ∈ [T1 ]. Let us define the set D 0 E o [ n  at , xpi − at , xqj = 0 . Q ∈ Rl0 ×T1 S := Q ∈ Rl0 ×T1 M1 (Q) has low rank ∪ i6=j p,q∈[P0 ] t,t0 ∈[T1 ] Basically, S is the set of “true” parameter matrices of the first layer where the corresponding weight matrix M1 (Q) has low rank or there exists two patches of two different training samples that have the same inner product with some corresponding two filters. By Assumption 3.1 it holds that xpi 6= xqj for every p, q ∈ [P0 ], i 6= j, and thus the right hand side in the above formula of S is just the union of a finite number of hyperplanes which has Lebesgue measure zero. For the left hand side, it follows from Lemma 2.5 that the set of Q for which M1 (Q) does not have full rank has measure zero. Thus the left hand side of S is a set of measure zero. Since S is the union of two measure zero sets, it has also measure zero, and thus the complementary set Rl0 ×T1 \ S must be non-empty and we choose W1 ∈ Rl0 ×T1 \ S. Since σ1 is a continuous and non-constant function, there exists an interval (µ1 , µ2 ) such that σ1 is bijective on (µ1 , µ2 ). We select and fix some matrix Q = [a1 , . . . , aT1 ] ∈ Rl0 ×T1 \ S and select some β ∈ (µ1 , µ2 ). Let α > 0 be a free variable and W1 = [w11 , . . . , w1T1 ] where w1t denotes the t-th filter of the first layer. Let us pick w1t = αQ:t = αat , (b1 )h = β, ∀t ∈ [T1 ], h ∈ [n1 ]. It follows that W1 = αQ and thus M1 (W1 ) = M1 (αQ) = αM1 (Q) as M1 is a linear map by our definition. Since Q ∈ / S by construction, it holds that M1 (W1 ) has full rank for every α 6= 0. By Definition 2.1, it holds for every i ∈ [N ], p ∈ [P0 ], t ∈ [T1 ], h = (p − 1)T1 + t that f1 (xi )h = σ1 ( w1t , xpi + (b1 )h ) = σ1 (α at , xpi + β). Since β ∈ (µ1 , µ2 ), one can choose a sufficiently small positive α such that it holds α ha, xpi i + β ∈ (µ1 , µ2 ) for every i ∈ [N ], p ∈ [P0 ], t ∈ [T1 ]. Under this construction, we will show that every entry of f1 (xi ) must be different from every entry of f1 (xj ) for i 6= j. Indeed, let us compare f1 (xi )h and f1 (xj )v for some h = (p − 1)T1 + t, v = (q − 1)T1 + t0 and i 6= j. It holds for sufficient small α > 0 that  D 0 E   f1 (xi )h − f1 (xj )v = σ1 α at , xpi + β − σ1 α at , xqj + β 6= 0 (8) D 0 E where the last inequality follows from three facts. First, it holds hat , xpi i = 6 at , xqj since Q ∈ / S. Second, for the chosen α the values of the arguments of the activation function σ1 lie within (µ1 , µ2 ). Third, since σ1 is bijective on (µ1 , µ2 ), it maps different inputs to different outputs. Now, since the entries of f1 (xi ) and that of f1 (xj ) are already pairwise different from each other, their corresponding patches must be also different from each other no matter how the patches are organized in the architecture, that is, f1p (xi ) 6= f1q (xj ) ∀p, q ∈ [P1 ], i, j ∈ [N ], i 6= j. Now, if the network has only one layer, i.e. L = 1, then we are done. Otherwise, we will prove via induction that this property can be translated to any higher layer. In particular, suppose that one has already constructed (Wl , bl )kl=1 so that it holds fk (xi )h − fk (xj )v 6= 0 ∀h, v ∈ [nk ], i, j ∈ [N ], i 6= j. (9) This is true for k = 1 due to (8). We will show below that (9) can also hold at layer k + 1. 1. Case 1: Layer k + 1 is convolutional or fully connected. Since (9) holds for k by our induction assumption, it must hold that fkp (xi ) 6= fkq (xj ) ∀p, q ∈ [Pk ], i, j ∈ [N ], i 6= j. which means Assumption 3.1 also holds for the set of features at layer k. Thus one can follows the similar construction as done for layer 1 above by considering the output of layer k as input to layer k + 1. Then one obtains that there exist (Wk+1 , bk+1 ) where Uk+1 = Mk+1 (Wk+1 ) has full rank so that the similar inequality (8) now holds for layer k + 1, which thus implies (9) holds for k + 1. 14 2. Case 2: layer k + 1 is max-pooling By Definition 2.3, it holds nk+1 = Pk and one has for every p ∈ [Pk ]   fk+1 (x)p = max (fkp (x))1 , . . . , (fkp (x))lk . Since (9) holds at layer k by our induction assumption, every entry of every patch of fk (xi ) must be different from every entry of every patch of fk (xj ) for every i 6= j, that is, (fkp (xi ))r 6= (fkq (xj ))s for every r, s ∈ [lk ], p, q ∈ [Pk ], i 6= j. Therefore, their maximum elements cannot be the same, that is, fk+1 (xi )p 6= fk+1 (xj )q ∀p, q ∈ [nk+1 ], i, j ∈ [N ], i 6= j. which proves (9) for layer k + 1. So far, we have proved that (9) holds for every 1 ≤ k ≤ L. Thus it follows that for every layer k, there exists a set of parameters of the first k layers for which the patches at layer k of different training samples are pairwise different from each other, that is, fkp (xi ) 6= fkq (xj ) for every p, q ∈ [Pk ], i 6= j. Moreover, except for max-pooling layers, all the weight matrices up to layer k have been chosen to have full rank.  Proof of Theorem 3.4 Let A = Fk = [fk (x1 )T , . . . , fk (xN )T ] ∈ RN ×nk . Since our definition of a convolutional layer includes fully connected layer as a special case, it is sufficient to prove the result for convolutional structure. By Theorem’s assumption, layer k is convolutional and thus it holds by Definition 2.1 that   p (xi ) + (bk )j Aij = fk (xi )j = σ wkt , fk−1 for every i ∈ [N ], t ∈ [Tk ], p ∈ [Pk−1 ] and j = (p, t) := (p − 1)Tk + t ∈ [nk ]. In the following, we show that there exists a set of parameters of the network such that rank(A) = N and all the weight matrices Ul = Ml (Wl ) have full rank. First, one observes that the subnetwork consisting of all the layers from the input layer till layer k − 1 satisfies the conditions of Lemma A.1. Thus by applying Lemma A.1 to this subnetwork, one obtains that there exist (Wl , bl )k−1 which all the matrices (Ul )k−1 l=1 for l=1 , except for max-pooling p q layers, have full rank and it holds that fk−1 (xi ) 6= fk−1 (xj ) for every p, q ∈ [Pk−1 ], i 6= j. The main idea now is to fix the parameters of these layers and pick (Wk , bk ) such that Uk = Mk (Wk ) has full rank and it holds rank(A) = N . Let us define the set [ [  p p S= a ∈ Rlk−1 a, fk−1 (xi ) − fk−1 (xj ) = 0 . i6=j p∈[Pk−1 ] p p From the above construction, it holds that fk−1 (xi ) 6= fk−1 (xj ) for every p ∈ [Pk−1 ], i 6= j, and thus S is the union of a finite number of hyperplanes which thus has measure zero. Let us denote by Q = [a1 , . . . , aTk ] ∈ Rlk−1 ×Tk a parameter matrix that contains all the convolutional filters of layer k in its columns. Pick at ∈ Rlk−1 \ S for every t ∈ [Tk ], so that it holds that Uk = Mk (Q) has full rank. Note here that such matrix Q always exists. Indeed, Q is chosen from a positive measure set as its columns (i.e. at ) are picked from a positive measure set. Moreover, the set of matrices Q for which Mk (Q) has low rank has just measure zero due to Lemma 2.5. Thus there always exists at least one matrix Q so that all of its columns do not belong to S and that Mk (Q) has full rank. In the rest of the proof, the value of matrix Q is fixed. Let α ∈ R be a free parameter. Since σk is a continuous and non-constant function, there exist a β ∈ R such that σk (β) 6= 0. Let the value of β be fixed as well. We construct the convolutional filters Wk = [wk1 , . . . , wkTk ] and the biases bk ∈ Rnk of layer k as follows. For every p ∈ [Pk−1 ], t ∈ [Tk ], j = (p, t), we define wkt = −αat , p (bk )j = α at , fk−1 (xj ) + β. It follows that Wk = −αQ and thus Uk = Mk (Wk ) = −αMk (Q) as Mk is a linear map. Moreover, since Mk (Q) has full rank by construction, it holds that Uk has full rank for every 15 α 6= 0. As α varies, we get a family of matrices A(α) ∈ RN ×nk where it holds for every i ∈ [N ], j = (p, t) ∈ [nk ] that     p p p A(α)ij = σk wkt , fk−1 (xi ) + (bk )j = σk α at , fk−1 (xj ) − fk−1 (xi ) + β . (10) Note that each row of A(α) corresponds to one training sample and that permutations of the rows of A(α) do not change the rank of A(α). We construct a permutation γ of {1, 2, . . . , N } as follows. For every j = 1, 2, . .l. , Nm, let (p, t) be the by j (the inverse transformation for l tuple m determined  j j given j ∈ [nk ] is p = Tk and t = j − Tk − 1 Tk ) and define γ(j) = arg min i∈{1,2,...,N } \ {γ(1),...,γ(j−1)} p at , fk−1 (xi ) . Note that γ(j) is unique for every 1 ≤ j ≤ N since at ∈ / S. It is clear that γ constructed as above is a permutation of {1, 2, . . . , N } since at every step we take a different element from the index set [N ]. From the definition of γ(j), it holds that for every j = (p, t) ∈ [N ], i ∈ [N ], i > j that p p at , fk−1 (xγ(j) ) < at , fk−1 (xγ(i) ) . We can relabel the training data according to the permutation so that w.l.o.g we can assume that γ is the identity permutation, that is, γ(j) = j for every j ∈ [N ], in which case it holds for every j = (p, t) ∈ [N ], i ∈ [N ], i > j that p p at , fk−1 (xj ) < at , fk−1 (xi ) . (11) Under the above construction of (Wl , bl )kl=1 , we are ready to show that there exist α for which rank(A(α)) = N. Since σk satisfies Assumption 3.2, we consider the following cases. 1. Case 1: There are finite constants µ+ , µ− ∈ R s.t. lim σk (t) = µ− and lim σk (t) = µ+ t→−∞ t→∞ and µ+ µ− = 0. Let us consider the first case where µ− = 0. From (10) and (11) one obtains  j=i σk (β) lim A(α)ij = µ− = 0 i > j α→+∞  ηij i<j (12) where ηij is given for every i < j where j = (p, t) as  p p µ− , at , fk−1 (xj ) − fk−1 (xi ) < 0 ηij = p p µ+ , at , fk−1 (xj ) − fk−1 (xi ) > 0 Note that ηij cannot be zero for i 6= j because at ∈ / S. In the following, let us denote A(α)1:N,1:N as a sub-matrix of A(α) that consists of the first N rows and columns. By the Leibniz-formula one has det(A(α)1:N,1:N ) = σk (β)N + X sign(π) π∈SN \{γ} N Y A(α)π(j)j (13) j=1 where SN is the set of all N ! permutations of the set {1, . . . , N } and γ is the identity permutation. Now, one observes that for every permutation π 6= γ, there always exists at least one component j where π(j) > j in which case it follows from (12) that lim α→∞ N Y A(α)π(j)j = 0. j=1 Since there are only finitely many such terms in (13), one obtains lim det(A(α)1:N,1:N ) = σk (β)N 6= 0 α→∞ where the last inequality follows from our choice of β. Since det(A(α)1:N,1:N ) is a continuous function of α, there exists α0 ∈ R such that for every α ≥ α0 it 16 holds det(A(α)1:N,1:N ) 6= 0 and thus rank(A(α)1:N,1:N ) = N which further implies rank(A(α)) = N. Thus the corresponding set of feature vectors {fk (x1 ), . . . , fk (xN )} are linearly independent. For the case where µ+ = 0, one can argue similarly. The only difference is that one considers now the limit for α → −∞. In particular, (10) and (11) lead to  i=j σk (β) lim A(α)ij = µ+ = 0 i > j α→−∞  ηij = 0 i < j. For every permutation π 6= γ there always exists at least one component j where π(j) > j, in which case it holds that lim α→−∞ N Y A(α)π(j)j = 0. j=1 and thus it follows from the Leibniz formula that lim det(A(α)1:N,1:N ) = σk (β)N 6= 0. α→−∞ Since det(A(α)1:N,1:N ) is a continuous function of α, there exists α0 ∈ R such that for every α ≤ α0 it holds det(A(α)1:N,1:N ) 6= 0 and thus rank(A(α)1:N,1:N ) = N which further implies rank(A(α)) = N. Thus the set of feature vectors at layer k are linearly independent. 2. Case 2: There are positive constants ρ1 , ρ2 , ρ3 , ρ4 s.t. |σk (t)| ≤ ρ1 eρ2 t for t < 0 and |σk (t)| ≤ ρ3 t + ρ4 for t ≥ 0. Our proof strategy is essentially similar to the previous case. Indeed, for every permutation π 6= γ there always exist at least one component j = (p, t) ∈ [N ] where π(j) > j in which p p case δj := at , fk−1 (xj ) − fk−1 (xπ(j) ) < 0 due to (11). For sufficiently large α > 0, it holds that αδj + β < 0 and thus one obtains from (10) that |A(α)π(j)j | = |σk (αδj + β)| ≤ ρ1 eρ2 β e−αρ2 |δj | . If π(j) = j then |A(α)π(j)j | = |σk (β)| which is a constant. For π(j) < j, one notices p p that δj := at , fk−1 (xj ) − fk−1 (xπ(j) ) can only be either positive or negative as at ∈ / S. In this case, if δj < 0 then it can be bounded by the similar exponential term as above for sufficiently large α. Otherwise it holds αδj + β > 0 for sufficiently large α > 0 and we get |A(α)π(j)j | = |σ(αδj + β)| ≤ ρ3 δj α + ρ3 β + ρ4 . Overall, for sufficiently large α > 0, there must exist positive constants P, Q, R, S, T such that it holds for every π ∈ SN \ {γ} that N Y A(α)π(j)j ≤ R(P α + Q)S e−αT . j=1 The upper bound goes to zero as α goes to ∞. This combined with the Leibniz formula from (13), we get limα→∞ det(A(α)1:N,1:N ) = σk (β)N 6= 0. Since det(A(α)1:N,1:N ) is a continuous function of α, there exists α0 ∈ R such that for every α ≥ α0 it holds det(A(α)1:N,1:N ) 6= 0 and thus rank(A(α)1:N,1:N ) = N which implies rank(A(α)) = N. Thus the set of feature vectors at layer k are linearly independent. Overall, we have shown that there always exist (Wl , bl )kl=1 such that the set of feature vectors {fk (x1 ), . . . , fk (xN )} at layer k are linearly independent. Moreover, (Wl , bl )kl=1 have been chosen so that all the weight matrices Ul = Ml (Wl ), except for max-pooling layers, have full rank for every 1 ≤ l ≤ k. A.3 P ROOF OF T HEOREM 3.5 To prove Theorem 3.5, the following key property of real analytic functions is required. 17 Lemma A.2 Nguyen (2015); Mityagin (2015) If f : Rn → R is a real analytic function which is not identically zero then the set {x ∈ Rn | f (x) = 0} has Lebesgue measure zero. Any linear function is real analytic and the set of real analytic functions is closed under addition, multiplication and composition, see e.g. Prop. 2.2.2 and Prop. 2.2.8 in Krantz & Parks (2002). As we assume that all the activation functions of the first k layers are real analytic, we get that the function fk is a real analytic function of (Wl , bl )kl=1 as it is the composition of real analytic functions. Now, we recall from our definition that Fk = [fk (x1 ), . . . , fk (xN )]T ∈ RN ×nk is the output matrix at layer k for all training samples. One observes that the set of low rank matrices Fk can be characterized by a system of equations such that all the nNk determinants of all N × N sub-matrices of Fk are zero. As the determinant is a polynomial in the entries of the matrix and thus an analytic function of the entries and composition of analytic functions are again analytic, we conclude that each determinant is an analytic function of the network parameters of the first k layers. By Theorem 3.4, there exists at least one set of parameters of the first k layers such that one of these determinant functions is not identically zero and thus by Lemma A.2, the set of network parameters where this determinant is zero has Lebesgue measure zero. But as all sub-matrices need to have low rank in order that rank(Fk ) < N , it follows that the set of parameters where rank(Fk ) < N has Lebesgue measure zero. B B.1 M ISSING P ROOFS OF S ECTION 4 P ROOF OF L EMMA 4.3 To prove Lemma 4.3, we first derive standard backpropagation in Lemma B.1. In the following we use the Hadamard product ◦, which for A, B ∈ Rm×n is defined as A ◦ B ∈ Rm×n with ∂Φ (A ◦ B)ij = Aij Bij . Let δkj (xi ) = ∂gkj (xi ) be the derivative of Φ w.r.t. the value of unit j at layer k evaluated at a single sample xi . We arrange these vectors for all training samples into a single matrix ∆k = [δk: (x1 ), . . . , δk: (xN )]T ∈ RN ×nk . The following lemma is a slight modification of Lemma 2.1 in (Nguyen & Hein, 2017) for which we provide the proof for completeness. Lemma B.1 Given some hidden layer 1 ≤ k ≤ L − 1. Let (σk+1 , . . . , σL−1 ) be differentiable. Then the following hold:  FL − Y, l=L 1. ∆l = T (∆l+1 Ul+1 ) ◦ σl0 (Gl ), k + 1 ≤ l ≤ L − 1 T 2. ∇Ul Φ = Fl−1 ∆l , ∀ k + 1 ≤ l ≤ L Proof: 1. By definition, it holds for every i ∈ [N ], j ∈ [nL ] that ∂Φ (∆L )ij = δLj (xi ) = = fLj (xi ) − yij ∂gLj (xi ) and hence, ∆L = FL − Y. For every k + 1 ≤ l ≤ L − 1, the output of the network for a single training sample can be written as the composition of differentiable functions (i.e. the outputs of all layers from l + 1 till the output layer), and thus the chain rule yields for every i ∈ [N ], j ∈ [nl ] that (∆l )ij = δlj (xi ) = nl+1 X ∂g(l+1)s (xi ) ∂flj (xi ) ∂Φ ∂Φ = ∂glj (xi ) ∂g (x ) ∂flj (xi ) ∂glj (xi ) i (l+1)s s=1 nl+1 = X δ(l+1)s (xi )(Ul+1 )js σ 0 (glj (xi )) s=1 nl+1 = X s=1 and hence ∆l = T (∆l+1 Ul+1 ) 0 ◦ σ (Gl ). 18 T (∆(l+1) )is (Ul+1 )sj σ 0 ((Gl )ij ) 2. For every k + 1 ≤ l ≤ L − 1, r ∈ [nl−1 ], s ∈ [nl ], one has N N N X ∂Φ ∂gls (xi ) X X ∂Φ T = = δls (xi )f(l−1)r (xi ) = (Fl−1 )ri (∆l )is ∂(Ul )rs ∂g (x ) ∂(U ) ls i l rs i=1 i=1 i=1  T = Fl−1 ∆l rs T and hence ∇Ul Φ = Fl−1 ∆l .  The following straightforward inequalities are also helpful to prove Lemma 4.3. Let λmin (·) and λmax (·) denotes the smallest and largest eigenvalue of a matrix. Lemma B.2 Let A ∈ Rm×n with m ≥ n. Then it holds σmax (A) kxk2 ≥ kAxk2 ≥ σmin (A) kxk2 for every x ∈ Rn . q p T T kAxk Proof: Since m ≥ n, it holds that σmin (A) = λmin (AT A) = min x xAT xAx = min kxk 2 2 p kAxk and thus σmin (A) ≤ kxk 2 for every x ∈ Rn . Similarly, it holds σmax (A) = λmax (AT A) = 2 q T T kAxk kAxk max x xAT xAx = max kxk 2 and thus σmax (A) ≥ kxk 2 for every x ∈ Rn .  2 2 Lemma B.3 Let A ∈ Rm×n , B ∈ Rn×p with m ≥ n. Then it holds σmax (A) kBkF ≥ kABkF ≥ σmin (A) kBkF . Proof: Since m ≥ n, it holds that λmin (AT A) = σmin (A)2 and λmax (AT A) = σmax (A)2 . Thus 2 2 we have kABkF = tr(B T AT AB) ≥ λmin (AT A) tr(B T B) = σmin (A)2 kBkF . Similarly, it holds 2 2 kABkF = tr(B T AT AB) ≤ λmax (AT A) tr(B T B) = σmax (A)2 kBkF .  Proof of Lemma 4.3 We first prove the lower bound. Let Im denotes an m-by-m identity matrix and ⊗ the Kronecker product. From Lemma B.1 it holds ∇Uk+1 Φ = FLT ∆k+1 and thus vec(∇Uk+1 Φ) = (Ink+1 ⊗ FkT ) vec(∆k+1 ). It follows that ∇Uk+1 Φ F = (Ink+1 ⊗ FkT ) vec(∆k+1 ) 2 ≥ σmin (Fk ) kvec(∆k+1 )k2 = σmin (Fk ) k∆k+1 kF (14) where the inequality follows from Lemma B.2 for the matrix (Ink+1 ⊗ FkT ) ∈ Rnk nk+1 ×N nk+1 with nk ≥ N by Assumption 4.1. Using Lemma B.1 again, one has T 0 k∆k+1 kF = (∆k+2 Uk+2 ) ◦ σk+1 (Gk+1 ) 0 ≥ σk+1 (Gk+1 ) F min T ∆k+2 Uk+2 0 = σk+1 (Gk+1 ) min Uk+2 ∆Tk+2 0 ≥ σk+1 (Gk+1 ) σ (Uk+2 ) k∆k+2 kF min min F F where the last inequality follows from Lemma B.3 for the matrices Uk+2 ∈ Rnk+1 ×nk+2 and ∆Tk+2 with nk+1 ≥ nk+2 by Assumption 4.1. By repeating this for k∆k+2 kF , . . . , k∆L−1 kF , one gets k∆k+1 kF ≥  L−1 Y   L−1  Y kσl0 (Gl )kmin σmin (Ul+1 ) k∆L kF = kσl0 (Gl )kmin σmin (Ul+1 ) kFL − Y kF l=k+1 l=k+1 (15) From (14), (15), one obtains ∇Uk+1 Φ F  L−1  Y ≥ σmin (Fk ) kσl0 (Gl )kmin σmin (Ul+1 ) kFL − Y kF l=k+1 19 which proves the lower bound. The proof for upper bound is similar. Indeed one has ∇Uk+1 Φ F = (Ink+1 ⊗ FkT ) vec(∆k+1 ) 2 ≤ σmax (Fk ) kvec(∆k+1 )k2 = σmax (Fk ) k∆k+1 kF (16) where the inequality follows from Lemma B.2 Now, one has T 0 k∆k+1 kF = (∆k+2 Uk+2 ) ◦ σk+1 (Gk+1 ) ≤ = ≤ 0 σk+1 (Gk+1 ) max 0 σk+1 (Gk+1 ) max 0 σk+1 (Gk+1 ) max F T ∆k+2 Uk+2 F Uk+2 ∆Tk+2 F σmax (Uk+2 ) k∆k+2 kF where the last inequality follows from Lemma B.3. By repeating this chain of inequalities for k∆k+2 kF , . . . , k∆L−1 kF , one obtains: k∆k+1 kF ≤  L−1 Y   L−1  Y kσl0 (Gl )kmax σmax (Ul+1 ) k∆L kF = kσl0 (Gl )kmax σmax (Ul+1 ) kFL − Y kF . l=k+1 l=k+1 (17) From (16), (17), one obtains that ∇Uk+1 Φ F   L−1 Y kσl0 (Gl )kmax σmax (Ul+1 ) kFL − Y kF ≤ σmax (Fk ) l=k+1 which proves the upper bound. B.2 P ROOF OF T HEOREM 4.5 1. Since layer k + 1 is fully connected, it holds at every critical point in Sk that ∇Wk+1 Φ = 0 = ∇Uk+1 Φ. This combined with Theorem 4.4 yields the result. L 2. One  basically needs to show that there exist (Wl , bl )l=1 such that it holds: L Φ (Wl , bl )l=1 = 0, rank(Fk ) = N and Ul = Ml (Wl ) has full rank ∀l ∈ [k + 2, L] Note that the last two conditions are fulfilled by the fact that (Wl , bl )L l=1 ∈ Sk . By Assumption 4.1, the subnetwork consisting of the first k layers satisfies the condition of Theorem 3.4. Thus by applying Theorem 3.4 to this subnetwork, one obtains that there exist (Wl , bl )kl=1 such that rank(Fk ) = N . In the following, we fix these layers and show how to pick (Wl , bl )L l=k+1 such that FL = Y. The main idea now is to make the output of all the training samples of the same class become identical at layer k + 1 and thus they will have the same network output. Since there are only m classes, there would be only m distinct outputs for all the training samples at layer L − 1. Thus if one can make these m distinct outputs become linearly independent at layer L−1 then there always exists a weight matrix WL that realizes the target output Y as the last layer is just a linear map by assumption. Moreover, we will show that, except for max-pooling layers, all the parameters of other layers in the network can be chosen in such a way that all the weight matrices (Ul )L l=k+2 achieve full rank. Our proof details are as follows. Case 1: k = L − 1 T T It holds rank(FL−1 ) = N. Pick bL = 0 and WL = FL−1 (FL−1 FL−1 )−1 Y . Since the output layer is fully connected, it follows from Definition 2.2 that FL = FL−1 WL + 1N bTL = Y. Since rank(Fk ) = N and the full rank condition on L (Wl )L / Sk which finishes the l=k+2 is not active when k = L − 1, it holds that (Wl , bl )l=1 ∈ proof. Case 2: k = L − 2 It holds rank(FL−2 ) = N. Let A ∈ Rm×nL−1 be a full row rank matrix such that Aij ∈ range(σL−1 ). Note that nL−1 ≥ nL = m due to Assumption 4.1. Let D ∈ RN ×nL−1 20 be a matrix satisfying Di: = Aj: whenever xi belongs to class j for every i ∈ [N ], j ∈ [m]. By construction, FL−2 has full row rank, thus we can pick bL−1 = 0, WL−1 = −1 T T FL−2 (FL−2 FL−2 )−1 σL−1 (D). Since layer L − 1 is fully connected by assumption, it follows from Definition 2.2 that FL−1 = σL−1 (FL−2 WL−1 + 1N bTL−1 ) = D and thus (FL−1 )i: = Di: = Aj: whenever xi belongs to class j. So far, our construction of the first L − 1 layers has led to the fact that all the training samples belonging to the same class will have identical output at layer L − 1. Since A has full row rank by construction, we can pick for the last layer bL = 0, WL = AT (AAT )−1 Z where Z ∈ Rm×m is our class embedding matrix with rank(Z) = m. One can easily check that AWL = Z and that FL = FL−1 WL + 1N bTL = FL−1 WL where the later follows from Definition 2.2 as the output layer is fully connected. Now one can verify that FL = Y. Indeed, whenever xi belongs to class j one has (FL )i: = (FL−1 )Ti: WL = (A)Tj: WL = Zj: = Yi: . −1 Moreover, since rank(Fk ) = N and rank(WL ) = rank(AT (AAT ) Z) = m, it holds that L (Wl , bl )L / Sk . Therefore, there exists (Wl , bl )L l=1 ∈ l=1 ∈ Sk with Φ (Wl , bl )l=1 = 0. Case 3: k ≤ L − 3 It holds rank(Fk ) = N. Let E ∈ Rm×nk+1 be any matrix such that Eij ∈ range(σk+1 ) and Eip 6= Ejq for every 1 ≤ i 6= j ≤ N, 1 ≤ p, q ≤ nk+1 . Let D ∈ RN ×nk+1 satisfies −1 Di: = Ej: for every xi from class j. Pick bk+1 = 0, Wk+1 = FkT (Fk FkT )−1 σk+1 (D). Note that the matrix is invertible as Fk has been chosen to have full row rank. Since layer k + 1 is fully connected by our assumption, it follows from Definition 2.2 that Fk+1 = σk+1 (Fk Wk+1 + 1N bTk+1 ) = σk+1 (Fk Wk+1 ) = D and thus it holds (Fk+1 )i: = Di: = Ej: (18) for every xi from class j. So far, our construction has led to the fact that all training samples belonging to the same class have identical output at layer k + 1. The idea now is to see E as a new training data matrix of a subnetwork consisting of all layers from k + 1 till the output layer L. In particular, layer k + 1 can be seen as the input layer of this subnetwork and similarly, layer L can be seen as the output layer. Moreover, every row of E ∈ Rm×nk+1 can be seen as a new training sample to this subnetwork. One can see that this subnet together with the training data matrix E satisfy the conditions of Theorem 3.4 at the last hidden layer L − 1. In particular, it holds that • The rows of E ∈ Rm×nk+1 are componentwise different from each other, and thus the input patches must be also different from each other, and thus E satisfies Assumption 3.1 • Every layer from k +1 till L−1 is convolutional or fully connected due to Assumption 4.1 • The width of layer L − 1 is larger than the number of samples due to Assumption 4.1, that is, nL−1 ≥ nL = m • (σk+2 , . . . , σL−1 ) satisfy Assumption 3.2 due to Assumption 4.1 By applying Theorem 3.4 to this subnetwork and training data E, we obtain that there must L−1 exist (Wl , bl )L−1 l=k+2 for which all the weight matrices (Ul )l=k+2 have full rank such that the set of corresponding m outputs at layer L − 1 are linearly independent. In particular, let A ∈ Rm×nL−1 be the corresponding outputs of E through this subnetwork then it holds that rank(A) = m. Intuitively, if one feeds Ej: as an input at layer k + 1 then one would get Aj: as an output at layer L − 1. This combined with (18) leads to the fact that if one now feeds (Fk+1 )i: = Ej: as an input at layer k + 1 then one would get at layer L − 1 the output (FL−1 )i: = Aj: whenever xi belongs to class j. Last, we pick bL = 0, WL = AT (AAT )−1 Z. It follows that AWL = Z. Since the output layer L is fully connected, it holds from Definition 2.2 that FL = FL−1 WL + 1N bTL = FL−1 WL . 21 One can verify now that FL = Y. Indeed, for every sample xi from class j it holds that (FL )i: = (FL−1 )Ti: WL = ATj: WL = Zj: = Yi: . Overall, we have shown that Φ = 0. In addition, it holds rank(Fk ) = N from the conL−1 struction of the first k layers. All the matrices (Ul )l=k+2 have full rank by the construction of the subnetwork from k + 1 till L. Moreover, UL = WL also has full rank since rank(WL ) = rank(AT (AAT )−1 Z) = m. Therefore it holds (Wl , bl )L l=1 ∈ Sk . B.3 P ROOF OF C OROLLARY 4.6 It is clear that the network structure satisfies the conditions of Theorem 4.4 as every layer is fully connected. Moreover, the input patches also satisfy Assumption 3.1 because every input patch is simply one training sample in this case but since there are no identical training samples, one derives that the input patches must be different from each other. Since all the conditions of Theorem 4.4 are met, the application of Theorem 4.4 yields the result. 22
7cs.IT
Deep Tracking on the Move: Learning to Track the World from a Moving Vehicle using Recurrent Neural Networks Ground Truth Comparison Occupancy Prediction Neural Network Abstract— This paper presents an end-to-end approach for tracking static and dynamic objects for an autonomous vehicle driving through crowded urban environments. Unlike traditional approaches to tracking, this method is learned end-to-end, and is able to directly predict a full unoccluded occupancy grid map from raw laser input data. Inspired by the recently presented DeepTracking approach ([1], [2]), we employ a recurrent neural network (RNN) to capture the temporal evolution of the state of the environment, and propose to use Spatial Transformer modules to exploit estimates of the egomotion of the vehicle. Our results demonstrate the ability to track a range of objects, including cars, buses, pedestrians, and cyclists through occlusion, from both moving and stationary platforms, using a single learned model. Experimental results demonstrate that the model can also predict the future states of objects from current inputs, with greater accuracy than previous work. h0 I. I NTRODUCTION The safe and effective operation of an autonomous vehicle depends on its ability to interpret its surroundings and track and predict the state of the environment over time. Many tracking systems employ multiple hand-engineered stages (e.g. object detection, semantic classification, data association, state estimation and motion modelling, occupancy grid generation) in order to represent the state and evolution of the world ([3], [4], [5]). However, as the tasks assigned to robots become more complex, this approach becomes increasingly infeasible. Recent advances in machine learning, particularly those of deep neural networks, have demonstrated the ability to capture complex structure in the real world, and have led to significant improvements in numerous computer vision and natural language processing applications ([6], [7], [8]). Such approaches would however typically require large, taskspecific corpora of annotated ground-truth labels to master the desired task. This becomes difficult when learning a model of the environment without access to corresponding ground truth, as is often the case for object tracking in crowded urban environments. In recent work, [2] took an alternative approach and presented an end-to-end fully and efficiently trainable framework for learning a model of the world dynamics, building on the original DeepTracking work by [1]. We considered the specific problem of learning to track and classify moving objects in a complex and only partially-observable realworld scenario, as viewed from a static sensor. Here, we Authors are from the Mobile Robotics Group at the University of Oxford, United Kingdom: julie, dushyant, [email protected] … h5 Raw Sensor Input arXiv:1609.09365v3 [cs.CV] 19 Apr 2017 Julie Dequaire, Dushyant Rao, Peter Ondrúška, Dominic Zeng Wang and Ingmar Posner t visible space occluded space … true positive t+5 dynamic object false positive static object false negative field of view mask Fig. 1. A typical training sequence. The unoccluded occupancy map is predicted directly from the input grid data, allowing objects to be tracked in occlusion and in future frames. The observed false positives are therefore beneficial. Comparison to the visible ground truth shows that the model is able to capture the dynamics of the moving vehicle (pink rectangle) and accurately predicts its track. advance this work and address the problem of tracking from a moving platform. We extend the neural network architecture proposed in [2] to account for the egomotion of the sensor frame as it moves in the world frame, and demonstrate improved tracking accuracy as compared to previous work. We demonstrate the system on laser point cloud data collected in a busy urban environment, with an array of static and dynamic objects, including cars, buses, pedestrians and cyclists. The model not only bypasses the sequence of handengineered steps typical of traditional tracking approaches, but is empirically shown to successfully predict the future evolution of objects in the environment, even when they are completely occluded. The rest of the paper is structured as follows. Section II highlights related work and Section III summarises the problem definition and DeepTracking framework first presented in ([1], [2]). Section IV describes the models used to perform tracking in real-world scenarios considering both static and dynamic sensors. Section V presents an empirical evaluation of our methods, and Section VI concludes the paper and discusses the future implications of our findings. II. R ELATED W ORK A number of previous works have explored the problem of model-free tracking of objects in the environment of an autonomous vehicle ([3], [4], [5]). Typically, these approaches follow the traditional paradigm of a multi-component pipeline, with separate components to parametrise and detect objects, associate new measurements to existing tracks, and estimate the state of each individually tracked object. The use of multiple stages in the framework is cumbersome and introduces extra unnecessary failure modes for the tracking algorithm. Recent work proposes to replace these multiple stages with an end-to-end learning framework known as DeepTracking, by leveraging neural networks to directly learn the mapping from raw laser input to an unoccluded occupancy grid ([1], [2]), even with relatively small amounts of data. The approach utilises an RNN architecture using gated recurrent units [9] to capture the state and evolution of the world in a sequence of laser scan frames. Another work [10] considers recurrent flow networks and takes a different angle to predicting occupancy in dynamic environments. They explicitly encode a range of velocities in the hidden layers of a recurrent network, and use Bayesian optimization to learn the network parameters which update velocity estimation and occupancy prediction. However, the model does not explicitly track objects through occlusion. DeepTracking shares similarities with deep learning approaches to predictive video modelling ([11], [12]), in that it is trained to predict the future state of the world based on current input data. This is particularly important, because in order to successfully capture the future location of dynamic objects in the scene, the model must implicitly store the position and velocity of each object in its internal memory state. While this eliminates the need to design individual components by hand, the model assumes a static vehicle [2]. Extending the problem to a moving platform is a challenging task, as it introduces an array of complex relative motions between the vehicle and objects in its environment. As DeepTracking ignores the motion of the vehicle, the model is forced to learn all possible motion interactions between the vehicle and its environment as if the vehicle were stationary. For a moving platform, we leverage estimates of egomotion as a proxy for vehicle motion. We scale up the RNN-based models proposed by ([1], [2]) for real-world application on dynamic vehicles, and exploit Spatial Transformer modules [13], which allow the internal memory state representations to be spatially transformed according to the estimated egomotion. The main contributions of this work are as follows: 1) A more in-depth analysis of the performance of DeepTracking in the case of a static vehicle, building on the experiments presented in [2]. 2) The use of Spatial Transformer modules to exploit estimates of visual egomotion in the DeepTracking framework. 3) Demonstration of end-to-end tracking of a variety of object classes through occlusion, on a moving vehicle in crowded urban scenes. III. T RACKING P ROBLEM F ORMULATION The problem we address in this paper is to uncover the true state of the world, in terms of a 2D occupancy grid yt , given a sequence of partially observed states of the environment x1:t computed from raw sensor measurements. In particular, we solve for P (yt |x1:t ), the probability of the true unoccluded state of the world at time t given a sequence of partial observations at all previous time steps. This formulation can also be used to predict future states by solving for P (yt+n |x1:t ), given empty input for xt+1:t+n . P (yt |x1:t ) = P (yt |ht ) (1) Evolution of this latent state ht , which includes propagating model dynamics and integrating new sensor measurements, is modelled by the update equation: ht = f (ht−1 , xt ) (2) The key element here is that both the latent state update f (ht−1 , xt ), and the decoding step to produce the output P (yt |ht ) are modelled as parts of a single neural network and are trained jointly. Equations 1 and 2 can then be performed repeatedly as the building block of a recurrent neural network that continuously updates the belief state ht , and uses it as network memory to predict yt . This makes it suitable for online stream filtering of sensor input. When the output ground-truth yt is not readily available, as is the case in real-world scenarios, the network can be trained in an self-supervised fashion. This is made possible by considering that predicting the movement of objects in occlusion at time t is similar to predicting a future state yt+n provided no input is given to the network, i.e xt+n = . Lack of input observation equates to complete occlusion of the scene. As only observable ground truth is available, we reduce the problem of predicting yt+n to that of predicting the directly observable input xt+n . Training the network to predict P (xt+n |x1:t ) is then equivalent to computing and backpropagating the errors only on the observable parts of the scene. We refer the reader to [1] and [2] for further details on the RNN and the training procedure. Each input observation xt ∈ {0, 1}2×M ×M is represented as a pair of discretised 2D binary grids of size M × M , parallel to the ground and locally built around the sensor. The first matrix encodes whether a cell is directly observable by the sensor at time t, while the second matrix encodes whether a cell is observed to be free (value of 0) or occupied (value Odometry 1 16 Spatial Transformer Module dilation: 4 dilation: 2 GRU 16 GRU 16 GRU dilation: 1 h B. Deep Tracking from a Moving Vehicle yt h t 2 t-1 xt Fig. 2. The proposed network architecture features dilated convolutions, gated recurrent units, a spatial transformer module, and outputs cell occupancy in the sensor’s surroundings. The spatial transformer module is only utilised in a moving vehicle scenario. of 1). We refer to these two matrices as xt,vis and xt,occ , the visibility and occupancy grids respectively. The output we wish to obtain is an occlusion-free state of the world yt ∈ {0, 1}M ×M , and is represented by an occupancy matrix similar to that of the input occupancy grid of xt . In the next section, we build upon [2] to deploy the DeepTracking paradigm on a real-world moving platform. IV. T ECHNICAL OVERVIEW A. Deep Tracking from a Static Sensor First, we revisit [2] to detail the baseline DeepTracking architecture for real world application, which we extend to a moving platform. At each time step t, the partially observed grid xt used as input to the network is computed from raw 2D laser scans by ray tracing. Cells in which a measurement ends are marked as occupied, all cells from the sensor origin up to the end of the ray are marked as free, and cells beyond the ray are marked to be unobserved. The input xt is processed by a multi-layer network illustrated in Figure 2, with the Spatial Transformer module only utilised in the moving vehicle scenario. The architecture originally proposed in [1] is scaled up with dilated convolutions [14] and a variant of gated recurrent units ([9], [15]) to allow for the simultaneous tracking of different-sized objects such as cars and pedestrians. Each layer l at time t is updated considering its own activations at time t−1 and those of layer l −1 below at time t, thus implementing the recurrence. This allows the network to extract and remember the information from the past and to use it for prediction of occluded objects or future states of the world. An additional static memory can also be utilised, in which the network is able to learn individual pixel-wise biases to add to the output of every convolutional operation. The output of the final layer is then converted into the output cell occupancy yt via a simple convolutional decoder. As explicited in the results section, we also experiment with architectures that decode the entire hidden state to the output. Tracking a dynamic scene from a moving platform poses the challenge of decoupling the motion of the vehicle from the motion of objects in the global environment. In the static scenario, information related to an object located at index {i, j} in the input xt would typically be stored at the corresponding neighbouring spatial location {i+∆i, j+∆j} in the layers of the latent representation, with the neighbourhood ∆i,j based on the receptive field of each neuron in the hidden state. The latent state update would then pass the information along spatially in accordance with the observed relative motion of the input object (Figure 4). In the static scenario, the dynamics of the scene as viewed from the world frame are coherent with that viewed from the local sensor frame. When tracking from a moving vehicle however, the spatial update of information within the latent representation would additionally need to account for the sensor’s egomotion as it will affect the position of the object relative to the sensor frame. Although this is a major drawback of the baseline DeepTracking architecture, it can be compensated by transforming the memory state in accordance to the egomotion. In other words, a static obstacle situated at position {it−1 , jt−1 } in the sensor frame at t−1, will be moved to position {it , jt } in the sensor frame at time t such that: [xt , yt , 1]T = Tt,t−1 × [xt−1 , yt−1 , 1]T (3) where Tt,t−1 is the SE(2) forward transformation of the sensor source frame at t−1 into the sensor destination frame at t. This formulation naturally extends to 3D motion with SE(3). We aid the network in decoupling egomotion and object motion in this way by introducing a Spatial Transformer [13] module (STM) in the hidden state (Figure 2). In the original work by [13], the STM is introduced as a learnable module for actively spatially transforming feature maps to aid tasks such as the classification of distorted datasets. However, in the context of tracking from a moving platform where egomotion is readily available (e.g. visual odometry), the STM can be used just to forward transform the hidden feature maps centred in the sensor source frame at time t − 1, into the sensor destination frame at time t, using transformation Tt,t−1 (Equation 3). Thus, the STM is introduced in the hidden state and performs a transformation on all feature maps of ht−1 , set in frame t − 1, into frame t before update with the new incoming input xt to form the new memory at t. C. Training In both static and dynamic cases, the network is presented the input sequence x1:t and trained to predict the next n input frames xt+1:t+n . The binary cross-entropy loss is calculated and backpropagated only on the visible part of the output, which is achieved by simply masking the prediction yt with xt,vis and multiplying the resulting grid element-wise with the occupancy part grid xt,occ . By using a loss that V. E XPERIMENTAL R ESULTS In this section, we perform experimental validation of both the baseline DeepTracking and the STM-based variant proposed in this paper. With a stationary vehicle, no spatial transform is necessary and the two are identical. A. Static Vehicle For the static case, we consider an architecture with three hidden layers of 16 GRU feature maps each. Computation of the hidden state consists of 3×3 convolutional filters, applied on the three layers (from bottom up) with strides of 1, 2, and 4 pixels, and receptive fields of 3 × 3, 7 × 7, and 15 × 15, respectively. We consider an input field of view of 20 × 20 m2 discretised into cells of 20 × 20 cm2 , which translates into a H × W = 101 × 101 input grid. With a hidden state consisting of 48 feature maps, the additional static memory contributes to H ×W ×D = 489, 648 of the total 1, 506, 865 parameters of the network. The evaluation dataset consists of a 75 minute log collected from a stationary Hokuyo UMT-30LX 2D laser scanner, positioned in the middle of a busy urban intersection. The area features dense traffic composed of buses, cars, cyclists and pedestrians, which results in extensive amounts of occlusion. Consequently, at no point in time is the complete scene fully observable. The dataset is subsampled at 8Hz and split into a 65 minute set for training, and a 10 minute set for testing occupancy prediction. The full model was trained on an Nvidia Tesla K40 GPU until convergence, using the unsupervised training procedure described in Section III. The training set is split into minibatch sequences of 40 frames (5 seconds). For every minibatch, the network is shown 10 frames and trained to predict F1 on Test data epoch 58- St Giles 0.9 0.9 0.80.8 GRU3DilConvBias_16 0.70.7 GRU3DilConvBias_48 GRU3DilConv_16 0.60.6 F1 measure Prediction Performance [F1 score] encourages the model to predict the state of the environment in the future, the model is forced to capture the motion of each object in the hidden representation. In the static sensor scenario, the error is only backpropagated on the ground truth available, i.e the visible part of the space. In the case of a moving sensor, however, an additional constraint needs to be imposed to account for the fact that as the robot moves in future frames, it will discover new space that falls outside the field of view of the current frame. Given this fact, the model should not be falsely penalised for failing to accurately guess objects located within this new space when the input is blanked out. This is similar in nature to the static case, where the input grid also represents a frontier between what the robot can perceive and understand of the scene and the unknown world outside its field of view. To address this, we apply an additional mask at training time on the cost computation and error backpropagation to represent the predictable space in future frames. Accounting for this field of view drift is crucial in terms of tracking performance, as it corrects for an objective function that is otherwise skewed towards the incredibly difficult task of predicting objects outside the field of view. This mask has been overlaid in transparency over the ground truth comparison outputs of Figure 1, and indicates the predictable free space shrinking on future timesteps. GRU3DilConv_48 GRU3_16_A 0.5 0.5 RNN48 RNN16 [2] 0.4 0.4 Model-free tracker [4] 0.3 0.3 0.2 0.2 11 12 0.25 13 14 15 0.5 16 0.75 17 18 1 19 20 Timesteps Prediction time horizon [sec] Fig. 3. F1 scores of network architectures when attempting to predict the future occupancy of the scene in a 1.25 second time horizon. The F1 measure is computed with a threshold of 0.5 when considering a cell to be predicted as occupied or free. the next 10 frames, leading to two such sequences per 40frame mini-batch. This length of sequence covers the typical lengths of occlusions observed but can be tuned accordingly. 1) Quantitative results: We first look to quantify the gain in performance achieved by scaling up the original DeepTracking network with the proposed architecture. We compare a number of different architectures ranging from the original [1] to the proposed model in [2], and compare performance on the task of predicting the observable nearfuture scene occupancy given the input sequence x1:t . The predicted output occupancy P (yt+n |x1:t ) is compared to xt+n,occ , which corresponds to the observed occupancy of the world at time t. A threshold of 0.5 is used to determine whether a cell is predicted as occupied or free, and an F1 measure computed for each frame. Figure 3 compares the F1 measures computed on each of n = 10 blacked out future frames, given the 10 frames in the past. All model predictions decrease over time as would be expected, as the uncertainty of the state of the world increases with the prediction horizon. There is a notable step change in performance with neural architectures compared to a state-of-the art model-free tracking pipeline approach by [4]. If we increase the capacity of the original RNN architecture of [1] (RNN16) from 16 to 48 feature maps (RNN48), we obtain marginal performance increase. In comparison, replacing the standard RNN48 hidden unit state with three layers of 16 GRU units (GRU3 16 A) provides significant improvement in prediction ability. The affix 16 signifies that we decode only the last hidden unit (composed of 16 features maps) to the output. Incorporating dilated convolutions (GRU3DilConv 16) in place of traditional dense convolutions achieves comparable performance to GRU3DilConv 16 for a similar output receptive field of 15×15. The model with dilated convolutions additionally requires less computation and nearly one third fewer model parameters than its dense counterpart GRU3DilConv 16. Further, we experiment with GRU3DilConv 48 which decodes the full hidden state (composed of 48 features maps) to the output. Performance of the model is maintained as t Input i GRU 1 ii Hidden State GRU 2 GRU 3 Output Sequence true positive visible space false positive false negative occluded space car static background pedestrian Fig. 4. Example of outputs produced by the system along with a selection of activations in the hidden layers. As highlighted in colour-coded circles, the network is able to propagate the assumed motion of the objects even when in complete occlusion. The sample hidden layer activations shown highlight the fact that lower layers in the hidden units (corresponding to a low dilation of the convolutions) capture the motion of small and slow moving objects such as pedestrians (e.g pink circle) and static background (e.g yellow squares), whereas a higher level layer learns to detect moving vehicles (orange oval). illustrated in Figure 3. This is a departure from traditional architectures where information from the different scales of the hidden units is directly passed to the output. This may assist positively for tasks such as semantic labelling, where scale information is essential. Lastly, performance of the full model with added static biases (GRU3DilConvBias 16 and GRU3DilConvBias 48) remains commensurate to that of GRU3DilConv 16 and GRU3DilConv 48 (Figure 3), and the learned static bias values may convey useful information such as that of the static background layout. We consider the B. Moving vehicle In this section we compare our baseline model GRU3DilConv 48 (BaselineDT) with an equivalent architecture that incorporates the Spatial Transformer module into the hidden belief state (STM). As with the static case, we evaluate the ability to predict future frames given blacked out input, and illustrate the achieved occlusion-free tracking performance on a series of examples selected from the test set. The evaluation dataset was collected over a 35 minute period, from a moving vehicle equipped with two Velodyne HDL64E lasers, resulting in a 360 degree field of view. The 3D point clouds were reduced to a 2D scan by considering the range of points within 0.6-1.5 meters height from the ground. The network was trained on mini-batches of 40 sequences with a frame rate of 10Hz, alternating between 5 inputs shown, and 5 inputs hidden. This higher frequency is better adapted to the moving vehicle case given the input field of view of 18 × 18 m2 and a vehicle mean velocity of 20 miles per hour. Longer occluded sequences would lead to increased loss in useful memory due to the aforementioned drift of field of view. Finally, we performed an 80/20 split of the data into training and test set with no overlap in location, and trained our model on an Nvidia Tesla K40 GPU until convergence. Our architecture is implemented on Torch and uses the Spatial Transformer GPU-implementation of [16]. a) Quantitative Results: Figure 5 represents the F1 measure as computed with STM and with the baseline DT. 0.85 Prediction Performance [F1 score] GRU3DilConv 48 model in the rest of this paper. 2) Qualitative results: To better understand what the network has learned, we also qualitatively analyse a typical test sequence of length 3 seconds from GRU3DilConv 48, along with the network output and selected hidden state feature maps in Figure 4. The network is able to track pedestrians through full occlusion and the unobserved hallucinated tracks are represented in blue in the output sequence. It can be seen that the GRU1 feature maps appear to have learned to capture the static background, as activations remain stationary during the sequence (i), and track pedestrians, as highlighted through the pink circles (ii). The GRU2 feature map also captures the motion of pedestrians moving upwards to the left, while, interestingly, the GRU3 unit seems to activate only on the car that appears to the top right at frame 2 (indicated by the orange box). This provides empirical support for the use of Dilated Convolutions which allow the model to capture patterns of increasing receptive fields in the hidden state units, while requiring fewer parameters than more traditional dense convolutional kernels. In general, we observe that information regarding objects in the scene is captured in the hidden state, and moves spatially through the feature maps according to the motion of the object in the input. This can be problematic when extending tracking to a moving platform, as the object motion and vehicle motion are coupled. We address this concern in the following section. Baseline 0.8 STM 0.75 0.7 0.65 0.6 0.15 0.3 0.45 0.6 Prediction time horizon [sec] Fig. 5. Positive contribution of the Spatial Transformer to the network’s ability to correctly predict the future occupancy of the scene in a 0.6 sec time horizon. The baseline DT does surprisingly well which we attribute to the benign test set where the vehicle mostly evolves at constant velocity down straight roads. The baseline DT is identical to STM with the exception that no egomotion is taken into account. In other words, no additional mask is applied to the cost computation and backpropagation, and hidden states are not forward transformed into the next sensor frame. With no egomotion information, one might expect the F1 measure for the baseline to be very poor. Surprisingly however, it does very well as illustrated in Figure 5. We suggest two explanations for this. Firstly, we posit that this is due to the dataset being relatively benign in terms of vehicle motion patterns. As most of the driving occurs down straight roads and at relatively constant velocity (∼ 20 mph) the baseline may have learned a constant velocity model that could be used to correct the hidden state update. Secondly, the F1 measure here may be less informative, as the dataset is dominated by static objects such as walls and buildings. As such, a large fraction of the F1 score can be attained by learning the vehicle’s motion and merely capturing static scenes. Nonetheless, the STM offers a clear improvement over the baseline DT in all future frames. 1) Qualitative Results: To qualitatively evaluate the model, we show a selection of sequences where the model does well, and where it does more poorly. As the dataset does not contain as many occlusions and for as long as the static set due to the setting of a vehicle driving through an urban environment, we look at the ability of the network to predict what happens in occlusion by maintaining the blacking out of the input every 5 frames at test time. Figure 6 shows a compelling example of STM accurately tracking both dynamic and static objects through occlusion. In particular, the model accurately predicts the position of two static objects of different sizes when future frames are blacked out, and is also able to maintain the tracks when both objects are fully occluded. Figure 7 illustrates how STM accurately predicts the tracks of both a moving vehicle (red circle) and two occluded pedestrians (orange rectangle) whereas the baseline model fails. For the latter, the predicted track of the vehicle gradually shifts from the ground truth until complete failure in frame 5 (false negative area), and it fails to separate and Sequence 0.5 sec t Output Input 0.25 sec 1 sec (continued) t static visible space Input dynamic true positive Output occluded space false positive false negative Fig. 6. Left to Right, Top to Bottom: Example sequence (1 second) of dynamic and static object tracking through occlusion by the STM. The output of the network is evaluated against the visible ground truth. We highlight several objects of interest that are correctly tracked through complete occlusion. Sequence 0.6 sec t STM Output Baseline Output Input 0.3 sec Fig. 7. Left to Right: Output sequence (0.6 seconds) of dynamic and static object tracking through occlusion as predicted by the Spatial Transformer Model (Top) and the Baseline Model (Bottom). We show the colour-coded comparison to the visible ground truth, with false negatives in red, false positives in blue, and true positives in green. Where the Spatial Transformer network consistently accurately tracks two pedestrians (orange rectangle) occluded by a moving vehicle (red), the Baseline model fails to capture the dynamics of both the vehicle and the pedestrians. This is particularly visible on the last frame, with most of the area around the actual location of these objects showing false negative occupancy prediction for the Baseline model. track the pedestrians through occlusion by the vehicle. VI. C ONCLUSION In this paper, we have proposed an approach to perform object tracking for a mobile robot travelling in crowded urban environments, building on the previously proposed DeepTracking framework ([1], [2]). Crucially, unlike classical techniques which employ a multi-stage pipeline, this approach is learned end-to-end with limited architectural choices. By employing a Spatial Transformer module, the model is able to exploit noisy estimates of visual egomotion as a proxy for true vehicle motion. Experimental results demonstrate that our method performs favourably to DeepTracking in terms of accurately predicting future states, and show that the model can capture the location and motion of cars, pedestrians, cyclists, and buses, even when in complete occlusion. Future work will look to estimate ego-motion, explore modalities such as radar, and extend the approach to 3D. ACKNOWLEDGEMENT The authors would like to gratefully acknowledge support of this work by the UK Engineering and Physical Sciences Research Council (EPSRC) Doctoral Training Programme (DTP) and Programme Grant DFR-01420, as well as the Advanced Research Computing services at the University of Oxford for providing access to their computing cluster. R EFERENCES [1] P. Ondrúška and I. Posner, “Deep tracking: Seeing beyond seeing using recurrent neural networks,” in The Thirtieth AAAI Conference on Artificial Intelligence (AAAI), Phoenix, Arizona USA, February 2016. [2] P. Ondrúška, J. Dequaire, D. Z. Wang, and I. Posner, “End-to-end tracking and semantic segmentation using recurrent neural networks,” arXiv preprint arXiv:1604.05091, 2016. [3] T.-D. Vu, O. Aycard, and N. Appenrodt, “Online Localization and Mapping with Moving Object Tracking in Dynamic Outdoor Environments,” in Intelligent Vehicles Symposium, 2007 IEEE, June 2007, pp. 190–195. [4] D. Z. Wang, I. Posner, and P. Newman, “Model-free detection and tracking of dynamic objects with 2d lidar,” The International Journal of Robotics Research, vol. 34, no. 7, pp. 1039–1063, 2015. [5] A. Petrovskaya and S. Thrun, “Model based vehicle detection and tracking for autonomous urban driving,” Autonomous Robots, vol. 26, no. 2, pp. 123–139, 2009. [6] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. [7] G. E. Dahl, D. Yu, L. Deng, and A. Acero, “Context-dependent pretrained deep neural networks for large-vocabulary speech recognition,” Audio, Speech, and Language Processing, IEEE Transactions on, vol. 20, no. 1, pp. 30–42, 2012. [8] T. Wang, D. J. Wu, A. Coates, and A. Y. Ng, “End-to-end text recognition with convolutional neural networks,” in Pattern Recognition (ICPR), 2012 21st International Conference on. IEEE, 2012, pp. 3304–3308. [9] K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using rnn encoder-decoder for statistical machine translation,” arXiv preprint arXiv:1406.1078, 2014. [10] S. Choi, K. Lee, and S. Oh, “Robust modeling and prediction in dynamic environments using recurrent flow networks.” [11] V. Patraucean, A. Handa, and R. Cipolla, “Spatio-temporal video autoencoder with differentiable memory,” arXiv preprint arXiv:1511.06309, 2015. [12] W. Lotter, G. Kreiman, and D. Cox, “Deep predictive coding networks for video prediction and unsupervised learning,” arXiv preprint arXiv:1605.08104, 2016. [13] M. Jaderberg, K. Simonyan, A. Zisserman, et al., “Spatial transformer networks,” in Advances in Neural Information Processing Systems, 2015, pp. 2017–2025. [14] F. Yu and V. Koltun, “Multi-scale context aggregation by dilated convolutions,” arXiv preprint arXiv:1511.07122, 2015. [15] S. Xingjian, Z. Chen, H. Wang, D.-Y. Yeung, W.-k. Wong, and W.-c. WOO, “Convolutional lstm network: A machine learning approach for precipitation nowcasting,” in Advances in Neural Information Processing Systems, 2015, pp. 802–810. [16] M. Oquab, “Module for spatial transformer networks,” https://github. com/qassemoquab/stnbhwd/.
2cs.AI
Maximal subgroups of SL(n, Z) arXiv:1511.05767v2 [math.GR] 17 Apr 2016 Tsachik Gelander and Chen Meiri April 19, 2016 Dedicated to the 75’th birthday of Herbert Abels 1 Introduction More than three decades ago, in a remarkable paper [MS81], Margulis and Soifer proved existence of maximal subgroups of infinite index in SL(n, Z), answering a question of Platonov. Moreover, they proved that there are uncountably many such subgroups. Since then, it is expected that there should be examples of various different nature. However, as the proof is non-constructive and relies on the axiom of choice, it is highly non-trivial to lay one’s hands on specific properties of the resulting groups. Our purpose here is to show that indeed, maximal subgroups ∆ ≤ SL(n, Z) of different nature do exist. However, our methods say nothing about the intrinsic algebraic structure of ∆. We do not gain any understanding about the abstract groups ∆, instead we are focusing on the way it sits inside SL(n, Z). The two point of views that we consider are: • The associated permutation representation Γ y Γ/∆. • The action of ∆ on the associated projective space P = Pn−1 (R). The main results of this paper are: Theorem 1.1. Let n ≥ 3. There are 2ℵ0 infinite index maximal subgroups in SL(n, Z). Theorem 1.2. Let n ≥ 3. There exists a maximal subgroup ∆ of SL(n, Z) which does not have a dense orbit in P. In particular, the limit set of ∆ (in the sense of [CG00]) is nowhere-dense. Theorem 1.3. Let n ≥ 3. There exists an infinite index maximal subgroup M of PSL(n, Z) and an element g ∈ PSL(n, Z) such that M ∩ gM g −1 = {id}. Theorem 1.4. Let n ≥ 3. There exists a primitive permutation action of SL(n, Z) which is not 2-transitive. 1 Remark 1.5. The theorems remain true also for SL(n, Q) instead of SL(n, Z). Remark 1.6. Recall that the Margulis–Soifer theorem is much more general, i.e. holds for any finitely generated non-virtually-solvable linear group Γ. Our results however relies on special properties of SL(n, Z), n ≥ 3. In particular one important ingredient for us is the beautiful result of Venkataramana about commuting unipotents, Theorem 2.8. Another ingredient is the result of Conze and Guivarc’h, Theorem 2.12. Some of our results can be extended to the class of arithmetic groups of higher Q-rank. Acknowledgment: The first author was partially supported by ISF-Moked grant 2095/15. The second author was partially supported by ISF grant 662/15. 2 Preliminaries In this paper we always assume that n ≥ 3. 2.1 Projective space Let n ≥ 3. The letter P denotes the (n − 1)-dimensional real projective space and fix some compatible metric distP on P. For every 0 ≤ k ≤ n − 1, the set Lk of k-dimensional subspaces of P can be endowed with the metric defined by distLk (L1 , L2 ) := max{distP (x, Li ) | x ∈ L3−i for 1 ≤ i ≤ 2} for every L1 , L2 ∈ Lk . Note that Lk is naturally homeomorphic to the Grassmannian Gr(k + 1, Rn ). For ε > 0 and a subset A ⊆ P we denote (A)ε := {x ∈ P | distP (x, A) < ε} and [A]ε := {x ∈ P | distP (x, A) ≤ ε}. If A = {p} then we usually write (p)ε and [p]ε instead of (A)ε and [A]ε . 2.2 Unipotent elements Definition 2.1 (Rank 1 unipotent elements). We say that a unipotent element u has rank 1 if rank(u−In ) = 1. The point pu ∈ P which is induced by the euclidean line {ux − x | x ∈ Rn } is called the point of attraction of u. The (n − 2)-dimensional subspace Lu ⊆ P which is induced by the euclidean (n − 1)-dimensional space {x ∈ Rn | ux = x} is called the fixed hyperplane of of u. The set of rank-1 unipotent elements in SL(n, Z) is denoted by U. The following two lemmas follow directly from the definition of U and are stated for future reference. 2 Lemma 2.2 (Structure of unipotent elements). The set U can be divided into equivalence classes in the following way: u, v ∈ U are equivalent if there exist non-zero integers r and s such that us = v r . The map u 7→ (pu , Lu ) is a bijection between equivalence classes in U and the set of pairs (p, L) where p ∈ P is a rational point and L ⊆ Ln−2 is an (n − 2)-dimensional rational subspace which contains p. Lemma 2.3 (Dynamics of unipotent elements). Let u ∈ U. For every ε > 0 and every δ > 0 there exists a constant c such that if m ≥ c and v = um , then v k (x) ∈ (pu )ε for every x ∈ P \ (Lu )δ and every k 6= 0. Note that the previous lemma implies that pu = pv and Lu = Lv . 2.3 Schottky systems Definition 2.4. Assume that S is a non-empty subset of U and A ⊆ R are closed subsets of P. We say that S is a Schottky set with respect to the attracting set A and the repelling set R and call the triple (S, A, R) a Schottky system if for every u ∈ S there exist two positive numbers δu ≥ εu such that the following properties hold: 1. uk (x) ∈ (pu )εu for every x ∈ P \ (Lu )δu and every k 6= 0; 2. If u 6= v ∈ S then (pu )εu ∩ (Lv )δv = ∅; 3. ∪u∈S (pu )εu ⊆ A; 4. ∪u∈S (Lu )δu ⊆ R. Definition 2.5. The Schottky system (S, A, R) is said to be profinitely-dense if S generates a profinitely-dense subgroup of SL(n, Z). We say that the Schottky system (S+ , A+ , R+ ) contains the Schottky system (S, A, R) if S+ ⊇ S, A+ ⊇ A and R+ ⊇ R. Lemma 2.6. Let (S, A, R) be a Schottky system. Assume that [p]ε ∩ A = ∅ and [L]δ ∩ R = ∅ where δ ≥ ε > 0 and p is a rational point which is continued in a rational subspace L ∈ Ln−2 . Denote A+ = A ∪ [p]ε and R+ = R ∪ [L]δ . Then there exist v ∈ U with p = pv , L = Lv such that (S+ , A+ , R+ ) is Schottky system which contains (S, A, R) where S+ := S ∪ {v}. Proof: Lemma 2.2 implies that there exists u ∈ U such that pu = p and Lu = L. Lemma 2.3 implies that there exists m ≥ 1 such that v := um satisfies the required properties.  The following lemma is a version of the well known ping-pong lemma: Lemma 2.7 (Ping-pong). Let (S, A, R) be a Schottky system. Then the natural homomorphism ∗u∈S hui → hSi is an isomorphism. 3 An important ingredient for our methods is the following beautiful result: Theorem 2.8 (Venkataramana, [Ve87]). Let Γ be a Zariski-dense subgroup of SL(n, Z). Assume that u ∈ U ∩ Γ, v ∈ Γ is unipotent and hu, vi ' Z2 . Then Γ has finite index in SL(n, Z). In particular, if Γ is profinitely-dense then Γ = SL(n, Z). Note that if u, v ∈ SL(n, Z) ∩ U and pu = pv then (u − 1)(v − 1) = (v − 1)(u − 1) = 0 and in particular uv = vu. Thus we get the following lemma: Lemma 2.9. Let g ∈ SL(n, Z) and u1 , u2 ∈ U. Assume that pu2 = gpu1 and Lu2 6= gLu1 . Then hu1 , g −1 u2 gi ' Z2 . Lemma 2.10. Assume that g is an element of SL(n, Z), (S, A, R) is a profinitely-dense Schottky system, δ ≥ ε > 0, p1 and p2 are rational points and L1 and L2 are rational (n − 2)dimensional subspaces such that the following conditions hold: 1. ([p1 ]ε ∪ [p2 ]ε ) ∩ R = ∅ and ([L1 ]δ ∪ [L2 ]δ ) ∩ A = ∅; 2. [p1 ]ε ∩ [L2 ]δ = ∅ and [p2 ]ε ∩ [L1 ]δ = ∅; 3. p1 = gp2 and L1 6= gL2 . Denote A+ = A ∪ [p1 ]ε ∪ [p2 ]ε and R+ = R ∪ [L1 ]δ ∪ [L2 ]δ . Then there exists a set S+ ⊇ S such that (S+ , A+ , R+ ) is a Schottky system which contains (S, A, R) and hS+ , gi = SL(n, Z). Proof: For every 1 ≤ i ≤ 2 choose ui ∈ U such that pui = pi and Lui = Li . Lemma 2.9 implies that hu1 , g −1 u2 gi ' Z2 . Lemma 2.3 implies that there exists m ≥ 1 such that (S+ , A+ , R+ ) is m Schottky system where v1 := um 1 , v2 := u2 and S+ := S ∪ {v1 , v2 }. Theorem 2.8 implies that hS+ , gi = SL(n, Z).  Definition 2.11. Let 1 ≤ k ≤ n. A k-tuple (p1 , . . . , pk ) of projective points is called generic if p1 , . . . , pk span a (k − 1)-dimensional subspace of P. Note that the set of generic k-tuples of P is an open subset of the product of k copies of the projective space, indeed it is even Zariski open. Theorem 2.12 (Conze-Guivarc’h, [CG00]). Assume that n ≥ 3 and that Γ ≤ SL(n, R) is a lattice. Then Γ acts minimally of the set of generic (n − 1)-tuples. Corollary 2.13. Assume that n ≥ 3 and Γ ≤ SL(n, R) is a lattice. For every 1 ≤ i ≤ 2 let pi ∈ Li ∈ Ln−2 . Then for every positive numbers ε and δ there exists g ∈ Γ such that gp1 ∈ (p2 )ε and gL1 ∈ (L2 )δ . The proof of the following Proposition is based on the proof of the main result of [AGS14]. 4 Proposition 2.14. Assume that n ≥ 3 and p ∈ L ∈ Ln−2 . Then for every δ ≥ ε > 0 there exists a finite subset S ⊆ U such that (S, A, R) is a profinitely-dense Schottky system where A := [p]ε and R := [L]δ . Proof: We recall some facts about Zariski-dense and profinitely-dense subgroups. For a positive integer d ≥ 2 let πd : SL(n, Z) → SL(n, Z/dZ) be the modulo-d homomorphism and denote Kd := ker πd . (a) If H ≤ SL(n, Z) and πp (H) = SL(n, Z/pZ) for some odd prime p then H is Zariski-dense, [We96] and [Lu99]. (b) The strong approximation theorem of Weisfeiler [We84] and Nori [No87] implies that if a subgroup H of SL(n, Z) is Zariski-dense then there exists some positive integer q such that πd (H) = SL(n, Z/dZ) whenever gcd(q, d) = 1. (c) If H ≤ SL(n, Z), π4 (H) = SL(n, Z/4Z) and πp (H) = SL(n, Z/pZ) for all odd primes p then H is profintiely-dense in SL(n, Z). Fix δ ≥ ε > 0 and set A := [p]ε and R := [L]δ . For every 1 ≤ i ≤ 2n2 − n, fix a point pi beloning to an (n − 2)-dimensional subspace Li and positive numbers δi ≥ εi > 0 such that the following two conditions hold: 1. ∪1≤i≤2n2 −n (pi )εi ⊆ A and ∪1≤i≤2n2 −n (Li )δi ⊆ R; 2. For every 1 ≤ i 6= j ≤ 2n2 − n, (pi )εi ∩ (Lj )δj = ∅. For every 1 ≤ i 6= j ≤ n, let ei,j ∈ SL(n, Z) be the matrix with 1 on the diagonal and on the (i, j)-entry and zero elsewhere and let e1 , . . . , en2 −n be an enumeration of the ei,j ’s. Denote the exponent of SL(n, Z/3Z) by t. If g1 , . . . , gn2 −n ∈ K3 and k1 , . . . , kn2 −n are positive integers then π3 (H1 ) = SL(n, Z/3Z) where ui := gi eitki +1 gi−1 and H1 := hui | 1 ≤ i ≤ n2 − ni. Note that for every u ∈ U and g ∈ SL(n, Z), pgug−1 = gpu and Lgug−1 = gLu . Thus, Lemma 2.3 and Corollary 2.13 imply that it is possible to choose gi ’s and ki ’s such that: 3. uki (x) ∈ (pi )εi for every 1 ≤ i ≤ n2 − n, every x 6∈ (Li )δi and every k 6= 0. In particular, {u1 , . . . , un2 −n } is a Schottky set with respect to A and R which generates a Zariski-dense subgroup H1 . The strong approximation theorem implies that there exists some positive integer q such that πd (H1 ) = SL(n, Z/dZ) whenever gcd(q, d) = 1. Denote the exponent of SL(n, Z/q 2 Z) by r. As before, there exist gn2 −n+1 , . . . , g2n2 −2n ∈ Kq2 and positive integers kn2 −n+1 , . . . , k2n2 −2n i +1 −1 such that the elements of the form ui := gi erk gi satisfy: i 4. πq2 (H2 ) = SL(n, Z/q 2 Z) where H2 := hui | n2 − n + 1 ≤ i ≤ 2n2 − 2ni; 5 5. uki (x) ∈ (pi )εi for every n2 − n + 1 ≤ i ≤ 2n2 − 2n, every x 6∈ (Li )δi and every k 6= 0. Denote S := {u1 , . . . , u2n2 −2n }. Item (c) implies that πd (hSi) = SL(n, Z/dZ) for every d ≥ 1. Thus, (S, A, R) is the required profinitely-dense Schottky system.  The following lemma will be needed in Section 5. Lemma 2.15. Assume that k is an element of SL(n, Z), δ ≥ ε > 0, p1 , p2 and p3 are rational points and L1 , L2 and L3 are rational (n − 2)-dimensional subspaces such that the following conditions hold • For every 1 ≤ i 6= j ≤ 3, pi ∈ Li and [pi ]ε ∩ [Lj ]δ = ∅; • p2 = kp1 , p3 := k 2 p1 , L2 = kL1 , L3 6= k 2 L1 ; Denote A := ∪1≤i≤3 [pi ]ε and R := ∪1≤i≤3 [Li ]δ . Then there exists a profinitely-dense Schottky system (S, A, R) such that hSi ∩ khSik −1 6= {id} and hS, ki = SL(n, Z). Proof: Proposition 2.14 implies that there exists a finite S0 = {u1 , . . . , ur } ⊆ U such that (S0 , A0 , R0 ) is profinitely-dense Schottky system where A0 := [p1 ]ε and R0 := [L1 ]δ . A quick look at the proof of this proposition implies that we can assume that pu1 = p1 and Lu1 = L1 . Denote w2 := ku1 k −1 and choose w3 ∈ U such that pw3 = p3 , Lw3 = L3 . Lemma 2.9 implies that hu1 , k −2 w3m k 2 i ∼ = Z2 for every m 6= 0. Lemma 2.3 implies that for large enough value of m, (S, A, R) is a profinitely-dense Schottky system where S := S0 ∪ {w2m , w3m }. Note that w2 ∈ hSi ∩ khSik −1 and that Theorem 2.8 implies that hS, ki = SL(n, Z).  3 Proof of Theorem 1.1 Zorn’s lemma implies that every proper subgroup H of SL(n, Z) is contained in a maximal subgroup M (Since SL(n, Z) is finitely generated an increasing union of proper subgroups is a proper subgroup). If H is profinitely-dense then so is M ; hence M should have infinite index. Thus, Theorem 1.1 follows for the following proposition: Theorem 3.1. Let n ≥ 3. There exist 2ℵ0 infinite-index profinitely-dense subgroups of SL(n, Z) such that the union of any two of them generates SL(n, Z). Proof: For every non-negative integer i fix a rational point pi belonging to a rational (n − 2)dimensional subspace Li and two numbers δi ≥ εi > 0 such that [pi ]εi ∩ [Lj ]δj = ∅ for every i 6= j. Let A and R be the closures of ∪i≥0 (pi )i and ∪i≥0 (Li )δi respectively. Proposition 2.14 implies that there exists a finite subset S0 ⊆ U such that (S0 , A0 , R0 ) is a profinitely-dense Schottky system where A0 = [p0 ]ε0 and R0 = [L0 ]δ0 . Lemmas 2.2 and 2.3 imply that for every i ≥ 1 there are ui,1 , ui,2 ∈ U such that: 6 1. pi = pui,1 = pui,2 and Lui,1 6= Lui,2 ⊆ (Li )δi (hence, hui,1 , ui,2 i ∼ = Z2 ); 2. uki,j (x) ∈ (pi )ε for every 1 ≤ j ≤ 2, every x 6∈ (Li )δi and every k 6= 0. For every function f from the positive integers to {0, 1} the set Sf := S0 ∪ {ui,f (i)|i≥1 } is a Schottky set with respect to the attracting set A and the repelling set R. If f and g are distinct function then Sf ∪ Sg contains {ui,1 , ui,2 } for some i ≥ 1 so Theorem 2.8 implies that hSf ∪ Sg i = SL(n, Z).  Theorem 1.1 implies that there are non-conjugate infinite-index maximal subgroups in SL(n, Z). Indeed, since SL(n, Z) is countable so is the conjugacy class of every infinite index subgroup. We can say a little more: Proposition 3.2. There are infinite-index maximal subgroups whose actions on P have different topological properties. For example, when n ≥ 4 some but not all infinite-index maximal subgroups M of SL(n, Z) have the following property: There exists a finitely-generated subgroup H ≤ M and a 2-dimensional subspace l ∈ L2 which is contained in the closure of every H-orbit. The existence of maximal subgroups with this property follows form the existence of maximal subgroup M which contains an element g ∈ SL(n, Z) with eigenvalues α1 , . . . , αn such that α1m and αnm are not real for all m ≥ 1 and |α1 | < |αi | < |αn | for all 2 < i < n − 1. The construction of maximal subgroups without this property can be done by using similar ideas to the ones used in the proofs of Theorems 1.2, 1.3 and 1.4 below. 4 Proof of Theorem 1.2 In order to prove the Theorem 1.2 it is enough to find an infinite-index maximal subgroup ∆ and two open subsets U and V such that gU ∩ V = ∅ for all g ∈ ∆. Let V ∨ be the dual of V := Rn . The natural map form P = Gr(1, V ) to Gr(n − 1, V ∨ ) is an SL(n, Z)-equivariant homeomorphism. Thus, Theorem 1.2 follows from the following proposition: Proposition 4.1. Let L1 and L2 be distinct (n − 2)-dimensional subspaces of P. There exist ρ > 0 and a free profinitely-dense subgroup H such that if L ⊆ (L2 )ρ and gL ⊆ (L1 )ρ for some g ∈ SL(n, Z) and some (n − 2)-dimensional subspace L then hg, Hi = SL(n, Z). The rest of this section is devoted to the proof of Proposition 4.1. The basic idea is to find ρ > 0 for which Lemma 2.10 allows us to inductively construct an ascending sequence (Sk , AK , Rk )k≥0 of profintely-dense Schottky system such that hSk , gk i = SL(n, Z) for every k ≥ 1 where (gk )k≥1 is an enumeration of the g’s such that g(L2 )ρ ∩ (L1 )ρ 6= ∅. 7 Before starting with the formal proof let us briefly explain the main idea of the proof. Let (S0 , A0 , R0 ) be a profintly-dense Schottky system such that L1 ∩ A0 = ∅ and L2 \ R0 6= ∅. Assume for simplicity that g1 L2 = L1 . Our goal is to show that we can find a finite Schottky system (S1 , A1 , R1 ) which contains (S0 , A0 , R0 ) such that hS1 , g1 i = SL(n, Z). Choose a point w ∈ L2 \ R0 . We would like to apply Lemma 2.10 with respect to w and g1 w and suitable hyperplanes w ∈ Lw and gw1 ∈ Lg1 w . The problem is that it is possible that g1 w ∈ R0 , so the assumptions of Lemma 2.10 do not hold no matter what Lw and Lg1 w are. Therefore we first construct a Schottky system (S∗ , A∗ , R∗ ) such that w 6∈ R∗ , S∗ := S ∪ {u} and g1 w ∈ Lu . Note that there is a lot of freedom in choosing the fixed hyperplane Lu and the attracting point pu of u. The existense of (S∗ , A∗ , R∗ ) is guaranteed by some technical assumptions on (S0 , A0 , R0 ); One of these assumptions is the requirement that A0 ∩ L1 = ∅ which guarantees that g1 w 6∈ A0 . Denote h := g1−1 ug1 so h(w) = w. Note that if (S1 , A1 , R1 ) is a finite Schottky system such that hS1 , hi = SL(n, Z) then also hS1 , g1 i = SL(n, Z). The advantage now is that we can choose a rational point w1 which is very close to w such that hw1 6= w1 and hw1 is also very close to w. In particular w1 , hw1 6∈ R∗ . Once more we use some technical assumptions on (S∗ , A∗ , R∗ ) to show that there exist rational hyperplanes w1 ∈ Lw1 and hw1 ∈ Lgw1 and positive numbers ε and δ for which the assumptions of Lemma 2.10 hold. Thus, there exists a finite Schottky system (S1 , A1 , R1 ) such that hS1 , hi = SL(n, Z). We now start the formal proof. Let L0 ,L1 and L2 be fixed distinct rational (n − 2)dimensional subspaces of P and let p0 ∈ L0 \ L1 ∪ L2 be a fixed point. We will use p0 and L0 in the last part of the proof to construct the profinitely-dense Schottky system (S0 , A0 , R0 ). Claim 4.2. There exists ρ > 0 with the following properties: 1. For every x ∈ [L1 ]ρ there exists an (n − 2)-dimensional subspace Lx containing x such that Lx ∩ [p0 ]ρ = ∅ and Lx \ [L0 ∪ L1 ∪ L2 ]ρ 6= ∅. 2. For every (n − 2)-dimensional subspace L ⊆ [L2 ]ρ there exist x ∈ L \ [L0 ∪ L1 ]ρ and an (n − 2)-dimensional subspace Lx containing x such that Lx is not contained in [L2 ]ρ and Lx ∩ [p0 ]ρ = ∅. Proof of Claim 4.2: Fix ρ0 > 0 such that: • L0 and L1 are not contained in [L2 ]ρ0 ; • p0 6∈ [L1 ]ρ0 . For every x ∈ [L1 ]ρ0 there exist an (n − 2)-dimensional subspace Lx containing x and ρx > 0 such that Lx ∩ [p0 ]ρx = ∅ and Lx \ [L0 ∪ L1 ∪ L2 ]ρx 6= ∅. Since [p0 ]ρx and [L0 ]ρx are closed sets, if y is close enough to x and the hyperplane Ly containing y is chosen to be close enough to Lx 8 then Ly ∩ [p0 ]ρx = ∅ and Ly \ [L0 ∪ L1 ∪ L2 ]ρx 6= ∅. Thus, the compactness of [L1 ]ρ0 implies that there exists a uniform ρ1 > 0 such that for every x ∈ [L1 ]ρ0 there exists an (n − 2)-dimensional subspace Lx containing x such that Lx ∩ [p0 ]ρ1 = ∅ and Lx \ [L0 ∪ L1 ∪ L2 ]ρ1 6= ∅. The set of (n − 2)-dimensional subspaces of P which are contained in [L2 ]ρ0 is compact. Thus, a similar argument to the one above implies that there exist ρ2 > 0 such that for every (n−2)-dimensional subspace L ⊆ [L2 ]ρ0 there exist x ∈ L\[L0 ∪L1 ]ρ2 and an (n−2)-dimensional subspace Lx containing x such that Lx is not contained in [L2 ]ρ2 and Lx ∩ [p0 ]ρ2 = ∅. Then ρ := min(ρ0 , ρ1 , ρ2 ) satisfies the requirements.  We fix ρ > 0 which satisfies the requirements of Claim 4.2. Claim 4.3. Assume that A ⊆ R are closed sets such that: 1. [L0 ∪ L1 ]ρ ⊆ R and [p0 ]ρ ⊆ A; 2. For every x ∈ [L1 ]ρ there exists an (n − 2)-dimensional subspace Lx containing x such that Lx ∩ A = ∅ and Lx \ (R ∪ [L2 ]ρ ) 6= ∅; 3. For every (n − 2)-dimensional subspace L ⊆ [L2 ]ρ there exist x ∈ L \ R and an (n − 2)dimensional subspace Lx containing x such that Lx is not contained in [L2 ]ρ and Lx ∩A = ∅. Then for every (n − 2)-dimensional subspace L which is disjoint from A, not contained in [L2 ]ρ and contains a point p ∈ L \ R there exists δ > 0 such that: 4. Items 2 and 3 hold for A∗ := A ∪ [p]δ and R∗ := R ∪ [L]δ instead of A and R. 5. [p]δ ∩ R = ∅ and [L]δ ∩ A = ∅. Proof of Claim 4.3: For every x ∈ [L1 ]ρ there exists an (n − 2)-dimensional subspace Lx containing x such that item 2 holds. By a small deformation of Lx we can assume that p 6∈ Lx and Lx 6= L (so Lx in not contained in L ∪ R). Thus, there exists δx > 0 such that Lx ∩ (A ∪ [p]δx ) = ∅ and Lx \ (R ∪ [L2 ]ρ ∪ [L]δx ) 6= ∅. If y is close enough to x and the hyperplane Ly containing y is chosen to be close enough to Lx then Ly ∩ (A ∪ [p]δx ) = ∅ and Ly \ (R ∪ [L2 ]ρ ∪ [L]δx ) 6= ∅. Thus, the compactness of [L1 ]ρ implies that there exists a uniform δ1 > 0 such that for every x ∈ [L1 ]ρ there exists an (n−2)-dimensional subspace Lx containing x such that Lx ∩ (A ∪ [p]δ1 ) = ∅ and Lx \ (R ∪ [L2 ]ρ ∪ [L]δ1 ) 6= ∅ Let L3 be an (n − 2)-dimensional subspaces of P which is contained in [L2 ]ρ so L3 6= L. Item 3 states that there exists x ∈ L3 \ R and an (n − 2)-dimensional subspace Lx containing x such that Lx is not contained in [L2 ]ρ and Lx ∩ A = 6 ∅. The set R is closed so by a small deformation we can assume that x 6∈ L and p 6∈ Lx . Hence, there exists δL3 > 0 such that x 6∈ [L]δL3 and Lx ∩ [p]δL3 = ∅. If L4 is very close to L3 then we can pick y ∈ L4 \ R which 9 is very close to x and an (n − 2)-dimensional subspace Ly containing y which is close to Lx such that Ly is not contained in [L2 ]ρ , Ly ∩ A = ∅, y 6∈ [L]δL3 and Ly ∩ [p]δL3 = ∅. The set of (n − 2)-dimensional subspaces of P which are contained in [L2 ]ρ is compact and thus there exists a uniform δ2 > 0 such that for every (n − 2)-dimensional subspace L ⊆ [L2 ]ρ there exist x ∈ L \ R ∪ [L0 ]δ2 and an (n − 2)-dimensional subspace Lx containing x such that Lx is not contained in [L2 ]ρ and Lx ∩ (A ∪ [p]δ2 ) = ∅. Finally, if 0 < δ3 < min{dist(A, L), dist(R, p)} then δ := min(δ1 , δ2 , δ3 ) satisfies the requirements.  Claim 4.4. Assume that ρ > 0, A and R satisfies the assumptions of Claim 4.3 and (S, A, R) is a profinitely-dense Schottky system. Let g ∈ SL(n, Z) be a non-identity element for which there exists an (n − 2) dimensional subspace L such that L ⊆ [L2 ]ρ and gL ⊆ [L1 ]ρ . Then there exists (S+ , A+ , R+ ) which still satisfies the assumptions of Claim 4.3 (with respect to the same ρ) and hS+ , gi = SL(n, Z). Proof of Claim 4.4: Item 3 of Claim 4.3 implies that there exists a point w ∈ L\A∪R and an (n − 2)-dimensional subspace Lw containing w which is not contained in [L2 ]ρ such that Lw ∩ A = ∅. Denote w1 := gw and note that w 6= w1 since w 6∈ [L1 ]ρ while w1 ∈ [L1 ]ρ . Item 2 of Claim 4.3 implies that there exists an (n − 2)-dimensional subspace Lw1 containing w1 and a point p1 ∈ Lw1 such that Lw1 ∩ A = ∅ and p1 ∈ Lw1 \ (R ∪ [L2 ]ρ ). By a small deformations we can assume that w, w1 , p1 , Lw and Lw1 are rational and that w 6∈ Lw1 and p1 6∈ Lw . Set r := min{dist(w, Lw1 ), dist(p1 , Lw ))}. Claim 4.3 implies that there exists 0 < δ1 < r such that items 4 and 5 of Claim 4.3 hold for A∗ := A ∪ [p1 ]δ1 and R∗ := R ∪ [Lw1 ]δ1 instead of A and R. Lemma 2.6 implies that there exists u ∈ U with pu = p1 and Lu = Lw1 such that (S∗ , A∗ , R∗ ) is Schottky system where S∗ := S ∪ {u}. Note that w 6∈ A∗ ∪ R∗ and that Lw ∩ A∗ = ∅. Denote h := g −1 ug. Since h(w) = w and h is not the identity, there exists a point p2 such that p2 and p3 := hp3 are distinct and close as we wish to w. Moreover, we can assume that p2 , p3 6∈ R∗ ∪ A∗ are rational points and that there exist rational (n − 2)-dimensional subspaces Lp2 and Lp3 containing p2 and p3 such that Lp2 ∩ A = ∅ and Lp3 ∩ A = ∅ (just choose L2 and L3 to be very close to Lw ). Finally by slightly deforming Lp2 and Lp3 we can guarantee that Lp3 6= hLp2 , p2 6∈ Lp3 and p3 6∈ Lp2 . Claim 4.3 applied to A∗ and R∗ implies that there exists 0 < δ2 < min(dist(p3 , L2 ), dist(p2 , L3 )) for which items 4 and 5 hold. An additional use of Claim 4.3 with respect to A∗ ∪ [p2 ]δ2 and R∗ ∪ [L2 ]δ2 implies that there exists a positive number δ3 such that items 4 and 5 hold with respect to A+ := A∗ ∪ [p2 ]δ2 ∪ [p3 ]δ3 and R+ := R∗ ∪ [L2 ]δ2 ∪ [L3 ]δ3 . Lemma 2.10 implies that there exists S∗ ⊆ S+ such that (S+ , A+ , R+ ) is a Schottky system and hS+ , gi = SL(n, Z).  We are ready to complete the proof of Proposition 4.1. Let (gi )i≥1 be an enumeration of the elements g of SL(n, Z) for which there exists an (n − 2) dimensional subspace L such 10 that L ⊆ [L2 ]ρ and gL ⊆ [L1 ]ρ . Proposition 2.14 and Claim 4.2 imply that there exists a profinitely-dense Schottky system (S0 , A0 , R0 ) such that A0 := [p0 ]ρ and R0 := [L0 ∪ L1 ]ρ . Claim 4.2 allows us to recursively construct an ascending sequence (Si , Ai , Ri )i≥0 of profinitelydense Schottky systems such that hSi , gi i = SL(n, Z) for every i ≥ 1. The set ∪k≥0 Sk freely generates a free profinitely-dense subgroup H with the required property. 5 Proof of Theorems 1.3 and 1.4 It is enough to show that there exists elements g, k ∈ SL(n, Z) and an infinite-index profinitelydense subgroup H such that kHk −1 ∩ H 6= {id}, hH, ki = SL(n, Z) and gM g −1 ∩ M = {id} for every H ≤ M  SL(n, Z). Indeed, if M is any maximal subgroup which contains H then SL(n, Z) acts primitively on SL(n, Z)/M but the action is not 2-transitive since the stabiliser of the pair (M, kM ) is not trivial while the stabiliser of the pair (M, gM ) is trivial. Definition 5.1. We say that the quadruple (S, A, N , R) is a (profinitely-dense) Schottky system if the triple (S, A, R) is a (profinitely-dense) Schottky system and N is an open set which contains A. Before starting with the formal proof let us explain the main idea of the proof. Choose g ∈ SL(n, Z) which fixes some point p ∈ P. Let (S0 , A0 , N0 , R0 ) be a profintiely dense Schottky system such that gN0 ∩ N0 = ∅. Given a non-identity h ∈ SL(n, Z) we would like to construct a Schottky system (S1 , A1 , N1 , R1 ) which contains (S0 , A0 , N0 , R0 ) such that either hS0 , hi = SL(n, Z) or hS0 , g −1 hgi = SL(n, Z). In particular, every maximal subgroup of SL(n, Z) which contains S1 does not contain {h, g −1 hg}. Since gN0 ∩ N0 = ∅, either h(p) 6∈ N0 or g −1 hg(p) 6∈ N0 . Assume for example that the first case hold. Then we can use the same technique as in the proof of Theorem 1.2 to construct (S1 , A1 , N1 , R1 ) such that hS0 , hi = SL(n, Z). In particular, we need to add an element u ∈ U to S0 such that h(p) ∈ Lu and Lu ∩ A0 = ∅. This is the place where we need the open set N0 ; A0 might contain some closed ball B for which there exists a sequence of points (zn )n≥1 such that z := limn→∞ zn ∈ B and zn 6∈ A0 for every n ≥ 1. If (Ln )n≥1 is any sequence of hyperplanes such that zn ∈ Ln and Ln ∩ B = ∅ for every n ≥ 1 then limn→∞ Ln is the tangent hyperplane L to B at the point z. The problem is that L might intersect the interior of A0 . Therefore, if h(p) is very close to B it might happen that L ∩ A0 6= ∅ for every hyperplane L which contains h(p). In particular, it is not possible to find an element u with the required properties. In order to avoid this problem we use the open set N0 to guarantee that h(p) is not too close to A0 . Note that we don’t need the open sets in the proof of Theorem 1.2 because we have a better control on the projective actions of the elements we deal with (they send some line in a given open set to some other given open set). 11 Claim 5.2. Let p ∈ P be fixed by a non-identity element g ∈ SL(n, Z). Let k ∈ SL(n, Z) be an element such that id, k, k 2 , g, gk, gk 2 are pairwise distinct elements. Then there exists a profinitely-dense Schottky system (S, A, N , R) which satisfies: 1. p 6∈ N ∪ R ∪ gN ∪ gR and N ∩ gN = ∅; 2. If x 6∈ N then there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N ∪ R, gpx 6∈ N and Lx ∩ A = ∅; 3. khSik −1 ∩ hSi = 6 {id} and hS, ki = SL(n, Z). Proof: Choose rational points p1 , p2 and p3 and rational (n − 2)-dimensional subspaces L1 , L2 and L3 such that: • For every 1 ≤ i 6= j ≤ 3, pi ∈ Li and pi 6∈ Lj ; • p2 = kp1 , p3 := k 2 p1 , L2 = kL1 , L3 6= kL1 and p1 , p2 , p3 , p4 , p5 , p6 are pairwise distinct where p4 := gp1 , p5 := gp2 and p6 := gp3 ; • p 6∈ ∪1≤i≤3 Li (so p 6∈ ∪1≤i≤3 Li ∪1≤i≤3 gLi since gp = p). A compactness argument implies that there exist δ > 0 such that: a) For every 1 ≤ i 6= j ≤ 3, [pi ]δ ∩ [Lj ]δ = ∅; b) N ∩ gN = ∅ where N := ∪1≤i≤3 (pi )δ ; c) p 6∈ N ∪ R ∪ gN ∪ gR where R := ∪1≤i≤3 [Li ]δ ; d) For every x ∈ P there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N ∪ R and gpx 6∈ N . An additional compactness argument implies that there exists δ > ε > 0 such that: e) For every x 6∈ N there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N ∪R, gpx 6∈ N and Lx ∩ A = ∅ where A := ∪1≤i≤3 [pi ]ε . Items (a), (b), (c), (e) and Corollary 2.15 imply that the required (S, A, N , R) exists.  Claim 5.3. Let p ∈ P be fixed by a non-identity element g ∈ SL(n, Z). Assume that (S, A, N , R) is a profinitely-dense Schottky system which satisfies: 1. p 6∈ N ∪ R ∪ gN ∪ gR and N ∩ gN = ∅; 12 2. If x 6∈ N then there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N ∪ R, gpx 6∈ N and Lx ∩ A = ∅; Then for every non-identity h ∈ SL(n, Z), (S, A, N , R) is contained in a Schottky system (S+ , A+ , N+ , R+ ) which still satisfies assumptions 1 and 2 and such that hS+ , hi = SL(n, Z) or hS+ , g −1 hgi = SL(n, Z). Proof: By replacing h with g −1 hg if necessary we can assume that y := hp 6∈ N . Under this assumption we will show that there exists a Schottky system (S+ , A+ , N+ , R+ ) which satisfies assumption 1 and 2 and hS+ , hi = SL(n, Z). Assumption 2 implies that there exist y ∈ Ly ∈ Ln−2 and py ∈ Ly such that py 6∈ N ∪ R, gpy 6∈ N and Ly ∩ A = ∅. By making small deformations we may assume that: y and Ly are rational, gpy 6= py and p 6∈ Ly . A compactness argument implies that there exists δ > 0 such that: a) [py ]δ ∩ R = ∅ and [Ly ]δ ∩ A = ∅; b) N0 ∩ gN0 = ∅ where N0 := N ∪ (py )δ ; c) p 6∈ N0 ∪ R0 ∪ gN0 ∪ gR0 where R0 := R0 ∪ [Ly ]δ ; d) For every x 6∈ N there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N0 ∪ R0 , gpx 6∈ N0 and Lx ∩ A = ∅. An additional compactness argument implies that there exists δ > ε > 0 such that: e) If x 6∈ N0 then there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N0 ∪R0 , gpx 6∈ N0 and Lx ∩ A0 = ∅ where A0 := A ∪ [py ]ε . Corollary 2.6 and items (a), (b), (c) and (e) implies that there exists u ∈ U such that pu = py , Lu = Ly and (S0 , A0 , N0 , R0 ) is a Schottky system which still satisfies Assumptions 1 and 2 where S0 = S ∪ {u}. Note that h−1 uhp = p and that if (S+ , A+ , N+ , R+ ) contains (S0 , A0 , N0 , R0 ) and hS+ , h−1 uhi = SL(n, Z) then also hS+ , hi = SL(n, Z). Since h−1 uh has infinite order there exists some m ≥ 1 such that id, f, g, gf are pairwise distinct elements where f := h−1 um h. Thus, every open neighbourhood of p contains a rational point p1 such that p1 , p2 := f p1 , p3 := gp1 and p4 := gf p1 are 4 distinct points which are contained in this neighbourhood. If this neighbourhood does not intersect N0 then assumption 2 implies that for every 1 ≤ i ≤ 2 there exists an (n − 2)-subspace pi ∈ Li ∈ Ln−2 such that Li ∩ A0 = ∅. By using small deformations we can assume that the Li ’s and pi ’s are rational, L2 6= f L1 , p 6∈ Li and pj 6∈ Li for every 1 ≤ i 6= j ≤ 4. A compactness arguments implies that there exists δ > 0 such that: a) For every 1 ≤ i 6= j ≤ 2, [pi ]δ ∩ (R0 ∪ [Lj ]δ ) = ∅ and [Li ]δ ∩ A0 = ∅; 13 b) N+ ∩ gN+ = ∅ where N+ := N0 ∪ (p1 )δ ∪ (p2 )δ ; c) p 6∈ N+ ∪ R+ ∪ gN+ ∪ gR+ where R+ := R0 ∪ [L1 ]δ ∪ [L2 ]δ ; d) If x 6∈ N0 then there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N+ ∪ R+ , gpx 6∈ N+ and Lx ∩ A0 = ∅. An additional compactness argument implies that there exists δ > ε > 0 such that: e) If x 6∈ N+ then there exists x ∈ Lx ∈ Ln−2 and px ∈ Lx such that px 6∈ N+ ∪ R0 , gpx 6∈ N+ and Lx ∩ A+ = ∅ where A+ := A ∪ [p1 ]ε ∪ [p2 ]ε . Corollary 2.10 and items (a), (b), (c) and (e) imply that there exists S+ ⊇ S such that (S+ , A+ , N+ , R+ ) is a Schottky system which satsfies items 1 and 2 and hS+ , f i = SL(n, Z).  We are now ready to complete the proof of Theorems 1.3 and 1.4. Let (hi )i≥1 be an enumeration of the non-identity elements of SL(n, Z). Let p ∈ P be fixed by a non-identity element g ∈ SL(n, Z). Let k ∈ SL(n, Z) be an element such that id, k, k 2 , g, gk, gk 2 are pairwise distinct elements. Claims 5.2 and 5.3 allow us the recursively construct ascending sequence (Si , Ai , Ni , Ri )i≥0 of profintely-dense Schottky systems such that khS0 ik −1 ∩ hS0 i = 6 {id} and hS0 , ki = SL(n, Z) and for every i ≥ 1 either hhi , Si i = SL(n, Z) or hg −1 hi g, Si i = SL(n, Z). The subgroup H := hSi | i ≥ 0i has the required properties stated in the first paragraph of this section. 6 The SL(n, Q) case Margulis’ and Soifer’s paper is concerned only with finitely generated group. In [GG08] the first author and Glasner studied infinite index maximal subgroups in general linear groups and proved a criterion for their existence. The goal of this section is to show that Theorems 1.3, 1.4 and 1.2 hold also for SL(n, Q). Since the proofs are very similar to the ones given for SL(n, Z), we only sketch the required modifications needed for proving the SL(n, Q) version of Theorem 1.3. The first modification concerns the elements in the generating set S. It is not enough anymore to deal only with unipotent elements. We say that an element g ∈ SL(n, Q) is strongly-semisimple if it has a unique eigenvalue λ+ g of maximal absolute value and a unique + eigenvalue λ− g of minimal absolute value. Let pg be the projective point corresponding to + + the λ+ g -eigenspace and Lg ∈ Ln−1 the projective hyperplane corresponding to Im(Id − λg ). + + − Denote p− g := pg −1 and Lg := Lg −1 . To simplify the notation, if u ∈ U (in particular u is not − + − strongly-semisimple) we denote p+ u = pu := pu and Lu = Lu := Lu . 14 Definition 6.1. Assume that S is a non-empty subset of SL(n, Q) consisting of elements which are either strongly-semisimple or unipotent of rank 1. Let A ⊆ R be closed subsets of P. We call the triple (S, A, R) a Schottky system if for every g ∈ S there exist two positive numbers δg ≥ εg such that the following properties hold: − + − 1. g k (x) ∈ (p+ g , pg )εg for every x ∈ P \ (Lg ∪ Lg )δg and every k 6= 0; + − − 2. If g 6= h ∈ S then (p+ g , pg )εg ∩ (Lh ∪ Lh )δh = ∅; − 3. ∪g∈S (p+ g , pg )εg ⊆ A; − 4. ∪g∈S (L+ h , Lh )δv ⊆ R. The basic idea in the proof of Theorem 1.2 is to pick two small enough disjoint open subset U, V ⊆ P and to construct enumeration (gk )k≥1 of all the elements g ∈ SL(n, Z) such that gU ∩ V = ∅. (In the proof we passed to the dual space but it is merely a convenience.) The second step is to construct a unipotent Schottky system (S0 , A0 , R0 ) such that the following items hold for k = 0: (1) hSk i is profintiely dense in SL(n, Z); (2) hSk i ∩ {gi | i ≥ 1} = ∅; (3) There exists Sk+1 ⊇ Sk , Ak+1 ⊇ Ak and Rk+1 ⊇ Rk such that hSk+1 , gk+1 i = SL(n, Z) and the first two items still hold for (Sk+1 , Ak+1 , Rk+1 ). The main part of the proof of Theorem 1.2 is to inductively construct an ascending sequence (Sk , Ak , Rk )k≥0 such that for every k ≥ 0 items (1)–(3) hold. Any infinite index maximal subgroup ∆ of SL(n, Z) which contains Λ := h∪k≥1 Sk i has empty intersection with {gk | k ≥ 1}. The existence of ∆ follows from Zorn’s lemma. The fact that the gk ’s belong to SL(n, Z) is not used in the construction, and it is possible to take enumeration (gk )k≥1 of all the elements g ∈ SL(n, Q) such that gU ∩ V = ∅ and to inductively construct an ascending sequence (Sk , Ak , Rk )k≥0 such that for every k ≥ 0 items (1)–(3) hold where the equality hSk+1 , gk+1 i = SL(n, Z) in item (3) is replaced with hSk+1 , gk+1 i ⊇ SL(n, Z). However, it is not possible to directly apply Zorn’s lemma since SL(n, Q) is not finitely generated and the union of ascending sequence of proper subgroups of SL(n, Q) might be equal to SL(n, Q). Thus, Λ might not be contained in a maximal subgroup. An additional problem is that even if Λ is contained in a maximal subgroup then this maximal subgroup might contain SL(n, Z) and have a non-empty intersection with {gk | k ≥ 1}. In order to overcome these problems we take enumeration (Ck )k≥1 of the left cosets of SL(Z[1/p]) in SL(n, Q) where p is some odd prime. One start with a unipotent Schottky system (S0 , A0 , R0 ) in SL(Z[1/p]) such that the following items hold for k = 0: 15 (1∗ ) hSk ∩ SL(n, Z)i is profintiely dense in SL(n, Z) and Sk \ SL(n, Z) 6= ∅; (2∗ ) hSk i ∩ {gi | i ≥ 1} = ∅; (3∗ ) There exists Sk+1 ⊇ Sk , Ak+1 ⊇ Ak and Rk+1 ⊇ Rk such that: (a) The first two items still hold for (Sk+1 , Ak+1 , Rk+1 ); (b) hSk+1 , gk+1 i ⊇ SL(n, Z); (c) If k 6= 0, hSk+1 i ∩ Ck 6= ∅. It is possible to inductively construct an ascending sequence (Sk , Ak , Rk ) such that for every k items (1∗ )–(3∗ ) hold. The new requirement, Part (c) of item (3∗ ), brings almost no difficulty since SL(n, Z[1/p]) is dense in SL(n, R) so in every coset it is easy to find an element which still plays ping-pong with the elements of Sk . Note that this is the place where we need to deal with strongly semi-simple elements since an element which is very close to a strongly semi-simple element is strongly semi-simple while an element which is very close to a unipotent element might not be unipotent. Denote Λ := hSk i. An ascending sequence of proper subgroups which contain Λ cannot be equal to SL(n, Q). Indeed, if this happens then one of the subgroups in the union contains the finitely generated group SL(n, Z[1/p]) and has non-trivial intersections with all the cosets of SL(n, Z[1/p]) so it is equal to SL(n, Q), a contradiction. Zorn’s lemma implies that Λ is contained in some maximal subgroup ∆. We need to show that ∆ ∩ {gk | k ≥ 1} = ∅. Assume otherwise, then item (3∗ ) implies that ∆ contains SL(n, Z). Since SL(n, Z) is a maximal subgroup of SL(n, Z[1/p]), item (1∗ ) implies that ∆ contains SL(n, Z[1/p]). But ∆ non-trivially intersects all the cosets of SL(n, Z[1/p]), so ∆ = SL(n, Q), a contradiction. 7 Questions Question 7.1. Does SL(n, Z) have a finitely generated infinite-index maximal subgroup? This question appears in Margulis and Soifer’s paper and it is still open. Note that general finitely generated linear groups which are not virtually-solvable might but don’t have to contain such subgroups. For example, non-commutative free groups do not have finitely generated infinite index maximal subgroups. On the other hand, as pointed out by Yair Glasner, the finitely generated linear group SL(n, Z[1/p]), where p is a prime integer, contains the finitely generated subgroup SL(n, Z) as a maximal subgroup. Question 7.2. Margulis and Soifer proved that every finitely generated linear group which is not virtually-solvable contains uncountably many maximal subgroups. The proof of Theorem 1.1 uses Venkatramana’s theorem which in turn is based on the congruence subgroup property. 16 Thus, our techniques do not give an answer to the following question: Does every finitely generated linear group which is not virtually-solvable contains 2ℵ0 maximal subgroups? Question 7.3. Does SL(n, Z) contain two infinite-index non-isomorphic maximal subgroups? When n ≥ 4 Margulis and Soifer proved that SL(n, Z) contains an infinite-index maximal subgroup which has a subgroup isomorphic to Z2 . It is also not hard to construct infinite-index maximal subgroups of SL(n, Z) which have non-trivial torsion elements for n ≥ 3. Thus, a positive answer to any one of the following three questions would provide an example of two infinite-index non-isomorphic maximal subgroups: Question 7.4. Does SL(n, Z) contain a torsion-free infinite-index maximal subgroup? Question 7.5. Does SL(n, Z) contain an infinite-index maximal subgroup which does not have a subgroup isomorphic to Z2 ? Question 7.6. Does SL(n, Z) contains a maximal subgroup which is a free group? Note that it is possible that all the infinite-index maximal subgroups of a given finitely generated linear group are isomorphic. For example, this is the case for a non-commutative free group. Question 7.7. An element g ∈ SL(3, Z) is called complex if for every m ≥ 1 the matrix g m has a non-real eigenvalue. Is it possible that an infinite-index Zariski-dense subgroup of SL(3, Z) contain a complex element? The thin subgroups that arise from standard pingpong arguments on projective space do not contain complex elements. More surprisingly, the thin surface subgroups constructed in the work of Long–Reid–Thistlethwaite [LRT11] do not contain complex elements. A positive answer to the above question would provide the first example (to the best of our knowledge) of a thin group whose limit set is P (In fact this group would act minimally on pairs of distinct elements of projective space). A negative answers would provide a very strong restriction on the structure of thin groups. Question 7.8. Very little is known about permutation actions of SL(n, Z). In light of theorem 1.4 it is natural to ask if SL(n, Z) have 2-transitive actions? More generally, does SL(n, Z) have highly transitive actions? In an upcoming joint paper with Glasner we prove that all convergence groups (and in particular, linear groups of real-rank 1) have highly transitive permutation actions. Another question of this nature is: Does SL(n, Z) have non-equivalent primitive permutation actions? Question 7.9. Call a subset S ⊆ SL(n, Z) fat if [SL(n, Z) : hSi] = ∞ but every Zariski-dense subgroup of SL(n, Z) which contains S is of finite index. Venkataraman’s theorem (Theorem 2.8 above) implies that if u, v are unipotent elements, u has rank 1 and hu, vi is isomorphic to Z2 then {v, u} is a fat subset. Question 7.7 asks if {g} is a fat subset whenever g is a complex element. What are the fat subsets of SL(n, Z)? 17 References [AGS14] M. Aka, T. Gelander and G.A. Soifer.Homogeneous number of free generators. J. Group Theory 17 (2014), no. 4, 525539. [CG00] J.-P. Conze and Y. Guivarc’h, Limit sets of groups of linear transformations. Ergodic theory and harmonic analysis (Mumbai, 1999). Sankhya Ser. A 62 (2000), no. 3, 367–385. [GG08] T. Gelander and Y. Glasner, Countable primitive groups. Geom. Funct. Anal. 17 (2008), no. 5, 1479–1523. [LRT11] D.D. Long, A. Reid and M. Thistlethwaite, Zariski dense surface subgroups in SL(3,Z). Geom. Topol. 15 (2011), no. 1, 1–9. [Lu99] A. Lubotzky, One for almost all: generation of SL(n,p) by subsets of SL(n,Z). Algebra, K-theory, groups, and education (New York, 1997), 125–128, Contemp. Math., 243, Amer. Math. Soc., Providence, RI, 1999. [MS81] G. Margulis and G. A. Soifer, Maximal subgroups of infinite index in finitely generated linear groups. J. Algebra 69 (1981), no. 1, 1-23. [No87] M.V. Nori, On subgroups of GLn (Fp ). Invent. Math. 88 (1987), no. 2, 257–275. [We96] T. Weigel, On the profinite completion of arithmetic groups of split type. Lois d’algébres et variétés algébriques (Colmar, 1991), 79–101, Travaux en Cours, 50, Hermann, Paris, (1996). [We84] B. Weisfeiler, Strong approximation for Zariski-dense subgroups of semisimple algebraic groups. Ann. of Math. (2) 120 (1984), no. 2, 271–315. [Ve87] T.N. Venkataramana, Zariski dense subgroups of arithmetic groups. J. Algebra 108 (1987), no. 2, 325–339. 18
4math.GR
arXiv:1711.04973v1 [math.OC] 14 Nov 2017 A Robust Variable Step Size Fractional Least Mean Square (RVSS-FLMS) Algorithm Shujaat Khana,b , Muhammad Usmanb , Imran Naseemc,d,∗, Roberto Tognerid, Mohammed Bennamoune a Department of Bio and Brain Engineering, Korea Advanced Institute of Science and Technology (KAIST), Daejeon, Republic of Korea. b Faculty of Engineering Science and Technology (FEST), Iqra University, Defence View, Karachi-75500, Pakistan. c College of Engineering, Karachi Institute of Economics and Technology, Korangi Creek, Karachi 75190, Pakistan. d School of Electrical, Electronic and Computer Engineering, The University of Western Australia, 35 Stirling Highway, Crawley, Western Australia 6009, Australia. e School of Computer Science and Software Engineering, The University of Western Australia, 35 Stirling Highway, Crawley, Western Australia 6009, Australia. Abstract In this paper, we propose an adaptive framework for the variable step size of the fractional least mean square (FLMS) algorithm. The proposed algorithm named the robust variable step size-FLMS (RVSS-FLMS), dynamically updates the step size of the FLMS to achieve high convergence rate with low steady state error. For the evaluation purpose, the problem of system identification is considered. The experiments clearly show that the proposed approach achieves better convergence rate compared to the FLMS and adaptive step-size modified FLMS (AMFLMS). Keywords: Least mean square (LMS), fractional calculus, plant identification, channel equalization, fractional LMS (FLMS), modified fractional LMS (MFLMS), adaptive step-size modified fractional LMS (AMFLMS), robust variable step size FLMS (RVSS-FLMS), robust variable step size (RVSS), high convergence, low steady state error, adaptive filter. ∗ Corresponding author Email addresses: [email protected] (Shujaat Khan), [email protected] (Muhammad Usman), [email protected] (Imran Naseem), [email protected] (Roberto Togneri), [email protected] (Mohammed Bennamoun) Preprint submitted to 13th IEEE Colloquium on Signal Processing & its ApplicationsNovember 15, 2017 1. Introduction The standard integral and derivative are essential tools of calculus used by the professionals dealing with the natural or artificial systems. The fractional order calculus (FOC) however extends the traditional definitions which are limited to integer values. The FOC is as old as classical calculus, however, the applications of the FOC in the areas of engineering and research have become more popular in the last decade. New areas are emerging as both theoretical and practical aspects of the FOC operators are now well established. Fractional calculus has turned out to be an important tool in various fields [1], [2]. Liouville, Reimann and Leibniz, amongst others, are considered to be the pioneers of fractional calculus [3]. In the late 19th century Heaviside made the use of fractional derivatives in transmission lines and gave the solution for the diffusion equation. In the recent years fractional calculus has been applied to the problem of path tracking in autonomous vehicles [4]. In [5] the concept of pulses propagating through porous media is proposed with an experimental proof for a theoretical model based on fractional derivatives. Fractional calculus is also applied in the theory of viscoelasticity [6]. In the field of image processing fractional differentiation has been used for a number of tasks such as edge detection [7]. In the domain of signal processing FOC has found a number of useful applications. Adaptive filtering for instance, has been the main focus of research in this context. In [8] an FOC based least mean square algorithm named the fractional least mean square (FLMS) is proposed. The FLMS is compared with the least mean square (LMS) algorithm for the problem of system identification. In the recent past, various modifications have been proposed for the conventional FLMS [9, 10, 11, 12, 13, 14, 15, 16]. In this paper a modified FLMS based algorithm is proposed. The proposed method is named the robust variable step size fractional least mean square (RVSS-FLMS) and is inspired by the variable learning rate LMS (RVSS-LMS) [17]. The RVSS-FLMS algorithm dynamically 2 adapts the learning rate of FLMS using the instantaneous error energy to achieve high convergence rate and low steady state error. The proposed algorithm is evaluated on the problem of system identification and is compared with the conventional FLMS and adaptive step-size modified fractional least mean square (AMFLMS) algorithm. The rest of the paper is organized as follows : In section 2 a brief literature review of modified least mean square algorithms is provided. In section 3 the proposed RVSS-FLMS algorithm is discussed followed by the experiments in section 4. The paper is concluded in section 5. 2. Least Mean Square The statistics in the LMS are estimated continuously, therefore it is an adaptive filter belonging to the group of stochastic gradient methods. Extensive research is done towards optimization of the LMS algorithm by numerous researchers [9, 18, 19, 20, 21]. LMS is applied in diversified applications such as plant identification [8], noise cancellation [22], echo cancellation [23], ECG signal analysis [24], time series prediction [25] etc. Achieving fast convergence and low steady state error is a challenge, various researchers have proposed different solutions for this. One of the disadvantages of the LMS is that it is sensitive to the scaling of its input [26]. A variant of the LMS algorithm the normalised least mean squares filter (NLMS) solves this problem through normalization. In [27], an optimized NLMS filter is proposed to achieve a tradeoff between the convergence rate and tracking. In [28] q-LMS is proposed which utilizes the q-gradient from the Jackson’s derivative so that secant of the cost function is computed instead of the tangent. The algorithm therefore takes larger steps towards the optimum solution and therefore achieves the higher convergence rates. For the optimal processing of complex signals, linear modelling in complex numbers is utilized by [29]. For the complex domain adaptive filtering an augmented complex least mean square (ACLMS) is proposed. In [21] fractional least mean square (FLMS) is proposed for parameter estimation of input non-linear control autoregressive (INCAR) or Hammerstein 3 non-linear controlled auto regression models based on fractional signal processing approach. Unknown parameters are estimated by applying the FLMS algorithm having different step sizes. The algorithm provides better convergence results when compared to the volterra least mean square (VLMS) and kernel least mean square (KLMS). A modified structure of the FLMS, for the prediction of chaotic and non-stationary time series, named the modified fractional least mean square (MFLMS) is proposed in [10]. The algorithm incorporates the adjustable gain parameter thereby avoiding some complex calculations and with reduced computational expense. The MFLMS is tested on stationary and non-stationary time series with different noise levels and has shown improved results compared to the LMS and FLMS. In [11] the adaptive weight gain parameters are incorporated by implementing a gradient-based approach on the variable learning scheme. Implementation of this approach changes the nature of the order of fractional derivative in MFLMS from fixed to adaptive. The adaptive nature of the adjustable parameters may help the filters in handling the problems with non-linear nature. They proposed adaptive step-size modified fractional least mean square (AMFLMS) and demonstrated the improvements by comparing their algorithm with the LMS, FLMS and MFLMS. In this research we propose to utilize the concept of robust variable step size (RVSS) [17] for the variable learning rate of the FLMS algorithm. The proposed scheme is robust and computationally less expensive. For the performance evaluation we consider the problem of the system identification and compare our results with the FLMS and AMFLMS algorithm. 3. Proposed RVSS FLMS In [8] the weight update equation for the fractional LMS (FLMS) is given as: wk (n + 1) = wk (n) − ν ∂J(n) − νf ∂wk  ∂ ∂wk f J(n) (1) where wk (n) is the weight of the k th tap at the nth iteration, f is the fractional power of derivative, and ν and νf are the step sizes. 4 J(n) = 1 1 e(n)2 = (d(n) − y(n))2 2 2 (2) J(n) is the cost function defined in Eq. (2), where e(n) is the instantaneous error between the desired output d(n) and the estimated output y(n) at the nth iteration. Now, the ∂J(n) is defined as : ∂wk ∂J(n) ∂e(n) ∂y(n) ∂J(n) = ∂wk ∂e ∂y ∂wk (3) f ∂ J(n), the methods of chain rule ∂wk can be defined in various ways. The modified Rieman-Lioville based definition of For the fractional derivative term  the fractional chain rule i.e Dxν f (g(x)) = (Dg1 f (g))g=g(x) Dxν g(x), as suggested in [30], is one of the well known techniques. This definition has shown good results in various applications of fractional calculus. For example, in [30] for the fractional Taylor series of non differentiable functions, [31] for the derivation of further fractional order derivatives, [32] for system modeling and others [33, 34, 35, 36].  Using the modified Rieman-Lioville chain rule for fractional derivatives, the f ∂ J(n) term is defined as : ∂wk  ∂ ∂wk f J(n) = ∂J(n) ∂e(n) ∂e ∂y  ∂ ∂wk f y(n) (4) solving Eq. (3) results in : ∂J(n) = −e(n)x(n) ∂wk (5) According to the Rieman-Lioville fractional derivative method : 1 D f (t) = Γ (n − v) v  d dt n Zt 0 5 (t − τ )(n−v−1) f (τ )dτ (6) Dv (t − a)α = Γ (1 + α) (t − a)(α−v) Γ (1 + α − v) (7) where α−v +1 > 0, D is the differential operator and v is a real number defining the fractional power of the derivative. Using Eq. (7), Eq. (4) can be reduced to:  ∂ ∂wk f (1−f ) J(n) = −e(n)x(n) wk (n) Γ (2 − f ) (8) Using Eq. (5) and (8) the weight update Eq. (1) becomes : wk (n + 1) = wk (n) + νe(n)x(n) + νf e(n)x(n) wk1−f (n) Γ (2 − f ) (9) Note that the result in Eq. (9) is similar to the FLMS algorithm results [10, 11, 21], obtained from the alternative method of fractional derivatives to avoid the chain rule. For simplicity, in Eq. (9), we consider νf = νΓ (2 − f ) and this results in : wk (n + 1) = wk (n) + νe(n)x(n) + νe(n)x(n)wk1−f (n) (10)   wk (n + 1) = wk (n) + νe(n)x(n) 1 + wk1−f (n) (11) For the time varying step size ν can be replaced by ν(n)   wk (n + 1) = wk (n) + ν(n)e(n)x(n) 1 + wk1−f (n) (12) For the adaptation of learning rate, we proposed to use the concept of error energy correlation of RVSS-LMS algorithm [17]. The update rule for the time varying learning rate ν(n) in the proposed robust variable step size-FLMS (RVSS-FLMS) is defined as: ν(n + 1) = βν(n) + γp2 (n) 6 (13) where (0 < β < 1), (γ > 0), p(n) is the average error energy correlation and ν(n + 1) is set to νmin or νmax p(n) = αp(n − 1) + (1 − α)e(n)e(n − 1) (14) The positive constant α (0 < α < 1) is a weighting parameter that governs the averaging time constant. It is referred to as the forgetting factor. The limits on ν(n + 1) are given by : ν(n + 1) = where νmax > νmin > 0.      νmax if ν(n + 1) > νmax νmin if ν(n + 1) < νmin     ν(n + 1) otherwise (15) 4. Simulation Setup and Results For the evaluation of the proposed method the problem of plant identification is considered. The modeling of a linear system is an interesting problem. Sometimes it is desired to model the system as a linear filter to avoid unnecessary complexity. The adaptive learning methods like LMS, achieves good performance in this regard [8, 18, 21, 27]. To evaluate the efficacy of the proposed robust variable step size-FLMS (RVSS-FLMS), we consider a linear system, shown in Fig. 1: y(n) = a1 x(n) + a2 x(n − 1) + a3 x(n − 2) + d(n) (16) Eq. (16) shows the mathematical model of the system, where x(n) is the input and y(n) is the output of the system, d(n) is the disturbance model assumed to be N (0, σd2 ), ai ’s represent the polynomial coefficients depicting the zeros of the system. For the said experiment, x(n) is a binary shift keying (BPSK) modulated random sequence comprising 600 samples. In Fig. 1, the impulse response of the system is defined by h(n) while ŷ(n) is the estimated output, ĥ(n) is the estimated impulse response and e(n) is the estimation error. 7 Figure 1: System identification using adaptive learning algorithm. The simulation parameters selected for the experiments are: a1 = 0.9, a2 = 0.3, a3 = −0.1. The experiments are performed on four noise levels with the following SNR values 10 dB, 20 dB, 30 dB, and 40 dB. For the model design, the number of taps were chosen to be 3. The weights were initialized with a small value of 1×10−20 . For the fractional LMS (FLMS), adaptive step-size modified fractional least mean square (AMFLMS) and RVSSFLMS the initial values of ν(n) and νf (n) for n = 0 set to 1 × 10−4 and the fractional power f (n) for n = 0 was taken to be 0.5. For the AMFLMS, Ψk , Ψk,f and Φk,f were initialized with a small value of 1 × 10−15 . The mixing parameter β of AMFLMS was set to 0.5 and the adaptation rates α, αf and αf r were all set to 1 × 10−13 . For the proposed RVSS-FLMS the values of α, β and γ were all set to 0.5. The value of νmax and νmin are chosen to be 3 × 10−4 and 1 × 10−4 respectively. The experiments were performed on four noise levels and the mean square error (MSE) curves are depicted in Fig. 2. For the SNR values of 10 dB, 20 dB, 30 dB and 40 dB the RVSS-FLMS produced the best performance, achieving an MSE of −10.22 dB, −20.26 dB, −29.70 dB and −37.68 dB in around 20, 38, 60 and 65 iterations respectively. The conventional FLMS converged to the MSE value of −10.21 dB, −20.25 dB, −29.71 dB and −37.58 dB in around 45, 60, 80 and 90 iterations respectively. Whereas the AMFLMS converged to the MSE value of −10.22 dB, −20.27 dB, −29.71 dB and −37.60 dB in around 80, 8 100, 120 and 140 iterations respectively. The convergence rate of the proposed RVSS-FLMS algorithm is therefore found to be superior the FLMS and the AMFLMS algorithms. For the fair evaluation of the proposed algorithm, another well known performance measurement parameter called the normalized weight difference (NWD), was used. The NWD is a comparative measure between the actual impulse response and the identified weights. The experiments were performed on four noise levels for which the NWD curves are depicted in Fig. 3. For the SNR value of 10 dB, 20 dB, 30 dB and 40 dB the RVSS-FLMS produced high convergence and low steady state error, achieving an NWD value of −16.21 dB, −20.00 dB, −25.06 dB and −28.52 dB in approximately 35, 60, 95 and 100 iterations respectively. The FLMS converges to the NWD value of −15.81 dB, −20.09 dB, −25.06 dB and −28.91 dB in approximately 60, 85, 120 and 105 iterations respectively. Whereas the AMFLMS converges to the NWD value of −15.67 dB, −20.12 dB, −25.00 dB and −29.02 dB in approximately 120, 175, 200 and 200 iterations respectively. The proposed algorithm has therefore shown to comprehensively outperform the FLMS and AMFLMS algorithms. For the purpose of time-complexity comparison of the proposed algorithm with the FLMS and AFLMS, we investigated the training time of FLMS, AMFLMS and RVSS-FLMS for 200 iterations. The proposed method utilized 2.05 seconds whereas the FLMS and AMFLMS took 1.87 seconds and 11.06 seconds respectively. All the experiments were conducted using Matlab on an Intel(R) Core(TM) i5-4690 CPU @ 3.5GHz machine with 16GB memory. Although the proposed algorithm took a few milliseconds more than the FLMS but the experiments clearly show that the proposed robust approach dynamically adapts the learning rate to achieve the minimum steady state error in lesser number of iterations. The summary results for all simulations is showed in Table 1. 9 0 FLMS (10dB) AMFLMS (10dB) RVSS−FLMS (10dB) −5 −10 FLMS (20dB) AMFLMS (20dB) RVSS−FLMS (20dB) −5 MSE (dB) MSE (dB) 0 −10 −15 −20 −15 0 50 100 150 Iterations −25 0 200 100 150 Iterations 200 0 FLMS (30dB) AMFLMS (30dB) RVSS−FLMS (30dB) −10 −20 FLMS (40dB) AMFLMS (40dB) RVSS−FLMS (40dB) −10 MSE (dB) MSE (dB) 0 50 −20 −30 −30 0 50 100 150 Iterations −40 0 200 50 100 150 Iterations 200 0 FLMS (10dB) AMFLMS (10dB) RVSS−FLMS (10dB) −5 −10 −15 −20 0 50 100 150 Iterations 200 0 FLMS (30dB) AMFLMS (30dB) RVSS−FLMS (30dB) −10 −20 −30 0 50 100 150 Iterations 200 Normalized weight difference (dB) Normalized weight difference (dB) Normalized weight difference (dB) Normalized weight difference (dB) Figure 2: System identification: The MSE curves for various methods. 0 FLMS (20dB) AMFLMS (20dB) RVSS−FLMS (20dB) −5 −10 −15 −20 −25 0 50 100 150 Iterations 200 0 FLMS (40dB) AMFLMS (40dB) RVSS−FLMS (40dB) −10 −20 −30 0 50 100 150 Iterations 200 Figure 3: System identification: The normalized weight difference curves for various methods. 10 Table 1: Results for plant identification problem (Iterations, MSE) for SNR values Algorithm 10 dB 20 dB (Iterations, NWD) for SNR values 30 dB 40 dB 10 dB Time (seconds) 20 dB 30 dB 40 dB FLMS (45, -10.21 dB) (60, -20.25 dB) (80, -29.71 dB) (90, -37.58 dB) (60, -15.81 dB) (85, -20.09 dB) (120, -25.06 dB) (105, -28.91 dB) 1.87 AMFLMS (80, -10.22 dB) (100, -20.27 dB) (120, -29.71 dB) (140, -37.6 dB) (120, -15.67 dB) (175, -20.12 dB) (200, -25.00 dB) (200, -29.02 dB) 11.06 RVSS-FLMS (20, -10.22 dB) (38, -20.26 dB) (60, -29.70 dB) (65, -37.68 dB) (35, -16.21 dB) (60, -20.00 dB) (95, -25.06 dB) (100, -28.52 dB) 2.05 5. Conclusion In this research an adaptive least mean square algorithm based on fractional derivative is proposed. In particular, the step size of the fractional LMS (FLMS) is made adaptive using the concept of robust variable step size. For this purpose the concept of robust variable step size is utilized. The performance evaluation of the proposed approach is done by implementing it for the problem of system identification with different noise levels. The results of the proposed algorithm are compared to the FLMS and adaptive step-size modified fractional least mean square (AMFLMS) approaches. The proposed algorithm attains better convergence rate and steady-state error and is therefore found to be superior to the FLMS and AMFLMS algorithms. References References [1] A. Loverro, Fractional calculus: history, definitions and applications for the engineer, Rapport technique, Univeristy of Notre Dame: Department of Aerospace and Mechanical Engineering. [2] R. E. Gutiérrez, J. M. Rosário, J. Tenreiro Machado, Fractional order calculus: basic concepts and engineering applications, Mathematical Problems in Engineering 2010. [3] J. Liouville, Mémoire sur le changement de la variable indépendante, dans le calcul des différentielles a indices quelconques, 1835. [4] J. I. Suárez, B. M. Vinagre, A. Calderón, C. Monje, Y. Chen, Using fractional calculus for lateral and longitudinal control of autonomous vehicles, 11 in: International Conference on Computer Aided Systems Theory, Springer, 2003, pp. 337–348. [5] Z. Fellah, C. Depollier, M. Fellah, Application of fractional calculus to the sound waves propagation in rigid porous materials: validation via ultrasonic measurements, Acta Acustica united with Acustica 88 (1) (2002) 34–39. [6] E. Soczkiewicz, Application of fractional calculus in the theory of viscoelasticity, Molecular and Quantum Acoustics 23 (2002) 397–404. [7] B. Mathieu, P. Melchior, A. Oustaloup, C. Ceyral, Fractional differentiation for edge detection, Signal Processing 83 (11) (2003) 2421–2432. [8] R. M. A. Zahoor, I. M. Qureshi, A modified least mean square algorithm using fractional derivative and its application to system identification, European Journal of Scientific Research 35 (1) (2009) 14–21. [9] Y. Tan, Z. He, B. Tian, A novel generalization of modified lms algorithm to fractional order, Signal Processing Letters, IEEE 22 (9) (2015) 1244–1248. [10] B. Shoaib, I. M. Qureshi, I. , S. , A modified fractional least mean square algorithm for chaotic and nonstationary time series prediction, Chinese Physics B 23 (3) (2014) 030502. [11] B. Shoaib, I. M. Qureshi, S. , I. , Adaptive step-size modified fractional least mean square algorithm for chaotic time series prediction, Chinese Physics B 23 (5) (2014) 050503. [12] S. Zhou, H. Zhao, W. Wang, A fraction normalized subband adaptive filter algorithm, in: Control Conference (CCC), 2016 35th Chinese, TCCT, 2016, pp. 3095–3098. [13] S. Cheng, Y. Wei, Y. Chen, L. Xiaojian, Y. Wang, A novel fractional order normalized lms algorithm with direction optimization, IFAC-PapersOnLine 49 (9) (2016) 180–185. 12 [14] N. I. Chaudhary, M. A. Z. Raja, M. S. Aslam, N. Ahmed, Novel generalization of volterra lms algorithm to fractional order with application to system identification, Neural Computing and Applications (2016) 1–18. [15] M. Geravanchizadeh, S. Ghalami Osgouei, Speech enhancement by modified convex combination of fractional adaptive filtering, Iranian Journal of Electrical and Electronic Engineering 10 (4) (2014) 256–266. [16] J. Ahmad, M. Usman, S. Khan, I. Naseem, H. J. Syed, Rvp-flms : A robust variable power fractional lms algorithm, in: 2016 IEEE International Conference on Control System, Computing and Engineering (ICCSCE), IEEE, 2016. [17] T. Aboulnasr, K. Mayyas, A robust variable step-size lms-type algorithm: analysis and simulations, IEEE Transactions on signal processing 45 (3) (1997) 631–639. [18] M. A. Z. Raja, N. I. Chaudhary, Two-stage fractional least mean square identification algorithm for parameter estimation of carma systems, Signal Processing 107 (2015) 327–339. [19] A. Khalili, A. Rastegarnia, S. Sanei, Quantized augmented complex leastmean square algorithm: Derivation and performance analysis, Signal Processing 121 (2016) 54–59. [20] A. Khalili, A. Rastegarnia, W. M. Bazzi, Z. Yang, Derivation and analysis of incremental augmented complex least mean square algorithm, Signal Processing, IET 9 (4) (2015) 312–319. [21] N. I. Chaudhary, M. A. Z. Raja, J. A. Khan, M. S. Aslam, Identification of input nonlinear control autoregressive systems using fractional signal processing approach, The Scientific World Journal 2013. [22] J. M. Górriz, J. Ramı́rez, S. Cruces-Alvarez, C. G. Puntonet, E. W. Lang, D. Erdogmus, A novel lms algorithm applied to adaptive noise cancellation, IEEE Signal Processing Letters 16 (1) (2009) 34–37. 13 [23] J. Benesty, S. L. Gay, An improved pnlms algorithm, in: Acoustics, Speech, and Signal Processing (ICASSP), 2002 IEEE International Conference on, Vol. 2, IEEE, 2002, pp. II–1881. [24] N. V. Thakor, Y.-S. Zhu, Applications of adaptive filtering to ecg analysis: noise cancellation and arrhythmia detection, IEEE transactions on biomedical engineering 38 (8) (1991) 785–794. [25] W. Liu, P. P. Pokharel, J. C. Principe, The kernel least-mean-square algorithm, IEEE Transactions on Signal Processing 56 (2) (2008) 543–554. [26] S. C. Douglas, A family of normalized lms algorithms, IEEE signal processing letters 1 (3) (1994) 49–51. [27] S. Ciochin, C. Paleologu, J. Benesty, An optimized {NLMS} algorithm for system identification, Signal Processing 118 (2016) 115 – 121. [28] U. M. Al-Saggaf, M. Moinuddin, A. Zerguine, An efficient least mean squares algorithm based on q-gradient, in: Signals, Systems and Computers, 2014 48th Asilomar Conference on, IEEE, 2014, pp. 891–894. [29] S. Javidi, M. Pedzisz, S. L. Goh, D. P. Mandic, The augmented complex least mean square algorithm with application to adaptive prediction problems 1, in: Cognitive Information Processing, 2008 1st IAPR Workshop on, EURASIP, 2008. [30] G. Jumarie, Modified riemann-liouville derivative and fractional taylor series of nondifferentiable functions further results, Computers & Mathematics with Applications 51 (9) (2006) 1367–1376. [31] G. Jumarie, Table of some basic fractional calculus formulae derived from a modified riemann-liouville derivative for non-differentiable functions, Applied Mathematics Letters 22 (3) (2009) 378–385. [32] G. Jumarie, On the derivative chain-rules in fractional calculus via fractional difference and their application to systems modelling, Open Physics 11 (6) (2013) 617–633. 14 [33] G. Jumarie, The minkowski’s space-time is consistent with differential geometry of fractional order, Physics Letters A 363 (1) (2007) 5–11. [34] G. Jumarie, Lagrangian mechanics of fractional order, hamilton-jacobi fractional pde and taylors series of nondifferentiable functions, Chaos, Solitons & Fractals 32 (3) (2007) 969–987. [35] G. Jumarie, Probability calculus of fractional order and fractional taylors series application to fokker-planck equation and information of non-random functions, Chaos, Solitons & Fractals 40 (3) (2009) 1428–1448. [36] G. Jumarie, An approach via fractional analysis to non-linearity induced by coarse-graining in space, Nonlinear Analysis: Real World Applications 11 (1) (2010) 535–546. 15
10math.ST
arXiv:1711.10177v1 [cs.AI] 28 Nov 2017 Gradual Tuning: a better way of Fine Tuning the parameters of a Deep Neural Network Guglielmo Montone Laboratoire Psychologie de la Perception Université Paris Descartes, Paris [email protected] J.Kevin O’Regan Laboratoire Psychologie de la Perception Université Paris Descartes, Paris [email protected] Alexander V. Terekhov Laboratoire Psychologie de la Perception Université Paris Descartes, Paris and Redwood Center for Theoretical Neuroscience University of California, Berkeley [email protected] Abstract In this paper we present an alternative strategy for fine-tuning the parameters of a network. We named the technique Gradual Tuning. Once trained on a first task, the network is fine-tuned on a second task by modifying a progressively larger set of the network’s parameters. We test Gradual Tuning on different transfer learning tasks, using networks of different sizes trained with different regularization techniques. The result shows that compared to the usual fine tuning, our approach significantly reduces catastrophic forgetting of the initial task, while still retaining comparable if not better performance on the new task. 1 Introduction Due to the huge amount of data needed to train a network it is always more common in the Deep Learning community to use Transfer Learning techniques. Such techniques mainly consist in training a network on a new task after the same network has been trained in solving one or more tasks similar to the new one. Transfer Learning has been proven to be effective in many domains like image recognition, natural language processing and reinforcement learning [3, 1, 5]. Two strategies are particularly common in Transfer Learning [6]. In one strategy, referred to as Fine Tuning, training on a new task involves allowing modification of all the parameters of the network. The second strategy instead consists in adding some new parameters to the network, often by adding new layers on top of the old network. The network is then trained on the new task by modifying only the new parameters [2]. While Fine Tuning is often the more effective of the two techniques, it has the major drawback of suffering from Catastrophic Forgetting (CF): training on the new task considerably reduces performance on the first task. In this paper we propose a very simple variation of fine tuning that we called Gradual Tuning: during the training of the network on the second task we involve the parameters of the network only gradually, first allowing just the output layer of the network to be updated and then progressively involving the rest of the parameters. The justification for this procedure derives from the following simple consideration: the gradient of the error function with respect to one of the features of the network (here the word feature refers to the vector of incoming weights of a neuron) is a function of the feature itself but also of the way the feature is connected to the other features of the network. If the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. network has good features at level L for solving a given task but these features are not appropriately connected together by the upper layer, then both the features of layer L and the upper layers will have a gradient different from zero. So good features of layer L may be changed just because the upper layer does not combine them in the proper way. We tested Fine Tuning and Gradual Tuning on different tasks. A first set of experiments was run on a transfer learning task build on the MNIST dataset [4]. The rest of the experiments were involved more challenging synthetic tasks. These tasks, all consisting in binary classification of images involving the concepts of line and angle, were developed to test Fine Tuning and Gradual Tuning in different conditions. In a first experiment we compared the two strategies when the transfer is between two very similar tasks or when it is between two more different ones. In order to test how much the quality of the transfer and the amount of CF was affected by the quality of the initial features we developed a second group of experiments. In these experiments the network was at first trained on a group of 5 tasks, then the training on a new task was performed by using both Fine Tuning and Gradual Tuning. The paper is organized as follows: In the next section we will more clearly describe the Gradual Tuning procedure. In section 3 and 4 we will present all the experiments we developed and the dataset used. Finally in 5 we will present the results of our experiments. 2 Gradual training procedure In this paragraph we will give a precise description of the Gradual Tuning procedure that we used in all the experiments presented in this paper. Let’s consider a network trained on a first task (Task-A) that we wish to train on a second task, Task-B. To do so we connect the last hidden layer of the network with some new output neurons, randomly initializing the weights of this new layer. Then we start the training on the second task. The training with the Fine Tuning procedure simply consists in evaluating the gradient for all the parameters of the network and updating them with the usual update rule. In the Gradual Tuning procedure we start by allowing just the parameters of the output layer to be updated, then, when the performance of the network stops improving, we allow the hidden layer closest to the output to be trained as well. We continue in this way allowing the next hidden layer to be updated each time the performance of the network stops improving. The process stops when all the layers of the network have been modified by the training. 3 Experiments The experiments described in this paper are all meant to examine the amount of CF in transfer learning tasks when a network is trained with the standard Fine Tuning procedure as compared to training with the Gradual Tuning. All the experiments were developed on FFW networks (the characteristics of the network can be found at the end of this paragraph). The procedure of the first group of experiments is the following. We first train the network on a first task (Task-A). Then the last hidden layer of the trained network, other than the layer that remains connected to the output layer used for Task-A, is additionally connected to a new output layer that will be used for training the network on a second task (Task-B). The weights of this new output layer are randomly initialized. The network is then trained on Task-B, while the performance of the network is evaluated both on Task-A and Task-B. The training of the network on Task-B is done either with the usual Fine Tuning or with the Gradual Tuning procedure. We compare the two training procedures in the following situations: • when Task-A and Task-B are both either simple or more complex; • when Task-A and Task-B are similar or different. In the first experiment we did on MNIST, we split MNIST into two datasets, one containing the digits from zero to four and one containing the digits from five to nine. Task-A and Task-B consisted both in 5-class classification problems. In order to have more challenging tasks for the network we build a series of synthetic binary classification tasks. All the tasks involve the concepts of line, angle and triangle. In each task the network receives an image as input and has to answer a question like: "is there an angle or a triangle?". A precise description of each dataset and the relative binary classification task can be found in paragraph 4. We develop such tasks for different reasons. The first is simply that such tasks are more complex than MNIST, meaning that the network needs much more data to have good performance (less than 10% misclassified). The second reason is that we wanted to have both tasks 2 a b c d e f g h Figure 1: In each pictures some samples from the used datasets. (a) ac (b) acl (c) at (d) atl (e) sbl (f) sbt (g) sb2l (f) cnc that were very similar to each other and tasks that were more different. In this way we would be able to check to what extent similarity of the tasks influences CF: This was our second experiment where a network trained on Task-A was then trained on Task-B in two different conditions, with Task-B more or less similar to Task-A. A third reason for having a set of similar tasks was that we wished to investigate how much CF depends on the quality of the features the network learned during Task-A. To test this we developed the following experiment. During the first part of the experiment, the network was trained on several tasks (5-tasks) at the same time. This was done by connecting the last hidden layer of the network to five different output layers. The training was executed at the same time, meaning that in each epoch the batches of data relative to the different datasets were regularly alternated. Paragraph 5 provides the details of the training procedure. Once the training was over, a new output layer was connected to the last hidden layer of the network and the network was trained on a second task (Task-B). During the training the performance of the network was evaluated for the five classification tasks of Task-A and the classification of Task-B. Two kinds of FFW networks were used during the experiments. The first kind has two fully connected hidden layers of 500 units each. The second kind of network has three fully connected layers of 1000 units each. The activation function of the nodes of the hidden layers is a ReLU function (f (x) = max(0, x)). The activation function of the output units is a softmax function. In the following we will refer to the two architectures as the (500-500) and the (1000-1000-1000) network. The error used to train the network was the categorical cross-entropy. We will frequently refer to two different regularization techniques, namely L1 regularization and Dropout. In the case of L1 regularization the sum of the absolute value of the weights of the network were multiplied by a coefficient λ1 = 10−4 and added to the training error of the network. In the case of Dropout, the percentage of neurons that were dropped out during the training was 20% for the first hidden layer of the network and 50% for the other layers. 4 The tasks The experiments consisted in training a network on classification tasks. In this section we illustrate all the tasks we used. We split the MNIST dataset into two smaller datasets that we named MNIST-04 and MNIST-59. The MNIST-04 dataset contains the MNIST digits between 0 and 4 while the Mnist-59 contains the digits between 5 and 9. Both MNIST-04 and MNIST-59 are composed of approximately 30.000 gray-scale images of 28 × 28 pixels. Each of the datasets was split into three smaller sets containing 20.000, 5.000 and 5.000 data points, respectively used as training, validation and test sets. The tasks we built by creating synthetic datasets are all binary classification tasks. In each task the stimuli were gray scale images, 32 × 32 pixels in size. Each image contained two to four line segments, each at least 13 pixels long (30% of the image diagonal). The segments were white on a 3 dark random background or black on a light random background. Examples of the 8 tasks can be seen in figure 1): ac: requires classifying the images into those containing an angle (between 20◦ and 160◦ ) and a pair of crossing line segments (the crossing point must lie between 20% and 80% along each segment’s length). acl: the same as ac, but in each picture there is an additional distracting line crossing neither of the other line segments. at: distinguishes between images containing an angle (between 20◦ and 160◦ ) and a triangle (with each angle between 20◦ and 160◦ ). atl: the same as at, but with an additional distracting line, crossing neither of the line segments forming the angle and the triangle. sbl: requires classifying the images into those having blunt (between 100◦ and 160◦ ) and those having sharp (between 20◦ and 80◦ ) angles in them. Each image also contains an additional line segment, crossing neither of the line segments forming the angle. sbt: requires classifying the images into those having blunt (between 100◦ and 160◦ ) and those having sharp (between 20◦ and 80◦ ) triangles in them, in the picture there is also a distracting line that does not intersect any of the two triangles. sb2l: the same as sbl, but has two additional distracting lines, crossing neither of the line segments forming the angle. cnc: distinguishes between a pair of crossing and a pair of non-crossing lines (the crossing point must lie between 20% and 80% of each segment length). Each stimulus was generated by randomly selecting the parameters describing each figure (length and orientation of straight segments, amplitude and orientation of the angles) and verifying that all conditions were satisfied. Four different types of random backgrounds were generated with four patterns changing at different rates. For our experiments we generated 350.000 stimuli for each condition. Each dataset was split into three sets containing respectively 330.000, 10.000 and 10.000 data points. These sets were used as training, validation and test sets. 5 Results We were interested in comparing the amount of CF for networks trained with the Fine Tuning procedure versus with the Gradual Tuning procedure. In the first section (5.1) we present all the experiments where the Task-A is a classification performed on a single dataset. We tested the two procedures in the cases where Task-A and Task-B are rather simple, when Task-A and Task-B are more complex but similar, and when Task-A and Task-B are more complex and rather different. In section 5.2 we study the amount of CF for a network trained on a task for which we suppose the network has good features. To guarantee this, Task-A was actually composed of 5 binary classification tasks on which the network was trained at the same time. The network was then trained on Task-B. In the first experiment Task-B is very similar to one of the tasks the network was trained on during Task-A. In the second experiment instead the classification task of Task-B is quite different from the classification tasks of Task-A. The results of all the experiments presented in paper are reported as the percentage of misclassified data on the test set. Frequently in the next paragraph we will refer to the error on the validation set, this refers to the percentage of misclassified data on the validation set. 5.1 Single task experiment The first experiment was on MNIST. During Task-A a network was trained on MNIST-04. The training was stopped if the error on the validation set did not go below its minimum for 20 consecutive epochs. The percentage of misclassification on the test set was reported. The training was done using a fixed learning rate λ = 0.01. Once the training was over, the output of the last hidden layer of the network was connected to five extra output neurons for the classification on MNIST-59. The output layer parameters were randomly initialized. Training on Task-B was executed with both the Fine Tuning procedure and the Gradual Tuning procedure. In both cases the training was stopped 4 Table 1: MNIST-04 → MNIST-59 (500-500). In the column named Task-B the mean percentage of misclassified on the test set calculated over 5 repetitions is reported together with its standard deviation. In the column named Task-A the first error reported for each entry is the percentage of misclassified cases on Task-A after the training on that task. The second and third value are the mean and the standard deviation of the percentage of misclassified data on Task-A after the training on Task-B. Column Epochs gives the mean and standard deviation of the number of epochs the network was trained on Task-B. Reg No L1 Drop Task-B 1.56 ± 0.07 1.51 ± 0.03 1.60 ± 0.07 Fine Tuning Task-A 1.2 → 4.5 ± 1.2 1.2 → 3.5 ± 0.6 1.3 → 8.2 ± 0.9 Epochs 91 ± 14 79 ± 21 61 ± 11 Task-B 1.54 ± 0.05 1.44 ± 0.03 1.41 ± 0.06 Gradual Tuning Task-A 1.2 → 1.83 ± 0.05 1.2 → 2.02 ± 0.02 1.3 → 4.4 ± 1.1 Epochs 77 ± 13 95 ± 7 113±38 when the error on the validation didn’t go below its minimum in 20 epochs. Moreover in the Gradual Tuning procedure, the training on a lower layer was allowed when the difference in the error on the validation set between two consecutive epochs was less than 0.1%. The network was trained on Task-B five times for each of the two training procedures, each time re-initializing the output layer. The entire experiment, training on Task-A and then on Task-B was executed using different regularization techniques. In particular we tried to train the network without any regularization, with L1, and with Dropout regularization. In tables 1 and 2 the results relative to this experiment are reported for the two network architectures. In particular in the section of the table named Fine Tuning we report the results relative to the training with the Fine Tuning procedure, while in the part of the table named Gradual Tuning we report the results obtained with the Gradual Training technique. The column labeled Task-B contains the error on the test set for Task-B. The value reported in the table is the mean error obtained over the five repetitions and its standard deviation. Each entry of the column Task-A contains two error values. They refer to the error of the network on Task-A at the end of the training on Task-A and at the end of the training on Task-B. This second value is actually the mean error obtained over the five repetitions and it is reported with its standard deviation. Finally in the column labeled Epochs, we report the mean number of epoch the network was trained on Task-B with its standard deviation. Looking at the two tables it is evident that the network trained with the Fine Tuning procedure tends to forget much more than the one trained with the Gradual Tuning procedure. If we compare the error on Task-A after training on Task-B, we notice that the percentage of misclassifications in the case of Gradual Tuning is generally around 2 times less than the percentage obtained with the Fine Tuning. This happens despite the fact that in many cases the network trained with the Gradual Tuning procedure is trained for more epochs than the one trained with the Fine Tuning procedure. At the same time the network tends to perform similarly on the new task (Task-B) independently of the training procedure used. Finally it is also clear that the network trained with the Dropout regularization tends to forget much more than the network trained with L1 regularization or the one trained without regularization. In order to verify the results obtained on MNIST on more complex Table 2: MNIST-04 → MNIST-59 (1000-1000-1000). See Table 1 for a detailed presentation of the values reported. Reg No L1 Drop Task-B 2.01 ± 0.03 1.92 ± 0.05 1.66 ± 0.05 Fine Tuning Task-A 1.5 → 4.3 ± 0.9 1.6 → 3.4 ± 1.3 1.3 → 12.1±0.6 Epochs 117±70 188±54 102±17 Task-B 1.99 ± 0.05 1.88 ± 0.02 1.52 ± 0.05 Gradual Tuning Task-A 1.5 → 2.6 ± 0.1 1.6 → 2.0 ± 0.1 1.3 → 3.9 ± 0.3 Epochs 147±39 245±59 138±35 datasets we did two other experiments using the synthetic datasets. In the first experiment Task-A and Task-B are very similar, while in the second the two tasks are more different. In the first experiment we used as Task-A the classification of the dataset acl and as Task-B the classification on ac. These are very similar tasks, with the first being more complex than the second because of the presence of a distracting line in the pictures. The tests were executed on the two network architectures and 5 the results are reported in tables 3, 4. In this case the difference between the Fine Tuning and the Table 3: acl → ac (500-500). See Table 1 for a detailed presentation of the values reported. Reg No L1 Drop Task-B 2.50 ± 0.01 2.10 ± 0.10 3.87 ± 0.18 Fine Tuning Task-A 9.0 → 18.8±0.3 7.1 → 22.6±1.7 7.7 → 16.7±1.3 Epochs 47 ± 5 38 ± 7 115±40 Task-B 2.50 ± 0.05 2.11 ± 0.16 3.76 ± 0.12 Gradual Tuning Task-A 9.0 → 16.1 ± 0.3 7.1 → 17.1 ± 2.4 7.7 → 17.5 ± 0.5 Epochs 92 ± 37 45 ± 23 151±17 Gradual Tuning is less evident. The network performs almost the same on Task-B, but this time the amount of forgetting on Task-A is also nearly the same for the two procedures. The only exception is the big network (1000-1000-1000) when trained with L1 regularization. In that case we have again that the amount of forgetting is almost twice for Fine Tuning as compared to Gradual Tuning. The Table 4: acl → ac (1000-1000-1000). See Table 1 for a detailed presentation of the values reported. Reg No L1 Drop Task-B 2.25 ± 0.04 1.60 ± 0.05 1.58 ± 0.10 Fine Tuning Task-A 6.7 → 13.3±0.2 4.7 → 20.5±2.9 5.9 → 20.5±1.1 Epochs 73 ± 52 23 ± 13 113±21 Task-B 2.33 ± 0.09 1.61 ± 0.06 1.55 ± 0.18 Gradual Tuning Task-A 6.7 → 9.5 ± 0.3 4.7 → 11.9 ± 3.2 5.9 → 20.0 ± 1.5 Epochs 47 ± 16 37 ± 15 145±46 results presented in tables 5 and 6 are relative to a network that was first trained on the dataset acl (Task-A) and then on atl (Task-B). Task-A is the same as for the previous experiment. Task-B is more complex when compared to Task-B of the previous experiment. Moreover in this experiment Task-A and Task-B are much less similar than in the previous experiment. This time the amount of forgetting seems to be different for the big network when trained without regularization or with L1 regularization (see Table 6). In these two cases the network trained with Gradual Tuning forgets approximately half as much as the network trained with Fine Tuning. No particular difference seems to be present in the small network. Table 5: acl → atl (500-500). See Table 1 for a detailed presentation of the values reported. Reg No L1 Drop Task-B 4.31 ± 0.12 2.32 ± 0.33 8.21 ± 1.10 Fine Tuning Task-A 9.1 → 27.1±0.3 7.1 → 40.2±3.7 7.7 → 38.0±2.6 Epochs 78 ± 16 77 ± 48 158±46 Task-B 4.65 ± 0.12 2.09 ± 0.28 4.29 ± 0.14 Gradual Tuning Task-A 9.1 → 24.1 ± 0.1 7.1 → 36.6 ± 1.9 7.7 → 46.2 ± 0.2 Epochs 120±28 108±20 293 ± 4 Considering all the experiments we described so far we found that the network trained with dropout tends to suffer more from CF than the one trained with L1 regularization, both for Fine Tuning and Gradual Tuning procedures. Moreover we often find that performance on the second task (Task-B) is often similar for the two regularization techniques. This may be due to the fact that the networks were trained with a fixed learning rate, while often dropout regularization is used either with a fixed learning rate, but bigger than the one we used, or with update of the weights with momentum. Such solutions were not adopted here because we wanted to use the same training procedure across all the experiments. 5.2 Multiple tasks In this section we describe the experiments for which Task-A consisted in training the network on several tasks at the same time. It is well known that a network trained at the same time on a set of similar tasks develops better features for each of the tasks than a network trained on just one of the tasks. This is in part due to the fact the network trained on several tasks is exposed to more data and in part to the ability of the network to transfer learning from the different tasks. So we 6 Table 6: acl → atl (1000-1000-1000). See Table 1 for a detailed presentation of the values reported. Reg No L1 Drop Task-B 3.96 ± 0.09 1.68 ± 0.17 1.95 ± 0.34 Fine Tuning Task-A 6.7 → 25.1±0.8 4.7 → 40.0±1.0 5.9 → 48.6±0.2 Epochs 120±56 56 ± 9 167±57 Task-B 5.92 ± 0.07 1.50 ± 0.02 1.28 ± 0.17 Gradual Tuning Task-A 6.7 → 12.0 ± 0.1 4.7 → 23.4 ± 1.9 5.9 → 39.8 ± 0.6 Epochs 191±12 56 ± 6 205±57 Table 7: acl + sb2l + sbl + sbt + cnc → ac (1000-1000-1000). The results are reported following the same schema as in table 3, but this time Task-A consisted in training the network on 5 datasets. Each row in column Task-A refers to one of the datasets. The three numbers reported are respectively the error on the task at the end of Task-A, the mean error and its standard deviation at the end of Task-B over 5 repetitions. Fine Tuning Task-A 7.0 → 11.6 ± 0.4 (acl) 5.5 → 7.4 ± 0.2 (sb2l) No 1.66 ± 0.06 2.4 → 3.9 ± 0.4 (sbl) 1.5 → 2.3 ± 0.1 (sbt) 0.9 → 1.2 ± 0.1 (cnc) 4.4 → 21.0 ± 1.0 (acl) 3.3 → 6.3 ± 0.5 (sb2l) L1 0.92 ± 0.02 1.4 → 5.6 ± 0.5 (sbl) 0.7 → 2.6 ± 0.4 (sbt) 0.4 → 0.7 ± 0.1 (cnc) 4.1 → 11.5 ± 1.6 (acl) 2.4 → 6.0 ± 0.7 (sb2l) Drop 0.73 ± 0.08 0.8 → 4.1 ± 0.7 (sbl) 0.2 → 1.0 ± 0.2 (sbt) 0.4 → 0.5 ± 0.0 (cnc) Reg Task-B Epochs 42 ± 29 26 ± 5 58 ± 22 Gradual Tuning Task-A 7.0 → 10.2 ± 0.3 5.5 → 6.6 ± 0.3 1.82 ± 0.08 2.4 → 2.8 ± 0.1 1.5 → 1.8 ± 0.1 0.9 → 1.1 ± 0.1 4.4 → 14.8 ± 0.8 3.3 → 5.4 ± 0.3 0.89 ± 0.04 1.4 → 2.1 ± 0.0 0.7 → 1.6 ± 0.1 0.4 → 0.8 ± 0.0 4.1 → 11.6 ± 1.7 2.4 → 6.1 ± 0.6 0.70 ± 0.10 0.8 → 4.1 ± 0.7 0.2 → 1.1 ± 0.2 0.4 → 0.6 ± 0.1 Task-B Epochs 98 ± 54 36 ± 5 88 ± 23 were curious to see how much a network trained on several tasks would suffer from CF, and how the performance would differ for the Gradual Tuning and the Fine Tuning procedures. In the two experiments, during Task-A the network was trained on 5 datasets at the same time. The tasks we chose were the following: acl, sb2l, sbl, sbt, cnc. The network we used for this experiment was a network of three hidden layers, each layer having 1000 nodes. The last layer was connected to five output layers each one having two nodes. During the training, batches of 20 data points from the different datasets were alternated in a fixed order. At the end of each epoch the error on the validation set was calculated for all of the five datasets. If all of the errors on the validation were below their minimum the network configuration was stored. If any of the 5 errors did not go below its minimum in 20 epochs the training was stopped. Once the training was over a sixth output layer was connected to the last hidden layer and the network was trained on Task-B. The training on Task-B was repeated 5 times in the two conditions (Fine Tuning and Gradual Tuning) each time by randomly initializing the new output layer. In the experiments Task-B always consisted of a single binary classification task on one of the datasets described in 4. In the first experiment we evaluated the amount of CF in the case where Task-B is a simplified version of one of the tasks proposed in Task-A; we used as Task-B the ac task. The results are reported in table 7. The results are presented in the table following the same schema as in the previous table, the only difference consists in the fact that the column named Task-A now has the results relative to the five datasets before and after the training on Task-B. We can now compare the amount of forgetting on acl and the performance on ac obtained in this experiment with the performance obtained in the experiment described in the previous section where the network was trained first on acl and then on ac(see table 4). It is evident that the performance on ac is much better in this case than before. Regarding the amount of CF that the two networks suffer, the results seem very similar and it is not easy to say whether CF for the network that has been trained on several tasks 7 Table 8: acl + sb2l + sbl + sbt + cnc → atl (1000-1000-1000). See Table 7 for a detailed presentation of the values reported. Fine Tuning Task-A 7.0 → 17.6 ± 0.7 (acl) 5.5 → 16.7 ± 0.9 (sb2l) No 2.68 ± 0.11 2.4 → 21.8 ± 2.1 (sbl) 1.5 → 4.2 ± 0.2 (sbt) 0.9 → 7.1 ± 0.7 (cnc) 4.4 → 17.8 ± 4.0 (acl) 3.3 → 12.6 ± 1.2 (sb2l) L1 1.29 ± 0.06 1.4 → 7.5 ± 1.3 (sbl) 0.7 → 6.5 ± 2.4 (sbt) 0.4 → 19.3 ± 4.8 (cnc) 4.1 → 12.4 ± 1.9 (acl) 2.4 → 9.5 ± 1.1 (sb2l) Drop 0.59 ± 0.09 0.8 → 8.0 ± 0.3 (sbl) 0.2 → 3.0 ± 0.5 (sbt) 0.4 → 29.6 ± 6.2(cnc) Reg Task-B Epochs 116 ± 66 17 ± 2 95 ± 40 Gradual Tuning Task-A 7.0 → 11.8 ± 0.1 5.5 → 11.1 ± 0.1 3.46 ± 0.12 2.4 → 9.1 ± 0.1 1.5 → 2.6 ± 0.1 0.9 → 1.5 ± 0.1 4.4 → 11.3 ± 0.6 3.3 → 9.0 ± 0.2 1.14 ± 0.01 1.4 → 5.3 ± 0.4 0.7 → 1.5 ± 0.1 0.4 → 5.1 ± 0.6 4.1 → 10.1 ± 0.7 2.4 → 8.5 ± 0.5 0.52 ± 0.06 0.8 → 5.0 ± 0.4 0.2 → 2.0 ± 0.1 0.4 → 17.6 ± 2.5 Task-B Epochs 153 ± 59 33 ± 5 138 ± 22 actually is less strong. The effect of the Gradual Tuning in this case is also quite similar to the effect we obtained on the network trained on a single task. As before we observe that the network trained with the Gradual Tuning procedure has very similar performances on the new task when compared with the network trained with the Fine Tuning procedure. Also the network trained with the Gradual Tuning procedure tends to forget less than the one trained normally, although the improvement in this case is less evident than it was in other cases. In this second experiment Task-B is very different from any of the classifications performed during Task-A because we chose Task-B to be the atl task. The results are reported in table 8. This experiment is similar to the last experiment of the previous section. In that case we trained a network first on acl and then on atl(see table 6). The results on Task-B are much better for the network that was trained on several tasks during Task-A, when compared to the network that was trained just on one task 6). Concerning the amount of CF on task acl two considerations are interesting. First, this network forgets much less than the network trained on a single task during Task-A. This suggests that having better features helped reducing CF. Regarding the second consideration let’s compare the results in the tables 7 and 8. These were obtained with the same Task-A. The amount of forgetting on acl is much less in the experiment reported in table 7, where the new task is very similar to the old one. Lastly the Gradual Tuning technique seems to be quite effective in this case, the amount of CF being reduced in all the cases, most of the time being from 1.5 to 5 times less. 6 Discussion The Gradual Tuning technique proved to be a good strategy for reducing the amount of CF in a transfer learning task. The CF was smaller in almost all the experiments we described in the paper. Regarding the performance on a new task, we can say that the networks trained with the two procedures showed similar performance in all the experiments except in the MNIST experiment, where the networks trained with Gradual Tuning showed better results. Although we didn’t formally verify it, it is most probably the case that compared to Fine Tuning, Gradual Tuning tends to preserve more of the features of the original task. For this reason we would have expected that, at least when the two tasks are very similar, the network trained with Gradual Tuning, in addition to forgetting less on the old task, would also outperform the network trained with Fine Tuning on the new task. Further experiments are necessary to understand why this was not the case. Acknowledgments This work was funded by ERC Advanced Grant 323674 “FEEL” and ERC proof of concept grant 692765 "FeelSpeech" to Kevin O’Regan. 8 References [1] Ronan Collobert and Jason Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pages 160–167. ACM, 2008. [2] Guglielmo Montone, J Kevin O’Regan, and Alexander V Terekhov. The usefulness of past knowledge when learning a new task in deep neural networks. Cognitive Computation Workshop, NIPS, 2015. [3] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. [4] Rupesh K Srivastava, Jonathan Masci, Sohrob Kazerounian, Faustino Gomez, and Jürgen Schmidhuber. Compete to compute. In Advances in neural information processing systems, pages 2310–2318, 2013. [5] Alexander V Terekhov, Guglielmo Montone, and J Kevin O’Regan. Knowledge transfer in deep block-modular neural networks. In Conference on Biomimetic and Biohybrid Systems, pages 268–279. Springer, 2015. [6] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? CoRR, abs/1411.1792, 2014. 9
9cs.NE
arXiv:1603.04000v1 [cs.CV] 13 Mar 2016 1 Learning Typographic Style Shumeet Baluja [email protected] Google, Inc. Abstract. Typography is a ubiquitous art form that affects our understanding, perception, and trust in what we read. Thousands of different font-faces have been created with enormous variations in the characters. In this paper, we learn the style of a font by analyzing a small subset of only four letters. From these four letters, we learn two tasks. The first is a discrimination task: given the four letters and a new candidate letter, does the new letter belong to the same font? Second, given the four basis letters, can we generate all of the other letters with the same characteristics as those in the basis set? We use deep neural networks to address both tasks, quantitatively and qualitatively measure the results in a variety of novel manners, and present a thorough investigation of the weaknesses and strengths of the approach. Keywords: Style Analysis, Typography, Image Generation, Learning Introduction The history of fonts and typography is vast, originating back at least to fifteenth century Germany with the creation of the movable type press by Johannes Gutenberg, and the first font “Blackletter.” This was based on the handwriting style of the time, and was used to print the first books [1,2]. Centuries later, numerous studies have consistently shown the large impact that fonts have on not only the readability of text, but also the comprehensibility and trustability of what is written [3,4,5]. Despite the prevalence of just the few standard fonts used throughout academic literature, there are innumerable creative, stylized and unique fonts available. Many have been created by individual designers as hobbies, or for particular applications such as logos, movies or print advertisements. A small sample of a few of the over 10,000 fonts [6] used in this study are shown in Figure 1. The seminal work of Tenenbaum and Freeman [7] towards separating style from content was applied to letter generation. Our motivation and goals are similar to theirs: we hope that a learner can exploit the structure in samples of related content to extract representations necessary for modeling style. The endgoal is to perform tasks, such as synthesis and analysis, on new styles that have never been encountered. In contrast to [7], we do not attempt to explicitly model style and content separately; rather, through training a learning model (a deep neural network) to reproduce style, content and style are implicitly distinguished. 2 Shumeet Baluja Fig. 1. Fonts with varying shapes, sizes and details. As a preview, half of these were entirely synthesized using our approach. (synthesized rows: A,B,D,E,G,J,K). We also extend their work in four directions. First, we demonstrate that a very small subset of characters is required to effectively learn both discriminative and generative models for representing typographic style; we use only 4 instead of the 54 alpha-numeric characters used previously. Second, with these 4 letters, we learn individual-letter and combined-letter models capable of generating all the remaining letters. Third, we broaden the results to thousands of unseen fonts encompassing a far more expansive set of styles than seen previously. Finally, we present novel methods for quantitatively analyzing the generated results that are applicable to any image-creation task. Fonts are particularly well suited for the examination of style: they provide diversity along many axes: shape, size, stroke weight, slant, texture, and serif details — all within a constrained environment in which the stylistic elements can be readily distinguished from content. Additionally, unlike many image generation tasks, this task has the enormous benefit of readily available groundtruth data, thereby allowing quantitative measurement of performance. Recently, growing attention has been devoted to style, not only in terms of fonts [8,9,10], but in perceptual shape similarity for architecture and rigid objects [11], computer graphics [12], cursive text [13], photographs [14,15,16], artwork [17], and music [18]. The primary goal of this paper can be succinctly stated as follows: given a small set of letters (the basis set) of a particular font, can we generate the remaining letters in the same style? Before we can address this question, we need to ensure that there is enough information in a small basis set to ascertain style. This is the subject of the next section. Learning Typographic Style 2 3 A Discriminative Task: Same Font or Not? By addressing the question of whether a set of basis-letters contain enough information to extract “style”, we immediately work towards identifying sources of potential difficulties for the overarching goal of generating characters – i.e. will the generative process have enough information to extract from the basis letters to successfully complete the task? Further, the networks created here will be a vital component in validating the final generated results (Section 3.3). The discriminative task is as follows: Given a set of four basis letters1 , e.g. B,A,S,Q, in font-A and another letter Φ, can we train a classifier to correctly identify whether Φ is generated in font-A’s style? See Figure 2. Next, we describe how the data is pre-processed and the neural networks used to address the task. Fig. 2. Positive (Left) and Negative (Right) samples for the classification task. In the left group, the fifth letter is a member of the same font. On the right, the fifth letter is not. Note that some cases on the right are easy. However, the top two are more challenging, requiring the slant and subtle edge weights to be analyzed, respectively. 2.1 Data Specifics Due to the large variation in the font-faces examined, normalization of the font images was vital, though minimal. Each letter was input to the network as a 36×36 gray-scale pixel image. In total, 5 letters were used as inputs: the first 4 were the basis letters (all from the same font), and the fifth letter was to be categorized. The output of the network was a single binary value, indicating whether the fifth letter belonged to the same font as the other 4. All the fonts used in this study were True-Type-Font format (TTF), which allows for scaling. Due to the stylistic variations present in the data, the ratio of widths to heights of different font faces vary dramatically. The size of the characters within the 36×36 image is set as follows. For each font, all 26 capital letters are generated with the same point-setting until the bounding box of any one of the 26 characters reaches the 36×36 limit in either dimension. All 26 characters are then generated with that point setting; this ensures that if the font style specifies having a large ’R’ while having a little ’L’, that stylistic decision is preserved in the training example and that the largest letter fits within the 1 B,A,S,Q comprised the basis set throughout this study. They were chosen because they contained a diverse set of edges, angles and curves that can be rearranged/analyzed to reveal hints for composing many of the remaining letters. 4 Shumeet Baluja 36×36 bounding box. Note, that this sometimes creates non-standard positioning of letters when seen together. For example, the character ’Q’ sometimes has a descender [19] that extends below the font’s baseline; this will appear raised up in the training examples (see Figure 2). A training set of approximately 200,000 examples was created from 10,000 randomly chosen unique fonts. The training set was composed of 100,000 positive examples (5th letter was the same font) and 100,000 negative examples (5th letter was a different font). When generating the examples, each character was randomly perturbed from the center location by up to ±2 pixels to introduce variation (this also allowed us to create enough unique positive examples). A disjoint testing set with 1,000 font families not present in the training set was created in exactly the same manner. For both training and testing, negative examples were chosen by randomly pairing different font-families2 . 2.2 Network Architectures Building on the successes of deep neural networks for image recognition tasks (see [20] for a recent summary with ImageNet), we explore a variety of neural network architectures for this task. Numerous experiments were conducted to discover effective network architectures to use. Of the over 60 architectures tried, the top performing seven were selected. Though a full description of the experiments is beyond the scope of this paper, a few of the general principles found are provided here to help guide future studies. 1. Treating inputs as a single large image or as 5 individual images: We compared using the full 36×(36×5) pixel image as a single input vs. creating individual ’towers’ for each of the 5 characters (see [21,22,23,24] for a review of column/tower architectures). As a single image, it may be easier to capture the relative sizes of characters. As multiple images, individualized character transformations can be created with potentially cleaner derivatives. Through numerous experiments, the results consistently favored using individual towers, both in terms of training time and final accuracy. See Figure 3. 2. Network Depth: In contrast to the trend of increasing network depth, deeper nets did not lead to improved performance. Unlike in general object detection tasks in which deep neural networks are able to exploit the property that images can be thoughts of as compositional hierarchies [25], such deep hierarchies may not be present for this task. For this study, two sets of convolution layers were used with fully connected layers prior to the final output (more details in Section 2.3). Additional depth did not increase performance. 2 To create negative examples, two fonts from the same font-family, i.e. Times-RomanBold and Times-Roman were never used in the same negative example. Because the hierarchy of fonts is not apriori known, font families were estimated by a simple lexicographic analysis of the font names. Importantly, it should be noted that this did not preclude fonts that appear visually nearly indistinguishable (but with dissimilar names) from being used as negative examples. Learning Typographic Style 5 Fig. 3. Left & Middle: Two tower-based network architectures. Left: Layers within the towers are fully connected. Middle: Layers within the towers are convolutions. Right: Fully connected net that treated the 5 character inputs as a single image (not shown: experiments with single-image-input networks that employ convolutions were also conducted). The figure also shows three different fonts used in training all the networks. 3. RELU or Logistic? A variety of activation functions were attempted, including exclusively logistic activations throughout the network (recall that the networks were not as deep as is often used in image-recognition tasks, a condition often cited for using Rectified Linear (RELU) activations [26]). Except for the final logistic-output unit, the rest of the activations throughout the network worked best as RELU. Though the performance difference was not consistent across trials, RELU units trained faster. 4. Convolutions vs. Fully Connected Layers: Convolution layers are frequently employed for two purposes: achieving translation invariance and free parameter reduction, especially when used in conjunction with pooling layers. For this task, translation invariance is not as crucial as in general object detection tasks, as the object of interest (the character) is centered. Further, this task worked well across a number of network sizes and free-parameter ranges. Networks that employed convolutions as well as those that used fully connected layers exclusively performed equally well. 2.3 Individual and Ensembles Network Results As mentioned in the previous section, over 60 architectures were experimented with for this task. Gradient descent with momentum (SGD+Momentum) was used to train the networks and no domain-specific prenormalization of the weights was necessary. From the 60 architectures, seven were chosen (see Table 1). All are based on the tower architecture (Figure 3). The performance on the discrimination task was measured on an independent test set — the 4-basis letters and Φ were drawn from fonts that were not used for training. The results were consistent across a wide variety of free parameters; in the seven networks, the number of parameters varied by a factor of 18×, with similar performance. It is illuminating to visualize the types of errors that the networks made. Figure 4 provides examples that were both correctly (Left) and incorrectly (Right) 6 Shumeet Baluja Table 1. Seven top performing architectures found from the 60 networks tried. network 1 2 3 4 5 6 7 Voting Ensemble Description of hidden layers in each tower Fully Connected Total free hidden units in performance parameters aggregation layers 1 Fully Connected (50 units) 2 (250,200) 3 Fully Connected (50,50,50 units) 2 (250,200) 3 Fully Connected (100,100,100 units) 2 (250, 200) 3 Fully Connected (100,100,100 units) 2 (50, 50) 2 Conv Paths, 2 Deep 2 (50, 50) (3x3 → 3x3, 4x4 → 3x3) 2 Conv Paths, 2 Deep 4 (50, 50, 50, 50) (3x3 → 3x3, 4x4 → 3x3) 2 Conv Paths, 2 Deep 4 (10, 10, 10, 10) (3x3 → 3x3, 4x4 → 3x3) 216,952 90.3% 89.2% 88.2% 89.3% 90.7% 222,052 91.1% 437,602 463,102 925,352 777,202 52,612 90.0% 92.1% classified by all 7 networks. In the leftmost column, examples in which the 5th character was correctly recognized as belonging to the same font are shown. In the second column, correctly recognized negative examples (the 5th letter was a different font) are given. Note that the 6th letter, the “ground-truth”, was not used as input to the network; it is provided here to show the actual letter of the same font. In the second column, note the similarity of the correctly discerned letters from the ground-truth. In particular, in this column, row 1 had very few distinguishing marks between the proposed and real ’H’; in row 4, the ’U’ was recognized as not being a member of the same font, as was the ’V’ in row 7 – based solely on the weight of the strokes. Fig. 4. Same Font or Not? 10 binary classification results. In columns 2 & 4, which show examples in which the 5th character is taken from a different font than the basis set, the corresponding actual letter from the basis set is also given. This sixth character, “the ground-truth,” is not used in training/testing; it is only shown here for comparison. The third column shows the false-negatives. Several of the mistakes are readily explained: rows 5,6,7 are non-alphabetic fonts (no pre-filtering was done in the font selection process). Rows 2 and 9 are explicitly designed to have a diverse set of characters, e.g. for creating ’Ransom Note’ like artistic effects. Also shown Learning Typographic Style 7 are color-inverted fonts (row 4); the likely cause of the mistakes was the sparsity of such fonts in the training set. Finally, in the last column, false-positives are shown – different fonts that are mistakenly recognized as the same. Three types of errors were seen. When the fonts have extremely thin strokes (row 2), the failure rate increases. This is due to two factors: under-representation in the training set and less information in the pixel maps from which to make correct discriminations. Second, as before, non-alphabetic fonts appear. The third source of mistakes is that many fonts have characters that appear similar or match the basis font’s style (rows 3,7,8). It is worth emphasizing here that the font design process is not an algorithmic one; the artist/designer can create fonts with as much, or as little, variation as desired. There may be multiple acceptable variations for each character. Despite the similar performance of the 7 networks, enough variation in the outputs exists to use them as an ensemble [27]. In 76.7% of examples, all networks were correct. In 8.2%, only 1 network was mistaken, in 4.1%, 2/7 were mistaken and in 3.0%, 3/7 were mistaken. Therefore, by using a simple majority voting scheme, the seven networks can be employed as an ensemble that yields 92.1% accuracy. This ensemble will be used throughout the remainder of the paper. 3 A Generative Task: Creating Style-Specific Characters In the previous section, we determined that there was sufficient information in the 4-Basis letters to correctly determine whether a fifth letter was a member of the same font. In this section, we attempt to construct networks that generate characters. The experiments are broadly divided into two approaches: single and multiple-letter generation. In the first approach, a network is trained to generate only a single letter. In the multiple-letter generation networks, all letters are generated simultaneously by the same network. Though the single letter networks are conceptually simpler, training a network to generate multiple letters simultaneously may allow the hidden units to share useful representations and features – i.e. serif style, line width, angles, etc. This is a form of transfer learning with a strong basis in multi-task learning [28,29,30,31]. 3.1 Single Letter Generation As in the previous section, experiments with numerous network architectures were conducted. The architectures varied in the number of layers (2-10), units (100s-1000s) and connectivity patterns. The final architecture used is shown in see Figure 6(Left). In the discrimination task described in the previous section, there was a single output node. This allowed the use of large penultimate hidden layers since the number of connections to the final output remained small. In contrast, in image generation tasks, the number of output nodes is the number of pixels desired; in this case it is the size of a full input character (36×36). This drastically increases the number of connections in the network. To alleviate this growth in the number of connections, reverse-retinal connections were used in 8 Shumeet Baluja which each hidden unit in the penultimate layer connects to a small patch in the output layer. Various patch sizes were tried; patches of both sizes 3 and 4 were finally employed. Unlike other convolution and de-convolution networks, the connection weights are not shared. Sharing was not necessary since translation invariance is not needed in the generated image; each letter should be generated in the center of the output. Similar architectures have been used for superresolution and image deconvolution, often with weight sharing [32,33]. The letter ’R’ was chosen as the first test case, since, for many fonts, the constituent building blocks for ’R’ are present in the basis letters (e.g. copy the ’P’ shape from the ’B’-basis letter and combine it with the bottom right leg of the ’A’). As in the previous experiments, the network was trained with the same set of 9,000 unique fonts with L2 loss in pixel-space, using SGD+Momentum. Numerous experiments, both with and without batch normalization [34], were conducted – no consistent difference in final error was observed. Results for fonts from the test set are shown in Figure 5. Inputs Gen. SSE shape serif accept? comments by rater 1 1574 Yes Yes Yes 2 1527 Yes Yes No 3 1358 Yes Yes Yes 4 1996 No Yes Yes 5 1728 Yes Yes Yes 6 1955 No Yes Yes 7 1399 Yes Yes Yes 8 2258 Yes No No Serifs missing 9 3290 Yes Yes No Similar, but not quite 10 1355 Yes Yes Yes 11 1359 Yes Yes Yes 12 2593 Yes Yes Yes 13 2428 Yes Yes Yes 14 2144 No No No 15 1934 Yes Yes Yes 16 1512 Yes Yes Yes Actual Missing divider Top of R should not be closed Not Same Shape very close, maybe tilted? Fig. 5. 16 Results shown for ’R’ generation. Results are judged by an external human evaluator. Actual font characters shown on the right. 12/16 were deemed as acceptable replacements for the original. Learning Typographic Style 9 Unfortunately, simply measuring the pixel-wise difference to the actual target letter (SSE) does not correlate well to subjective evaluations of performance. Yet, as in all real-world image generation tasks, aesthetic judgment is vital. We asked a human rater3 to ascertain the quality of the result along 3 axis: (1) is the shape generally correct, (2) are the serif appropriately captured, (3) is this an acceptable replacement for the actual letter? The last metric is the hardest to measure, but perhaps the most relevant. The outcome was overall positive, with the caveats noted in Figure 5. 3.2 Simultaneous Letter Generation - Multi-Task Learning In this section, we explore the task of generating all the upper-case letters simultaneously. Unlike the single-letter generation process described in the previous section, the hidden units of the network can share extracted features. This is particularly useful in the character generation process, as many letters have common components (e.g. ’P’ & ’R’ , ’O’ & ’Q’, ’T’ & ’I’). See Figure 6(Right). Fig. 6. Single Vs. Multi-Letter Generation. The left networks show individual letter creation (only 2 of 22 shown). The right network generates all letters simultaneously, thereby allowing the hidden units to share extracted information. The tower/column architectures are employed to transform the basis letters (as was done for the discrimination task). The generative network also auto-encodes the basis letters (Right). Once again, numerous architectures were explored (over 30 in total). Comparing the best single-letter-generation networks with the best multi-letter-generation networks, the SSE error was repeatedly reduced (by 5%-6%) by using the multiletter generation networks. Qualitatively, however, the characters generated by both networks appeared similar. Nonetheless, because of the small SSE error improvement coupled with the ease of deployment, the multi-letter-generation network are used going forward. A large set of results are shown in Figure 7. Subjectively evaluating these results would be error prone and yield inconsistent results given the difficulty in evaluating the individual consistency of a large set 3 The subjective evaluation was conducted by an independent User Experience Researcher (UER) volunteer not affiliated with this project. The UER was given a paper copy of the input letters, the generated letters, and the actual letter. The UER was asked to evaluate the ’R’ along the 3 dimensions listed above. Additionally, for control, the UER was also given examples (not shown here) which included real ’R’s in order to minimize bias. The UER was not paid for this experiment. 10 Shumeet Baluja Fig. 7. Raw Output of the multi-letter-generation networks, with no postprocessing. 18 examples shown. Top good results. Bottom, results where some of the letters are smudged. Non-alphabet/picture fonts not shown. Learning Typographic Style 11 of characters with each other and with respect to the basis set. Instead, in the next section, we describe novel methods for validating the results. 3.3 Validating Results In the previous section, the results of the font generation network were measured by the network’s SSE error and subsequently by an external human evaluator. Here, we present alternate methods based on using the discriminative networks developed in Section 2. The discriminative networks were used to determine whether an input character Φ was the same font as the basis characters. Recall that by employing a voting-ensemble of 7 networks, 92.1% accuracy was attained. Here, to test the generative network G on font f , the results of G(f ) are passed into the discriminative network ensemble (D) along with the original BASQ-basis letters, D(Bf , Af , Sf , Qf , G(f )). Consequently, the output of D is used to determine whether the generated letter is the same font as the basis letters. Novel variants of this method, using pairs of generator/discriminator networks have been independently proposed in [35], which is based on the architectures of generative-adversarial models [36,37]. In the most straightforward formulation, we test whether the letters generated by G appear the same as the original font. See Table 2 – column Original Basis, Synthetic Test. Formally, the test is: For each font , f , in the test set : generate all characters : G(Bf , Af , Sf , Qf ) → [Af 0 , Bf 0 , Cf 0 , Df 0 , ..., Zf 0 ] test each GENERATED character : D(Bf , Af , Sf , Qf , Af 0 ) → [Same/Dif f erent] ... D(Bf , Af , Sf , Qf , Zf 0 ) → [Same/Dif f erent] Recall that the discriminative network ensemble, D, was trained with tuples of letters {BasisSet, Φ} drawn from the training set of fonts and tested on an entirely separate set of fonts. Thus, we are not limited in the set of fonts that we can use as the basis-set. In the next examination, we reverse the question asked above. We generate the letters as before, but ask the question, if the generated letters are used as the basis set, will the original letters be recognized as the same font? See Table 2 – column Synthetic Basis, Original Test. The generation portion remains the same, but the test is revised to: test each ORIGINAL character : D(Bf 0 , Af 0 , Sf 0 , Qf 0 , Af ) → [Same/Dif f erent] ... D(Bf 0 , Af 0 , Sf 0 , Qf 0 , Zf ) → [Same/Dif f erent] 12 Shumeet Baluja In the previous two experiments, we compared the generated characters to the original font. This gives a measure of how closely the generated characters resemble the original font. In the final experiment, we ask how consistent the generated letters are with each other. If we are given the basis letters from the generated font, will the other generated letters from the same font be classified as the same? See Table 2 – column Synthetic Basis, Synthetic Test. test GENERATED characters against GENERATED basis : D(Bf 0 , Af 0 , Sf 0 , Qf 0 , Af 0 ) → [Same/Dif f erent] ... D(Bf 0 , Af 0 , Sf 0 , Qf 0 , Zf 0 ) → [Same/Dif f erent] Looking at Table 2, from the column Original Basis, Synthetic Test, it can be seen that the generated fonts appear similar to the original fonts on which they are based. An interesting question arises: why, then, does the second test Synthetic Basis, Original Test have a lower recognition rate? The answer lies in the fact that the font designer may introduce non-systematic variations that add visual interest, but may not adhere to strict stylistic cues present in other letters. In the most obvious cases, the ’ransom note fonts’, each character is intentionally not representative of other characters. Other themed fonts introduce objects such as trees, animals, and vehicles into the design that reflect each artist’s individual creativity. For example, some fonts replace the empty spaces in the letter ’B’ with mini-airplanes, but may not do so in the letter ’A’, etc. The generated fonts, when they capture such shapes, will synthesize more consistent characters that reuse many of the same elements. It is likely that the original font’s glyphs may appear outside the more cohesive set generated by the networks.4 The third column, Synthetic Basis, Synthetic Test, shows that the characters generated are extremely consistent with each other. Normally, this would be considered a good attribute; however, when viewed in terms of the baseline (Column 4: Original Basis, Original Test), it raises an important question. Why are the generated fonts more homogeneous than the original fonts? Is it for the reason mentioned above, or is it for the, potentially more troubling, reason that all the generated characters (across all fonts) are too much alike? Have all the characters “regressed to the mean?” As a final test, we examine this possibility explicitly using only network generated fonts. First, we set the basis letters (BASQ) from a randomly selected generated font. Second, we randomly select another generated font and character as the candidate test character. 50,000 randomly paired samples are created. Unlike the previous tests, in which accuracy was measured by how many matches were found, the accuracy is measured by how many nonmatches are detected. This explicitly tests whether the generated fonts look too similar to each other. Running this test with the discriminative network ensemble, D, yields a different-font detection rate of 90.7%. For a baseline, we repeat 4 For completeness, we also analyzed the ’R’s generated by the one-letter-at-a-time networks. They had similar performance (when measured with D) to the ’R’ row shown in Table 2, with (6%) higher SSE. Learning Typographic Style 13 Table 2. Performance by Letter: (SSE & Discriminative Network Ensemble letter SSE C D E F G H I J K L M N O P R T U V W X Y Z 1851.0 1987.7 2006.9 1943.0 2096.7 2066.6 1495.3 1968.8 2146.3 1799.7 2697.1 2162.8 1828.5 1936.3 2135.6 1714.8 1910.5 1950.6 2611.0 1985.5 1998.3 1901.4 Discriminative Network Ensemble Based Evaluation Baseline: Original Basis Synthetic Basis Synthetic Basis Original Basis Synthetic Test Original Test Synthetic Test Original Test Average 99% 99% 99% 98% 99% 99% 94% 92% 99% 99% 97% 98% 98% 99% 99% 97% 99% 97% 97% 99% 98% 97% 90% 90% 89% 84% 89% 89% 83% 84% 88% 88% 83% 87% 89% 89% 90% 85% 89% 85% 82% 86% 85% 84% 100% 100% 100% 100% 100% 100% 99% 97% 100% 100% 99% 99% 99% 100% 100% 99% 99% 99% 99% 100% 99% 99% 96% 97% 95% 93% 95% 96% 90% 91% 95% 94% 92% 94% 95% 95% 97% 94% 96% 93% 92% 94% 92% 91% 97% 86% 98% 94% this experiment with 50,000 pairs generated from the original (non-synthesized) fonts. D yields a correct different-font detection rate of 90.1%. The very close results indicate that the generated fonts have not regressed to the mean, in terms of recognizable serifs and style, and remain as distinguishable as the original fonts. The difference in performance between column 3 and 4 in Table 2 is likely due to the variability introduced by smaller artistic variances inserted by the designers, as described in the paragraph above. 4 Future Work Beyond the straightforward explorations of varying the number and selection of basis letters and also generating lower-case letters, there are many conceptually interesting avenues for future work. First, an alternative approach to using the generator networks is to use discriminative-networks and propagate derivatives back to the inputs to modify the input pixels to maximize the similarity of the hidden states to specified values. This has recently been proposed to create natural images as well as dream like images “Deep Dreams” [38,17]. Second, we made a concerted effort to use the simplest networks possible. An extensive empirical search through the space of networks and learning algorithms was conducted to find the most straightforward approach to addressing this task. Recent preprints [9,35] describe concurrent explorations of similar and related problems with much more complex architectures that yield comparably promising results. Extending this work to other architectures is easily done; for 14 Shumeet Baluja example, the evaluation mechanisms used in this study are akin to Generative Adversarial Nets (GAN) [36,39,37] in which a synthetic-vs.-real distinguisher network and a font generator are trained to outperform each other. This study provides a strong, and easily implemented, baseline to which new architectures and learning approaches can be compared. Third, the trained networks can be used in novel manners beyond synthesizing characters from existing fonts. Will it be possible to take the attributes of multiple fonts and combine them? For example, if the the basis set is composed of 2 characters from font-A and 2 characters from font-B, will the resulting characters be a combination of the two? Preliminary evidence (see Figure 8) suggests that it may be possible; though perhaps more than 2 examples from each font will be necessary for artistically more innovative combinations to be produced. Fig. 8. Novel combinations of two fonts. In each of the two results, the first row shows the 4 input letters and characters generated from Gf ontA , second row for Gf ontB . In the Row 3, two characters from each font are used as input and the resulting characters shown. Top Example: Note that the weight (thickness of lines) from the first font are combined with the size of the second font. Bottom Example: Note that the “hollow” look of the first font is combined with the weight and shapes of the second font. Fourth, we have taken an image based approach to font generation. An alternate, more speculative direction, is to use a non-image based approach with recurrent networks, such as Long-Short-Term-Memory (LSTMs). Can LSTMs be used to generate characters directly in TrueType language? For this task, network’s inputs would include the TTF of the basis letters. Similar programmatic learning in which LSTMs compose simple programs and sequences of music have been recently attempted [40,41,42]. If it is possible to generate results directly in TTF encodings, this will produce another, orthogonal, result to complement this study. The feasibility of this approach is open for future research. 5 Conclusions In this paper, we have presented a learning method to analyze typographic style based on a small set of letters and to employ the learned models to both distinguish fonts and produce characters in the same style. The results are quite promising, but fully capturing artistic visual intent is just beginning. Many of the overall shapes, weights, angles and serifs were successfully modeled. In the Learning Typographic Style 15 future, as learning progresses, some of the more individualized nuances and repeated intricate design patterns, unique to individual fonts, will be captured. 6 Acknowledgments Fig. 9. Acknowledgments displaying 24 synthesized fonts (from test set only). References 1. Tschichold, J.: Treasury of Alphabets and Lettering: A Source Book of the Best Letter Forms of Past and Present for Sign Painters, Graphic Artists, Commercial Artists, Typographers, Printers, Sculptors, Architects, and Schools of Art and Design. A Norton professional book. Norton (1995) 2. Hutchings, E.: Typeface timeline shows us the history of fonts. http://www.psfk.com/2012/04/history-of-fonts.html (2014) 3. Beymer, D., Russell, D., Orton, P.: An eye tracking study of how font size and type influence online reading. In: Proceedings of the 22nd British HCI Group Annual Conference on People and Computers: Culture, Creativity, Interaction-Volume 2, British Computer Society (2008) 15–18 4. Ha, S.: The influence of design factors on trust in a bank’s website. Digital Repository@ Iowa State University (2009) 5. Li, Y.M., Yeh, Y.S.: Increasing trust in mobile commerce through design aesthetics. Computers in Human Behavior 26(4) (2010) 673–684 6. 10000Fonts.com: Download. http://www.10000fonts.com/catalog/ (2016) 7. Tenenbaum, J.B., Freeman, W.T.: Separating style and content with bilinear models. Neural computation 12(6) (2000) 1247–1283 8. Bowey, M.: A fontastic voyage: Generative fonts with adversarial networks. http://multithreaded.stitchfix.com/blog/2016/02/02/a-fontastic-voyage (2016) 9. Upchurch, P., Snavely, N., Bala, K.: From A to Z: Supervised Transfer of Style and Content Using Deep Neural Network Generators. ArXiv e-prints (March 2016) 16 Shumeet Baluja 10. Bernhardsson, E.: Analyzing 50k fonts using deep neural networks (2016) 11. Lun, Z., Kalogerakis, E., Sheffer, A.: Elements of style: learning perceptual shape style similarity. ACM Transactions on Graphics (TOG) 34(4) (2015) 84 12. Willats, J., Durand, F.: Defining pictorial style: Lessons from linguistics and computer graphics. Axiomathes 15(3) (2005) 319–351 13. Graves, A.: Generating sequences with recurrent neural networks. CoRR abs/1308.0850 (2013) 14. Karayev, S., Hertzmann, A., Winnemoeller, H., Agarwala, A., Darrell, T.: Recognizing image style. CoRR abs/1311.3715 (2013) 15. Gygli, M., Grabner, H., Riemenschneider, H., Nater, F., Gool, L.: The interestingness of images. In: Proceedings of the IEEE International Conference on Computer Vision. (2013) 1633–1640 16. Khosla, A., Das Sarma, A., Hamid, R.: What makes an image popular? In: Proceedings of the 23rd international conference on World wide web, ACM (2014) 867–876 17. Gatys, L.A., Ecker, A.S., Bethge, M.: A neural algorithm of artistic style. CoRR abs/1508.06576 (2015) 18. Aucouturier, J.J., Pachet, F.: Representing musical genre: A state of the art. Journal of New Music Research 32(1) (2003) 83–93 19. Bowey, M.: A 20 minute intro to typography basics. http://design.tutsplus.com/articles/a-20-minute-intro-to-typography-basics– psd-3326 (2009) 20. Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M.S., Berg, A.C., Li, F.: Imagenet large scale visual recognition challenge. CoRR abs/1409.0575 (2014) 21. Karpathy, A., Toderici, G., Shetty, S., Leung, T., Sukthankar, R., Fei-Fei, L.: Largescale video classification with convolutional neural networks. In: Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. (2014) 1725–1732 22. Ciresan, D., Meier, U., Schmidhuber, J.: Multi-column deep neural networks for image classification. In: Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, IEEE (2012) 3642–3649 23. Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S., Anguelov, D., Erhan, D., Vanhoucke, V., Rabinovich, A.: Going deeper with convolutions. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2015) 1–9 24. Wang, M.: Multi-path convolutional neural networks for complex image classification. CoRR abs/1506.04701 (2015) 25. LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521(7553) (2015) 436– 444 26. Zeiler, M.D., Ranzato, M., Monga, R., Mao, M., Yang, K., Le, Q.V., Nguyen, P., Senior, A., Vanhoucke, V., Dean, J., et al.: On rectified linear units for speech processing. In: Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, IEEE (2013) 3517–3521 27. Schapire, R.E., Freund, Y., Bartlett, P., Lee, W.S.: Boosting the margin: A new explanation for the effectiveness of voting methods. Annals of statistics (1998) 1651–1686 28. Bengio, Y.: Deep learning of representations for unsupervised and transfer learning. Unsupervised and Transfer Learning Challenges in Machine Learning 7 (2012) 19 29. Huang, J.T., Li, J., Yu, D., Deng, L., Gong, Y.: Cross-language knowledge transfer using multilingual deep neural network with shared hidden layers. In: Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, IEEE (2013) 7304–7308 Learning Typographic Style 17 30. Oquab, M., Bottou, L., Laptev, I., Sivic, J.: Learning and transferring mid-level image representations using convolutional neural networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. (2014) 1717–1724 31. Caruana, R.: Multitask learning. Machine learning 28(1) (1997) 41–75 32. Xu, L., Ren, J.S., Liu, C., Jia, J.: Deep convolutional neural network for image deconvolution. In: Advances in Neural Information Processing Systems. (2014) 1790–1798 33. Dong, C., Loy, C.C., He, K., Tang, X.: Learning a deep convolutional network for image super-resolution. In: Computer Vision–ECCV 2014. Springer (2014) 184–199 34. Ioffe, S., Szegedy, C.: Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167 (2015) 35. Jiwoong Im, D., Dongjoo Kim, C., Jiang, H., Memisevic, R.: Generating images with recurrent adversarial networks. ArXiv e-prints (February 2016) 36. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial nets. In: Advances in Neural Information Processing Systems. (2014) 2672–2680 37. Dosovitskiy, A., Brox, T.: Generating Images with Perceptual Similarity Metrics based on Deep Networks. ArXiv e-prints (February 2016) 38. Mordvintsev, A., Olah, C., Tyka, M.: Inceptionism: Going deeper into neural networks. http://googleresearch.blogspot.com/2015/06/inceptionism-going-deeperinto-neural.html (2015) 39. Denton, E.L., Chintala, S., szlam, a., Fergus, R.: Deep generative image models using a laplacian pyramid of adversarial networks. In Cortes, C., Lawrence, N., Lee, D., Sugiyama, M., Garnett, R., eds.: Advances in Neural Information Processing Systems 28. Curran Associates, Inc. (2015) 1486–1494 40. Zaremba, W., Sutskever, I.: Learning to execute. arXiv preprint arXiv:1410.4615 (2014) 41. Eck, D., Schmidhuber, J.: A first look at music composition using lstm recurrent neural networks. Istituto Dalle Molle Di Studi Sull Intelligenza Artificiale 103 (2002) 42. Graves, A., Wayne, G., Danihelka, I.: Neural turing machines. arXiv preprint arXiv:1410.5401 (2014)
9cs.NE
REGULAR SEQUENCES AND LOCAL COHOMOLOGY MODULES WITH RESPECT TO A PAIR OF IDEALS arXiv:1305.0429v1 [math.AC] 2 May 2013 SH. PAYROVI AND M. LOTFI PARSA A BSTRACT. Let R be a Noetherian ring, I and J two ideals of R and t an integer. Let S be the class of Artinian R-modules, or the class of all R-modules N i (M) ∈ with dimR N ≤ k, where k is an integer. It is proved that inf{i : HI,J / S} = e J)}, where M is a finitely generated R-module, or inf{S − deptha (M) : a ∈ W(I, e J). Let SuppR H i (M) be is a ZD-module such that M/aM ∈ / S for all a ∈ W(I, I,J a finite subset of Max(R) for all i < t. It is shown that there are maximal ideals i (M) ∼ H i (M) ⊕ H i (M) ⊕ · · · ⊕ H i (M) for m1 , m2 , . . . , mk of R such that HI,J = m1 mk m2 all i < t. 1. I NTRODUCTION Throughout this paper, R is a commutative Noetherian ring with non-zero identity, I and J are two ideals of R, M is an R-module and s and t are two integers. For notations and terminologies not given in this paper, the reader is referred to [4], [5] and [16] if necessary. The theory of local cohomology, which was introduced by Grothendieck [10], is a useful tool for attacking problems in commutative algebra and algebraic geometry. Bijan-Zadeh [3] introduced the local cohomology modules with respect to a system of ideals, which is a generalization of ordinary local cohomology modules. As a special case of these extend modules, Takahashi, Yoshino and Yoshizawa [16] defined the local cohomology modules with respect to a pair of ideals. To be more precise, let W(I, J) = {p ∈ Spec(R) : I t ⊆ J + p for some positive integer t}. The set of elements x of M such that SuppR Rx ⊆ W(I, J), is said to be (I, J)-torsion submodule of M and is denoted by ΓI,J (M). ΓI,J (−) is a covariant, R-linear functor from the category of R-modules to itself. For an integer i, the local cohomology i (−) with respect to (I, J), is defined to be the i-th right derived functor functor HI,J i (M) is called the i-th local cohomology module of M with reof ΓI,J (−). Also HI,J i (−) coincides with the ordinary local cohomology spect to (I, J). If J = 0, then HI,J 2010 Mathematics Subject Classification. 13C15, 13D07, 13D45. Key words and Phrases. Local cohomology, Regular sequence, Serre subcategory, ZD-module. 1 2 SH. PAYROVI AND M. LOTFI PARSA e J) = {a E R : I t ⊆ J + a for some positive integer t}. It is functor HIi (−). Let W(I, easy to see that e J), ax = 0} = ΓI,J (M) = {x ∈ M : ∃ a ∈ W(I, [ (0 :M a). e a∈W(I,J) In section 2, we study extension functors of local cohomology modules with respect to a pair of ideals. Let S be a Melkersson subcategory with respect to I, and M a finitely generated R-module. The current authors, in [13, Theorem 2.11], i (M) ∈ S for all i < t, then H i (M) ∈ S for all i < t. In 2.5, we showed that if HI,J I j i (M)) ∈ S for all i < t and all improve this result and we show that if ExtR (N, HI,J j < t − i, then Hai (M) ∈ S for all i < t, where M is an arbitrary R-module and N is a e J). finitely generated R-module with SuppR N = V(a) for some a ∈ W(I, Let S be a Serre subcategory of the category of R-modules. Aghapournahr and Melkersson [1] introduced the notion of S-sequences on M as a generalization of regular sequences. Suppose that S is a Melkersson subcategory with respect to I, M is a ZD-module and M/IM ∈ / S. In [14, Theorem 2.9] it is proved that all maximal S-sequences on M in I, have the same length. If this common length is denoted by S − depthI (M), then S − depthI (M) = inf{i : HIi (M) ∈ / S}; see [14, Corollary 2.12]. In 2.25, we generalize this result as follows. Let S be the class of Artinian R-modules, or the class of all R-modules N with dimR N ≤ k, where k is an integer. e J)} = inf{i : H i (M) ∈ Then inf{S − deptha (M) : a ∈ W(I, / S}, where M is a finitely I,J e J). generated R-module, or is a ZD-module such that M/aM ∈ / S for all a ∈ W(I, In section 3, we get some identities between local cohomology modules. Let i (M) be a finite subset of Max(R) for all i < t. Then there are maximal SuppR HI,J ideals m1 , m2 , . . ., mk of R such that H i (M) ∼ = H i (M) ⊕ H i (M) ⊕ · · · ⊕ H i (M) I,J m1 m2 mk for all i < t; see 3.7. As a consequence we conclude that, if (R, m) is a local ring, ∼ H i (M)}; see 3.10. then inf{i : H i (M)is not Artinian} = inf{i : H i (M) 6= I,J 2. E XTENSION I,J m FUNCTORS OF LOCAL COHOMOLOGY MODULES Recall that R is a Noetherian ring, I and J are ideals of R and M is an R-module. Definition 2.1. A full subcategory of the category of R-modules is said to be Serre subcategory, if it is closed under taking submodules, quotients and extensions. A Serre subcategory S is said to be a Melkersson subcategory with respect to I, if for REGULAR SEQUENCES AND LOCAL COHOMOLOGY MODULES... 3 any I-torsion R-module M, 0 :M I ∈ S implies that M ∈ S. A Serre subcategory is called Melkersson subcategory when it is a Melkersson subcategory with respect to all ideals of R. The class of finitely generated modules and the class of weakly Laskerian modules are Serre subcategories. Aghapournahr and Melkersson [1, Lemma 2.2] proved that if a Serre subcategory is closed under taking injective hulls, then it is a Melkersson subcategory. The class of zero modules, Artinian R-modules, modules with finite support and the class of R-modules N with dimR N ≤ k, where k is a nonnegative integer, are Serre subcategories closed under taking injective hulls, and hence are Melkersson subcategories; see [1, Example 2.4]. The class of I-cofinite Artinian modules is a Melkersson subcategory with respect to I, but is not closed under taking injective hulls; see [1, Example 2.5]. The following result is a generalization of [2, Theorem 2.1]. i Theorem 2.2. Let N be an (I, J)-torsion R-module. If Extt−i R (N, HI,J (M)) ∈ S for all i ≤ t, then ExttR (N, M) ∈ S. Proof. Let F(−) = HomR (N, −) and G(−) = ΓI,J (−). Then we have FG(M) = HomR (N, M). By [15, Theorem 11.38], there is the Grothendieck spectral sequence p,q p q p+q E2 := ExtR (N, HI,J (M)) ⇒ ExtR (N, M). There is a finite filtration 0 = ϕ t+1 H t ⊆ ϕ t H t ⊆ · · · ⊆ ϕ 1 H t ⊆ ϕ 0 H t = ExttR (N, M) such that E∞t−i,i ∼ = ϕ t−i H t /ϕ t+1−i H t for all i ≤ t. It is enough to show that ϕ 0 H t ∈ S. By hypothesis, E t−i,i ∈ S for all j ≥ 2 and i ≤ t, and so E∞t−i,i ∈ S for all i ≤ t. The j sequence 0 −→ ϕ t+1−i H t −→ ϕ t−i H t −→ E∞t−i,i −→ 0 is exact for all i ≤ t. Therefore it follows that ϕ 0 H t ∈ S.  j i (M)) ∈ S for all Corollary 2.3. Let N be an (I, J)-torsion R-module. If ExtR (N, HI,J i < t and all j < t − i, then ExtiR (N, M) ∈ S for all i < t. Corollary 2.4. Suppose that S is a Melkersson subcategory with respect to I, and e J). If N is a finitely generated R-module with SuppR N = V (a) for some a ∈ W(I, 4 SH. PAYROVI AND M. LOTFI PARSA j i (M)) ∈ S for all i < t and all j < t − i, then H i (L, M) ∈ S for all i < t ExtR (N, HI,J a and all finitely generated R-modules L. Proof. The result follows by 2.3 and [1, Theorem 2.9].  The following result improves [13, Theorem 2.11]. Corollary 2.5. Suppose that S is a Melkersson subcategory with respect to I, and e J). If N is a finitely generated R-module with SuppR N = V(a) for some a ∈ W(I, j i (M)) ∈ S for all i < t and all j < t − i, then H i (M) ∈ S for all i < t. ExtR (N, HI,J a Proof. In 2.4, put L = R.  Corollary 2.6. If S is a Melkersson subcategory with respect to I, then i e J)}. inf{i : HI,J (M) ∈ / S} ≤ inf{inf{i : Hai (M) ∈ / S} : a ∈ W(I, As a generalization of finitely generated modules, Evans [9] introduced ZDmodules as follows. Definition 2.7. An R-module M is said to be zero-divisor module (ZD-module), if for any submodule N of M, the set ZR (M/N) is a finite union of prime ideals in AssR M/N. According to [7, Example 2.2], the class of ZD-modules contains finitely generated, Laskerian, weakly Laskerian, linearly compact and Matlis reflexive modules. Also it contains modules whose quotients have finite Goldie dimension and modules with finite support, in particular Artinian modules. Therefore the class of ZD-modules is much larger than that of finitely generated modules. Definition 2.8. An element a of R is called S-regular on M, if 0 :M a ∈ S. A sequence a1 , . . . , at is an S-sequence on M, if ai is S-regular on M/(a1 , . . ., ai−1 )M for i = 1, . . .,t. The S-sequence a1 , . . . , at is said to be maximal S-sequence on M, if a1 , . . . , at , y is not an S-sequence on M for any y ∈ R. When S is the class of zero modules, Artinian R-modules, modules with finite support, and the class of R-modules N with dimR N ≤ k, where k is a non-negative integer, then S-sequences on M are, poor M-sequences, filter-regular sequences, REGULAR SEQUENCES AND LOCAL COHOMOLOGY MODULES... 5 generalized regular sequences, and M-sequences in dimension > k, respectively; see [1, Example 2.8]. Let S be a Melkersson subcategory with respect to I, and M a ZD-module such that M/IM ∈ / S. The current authors, in [14, Theorem 2.9], proved that all maximal S-sequences on M in I, have the same length. Definition 2.9. Let S be a Melkersson subcategory with respect to I, and M a ZDmodule such that M/IM ∈ / S. The common length of all maximal S-sequences on M in I, is denoted by S − depthI (M). If M/IM ∈ S, we set S − depthI (M) = ∞. Suppose that M is a ZD-module. When S is the class of zero modules, Artinian R-modules, and modules with finite support, then S − depthI (M) is the same as ordinary depthI (M), f − depthI (M) (filter-depth), and g − depthI (M) (generalized depth), respectively. Corollary 2.10. Let S be a Melkersson subcategory with respect to I, and M a ZD-module. Then i e J)}. inf{i : HI,J (M) ∈ / S} ≤ inf{S − deptha (M) : a ∈ W(I, Proof. The result follows by 2.6 and [14, Corollary 2.12].  In the following, we study the relation between generalized local cohomology modules and local cohomology modules with respect to a pair of ideals. Corollary 2.11. Suppose that N is a finitely generated a-torsion R-module for some e J). If Extt−i (N, H i (M)) ∈ S for all i ≤ t, then Hat (N, M) ∈ S. a ∈ W(I, I,J R Proof. The result follows by 2.2. Note that Γa (N) ⊆ ΓI,J (N) and by [8, Lemma 2.1]  we have Exti (N, M) ∼ = H i (N, M) for any integer i. R a Corollary 2.12. Suppose that N is a finitely generated a-torsion R-module for some e J). If Ext j (N, H i (M)) ∈ S for all i < t and all j < t −i, then Hai (N, M) ∈ S a ∈ W(I, R I,J for all i < t. The following result is a generalization of [2, Theorem 2.3]. i (M)) ∈ S Theorem 2.13. Let N be an (I, J)-torsion R-module. If ExtRs+t+1−i (N, HI,J i (M)) ∈ S for all t < i < s + t, and Exts+t (N, M) ∈ S, for all i < t, ExtRs+t−1−i (N, HI,J R t (M)) ∈ S. then ExtsR (N, HI,J 6 SH. PAYROVI AND M. LOTFI PARSA Proof. Let F(−) = HomR (N, −) and G(−) = ΓI,J (−). Then we have FG(M) = HomR (N, M). By [15, Theorem 11.38], there is the Grothendieck spectral sequence p,q q p+q E2 := ExtRp (N, HI,J (M)) ⇒ ExtR (N, M). There is a finite filtration 0 = ϕ s+t+1 H s+t ⊆ ϕ s+t H s+t ⊆ · · · ⊆ ϕ 1 H s+t ⊆ ϕ 0 H s+t = Exts+t R (N, M) such that E∞s+t−i,i ∼ = ϕ s+t−i H s+t /ϕ s+t+1−i H s+t for all i ≤ s +t. It is enough to show that E2s,t ∈ S. We have the following exact sequences s,t 0 −→ Ker dt+1−i s,t dt+1−i s,t −→ Et+1−i −→ s+t+1−i,i Et+1−i and s−t−1+i,2t−i s,t s,t −→ 0 0 −→ Im dt+1−i −→ Kerdt+1−i −→ Et+2−i s+t+1−i,i s+t−1−i,i for all i. By hypothesis, Et+1−i ∈ S for all i < t, and E1+i−t ∈ S for all s−t−1+i,2t−i t < i < s + t. It follows that Et+1−i ∈ S for all t − s < i < t. Note that if s−t−1+i,2t−i s−t−1+i,2t−i i ≤ t − s, then Et+1−i = 0. Hence Et+1−i ∈ S for all i < t, and theres−t−1+i,2t−i s,t fore Im dt+1−i ∈ S for all i < t. Also we have Es+t+2 = E∞s,t ∈ S, because E s,t ∼ = ϕ s H s+t /ϕ s+1 H s+t and ϕ s H s+t ⊆ ϕ 0 H s+t = Exts+t (N, M) ∈ S. Now the claim ∞ R  follows by the above exact sequences. j−i i (M)) ∈ S Corollary 2.14. Let N be an (I, J)-torsion R-module. Let ExtR (N, HI,J i (M)) ∈ S for all t < i < for j = s + t, s + t + 1 and all i < t, and ExtRs+t−1−i (N, HI,J s t s + t. Then Exts+t R (N, M) ∈ S if and only if ExtR (N, HI,J (M)) ∈ S.  Proof. The claim follows by 2.2 and 2.13. The following result is a generalization of [17, Theorem 2.3]. i (M)) ∈ S Corollary 2.15. Let N be an (I, J)-torsion R-module. If Extt+1−i (N, HI,J R t (M)) ∈ S. for all i < t, and ExttR (N, M) ∈ S, then HomR (N, HI,J Proof. In 2.13, put s = 0.  i (M)) be Artinian for all a ∈ W(I, e J) and Proposition 2.16. Let Extt+1−i (R/a, HI,J R e J). Then Ext j (R/a, H t (M)) all i < t, and Extt (R/a, M) be Artinian for all a ∈ W(I, R e J) and all j ∈ N0 . is Artinian for all a ∈ W(I, R I,J REGULAR SEQUENCES AND LOCAL COHOMOLOGY MODULES... 7 t (M)) is Artinian for all a ∈ W(I, e J). Also we know Proof. By 2.15, HomR (R/a, HI,J that [ t HI,J (M) = t (M) a) = (0 :HI,J e a∈W(I,J) [ t HomR (R/a, HI,J (M)). e a∈W(I,J)  Now the claim follows by [11, Theorem 5.1] and [1, Theorem 2.9]. e J) and all i < t. Then Corollary 2.17. Let ExtiR (R/a, M) be Artinian for all a ∈ W(I, j e J), all i < t and all j ∈ N0 . Ext (R/a, H i (M)) is Artinian for all a ∈ W(I, I,J R j e J) and Proof. It follows by 2.16 that ExtR (R/a, ΓI,J (M)) is Artinian for all a ∈ W(I, j 1 (M)) is Artinian for all j ∈ N0 . Now again using of 2.16, implies that ExtR (R/a, HI,J e J) and all j ∈ N0 . By continuing this process, the claim follows. all a ∈ W(I,  i (M)) ∈ S for all i ≤ t, then H t (M) ∈ S. Lemma 2.18. If HIt−i (HI,J I,J Proof. Let F(−) = ΓI (−) and G(−) = ΓI,J (−). Then FG(M) = ΓI,J (−). The rest  of the proof is similar to that of 2.2. e J) and all i < t, then Corollary 2.19. If ExtiR (R/a, M) is Artinian for all a ∈ W(I, i (M) is Artinian for all i < t. HI,J i (M)) is Artinian for all Proof. It follows by 2.17 and [1, Theorem 2.9] that HIj (HI,J i < t and all j ∈ N0 . Now the claim follows by 2.18.  Proposition 2.20. Let S be the class of all R-modules N with dimR N ≤ k, where k e J) and all i < t, and is an integer. Let Extt+1−i (R/a, H i (M)) ∈ S for all a ∈ W(I, I,J R ExttR (R/a, M) ∈ S e J). Then H t (M) ∈ S. for all a ∈ W(I, I,J t (M)) ∈ S for all a ∈ W(I, e J). Also we know that Proof. By 2.15, HomR (R/a, HI,J t HI,J (M) = [ e a∈W(I,J) t (M) a) = (0 :HI,J [ t HomR (R/a, HI,J (M)). e a∈W(I,J) t (M) ∈ S. It follows that HI,J  Corollary 2.21. Let S be the class of all R-modules N with dimR N ≤ k, where k is e J) and all i < t, then H i (M) ∈ S an integer. If Exti (R/a, M) ∈ S for all a ∈ W(I, R for all i < t. I,J 8 SH. PAYROVI AND M. LOTFI PARSA Proof. We know that ΓI,J (M) = [ [ HomR (R/a, ΓI,J (M)) = e a∈W(I,J) HomR (R/a, M). e a∈W(I,J) 1 (M) ∈ S. By keeping this process, Therefore ΓI,J (M) ∈ S. It follows by 2.20 that HI,J the claim follows.  Corollary 2.22. Let S be the class of Artinian R-modules, or the class of all Re J) modules N with dimR N ≤ k, where k is an integer. If Hai (M) ∈ S for all a ∈ W(I, i (M) ∈ S for all i < t. and all i < t, then HI,J Proof. The claim follows by 2.19, 2.21 and [1, Theorem 2.9].  Corollary 2.23. Let S be the class of Artinian R-modules, or the class of all Rmodules N with dimR N ≤ k, where k is an integer. Then the following statements are equivalent: i (M) ∈ S for all i < t; (i) HI,J e J) and all i < t. (ii) Hai (M) ∈ S for all a ∈ W(I, Proof. The claim follows by 2.5 and 2.22.  Corollary 2.24. Let S be the class of Artinian R-modules, or the class of all Rmodules N with dimR N ≤ k, where k is an integer. Then i e J)}. inf{i : HI,J (M) ∈ / S} = inf{inf{i : Hai (M) ∈ / S} : a ∈ W(I, The following result is a generalization of [14, Theorem 2.13]. Theorem 2.25. Let S be the class of Artinian R-modules, or the class of all Rmodules N with dimR N ≤ k, where k is an integer. Let M be a finitely generated e J). Then R-module, or be a ZD-module such that M/aM ∈ / S for all a ∈ W(I, i e J)}. inf{i : HI,J (M) ∈ / S} = inf{S − deptha (M) : a ∈ W(I, Proof. The claim follows by 2.24 and [14, Theorem 2.13].  REGULAR SEQUENCES AND LOCAL COHOMOLOGY MODULES... 3. S OME 9 IDENTITIES BETWEEN LOCAL COHOMOLOGY MODULES Suppose that d0 di E • (M) : 0 −→ ER0 (M) −→ ER1 (M) −→ · · · −→ ERi (M) −→ ERi+1 (M) −→ · · · (∗) L is a minimal injective resolution of M, where ERi (M) ∼ = p∈Spec(R) µ i (p, M)ER(R/p) is a decomposition of ERi (M) as the direct sum of indecomposable injective Rmodules, ER (R/p) denotes the injective hull of R/p and µ i (p, M) denotes the i-th Bass number of M with respect to p. It follows by [16, Proposition 1.11] that M ΓI,J (ERi (M)) ∼ = µ i (p, M)ER (R/p). p∈W(I,J) Hence SuppR ΓI,J (ERi (M)) = {p ∈ W(I, J) : µ i (p, M) 6= 0}. The above mentioned results are assumed known through this section. Theorem 3.1. Let S be a Serre subcategory closed under taking injective hulls. The following conditions are equivalent: i (M) ∈ S for all i < t. (i) HI,J (ii) ΓI,J (ERi (M)) ∈ S for all i < t. Proof. Since ΓI,J (ERi (M)) is injective and Ker ΓI,J (d i ) = Ker d i ∩ ΓI,J (ERi (M)), thus ΓI,J (ERi (M)) is injective hull of Ker ΓI,J (d i ). Now the claim follows by [12, Lemma 5.4]. We note that the proof of [12, Lemma 5.4] is still valid if the class of Artinian R-modules is replaced by a Serre subcategory that is closed under taking injective  hulls. Corollary 3.2. The following statements are equivalent: i (M) is a finite subset of Max(R) for all i < t; (i) SuppR HI,J i (M) is Artinian for all i < t. (ii) HI,J Corollary 3.3. If (R, m) is a local ring, then i i inf{i : SuppR HI,J (M) 6⊆ {m}} = inf{i : HI,J (M)is not Artinian}. Proposition 3.4. Let M be a finitely generated R-module, or be a ZD-module such that Mp /pMp 6= 0 for all p ∈ W(I, J). Then i inf{i : HI,J (M) 6= 0} = inf{depth Mp : p ∈ W(I, J)}. 10 SH. PAYROVI AND M. LOTFI PARSA Proof. Let t = inf{depth Mp : p ∈ W(I, J)}. It follows by [14, Corollary 2.14] that µ i (p, M) = 0 for all p ∈ W(I, J) and all i < t. So ΓI,J (ERi (M)) = 0 for all i < t, i (M) = 0 for all i < t. Therefore t ≤ inf{i : H i (M) 6= 0}. Now and hence HI,J I,J t (M) 6= 0. By assumption, there is q ∈ W(I, J) such it is enough to show that HI,J that t = depth Mq . It follows by [14, Corollary 2.14] that µ t (q, M) 6= 0. Therefore t (M) 6= 0 by 3.1. ΓI,J (ERt (M)) 6= 0, and hence HI,J  We can get a generalization of [6, Theorem 2.4]. Proposition 3.5. Let M be a finitely generated R-module, or be a ZD-module such that Mp /pMp 6= 0 for all p ∈ W(I, J) − Max(R). Then i inf{i : SuppR HI,J (M) 6⊆ Max(R)} = inf{depth Mp : p ∈ W(I, J) − Max(R)}. i (M) 6⊆ Max(R)}. It follows by 3.1 that µ i (p, M) = 0 Proof. Let t = inf{i : SuppR HI,J for all p ∈ W(I, J) − Max(R) and all i < t, and there is q ∈ W(I, J) − Max(R) such that µ t (q, M) 6= 0. Now it follows by [14, Corollary 2.14] that depth Mp ≥ t for all p ∈ W(I, J) − Max(R), and depth Mq = t. Therefore inf{depth Mp : p ∈ W(I, J) − Max(R)} = t.  i (M) be a finite subset of Max(R) for all i < t. Then Theorem 3.6. Let SuppR HI,J i (M) ∼ H i there are maximal ideals m1 , m2 , . . ., mk ∈ W(I, J) such that HI,J = m1 m2 ···mk (M) for all i < t. Proof. It follows by 3.1 that SuppR ΓI,J (E i (M)) is a finite subset of Max(R) for all i < t. Let SuppR ΓI,J (E i (M)) = {mi1 , mi2 , ..., miki }, where ki is an integer. Then ΓI,J (E (M)) ∼ = i ki M µ i (mi j , M)ER (R/mi j ) j=1 for all i < t. Put a = ∏i, j mi j . Then V(a) = {mi j : 0 ≤ i < t, 1 ≤ j ≤ ki }, and e J). Therefore a ∈ W(I, Γa (E i (M)) ∼ = M µ i (p, M)ER (R/p) p∈V(a) = ki M µ i (mi j , M)ER (R/mi j ) ∼ = ΓI,J (E i (M)) j=1 i (M) ∼ H i (M) for all i < t. for all i < t, and hence HI,J = a  REGULAR SEQUENCES AND LOCAL COHOMOLOGY MODULES... 11 i (M) be a finite subset of Max(R) for all i < t. Then Corollary 3.7. Let SuppR HI,J there are maximal ideals m1 , m2 , . . . , mk ∈ W(I, J) such that i HI,J (M) ∼ = Hmi 1 (M) ⊕ Hmi 2 (M) ⊕ · · · ⊕ Hmi k (M) for all i < t. Proof. The claim follows by 3.6 and the Mayer-Vietoris sequence [4, 3.2.3].  i (M) ⊆ {m} for all i < t, Corollary 3.8. Let (R, m) be a local ring. If SuppR HI,J then H i (M) ∼ = H i (M) for all i < t. I,J m Corollary 3.9. If (R, m) is a local ring, then i i inf{i : SuppR HI,J (M) 6⊆ {m}} = inf{i : HI,J (M) ∼ 6 Hmi (M)}. = The following result is a generalization of [6, Proposition 2.5]. Corollary 3.10. If (R, m) is a local ring, then i i (M) ∼ 6 Hmi (M)}. (M)is not Artinian} = inf{i : HI,J inf{i : HI,J = Proof. The claim follows by 3.3 and 3.9.  i (M) ⊆ {m} for all i < t, Corollary 3.11. Let (R, m) be a local ring. If SuppR HI,J e J) and all i < t. then H i (M) ∼ = Hai (M) for all a ∈ W(I, I,J e J) and all i < t. Proof. It follows by 2.5 that SuppR Hai (M) ⊆ {m} for all a ∈ W(I, e J) and all i < t, by 3.8. Now again Therefore Hai (M) ∼ = Hmi (M) for all a ∈ W(I, i (M) ∼ H i (M) for all i < t, and the claim follows.  using of 3.8 implies that HI,J = m R EFERENCES [1] M. Aghapournahr, L. Melkersson, Local cohomology and Serre subcategories, J. Algebra 320 (2008), 1275-1287. [2] M. Aghapournahr, A. J. Taherizadeh, A. Vahidi, Extension functors of local cohomology modules, Bull. Iranian Math. Soc. 37 (2011), 117-134. [3] M. H. Bijan-Zadeh, Torsion theories and local cohomology over commutative Noetherian rings, J. London Math. Soc. (2) 19 (1979), 402-410. [4] M. P. Brodmann, R. Y. Sharp, Local Cohomology: An Algebraic Introduction with Geometric Applications, Cambridge University Press, Cambridge, 1998. [5] W. Bruns, J. Herzog, Cohen-Macaulay Rings, Cambridge University Press, Cambridge, 1993. 12 [6] SH. PAYROVI AND M. LOTFI PARSA L. Chu, Q. Wang, Some results on local cohomology modules defined by a pair of ideals, J. Math. Kyoto Univ. 49 (2009), 193-200. [7] K. Divaani-Aazar, M. A. Esmkhani, Artinianness of local cohomology modules of ZDmodules, Comm. Algebra 33 (2005), 2857-2863. [8] K. Divaani-Aazar, R. Sazeedeh, M. Tousi, On vanishing of generalized local cohomology modules, Algebra Colloq. 12 (2005), 213-218. [9] E. G. Evans, Zero divisors in Noetherian-like rings, Trans. Amer. Math. Soc. 155 (1971), 505-512. [10] A. Grothendieck (notes by R. Hartshorne), Local Cohomology, Springer Lecture Notes in Math., 41, Springer-Verlag, 1966. [11] L. Melkersson, Some applications of a criterion for Artinianness of a module, J. Pure Appl. Algebra 101 (1995), 291-303. [12] L. Melkersson, Modules cofinite with respect to an ideal, J. Algebra 285 (2005), 649-668. [13] Sh. Payrovi, M. Lotfi Parsa, Finiteness of local cohomology modules defined by a pair of ideals, Comm. Algebra 41 (2013), 627-637. [14] Sh. Payrovi, M. Lotfi Parsa, Regular sequences and ZD-modules, Eprint arXiv: 1305.0164v1. [15] J. Rotman, An Introduction to Homological Algebra, Academic Press, Orlando, 1979. [16] R. Takahashi, Y. Yoshino, T. Yoshizawa, Local cohomology based on a nonclosed support defined by a pair of ideals, J. Pure Appl. Algebra 213 (2009), 582-600. [17] A. Tehranian, A. Pour Eshmanan Talemi, Cofiniteness of local cohomology based on a nonclosed support defined by a pair of ideals, Bull. Iranian Math. Soc. 36 (2010), 145-155. I. K. I NTERNATIONAL U NIVERSITY, P OSTAL C ODE : 34149-1-6818 Q AZVIN - IRAN E-mail address: [email protected] E-mail address: [email protected]
0math.AC
arXiv:1703.03701v2 [math.GR] 20 Mar 2017 Profinite detection of 3-manifold decompositions Henry Wilton∗ and Pavel Zalesskii† March 21, 2017 Abstract The profinite completion of the fundamental group of a closed, orientable 3-manifold determines the Kneser–Milnor decomposition. If M is irreducible, then the profinite completion determines the Jaco– Shalen–Johannson decomposition of M . When trying to distinguish two compact 3-manifolds M, N, in practice the easiest method is often to compute some finite quotients of their fundamental groups, and notice that there is a finite group Q which is a quotient of π1 M, say, but not of π1 N. It would be very useful, both theoretically and in practice, to know that this method always works. The set of finite quotients ̂ (the inverse limit of the of a group Γ is encoded by the profinite completion Γ system of finite quotient groups), and so one is naturally led to the following question. Question 0.1. Let M be a closed, orientable 3-manifold. To what extent is π1 M determined by its profinite completion? In particular, if M is determined among all compact, orientable 3-manifolds ̂ by π1 M, then M is said to be profinitely rigid. If there are at most finitely ̂ ̂ many closed, orientable 3-manifolds N with π 1 M ≅ π1 N , then M is said ∗ Department of Pure Mathematics and Mathematical Statistics, Centre for Mathematical Sciences, Wilberforce Road, Cambridge, CB3 0WB, United Kingdom † Department of Mathematics, University of Brası́lia, 70910-9000 Brası́lia, Brazil 1 to have finite genus. More precise versions of Question 0.1 ask which 3manifolds are profinitely rigid, which have finite genus and whether various ̂ properties of M are determined by π 1M . ̂ The results of this paper show that the profinite completion π 1 M detects both the Kneser–Milnor and the JSJ decompositions of M. This complê ments our previous results showing that π 1 M detects the geometry of M [WZ17]. The first theorem concerns the Kneser–Milnor decomposition. Theorem A. Let M, N be closed, orientable 3-manifolds with Kneser–Milnor decompositions M ≅ M1 # . . . #Mm #r(S1 ×S2 ) and N ≅ N1 # . . . #Nn #s(S1 × ̂ ̂ ̂ S2 ). If π 1 M ≅ π1 N then m = n, r = s, and up to re-indexing, π1 M i is conjugate to π̂ 1 N i for each i. ̂ In particular, π 1 M detects whether or not M is irreducible. While this work was in progress we discovered that a similar result has also been proved in the pro-p setting by Wilkes, using l2 -cohomology [Wil17, Proposition 6.2.4]. Our proof is different, using the continuous cohomology of the profinite completion, and naturally generalizes to our next theorem, which shows that the profinite completion detects the JSJ decomposition of M. Theorem B. Let M and N be closed, orientable, irreducible 3-manifolds, ̂ ̂ and suppose π 1 M ≅ π1 N . Then the underlying graphs of the JSJ decompositions of π1 M, π1 N are isomorphic, and corresponding vertex groups have isomorphic profinite completions. See Theorem 4.3 for a more precise statement, phrased in terms of profinite Bass–Serre trees. Partial results along the lines of Theorem B have also been obtained by Wilkes [Wil16]. In [WZ17, Theorem 8.4], it was shown that the profinite completion of the fundamental group of a closed, orientable 3-manifold M determines the geometry of M. As an immediate consequence of Theorem B, we can extend this result to the case with toral boundary. Corollary C. Let M, N be compact, orientable, irreducible 3-manifolds with ̂ ̂ non-empty toral boundaries, and suppose that π 1 M ≅ π1 N. If M is geometric then N is also geometric, with the same geometry. In particular, N is Seifert fibred if and only if M is Seifert fibred. Proof. Let D be the double of M and E be the double of N. Note that ̂ π̂ 1 D ≅ π1 E, and also that the isomorphism respects the profinite completions 2 of the boundary subgroups of π1 M and π1 N. The result follows from the observation that the geometry of M is reflected in properties of the double D. Indeed, if M is Seifert fibred then so is D. In this case, if M is homeomorphic to an interval bundle over the torus then D has Euclidean geometry; otherwise, M and D both have H2 × R geometry. Finally, M is hyperbolic if and only if D has non-trivial JSJ decomposition, and the boundary tori of M are the only JSJ tori of D. Combining these facts with Theorem B and [WZ17, Theorem 8.4], the result follows. Theorem B shows that the problem of distinguishing 3-manifolds using their profinite completions can be reduced to the pieces of the JSJ decomposition. The Seifert-fibred case has been resolved by Wilkes [Wilar], building on work of Hempel [Hem14]: Seifert fibred 3-manifolds are not profinitely rigid, but do have finite genus, and Wilkes was able to give a complete description of when two such 3-manifold groups have isomorphic profinite completions; he was subsequently able to extend this to a complete answer to Question 0.1 for graph manifolds [Wil16]. Sol-manifolds are also well understood: they are not profinitely rigid [Fun13], but do have finite genus [GPS80]. A definitive treatment of this case would be a valuable addition to the literature. The case of hyperbolic 3-manifolds remains an important open problem. The complement of the figure-eight knot was shown to be profinitely rigid by Boileau–Friedl [BF15] and by Bridson–Reid [BR15]; see also [BCR16] for analogous results for Fuchsian groups and [BRW16] for once-punctured-torus bundles. Both [BF15] and [BR15] rely on results showing that fibredness is a profinite invariant in certain contexts, and the question of whether or not fibredness is a profinite invariant is also an important problem. This is known to hold for hyperbolic 3-manifolds M with b1 (M) = 1: a proof using twisted Alexander polynomials was given by Boileau–Friedl [BF15]; topological proofs were given by Bridson–Reid in the case with boundary [BR15], and by Bridson–Reid–Wilton in the closed case [BRW16]. More generally, Boileau–Friedl proved that fibredness is an invariant of regular profinite isomorphism. Ueki also recently showed that the profinite completion of a knot group determines the Alexander polynomial of the knot [Uek17]. The results of this paper are proved by considering profinite Poincaré Duality groups. The main difficulty in the above theorems is to show that profinite completions of 3-manifold groups do not admit unexpected splittings 3 which are not induced by splittings of the underlying group. It is well known that non-splitting theorems for discrete Poincaré Duality groups follow from the Mayer–Vietoris sequence. As a result of the work of Agol, Wise et al. on the Virtual Haken conjecture [Ago13, Wis12], 3-manifold groups are known to be good in the sense of Serre, meaning that the cohomology of the profinite completion is isomorphic to the ordinary cohomology (with coefficients in finite modules). Furthermore, a version of the Mayer–Vietoris sequence is known for efficient decompositions of profinite completions. The main idea of the proofs of Theorems A and B is to prove the analogues for profinite completions of the non-splitting theorems from the discrete case. Acknowledgements The authors are grateful to Peter Kropholler for explaining the results of [KR88], and to Michel Boileau and Stefan Friedl for pointing out Corollary C. This work was completed while the first author was a participant of the Nonpositive curvature, group actions and cohomology programme at the Isaac Newton Institute, funded by the EPSRC Grant number EP/K032208/1. The first author is also supported by an EPSRC Standard Grant EP/L026481/1. The second author was supported by CAPES as part of the ‘Estagio Senior’ programme, and thanks Trinity College and the Department of Pure Mathematics and Mathematical Statistics at the University of Cambridge for their hospitality. 1 1.1 Preliminaries on profinite groups Profinite trees A graph Γ is a disjoint union E(Γ) ∪ V (Γ), with two maps d0 , d1 ∶ Γ → V (Γ) that are the identity on the set of vertices V (Γ). For an element e of the set of edges E(Γ), d0 (e) is called the initial and d1 (e) the terminal vertex of e. Definition 1.1. A profinite graph Γ is a graph such that: (i) Γ is a profinite space (i.e. an inverse limit of finite discrete spaces); (ii) V (Γ) is closed; and (iii) the maps d0 and d1 are continuous. 4 Note that E(Γ) is not necessary closed. A morphism α ∶ Γ Ð→ ∆ of profinite graphs is a continuous map with αdi = di α for i = 0, 1. By [ZM88, Prop. 1.7] every profinite graph Γ is an inverse limit of finite quotient graphs of Γ. For a profinite space X that is the inverse limit of finite discrete spaces ̂ ̂ j ], where [ZX ̂ j ] is the free Z-module ̂ Xj , [[ZX]] is the inverse limit of [ZX with basis Xj . For a pointed profinite space (X, ∗) that is the inverse limit ̂ of pointed finite discrete spaces (Xj , ∗), [[Z(X, ∗)]] is the inverse limit of ̂ j , ∗)], where [Z(X ̂ j , ∗)] is the free Z-module ̂ [Z(X with basis Xj ∖ {∗} [RZ10, Chapter 5.2]. For a profinite graph Γ define the pointed space (E ∗ (Γ), ∗) as Γ/V (Γ) with the image of V (Γ) as a distinguished point ∗, and denote the image of e ∈ E(Γ) by ē. Definition 1.2. A profinite tree Γ is a profinite graph such that the sequence δ ǫ ̂ ∗ (Γ), ∗)]] → ̂ (Γ)]] → ̂→0 0 → [[Z(E [[ZV Z is exact, where δ(ē) = d1 (e) − d0 (e) for every e ∈ E(Γ) and ǫ(v) = 1 for every v ∈ V (Γ). If v and w are elements of a profinite tree T , we denote by [v, w] the smallest profinite subtree of T containing v and w and call it a geodesic. By definition a profinite group G acts on a profinite graph Γ if we have a continuous action of G on the profinite space Γ that commutes with the maps d0 and d1 . We shall need the following lemma; its proof is contained in the first eight lines of the proof of [Zal90, Lemma 2.3]. Lemma 1.3. Suppose that a profinite group G acts on a profinite tree T and does not fix any vertex. Then there exists an open normal subgroup U of G that is not generated by its vertex stabilizers. When we say that G is a finite graph of profinite groups we mean that it contains the data of the underlying finite graph, the edge profinite groups, the vertex profinite groups and the attaching continuous maps. More precisely, let ∆ be a connected finite graph. The data of a graph of profinite 5 groups (G, ∆) over ∆ consists of a profinite group G(m) for each m ∈ ∆, and continuous monomorphisms ∂i ∶ G(e) Ð→ G(di (e)) for each edge e ∈ E(∆). The definition of the profinite fundamental group of a connected profinite graph of profinite groups is quite involved (see [ZM89]). However, the profinite fundamental group Π1 (G, Γ) of a finite graph of finitely generated profinite groups (G, Γ) can be defined as the profinite completion of the abstract (usual) fundamental group Πabs 1 (G, Γ) (using here that every subgroup of finite index in a finitely generated profinite group is open, [NS07, Theorem 1.1]). The fundamental profinite group Π1 (G, Γ) has the following presentation: Π1 (G, Γ) = ⟨G(v), te ∣ rel(G(v)), ∂1 (g) = ∂0 (g)te , g ∈ G(e), te = 1 for e ∈ T ⟩; (1) where T is a maximal subtree of Γ and ∂0 ∶ G(e) Ð→ G(d0 (e)), ∂1 ∶ G(e) Ð→ G(d1 (e)) are monomorphisms. In contrast to the abstract case, the vertex groups of (G, Γ) do not always embed in Π1 (G, Γ), i.e., Π1 (G, Γ) is not always proper. However, the edge and vertex groups can be replaced by their images in Π1 (G, Γ) and after this replacement Π1 (G, Γ) becomes proper. The profinite fundamental group Π1 (G, Γ) acts on the standard profinite tree T (defined analogously to the abstract Bass–Serre tree) associated to it, with vertex and edge stabilizers being conjugates of vertex and edge groups, and such that Π1 (G, Γ)/T = Γ [ZM88, Proposition 3.8]. In particular, this applies to the cases of an amalgamated free product G = G1 ∐H G2 (Γ is an edge with two vertices) and an HNN-extension G = G1 ∐H (Γ is a loop); if G is proper and, in the case of an amalgamated free product, G1 ≠ H ≠ G2 , we say that G splits over H. Example 1.4. If G = π1 (G, Γ) is the fundamental group of a finite graph of (abstract) groups then one has the induced graph of profinite completions of ̂ Γ) and a natural homomorphism G = π1 (G, Γ) Ð→ edge and vertex groups (G, ̂ Γ). It is an embedding if π1 (G, Γ) is residually finite. In this case Π1 (G, ̂ Γ) is simply the profinite completion G. ̂ Moreover, if the edge groups Π1 (G, G(e) are separable in G then the standard tree TG naturally embeds in the standard profinite tree T̂G (see [CB13, Proposition 2.5]). In particular this is the case if edge groups are finitely generated and G is subgroup separable. 6 1.2 Profinite Poincaré duality groups In this section we collect the facts about profinite groups that we will need. The following results are all profinite analogues of well known results in the setting of discrete groups. Definition 1.5 ([SW00]). Let p be a prime. A profinite group G of type p-F P∞ is called a Poincaré duality group at p of dimension n if cdp (G) = n and H i (G, Zp [[G]]) = 0, if i =/ n, H n (G, Zp [[G]]) ≅ Zp (as abelian groups). We say that such a group G is a profinite P D n -group at p. If G is a profinite group with cdp (G) < ∞ and U is an open subgroup of G, then G is a profinite P D n -group at p if and only if U is a profinite P D n -group at p. Our proof relies on the following lemma. In the discrete case, the corresponding result is Strebel’s theorem [Str77]. In the profinite case, this is Exercise 5(b) on p. 44 of [Ser97]. Lemma 1.6. Let G be a profinite P D n group at p and H a a closed subgroup of G such that p∞ ∣[G ∶ H]. Then cdp (H) < n. The following theorem is the profinite analogue of the well known fact in the discrete setting that P D n groups cannot split over groups of much smaller cohomological dimension [DD89, Proposition V.7.4]. Theorem 1.7. Let G be a profinite P D n group at every prime p acting on a profinite tree T with edge stabilizers of cd(Ge ) < n − 1. Then G fixes a vertex. Proof. By [ZM88, paragraph 2.7], cd G ≤ sup{cd Gv , cd Ge + 1 ∣ v ∈ V (T ), e ∈ E(T )}. Suppose that G acts on T without fixing a vertex. We now argue that there exists p such that p∞ ∣[G ∶ Gv ] for every v ∈ V (Γ), and deduce a contradiction from Lemma 1.6. By [Zal90, Lemma 1.5] we may assume that the action of G on T is irreducible (i.e. does not contain proper G-invariant subtrees). If K is the kernel of the action then G/K acts faithfully on T . Hence by [Zal90, Proposition 2.10 and Lemma 2.7] G/K contains a free pro-p subgroup acting freely on T and therefore so does G, whence p∞ ∣[G ∶ Gv ] as claimed. 7 We will apply these results to discrete groups Γ such that the cohomology of Γ is closely intertwined with the cohomology of the profinite completion ̂ Γ – Serre called such groups ‘good’ [Ser97, I.2.6]. Definition 1.8. A discrete group Γ is good (in the sense of Serre) if, for any finite Γ-module M, the natural map to the profinite completion Γ → ̂ Γ ̂ M) (where the cohomology of induces an isomorphism H ∗(Γ, M) ≅ H ∗ (Γ, ̂ is defined using the continuous Hom functor). the profinite group Γ It has been noticed in various places (eg. [Cav12], [AFW15]; cf. [GJZZ08]) that 3-manifold groups are good. For convenience, we record the result here. Theorem 1.9. If M is a closed 3-manifold then π1 M is good. Proof. Since goodness passes to finite extensions, we may assume that M is orientable. By [WZ10, Proposition 4.3] and the usual Kneser–Milnor and JSJ decompositions, it suffices to prove that Seifert fibred and hyperbolic 3-manifold groups are good. The Seifert-fibred case is Proposition 4.2 of the same paper, and the case of closed hyperbolic 3-manifolds follows from the Virtually fibred conjecture [Ago13], by [GJZZ08, Lemmas 3.2 and 3.3]. The next result is the subject of [KZ08, Theorem 4.1] for P D 3 -groups, and for general n the proof can be repeated replacing 3 by n. Theorem 1.10. If Γ is a good P D n group, then ̂ Γ is P D n at every p. We immediately obtain a profinite non-splitting result for good Poincaré duality groups. Corollary 1.11. Let G be P D n group which is good in the sense of Serre. ̂ on a profinite tree with edge stabilizers of cohomological Then any action of G dimension n − 2 has a global fixed point. ̂ is a profinite P D n group at p for every p by Proof. Since G is good, G Theorem 1.10, so the result follows from Theorem 1.7. Remark 1.12. The combined hypotheses of goodness and P D n apply to many examples in dimensions 2 and 3, but are restrictive in higher dimensions. Combining all of the above results, we obtain the following fact, which will be extremely useful to us in what follows. 8 Corollary 1.13. If M is a closed, orientable, irreducible 3-manifold then ̂ any action of π 1 M on a profinite tree with procyclic edge stabilizers has a global fixed point. Proof. By the Sphere Theorem, irreducible 3-manifolds either have finite ̂ fundamental group or are aspherical. In the first case π 1 M is finite, and the result follows from [ZM88, Theorem 2.10]. In the second case, π1 M is P D 3 , and the result follows from Theorem 1.9 and Corollary 1.11. 2 The Kneser–Milnor decomposition As a warm-up, we show that the profinite completion of a 3-manifold group detects its Kneser–Milnor decomposition. As noted above, this result can also be obtained using methods from l2 -cohomology [Wil17]. Recall that a closed 3-manifold M is irreducible if every embedded 2-sphere bounds a 3ball; equivalently, π1 M does not admit a non-trivial splitting over the trivial subgroup. Proposition 2.1. Suppose that M1 , M2 are closed, orientable 3-manifolds. ̂ ̂ If π 1 M 1 ≅ π1 M 2 and M1 is irreducible then so is M2 . Proof. If M2 were reducible then π1 M2 would act on a tree with trivial edge ̂ ̂ stabilizers and without a global fixed point, and π 1 M 1 ≅ π1 M 2 would act on a profinite tree with trivial edge stabilizers and without a global fixed point. This contradicts Corollary 1.13. Non-irreducible 3-manifolds admit non-trivial Kneser–Milnor decompositions. If M is a closed, oriented 3-manifold then the Kneser–Milnor decomposition decomposes M as a connect sum M ≅ N1 # . . . #Nm #Fr where each Ni is irreducible and Fr is a connect sum of copes of S 1 × S 2 . The Ni are uniquely determined, in an appropriate sense. In particular, the conjugacy classes of the subgroups π1 Ni are unique up to reordering, and the integer r is also unique. The reader is referred to [AFW15, Theorem 1.2.1] for details. 9 Theorem 2.2 (Profinite Kneser–Milnor). Consider closed, orientable 3manifolds with Kneser–Milnor decompositions M = N1 # . . . #Nm #Fr and ′ ′ M ′ = N1′ # . . . #Nm ′ #Fr ′ , where each Ni and Nj is irreducible and Fr and Fr ′ ′ ′ ̂ ̂′ are connect sums of S 1 × S 2 ’s. If π 1 M ≅ π1 M then m = m , r = r , and up to ̂′ ̂ reordering, π 1 Ni is conjugate to π1 Ni for each i. Proof. Let S be the Bass–Serre tree of the corresponding decomposition of ̂ π1 M, and let Ŝ be the corresponding profinite tree for π 1 M on which π1 M acts with trivial edge stabilizers. By Corollary 1.13, each profinite completion ′ ̂ ̂ π̂ 1 Ni fixes a vertex of S, and hence is conjugate into some π1 Nj . By symmê′ try, each π̂ 1 Ni is conjugate into some π1 Nj . Since profinite subgroups cannot be conjugate to proper subgroups of themselves, it follows that m = m′ and the profinite completions of the vertex groups are conjugate. Factoring the normal closures of these subgroups out, we see that F̂r ≅ F̂r′ and hence r = r ′ as claimed. 3 Cusped hyperbolic 3-manifolds An immediate consequence of Corollary 1.11 is that, for a closed 3-manifold ̂ M, π 1 M does not split over a subgroup of cohomological dimension 0 or 1 (for instance a profinite free group). In this section, we prove some profinite non-splitting results for hyperbolic manifolds with toral boundary. In the hyperbolic case, we will need a fact from [WZ17], describing the non-procyclic abelian subgroups of π̂ 1N . Proposition 3.1. Let N be a finite-volume hyperbolic 3-manifold and A a closed abelian subgroup of π̂ 1 N. If A is not procyclic then A is in the closure of a peripheral subgroup of π1 N, and this peripheral subgroup is unique up to conjugacy. Proof. By [WZ17, Theorem 9.3], A is conjugate into the closure of a peripheral subgroup, and by [WZ17, Lemma 4.5], the conjugacy class of the cusp subgroup is unique. In the classical P D n setting, one handles manifolds with boundary using the theory of P D n pairs [Dic80]. One of the upshots of this theory is that the fundamental group of an aspherical manifold with aspherical boundary cannot split over a boundary subgroup, relative to the collection of boundary 10 subgroups. (This can be deduced from the results of [KR88].) No doubt the profinite analogue of this statement can be proved by developing the theory of profinite P D n pairs. We take a quicker route here: we prove the result in the cusped hyperbolic case, using Dehn filling. First, we need to recall the definition of an acylindrical splitting. Definition 3.2. An action of a group Γ on a tree T is k-acylindrical (for an integer k) if, for every γ ∈ Γ ∖ 1, the subtree fixed by γ is either empty or of diameter at most k. Likewise, an action of a profinite group G on profinite tree T̂ is k-acylindrical if the subtree fixed by γ̂ is either empty or of diameter at most k, for every γ̂ ∈ G. Such an action is called acylindrical if it is k-acylindrical for some k. Acylindricity gives useful control over non-cyclic abelian subgroups, via the following lemma. This was proved in [WZ17, Theorem 5.2]. (The discrete version of this fact is left as an instructive exercise to the reader.) Lemma 3.3. If A is an abelian, profinite, non-procyclic group, and A acts acylindrically on a profinite tree T , then A fixes a vertex. We are now ready to prove the non-splitting result for hyperbolic manifolds with cusps. Lemma 3.4. If N is a compact, orientable, hyperbolic 3-manifold with toral boundary and π̂ 1 N acts on a profinite tree T with each edge stabilizer either procyclic or conjugate into a peripheral subgroup, then π̂ 1 N fixes a vertex. Proof. First, note that if π̂ 1 N acts on T without fixed points then, by Lemma 1.3, after passing to a proper open subgroup we may assume that π̂ 1 N is not generated by vertex stabilizers. Let the family of peripheral subgroups of π1 N be P1 , . . . , Pn . By Thurston’s hyperbolic Dehn filling theorem, we may choose slopes ci ∈ Pi so that the resulting Dehn filled manifold N(c1 , . . . , cn ) is a closed, hyperbolic (in particular, aspherical) manifold. Therefore, ̂ π̂ 1 N/⟪c1 , . . . , cn ⟫ ≅ π1 N(c1 , . . . , cn ) is a profinite P D 3 group. Since ⟪c1 , . . . , cn ⟫ is generated by vertex stabilizers, π̂ 1 N(c1 , . . . , cn ) acts on a profinite tree ⟪c1 , . . . , cn ⟫/T (see [ZM88, Prop. 2.5]) and still does not fix a vertex. The edge stabilizers of the latter action are procyclic. This contradicts Corollary 1.11. 11 4 The JSJ decomposition In this section we show that, as well as the Kneser–Milnor decomposition, the JSJ decomposition is also detected by the profinite completion. In order to avoid ambiguity, we start by stating the form of the JSJ decomposition we consider. In a nutshell, it is the minimal decomposition along tori such that the complementary pieces are geometric. Definition 4.1. Let M be a closed, orientable, irreducible 3-manifold which is not a torus bundle over the circle. Let T ⊆ M be an embedded disjoint union of essential tori such that the connected components of M ∖T are each either Seifert fibred or hyperbolic. Such a union T with the smallest number of connected components is called the JSJ decomposition of M. The existence of the JSJ decomposition follows from the work of Jaco– Shalen–Johannson together with Perelman’s proof of the geometrization conjecture; see [AFW15, §1.6, §1.7] for details. The tori are unique up to isotopy. We follow Wilkes’ elegant terminology [Wil16], and use the term minor to denote those components of M ∖ T that are homeomorphic to the twisted interval bundle over the Klein bottle; the remaining components we call major. If two minor components are adjacent then their union is virtually a torus bundle over a circle, and so admits either Euclidean, Nil- or Sol-geometry, which contradicts the hypothesis that T was minimal. Therefore, every edge adjoins at least one major vertex. The submanifold T induces a graph-of-spaces decomposition of M, and hence a graph-of-groups decomposition of π1 M and a profinite graph-of̂ groups decomposition of π 1 M (see Example 1.4). The Bass–Serre trees of the latter are denoted by TM and T̂M , respectively. Crucially, these trees turn out to be acylindrical, in the sense of Definition 3.2. Proposition 4.2. For M a closed, orientable, irreducible 3-manifold, the JSJ tree TM and the profinite JSJ tree T̂M are both 4-acylindrical. Proof. In [WZ10] the authors showed that the corresponding decomposition of π1 M is 4-acylindrical and fits into Example 1.4. In [HWZ13], the authors showed with Hamilton that the corresponding profinite decomposition ̂ of π 1 M is proper and also 4-acyindrical (see also [WZ17, Lemma 4.5]). We are now ready to state our main theorem, 12 Theorem 4.3. If M, M ′ are closed, orientable, irreducible 3-manifolds and ≅ ̂ ̂′ f ∶π 1 M → π1 M is an isomorphism, then there is an f -equivariant isomorphism φ ∶ T̂M → T̂M ′ of the corresponding profinite Bass–Serre trees. In particular, the underlying graphs of the JSJ decompositions of M and M ′ are isomorphic, as are the profinite completions of the fundamental groups of the corresponding pieces. Consider a vertex space N of M. The next three lemmas show that π̂ 1N ̂ must act with a fixed point on TM ′ . We start with the hyperbolic case. Lemma 4.4. Consider N a compact, hyperbolic 3-manifold with (possibly ̂ empty) toral boundary. If π̂ 1 N acts acylindrically on a profinite tree S with abelian edge stabilizers then π̂ 1 N fixes a unique vertex. Proof. If N is closed then every abelian subgroup of π̂ 1 N is procyclic [WZ17, Theorem D] and the result follows from Corollary 1.13. Suppose therefore that N has non-empty toroidal boundary. By Proposition 3.1 every edge stabilizer is either procyclic or conjugate into a peripheral subgroup, and therefore π̂ 1 N fixes a vertex by Lemma 3.4. Uniqueness follows from [ZM88, Corollary 2.9], since π̂ 1 N is non-abelian and edge stabilizers are abelian. We move on to the major Seifert fibred case. Lemma 4.5. Consider N a compact, major Seifert fibred 3-manifold with (possibly empty) toral boundary. If π̂ 1 N acts acylindrically on a profinite tree Ŝ with abelian edge groups then π̂ N fixes a unique vertex. 1 ̂2 Proof. The subgroups of π̂ 1 N which are isomorphic to Z each fix a vertex by Lemma 3.3. Thus the maximal procyclic normal subgroup C of π̂ 1 N fixes a vertex. Suppose on the contrary π̂ 1 N does not fix a vertex. By [Zal90, Lemma ̂ ̂ 1.5], there exists a unique minimal π̂ 1 N-invariant subtree D of S , which ̂ which is infinite. Now by [ZM88, Theorem 2.12], C acts trivially on D, contradicts the acylindricity of the action. Uniqueness again follows from [ZM88, Corollary 2.9]. 13 The case of minor Seifert-fibred vertex follows immediately from [WZ17, Theorem 5.2] and [ZM88, Corollary 2.9]. Lemma 4.6. Consider N a compact, minor Seifert fibred 3-manifold with ̂ toral boundary. If π̂ 1 N acts acylindrically on a profinite tree S with abelian ̂ edge groups then π1 N fixes a unique vertex. ̂ 2 subgroups of π ̂ We next classify the fixed point sets of Z 1 M . First, we need an analysis of their normalizers in vertex stabilizers. We start with the hyperbolic case, in which case normalizers coincide with centralizers. Lemma 4.7. Let N be a compact, orientable, hyperbolic 3-manifold with ̂2 a subgroup of π̂ (H). (H) = Cπ̂ toral boundary, and H ≅ Z ̂ 1 N. Then Nπ 1N 1N Proof. By [WZ17, Theorem 9.3], H is conjugate into the closure of a cusp subgroup, and by [WZ17, Lemma 4.5], that cusp subgroup is malnormal. The result follows. We next treat the case of a major Seifert fibred manifold. Lemma 4.8. Let N be a compact, orientable, major Seifert-fibred 3-manifold ̂2 a subgroup of π̂ with toral boundary, and H ≅ Z 1 N conjugate to the closure of the fundamental group of a boundary component. Then Nπ̂ (H) = Cπ̂ (H). 1N 1N Proof. The fundamental group π1 N is torsion-free of the form 1 → Z → π1 N → π1 O → 1 where π1 O is a Fuchsian group and Z is infinite cyclic (and not necessarily central). Since Seifert-fibred 3-manifold groups are LERF [Sco78, Sco85] we have a corresponding short exact sequence of profinite completions. f ̂ → π̂ ̂ 1→Z 1 N → π1 O → 1 ̂ and centralizes it. So f (Ĉ (H)) = C ̂ (f (H)) Then Cπ̂ (H) contains Z π1 N π1 O 1N and f (Nπ̂ (H)) = Nπ̂ (f (H)). Hence it suffices to show that Cπ̂ (f (H)) = 1N 1O 1O Nπ̂ (f (H)). We may assume that H is the closure of the fundamental 1O group of a boundary component; then f (H) is the closure of a peripheral infinite-cyclic subgroup C of π1 O. Since Fuchsian groups are conjugacy separable [FR90] we deduce that every-finite index subgroup of π1 O is conjugacy (f (H)) by [Min12, Corollary 12.3], and separable. Then Cπ1 O (C) = Cπ̂ 1O Nπ1 O (C) = Nπ̂ (f (H)) by [CZ13, Lemma 2.3 combined with Theorem 2.14]. 1O But Nπ1 O (C) = Cπ1 O (C), so Cπ̂ (f (H)) = Nπ̂ (f (H)) as required. 1O 1O 14 ̂2 subgroups of π ̂ Next, we classify the possible fixed subtrees for Z 1M . ̂2 of π ̂ ̂ Lemma 4.9. Consider the action of a subgroup H ≅ Z 1 M on TM . One of the following holds. (i) The fixed point set of H is a vertex with Seifert-fibred stabilizer. (ii) The fixed point set of H consists of exactly one edge. (iii) The fixed subtree of H consists of exactly two edges; the central vertex has a minor Seifert fibred stabilizer, and the other two vertices are major. Furthermore, if the centralizer Cπ̂ (H) is properly contained in the normal1M izer Nπ̂ (H), then we are in case (i) or case (iii). 1M Proof. By Lemma 3.3 and Proposition 4.2, H fixes a non-empty subtree. Recall that every edge adjoins a major vertex, and that every minor vertex adjoins exactly two edges. If H stabilizes an edge e and an adjacent major vertex v then, by Lemmas 4.7 and 4.8, e is the unique edge incident at v stabilized by H. It follows that the fixed tree of H is of one of the three claimed forms. We now prove that, in case (ii), Nπ̂ (H) = Cπ̂ (H). Indeed, Nπ̂ (H) 1M 1M 1M preserves the fixed subtree of Cπ̂ (H), and so if H fixes a unique edge, 1M Nπ̂ (H) is contained in an edge stabilizer, hence is abelian, and so Nπ̂ (H) = 1M 1M (H). Cπ̂ 1M We now have enough information to construct a map φ. To start with, it will only be a map of abstract, unoriented graphs. Lemma 4.10. Consider closed, orientable, irreducible 3-manifolds M, M ′ , ̂ ̂′ and let f ∶ π 1 M → π1 M be an isomorphism. Then there exists an f equivariant morphism of graphs φ ∶ T̂M → T̂M ′ . Note that, here, we only claim that φ is a map of abstract, non-oriented graphs. This map may in principle send edges to either edges or vertices. ̂ ̂ ̂ ̂ Proof. For brevity, we write G = π 1 M and S = TM ′ , and let G act on S via ̂ 2 . Let u1 , u2 be the adjacent f . Let e be an edge of T̂M with stabilizer Ge ≅ Z 15 vertices of T̂M . Lemmas 4.4, 4.5 and 4.6 together guarantee the existence of unique vertices v1 , v2 of Ŝ such that Gui ⊆ Gvi for both i. We claim that v1 and v2 are either equal or adjacent. Suppose therefore that v1 , v2 are at distance greater than 2 (possibly infinite). Then Ge stabilizes the geodesic [v1 , v2 ] (see [ZM88, Cor 2.9]) and therefore, by Lemma 4.9, v1 , v2 are at distance precisely two, are both adjacent to a minor vertex w, and CG (Ge ) is properly contained in NG (Ge ). Therefore, by Lemma 4.9, e is adjacent to a minor vertex; without loss of generality, we may assume that u1 is major, Gu1 ⊆ Gv1 , and that u2 is minor and Gu2 ⊆ Gv2 . But Gw also normalizes Ge , so Gw ⊆ Gu2 ⊆ Gv2 . This implies that Gw stabilizes an edge, which is absurd because edge stabilizers are abelian. Therefore, v1 and v2 are either equal or adjacent. If they are equal to a vertex v, we set φ(e) = v. If they are adjacent, we set φ(e) to be the image of the unique edge joining ̂ which is them. This completes the construction of the map φ ∶ T̂M → S, equivariant by construction. We are now ready to complete the proof of the main theorem. Proof of Theorem 4.3. Applying Lemma 4.10 twice, we obtain maps of graphs φ ∶ T̂M → T̂M ′ , ψ ∶ T̂M ′ → T̂M , where φ is f -equivariant and ψ is f −1 -equivariant. Equivariance implies that gψ ○ φ(x) = ψ ○ φ(gx) ̂ ̂ for all g ∈ π 1 M and x ∈ TM , whence the stabilizer of x is contained in the stabilizer of ψ ○ φ(x). Since vertex-stabilizers stabilize unique vertices, it follows that ψ○φ is equal to the identity on vertices, and hence on the whole of T̂M . In particular, φ and ψ induce isomorphisms of the finite quotient graphs ̂ ̂ ̂ ′ ̂′ π 1 M/TM and π1 M /TM ; we may therefore choose consistent orientations on these graphs, which lift to equivariant orientations on the profinite trees T̂M and T̂M ′ , which are respected by φ and ψ; this also implies continuity of φ and ψ. References [AFW15] Matthias Aschenbrenner, Stefan Friedl, and Henry Wilton. 3manifold groups. Series of Lecture Notes in Mathematics. European Mathematical Society (EMS), Zürich, 2015. 16 [Ago13] Ian Agol. The virtual Haken conjecture. Doc. Math., 18:1045– 1087, 2013. With an appendix by Agol, Daniel Groves, and Jason Manning. [BCR16] M. R. Bridson, M. D. E. Conder, and A. W. Reid. Determining Fuchsian groups by their finite quotients. Israel J. Math., 214(1):1–41, 2016. [BF15] Michel Boileau and Stefan Friedl. The profinite completion of 3-manifold groups, fiberedness and the Thurston norm. arXiv:1505.07799, 2015. [BR15] Martin R. Bridson and Alan W. Reid. Profinite rigidity, fibering, and the figure-eight knot. arXiv:1505.07886v1, 2015. [BRW16] Martin R. Bridson, Alan W. Reid, and Henry Wilton. Profinite rigidity and surface bundles over the circle. arXiv:1610.02410, 2016. [Cav12] Will Cavendish. Finite-Sheeted Covering Spaces and Solenoids over 3-manifolds. ProQuest LLC, Ann Arbor, MI, 2012. Thesis (Ph.D.)–Princeton University. [CB13] Owen Cotton-Barratt. Detecting ends of residually finite groups in profinite completions. Math. Proc. Cambridge Philos. Soc., 155(3):379–389, 2013. [CZ13] S. C. Chagas and P. A. Zalesskii. Hereditary conjugacy separability of free products with amalgamation. J. Pure Appl. Algebra, 217(4):598–607, 2013. [DD89] Warren Dicks and M. J. Dunwoody. Groups acting on graphs, volume 17 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, 1989. [Dic80] Warren Dicks. Groups, trees and projective modules, volume 790 of Lecture Notes in Mathematics. Springer, Berlin, 1980. [FR90] Benjamin Fine and Gerhard Rosenberger. Conjugacy separability of fuchsian groups and related questions. In Combinatorial group theory (College Park, MD, 1988), volume 109 of Contemp. Math., pages 11–18. Amer. Math. Soc., Providence, RI, 1990. 17 [Fun13] Louis Funar. Torus bundles not distinguished by TQFT invariants. Geom. Topol., 17(4):2289–2344, 2013. With an appendix by Funar and Andrei Rapinchuk. [GJZZ08] F. Grunewald, A. Jaikin-Zapirain, and P. A. Zalesskii. Cohomological goodness and the profinite completion of Bianchi groups. Duke Math. J., 144(1):53–72, 2008. [GPS80] F. J. Grunewald, P. F. Pickel, and D. Segal. Polycyclic groups with isomorphic finite quotients. Ann. of Math. (2), 111(1):155– 195, 1980. [Hem14] John Hempel. Some 3-manifold groups with the same finite quotients. arXiv:1409.3509, 2014. [HWZ13] Emily Hamilton, Henry Wilton, and Pavel A. Zalesskii. Separability of double cosets and conjugacy classes in 3-manifold groups. J. Lond. Math. Soc. (2), 87(1):269–288, 2013. [KR88] P. H. Kropholler and M. A. Roller. Splittings of Poincaré duality groups. II. J. London Math. Soc. (2), 38(3):410–420, 1988. [KZ08] Dessislava H. Kochloukova and Pavel A. Zalesskii. Profinite and pro-p completions of Poincaré duality groups of dimension 3. Trans. Amer. Math. Soc., 360(4):1927–1949, 2008. [Min12] Ashot Minasyan. Hereditary conjugacy separability of rightangled Artin groups and its applications. Groups Geom. Dyn., 6(2):335–388, 2012. [NS07] Nikolay Nikolov and Dan Segal. On finitely generated profinite groups. I. Strong completeness and uniform bounds. Ann. of Math. (2), 165(1):171–238, 2007. [RZ10] Luis Ribes and Pavel Zalesskii. Profinite groups, volume 40 of Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics [Results in Mathematics and Related Areas. 3rd Series. A Series of Modern Surveys in Mathematics]. Springer-Verlag, Berlin, second edition, 2010. 18 [Sco78] Peter Scott. Subgroups of surface groups are almost geometric. Journal of the London Mathematical Society. Second Series, 17(3):555–565, 1978. [Sco85] Peter Scott. Correction to: “Subgroups of surface groups are almost geometric”. J. London Math. Soc. (2), 32(2):217–220, 1985. [Ser97] Jean-Pierre Serre. Galois cohomology. Springer-Verlag, Berlin, 1997. Translated from the French by Patrick Ion and revised by the author. [Str77] R. Strebel. A remark on subgroups of infinite index in Poincaré duality groups. Comment. Math. Helv., 52(3):317–324, 1977. [SW00] Peter Symonds and Thomas Weigel. Cohomology of p-adic analytic groups. In New horizons in pro-p groups, volume 184 of Progr. Math., pages 349–410. Birkhäuser Boston, Boston, MA, 2000. [Uek17] Jun Ueki. The profinite completions of knot groups determine the Alexander polynomials. arXiv:1702.03836, 2017. [Wil16] Gareth Wilkes. Profinite detection of JSJ decompositions of 3manifolds. arXiv:1605.08244, 2016. [Wil17] Gareth Wilkes. Profinite Properties of 3-Manifold Groups. PhD thesis, University of Oxford, 2017. [Wilar] Gareth Wilkes. Profinite rigidity for Seifert fibre spaces. Geom. Dedicata, to appear. [Wis12] D. T. Wise. The structure of groups with a quasi-convex hierarchy. Preprint, http://goo.gl/3ctNvX, April 2012. [WZ10] Henry Wilton and Pavel Zalesskii. Profinite properties of graph manifolds. Geometriae Dedicata, 147(1):29—45, 2010. [WZ17] Henry Wilton and Pavel Zalesskii. Distinguishing geometries using finite quotients. Geom. Topol., 21(1):345–384, 2017. 19 [Zal89] P. A. Zalesskii. Geometric characterization of free constructions of profinite groups. Akademiya Nauk SSSR. Sibirskoe Otdelenie. Sibirskii Matematicheskii Zhurnal, 30(2):73–84, 226, 1989. [Zal90] P. A. Zalesskii. Profinite groups, without free nonabelian pro-p-subgroups, that act on trees. Matematicheskii Sbornik, 181(1):57–67, 1990. [Zal92] P. A. Zalesskiı̆. Open subgroups of free profinite products. In Proceedings of the International Conference on Algebra, Part 1 (Novosibirsk, 1989), volume 131 of Contemp. Math., pages 473– 491. Amer. Math. Soc., Providence, RI, 1992. [ZM88] P. A. Zalesskii and O. V. Mel’nikov. Subgroups of profinite groups acting on trees. Matematicheskii Sbornik, 135(177)(4):419—439, 1988. [ZM89] P. A. Zalesskii and O. V. Mel’nikov. Fundamental groups of graphs of profinite groups. Algebra i Analiz, 1(4):117—135, 1989. 20
4math.GR
Generating Contradictory, Neutral, and Entailing Sentences Yikang Shen * 1 Shawn Tan * 1 Chin-Wei Huang * 1 Aaron Courville 1 arXiv:1803.02710v1 [cs.CL] 7 Mar 2018 Abstract Learning distributed sentence representations remains an interesting problem in the field of Natural Language Processing (NLP). We want to learn a model that approximates the conditional latent space over the representations of a logical antecedent of the given statement. In our paper, we propose an approach to generating sentences, conditioned on an input sentence and a logical inference label. We do this by modeling the different possibilities for the output sentence as a distribution over the latent representation, which we train using an adversarial objective. We evaluate the model using two state-of-the-art models for the Recognizing Textual Entailment (RTE) task, and measure the BLEU scores against the actual sentences as a probe for the diversity of sentences produced by our model. The experiment results show that, given our framework, we have clear ways to improve the quality and diversity of generated sentences. 1. Introduction Algorithms designed to learn distributed sentence representations have been shown to be transferable across a range of tasks (Mou et al., 2016) and languages (Tiedemann, 2018). For example, Guu et al. (2017) proposed to represent sentences as vectors that encode a notion similarity between sentence pairs, and showed that vector manipulations of the representation can result in meaningful change in semantics. The question we would like to explore is whether the semantic relationship between sentence pairs can be modeled in a more explicit manner. More specifically, we want to model the logical relationship between sentences. Controlling the logical relationship between sentences has many direct applications. First of all, we can use it to provide a more clear definition of paraphrasing. To do so, we * Equal contribution 1 Department of Computation, Université de Montréal, Montréal, Canada. Correspondence to: Yikang Shen <[email protected]>, Shawn Tan <[email protected]>, ChinWei Huang <[email protected]>. require two simultaneous conditions: (i) that the input sentence entails the output sentence; and (ii) that the output sentence entails the input sentence. (S ENTENCE 1 |= S ENTENCE 2) ∧ (S ENTENCE 2 |= S ENTENCE 1) (1) The first requirement ensures the output sentence cannot be false if the input sentence is true, so that the output sentence can be considered a fact expressed by the input sentence. The second requirement ensures that the output contains at least the input’s information. The two requirements together can be used to define semantic equivalence between sentence. Another interesting application is multi-document summarization. Traditionally, to summarize multiple documents, one would expect the model to abstract the most important part of the source documents, and this is usually measured by the amount of overlap that the output document has with the inputs. Informally, one finds the maximal amount of information that has the highest precision with each source document. Alternatively, if one wants to automate news aggregation, the ideal summary would need to contain the same number of facts as are contained in the union of all source documents. We can think of this second objective as requiring that the output document entail every single sentence across all source documents. In this paper, we propose an approach to generating sentences, conditioned on an input sentence and a logical inference label. We do this by modeling the different possibilities for the output sentence as a distribution over the latent representation, which we train using an adversarial objective. In particular, we differ from the usual adversarial training on text by using a differentiable global representation. Architecture-wise, we also propose a Memory Operation Selection Module (MOSM) for encoding a sentence into a vector representation. Finally, we evaluate the quality and the diversity of our samples. The rest of the paper is organized as follows: Sec. 2 will cover the related literature. Sec. 3 will detail the proposed model architecture, and Sec. 4 will describe and analyze the experiments run. Sec. 5 will then discuss the implications of being able to solve this task well, and the future research directions relating to this work. Finally, we conclude in Sec. Generating Contradictory, Neutral, and Entailing Sentences 6. η z φ 2. Related Work Many natural language tasks require reasoning capabiliities. The Recognising Textual Entailment (RTE) task requires the system to determine if the premise and hypothesis pair are (i) an entailment, (ii) contradicting each other or (iii) neutral to each other. The Natural language Inference (NLI) Task from Bowman et al. (2015a) introduces a large dataset with labeled pairs of sentences and their corresponding logical relationship. This dataset allows us to quantify how well current systems are able to be trained to recognise sentences with those relationships. Examples of the current state-ofthe-art for this task include Chen et al. (2017) and Gong et al. (2017). Here we are interested in generating natural language that satisfies the given textual entailment class. Kolesnyk et al. (2016) has attempted this using only sentences from the entailment class, and focusing on generating a hypothesis given the premise. Going in this direction results in removal of information from the premise sentence. In this paper, we focus on going in the other direciton: generating a premise from a hypothesis. This requires adding additional details to the premise which have to make sense in context. In order to produce sentences with extra details and without some other details, we suggest that a natural way to model this kind of structure is to impose a distribution over an intermediate distribution representing the semantic space of the premise sentence. In the realm of learning representations for sentences, Kiros et al. (2015) has a popular method for learning representations called “skip-thought” vectors. These are trained by using the encoded sentence to predict the previous and next sentence in a passage. Conneau et al. (2017) specifically learned sentence representations from the SNLI dataset. They claim that using the supervised data from SNLI can outperform “skip-thought” representations on different tasks. There have also been several efforts towards learning a distribution over sentence embeddings. Bowman et al. (2015b) used Variational Autoencoders (VAEs) to learn Gaussian distributed word embeddings. Hu et al. (2017) use a combined VAE/GAN objective to produce a disentangled representation that can be used to modify some attributes like sentiment and tense. There have also been forays into conditional distributions for sentences – which is what is required here. Both Gupta et al. (2017) and Guu et al. (2017) introduce models of the form p(x|z, x0 ), where x is a paraphrase of x0 , and z represents the variability in the output sentence. Guu et al. (2017) introduces z as an edit vector. However, because z has to be paired with x0 in order to generate the sentence, z serves a ` Figure 1. The conceptual graphical model behind the formulation of our model. The red arrow represents the inference path from φ to z. very different purpose, and cannot be considered a sentence embedding in its own right. Ideally, what we want is a distribution over sentence representations, each one mapping to a set of semantically similar sentences. This is important if we want the distribution to model the possibilities of concepts that correspond to the right textual entailment with the hypothesis. 3. Method Some approaches map a sentence to a distribution in the embedding space (Bowman et al., 2015b). The assumption when doing this is that there is some uncertainty over the latent space when mapping from the sentence. Some approaches, like Hu et al. (2017) attempt to disentangle factors in the learnt latent variable space, so that modifying each dimension in the latent representation modifies sentiment or tense in the original sentence. If we consider plausible premise sentences φ given a hypothesis η and an inference label `, there are many possible solutions, of varying likelihoods. We can model this probabilistically as p(φ|η, `). In our model, we assume an underlying latent variable z that accounts for the variation in possible output sentences, Z p(φ|η, `) = p(φ|z)p(z|η, `)dz Another assumption we make is that given φ, z is independent of η and `. The resulting graphical model associated with the above dependency assumptions are depicted in Figure 1. In our proposed model, we take inspiration from the Adversarial Autoencoder (Makhzani et al., 2015), however our prior is conditioned on η and `. Zhang et al. (2017) also proposed a Conditional Adversarial Autoencoder for age progression prediction. In addition to the adversarial discriminator, our model includes a classifier on the representation and the hypothesis and label. A similar framework is also discussed in Salimans et al. (2016). Generating Contradictory, Neutral, and Entailing Sentences Prior We draw a sample, conditioned on (η, `), through the prior, which is described using following equations: hη1 , ..., hη|η| = RNNenc (xη1 , ..., xη|η| ) (7) h̃t = MLP([hηt , e` , ]) (8) ĥ1 , ..., ĥ|η| = RNNrefine (h̃1 , ..., h̃|η| ) (9) z Figure 2. The architecture of the model. The autoencoder maps given premise φ to a sentence representation z, and reconstructs φ from z. Samples are drawn from the prior conditioned on η and `. The classifier takes z and η as input, and outputs probability of l. The discriminator takes z, η and l as input, and predicts whether z is given by the autoencoder or the prior. = fcompress (ĥ1 , ..., ĥ|η| ) (10) where  is a random vector, i ∼ N (0, 1); e` is the label embedding and [·, ·] represents the concatenation of input vectors. Classifier This outputs the probability distribution over labels, taking as input the tuple (z, η), and is described using the following equations: hη1 , ..., hη|η| = RNNenc (xη1 , ..., xη|η| ) (11) 3.1. Architecture ct = The model consists of an encoder q(z|φ), a conditional prior, p(z|η, `), a decoder p(φ|z), and a discriminator D(z, η, `). h̃t = fretrieve (z, hηt ) MLP([hηt , ct , ||hηt ĥ1 , ..., ĥ|η| = RNNrefine (h̃1 , ..., h̃|η| ) (14) ĥmax = Poolingmax (ĥ1 , ..., ĥ|η| ) (15) ĥmean = Poolingmean (ĥ1 , ..., ĥ|η| ) (16) Autoencoder The autoencoder comprises of two parts. An encoder that maps the given premise φ to a sentence representation z, and a decoder that reconstructs φ from a given z. In our model, the encoder reads the input premise φ φ = (xφ 1 , ..., x|φ| ) using an RNN network: φ φ φ hφ 1 , ..., h|φ| = RNNenc (x1 , ..., x|φ| ) (2) φ z = fcompress (hφ 1 , ..., h|φ| ) (3) and where ht ∈ Rn is a hidden state at time t. z is a vector generated from sequence of the hidden states. We will call fcompress (·) the compression function. The decoder is trained to predict the next word x0t given the sentence representation z and all the previously predicted words (x01 , ..., x0t−1 ). With an RNN, the conditional probability distribution of x0t is modeled as: p(x0t |x01 , ..., x0t−1 , z) = g(st , ct ) (4) and s1 , ..., s|φ| = RNNdec (x01 , ..., x0|φ| ) (5) ct = fretrieve (z, st ) (6) where g(·) is a nonlinear, potentially multi-layered, function that outputs the probability of x0t , st is the hidden state of decoder RNN, and fretrieval takes st as the key to retrieve related information from z. We note that other architectures such as a CNN or a transformer (Vaswani et al., 2017) can be used in place of the RNN. The details of the compression function and retrieval function will be discussed in Sec. 3.2. p(`|z, η) (12) − ct ||, hηt = σ(MLP([ĥmax , ĥmean ])) ct ]) (13) (17) where Pooling(·) refers to an element-wise pooling operator, and the activation function σ for output layer is the softmax function. The architecture of the classifier is inspired by (Chen et al., 2017). Instead of doing attention over the sequence of hidden states for the premise, we use the retrieval function in Equation 12 to retrieve related information ct in z for hηt . Discriminator The discriminator takes as input (z, η, `), and tries to determine if the z in question comes from the encoder or prior. The architecture of the discriminator is similar to that of the classifier, with the exception that Equation 13 is replaced by: h̃t = MLP([hηt , ct , e` ]) (18) to pass label information to the discriminator. The sigmoid function is used as the activation for the output layer. In our model the autoencoder, prior and classifier share the same RNNenc (·) parameters. The prior and the autoencoder share the same fcompress (·) parameters. The classifier and the autoencoder share the same fretrieve (·) parameters. The discriminator does not share any parameters with the rest of model. 3.2. Compression and Retrieval Functions The compression (Equation 3) and retrieval (Equation 6) functions can be modeled through many different mechanisms. Here, we introduce two different methods: Generating Contradictory, Neutral, and Entailing Sentences Retrieval functions use {st } as control vectors to retrieve information from z. Since the layer generates a different weight matrix for the feedforward path for different st , we can output different o for the same z. 3.3. Model Learning Like most adversarial networks, the conditional adversarial autoencoder is trained with a gradient descent based method in two phases: the generative phase and the discriminative phase. Figure 3. Memory Operation Selection Module takes a pair of vector (k, v) as input, output a vector o. k provide the control signal for the layer to compute a weighted sum of candidate weight matrices. The obtained matrix is used as the weight matrix in a normal feedforward layer, that takes v as input and outputs o. Mean Pooling can be used to compress the sequence of the hidden states: fcompress (h1 , ..., hT ) = T 1X ht T t=1 Lauxiliary = (20) Memory Operation Selection Module (MOSM) As an alternative to mean pooling, we use the architecture shown in Figure 3. A layer is defined as: γ W̃ = = softmax(Ωk) N W X γi Wi (21) (22) i=1 o = σ(W̃v) In our initial experiments, we found that the samples from just the adversarial training alone results in wildly varied output sentences. To ameliorate this, we propose an auxiliary loss: (19) and its retrieve counterpart directly returns z: fretrieve (z, st ) = z In the generative phase, the autoencoder is updated to minimize the reconstruction error of the premise. The classifier and the encoder are updated to minimize the classification error of the premise-hypothesis pair. The prior is also updated to optimize the classification error of p(`|z, η), where z is draw from the prior. The encoder and the prior are updated to confuse the discriminator. min {NLL(φ|zi )} , i∈(1,...,N ) zi ∼ p(z|η, `) (26) where N is the number of samples that are drawn from prior. The auxiliary loss measures how far our generated premises are from the true premise when conditioned on the hypothesis and label. As shown in experiment the model has better generating diversity, while more samples were drawn during training. One can view this auxiliary loss as a ‘hard’ version of taking the log average of the probability of N Monte-Carlo samples, (23) where σ can be any activation function, v is the input vector, k is the control vector, {Wi } are NW candidate weight matrices. For convenience, we denote the MOSM function as fMOSM (v, k). − log Ep(z|η,`) [p(φ|z)] ≈ − log N 1 X p(φ|zi ), N i (27) zi ∼ p(z|η, `) (28) N Thus, we can define the MOSM compression method as: ! T 1X fMOSM (ht , ht ) fcompress (h1 , ..., hT ) = tanh T t=1 (24) The compression function uses {ht } as both control and input vector, to write themselves into z. Because different ht s select different combinations of candidate matrices, we can have different mapping function each different ht at each time step. fretrieve (z, st ) = fMOSM (z, st ) (25) X 1 = − log − log exp log p(φ|zi ) N i (29) 1 + min − log p(φ|zi ) N i∈(1,...,N ) (30) ≤ − log Since log N1 is a constant, minimizing over the Equation 30 is the same as minimizing Equation 26. In the discriminative phase, the discriminator is updated to tell apart the true z (generated using the prior) from the generated samples (given by autoencoder). Generating Contradictory, Neutral, and Entailing Sentences 4. Experiments We use the Stanford Natural Language Inference (SNLI) corpus (Bowman et al., 2015a) to train and evaluate our models. From our experiments, we want to determine two things. First, do the sentences produced by the model form the correct textual entailment class on which it was conditioned on? Second, is there diversity among the sentences that are generated? Table 1. Classification accuracies for different state-of-the-art models on our samples. The row labeled R ANDOM we randomly permuted the premises of the original test set and ran them through the classifiers to test for the models’ reliance on just the hypothesis for classification. 4.1. Baseline Methods For comparison, we use a normal RNN encoder-decoder as a baseline method. The model uses a bidirectional LSTM network as encoder. The encoder reads the input hypothesis into a sequence of hidden states {ht }: hη1 , .., hη|η| zη = RNNenc (xη1 , .., xη|η| ) (31) = fcompress (hη1 , .., hη|η| ) (32) Where fcompress (·) can be the mean method or an MOSM. The distributed representation of label e` and zη are concatenated together to feed into a normal MLP network, which output the sentence representation z: z = MLP([zη , e` ]) (33) The decoder compute the conditional probability distribution with equations: p(x0t |x01 , ..., x0t−1 ) = g([st , z]) (34) RNNdec (x0t−1 , st−1 ) (35) st = Thus, the baseline model share a similar architecture with prior and decoder in our model, while the randomness been toke out. 4.2. Experiment Settings For all models, RNNenc and RNNrefine are 2-layers bidirectional LSTM (Hochreiter & Schmidhuber, 1997), RNNdec are 2-layers uni-directional LSTM. The dimension of hidden state, embeddings and latent representation z are 300. When training, optimization is performed with Adam using learning rate lr = 0.001, β1 = 0, β2 = 0.999 and σ = 10−8 . We carry out gradient clipping with maximum norm 1.0. We train each model for 30 epoch. For each iteration, we randomly choose to run the generative phase or discriminative phase with probability 0.5 : 0.5. Since we didn’t observe significant benefit from using Beam Search, all premises are generated using greedy search. 4.3. Quality Evaluation In order to evaluate the quality of the samples from our model, we trained two state-of-the-art models for SNLI: (1) M ODEL DIIN ESIM R ANDOM 42.7% 41.1% BASELINE (M EAN ) BASELINE (MOSM) 59.6% 62.7% 59.6% 62.6% MOSM (N=1, - CLASSIFIER ) MOSM (- AUXILIARY LOSS ) 67.2% 63.2% 67.3% 60.6% M EAN (N=1) M EAN (N=10) MOSM (N=1) MOSM (N=10) 64.4% 64.3% 76.1% 72.6% 62.4% 62.3% 75.9% 71.8% Densely Interactive Inference Network (DIIN)1 (Gong et al., 2017), (2) Enhanced Sequential Inference Model (ESIM)2 (Chen et al., 2017). In our experiments, we found that it is possible to achieve an accuracy of 68% on SNLI label prediction by training a classifier using only the hypothesis as input. This calls into question how much the classification models rely on just the hypothesis for performing its task. To investigate this phenomena further, we randomly permuted the premises of the original test set and passed these new (random) permishypothesis pairs to the classifiers. The results are shown in the row labelled R ANDOM in Table 1. We were satisfied that at 42.7% and 41.1%, the classification models (both DIIN and ESIM) were not relying entirely on the hypothesis for prediction. We sampled 9845 hypotheses from the test set, and produced φ for each example with the given `. The (η, φ, `) triplet was then passed to the classifiers and evaluated for accuracy. Both classification models perform at ∼88% accuracy, but, while they were not perfect, they provided a good probe for how well our models were generating the required sentences. Table 1 shows the accuracy of prediction on the respective models. Both the DIIN and ESIM models give similar results. Our results show that using the MOSM gives an improvement over just taking the mean. Using the adversarial training also results in some gains, which suggests that training the model with the ‘awareness’ of the distribution over the representation space results in better quality samples. Us1 https://github.com/YichenGong/Densely-InteractiveInference-Network 2 https://github.com/lukecq1231/nli Generating Contradictory, Neutral, and Entailing Sentences Table 2. The confusion matrix for the samples from the best model MOSM (N = 1) L ABEL \P RED . E NTAILMENT N EUTRAL C ONTRADICTION E NT. N EUT. C ONT. 67.8% 6.6% 2.9% 20.9% 76.7% 12.8% 11.4% 16.7% 84.4% ing the adversarial training in conjunction with the MOSM layer gives us the model with the best performance. We also performed ablation tests, removing certain components of the model from the training to see how it affects the quality of samples. The difference between our best model against MOSM (N = 1, - CLASSIFIER ) suggests that the classifier plays in important role in ensuring z is a representation in the right class. In our experiment removing the auxiliary loss, we still achieve an accuracy ∼61%. However, looking at the samples for this iteration of the model, while having some concepts in common with the hypothesis, the sentences in general are more nonsensical in comparison to those trained with the auxiliary loss (See an example in Figure 6). The confusion matrix produced when evaluating our best model (MOSM, N = 1) on DIIN shows us where the classification model and our generative model agree (See Table 2). In our R ANDOM experiments, we find that the model has a bias towards predicting contradictions. This is observed here as well, with contradictions being the category with the highest agreement. We therefore cannot conclude that contradictions are easier for our model to generate. Also, using the original test set, the category in which DIIN performs the best is entailment, with a precision of 89.1% compared to 84.3% for neutral and 88.4% for contradiction. This suggests that generating suitable premises that entail the hypothesis is the hardest task for the model. We also want to study how the classifier component of our model affects the generation of good samples. As shown in Figure 4, “Z precision” is higher then 0.9. This suggests that the classifier provides a strong regularization signal to the sentence representation z. Because the autoencoder is not perfect, we do not observe the the same sample classification precision after z is decoded. However, we still observe a synchronous improvement of both sample and valid precision. It is therefore reasonable to expect that a better classifier and a better autoencoder would result in better generated premises. 4.4. Diversity Evaluation In order to evaluate the diversity of samples given by our model, we compute the BLEU score between to premises Figure 4. Different classification precisions given by our classifier in our model (MOSM, N=10) during training. Sample Precision shows the probability that classifier predicts correct label for generated premise and related real hypothesis. Valid precision shows the probability that classifier predicts correct label for real premise and real hypothesis. Z precision shows the probability that the feedforward network fclassifier (z, zη ) predicts correct label `, for given η, ` and z drawn from prior p(z|η, `). generated conditioned on the same hypothesis and label. In other words, given a triple (φi , η i , `i ) from test set, we draw two different samples (zi1 , zi2 ) from the prior distribution p(z|η i , `i ). Then the decoder generates two premises (φi1 , φi2 ) using greedy search conditioned on (zi1 , zi2 ) respectively. The similarity score between generated premises is then estimated by: BLEUi = 1 (BLEU(zi1 , zi2 ) + BLEU(zi2 , zi1 )) . (36) 2 For comparison, we also compute the BLEU score between real premise and generated premise (φi , φi1 ). The average of diversity score between two generated premises is noted as BLEUSS , the one between real and generated premises is noted as BLEURS . Since it is not necessary have n-gram match between premises, BLEU score can be inaccurate on some data points. We employ the Smoothing technique 2 described in Chen & Cherry (2014). As shown in Table 3, when we increase the number of samples N in the auxiliary loss, the diversity of samples increases for both mean pooling and MOSM. This can serve as empirical evidence that the diversity of our model can be controlled by choosing a different hyper-parameter N . The higher BLEURS given by MOSM method could be interpreted as real premise is more close to the center of mass of prior distribution. We also observe a gap between BLEURS and BLEUSS . The gap shows that the sampled premise is still relatively similar between themselves. After Generating Contradictory, Neutral, and Entailing Sentences Table 3. BLEU score for different models S AMPLES FROM MOSM (N=10) H: a worker stands over a bread display . L: Entailment S1: a man in a blue shirt is preparing food in a kitchen . S2: a man in a blue shirt is washing a window . BLEURS BLEUSS BASELINE (M EAN ) BASELINE (MOSM) 14.4 14.7 N/A N/A MOSM (N=1, - CLASSIFIER ) MOSM (- AUXILIARY LOSS ) 14.4 10.3 46.7 14.8 H: there is a jockey riding a horse . L: Entailment S1: a horse rider on a bucking horse . S2: a jockey riding a horse in a rodeo . M EAN (N=1) M EAN (N=10) MOSM (N=1) MOSM (N=10) 11.9 11.3 14.2 13.2 27.9 17.3 38.9 22.5 H: a man sitting on the couch reading a book . L: Contradiction S1: a man is sitting on a bench with his hands in his pockets . S2: a man in a blue shirt is standing in front of a store . M ODEL H: a baby in his stroller outside . L: Contradiction S1: a woman is sitting on a bench next to a baby . S2: a woman is sitting on a bench in a park . H: the man is being watched . L: Neutral S1: a man jumps from a bridge for an elderly couple at a beach . S2: a man in a blue shirt is standing in front of a building . H: there is a human selling hot dogs . L: Neutral S1: a person is standing in front of a food cart . S2: a woman in a white shirt is standing in front of a counter selling food . S AMPLES FROM MOSM (- AUXILIARY LOSS ) H: a restaurant prepares for a busy day . L: Neutral S1: a pink teenager prepares on a tune on the roots . S2: a UNK restaurant dryer for a canvas . Figure 5. Visualization of the effect of auxiliary loss with multiple samples. For a pair of (φ, η), we repeat 100 times the process of compute auxiliary loss (N=10) in Equation 26. Blue points represent zi selected by minimum function, green points represent zi that are not selected. Our model (MOSM, N=10) is used for computing z and perplexities. t-SNE is used to visualize highdimensional data (Maaten & Hinton, 2008). removing the classifier, we observe an increase in BLEUSS . One possible explanation is that classifier prevents the prior from overfitting the training data. We observe an decrease in both BLEU scores, after removing the auxiliary loss. However, Table 1 and Figure 6 shows that removing auxiliary loss give low quality samples. While the auxiliary loss is essential for the prior and the decoder to learn to cooperate, using an auxiliary loss where (N = 1) will collapse the prior distribution; instead of a distribution, the prior will learn to ignore the random input and deterministically predict z. As shown in Figure 5, the auxiliary loss (N = 10) only passes gradients to the zs in the left region of the distribution. As a result, samples drawn from right region have a significant lower chance receive gradient from decoder, while the entire region receives gra- Figure 6. Example sentence generated by our model (MOSM, N=10). H is the hypothesis, L is the label, S1 is the first sample, and S2 is the second sample. The samples shown below the line are drawn from a model trained without the auxiliary loss. dients from the discriminator and classifier. Therefore, the prior distribution can expand to more regions, but only those regulated by discriminator and classifier. This will increase the diversity of samples. However, we also observe that the precision slightly decreases in Table 1. This suggests that the discriminator and classifier in our model are not perfect for regularizing the prior distribution. 4.5. Samples Figure 6 shows several examples generated by our model (MOSM, N=10). These example shows that our model can generate a variety of different premise while keep the correct semantic relation. Some of subjects in hypothesis are correctly replace by synonyms (e.g. “jocky” is replaced by “horse rider”, “human” is replaced by “person” and “woman”). The model also get some potential logical relation correct (e.g. “reading a book” is contradicted by “with Generating Contradictory, Neutral, and Entailing Sentences his hands in his pockets”, “stands over a bread display” can either means “washing a window” or “preparing food in a kitchen”). However, we also observe that the model tries to add “a blue shirt” for most “man”s in the sentences, which is one of the easiest way to add extra information into the model. The phenomenon aligned with well-known model collapse failure case for most adversarial training based method. This observation give an explanation for the relatively higher BLEU between sample. The model also have some bias while generating premise (e.g. when hypothesis mention “a baby”, the premise automatically mention “a woman”), which aligns with the recent discovery that visual recognition tasks model tend to output biased predictions (Zhao et al., 2017). 5. Discussion The broader vision of our project is to attain logical control for language, which we believe will allow us to perform better across many natural language applications. This is most easily achieved at the word-level, by adding or removing specific words to a sentence, using word generation rules based on language-specific grammars. However, just as distributed word representations can be meaningfully combined (Mikolov et al., 2013) with good outcomes, we believe that sentence-level representations are the way forward for manipulation of text. The kind of control we seek to model, specifically, is characterized by the logical relationships between sentence pairs. Controlling semantic representation by modeling logical relationship between the input and output sentences has many potential use cases. Returning to the task of multidocument summarization discussed in the introduction, operating in the semantic space allows one to abstract the information of a document. Controlling the logical relationships among sentences provides a new way to think about what a summary is. Ideally, when multiple sources of information are given, we would like the output summary φ generated by a machine to be entailable by the union of inputs (∪j∈J η j ) |= φ 3 . This addresses the problem of precision: the resulting summary now has a subset of the information available in the union of all the given hypotheses. To address the problem of recall, we need the resulting summary to entail each one of the individual hypotheses: ∧i (φ |= η j ) Together, these two criteria form a clear formal definition for multi-document summarization, { φ : ∧i (φ |= η j ) ∧ (∪j∈J η j ) |= φ } which represents the set of all possible φ that fit the criteria. 3 Here we assume there are no conflicting details. In our paper, we toyed with the possibility of modeling the set { φ : φ |= η } by training a model with a distribution over different premises in the latent space z. A good subsequent step would be modelling the first part of our logical description of multi-document summarisation, { φ : ∧i∈J (φ |= η j ) } = ∩i∈J { φ : φ |= η j } This suggests a possible avenue for producing such a premise is finding the intersection of the distribution over z for two given hypotheses that are likely enough to occur. Future work can explore the possibility of this and determining the union of the hypotheses entailing the given premise. 6. Conclusion We have proposed a model that generates premises from hypotheses with an intermediate latent space, which we interpret as different possible premises for a given hypothesis. This was trained using a Conditional Adversarial Autoencoder. This paper also proposed the Memory Operation Selection Module for encoding sentences to a distributed representation that uses attention over different operations in order to encode the input. The model was evaluated for quality and diversity. In terms of quality, we used two stateof-the-art models for the RTE task on SNLI, and the samples generated by our best model were able to achieve an accuracy of 76.1%. For diversity, we compared the BLEU scores between the real premises and the generated premises, and the BLEU scores between the generated premises. In this regard, while our model is able to generate different premises for each hypothesis, there is still a gap between when compared to the similarities to the real premises. Looking at the samples, we note that the additional details that our model generates tend to repeat, and correspond to some type of mode collapse. The task of performing reasoning well with natural language still remains a challenging problem. Our experiments demonstrate that while we can generate sentences with the logical entailment properties we desire, there is still much to be done in this direction. We hope with the new lens on some NLP tasks as natural language manipulation with logical control, new perspectives and methods will emerge to improve the field. References Bowman, Samuel R., Angeli, Gabor, Potts, Christopher, and Manning, Christopher D. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics, 2015a. Bowman, Samuel R, Vilnis, Luke, Vinyals, Oriol, Dai, An- Generating Contradictory, Neutral, and Entailing Sentences drew M, Jozefowicz, Rafal, and Bengio, Samy. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015b. Chen, Boxing and Cherry, Colin. A systematic comparison of smoothing techniques for sentence-level bleu. In Proceedings of the Ninth Workshop on Statistical Machine Translation, 2014. Chen, Qian, Zhu, Xiaodan, Ling, Zhen-Hua, Wei, Si, Jiang, Hui, and Inkpen, Diana. Enhanced lstm for natural language inference. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, 2017. Conneau, Alexis, Kiela, Douwe, Schwenk, Holger, Barrault, Loic, and Bordes, Antoine. Supervised learning of universal sentence representations from natural language inference data. arXiv preprint arXiv:1705.02364, 2017. Gong, Yichen, Luo, Heng, and Zhang, Jian. Natural language inference over interaction space. arXiv preprint arXiv:1709.04348, 2017. Gupta, Ankush, Agarwal, Arvind, Singh, Prawaan, and Rai, Piyush. A deep generative framework for paraphrase generation. arXiv preprint arXiv:1709.05074, 2017. Guu, Kelvin, Hashimoto, Tatsunori B, Oren, Yonatan, and Liang, Percy. Generating sentences by editing prototypes. arXiv preprint arXiv:1709.08878, 2017. Hochreiter, Sepp and Schmidhuber, Jürgen. Long short-term memory. Neural computation, 1997. Hu, Zhiting, Yang, Zichao, Liang, Xiaodan, Salakhutdinov, Ruslan, and Xing, Eric P. Toward controlled generation of text. In International Conference on Machine Learning, 2017. Kiros, Ryan, Zhu, Yukun, Salakhutdinov, Ruslan R, Zemel, Richard, Urtasun, Raquel, Torralba, Antonio, and Fidler, Sanja. Skip-thought vectors. In Advances in neural information processing systems, 2015. Kolesnyk, Vladyslav, Rocktäschel, Tim, and Riedel, Sebastian. Generating natural language inference chains. arXiv preprint arXiv:1606.01404, 2016. Maaten, Laurens van der and Hinton, Geoffrey. Visualizing data using t-sne. Journal of machine learning research, 2008. Makhzani, Alireza, Shlens, Jonathon, Jaitly, Navdeep, Goodfellow, Ian, and Frey, Brendan. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015. Mikolov, Tomas, Sutskever, Ilya, Chen, Kai, Corrado, Greg S, and Dean, Jeff. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, 2013. Mou, Lili, Meng, Zhao, Yan, Rui, Li, Ge, Xu, Yan, Zhang, Lu, and Jin, Zhi. How transferable are neural networks in nlp applications? arXiv preprint arXiv:1603.06111, 2016. Salimans, Tim, Goodfellow, Ian, Zaremba, Wojciech, Cheung, Vicki, Radford, Alec, and Chen, Xi. Improved techniques for training gans. In Advances in Neural Information Processing Systems, 2016. Tiedemann, Jrg. Emerging language spaces learned from massively multilingual corpora. arXiv preprint arXiv:1802.00273, 2018. Vaswani, Ashish, Shazeer, Noam, Parmar, Niki, Uszkoreit, Jakob, Jones, Llion, Gomez, Aidan N, Kaiser, Łukasz, and Polosukhin, Illia. Attention is all you need. In Advances in Neural Information Processing Systems, 2017. Zhang, Zhifei, Song, Yang, and Qi, Hairong. Age progression/regression by conditional adversarial autoencoder. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, 2017. Zhao, Jieyu, Wang, Tianlu, Yatskar, Mark, Ordonez, Vicente, and Chang, Kai-Wei. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. arXiv preprint arXiv:1707.09457, 2017.
2cs.AI
1 Information-Theoretic Privacy for Smart Metering Systems with a Rechargeable Battery arXiv:1510.07170v4 [cs.IT] 15 Sep 2017 Simon Li, Ashish Khisti, and Aditya Mahajan Abstract—Smart-metering systems report electricity usage of a user to the utility provider on almost real-time basis. This could leak private information about the user to the utility provider. In this work we investigate the use of a rechargeable battery in order to provide privacy to the user. We assume that the user load sequence is a first-order Markov process, the battery satisfies ideal charge conservation, and that privacy is measured using normalized mutual information (leakage rate) between the user load and the battery output. We study the optimal battery charging policy that minimizes the leakage rate among the class of battery policies that satisfy causality and charge conservation. We propose a series reductions on the original problem and ultimately recast it as a Markov Decision Process (MDP) that can be solved using a dynamic program. In the special case of i.i.d. demand, we explicitly characterize the optimal policy and show that the associated leakage rate can be expressed as a single-letter mutual information expression. In this case we show that the optimal charging policy admits an intuitive interpretation of preserving a certain invariance property of the state. Interestingly an alternative proof of optimality can be provided that does not rely on the MDP approach, but is based on purely information theoretic reductions. I. I NTRODUCTION Smart meters are a critical part of modern power distribution systems because they provide fine-grained power consumption measurements to utility providers. These fine-grained measurements improve the efficiency of the power grid by enabling services such as time-of-use pricing and demand response [1]. However, this promise of improved efficiency is accompanied by a risk of privacy loss. It is possible for the utility provider— or an eavesdropper—to infer private information including load taxonomy from the fine-grained measurements provided by smart meters [2]–[4]. Such private information could be exploited by third parties for the purpose of targeted advertisement or surveillance. Traditional techniques in which an intermediary anonymizes the data [5] are also prone to privacy loss to an eavesdropper. One possible solution is to partially obscure the load profile by using a rechargeable battery [6]. As the cost of rechargeable batteries decreases (for example, due to proliferation of electric vehicles), using them for improving privacy is becoming economically viable. Simon Li was with the University of Toronto when this work was done. Ashish Khisti ([email protected]) is with the University of Toronto, Toronto, ON, Canada. Aditya Mahajan ([email protected]) is with McGill University, Montreal, QC, Canada. Preliminary version of this work was presented at the Signal Processing for Advanced Wireless Communications (SPAWC), Jul. 2015, Stockholm, Sweden, International Zurich Seminar (IZS), Mar. 2-4, 2016, Zurich, Switzerland and the American Control Conference (ACC), July 6-8, 2016, Boston, MA, USA. In a smart metering system with a rechargeable battery, the energy consumed from the power grid may either be less than the user’s demand—the rest being supplied by the battery; or may be more than the user’s demand—the excess being stored in the battery. A rechargeable battery provides privacy because the power consumed from the grid (rather than the user’s demand) gets reported to the electricity utility (and potentially observed by an eavesdropper). In this paper, we focus on the mutual information between the user’s demand and consumption (i.e., the information leakage) as the privacy metric. Mutual Information is a widely used metric in the literature on information theoretic security, as it is often analytically tractable and provides a fundamental bound on the probability of detecting the true load sequence from the observation [7]. Our objective is to identify a battery management policy (which determine how much energy to store or discharge from the battery) to minimize the information leakage rate. We briefly review the relevant literature. The use of a rechargeable battery for providing user privacy has been studied in several recent works, e.g., [6], [8]–[11]. Most of the existing literature has focused on evaluating the information leakage rate of specific battery management policies. These include the “best-effort” policy [6], which tries to maintain a constant consumption level, whenever possible; and battery conditioned stochastic charging policies [8], in which the conditional distribution on the current consumption depends only on the current battery state (or on the current battery state and the current demand). In [6], the information leakage rate was estimated using Monte-Carlo simulations; in [8], it was calculated using the BCJR algorithm [12]. The methodology of [8] was extended by [9] to include models with energy harvesting and allowing for a certain amount of energy waste. Bounds on the performance of the best-effort policy and hideand-store policy for models with energy harvesting and infinite battery capacity were obtained in [10]. The performance of the best effort algorithm for an individual privacy metric was considered in [11]. None of these papers address the question of choosing the optimal battery management policy. Rate-distortion type approaches have also been used to study privacy-utility trade-off [13]–[15]. These models allow the user to report a distorted version of the load to the utility provider, subject to a certain average distortion constraint. Our setup differs from these works as we impose a constraint on the instantaneous energy stored in the battery due to its limited capacity. Both our techniques and the qualitative nature of the results are different from these papers. Our contributions are two-fold. First, when the demand is Markov, we show that the minimum information leakage rate 2 and optimal battery management policies can be obtained by solving an appropriate dynamic program. These results are similar in spirit to the dynamic programs obtained to compute capacity of channels with memory [16]–[18]; however, the specific details are different due to the constraint on the battery state. Second, when the demand is i.i.d., we obtain a single letter characterization of the minimum information leakage rate; this expression also gives the optimal battery management policy. We prove the single letter expression in two steps. On the achievability side we propose a class of policies with a specific structure that enables a considerable simplification of the leakage-rate expression. We find a policy that minimizes the leakage-rate within this restricted class. On the converse side, we obtain lower bounds on the minimal leakage rate and show that these lower bound match the performance of the best structured policy. We provide two proofs. One is based on the dynamic program and the other is based purely on information theoretic arguments. After the present work was completed, we became aware of [19], where a similar dynamic programming framework is presented for the infinite horizon case. However, no explicit solutions of the dynamic program are derived in [19]. To the best of our knowledge, the present paper is the first work that provides an explicit characterization of the optimal leakage rate and the associated policy for i.i.d. demand. A. Notation Random variables are denoted by uppercase letters (X, Y , etc.), their realization by corresponding lowercase letters (x, y, etc.), and their state space by corresponding script letters (X , Y, etc.). PX denotes the space of probability distributions on X ; PX|Y denotes the space of condition distributions from Y to X . Xab is a short hand for (Xa , Xa+1 , . . . , Xb ) and X b = X1b . For a set A, 1A (x) denotes the indicator function of the set that equals 1 if x ∈ A and zero otherwise. If A is a singleton set {a}, we use 1a (x) instead of 1{a} (x). Given random variables (X, Y ) with joint distribution PX,Y (x, y) = PX (x)q(y|x), H(X) and H(PX ) denote the entropy of X, H(Y |X) and H(q|PX ) denote conditional entropy of Y given X and I(X; Y ) and I(q; PX ) denote the mutual information between X and Y . II. P ROBLEM F ORMULATION AND M AIN R ESULTS A. Model and problem formulation Consider a smart metering system as shown in Fig. 1. At each time, the energy consumed from the power grid must equal the user’s demand plus the additional energy that is either stored in or drawn from the battery. Let {Xt }t≥1 , Xt ∈ X , denote the user’s demand; {Yt }t≥1 , Yt ∈ Y, denote the energy drawn from the grid; and {St }t≥1 , St ∈ S, denote the energy stored in the battery. All alphabets are finite. For convenience, we assume X := {0, 1, . . . , mx }, Y := {0, 1, . . . , my }, and S = {0, 1, . . . , ms }. Here ms corresponds to the size of the battery. We note that such a restriction is for simplicity of presentation; the results generalize even when X and Y are not necessarily contiguous intervals or integer valued. To Home Applicances Demand: 𝑋𝑡 Consumption: 𝑌𝑡 Smart Meter Controller Power Grid 𝑌𝑡 − 𝑋 𝑡 Battery (State 𝑆𝑡 ) Eavesdropper/ Adversory Fig. 1. A smart metering system. guarantee that user’s demand is always satisfied, we assume mx ≤ my or that X ⊆ Y holds more generally. The demand {Xt }t≥1 is a first-order time-homogeneous Markov chain1 with transition probability Q. We assume that Q is irreducible and aperiodic. The initial state X1 is distributed according to probability mass function PX1 . The initial charge S1 of the battery is independent of {Xt }t≥1 and distributed according to probability mass function PS1 . The battery is assumed to be ideal and has no conversion losses or other inefficiencies. Therefore, the following conservation equation must be satisfied at all times: St+1 = St + Yt − Xt . (1) Given the history of demand, battery charge, and consumption, a randomized battery charging policy q = (q1 , q2 , . . . ) determines the energy consumed from the grid. In particular, given the histories (xt , st , y t−1 ) of demand, battery charge, and consumption at time t, the probability that current consumption Yt equals y is qt (y | xt , st , y t−1 ). For a randomized charging policy to be feasible, it must satisfy the conservation equation (1). So, given the current power demand and battery charge (xt , st ), the feasible values of grid consumption are defined by Y◦ (st − xt ) = {y ∈ Y : st − xt + y ∈ S}. (2) Thus, we require that qt (Y◦ (st − xt ) | xt , st , y t−1 ) := X qt (y | xt , st , y t−1 ) = 1. y∈Y◦ (st −xt ) The set of all such feasible policies is denoted by QA 2 . Note that while the charging policy qt (·) can be a function of the entire history, the support of qt (·) only depends on the present value of xt and st through the difference st − xt . This is emphasized in the definition in (2). The quality of a charging policy depends on the amount of information leaked under that policy. There are different notions of privacy; in this paper, we use mutual information as a measure of privacy. Intuitively speaking, given random variables (Y, Z), the mutual information I(Y ; Z) measures 1 In practice, the energy demand is periodic rather than time homogeneous. We are assuming that the total demand may be split into a periodic predictable component and a time-homogeneous stochastic component. In this paper, we ignore the predictable component because it does not affect privacy. 2 With a slight abuse of notation, we use Q to denote the battery policy A for both the infinite and finite-horizon problems 3 the decrease in the uncertainty about Y given by Z (or viceversa). Therefore, given a policy q, the information about (X T , S1 ) leaked to the utility provider or eavesdropper is captured by I q (X T , S1 ; Y T ), where the mutual information is evaluated according to the joint probability distribution on (X T , S T , Y T ) induced by the distribution q as follows: 𝑥 = 0/𝑦 = 0 𝑥 = 0/𝑦 = 0 𝑥 = 0/𝑦 = 1 𝑠=0 𝑠=1 𝑥 = 1/𝑦 = 0 Pq (S T = sT , X T = xT , Y T = y T ) 𝑥 = 1/𝑦 = 1 𝑥 = 1/𝑦 = 1 T  Y = PS1 (s1 )PX1 (x1 )q1 (y1 | x1 , s1 ) 1st {st−1 −xt−1 +yt−1 } Fig. 2. Binary System model. The battery can be either in s = 0 or s = 1. The set of feasible transitions from each state are shown in the figure. t=2  × Q(xt |xt−1 )qt (yt | xt , st , y t−1 ) . B. Example: Binary Model We use information leakage rate as a measure of the We illustrate the special case when X = Y = S = {0, 1} quality of a charging policy. For a finite planning horizon, the in Fig. 2. The input, output, as well as the state, are all information leakage rate of a policy q = (q1 , . . . , qT ) ∈ QA binary valued. When the battery is in state st = 0, there is given by are three possible transitions. If the input xt = 1 then we 1 q T T (3) must select yt = 1 and the state changes to st+1 = 0. If LT (q) := I (X , S1 ; Y ), T instead xt = 0, then there are two possibilities. We can select while for an infinite horizon, the worst-case information leak- yt = 0 and have st+1 = 0 or we can select yt = 1 and have st+1 = 1. In a similar fashion there are three possible age rate of a policy q = (q1 , q2 , . . . ) ∈ QA is given by transitions from the state st = 1 as shown in Fig. 2. We will L∞ (q) := lim sup LT (q). (4) assume that the demand (input) sequence is sampled i.i.d. from T →∞ an equiprobable distribution, i.e., PX (0) = PX (1) = 12 . We are interested in the following optimization problems: Consider a simple policy that sets yt = xt and ignores the Problem A. Given the alphabet X of the demand, the initial battery state. It is clear that such a policy will lead to maximum distribution PX1 and the transistion matrix Q of the demand leakage LT = 1. Another feasible policy is to set yt = 1 − st . process, the alphabet S of the battery, the initial distribution Thus whenever st = 0, we will set yt = 1 regardless of the PS1 of the battery state, and the alphabet Y of the consump- value of xt , and likewise st = 1 will result in yt = 0. It turns out that the leakage rate for this policy also approaches 1. To tion: T 1) For a finite planning horizon T , find a battery charging see this note thatT the eavesdropper having access to y also s . Using the battery update equation (1) the policy q = (q1 , . . . , qT ) ∈ QA that minimizes the in turn knows T −1 sequence x is thus revealed to the eavesdropper, resulting leakage rate LT (q) given by (3). in a leakage rate of at least 1 − 1/T . 2) For an infinite planning horizon, find a battery charging In reference [8], a probabilistic battery charging policy is policy q = (q1 , q2 , . . . ) ∈ QA that minimizes the introduced that only depends on the current state and input i.e., leakage rate L∞ (q) given by (4). ∆ qt (yt |xt , st ) = qt (yt |xt , st ). Furthermore the policy makes The above optimization problem is difficult because we equiprobable decisions between the feasible transitions i.e., have to optimize a multi-letter mutual information expression over the class of history dependent probability distributions. qt (yt = 0|xt , st ) = q(yt = 1|xt , st ) = 1/2, if xt = st (5) In the spirit of results for feedback capacity of channels with memory [16]–[18], we show that the above optimization problem can be reformulated as a Markov decision process and qt (yt |xt , st ) = 1xt (yt ) otherwise. The leakage rage for where the state and action spaces are conditional probability this policy was numerically evaluated in [8] using the BCJR distributions. Thus, the optimal policy and the optimal leakage algorithm and it was shown numerically that L∞ = 0.5. Such rate can be computed by solving an appropriate dynamic numerical techniques seem necessary in general even for the program. We then provide an explicit solution of the dynamic class of memoryless policies and i.i.d. inputs, as the presence of the battery adds memory into the system. program for the case of i.i.d. demand. As a consequence of our main result it follows that the Remark 1. We note that the class of policies we consider in above policy admits a single-letter expression for the leakage QA are randomized policies i.e., the output at any given time rate3 L∞ = I(S ∗ − X; X), thus circumventing the need for is governed by the conditional distribution qt (yt | xt , st , y t−1 ). numerical techniques. Furthermore it also follows that this The class of deterministic policies where yt = ht (xt , st , y t−1 ) leakage rate is indeed the minimum possible one among the is a deterministic function of the past inputs, state and outputs class of all feasible policies. Thus it is not necessary for the is a special case of randomized policies where qt (·) is an battery system to use more complex policies that take into atomic distribution. As will be apparent from out results, deterministic policies do not suffice to minimize the leakage 3 The random variable S ∗ is an equiprobable binary valued random variable, rate and hence we focus on the class of randomized policies. independent of X. See Sec. II-E. 4 account the entire history. We note that a similar result was shown in [20] for the case of finite horizon policies. However the proof in [20] is specific to the binary model. In the present paper we provide a complete single-letter solution to the case of general i.i.d. demand, and a dynamic programming method for the case of first-order Markovian demands, as discussed next. C. Main results for Markovian demand We identify two structural simplifications for the battery charging policies. First, we show (see Proposition 1 in Section III-A) that there is no loss of optimality in restricting attention to charging policies of the form qt (yt |xt , st , y t−1 ). (6) The intuition is that under such a policy, observing y t gives partial information only about (xt , st ) rather than about the whole history (xt , st ). Next, we identify a sufficient statistic for y t−1 when the charging policies are of the form (6). For that matter, given a policy q and any realization y t−1 of Y t−1 , define the belief state πt ∈ PX,S as follows: for all x ∈ X , s ∈ S, πt (x, s) = Pq (Xt = x, St = s|Y t−1 = y t−1 ). (7) Then, we show (see Theorems 1 and 2 below) that there is no loss of optimality in restricting attention to charging policies of the form qt (yt |xt , st , πt ). (8) where the function ϕ is a non-linear filtering equation defined in Sec. III-C. Our main results are the following: Theorem 1. We have the following for Problem A with a finite planning horizon T : 1) Value functions: Iteratively define value functions Vt : PX,S → R as follows. For any π ∈ PX,S , VT +1 (π) = 0, and for t ∈ {T, . . . , 1}, Vt (π) = min[Ba Vt+1 ](π), a∈A ∀(x, s) ∈ X × S . (9) The set A is convex and compact.4 To succinctly write the dynamic program, for any a ∈ A, we define the Bellman operator Ba : [PX,S → R] → [PX,S → R] as follows: for any V : PX,S → R and any π ∈ PX,S , [Ba V ](π) = I(a; π) X + π(x, s)a(y | x, s)V (ϕ(π, y, a)) (10) x∈X ,s∈S, y∈Y 4 If a , a ∈ A, then any linear combination a0 of them, where a0 = 1 2 λa1 + (1 − λ)a2 with λ ∈ (0, 1), also satisfies a0 (Y◦ (s − x | x, s) = 1 for all (x, s) ∈ X × S and, therefore, belongs to A. Hence A is convex. Moreover, it is easy to see that A is closed and PY |X,s is compact. Therefore, A is also compact. (11) Then, Vt (π) are is continuous and concave in π. 2) Optimal policy: Let ft∗ (π) denote the arg min of the right hand side of (11). Then, optimal policy q∗ = (q1∗ , . . . , qT∗ ) is given by qt∗ (yt | xt , st , πt ) = at (yt | xt , st ), where at = ft∗ (πt ). Thus, there is no loss of optimality in restricting attention to charging policies of the form (8). 3) Optimal leakage rate: The optimal (finite horizon) leakage rate is given by V1 (π1 )/T , where π1 (x, s) = PX1 (x)PS1 (s). See Section III for proof. Theorem 2. We have the following for Problem A with an infinite planning horizon: 1) Value function: Consider the following fixed point equation J + v(π) = min[Ba v](π), a∈A Such a charging policy is Markovian in the belief state πt and the optimal policies of such form can be searched using a dynamic program. To describe such a dynamic program, we assume that there is a decision maker that observes y t−1 (or equivalently πt ) and chooses “actions” at = qt (·|·, ·, πt ) using some decision rule at = ft (πt ). We then identify a dynamic program to choose the optimal decision rules. Note that the actions at take vales in a subset A of PY |X,S given by  A = a ∈ PY |X,S : a(Y◦ (s − x) | x, s) = 1, ∀π ∈ PX,S . ∀π ∈ PX,S , (12) where J ∈ R is a constant and v : PX,S → R. 2) Optimal policy: Suppose there exists (J, v) that satisfy (12). Let f ∗ (π) denote the arg min of the right hand side of (12). Then, the time-homogeneous optimal policy q∗ = (q ∗ , q ∗ , . . . ) given by q ∗ (yt | xt , st , πt ) = a(yt | xt , st ), where a = f ∗ (π) is optimal. Thus, there is no loss of optimality in restricting attention to charging time-homogeneous policies of the form (8). 3) Optimal leakage rate: The optimal (infinite horizon) leakage rate is given by J. Proof. Given the result of Theorem 1, the result of Theorem 2 follows from standard dynamic programming arguments. See, for example, [21, Theorem 5.2.4 and Eq. (5.2.18)]. There are various conditions that guarantee the existence of a (J, v) that satisfies (12). Most of these conditions require the ergodicity of the process {Πt }t≥1 for every standary Markov procily f : PX,S → A. We refer the reader to [22, Chapter 3] and [23, Chapter 10] for more details. The dynamic program above resembles the dynamic program for partially observable Markov decision processes (POMDP) (see [24, Chapter 5]) with hidden state (Xt , St ), observation Yt , and action At . However, in contrast to POMDPs, the expected per-step cost I(a; π) is not linear in π. Nonetheless, one could use computational techniques from POMDPs 5 to approximately solve the dynamic programs of Theorems 1 and 2. See Section III-D for a brief discussion. E. Binary Model (Revisited) Remark 2. Although the above results assume that the demand is a first-order Markov chain, they extend naturally to the case when the demand is higher-order Markov. In particular, suppose the demand {Xt }t≥1 is a k-th order Markov chain. Then, we can define another process {X̃t }t≥1 where X̃t = (Xt−k+1 , . . . , Xt ), and use X̃t in Theorems 1 and 2. We revisit the binary model in Section II-B, where the demand has equiprobable distribution, i.e., PX (x) = 12 for x ∈ {0, 1}. Consider θ(0) = p, θ(1) = 1−p. Let W = S −X. Then,  1  if w = −1  2 p, 1 P(W = w) = 2 , (17) if w = 0  1 (1 − p), if w = 1. 2 D. Main result for i.i.d. demand Thus, Assume the following: I(W ; X) = H(W ) − H(S) = 1 − 21 h(p) Assumption (A). The demand {Xt }t≥1 is i.i.d. with probability distribution PX . We provide an explicit characterization of optimal policy and optimal leakage rate for this case. Define an auxiliary state variable Wt = St − Xt that takes values in W = {s − x : s ∈ S, x ∈ X }. For any w ∈ W, define: D(w) = {(x, s) ∈ X × S : s − x = w}. (13) Theorem 3. Define θ∈PS θ∈PS (14) where X and S are independent with X ∼ PX and S ∼ ∗ θ. arg min in (14). Define ξ ∗ (w) = P Let θ denote the ∗ (x,s)∈D(w) PX (x)θ (s). Then, under (A) 1) J ∗ is the optimal (infinite horizon) leakage rate. 2) Define b∗ ∈ PY |W as follows: ( ∗ if y ∈ X ∩ Y◦ (w) PX (y) θ ξ(y+w) ∗ (w) ∗ b (y|w) = 0 otherwise . (15) We call b∗ as a structured policy with respect to (θ∗ , ξ ∗ ). Then, the memoryless charging policy q∗ = (q1∗ , q2∗ , . . . ) given by qt∗ (y | x, s, πt ) = b∗ (y | s − x) h(p) = −p log p − (1 − p) log(1 − p). Thus, the value of p that minimizes I(W ; X) is p∗ = 12 and the optimal leakage rate is I(W ; X) = 21 . The corresponding ξ ∗ is obtained by substituting p = 12 in (17). For ease of notation, we denote b∗ (·|w) as [b∗ (0|w), b∗ (1|w)]. Then, b∗ (·| − 1) = [0, 1], Then, we have the following.  J ∗ = min I(S −X; X) = min H(S − X) − H(S) where h(p) is the binary entropy function: (16) is optimal and achieves the optimal (infinite horizon) leakage rate. Note that the optimal charging policy is time-invariant and memoryless, i.e., the distribution on Yt does not depend on πt (and, therefore on y t−1 ). The proof, which is presented in Section IV, is based on the standard arguments of showing achievability and a converse. On the achievability side we show that the policy in (15) belongs to a class of policies that satisfies a certain invariance property. Using this property the multi-letter mutual information expression can be reduced into a single-letter expression. For the converse we provide two proofs. The first is based on a simplification of the dynamic program of Theorem 2. The second is based on purely probabilistic and information theoretic arguments. b∗ (·|0) = [ 12 , 21 ], b∗ (·| − 1) = [1, 0]. It can be shown that this strategy is the same as (5), which was proposed in [8]. This yields an analytical proof of the result in [8]. F. Salient features of the result for i.i.d. demand Theorem 3 shows that even if consumption could take larger values than the demand, i.e., Y ⊃ X , under the optimal policy, Yt takes values only in X . This agrees with the intuition that a consumption larger that mx reveals that the battery has low charge and that the power demand is high. In extreme cases, a large consumption may completely reveal the battery and power usage thereby increasing the information leakage. We now show some other properties of the optimal policy. Property 1. The mutual information I(S − X; X) is strictly convex in the distribution θ and, therefore, θ∗ ∈ int(PS ). See Appendix A for proof. As a consequence, the optimal θ∗ in (14) may be obtained using the Blahut-Arimoto algorithm [25], [26]. Property 2. Under the battery charging policy specified in Theorem 3, the power consumption {Yt }t≥1 is i.i.d. with marginal distribution PX . Thus, {Yt }t≥1 is statistically indistinguishable from {Xt }t≥1 . See Remarks 3 and 5 in Section IV-B for proof. Property 3. If the power demand has a symmetric PMF, i.e., for any x ∈ X , PX (x) = PX (mx − x), then the optimal θ∗ in Theorem 3 is also symmetric, i.e., for any s ∈ S, θ∗ (s) = θ∗ (ms − s). Proof. For θ ∈ PS , define θ̄(s) = θ(ms − s). Let X ∼ PX , S ∼ θ and S̄ ∼ θ̄. Then, by symmetry I(S − X; X) = I(S̄ − X; X). (18) 6 For any λ ∈ (0, 1), let θλ (s) = λθ(s) + (1 − λ)θ̄(s) denote the convex combination of θ and θ̄. Let Sλ ∼ θλ . By Property 1, if θ 6= θ̄, then Leakage Rates for Binomial Distributed Power Demand 1 10 Jeq for mx = 5 J* for mx = 5 Jeq for mx = 10 I(Sλ − X; X) < λI(S − X; X) + (1 − λ)I(S − X; X) J* for mx = 10 0 = I(S − X; X), 10 Leakage Rate where the last equation uses (18). Thus, if θ 6= θ̄, we can strictly decrease the mutual information by using θλ . Hence, the optimal distribution must have the property that θ∗ (s) = θ∗ (ms − s). Jeq for mx = 20 J* for mx = 20 −1 10 Given a distribution µ on some alphabet M, we say that the distribution is almost symmetric and unimodal around m∗ ∈ M if −2 10 µm∗ ≥ µm∗ +1 ≥ µm∗ −1 ≥ µm∗ +2 ≥ µm∗ −2 ≥ . . . where we use the interpretation that for m 6∈ M, µm = 0. Similarly, we say that the distribution is symmetric and unimodal around m∗ ∈ M if 0 5 10 15 20 25 30 Battery Size 35 40 45 50 Fig. 3. A comparison of the performance of qeq ∈ QB as defined in (19) with the optimal leakage rate for i.i.d. Binomial distributed demand Binomial(mx , 0.5) for mx = {5, 10, 20}. µm∗ ≥ µm∗ +1 = µm∗ −1 ≥ µm∗ +2 = µm∗ −2 ≥ . . . Note that a distribution can be symmetric and unimodal only if its support is odd. Property 4. If the power demand is symmetric and unimodal around bmx /2c, then the optimal θ∗ in Theorem 3 is almost symmetric and unimodal around bms /2c. In particular, if ms is even, then ∗ θm ∗ ≥ ∗ θm ∗ +1 = ∗ θm ∗ −1 ≥ ∗ θm ∗ +2 = ∗ θm ∗ −2 ≥ ... and if ms is odd, then ∗ ∗ ∗ ∗ ∗ θm ∗ = θm∗ +1 ≥ θm∗ −1 = θm∗ +2 ≥ θm∗ −2 = . . . where m∗ = bms /2c. Proof. Let X̄ = −X. Then, I(S − X; S) = H(S − X) − H(S) = H(S + X̄) − H(S). Note that PX̄ is also symmetric and unimodal around bmx /2c. Let S ◦ and X̄ ◦ denote the random variables S − bms /2c and X̄ − bmx /2c. Then X̄ ◦ is also symmetric and unimodal around the origin and I(S − X; X) = H(S ◦ + X̄ ◦ ) − H(S ◦ ). Now given any distribution θ◦ of S ◦ , let θ+ be a permutation of θ◦ that is almost symmetric and unimodal with a positive bias around origin. Then by [27, Corollary III.2], H(PX ∗ θ◦ ) ≥ H(PX ∗ θ+ ). Thus, the optimal distribution must have the property that θ◦ = θ+ or, equivalently, θ is almost unimodal and symmetric around bms /2c. Combining this with the result of Property 3 gives the characterization of the distribution when ms is even or odd. G. Numerical Example: i.i.d. demand Suppose there are n identical devices in the house and each is on with probability p. Thus, X ∼ Binomial(n, p). We derive the optimal policy and optimal leakage rate for this scenario under the assumption that Y = X . We consider two specific examples, where we numerically solve (14). Suppose n = 6 and p = 0.5. 1) Consider S = [0:5]. Then, by numerically solving (14), we get that the optimal leakage rate J ∗ is is 0.4616 and the optimal battery charge distribution θ∗ is {0.1032, 0.1747, 0.2221, 0.2221, 0.1747, 0.1032}. 2) Consider S = [0:6]. Then, by numerically solving (14), we get that the optimal leakage rate J ∗ is is 0.3774 and the optimal battery charge distribution θ∗ is {0.0773, 0.1364, 0.1847, 0.2031, 0.1847, 0.1364, 0.0773}. Note that both results are consistent with Properties 3 and 4. We next compare the performance with the following timehomogeneous benchmark policy qeq ∈ QB : for all y ∈ Y, w ∈ W, 1Y◦ (wt ) {yt } qt (yt |wt ) = . (19) |Y◦ (wt )| This benchmark policy chooses all feasible values of Yt with equal probability. For that reason we call it equi-probably policy and denote its performance by Jeq . In Fig. 3, we compare the performance of q∗ and qeq as a function of battery sizes for different demand alphabets. Under qeq , the MDP converges to a belief state that is approximately uniform. Hence, in the low battery size regime, Jeq is close to optimal but its performance gradually worsens with increasing battery size. H. Numerical Example: Continuous Valued Alphabets Although our setup assumes discrete alphabets, it can shown that Theorem 3 can be extended to continuous alphabets under mild technical conditions assuming that the density function for X, say fX (x) exists; see [28] for details. As such we provide two achievability proofs for Theorem 3. The weak achievability in Section IV-B assumes that the distribution of the initial state S1 can be selected by the user. The strong achievability in Section IV-C assumes that the initial 7 state S1 can be arbitrary. The proof of the weak achievability extends immediately to continuous valued alphabets. Furthermore the proof of the converse based on information theoretic arguments in Section IV-E also extends to continuous valued alphabets. We provide a numerical example involving a continuous valued input. Let X = [0, 1] be continuous valued, and let fX (x) = 1 for x ∈ [0, 1]. We assume that S = [0, B] where B denotes the storage capacity. We will assume that B ≥ 2 for convenience. Following Theorem 3, it suffices to take the output alphabet to be Y = [0, 1]. Note that for W = S − X, we have that W = [−1, B] and that the support of the output for any given w is given by:   −1 ≤ w ≤ 0, [−w, 1], Y◦ (w) = [0, 1], (20) 0 ≤ w ≤ B − 1,   [0, B − w], B − 1 ≤ w ≤ B. For the achievability, we evaluate the leakage rate by selecting θ? (s) to be a uniform distribution over [0, B] and using (21). The resulting leakage rate is given by Let θ? (·) be the density function that minimizes (14) and S ? denote the random variable with this density, independent of X. Let W = S ? − X and ξ ? (w) be the associated density. Then it follows from (15) that the optimal policy is given by and thus it follows that ? b? (y|w) = θ (y + w) , ξ ? (w) y ∈ Y◦ (w). (21) Instead of computing θ? (·) numerically, which is cumbersome due to the density functions, we provide an analytical lower bound on the leakage rate. Note that the objective in (14) can be expressed as: I(S − X; X) = h(S − X) − h(S) (22) where h(·) is the differential entropy. Using the entropy power inequality [29], since S and X are independent, we have for any density fS (·) that: 22h(S−X) ≥ 22h(S) + 22h(X) , L+ = h(W ) − h(S) = h(ξ) − log2 (B) where the density ξ(w) for W  1+w   B , ξ(w) = B1 ,   B−w B , (27) = S − X is as follows: −1 ≤ w ≤ 0 0≤w ≤B−1 B−1≤w ≤B and we use that when θ(s) is a uniform density over [0, B], it follows that h(S) = log2 (B). Through straightforward computations it can be shown that h(ξ) = 1 + log2 (B) 2B ln 2 L+ = (28) 1 2B ln 2 is achievable with a uniform distribution on the state. We note that the analytical lower bound on the leakage rate in (26) decays as 1/B 2 for large B while the achievable rate decays as 1/B. It will be interesting in future to determine the structure of the optimal input distribution and study the associated leakage rate. III. P ROOF OF T HEOREM 1 One of the difficulties in obtaining a dynamic programming decomposition for Problem A is that the objective function PT is not of the form cost(state t , actiont ). We show that t=1 there is no loss of optimality to restrict attention to a class of policies QB and for any policy in QB , the mutual information may be written in an additive form. (23) where we use the fact that h(−X) = h(X). Substituting in (22) we have   1 I(S − X; X) ≥ log2 22h(S) + 22h(X) − h(S) 2   1 = log2 1 + 22h(X)−2h(S) 2   1 = log2 1 + 2−2h(S) (24) 2   1 ≥ min log2 1 + 2−2h(S) S 2   1 = log2 1 + 2−2{maxS h(S)} (25) 2   1 1 = log2 1 + 2 (26) 2 B where we use the fact that when X ∼ Unif[0, 1], we have that h(X) = 0, see e.g., [30] in (24) and the fact that the expression in (25) is decreasing in h(S). Finally in (26) we use the fact that a uniform distribution maximizes the differential entropy when S = [0, B] is fixed and the maximum value is h(S) = log2 B. A. Simplification of optimal charging policies Let QB ⊂ QA denote the set of charging policies that choose consumption xd only on the consumption history, current demand, and battery state. Thus, for q ∈ QB , at any time t, given history (xt , st , y t−1 ), the consumption Yt is y with probability qt (y | xt , st , y t−1 ). Then the joint distribution on (X T , S T , Y T ) induced by q ∈ QB is given by Pq (S T = sT , X T = xT , Y T = y T ) T  Y = PS1 (s1 )PX1 (x1 )q1 (y1 | x1 , s1 ) 1st {st−1 −xt−1 +yt−1 } t=2  × Q(xt |xt−1 )qt (yt | xt , st , y t−1 ) . Proposition 1. In Problem A, there is no loss of optimality in restricting attention to charging policies in QB . Moreover, for any q ∈ QB , the objective function takes an additive form: LT (q) = T 1X q I (Xt , St ; Yt | Y t−1 ) T t=1 8 where I q (Xt , St ; Yt | Y t−1 ) X = Pq (Xt = xt , St = st , Y t = y t ) xt ∈X ,st ∈S qt (yt | xt , st , y t−1 ) y t ∈Y t × log q . P (Yt = yt | Y t−1 = y t−1 ) See Appendix B for proof. The intuition behind why policies in QB are no worse that others in QA is as follows. For a policy in QA , observing the realization y t of Y t gives partial information about the history (xt , st ) while for a policy in QB , yt gives partial information only about the current state (xt , st ). The dependence on (xt , st ) cannot be removed because of the conservation constraint (1). Proposition 1 shows that the total cost may be written in an additive form. Next we use an approach inspired by [16]–[18] and formulate an equivalent sequential optimization problem. B. An equivalent sequential optimization problem Consider a system with state process {Xt , St }t≥1 where {Xt }t≥1 is an exogenous Markov process as before and {St }t≥1 is a controlled Markov process as specified below. At time t, a decision maker observes Y t−1 and chooses a distribution valued action At ∈ A, where A is given by (9), as follows: At = ft (Y t−1 ) (29) where f = (f1 , f2 , . . . ) is called the decision policy. Based on this action, an auxiliary variable Yt ∈ Y is chosen according to the conditional probability at (· | xt , st ) and the state St+1 evolves according to (1). At each stage, the system incurs a per-step cost given by at (yt | xt , st ) . (30) ct (xt , st , at , y t ; f ) := log f P (Yt = yt | Y t−1 = y t−1 ) The objective is to choose a policy f = (f1 , . . . , fT ) to minimize the total finite horizon cost given by " T # 1 f X t L̃T (f ) := E ct (Xt , St , At , Y ; f ) (31) T t=1 where the expectation is evaluated with respect to the probability distribution Pf induced by the decision policy f . Proposition 2. The sequential decision problem described above is equivalent to Problem A. In particular, 1) Given q = (q1 , . . . , qT ) ∈ QB , let f = (f1 , . . . , fT ) be ft (y t−1 ) = qt (· | ·, ·, y t−1 ). Thus, the probability distribution on (X T , S T , Y T ) induced by a decision policy f = (f1 , . . . , fT ) is given by Pf (S T = sT , X T = xT , Y T = y T ) = PS1 (s1 )PX1 (x1 )q1 (y1 | x1 , s1 ) T  Y 1st {st−1 −xt−1 +yt−1 } t=2  × Q(xt |xt−1 )at (yt |xt , st ) . where at = ft (y t−1 ). Under the transformations described in the Proposition, Pf and Pq are identical probability distributions. Consequently, Ef [ct (Xt , St , At , Y t ; f )] = I q (St , Xt ; Yt | Y t−1 ). Hence, LT (q) and L̃T (f ) are equivalent. Eq. (32) implies that {Xt , St }t≥1 is a controlled Markov process with control action {At }t≥1 . In the next section, we obtain a dynamic programming decomposition for this problem. For the purpose of writing the dynamic program, it is more convenient to write the policy (29) as At = ft (Y t−1 , At−1 ). (33) Note that these two representations are equivalent. Any policy of the form (29) is also a policy of the form (33) (that simply ignores At−1 ); any policy of the form (33) can be written as a policy of the form (29) by recursively substituting At in terms of Y t−1 . Since the two forms are equivalent, in the next section we assume that the policy is of the form (33). C. A dynamic programming decomposition The model described in Section III-B above is similar to a POMDP (partially observable Markov decision process): the system state (Xt , St ) is partially observed by a decision maker who chooses action At . However, in contrast to the standard cost model used in POMDPs, the per-step cost depends on the observation history and past policy. Nonetheless, if we consider the belief state as the information state, the problem can be formulated as a standard MDP. For that matter, for any realization y t−1 of past observations and any choice at−1 of past actions, define the belief state πt ∈ PX,S as follows: For s ∈ S and x ∈ X , πt (x, s) = Pf (Xt = x, St = s|Y t−1 = y t−1 , At−1 = at−1 ). If Y t−1 and At−1 are random variables, then the belief state is a PX,S -valued random variable. The belief state evolves in a state-like manner as follows. Then L̃T (f ) = LT (q). 2) Given f = (f1 , . . . , fT ), let q = (q1 , . . . , qT ) ∈ QB be Lemma 1. For any realization yt of Yt and at of At , πt+1 is given by qt (yt | xt , st , y t−1 ) = at (yt | xt , st ), where at = ft (y t−1 ). πt+1 = ϕ(πt , yt , at ) (34) Then LT (q) = L̃T (f ). t where ϕ is given by t Proof. For any history (x , s , y t t t t−1 t ), a ∈ A, and st+1 ∈ S, t t t t t P(St+1 = st+1 | X = x , S = s , Y = y , A = a ) X = 1st+1 {st + yt − xt } at (yt | xt , st ) yt ∈Y = P(St+1 = st+1 | Xt = xt , St = st , At = at ). (32) ϕ(π, y, a)(x0 , s0 ) P Q(x0 |x)a(y|x, s0 − x + y)π(x, s0 − x + y) P . = x∈X (x,s)∈X ×S a(y|x, s)π(x, s) Proof. For ease of notation, we use P(xt , st |y t−1 , at−1 ) to denote P(Xt = xt , St = st |Y t−1 = y t−1 , At−1 = at−1 ). 9 Similar interpretations hold for other expressions as well. Consider πt+1 (xt+1 , st+1 ) = P(xt+1 , st+1 |y t , at ) P(xt+1 , st+1 , yt , at |y t−1 , at−1 ) = P(yt , at |y t−1 , at−1 ) (35) Now, consider the numerator of the right hand side. P(xt+1 , st+1 , yt , at |y t−1 , at−1 ) = P(xt+1 , st+1 , yt , at |y t−1 , at−1 , πt ) X = P(xt+1 |xt )1st+1 (st + xt − yt ) x∈X ,s∈S, y∈Y (xt ,st )∈X ×S × at (yt |xt , st )1at (ft (y t−1 t−1 ,a ))πt (xt , st ) Lemma 2 implies that the objective function can be expressed in terms of the state Πt and the action At . Thus, one can use Markov decision theory [21] to identify the optimal policy. Since both the state space and the action space are continuous valued, we need to verify the standard technical conditions. Define the stochastic kernel K : PX,S × A → PX,S as follows. For any Borel subset B of PX,S and any π ∈ PX,S and a ∈ A, X π(x, s)a(y | x, s)1B {ϕ(π, y, a))}. K(B | π, a) = (36) Substituting (36) in (35) (and observing that the denominator of the right hand side of (35) is the marginal of the numerator over (xt+1 , st+1 )), we get that πt+1 can be written in terms of πt , yt and at . Note that if the term 1at (ft (y t−1 , at−1 )) is 1, it cancels from both the numerator and the denominator; if it is 0, we are conditioning on a null event in (35), so we can assign any valid distribution to the conditional probability. Note that an immediate implication of the above result is that πt depends only on (y t−1 , at−1 ) and not on the policy f . This is the main reason that we are working with a policy of the form (33) rather than (29). Lemma 2. The cost L̃T (f ) in (31) can be written as  X T 1 L̃T (f ) = E I(At ; Πt ) T t=1 where I(at ; πt ) does not depend on the policy f and is computed according to the standard formula X I(at ; πt ) = πt (x, s)at (y | x, s) x∈X ,s∈S, at (y|x, s) y∈Y × log X . πt (x̃, s̃)at (y | x̃, s̃) (x̃,s̃)∈X ×S Proof. By the law of iterated expectations, we have X  T 1 t t−1 t−1 L̃T (f ) = E E[ct (Xt , St , At , Y ; f )|Y ,A ] T t=1 (37) Now, from (30), each summand may be written as Ef [ct (Xt , St , At , Y t ; f ) | Y t−1 = y t−1 , At = at ] X = πt (x, s)at (y | x, s) x∈X ,s∈S, at (y|x, s) y∈Y × log X πt (x̃, s̃)at (y | x̃, s̃) (x̃,s̃)∈X ×S = I(at ; πt ). Thus, Ef [ct (Xt , St , Y t ; f | Y t−1 , At ] = I(At , Πt ). Substituting this back in (37), we get the result of the Lemma. Proof of Theorem 1. Lemma 1 implies that {Πt }t≥1 is a controlled Markov process with control action At . In addition, The sequential model of Sec. III-B has the following properties. 1) Based on (32), we can write the controlled dynamics of the state (Xt , St ) as follows: P(Xt+1 = x+ , St+1 = s+ | Xt = x, St = s, At = a) X = Q(x+ |x)a(y)1s+ {s + y − x}, y∈Y which is continuous in a. 2) The observations are given by P(Yt = y|Xt = x, St = s, At = a) = a(y) which is continuous in a. 3) The observations Yt are discrete. Therefore, from [22, Sec 4.4 and Lemma 4.1], we get the following: 4) The stochastic kernel K(dπ+ | π, a) is weakly continuous. In addition, the model has the following properties: 5) The action set A is compact. 6) The per-step cost I(a, π) is continuous and bounded below. (In fact, the per-step cost is also bounded above). Properties 4)–6) imply [21, Condition 3.3.3], which by [21, Theorem 3.3.5], implies the measurable selection condition [21, Assumption 3.3.1]. Under the measurable selection condtion, the “inf” in the dynamic program can be replaced by a “min”. The continuity of the value function in π follows from the continuity of the per-step cost I(a, π)and the controlled stochastic kernel K(dπ+ | π, a). The concavity of the value functions is proved in Appendix C. From standard results in Markov decision theorem (e.g., see [21, Theorem 3.2.1]), it follows that the policy given in part 2) of the theorem is optimal for the sequential model of Sec III-B. Proposition 2 implies that this policy is also optimal for Problem A. D. Remarks about numerical solution The dynamic programs of Theorems 1 and 2, both state and action spaces are distribution valued (and, therefore, subsets of Euclidean space). Although, an exact solution of the dynamic program is not possible, there are two approaches to obtain an approximate solution. The first is to treat it as a dynamic program of an MDP with continuous state and action spaces 10 and use approximate dynamic programming [24], [31]. The second is to treat it as a dynamic program for a POMDP and use point-based methods [32]. The point-based methods rely on concavity of the value function, which was established in Theorem 1. IV. P ROOF OF T HEOREM 3 We follow the standard approach and show that the proposed leakage rate is optimal by showing achievability and a converse. As a preliminary step, we first show that under assumption (A), the objective can be rewritten in a simpler but equivalent form. To show achievability, we show that the proposed optimal policy belongs to a class of policies that satisfies a certain invariance property. Using this property the multi-letter mutual information expression can be reduced into a single-letter expression. For the converse we provide two proofs: the first uses dynamic programming and the second uses purely probabilistic and information theoretic arguments. A. Simplification of the dynamic program Define Then, under Assumption (A), we can simplify the belief state πt as follows: πt (x, s) = P(Xt = x, St = s|Y t−1 = y t−1 , At−1 = at−1 ) (a) = P(Xt = x|St = s, Y t−1 = y t−1 , At−1 = at−1 ) × P(St = s | Y t−1 = y t−1 , At−1 = at−1 ) (b) = PX (x)θt (s) where (a) follows from the product rule of probability and (b) uses Assumption (A) and the definition of θt . Since πt (x, s) = PX (x)θt (s), in principle, we can simplify the dynamic program of Theorem 2 by using θt as an information state. However, for reasons that will become apparent, we provide an alternative simplification that uses an information state ξt ∈ PW . Recall that Wt = St − Xt which takes values in W = {s − x : s ∈ S, x ∈ X }. For any realization (y t−1 , at−1 ) of past observations and actions, define ξt ∈ PW as follows: for any w ∈ W, ξt (w) = P (Wt = w | Y t−1 =y t−1 t−1 ,A =a t−1 ). If Y t−1 and At−1 are random variables, then ξt is a PW valued random variable. As was the case for πt , it can be shown that ξt does not depend on the choice of the policy f . Lemma 3. Under Assumption (A), θt and ξt are related as follows: X ξt (w) = PX (x)θt (s). (38) (x,s)∈D(w) Proof. ξt (w) = Pf (Wt = w | Y t−1 = y t−1 , At−1 = at−1 ) = Pf (St − Xt = w | Y t−1 = y t−1 , At−1 = at−1 ) X = PX (x)θt (s). (x,s)∈D(w) Lemma 4. Given a ∈ A and π ∈ PX,S , define the following: P • ξ ∈ PW as ξ(w) = (x,s)∈D(w) π(x, s) • b ∈ B as follows: for all y ∈ Y, w ∈ W P (x,s)∈D(w) a(y | x, s)π(x, s) ; b(y | w) = ξ(w) • ã ∈ A as follows: for all y ∈ Y, x ∈ X , s ∈ S ã(y|x, s) = b(y|s − x). θt (s) = Pf (St = s | Y t−1 = y t−1 , At−1 = at−1 ). f Since πt (x, s) = PX (x)θt (s), Lemma 3 shows that ξt is a function of πt . We will show that we can simplify the dynamic program of Theorem 2 by using ξt as the information state instead of πt . For such a simplification to work, we would have to use charging policies of the form qt (yt |wt , y t−1 ). We establish that restricting attention to such policies is without loss of optimality. For that matter, define B as follows:  B = b ∈ PY |W : b(Y◦ (w) | w) = 1, ∀w ∈ W . (39) Then under Assumption (A), we have 1) Invariant Transitions: for any y ∈ Y, ϕ(π, y, a) = ϕ(π, y, ã). 2) Lower Cost: I(a; π) ≥ I(ã; π) = I(b; ξ). Therefore, in the sequential problem of Sec. III-B, there is no loss of optimality in restricting attention to actions b ∈ B. Proof. 1) Suppose (X, S) ∼ π and W = S − X, S+ = W + Y , X+ ∼ PX . We will compare P(S+ |Y ) when Y ∼ a(·|X, S) with when Y ∼ ã(·|X, S). Given w ∈ W and y ∈ Y, X Pa (W = w, Y = y) = a(y|x, s)π(x, s) (x,s)∈D(w) = X b(y|w)π(x, s) (x,s)∈D(w) (a) = X ã(y|x, s)π(x, s) (x,s)∈D(w) ã = P (W = w, Y = y) (40) where (a) uses that for all (x, s) ∈ D(w), s − x = w. Marginalizing (40) over W , we get that Pa (Y = y) = Pã (Y = y). Since S+ = W + Y , Eq. (40) also implies Pa (S+ = s, Y = y) = Pã (S+ = s, Y = y). Therefore, Pa (S+ = s|Y = y) = Pã (S+ = s|Y = y). 2) Let (X, S) ∼ π and W = S − X. Then W ∼ ξ. Therefore, we have I(a; π) = I a (X, S; Y ) ≥ I a (W ; Y ). where the last inequality is the data-processing inequality. Under ã, (X, S) − W − Y , therefore, I(ã; π) = I ã (X, S; Y ) = I ã (W ; Y ). Now, by construction, the joint distribution of (W, Y ) is the same under a, ã, and b. Thus, I a (W ; Y ) = I ã (W ; Y ) = I b (W ; Y ). 11 Note that I b (W ; Y ) can also be written as I(b; ξ). The result follows by combining all the above relations. Once attention is restricted to actions b ∈ B, the update of ξt may be expressed in terms of b ∈ B as follows: Lemma 5. For any realization yt of Yt and bt of Bt , ξt+1 is given by ξt+1 = ϕ̃(ξt , yt , bt ) (41) where ϕ̃ is given by ϕ̃(ξ, y, b)(w+ ) P = x∈X ,w∈W PX (x)1w+ {y + w − x}b(y | w)ξ(w) P . w∈W b(y | w)ξ(w) Proof. The proof is similar to the proof of Lemma 1. For any b ∈ B and ξ ∈ PW , let us define the Bellman operator B̃b : [PW → R] → [PW → R] as follows: for any Ṽ : PW → R and any ξ ∈ PW , X  [B̃b Ṽ ](ξ) = I(b; ξ) + ξ(w)b(y | w)Ṽ ϕ̃(ξ, y, b) . y∈Y,w∈W Theorem 4. Under assumption (A), there is no loss of optimality in restricting attention to optimal policies of the form qt (yt |wt , ξt ) in Problem A. 1) For the finite horizon case, we can identify the optimal policy q∗ = (q1∗ , . . . , qT∗ ) by iteratively defining value functions Ṽt : PW → R. For any ξ ∈ PW , ṼT +1 (ξ) = 0, and for t = T, T − 1, . . . , 1, Ṽt (ξ) = min[B̃b Ṽt+1 ](ξ). (42) b∈B Let ft◦ (ξ) denote the arg min of the right hand side of (42). Then, the optimal policy q∗ = (q1∗ , . . . , qT∗ ) is given by qt∗ (yt |wt , ξt ) = bt (yt |wt ), where bt = ft◦ (ξt ). Moreover, the optimal (finite horizon) leakage rate is given by Ṽ1 (ξ1 )/T , where ξ1 (w) = P P (x)P (s). X S 1 (x,s)∈D(w) 2) For the infinite horizon, suppose that there exists a constant J˜ ∈ R and a function ṽ : PS → R which satisfies the following fixed point equation: J˜ + ṽ(ξ) = min[B̃b ṽ](ξ), ∀ξ ∈ PW . b∈B (43) ◦ Let f (ξ) denote the arg min of the right hand side of (43). Then, the time-homogeneous policy q∗ = (q ∗ , q ∗ , . . . ) given by q ∗ (yt |wt , ξt ) = bt (yt |wt ), where bt = f ◦ (ξt ) is optimal. Moreover, the optimal (infinite horizon) leak˜ age rate is given by J. Proof. Lemma 5 implies that {ξt }t≥1 is a controlled Markov process with control action bt . Lemma 4, part 2), implies that the per-step cost can be written as X  T 1 E I(bt ; ξt ) . T t=1 Thus, by standard results in Markov decision theory [21], the optimal solution is given by the dynamic program described above. B. Weak achievability To simplify the analysis, we assume that we are free to choose the initial distribution of the state of the battery, which could be done by, for example, initially charging the battery to a random value according to that distribution. In principle, such an assumption could lead to a lower achievable leakage rate. For this reason, we call it weak achievability. In the next section, we will show achievability starting from an arbitrary initial distribution, which we call strong achievability. Definition 1 (Constant-distribution policy). A timehomogeneous policy f ◦ = (f ◦ , f ◦ , . . . ) is called a constant-distribution policy if for all ξ ∈ PW , f ◦ (ξ) is a constant. If f ◦ (ξ) = b◦ , then with a slight abuse of notation, we refer to b◦ = (b◦ , b◦ , . . . ) as a constant-distribution policy. Recall that under a constant-distribution policy b ∈ B, for any realization y t of Y t , θt and ξt are given as follows: θt (s) = P(St = s | Y t−1 = y t−1 , B t−1 = bt−1 ) ξt (w) = P(Wt = w | Y t−1 = y t−1 , B t−1 = bt−1 ). 1) Invariant Policies: We next impose an invariance property on the class of policies. Under this restriction the leakage rate expression will simplify substantially. Subsequently we will show that the optimal policy belongs to this restricted class. Definition 2 (Invariance Property). For a given distribution θ1 of the initial battery state, a constant-distribution policy b ∈ B is called an invariant policy if for all t, θt = θ1 and ξt = ξ1 , where ξ1 and θ1 satisfy (38). Remark 3. An immediate implication of the above definition is that under any invariant policy b, the conditional distribution Pb (Xt , St , Yt |Y t−1 ) is the same as the joint distribution Pb (X1 , S1 , Y1 ). Marginalizing over (X, S) we get that {Yt }t≥1 is an i.i.d. sequence. Lemma 6. If the system starts with an initial distribution θ of the battery state, and ξ and θ satisfy (38), then an invariant policy b = (b, b, . . . ) corresponding to (θ, ξ) achieves a leakage rate LT (b) = I(W1 ; Y1 ) = I(b; ξ) for any horizon T . Proof. The proof is a simple corollary of the invariance property in Definition 2. Recall from the dynamic program of Theorem 4, that the performance of any policy b = (b1 , b2 , . . . ) such that bt ∈ B, is given by X  T 1 I(bt ; ξt ) . LT (b) = E T t=1 12 Now, we start with an initial distribution ξ1 = ξ and follow the constant-distribution structured policy b = (b, b, . . . ). Therefore, by Definition 2, ξt = ξ for all t. Hence, the leakage rate under policy b is LT (b) = I(b; ξ). LT (b) = 1 T I b (St , Xt ; Yt |Y t−1 ). Pb (S2 = s2 , Y1 = y1 ) = Pb (S2 = s2 , Y1 = y1 , W1 = s2 − y1 ) = ξ1 (s2 − y1 )b(y1 |s2 − y1 ) Remark 4. Note that Lemma 6 can be easily derived independently of Theorem 4. From Proposition 1, we have that: T X of S2 and y1 of Y1 . This means that w1 = s2 − y1 . Since Y1 is chosen according to b(·|w1 ), it must be that y1 ∈ X ∩ Y◦ (w1 ). Therefore, (44) t=1 From Remark 3, we have that I b (St , Xt ; Yt |Y t−1 ) = I b (S1 , X1 ; Y1 ) = I b (W1 ; Y1 ), which immediately results in Lemma 6. For invariant policies we can express the leakage rate in the following fashion, which is useful in the proof of optimality. Lemma 7. For any invariant policy b, I b (W1 ; Y1 ) = I b (W1 ; X1 ). Proof. Consider the following sequence of simplifications: I b (W1 ; Y1 ) = H b (W1 ) − H b (W1 |Y1 ) = H b (W1 ) − H b (W1 + Y1 |Y1 ) (a) = H b (W1 ) − H b (S2 |Y1 ) (b) = H b (W1 ) − H b (S1 ) (c) = H b (W1 ) − H b (S1 |X1 ) (d) = H b (W1 ) − H b (W1 |X1 ) = I b (W1 ; X1 ). where (a) is due to the battery update equation (1); (b) is because b is an invariant ; (c) is because S1 and X1 are independent; and (d) is because S1 = W1 + X1 . 2) Structured Policy: We now introduce a class of policies that satisfy the invariance property in Def. 2. This will be then used in the proof of Theorem 3. Definition 3 (Structured Policy). Given θ ∈ PS and ξ ∈ PW , a constant-distribution policy b = (b, b, . . . ) is called a structured policy with respect to (θ, ξ) if: ( PX (y) θ(y+w) ξ(w) , y ∈ X ∩ Y◦ (w) b(y|w) = 0, otherwise. Note that it is easy to verify that the distribution b defined above is a valid conditional probability distribution. Lemma 8. For any θ ∈ PS and ξ ∈ PW , the structured policy b = (b, b, . . . ) given in Def. 3 is an invariant policy. Proof. Since (θt , ξt ) are related according to Lemma 3, in order to check whether a policy is invariant it is sufficient to check that θt = θ1 for all t. Furthermore, to check if a timehomogeneous policy is an invariant policy, it is sufficient to check that either θ2 = θ1 . Let the initial distributions (θ1 , ξ1 ) = (θ, ξ) and the system variables be defined as usual. Now consider a realization s2 = PX (y1 )θ1 (s2 ), (45) where in the last equality we use the fact that y1 ∈ X ∩ Y◦ (s2 − y1 ). Note that if y1 6∈ X ∩ Y◦ (s2 − y1 ), then Pb (S2 = s2 , Y1 = y1 ) = 0. Marginalizing over s2 , we get Pb (Y1 = y1 ) = PX (y1 ). Consequently, θ2 (s2 ) = Pb (S2 = s2 |Y1 = y1 ) = θ1 (s2 ). Hence, b is invariant as required. Remark 5. As argued in Remark 3, under any invariant policy, {Yt }t≥1 is an i.i.d. sequence. As argued in the proof of Lemma 8, for a structured policy the marginal distribution of Yt is PX . Thus, an eavesdropper cannot statistically distinguish between {Xt }t≥1 and {Yt }t≥1 . Proposition 3. Let θ∗ , ξ ∗ , and b∗ be as defined in Theorem 3. Then, 1) (θ∗ , ξ ∗ ) satisfy (38); 2) b∗ is a structured policy with respect to (θ∗ , ξ ∗ ). 3) If the system starts in the initial battery state θ∗ and follows the constant-distribution policy b∗ = (b∗ , b∗ , . . . ), the leakage rate is given by J ∗ . Thus, the performance J ∗ is achievable. Proof. The proofs of parts 1) and 2) follows from the definitions. The proof of part 3) follows from Lemmas 6 and 7. This completes the proof of the achievability of Theorem 3. C. Strong achievability Lemma 9. Assume that for any x ∈ X , PX (x) > 0. Let (θ◦ , ξ ◦ ) be a pair satisfying (38) and b◦ = (b◦ , b◦ , . . . ) be the corresponding structured policy. Assume that θ◦ ∈ int(PS ) or equivalently, for any w ∈ W and y ∈ X ∩ Y◦ (w), b◦ (y|w) > 0. Suppose the system starts in the initial state (θ1 , ξ1 ) and follows policy b◦ . Then: 1) the process {θt }≥1 converges weakly to θ◦ ; 2) the process {ξt }≥1 converges weakly to ξ ◦ ; 3) for any continuous function c : PW → R, T 1X E[c(ξt )] = c(ξ ◦ ). T →∞ T t=1 lim (46) 4) Consequently, the infinite horizon leakage rate under b◦ is L∞ (b◦ ) = I(b◦ , ξ ◦ ). Proof. The proof of parts 1) and 2) is presented in Appendix D. From 2), limt→∞ E[c(ξt )] = c(ξ ◦ ), which implies (46). Part 4) follows from part 3) by setting c(ξt ) = I(b◦ , ξt ). Proposition 1 implies that θ∗ defined in Theorem 3 lies in int(PS ). Then, by Lemma 9, the constant-distribution policy b∗ = (b∗ , b∗ , . . . ) (where b∗ is given by Theorem 3), achieves 13 the leakage rate I(b∗ , ξ ∗ ). By Lemma 7, I(b∗ , ξ ∗ ) is same as J ∗ defined in Theorem 3. Thus, J ∗ is achievable starting from any initial state (θ1 , ξ1 ). Now consider I(Wt ; Yt |Y t−1 ) = H(Wt |Y t−1 ) − H(Wt |Y t ) = H(Wt |Y t−1 ) − H(Wt + Yt |Y t ) (b) = H(Wt |Y t−1 ) − H(St+1 |Y t ) D. Dynamic programming converse (c) We provide two converses. One is based on the dynamic program of Theorem 4, which is presented in this section; the other is based purely on information theoretic arguments, which is presented in the next section. In the dynamic programming converse, we show that for J ∗ given in Theorem 3, v ∗ (ξ) = H(ξ), and any b ∈ B, J ∗ + v ∗ (ξ) ≤ [B̃b v ∗ ](ξ), ∀ξ ∈ PW , (47) Since H(ξ) is bounded, from [21, Lemma 5.2.5(b)], we get that J ∗ is a lower bound of the optimal leakage rate. To prove (47), pick any ξ ∈ PW and b ∈ B. Suppose W1 ∼ ξ, Y1 ∼ b(·|W1 ), S2 = Y1 + W1 , X2 is independent of W1 and X2 ∼ PX and W2 = S2 − X2 . Then, X [B̃b v ∗ ](ξ) = I(b; ξ) + ξ(w1 )b(y1 |w1 )v ∗ (ϕ̂(ξ, y1 , b)) = H(Wt |Y t−1 ) − H(St+1 |Y t , Xt+1 ) = H(Wt |Y t−1 ) − H(St+1 − Xt+1 |Y t , Xt+1 ) (d) = H(Wt |Y t−1 ) − H(Wt+1 |Y t , Xt+1 ) where (b) follows from (1); (c) follows because of assumption (A); and (d) also follows from (1). Substituting (51) in (50) (but expanding the last term as H(WT |Y T −1 ) − H(WT |Y T ), we get I(S1 , X T ; Y T ) ≥ = T X  t=2 T X (54) I(Wt ; Xt |Y t−1 ) − H(WT |Y T ). S̃2 ∼ θ2 (49) where (a) uses S2 = Y1 + W1 and W2 = S2 − X2; (b) uses the fact that H(A  1 |B) − H(A1 − A2 |B) ≥ minPA1 H(A1 ) − H(A1 − A2 ) for any joint distribution on (A1 , A2 , B). The equality in (49) occurs when b is an invariant policy and θ2 is same as θ∗ defined in Theorem 3. For ξ that are not equivalent to θ∗ via (38), the inequality in (49) is strict. We have shown that Eq. (47) is true. Consequently, J ∗ is a ˜ lower bound on the optimal leakage rate J. Now, we take the limit T → ∞ to obtain a lower bound to the leakage rate: 1 L∞ (q) = lim sup I(S1 , X T ; Y T ) T →∞ T   T X 1 t−1 T ≥ lim sup H(W1 ) + I(Wt ; Xt |Y ) − H(WT |Y ) T →∞ T t=2 " T # 1 X (a) t−1 = lim supT →∞ I(Wt ; Xt |Y ) T t=2 (b) ≥ min I(S − X; X) = J ∗ PS ∈PS where (a) is because the entropy of any discrete random variable is bounded and (b) follows from the fact that each term in the summation satisfies: I(Wt ; Xt |Y t−1 ) ≥ min I(S − X; X), PS ∈PS E. Information theoretic converse Consider the following inequalities: for any admissible policy q ∈ QB , we have I(S1 , X T ; Y T ) = (a) ≥ t=1 T X (56) which can be justified as follows. First note that for any policy q we have that: I(Wt ; Xt |Y t−1 ) = I(St − Xt ; Xt |Y t−1 ) depends on the joint distribution PSqt ,Xt ,Y t−1 (st , xt , y t−1 ) which factors as: I(St , Xt ; Yt |Y t−1 ) I(Wt ; Yt |Y t−1 ) (55) t=2 (a) T X (53)  − H(Wt |Y t−1 , Xt ) + H(Wt |Y t−1 ) − H(WT |Y T ) = H(W1 ) + = H(W2 |Y1 ) − H(W1 + Y1 |Y1 ) =J (52)   H(Wt |Y t−1 ) − H(Wt+1 |Y t , Xt+1 ) = H(W1 ) + (48) [B̃b v ](ξ) − v (ξ) = H(W2 |Y1 ) − H(W1 |Y1 ) θ2 ∈PS ∗ T −1 X +H(WT |Y T −1 ) − H(WT |Y T ) ∗ = H(S2 − X2 |Y1 ) − H(S2 |Y1 ) (b)   ≥ min H(S̃2 − X2 ) − H(S̃2 ) , I(Wt ; Yt |Y t−1 ) t=1 where the second equality is due to the definition of conditional entropy. Consequently, ∗ T X t=1 (w1 ,y1 )∈W×Y = I(W1 ; Y1 ) + H(W2 |Y1 ) (51) (50) t=1 where (a) follows from the fact that Wt = Xt − St is a deterministic function of (Xt , St ) and that the mutual information is non-negative. PSqt ,Xt ,Y t−1 (st , xt , y t−1 ) = PX (xt )PSqt ,Y t−1 (st , y t−1 ) (57) as Xt is sampled i.i.d. from the distribution PX (·) and from the state update equation (1), we have that St is a function of (X t−1 , Y t−1 ), and thus independent of Xt . Now note that: I(Wt ; Xt |Y t−1 ) 14 = X 2 ;X) > 0. I(W ; X) is strictly convex on PS we require d I(W dα2 Due to independence of X and S, I(W ; X) = H(W )−H(S). Therefore, I(St − Xt ; Xt |Y t−1 = y t−1 )p(y t−1 ) y t−1 ∈Y t−1 ≥ ≥ min y t−1 ∈Y t−1 I(St − Xt ; Xt |Y t−1 = y t−1 ) min min y t−1 ∈Y t−1 pS t−1 (·|y t ,Xt |Y ≥ min y t−1 ∈Y t−1 ,pS t |Y t−1 (·|y t−1 ) t−1 ) I(St − Xt ; Xt |Y t−1 = y t−1 ) I(St − Xt ; Xt |Y t−1 = y t−1 ) (58) where (58) follows from (57) so that Xt is independent of (St , Y t−1 ) and distributed according to PX (·) Since (58) is simply equivalent to minimizing over the distribution PS (·), the relation in (56) holds. This completes the proof. This shows that J ∗ is a lower bound to the minimum (infinite horizon) leakage rate. V. C ONCLUSIONS AND D ISCUSSION In this paper, we study a smart metering system that uses a rechargeable battery to partially obscure the user’s power demand. Through a series of reductions, we show that the problem of finding the best battery charging policy can be recast as a Markov decision process. Consequently, the optimal charging policies and the minimum information leakage rate are given by the solution of an appropriate dynamic program. For the case of i.i.d. demand, we provide an explicit characterization of the optimal battery policy and the leakage rate. In this special case it suffices to choose a memoryless policy where the distribution of Yt depends only on Wt . Our achievability results rely on restricting attention to a class of invariant policies. Under an invariant policy, the consumption {Yt }t≥1 is i.i.d. and the leakage rate is characterized by a single-letter mutual information expression. We then further restrict attention to what we call structured policies under which the marginal distribution of {Yt }t≥1 is PX . Thus, under the structured policies, an eavesdropper cannot statistically distinguish between {Xt }t≥1 and {Yt }t≥1 . We provide two converses; one is based on the dynamic programming argument while the other is based on a purely information theoretic argument. Extending of our MDP formulation to incorporate an additive cost, such as the price of consumption, is rather immediate. However, the approach presented in this work for explicitly characterizing the optimal leakage rate in the i.i.d. case may not immediately extend to such general cost functions. In another direction one can allow for a certain controlled wastage of energy drawn from the grid to increase privacy. It would be interesting to see how the leakage rate decreases with the wasted energy. The study of such problems, as well as finer implementation details of the proposed system, remains an interesting future direction. d [−H(S) + H(W )] dI(W ; X) = dα dαX X δ(s̃) ln θα (s̃) − PX (s − w)δ(s) ln PW (w) = s̃ w∈W,s∈S X d I(W ; X) X δ(s)2 = − 2 dα θα (s) s 2 P s̃∈S w∈W 2 PX (s̃ − w)δ(s̃) . PW (w) q p Let aw (s) = δ(s) PXθα(s−w) and bw (s) = θα(s) PX (s − w). (s) Using the Cauchy-Schwarz inequality, we can show that 2 P X d2 I(W ; X) X δ(s)2 s̃∈S aw (s̃)bw (s̃) = − dα2 θα (s) PW (w) s w∈W  P  P 2 2 X δ(s)2 X s̃∈S aw (s̃) ŝ∈S bw (ŝ) > − θα (s) PW (w) s w∈W ! X X X δ(s)2 − aw (s̃)2 = 0. = θα (s) s w∈W s̃∈S The strict inequality is because a and b cannot be linearly δ(s) dependent. To see this, observe that a(s) b(s) = θ(s)+αδ(s) cannot be equal to a constant for all s ∈ S since δ must contain negative as well as positive elements. A PPENDIX B P ROOF OF P ROPOSITION 1 The proof of Proposition 1 relies on the following intermediate results (which are proved later): Lemma B.1. For any q ∈ QA , q T T I (S1 , X ; Y ) ≥ T X I q (Xt , St ; Yt |Y t−1 ) t=1 with equality if and only if q ∈ QB . Lemma B.2. For any qa ∈ QA , there exists a qb ∈ QB , such that T X t=1 I qa (Xt , St ; Yt |Y t−1 ) = T X I qb (Xt , St ; Yt |Y t−1 ). t=1 Combining Lemmas B.1 and B.2, we get that for any qa ∈ QA , there exists a qb ∈ QB such that A PPENDIX A P ROOF OF P ROPERTY 1 I qa (S1 , X T ; Y T ) ≥ I qb (S1 , X T ; Y T ). PFor any θ ∈ int(PS ) and δ(s) : S → R such that s∈S δ(s) = 0. Let θα (s) := θ(s) + αδ(s). Then for small enough α, θα ∈ PS . Given such a θα , let PW,X (w, x) = PW |X (w|x)PX (x) = θα (w + x)PX (x). Then to show that Therefore there is no loss of optimality in restricting attention to charging policies in QB . Furthermore, Lemma B.1 shows that for any q ∈ QB , LT (q) takes the additive form as given in the statement of the proposition. 15 Proof of Lemma B.1. For any q ∈ QA , we have (a) n X (b) t=1 n X I q (S1 , X n ; Y n ) = = (c) ≥ t=1 n X A PPENDIX C P ROOF OF CONCAVITY OF THE VALUE FUNCTION I q (S1 , X t ; Yt |Y t−1 ) q t t I (X , S ; Yt |Y q I (Xt , St ; Yt |Y t−1 t−1 To prove the result, we show the following: Lemma C.1. For any action a ∈ A, if V : PX,S → R is concave, then Ba V is concave on PX,S . ) The concavity of the value functions follows from backward induction. VT +1 is a constant and, therefore, also concave. Lemma C.1 implies that VT , VT −1 , . . . , V1 are concave. ) t=1 where (a) uses the chain rule of mutual information and the fact that (S t−2 , Y t−1 ) → Xt−1 → Xt ;5 (b) uses the fact that the battery process S t is a deterministic function of S1 , X t−1 , and Y t−1 given by (1); and (c) uses the fact that removing terms does not reduce the mutual information. Proof of Lemma B.2. For any qa = (q1a , q2a , . . . , qTa ) ∈ QA , construct a qb = (q1b , q2b , . . . , qTb ) ∈ QB as follows: for any t and realization (xt , st , y t ) of (X t , S t , Y t ) let Proof of Lemma C.1. The first term I(a; π) of [Ba V ](π) is a concave function of π. We show the same for the second term. Note that if a function V is concave, then it’s perspective g(u, t) := tV (u/t) is concave in the domain {(u, t) : u/t ∈ Dom(V ), t > 0}. The second term in the definition of the Bellman operator (10)  X X a(y|x, s)π(x, s) V (ϕ(π, y, a)) y∈Y qtb (yt |xt , st , y t−1 ) = PqYa|Xt ,St ,Y t−1 (yt |xt , st , y t−1 ). t (59) To prove the Lemma, we show that for any t, PqXat ,St ,Y t = PqXbt ,St ,Y t . (60) By definition of qb given by (59), to prove (60), it is sufficient to show that PqXat ,St ,Y t−1 = PqXbt ,St ,Y t−1 . (xt ,st )∈X ×S = X Q(xt+1 |xt )1st+1 {st − xt + yt }qa (yt |xt , st , y t−1 ) (xt ,st )∈X ×S qa × P (xt , st , y t−1 ) (a) X = Q(xt+1 |xt )1st+1 {st − xt + yt }qb (yt |xt , st , y t−1 ) (xt ,st )∈X ×S qb × P (xt , st , y t−1 ) qb has this form because the Pnumerator of ϕ(π, y, a) is linear in π and the denominator is x,s a(y|x, s)π(x, s) (and corresponds to t in the definition of perspective). Thus, for each y, the summand is concave in π, and the sum of concave functions is concave. Hence, the second term of the Bellman operator is concave in π. Thus we conclude that concavity is preserved under Ba . (61) We do so using induction. For t = 1, PqXa1 ,S1 (x, s) = PX1 (x)PS1 (s) = PqXb1 ,S1 (x, s). This forms the basis of induction. Now assume that (61) hold for t. In the rest of the proof, for ease of notation, we denote PqXat+1 ,St+1 ,Y t (xt+1 , st+1 , y t ) simply by Pqa (xt+1 , st+1 , y t ). For t + 1, we have X Pqa (xt+1 , st+1 , y t ) = Pqa (xt+1 , xt , st+1 , st , y t ) A PPENDIX D P ROOF OF L EMMA 9 The proof of the convergence of {ξt }t≥1 relies on a result on the convergence of partially observed Markov chains due to Kaijser [33] that we restate below. Definition 4. A square matrix D is called subrectangular if for every pair of indices (i1 , j1 ) and (i2 , j2 ) such that Di1 ,j1 6= 0 and Di2 ,j2 6= 0, we have that Di2 ,j1 6= 0 and Di1 ,j2 6= 0. Theorem 5 (Kaijser [33]). Let {Ut }t≥1 , Ut ∈ U, be a finite state Markov chain with transition matrix P u . The initial state U1 is distributed according to probability mass function PU1 . Given a finite set Z and an observation function g : U → Z, define the following: • The process {Zt }t≥1 , Zt ∈ Z, given by Zt = g(Ut ). • t = P (xt+1 , st+1 , y ) where (a) uses (59) and the induction hypothesis. Thus, (61) holds for t + 1 and, by the principle of induction, holds for all t. Hence (60) holds and, therefore, I qa (Xt , St ; Yt |Y t−1 ) = I qb (Xt , St ; Yt |Y t−1 ). The statement in the Lemma follows by adding over t. 5 The notation A → B → C is used to indicate that A is conditionally independent of C given B. (x,s)∈X ×S The process {ψt }t≥1 , ψt ∈ PU , given by ψt (u) = P(Ut = u | Z t ). • A square matrix M (z), z ∈ Z, given by ( Piju if g(j) = z [M (z)]i,j = 0 otherwise i, j ∈ U. Qm If there exists a finite sequence z1m such that t=1 M (zt ) is subrectangular, then {ψt }t≥1 converges in distribution to a limit that is independent of the initial distribution PU1 . 16 We will use the above theorem to prove that under policy b , {ξt }t≥1 converges to a limit. For that matter, let U = S × Y, Z = Y, Ut = (St , Yt−1 ) and g(St , Yt−1 ) = Yt−1 . First, we show that {Ut }t≥1 is a Markov chain. In particular, for any realization (st+1 , y t ) of (S t+1 , Y t ), we have that Since the sequnce of demands xm has a positive probability, ◦ ◦ Pb (Ut+1 = (st+1 , yt ) | U t = (st , y t−1 )) X = P (Ut+1 = (st+1 , yt ), Xt = x̃t | U t = (st , y t−1 )) = Y ms −1 = (111 . . . 1)) > 0. Therefore, P(Sms = ms | U1 = (s, y), Y ms −1 = (111 . . . 1)) > 0 which completes the proof. x̃t ∈X X P(Sms = ms , X ms = xms | U1 = (s, y), ∗ 1st+1 {yt + st − x̃t }b (yt |st − x̃t )PX (x̃t ) x̃t ∈X b◦ = P (Ut+1 = (st+1 , yt ) | Ut = (st , yt−1 )). Next, let m = 2ms and consider z m = |111{z · · · 1} 000 · · · 0} . | {z ms times ms times We will show that this z m satisfies the subrectangularity condition of Theorem 5. The basic idea is the following. Consider any initial state u1 = (s, y) and any final state um = (s0 , 0). We will show that P(Sms = ms | U1 = (s, y), Z ms = (111 . . . 1)) > 0, (62) and ms P(S2ms = s0 | Ums = (sm , 1), Zm = (000 . . . 0)) > 0. s +1 (63) Eqs. (62) and (63) show that given the observation sequence z m , for any initial state (s, y) there is a positive probability of observing any final state (s0 , 0).6 Hence, the matrix Q m t=1 M (z) is subrectangular. Consequently, by Theorem 5, the process {ψt }t≥1 converges in distribution to a limit that is independent of the initial distribution PU1 . P Now observe that θt (s) = ψ y∈Y t (s, y) and (θt , ξt ) are related according to Lemma 3. Since {ψt }t≥1 converges weakly independent of the initial condition, so do {θt }t≥1 and {ξt }t≥1 . Let θ̄ and ξ¯ denote the limit of {θt }t≥1 and {ξt }t≥1 . Suppose the initial condition is (θ◦ , ξ ◦ ). Since b◦ is an invariant policy, (θt , ξt ) = (θ◦ , ξ ◦ ) for all t. Therefore, the ¯ = (θ◦ , ξ ◦ ). limits (θ̄, ξ) Proof of Eq. (62). Given the initial state (s, y), define s̄ = ms − s, and consider the sequence · · · 1} . xms = |000{z · · · 0} |111{z s̄ times s times Under this sequence of demands, consider the sequence of consumption y ms −1 = (11 . . . 1), which is feasible because the state of the battery increases by 1 for the first s̄ steps (at which time it reaches ms ) and then remains constant for the remaining s steps. Therefore, P(Sms = ms | U1 = (s, y), Y ms −1 = (111 . . . 1), X ms = xms ) > 0. 6 Note that given the observation sequence z m , the final state must be of the form (s0 , 0). Proof of Eq. (63). The proof is similar to the Proof of (62). Given the final state (s0 , 0), define s̄0 = ms − s0 and consider the sequence s x2m 111{z · · · 1} 000 · · · 0} . ms +1 = | | {z s̄0 times s0 times Under this sequnce of demains and the sequence of consump2ms −1 = (00 . . . 0), the state of the battery tion given by ym s decreases by 1 for the first s̄0 steps (at which time it reaches s0 ) and then remains constant for the remaining s0 steps. Since s x2m ms +1 has positive probability, we can complete the proof by following an argument similar to that in the proof of (62). R EFERENCES [1] A. Ipakchi and F. Albuyeh, “Grid of the future,” IEEE Power Energy Mag., vol. 7, no. 2, pp. 52–62, 2009. [2] A. Prudenzi, “A neuron nets based procedure for identifying domestic appliances pattern-of-use from energy recordings at meter panel,” in Proc. Power Engineering Society Winter Meeting, vol. 2. IEEE, 2002, pp. 941–946. [3] G. W. Hart, “Nonintrusive appliance load monitoring,” Proc. IEEE, vol. 80, no. 12, pp. 1870–1891, 1992. [4] H. Y. Lam, G. Fung, and W. Lee, “A novel method to construct taxonomy electrical appliances based on load signatures,” IEEE Trans. Consum. Electron., vol. 53, no. 2, 2007. [5] C. Efthymiou and G. Kalogridis, “Smart grid privacy via anonymization of smart metering data,” in Proc. Smart Grid Communications. IEEE, 2010, pp. 238–243. [6] G. Kalogridis, C. Efthymiou, S. Z. Denic, T. A. Lewis, and R. Cepeda, “Privacy for smart meters: Towards undetectable appliance load signatures,” in Proc. Smart Grid Communications. IEEE, 2010, pp. 232–237. [7] I. Csiszar and J. Körner, Information theory: coding theorems for discrete memoryless systems. Cambridge University Press, 2011. [8] D. Varodayan and A. Khisti, “Smart meter privacy using a rechargeable battery: Minimizing the rate of information leakage,” in Proc. Int. Conf. on Acoustics, Speech and Signal Processing. IEEE, 2011, pp. 1932– 1935. [9] O. Tan, D. Gunduz, and H. V. Poor, “Increasing smart meter privacy through energy harvesting and storage devices,” IEEE J. Sel. Areas Commun., vol. 31, no. 7, pp. 1331–1341, 2013. [10] G. Giaconi, D. Gündüz, and H. V. Poor, “Smart meter privacy with an energy harvesting device and instantaneous power constraints,” in IEEE International Conference on Communications (ICC). IEEE, 2015, pp. 7216–7221. [11] S. Han, U. Topcu, and G. J. Pappas, “Event-based information-theoretic privacy: A case study of smart meters,” in Proc. American Control Conference. IEEE, 2016, pp. 2074–2079. [12] L. Bahl, J. Cocke, F. Jelinek, and J. Raviv, “Optimal decoding of linear codes for minimizing symbol error rate,” IEEE Trans. Inf. Theory, vol. 20, no. 2, pp. 284–287, 1974. [13] L. Sankar, S. R. Rajagopalan, and H. V. Poor, “Utility-privacy tradeoffs in databases: An information-theoretic approach,” IEEE Trans. Inf. Theory, vol. 8, no. 6, pp. 838–852, 2013. [14] L. Sankar, S. R. Rajagopalan, and S. Mohajer, “Smart meter privacy: A theoretical framework,” IEEE Trans. Smart Grid, vol. 4, no. 2, pp. 837–846, 2013. [15] O. Tan, D. Gunduz, and H. V. Poor, “Increasing smart meter privacy through energy harvesting and storage devices,” IEEE J. Sel. Areas Commun., vol. 31, no. 7, pp. 1331–1341, 2013. 17 [16] S. Tatikonda and S. Mitter, “The capacity of channels with feedback,” IEEE Trans. Inf. Theory, vol. 55, no. 1, pp. 323–349, 2009. [17] A. J. Goldsmith and P. P. Varaiya, “Capacity, mutual information, and coding for finite-state Markov channels,” IEEE Trans. Inf. Theory, vol. 42, no. 3, pp. 868–886, 1996. [18] H. Permuter, P. Cuff, B. Van Roy, and T. Weissman, “Capacity of the trapdoor channel with feedback,” IEEE Trans. Inf. Theory, vol. 54, no. 7, pp. 3150–3165, 2008. [19] J. Yao and P. Venkitasubramaniam, “The privacy analysis of battery control mechanisms in demand response: Revealing state approach and rate distortion bounds,” IEEE Trans. Smart Grid, vol. 6, no. 5, pp. 2417– 2425, 2015. [20] S. Li, A. Khisti, and A. Mahajan, “Structure of optimal privacypreserving policies in smart-metered systems with a rechargeable battery,” in Proc. Int. Workshop on Signal Processing Advances in Wireless Communications. IEEE, 2015, pp. 375–379. [21] O. Hernández-Lerma and J. Lasserre, Discrete-Time Markov Control Processes. Springer-Verlag, 1996. [22] O. Hernández-Lerma, Adaptive Markov Control Processes. SpringerVerlag, 1989. [23] ——, Further Topics on Discrete-Time Markov Control Processes. Springer-Verlag, 1991. [24] D. P. Bertsekas, Dynamic programming and optimal control. Athena scientific Belmont, MA, 1995, vol. 1, no. 2. [25] R. Blahut, “Computation of channel capacity and rate-distortion functions,” IEEE Trans. Inf. Theory, vol. 18, no. 4, pp. 460–473, 1972. [26] S. Arimoto, “An algorithm for computing the capacity of arbitrary discrete memoryless channels,” IEEE Trans. Inf. Theory, vol. 18, no. 1, pp. 14–20, 1972. [27] L. Wang and M. Madiman, “Beyond the entropy power inequality, via rearrangements,” IEEE Trans. Inf. Theory, vol. 60, no. 9, pp. 5116–5137, 2014. [28] S. Li, “Information theoretic privacy in smart metering systems using rechargeable batteries,” Master’s thesis, University of Toronto (Canada), 2016. [29] A. Dembo, T. M. Cover, and J. A. Thomas, “Information theoretic inequalities,” IEEE Trans. Inf. Theory, vol. 37, no. 6, pp. 1501–1518, 1991. [30] T. M. Cover and J. A. Thomas, Elements of information theory. John Wiley & Sons, 2012. [31] W. B. Powell, Approximate Dynamic Programming: Solving the curses of dimensionality. John Wiley & Sons, 2007, vol. 703. [32] G. Shani, J. Pineau, and R. Kaplow, “A survey of point-based pomdp solvers,” Autonomous Agents and Multi-Agent Systems, pp. 1–51, 2013. [33] T. Kaijser, “A limit theorem for partially observed Markov chains,” The Annals of Probability, pp. 677–696, 1975.
7cs.IT
On the Evaluation of Plug-in Electric Vehicle Data of a Campus Charging Network arXiv:1602.02943v1 [math.OC] 9 Feb 2016 Islam Safak Bayram Qatar Environment and Energy Research Institute and College of Science and Engineering Hamad Bin Khalifa University Doha, Qatar [email protected] Abstract—The mass adoption of plug-in electric vehicles (PEVs) requires the deployment of public charging stations. Such facilities are expected to employ distributed generation and storage units to reduce the stress on the grid and boost sustainable transportation. While prior work has made considerable progress in deriving insights for understanding the adverse impacts of PEV chargings and how to alleviate them, a critical issue that affects the accuracy is the lack of real world PEV data. As the dynamics and pertinent design of such charging stations heavily depend on actual customer demand profile, in this paper we present and evaluate the data obtained from a 17 node charging network equipped with Level 2 chargers at a major North American University campus. The data is recorded for 166 weeks starting from late 2011. The result indicates that the majority of the customers use charging lots to extend their driving ranges. Also, the demand profile shows that there is a tremendous opportunity to employ solar generation to fuel the vehicles as there is a correlation between the peak customer demand and solar irradiation. Also, we provided a more detailed data analysis and show how to use this information in designing future sustainable charging facilities. I. I NTRODUCTION There has been a surge of interest in plug-in electric vehicles (PEVs), as electric miles are cheaper and environmentally friendly when compared to their gas-powered counterparts. This motivation is further boosted by government policies and regulations to support energy security and independence. For instance, the State of California has set a goal of putting 1.5 million zero-emission vehicles on the road by year 2025. Therefore, PEV sales have risen tremendously [1]. In the last five years more than 300, 000 vehicles have been sold in the U.S. and almost 40% of the PEVs reside in California [2], [3]. Therefore, such adoption rates have spurred the need to deploy a robust network of public charging facilities. Typically, PEV owners use garage charging with Level 1, 120 AC chargers during nighttime when there is unused generation capacity. On the other hand, PEV owners living in metropolitan areas may not have access to this option. Also, the need for longer driving ranges requires the deployment of public charging facilities. During the weekdays, PEV owners can spend several hours parked at the workplace, school, or while shopping. Hence, charging service at parking lots is gaining popularity. A charging lot can be equipped with either Vahraz Zamani, Ryan Hanna, Jan Kleissl Department of Mechanical and Aerospace Engineering University of California at San Diego, La Jolla, USA [email protected], [email protected] [email protected] Level 2 single/three phase or fast DC charging technology [4]. On the other hand, incorporating these technologies translates to major phase, additions to the existing power grid. For instance under Level 1 charging conditions each PEV represents a load equivalent to 50% of a house while under Level 2 conditions PEV represents close to 2.5 fold the equivalent load. The concern about the rapid adoption of PEVs by the utilities is that they could have disruptive impacts on the power grid. Excessive instantaneous demand can overload circuits, increase distribution transformer losses, lead to harmonics distortion, voltage deviations, and thermal loading on distribution system [5], [6]. Obviously, the extent of PEV impact depends on the degree and regional density of their penetration, service requirements and the time of the day they are charged. For PEV adoption to occur seamlessly, the design and operation of charging facilities are of paramount importance. Corollary, there has been a growing body of literature on the design of charging facilities [4], [7], [8] and efficient load management at them [9]–[12]. The station designs often consider renewable generation (mostly solar power), energy storage, and efficient charge rate control. For instance, the works in [11] and [12] consider a parking lot charging facility equipped with energy storage systems to smoothen the stochastic customer demand. The studies in [4] and [8] provide a capacity planning framework for large-scale charging facilities. Also, utilities have started to deploy solar-powered charging stations [13] and [14]. Moreover, the works in [9] and [10] propose optimization frameworks for power flow. However, the lack of real world data limits the applicability of such studies in the US, while some work has been done in Europe [15], [16]. Most of the studies have to rely on simplifying assumptions, which may not be true. For instance, the common assumption on PEV service/parking time is either Gaussian or Exponential distribution, however, our results indicate that real customer behavior is far from this two assumptions. Also critical design problems such as resource provisioning and sizing of storage and PV panels heavily rely on the customer statistics, e.g., peak and spatiotemporal demand, seasonal and diurnal variations, charging duration, etc. Therefore, in this study we evaluate the data obtained from One Year Average Solar Power at UC San Diego 250 Level 2 chargers at a major North American University campus for a period of 166 weeks. To the best of our knowledge, this paper presents one of the most comprehensive data in this field. The main thrusts of this paper are to: (1) provide basic design and capacity planning principles for charging stations equipped with distributed generation and storage units; (2) analyze and present real-world PEV charging data on PEV charging; (3) provide guidelines for how to use the measured information to build the future sustainable charging facilities. II. PEV C HARGING S TATION D ESIGNS The design and architecture of sustainable charging facilities should carefully address the potential negative impacts of the concurrent PEV charging. The primary goal is to manage the customer demand both in time and space so that the power grid is not strained beyond its limits, and additional peaks are prevented. An overview of the systems components is presented in Fig.1. Next, we enumerate the design parameters that enable effective demand control at PEV parking lots. A. Renewable Energy The recent studies conducted by Lawrence Berkeley National Laboratory and National Renewable Energy Laboratory reveal that the price of solar photovoltaic (PV) was reduced by 12% to 19% in 2013 and the trend continues to fall 3%-12% more by the end of 2014 in the United States [17]. Moreover, Department of Energy SunShot Initiative aims to reduce PV integration cost 75% by 2020 [18]. As the cost of photovoltaic panels steadily drops and governments provide incentives, solar generation can be used at parking lots to fuel PEVs. The main advantage of using solar generation at Level 2 parking lots is that customers are typically parked and stationary for 3-5 hours during their daily activities. Due to long parking durations, this method of charging has enough flexibility to exploit solar generation, e.g., the effect of intermittencies introduced by clouds, dust, etc. could be alleviated. Also, since the electricity is generated and consumed locally, with proper control techniques it eliminates the need for transferring electricity from the far-off generator. This way the stress on the grid is also reduced. Furthermore, solar electricity is typically cheaper and cleaner than utility electricity power. For instance, according to [13], the average cost per mile for solar powered vehicles is $0.04, whereas the average cost for utility First Quartile Third Quartile 200 150 100 50 0 Fig. 1: Illustration of PEV charging lot. Mean 0:00 1:30 3:00 4:30 6:00 7:30 9:00 10:30 12:00 13:30 15:00 16:30 18:00 19:30 21:00 22:30 Solar PV Power Output (kW) 300 Fig. 2: Solar power generation at the University campus parking deck (capacity of 300kW). electricity powered and gas powered are $0.06 and $0.20, respectively. The correlation between the seasonal customer demand and the renewable generation should be carefully addressed. For instance, one average solar PV power output of one generation facility at UC San Diego is shown in Fig. 2. This PV generation has 300 kW-AC nominal capacity and is located on one of the University parking deck. As it is clear, solar generation has significant variation by presenting the first and third quartiles, i.e., 25th percentile and 75th percentile. This profile shows that stand-alone solar charging may not be practical. To aid the uncertainty, storage units and grid power are used. B. Energy Storage Systems (ESS) Energy storage units are critical components as they aid in smoothing customer demand and the integration of renewables. Moreover, due to stochasticities involved, the local generation may not perfectly align with customer demand. Storage units can act as energy buffers and decouple the time of production and demand by storing cheaper and cleaner off-peak hour electricity and delivering it during the peak load periods to handle the residual demand. Considering their high acquisition, operation, and maintenance costs, the optimal sizing of storage units is an important design issue. Over-provisioning ESS size leads to underutilizing costly assets and under-provisioning it taxes operation lifetime. Sizing storage units for DC fast charging stations is addressed in [11] and [12], where authors model the charging facility with a multi-dimensional Markov chain and solve the storage size problem for the peak hour. Furthermore, in [19] sizing problem is solved by Monte Carlo simulations. Apparently, such studies could be improved by using data of temporal customer load profile. For instance, the sizing problem can be formulated in the following way. The station can draw a constant power to serve some base load, and the storage size could be determined to accommodate the difference between the remaining customer demand and the renewable generation. Another important aspect of storage planning is to determine the required power rating parameter, which depends on the statistics of customer charging rate, energy demand, and the length of stay. For instance, a fastresponding storage unit (e.g., supercapacitors, flywheels, etc.) may be desired to overcome the problems introduced by shortterm variations in the solar generation. System designers should also consider the physical size of storage units as it may grow tremendously depending on the application. To illustrate this point, assume that a storage unit of size 64kWh of Maxwell BMOD0083P048 modules (each has 26.6Wh capacity) are chosen. Then the total volume of the ESS would be 24m3 for over 2400 modules that would be required for this application. This simple example depicts how physical space can be problematic if the station is located in regions with expensive real estate. C. Capacity Planning Capacity provisioning problem –determining how much power to draw from the grid –is an important decision problem for sustainable charging facilities. The proper resource provisioning depends on the customer demand profile and its variability. For example, if the station resides over a relatively well-confined region such as a university campus, then the variability is probably lower than a larger region such as stations located at shopping malls or interstate exchanges. Hence, resource allocation problem of the first case is relatively simpler than the second one. For instance, the work presented in [8] proposes a capacity planning framework for a campus size network composed of different charger technologies (Level 1, Level 2, DC fast etc.). They propose a capacity planning framework to guarantee a certain quality of service levels. However, since there is no measurement study, this study assumes a sinusoidal demand function for illustrative examples. Moreover, in most capacity planning studies, resource provisioning is computed respect to peak demand. On the other hand, the shape of the customer demand and the peak-to-average demand ratio can affect important design questions such as storage type, renewable portfolio, etc. Hence, it is crucial to know the daily, weekly, and the monthly demand profile. Another key aspect of station planning is to determine the number of physical chargers to be deployed at charging facilities. The cost per Level 2 charger hovers between $600 to $1000, hence over-provisioning may be a costly option. The works presented in [4], [8], [12] and [20] employ queuing theory to model the charging stations. In such studies, the number of physical chargers represents “servers” and the operation principle investigates the case when some customers do not get the charging service immediately if all of the chargers are occupied. Hence, one of the goals is to investigate the relation between waiting time and the number of chargers. Then the design question is to find the optimal number of chargers such that customers are provided with statistical guarantees (no customer waits more than a target waiting time). Queuing-based studies heavily rely on the assumptions made on customer arrivals, departures, energy demand and the population of PEVs. In the next section, we provide detailed results of our data set. TABLE I: Summary of PEV station design Parameter Challenges Required Statistics -Decide PV size Solar -Forecast generation -Power and energy rating ESS -Decide physical space -Decide # of Chargers Capacity -Capacity planning -Temporal customer load -Charging current ranges -Customer demand profile -PV Output -Daily load profile -Arrival/Service stats. D. Overview PEV Demand Control Techniques As the population of PEVs increase, station operators may need to apply control techniques to manage PEV demand. The customer demand can be shaped by optimally setting; (1) charging start time; (2) charging service location; and (3) charging current. An overview of techniques is presented in [5]. The impact and applicability of the control technique depend on customer types. For individual customers who are interested in maximizing their benefits, incentive-based frameworks are applied to manage the spatiotemporal demand. On the other hand, companies may have PEV fleets, who adhere to the decisions of a central decision maker. Such entities can up to a large extent decide charging current, service location and start time. This type of load is also considered as managable load. For instance, the work presented in [11] manages a hybrid population of both customer types to balance the load among neighboring stations. The work in [12] offers incentives to individual customers to convince them to receive the service in a less congested station An overview is provided in Table I. III. PEV C HARGING M EASUREMENT A. Charging Station Information The chargers are physically located in parking lots at a major North American University campus. All of the parking lots employ Level 2, 240 volt AC input chargers with SAE J1772 connectors. Chargers can operate up to 30 amperes and can deliver 6.5kW of electric power [21]. Energy and demand metering employs ANSI 12.20 and IEC standards and the communication network uses existing cellular networks. In total, there are 17 Level 2 chargers deployed at 9 different parking lots. The charging nodes are located within a few miles away from each other, and exact driving distances are calculated with Google Maps and presented in Table II. It is noteworthy that in most cases the driving distance is further than the actual physical distance. From the design point of view, this information is valuable because neighboring charging stations may be fed by the same distributed generation units (e.g., solar arrays, wind), share the same storage device, or connected to the same distribution transformer. Then the chargers of charging stations reside in small well-confined regions can be abstracted collectively as a super-station. For instance, this may apply to Stations 4 − 6, as the physical distance is relatively short. Among these 9 places, 2 of them, Stations 2 and 8 are dedicated to University vehicles. Hence, they continue to park TABLE II: Driving distance (in miles) between the chargers. TABLE III: Detailed station information. From/To St. 1 St. 2 St. 3 St. 4 St. 5 St. 6 St. 7 St. 8 St. 9 St. St. St. St. St. St. St. St. St. 1 2 3 4 5 6 7 8 9 0.4 0.6 1 1.5 1 1.6 0.9 1.3 0.4 0.3 1.4 1.3 0.7 1.3 0.2 0.2 0.6 0.3 1.3 1.5 1 1 0.5 0.7 1 1.4 1.3 0.3 0.3 2.3 1 1.4 1.5 1.3 1.5 0.3 0.5 2.5 1.1 1.6 1 0.7 1 0.3 0.5 2 0.6 1 1.6 1.3 1 2.3 2.5 2 1.4 1.5 0.9 0.2 0.5 1 1.1 0.6 1.4 0.5 1.3 0.2 0.7 1.4 1.6 1 1.5 0.5 - even after completion of the charge service. We refer to these vehicles as PEV fleet. The remaining 7 locations serve the public, and we refer them as individual customers. Detailed charging station information is presented in Table III. B. Data Set Our data set contains more than 6800 charge events collected for 166 weeks, starting from 14 Nov. 2011 to 8 Jan. 2015. The collected data contains the following information [22]. • Location name and the address (street name, city, state, zip code) of the charger. The chargers are at 9 different locations. • Serial number of the charger. This allows us to know the exactly which charger is in use. As a future work, this information can be used to conduct a study at a finer granularity. • Member guest is the unique identification number assigned to each customer. We identify 1144 unique visits, however, if the customer is not a member of the charger network, a new ID number will be assigned for each visit. • Connection and disconnection time shows the arrival and departure of each customer. The format is in dd/mm/yyyy hh : mm : ss. • Cumulative energy shows the amount of energy (in kWh) stored at each charge service. This information is important to learn the demand statistics of vehicles and it can be used in simulation-based studies for larger scale charging networks. • Fee refers the cost for the charge service in $/kWh. The fee depends on the location and the tariffs of the utility. For instance, the rate of Level 2 charging is $0.49 per kWh in Southern California. However, the charging rate in Seattle is 10 cents cheaper. Furthermore, there can be an additional cost in downtown areas related to parking fees. IV. A NALYSIS & R ESULTS We start our analysis by differentiating two different PEV types individuals and PEV fleet. General public such as students, faculty, employees, and visitors constitute the first group, whereas the second group is composed of company vehicles (shuttles, postal cars etc.). The rationale behind this St. St. St. St. St. St. St. St. St. 1 2 3 4 5 6 7 8 9 # of Chargers # of Service Completion Dates Type 3 1 2 1 1 1 2 2 4 1093 196 1182 838 147 121 1294 838 1111 12/19/12-1/8/15 5/18/13-1/7/15 9/14/12-1/8/15 12/2/11-1/8/15 7/4/13-1/8/15 5/21/13-1/6/15 1/3/13-1/8/15 12/2/11-1/8/15 11/15/11-1/8/15 Public Public Public Fleet Public Public Public Fleet Public categorization is that since PEV fleets usually have certain tasks, the demand for such vehicles can assumed to be manageable [11]. This can be done by optimally adjusting the charging current and service duration, with respect to varying network conditions. Thus, in most of our results are categorized as individuals, fleets, and aggregated results. Next, we present the distribution of energy demand of single charging session for each customer case. The results depicted in Fig. 3 shows that more than half of the customer demand is within 0 − 8kWh and 90.1% of the total service request is between 0 − 16kWh. Considering the fact that mainstream PEV packs range between 16 − 85kWh, we conclude that the vast majority of the customers use parking lots to extend their driving ranges. Furthermore, almost 70% of the total energy is transferred to individual PEVs. The findings reveal that the system operator can manage the remaining 30% of the demand. Obviously, these results may not be meaningful without knowing the temporal customer behavior. Thus, in Fig. 4 we evaluate the 24 hours customer behavior. The results in Fig. 4(a) shows that the individual demand peak occurs between 10am to 12pm, whereas the demand peak for company fleets is around 1pm. It is also noteworthy that the peak PEV fleets demand may coincide with the peak demand of other electrical loads. If this trend continues, fleet operators may need to shift their usage to night time. From station design standpoint, this information can be used to decide on how many physical chargers to deploy in order to provide good Level of QoS, as the number of vehicles increases the charging stations may act as waiting systems, and station operators could guarantee to finish service within a target deadline. Moreover, charging facilities are expected to employ solar panels and energy storage units to aid the power grid operations. As given in Section II-A, solar generation depends on daily and seasonal variations. It can be seen that there is a correlation between PEV demand and solar generation (depicted in Fig.2). This means that solar energy has a great potential to provide electricity during such hours. Another important parameter is the seasonal customer demand; hence, we show the PEV demand for each month of the year in Fig.5. Next, we evaluate the daily customer demand. The results depicted in Fig.6 shows that the service requests during the weekdays constitute almost a flat profile. From the capacity Individual Customers Managable Load: PEV Fleet 1200 35.41% # of PEV Service 1500 1000 800 10.2% 600 400 4 12 20 2.19% 200 1.95% 0 Percentage respect to total demand 6.2% 500 0 28 36 44 52 Energy Demand (kWh) (a) Energy demand of individual customers. 53.54% 3000 1000 # of PEV Service Percentage respect to total demand 26.36% 2000 All Customers: Individual and PEV Fleet 3500 18.13% # of PEV Service 2500 4 12 2500 36.56% 2000 1500 1000 8.39% 500 20 28 36 44 Energy Demand (kWh) 1.05% 0 52 4 (b) Energy demand of PEV fleet. 12 20 0.46% 28 36 44 52 Energy Demand (kWh) (c) Aggregated energy demand. Fig. 3: Energy demand distribution of single charging session. The average energy transfer is 8.53kWh and the standard deviation is 6.49 kWh # of Customer Arrivals 600 300 200 400 200 200 100 0 0am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am 12pm 1pm 2pm 3pm 4pm 5pm 6pm 7pm 8pm 9pm 10pm 11pm 100 All Customers: Individual and PEV Fleet 800 # of Customer Arrivals 300 0 Managable Load: PEV Fleet 400 # of Customer Arrivals 400 500 0 0am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am 12pm 1pm 2pm 3pm 4pm 5pm 6pm 7pm 8pm 9pm 10pm 11pm Individual Customers 0am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am 12pm 1pm 2pm 3pm 4pm 5pm 6pm 7pm 8pm 9pm 10pm 11pm 500 Hour of Day Hour of Day (a) Hourly individual customer demand. Hour of Day (b) Hourly company PEV fleet demand. (c) Hourly aggregated demand. Fig. 4: PEV hourly demand 600 Individual Customers 200 Managable Load: PEV Fleet 800 All Customers: Individual and PEV Fleet 400 300 200 150 # of PEV Charging # of PEV Charging # of PEV Charging 500 100 50 600 400 200 100 0 0 0 t t l Jan Feb Mar Apr May Jun Ju Aug Sep Oc Nov Dec (a) Monthly individual customer demand. t t l Jan Feb Mar Apr May Jun Ju Aug Sep Oc Nov Dec (b) Monthly company PEV fleet demand. t t l Jan Feb Mar Apr May Jun Ju Aug Sep Oc Nov Dec (c) Monthly aggregated demand. Fig. 5: PEV Monthly demand planning standpoint, this is a desired behavior because less uncertainty in customer demand will translate to higher resource utilization, i.e., storage and solar usage. It is also noteworthy that the customer demand during weekends is considerable less than the weekdays. Station operator can store and sell the energy back to the power grid. Also, some portion of the PEV fleet load on Mondays could be served on Sundays to allow more individual customers. 2013 and the results depicted in Fig. 7 shows that as the PEV adoption increases the need for charging service surges accordingly. In fact, 4 out of 9 charging locations are opened after year 2013. This data is extremely important to forecast the customer demand and determine the required number of charging nodes. Our final evaluation is on customer demand over time. We compute the number of PEV services from Nov. 2011 to Nov. In this paper, we have analyzed and presented the data obtained from a Level 2 charging network located in major V. C ONCLUSIONS & F UTURE W ORK 600 400 200 400 300 200 100 1000 500 Su nd ay M on da y Tu es da W y ed ne sd ay Th ur sd ay Fr id ay Sa tu rd ay 0 Su nd ay M on da y Tu es da W y ed ne sd ay Th ur sd ay Fr id ay Sa tu rd ay 0 All Customers: Individual and PEV Fleet Su nd ay M on da y Tu es da W y ed ne sd ay Th ur sd ay Fr id ay Sa tu rd ay 0 1500 # of Customer Arrivals 500 # of Customer Arrivals # of Customer Arrivals Managable Load: PEV Fleet Individual Customers 800 (a) Daily individual customer demand. (b) Daily company PEV fleet demand. (c) Daily aggregated demand. Day of Week Day of Week Day of Week Fig. 6: PEV daily demand 140 [8] I. Bayram, A. Tajer, M. Abdallah, and K. Qaraqe, “Capacity planning frameworks for electric vehicle charging stations with multiclass customers,” IEEE Trans on Smart Grid, vol. PP, no. 99, pp. 1–1, 2015. [9] C. Hutson, G. K. Venayagamoorthy, and K. A. Corzine, “Intelligent 100 y = 6e−05*x3 − 0.0053*x2 + 0.33*x + 8.4 scheduling of hybrid and electric vehicle storage capacity in a parking 80 lot for profit maximization in grid power transactions,” in Proc. IEEE Holiday: last week of the year Energy 2030 Conference, 2008, pp. 1–8. 60 [10] W. Su and M.-Y. Chow, “Performance evaluation of an eda-based largescale plug-in hybrid electric vehicle charging algorithm,” IEEE Trans. 40 on Smart Grid, vol. 3, no. 1, pp. 308–315, March 2012. 20 [11] I. Bayram, G. Michailidis, M. Devetsikiotis, and F. Granelli, “Electric power allocation in a network of fast charging stations,” IEEE Journal 0 0 20 40 60 80 100 120 140 on Selected Areas in Communications, vol. 31, no. 7, pp. 1235–1246, Week # from Nov., 2011 to Nov., 2014 July 2013. Fig. 7: Weekly charging data. The number of service request [12] I. Bayram, G. Michailidis, and M. Devetsikiotis, “Unsplittable load balancing in a network of charging stations under qos guarantees,” IEEE increases as the rise in PEV sale. Trans. on Smart Grid, vol. 6, no. 3, pp. 1292–1302, May 2015. [13] Sullivan Solar Power Inc. [Accessed: April, 2015]. [Online]. Available: http://www.sullivansolarpower.com/solar-power/electric-vehicles North American University campus. As the future sustainable charging facilities are expected to employ renewable genera- [14] Revision Energy. [Accessed: April, 2015]. [Online]. Available: http://www.revisionenergy.com/solar-electric-vehicle-charging-maine.php tion and storage units, along with smart energy management [15] J. Quiros-Tortos, L. Ochoa, and B. Lees, “A statistical analysis of ev charging behavior in the uk,” in Innovative Smart Grid Technologies systems, we have provided detailed guidelines for charging Latin America (ISGT LATAM), 2015 IEEE PES, Oct 2015, pp. 445– station design. As a future work, we are aiming to investigate 449. the potential usage of solar powered stations using the obtained [16] P. Richardson, M. Moran, J. Taylor, A. Maitra, and A. Keane, “Impact of electric vehicle charging on residential distribution networks: An irish data. R EFERENCES demonstration initiative,” in Electricity Distribution (CIRED 2013), 22nd International Conference and Exhibition on, June 2013, pp. 1–4. [1] Light duty electric drive vehicles monthly sales updates. Argonne [17] P. Denholm, R. Margolis, B. Palmintier, C. Barrows, E. Ibanez, L. Bird, National Laboratory. [Accessed: April, 2015]. [Online]. Available: and J. Zuboy, Methods for Analyzing the Benefits and Costs of Dishttp://www.anl.gov/energy-systems/project/light-duty-electric-drive-vehicles-monthly-sales-updates trubuted Photovoltaic Generation to the US Electric Utility System. [2] Improving electric vehicle sales may require solving National Renewable Energy Laboratory, 2014. unique chicken and egg problem. National Science [18] D. Feldman, G. Barbose, R. Margolis, N. Darghouth, T. James, Foundation. [Accessed: April, 2015]. [Online]. Available: S. Weaver, A. Goodrich, and R. Wiser, “Photovoltaic system prichttp://www.nsf.gov/discoveries/disc summ.jsp?cntn id=133947 ing trends: Historical, recent, and near-term projections–2013 edition,” [3] Plug-in Electric Vehicle Collaborative. [Accessed: April, 2015]. Golden, CO: National Renewable Energy Laboratory, PR-6A20-60207. [Online]. Available: http://www.pevcollaborative.org/ Accessed December, vol. 9, p. 2013, 2013. [4] I. Bayram, G. Michailidis, and M. Devetsikiotis, “Electric power re[19] S. Bai, D. Yu, and S. Lukic, “Optimum design of an ev/phev charging source provisioning for large scale public EV charging facilities,” in station with DC bus and storage system,” in Proc. IEEE Energy Proc. IEEE International Conference on Smart Grid Communications, Conversion Congress and Exposition, 2010, pp. 1178–1184. Vancouver, CA, Oct. 2013, pp. 133–138. [20] P. Fan, B. Sainbayar, and S. Ren, “Operation analysis of fast charging [5] I. S. Bayram and I. Papapanagiotou, “A survey on stations with energy demand control of electric vehicles,” IEEE Trans. communication technologies and requirements for internet of on Smart Grid, vol. PP, no. 99, pp. 1–1, 2015. electric vehicles,” EURASIP Journal on Wireless Communications [21] M. Falvo, D. Sbordone, I. Bayram, and M. Devetsikiotis, “Ev charging and Networking, vol. 2014, no. 1, 2014. [Online]. Available: stations and modes: International standards,” in Power Electronics, Elechttp://dx.doi.org/10.1186/1687-1499-2014-223 trical Drives, Automation and Motion (SPEEDAM), 2014 International [6] K. Clement-Nyns, E. Haesen, and J. Driesen, “The impact of charging Symposium on, June 2014, pp. 1134–1139. plug-in hybrid electric vehicles on a residential distribution grid,” IEEE [22] ETEC, “Electric vehicle charging infrastructure deployment guidelines Trans. on Power Systems, vol. 25, no. 1, pp. 371–380, 2010. for the greater san diego area,” Electric Transportation Engineering [7] B. Sanzhong, D. Yu, and S. Lukic, “Optimum design of an ev/phev Corporation, Tech. Rep., May 201o. charging station with dc bus and storage system,” in Proc. IEEE Energy Conversion Congress and Exposition, Atlanta, GA, Sept. 2010, pp. 1178–1184. PEV Charging per Week 120 Weekly EV Service cubic fitting
3cs.SY
Closed loop interactions between spiking neural network and robotic arXiv:1604.04764v1 [cs.NE] 16 Apr 2016 simulators based on MUSIC and ROS Philipp Weidel1∗ , Mikael Djurfeldt2,1 , Renato Duarte1,3,4 , Abigail Morrison1,4,5,6 1 Institute for Advanced Simulation (IAS-6), Theoretical Neuroscience & Institute of Neuroscience and Medicine (INM-6), Computational and Systems Neuroscience & JARA BRAIN Institute I Jülich Research Center and JARA Jülich, Germany 2 PDC Center for High Performance Computing KTH Stockholm, Sweden 3 Faculty of Biology Albert-Ludwig University of Freiburg Freiburg im Breisgau, Germany 4 Bernstein Center Freiburg Albert-Ludwig University of Freiburg Freiburg im Breisgau, Germany 1 5 Simulation Laboratory Neuroscience – Bernstein Facility for Simulation and Database Technology Institute for Advanced Simulation Jülich Aachen Research Alliance Jülich Research Center Jülich, Germany 6 Institute of Cognitive Neuroscience Faculty of Psychology Ruhr-University Bochum Bochum, Germany ∗ Forschungszentrum Jülich GmbH Institute of Neuroscience and Medicine (INM-6) 52425 Jülich, Germany e-mail: [email protected] Abstract In order to properly assess the function and computational properties of simulated neural systems, it is necessary to account for the nature of the stimuli that drive the system. However, providing stimuli that are rich and yet both reproducible and amenable to experimental manipulations is technically challenging, and even more so if a closedloop scenario is required. In this work, we present a novel approach to solve this problem, connecting robotics and neural network simulators. We implement a middleware solution that bridges the Robotic Operating System (ROS) to the Multi-Simulator Coordinator (MUSIC). This enables any robotic and neural simulators that implement the corresponding interfaces to be efficiently coupled, allowing real-time performance for a wide range of configurations. This work extends the toolset available for researchers in both neurorobotics and computational neuroscience, and creates the opportunity to perform closed-loop experiments of arbitrary complexity to address questions in multiple areas, including embodiment, agency, and reinforcement learning. 1 Introduction Studying a functional, biologically plausible neural network that performs a particular task is highly relevant for progress in both neuroscience and robotics. The major focus on this topic in the field of robotics consists of using of neural networks of varying degrees of complexity for controlling robots. So far, the majority of research has focused on non-spiking, artificial neural networks for this task (Quiñonez et al., 2015; Antonelo et al., 2007; Dasgupta et al., 2013), but there is considerable interest in investigating the capacities of spiking neural networks. In computational neuroscience, the study of simulated neural networks is paramount to gain a better understanding of the processes underlying learning/adaptation to complex environments and global behavior (e.g. Chorley & Seth, 2008). However, neural network simulators do not typically include functionality for representing environments and sensory input. As a consequence, most tasks used to test the function of a simulated neural network are hardcoded to represent a highly specific task. This has the disadvantage that virtual experiments are complex and time consuming to develop and adapt. More importantly, tasks defined in this way are rather artificial (Jitsev et al., 2012; Frémaux et al., 2013; Potjans et al., 2011; Legenstein & Maass, 2014; Friedrich & Lengyel, 2015). Whereas there is certainly value in investigating very simplified tasks and sensory representations, it is also vital to be able to check that proposed neural architectures are capable of handling richer, noisier and more complex scenarios. However, design of environments, representation of sensory states and conversion of motor commands into movements are primary features of robotic simulators. Therefore, it would be of great value to both research fields if the powerful tools developed for robotic simulation and spiking neural network simulation could be made to work together. This would allow researchers from both fields to perform simulated closed loop experiments with flexible experiment design, rich sensory input, complex neuronal processing, and motor output. The major challenge lies in the fact that robotic simulators communicate via continuous data streams, while neural network simulators communicate with spike events (so as their biological counterparts). Thus, a principled approach for bi-directional conversion is required. So far there have been few attempts to address this. Moren et al. (2015) describe a technical setup for a specific use case, in which a robot is connected to a neural network model of early saccade movement simulated with the Neural Simulation Tool (NEST: Gewaltig & Diesmann, 2007). As the robot is not in the same location as the cluster where the neural simulation is running, the connection is realized via the internet using an SSH tunnel and the Multi-Simulation Coordinator (MUSIC: Djurfeldt et al., 2010), a middleware facilitating communication between different neural simulators in one simulation. Using a minimal model and optimal number of cores, the NEST simulation ran a factor of two slower than real time and achieved an output response of 110 − 140 ms. Although this study provides a proof of concept for interaction between robotics and neural simulators, it does not represent a general solution, in part due to the limited 3 implementation detail provided. A more general solution was presented by Hinkel et al. (2015), who describe an interface between the Robotic Operating System (ROS: Quigley et al., 2009) and NEST. ROS is the most popular middleware for the robotic community, with interfaces to many robotic simulators and also robotic hardware. It allows the user to create their own simulated robots in great detail using the Unified Robot Description Format. Similarly, NEST is one of the most commonly used neural simulators for spiking point neuron models. However, the proposed interface is on the basis of Python: the neural network must be simulated in brief periods in an external loop, reading out and communicating the spikes to the robotic simulator at each iteration. Although no performance data are provided, the overheads inherent in repeatedly stopping and starting NEST imply severe performance limitations for this approach. In this paper we present an alternative approach based on ROS and MUSIC that is both general and efficient, enabling real-time performance for up to hundreds of thousands of neurons on our hardware. Our approach provides roboticists the opportunity to extend their work on neural control into the realm of spiking neural networks using any neural simulator implementing a MUSIC interface, including NEST or NEURON (Hines & Carnevale, 2001). Conversely, our toolchain frees the researcher from the constrictions of the hardcoding approach described above, by enabling neural simulators to be connected to any of the myriad robotic simulators implementing a ROS interface (including Gazebo1 , Morse2 or Webots3 ). To demonstrate the capabilities of the toolchain, we implement a Braitenberg Vehicle (Braitenberg, 1986) in which the agent is simulated in Gazebo and the neural controller in NEST. 1.1 Description of the toolchain The main purpose of the present toolchain is to capture a broad set of use cases by connecting robotic with neural simulators in a generic way, obtained by interfacing the two middlewares (ROS and MUSIC). The interface is licensed under GPLv3 and available on Github4 . In addition to our own repository, we plan to distribute the toolchain as a plug-in for MUSIC5 . In this work, we propose a set of possible solutions to overcome the problem of converting between continuous and spiking signals. In particular, we investigate the performance of three different kinds of encoders (NEF, regular rate coding, Poisson rate coding) and a linear readout decoder. As the correct encoding mechanism is debatable and dependent on the scientific question being addressed, in addition to our own mechanisms, we provide extensibility such that researchers can implement their own custom encoders, decoders and adapters in Python or C++. 1 http://gazebosim.org/ 2 https://www.openrobots.org/wiki/morse/ 3 https://www.cyberbotics.com 4 https://github.com/weidel-p/ros_music_adapter 5 https://github.com/INCF/MUSIC 4 Gazebo WeBots Hardware Publisher sensor Adapter Subscriber sensor motor Publisher MUSIC Event In Proxy Neural Simulator MUSIC ROS Subscriber Encoder Decoder motor MUSIC Event Out Proxy Figure 1: Information flow in the ROS-MUSIC toolchain. The boxes with red outlines depict our extensions to MUSIC that facilitate the bidirectional conversion of continuous and spiking signals (solid and dashed arrows, respectively) To achieve these ends, our interface to ROS extends MUSIC by three different kind of binaries: adapters, encoders and decoders (see Figure 1). Encoders and decoders are used to translate between spiking data and continuous data while adapters can be used for pre-processing data and connect to ROS. All binaries run in their own process and solve only one specific purpose. This way, the interface is highly modular and the implementation of custom adapters, encoders or decoders is as simple as possible. 2 Materials and Methods 2.1 The MUSIC configuration file The adapters, encoders, decoders and simulators introduced in the toolchain are specified, connected and parameterized in the MUSIC configuration file. Detailed information about the MUSIC configuration file can be found in the MUSIC manual6 and examples of complete configuration files for this toolchain can be found in the Github repository. 2.2 Encoding, decoding and adaptation The choice of encoder and decoder to convert continuous to spiking signals is non-trivial, and potentially dependent on the scientific question or task. Here, we describe three possible encoding mechanisms and one decoding mechanism. We also describe a simple adapter to map the dimenstionality of the input signal to the dimensionality of the receiving network. 6 http://software.incf.org/software/music 5 2.2.1 Regular rate coding The simplest way to encode continuous data into spiking data is regular rate coding. i. e. mapping the input signal to a time-dependent firing rate variable. Each input dimension is encoded by a single neuron by transforming the input signal, which is a continuous signal in the range [−1, 1], into a time-dependent variable representing the spike density of the encoding neuron. This is achieved by calculating the interspike interval of each encoding neuron at time t by: ISIn (t) = 1 vmin + (vmax − vmin ) 1+I2n (t) (1) where In (t) is the input which is mapped to neuron n. The firing rate is scaled between [vmin , vmax ] which are free parameters of the regular rate encoder. This encoding mechanism leads to very regular spike patterns but has the clear advantage of being computationally very efficient. Note that this approach does not take into consideration biological neuron properties such as refractoriness, but these could be included without much impact on the computational efficacy. 2.2.2 Poisson rate coding In this encoding scheme, we follow a similar implementation to that described in the previous section, but introduce a stochastic component in the generated spike trains, by transforming the input signal into a time-dependent variable representing the intensity of a stochastic point process with Poissonian statistics. This can be achieved by using the inverse of the expression (Equation 1) for interspike interval in the previous section as the rate parameter for an exponential ISI distribution: ISIn (t) = − 1 vmin + (vmax − vmin ) 1+I2n (t) ln(r) (2) where r is a random number drawn from a uniform distribution in [0, 1) and In (t) is the input mapped to neuron n. The firing rate is scaled between [vmin , vmax ] which are free parameters of the Poisson rate-encoder. This encoding mechanism produces spike trains with Poissonian statistics, similar to those typically assumed to occur in central neurons in the mammalian brain (see, for example, Calvin & Stevens (1967); Dayan & Abbott (2001) or Averbeck (2009) for a counter-argument), and therefore are thought to be a more realistic approximation than regular spike trains. As Section 3 shows, the computational complexity of this approach is comparable to that of regular rate encoding. 6 2.2.3 Neural Engineering Framework The Neural Engineering Framework (NEF: Eliasmith & Anderson, 2004) is a generic formalism to represent stimuli with neural ensembles that allows a wide variety of functions to be realised by deriving optimal projections between neural populations. In the simplest formulation, NEF encodes a vector of continuous data I as an input current to an integrate-and-fire neuron whose activity is defined by an (I) = Gn [αn · I + Inbias ] (3) where G represents a generic non-linear functional which is determined by the neuron dynamics, αn is the neuron’s response preference, or tuning curve, and Inbias a constant bias current setting the base activation of neuron n. It is worth noting that this encoding does not depend on the specific form of G and any neuron model can be used for this operation. The original signal I can be adequately reconstructed (depending on the properties of G and alpha) by linearly combining the activity a of the encoded representations Iˆ = X an (I)φn (4) n where the decoding weights φ are obtained by linear regression in order to minimize the reconstruction error. 2.2.4 Linear decoder Having described possible options explored in this work to convert continuous signals into discrete spike event trains, we now explore the reverse operation. To transform the spiking activity of a given neural ensemble to a continuous signal, which can be used, for example, to provide motor commands to the simulated robot, we first perform a low-pass filter of each spike train by convolving with a causal (i.e. only defined for t ≥ 0) exponential kernel k(t) = exp (−t/τdec ) with time constant τdec an (t) = X k(t − ti,n ) (5) i where ti,n represents the i-th spike time of neuron n. The resulting activities at time t can be linearly combined to obtain a continuous output signal zk = X an (t)φnk n 7 (6) where weights φnk define the contribution of ensemble neuron n to readout unit k. 2.2.5 Signal adapter For the experiments carried out below we implement a simple adapter that maps the m dimensions of the input signal to the n dimensions of the receiving neurons. Note that this is only necessary for regular and Poisson rate encoding; the NEF encoder already incorporates this functionality by construction. For the performance measurements, each receiving neuron receives all dimensions of the input signal. For the Braitenberg vehicle, the input signal is split up into two hemispheres, each mapped to one of the two controlling neurons. For more complex experiments, a more sophisticated adapter can be implemented. 2.3 Performance Measurements In order to be as close as possible to a real use-case, we simulate the whole toolchain while measuring the performance capabilities of the different parts. The agent used for the performance measurements is a four wheeled, mobile robot simulated in Gazebo with an attached virtual laser scanner. The laser scanner has 100 beams with an update rate of 20 Hz and a maximal range of 5 m. We use the SkidSteerDrivePlugin provided by Gazebo, which allows us to steer the robot with a ROS::Twist message, updated with a rate of 20 Hz. During the measurements involving the NEF encoder, we keep the parameters of the integrate-and-fire (IAF) neurons unchanged and simulate these neurons with a resolution of 1 ms using exact integration (Rotter & Diesmann, 1999; Morrison et al., 2007; Hanuschkin et al., 2010). For decoding, we always use a linear readout where the spiking activity is filtered with an exponential kernel with a resolution of 1 ms. The MUSIC adapters run with an update rate equal to the update rate of the sensory input and motor command output. The measurements were executed on one node of a transtec CALLEO 551 cluster and were averaged over five trials with a simulation-time of ten seconds. Measurements involving neural simulators were carried out with NEST 2.8 (Eppler et al., 2015) and NEURON v6.2. 2.3.1 Real-time factor The sensory input, the motor output and the processing of the sensory data are all updated in parallel but asynchronously. For robotic applications it is crucial that the execution time for processing input data in each time step is less than or equal to the wall-clock time of each time step, meaning the process is running in real-time. The real-time factor (RT F ) is calculated by dividing the simulated time, tsim , by the wallclock time required to run the simulation, trun . 8 RT F = tsim trun (7) The total time the toolchain needs to perform a simulation can be divided into different components ttotal = tbuild + trun +  (8) where tbuild is the time the toolchain needs for initialization (allocate memory etc), trun is the actual time the toolchain needs to perform the simulation and  is the time which is not covered by tbuild and trun (i.e. garbage collection, freeing memory, etc.). In our measurements we clearly separate the buildup phase from the run-time phase by synchronizing the processes after the initialization of the software using an MPI barrier. This allows us to measure trun consistently over all processes. We use this measurement to investigate different aspects of the toolchain’s performance, as described below. Dimensionality of the input The sensory input to a robot can be very complex and high dimensional. The number of neurons needed to encode a multidimensional input strongly depends on the encoding mechanism. In NEF, about 100 IAF neurons per dimension are used when encoding a stimulus in order to be able to decode that stimulus with a root-mean-square error about 1% (Eliasmith & Anderson, 2004). Using rate coding, the number of neurons can be freely chosen. In the example of the Braitenberg Vehicle (Braitenberg, 1986), we use only two neurons for encoding the complete sensory input (see Section 3.1). To examine the scalability of the sensory input in our toolchain, we measure how many encoding neurons for different encoders we can simulate until the real-time performance breaks down. We use a binary search to find these limits in an efficient way. When measuring the performance with NEST and NEURON, each neuron instantiated by the encoder is matched by a corresponding neuron in the neuronal simulator, which receives the input spike train and repeats it to the decoder as an identical spike train, thus implementing a minimal processing network. In NEST this is realized by the parrot_neuron, a neuron model that emits a spike for each spike received. In NEURON the repeater neurons are of type IntFire1 equipped with very high input synaptic weights and zero refractory time, thus enforcing the neuron to spike after each input spike. For the rate and Poisson encoder, the encoder neurons have a low firing rate between 1 and 2 Hz. Except for NEST (7 processes) and NEURON (40 processes), each process in the toolchain runs on one dedicated process. 9 Bandwidth Apart from the computational limitations of simulating neurons, communication is another potential bottleneck in this toolchain. Parts of the toolchain are communicating action potentials (events) between different processes (i.e. from encoder to NEST). In order to investigate the influence of the communication on the real-time performance, we use a rate based encoder and measure the real-time factor as a function of the firing rate of the encoding neurons. We choose the amount of neurons close to the border of real-time capability, so that we can see an immediate impact of the firing-rate on the performance of the toolchain. Latency The latency between sensory input and motor output can be crucial for the robotic application. A fast reaction time is needed for many applications (for example, catching a ball). In order to measure the latency (or reaction time), we artificially disturb the sensory signal of the robotic simulator, switching discontinuously from the minimum to the maximum sensor range. A very simple encoder responds to this change by beginning to produce spikes, which the neural simulator receives over its MUSIC Event In Proxy and repeats its the MUSIC Event Out Proxy (see Figure 1). A decoder responds to the arrival of this spike train by producing a motor command, which is conveyed over ROS to the robotic simulator. The latency of the tool chain is therefore the wall-clock time between the change in the sensory signal and the reception of the motor signal. Overhead For measuring the input scalability as described above, we use a MUSIC time step equal to the ROS update rate. This minimizes the communication overhead as only new data is communicated. As latency depends on the MUSIC time step, we additionally investigate the communication overhead of the toolchain. To do this, we determine the realtime factor of the toolchain, using a simple rate encoding mechanism, whilst systematically varying the MUSIC time step and the number of simulated neurons. 3 Results Figure 2 shows the effect of the computational load of the different encoding mechanisms on the real-time factor, with and without neural simulators involved in the toolchain. For the rate or Poissonian encoding mechanisms (Figure 2a,b), simulations of up to 150, 000 encoding neurons are possible in real-time when using NEST or when the toolchain does not include a neural simulator. When using NEURON, the real-time factor breaks down at about 1000 neurons. For the NEF encoding mechanism (Figure 2c), simulations of up to 20, 000 encoding neurons are possible in real-time when using NEST or no neural simulator in the toolchain. In this case too, the performance when using NEURON breaks down at about 1000 neurons. 10 a b c real­time factor 1.0 0.9 0.8 0.7 0.6 102 103 104 105 106 102 103 104 105 106 102 103 104 105 106 # neurons # neurons # neurons Figure 2: Scalability of the toolchain. Real-time factor as a function of the number of neurons used for encoding using different encoders: a) rate encoding mechanism; b) Poissonian encoding mechanism; c) NEF encoding mechanism. In each panel, the black curve shows the real-time performance in the absence of a neuronal simulator, the red curve shows the performance using NEST and the blue curve the performance using NEURON. 11 b 1.0 0.30 0.25 0.9 latency (s) real­time factor a 0.20 0.8 0.10 0.7 0.6 0.15 0.05 20 40 60 80 firing rate (spikes/sec) 100 0.00 0.01 0.02 0.03 0.04 MUSIC time step (s) 0.05 Figure 3: Bandwidth limitations of the toolchain. a) Real-time factor as a function of neuronal firing rate per neuron for a regular rate encoder of 50, 000 neurons without a neural simulator (black curve) and with NEST (red curve). b) Latency as a function of MUSIC time step without a neural simulator (black curve), with NEST (red curve) and with NEURON (blue curve). These results demonstrate that the NEF encoder is computationally more expensive than either the rate or Poissonian encoders, and that NEURON is computationally expensive in this context, limiting the real-time performance to 1000 neurons regardless of which encoding mechanism is used. The breakdown of the real-time performance of the regular rate and Poissonian encoders happens at about the same amount of neurons, which leads to the question what the actual bottleneck of the toolchain is in these cases. Computational complexity is only one limiting factor in this toolchain; another candidate is the communication. But as Figure 3a shows, the real-time factor breaks down at about 40 Hz using 50, 000 encoding neurons. In other words, the toolchain is able to communicate about 2, 000, 000 spikes per second, which is more than was required for the simulations measured in Figure 2. Thus we can conclude firstly that communication was not the bottleneck for the previous experiment, and secondly that not just the number of the encoding neurons but also their firing rate can be a limiting factor for the real-time performance. Figure 3b shows the latency of the toolchain, i.e. the difference in time between a change in sensory input and 12 MUSIC time step (ms) 5000 30000 55000 80000 105000 130000 155000 180000 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 real­time factor 1 5 10 15 20 25 30 35 40 45 50 #neurons Figure 4: Real-time factor as a function of the MUSIC time step and number of neurons. receiving a motor command evoked by that change (see Section 2.3.1). The latency increases linearly with the MUSIC time step; a MUSIC time step of 1 ms, results in a latency of about 70 ms, growing to around 350 ms for a time step of 50 ms when using a neural simulator. In general, the presence of a neural simulator in the toolchain increases the latency slightly, independently of which simulator is chosen. Figure 4 depicts the dependency of real-time capability of the toolchain on the MUSIC time step. The border of real-time simulation capability increases linearly with the MUSIC time step, from 10, 000 neurons for a time step of 1 ms to 185, 000 neurons for a 50 ms time step. However, as demonstrated in Figure 3b, the latency also increases with the MUSIC time step. From these results, we conclude that the latency and the dimensionality of the input are two conflicting properties, which have to be balanced for the specific use case. 13 3.1 Implementation of a Braitenberg Vehicle Figure 5: A Braitenberg Vehicle simulated in Gazebo, controlled by simulated neurons in NEST with the use of the ROS-MUSIC toolchain. The inset shows the spiking activity of the two controlling neurons. As an example for the usage of the toolchain, we created a Braitenberg Vehicle III “Explorer” (Braitenberg, 1986) which is simulated in the robotic environment Gazebo (see Figure 5). The Braitenberg Vehicle is implemented as a fourwheeled mobile robot with an attached laser scanner for sensory input. With the use of the ROS-MUSIC toolchain, two neurons, simulated in NEST, control this vehicle to avoid obstacles. A video of the demonstration can be found in the supplementary material and the source code is available on GitHub7 . 4 Discussion We have described our plug-in for MUSIC, which allows any neuronal network simulator implementing a MUSIC interface to communicate with any robotics simulators implementing a ROS interface. The plug-in converts continuous signals 7 https://github.com/weidel-p/ros_music_adapter 14 from a robotics simulator into spike train signals for a neuronal network simulator and vice versa. We showed that the toolchain allows real-time performance for a wide range of configurations and provided a simple working example. In the following, we discuss limits and perspectives for this approach. Performance Dependent on the choice of encoder, our toolchain allows the simulation of around 20, 000 neurons with a NEF encoder and up to 150, 000 neurons with a regular rate or Poisson encoder and achieve real-time performance. Using the NEF encoder, it is recommended to have at least 100 neurons per input dimension in order to encode and decode stimuli with root-mean-square errors of less than 1% (Eliasmith & Anderson, 2004), meaning that our toolchain can encode a 200-dimensional input with NEF in real time on a single process of our hardware. If a higher dimensional input is required, there are two solutions at hand. First, the NEF encoder could be parallelized and run in more than one process. Second, if a less sophisticated but computationally cheaper way of encoding is acceptable for the scientific question at hand, we also provide regular rate and Poissonian encoding mechanisms. A previous neurorobotic interface implemented the communication between ROS and the neural simulators on the Python level (Hinkel et al., 2015). Although no performance data were published in that study, it is clear that the performance would be strongly limited by this approach. Another critical characteristic of the toolchain is the latency between sensory input and motor command output of the toolchain, or in other words the reaction time. To minimize the overhead and avoid repeated communication of the same data, it makes sense to set the MUSIC time step equal to the sensory update or motor command rate. However, Figure 3 demonstrates that this leads to a rather high latency. The architecture of communicating processes currently carries an unavoidable source of latency, since data is buffered in MUSIC for every pair of communicating processes. In any chain of communicating processes, the latency due to buffering will thus grow in proportion to the length of the chain. In future work, this can be tackled by combining multiple adapter, encoder and decoder steps in a single process, thus simultaneously minimizing communication and reaching a lower latency, and/or by introducing non-buffered inter-process communication. Combining adapters, encoders and decoders can be realised using a plug-in adapter API which maintains independence between the software components. Complexity of neuronal simulations In our measurements of the toolchain incorporating NEST and NEURON, we used only minimal networks solving no particular task. However, neural network models can rapidly become computationally complex, especially when incorporating 15 synaptic plasticity, large network sizes, or multi-compartment neuron models. Such models would be impossible to run in real-time using the current approach. In some cases this issue could be solved by increasing the computational resources, using a cluster or supercomputer (Helias et al., 2012; Kunkel et al., 2014). However, this does not guarantee real-time execution, as neuronal network simulators do not have perfect scaling, due to serial components in their algorithms and communication overhead. Even if the problem can theoretically be addressed in real-time by increasing resources, it might not be feasible to access the quantity required. An alternative prospect is offered by neuromorphic hardware, i.e. hardware purpose built for simulation/emulation of neuronal networks. Two examples that are being developed within the framework of the Human Brain Project are SpiNNaker (Furber et al., 2013) and NM-PM1 (Schemmel et al., 2010), which have the potential to speed up the neuronal simulation massively. In particular SpiNNaker has great potential for neurorobotic applications and an interface between SpiNNaker and MUSIC is already in the prototype phase. This development enhances the value of the toolchain we describe for the neurorobotic community. Whereas the real-time property is important for robotic control, it is not nearly so important for addressing questions in the field of computational neuroscience. Here, the advantage of the toolchain is that a neuronal network simulation can be provided with rich sensory input from an agent interacting with an environment that is easy for the researcher to configure. In this case, arbitrarily computationally demanding networks can be coupled with robotics simulators simply by slowing down the latter to compensate - gazebo, for example, provides a parameter to conveniently control the time scaling. Applications The toolchain we describe gives researchers in computational neuroscience the possibility to test their hypothesis and models under more realistic conditions of noisy sensory input, and researchers in neurorobotics the opportunity to investigate more realistic neurally based controllers. One area of potential interest is the ability to construct interactions between robotic simulators and hybrid neuronal simulations on multiple scales, e.g. a network of point neuron models into which detailed biophysical models are embedded, simulated by NEST and NEURON respectively. This demonstrates a further advantage of the MUSIC-based interaction over pairings of particular simulators or the Python-based interaction presented by Hinkel et al. (2015). Moreover, our toolchain is particularly well suited for studying closed-loop scenarios, where the neural network receives stimuli from a complex environment and produces an output, which in turn causes the robotic agent to perform actions within that environment. For example, a robotic agent can be placed in a classic experimental set-up like a T-maze and the behaviour of the robot adapted by a neurally implemented reinforcement learner (Jitsev et al., 2012; Potjans et al., 2011; Frémaux et al., 2013; Friedrich & Lengyel, 2015). Here, there is a clear advantage over studying such 16 questions just using neural simulators, as the representation of an external environment as a collection of neural recorders and stimulators is complex, and difficult to either generalize or customize. By separating the concerns of environmental, motor, and sensory representation from those of neural processing, our toolchain provides a highly flexible and performant research approach. Acknowledgments We thank Karolína Korvasová, Tom Tetzlaff and Jenia Jitsev for helpful discussions, and Jenia also for his comments on an earlier version of this manuscript. We acknowledge partial support by the German Federal Ministry of Education through our German-Japanese Computational Neuroscience Project (BMBF Grant 01GQ1343), EuroSPIN, the Helmholtz Alliance through the Initiative and Networking Fund of the Helmholtz Association and the Helmholtz Portfolio theme “Supercomputing and Modeling for the Human Brain” and the European Union Seventh Framework Programme (FP7/2007-2013) under grant agreement no. 604102 (HBP). We also thank the INCF for travel support enabling work meetings. References Antonelo, E. A., Schrauwen, B., Dutoit, X., Stroobandt, D., & Nuttin, M. (2007). Event Detection and Localization in Mobile Robot Navigation Using Reservoir Computing. In J. M. de Sá, L. A. Alexandre, W. Duch, & D. Mandic (Eds.), Artificial Neural Networks – ICANN 2007, Volume 4669 of Lecture Notes in Computer Science, Berlin, Heidelberg, pp. 660–669. Springer Berlin Heidelberg. Averbeck, B. B. (2009). Poisson or not Poisson: differences in spike train statistics between parietal cortical areas. Neuron 62 (3), 310–1. Braitenberg, V. (1986). Vehicles: Experiments in synthetic psychology. MIT press. Calvin, W. H., & Stevens, C. F. (1967). Synaptic noise as a source of variability in the interval between action potentials. Science (New York, N.Y.) 155 (3764), 842–4. Chorley, P., & Seth, A. K. (2008). Closing the sensory-motor loop on dopamine signalled reinforcement learning. In From Animals to Animats 10, pp. 280–290. Springer. Dasgupta, S., Wörgötter, F., & Manoonpong, P. (2013). Information dynamics based self-adaptive reservoir for delay temporal memory tasks. Evolving Systems 4 (4), 235–249. 17 Dayan, P., & Abbott, L. F. (2001). Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. Djurfeldt, M., Hjorth, J., Eppler, J. M., Dudani, N., Helias, M., Potjans, T. C., Bhalla, U. S., Diesmann, M., Kotaleski, J. H., & Ekeberg, Ö. (2010). Run-time interoperability between neuronal network simulators based on the music framework. Neuroinformatics 8 (1), 43–60. Eliasmith, C., & Anderson, C. H. (2004). Neural engineering: Computation, representation, and dynamics in neurobiological systems. MIT press. Eppler, J. M., Pauli, R., Peyser, A., Ippen, T., Morrison, A., Senk, J., Schenck, W., Bos, H., Helias, M., Schmidt, M., Kunkel, S., Jordan, J., Gewaltig, M.-O., Bachmann, C., Schuecker, J., Albada, S., Zito, T., Deger, M., Michler, F., Hagen, E., Setareh, H., Riquelme, L., Shirvani, A., Duarte, R., Deepu, R., & Plesser, H. E. (2015). Nest 2.8.0. Frémaux, N., Sprekeler, H., & Gerstner, W. (2013). Reinforcement Learning Using a Continuous Time Actor-Critic Framework with Spiking Neurons. PLoS Computational Biology 9 (4), e1003024. Frémaux, N., Sprekeler, H., & Gerstner, W. (2013). Reinforcement learning using a continuous time actor-critic framework with spiking neurons. PLoS Comput Biol 9 (4), e1003024. Friedrich, J., & Lengyel, M. (2015). Goal-directed decision making with spiking neurons. Furber, S. B., Lester, D. R., Plana, L. A., Garside, J. D., Painkras, E., Temple, S., & Brown, A. D. (2013). Overview of the spinnaker system architecture. Computers, IEEE Transactions on 62 (12), 2454–2467. Gewaltig, M.-O., & Diesmann, M. (2007). Nest (neural simulation tool). Scholarpedia 2 (4), 1430. Hanuschkin, A., Kunkel, S., Helias, M., Morrison, A., & Diesmann, M. (2010). A general and efficient method for incorporating precise spike times in globally time-driven simulations. Frontiers in neuroinformatics 4 (October), 113. Helias, M., Kunkel, S., Masumoto, G., Igarashi, J., Eppler, J. M., Ishii, S., Fukai, T., Morrison, A., & Diesmann, M. (2012). Supercomputers ready for use as discovery machines for neuroscience. Front Neuroinform 6 (26), 2. Hines, M., & Carnevale, N. T. (2001). Neuron: a tool for neuroscientists. The Neuroscientist 7 (2), 123–135. Hinkel, G., Groenda, H., Vannucci, L., Denninger, O., Cauli, N., & Ulbrich, S. (2015). A Domain-Specific Language (DSL) for Integrating Neuronal Networks in Robot Control. In Proceedings of the 2015 Joint MORSE/VAO Workshop on Model-Driven Robot Software Engineering and View-based Software-Engineering, MORSE/VAO ’15, New York, NY, USA, pp. 9–15. ACM. 18 Jitsev, J., Morrison, A., & Tittgemeyer, M. (2012). Learning from positive and negative rewards in a spiking neural network model of basal ganglia. In Neural Networks (IJCNN), The 2012 International Joint Conference on, pp. 1–8. IEEE. Kunkel, S., Schmidt, M., Eppler, J. M., Plesser, H. E., Masumoto, G., Igarashi, J., Ishii, S., Fukai, T., Morrison, A., Diesmann, M., et al. (2014). Spiking network simulation code for petascale computers. Frontiers in neuroinformatics 8 (78). Legenstein, R., & Maass, W. (2014). Ensembles of spiking neurons with noise support optimal probabilistic inference in a dynamically changing environment. PLoS Comput Biol 10 (10), e1003859. Moren, J., Sugimoto, N., & Doya, K. (2015). Real-time utilization of system-scale neuroscience models. Journal of the Japanese Neural Network Society 22 (3), 125–132. Morrison, A., Aertsen, A., & Diesmann, M. (2007). Spike-timing-dependent plasticity in balanced random networks. Neural computation 19 (6), 1437–67. Potjans, W., Diesmann, M., & Morrison, A. (2011). An imperfect dopaminergic error signal can drive temporal-difference learning. PLoS Comput Biol 7 (5), e1001133. Quiñonez, Y., Ramirez, M., Lizarraga, C., Tostado, I., & Bekios, J. (2015). Autonomous Robot Navigation Based on Pattern Recognition Techniques and Artificial Neural Networks. In J. M. F. Vicente, J. R. Álvarez-Sánchez, F. d. l. P. López, F. J. Toledo-Moreo, & H. Adeli (Eds.), Bioinspired Computation in Artificial Systems, Number 9108 in Lecture Notes in Computer Science, pp. 320–329. Springer International Publishing. Quigley, M., Conley, K., Gerkey, B., Faust, J., Foote, T., Leibs, J., Wheeler, R., & Ng, A. Y. (2009). Ros: an open-source robot operating system. In ICRA workshop on open source software, Volume 3, pp. 5. Rotter, S., & Diesmann, M. (1999). Exact digital simulation of time-invariant linear systems with applications to neuronal modeling. Biological cybernetics 81 (5-6), 381–402. Schemmel, J., Bruderle, D., Grubl, A., Hock, M., Meier, K., & Millner, S. (2010). A wafer-scale neuromorphic hardware system for large-scale neural modeling. In Circuits and systems (ISCAS), proceedings of 2010 IEEE international symposium on, pp. 1947–1950. IEEE. 19
9cs.NE
1 Sensor Fault Detection, Isolation and Identification Using Multiple Model-based Hybrid Kalman Filter for Gas Turbine Engines* arXiv:1505.02063v2 [cs.SY] 27 Aug 2015 Bahareh Pourbabaee1 , Nader Meskin2 and Khashayar Khorasani1 Abstract In this paper, a novel sensor fault detection, isolation and identification (FDII) strategy is proposed by using the multiple model (MM) approach. The scheme is based on multiple hybrid Kalman filters (HKF) which represents an integration of a nonlinear mathematical model of the system with a number of piecewise linear (PWL) models. The proposed fault detection and isolation (FDI) scheme is capable of detecting and isolating sensor faults during the entire operational regime of the system by interpolating the PWL models using a Bayesian approach. Moreover, the proposed multiple HKF-based FDI scheme is extended to identify the magnitude of a sensor fault by using a modified generalized likelihood ratio (GLR) method which relies on the healthy operational mode of the system. To illustrate the capabilities of our proposed FDII methodology, extensive simulation studies are conducted for a nonlinear gas turbine engine. Various single and concurrent sensor fault scenarios are considered to demonstrate the effectiveness of our proposed on-line hierarchical multiple HKF-based FDII scheme under different flight modes. Finally, our proposed HKF-based FDI approach is compared with various filtering methods such as the linear, extended, unscented and cubature Kalman filters (LKF, EKF, UKF and CKF, respectively) corresponding to both interacting and non-interacting multiple model (MM) based schemes. Our comparative studies confirm the superiority of our proposed HKF method in terms of promptness of the fault detection, lower false alarm rates, as well as robustness with respect to the engine health parameters degradations. I. INTRODUCTION An effective fault detection, isolation and identification (FDII) technology can play a crucial role in improving the system availability, safety and reliability as well as reducing the maintenance costs and risks of catastrophic failures. Over the past few years, many researchers have focused on proposing sophisticated fault detection and isolation (FDI) schemes constituting as a significant component of an FDII solution [1] and [2]. The general methodology for an FDII consists of several important steps including: (a) generation of residuals as indicators of faults, (b) isolation of the faulty actuator, or sensor, or component element, and (c) identification and estimation of the severity of the fault parameter. The FDII approaches can be categorized into three distinct groups including the modelbased, data-based and hybrid methods [3] and [4]. The model-based FDI approaches have been introduced in survey papers [1], [2] and [5]–[7] and can be grouped into basic approaches, namely (i) Kalman filter and unknown input observer based approaches, (ii) parity relations, (iii) optimization-based algorithms, and (iv) parameter estimation and identification techniques. *This publication was made possible by NPRP grant No. 4 - 195 - 2 - 065 from the Qatar National Research Fund (a member of Qatar Foundation). The statements made herein are solely the responsibility of the authors. 1 B. Pourbabaee and K. Khorasani are with the Department of Electrical and Computer Engineering, Concordia University, Montreal, Canada. b [email protected] and [email protected]. 2 N. Meskin is with the Department of Electrical Engineering, Qatar University, Doha, Qatar. [email protected]. August 28, 2015 DRAFT 2 Multiple model approach is a popular structure for FDII. It enables one not only to detect and isolate different faults but it also provides one with information on the magnitude of the fault and its identification information [8]–[13]. Since early research on FDII, gas turbines have been one of the challenging application areas which have received much attention. The main approach in gas turbines FDII is based on the Gas Path Analysis (GPA), which enables one to accomplish the actuator, sensor and component diagnosis by observing the engine’s parameters such as the rotor speed, temperature and pressure at different stages and the fuel flow rates [14]. Various fault diagnosis techniques have been developed for gas turbines based on GPA ranging from Kalman filters [15]–[18], neural networks [19], fuzzy logic [20], genetic algorithms [21], sliding mode observer [22], component adaptation approach [23] - [24], and hybrid diagnosis [4]. Some of the linear approaches have been extended to fully nonlinear models of the engine that have led to nonlinear extensions of the Kalman filters to extended Kalman filters (EKF) and unscented Kalman filters (UKF) [12] and [25]. In this paper, a modular and a hierarchical non-interacting MM-based approach is proposed for both single and concurrent permanent sensors fault detection and isolation in a single spool jet engine. In our proposed hierarchical approach, multiple levels of detection filters are used to detect and isolate concurrent faults where at each time only one level of the scheme is active according to the engine sensors health status. We also propose a hybrid Kalman filter (HKF) [17] scheme that consists of a single nonlinear on-board engine model (OBEM) augmented with piecewise linear (PWL) models constituting as the MM-based estimators to cover the entire engine operating regime. Also, the discrete-time derivation of the HKF is formally shown in this paper. Therefore, multiple HKFs are constructed to ensure that the FDII algorithm works effectively in a wide range of operating conditions by decomposing the engine operating range into sub-regions each represented by a PWL model. We then apply a Bayesian approach to generate a general combined model based on the PWL models normalized weights. This provides us with a soft transition or interpolation among the PWL models. At any given operating point, the combined model represents the nonlinear system dynamics with less error than a single PWL model. For interpolating the PWL models, various techniques are available in the literature including Takagi-Sugeno fuzzy models [26], the functional state approach using discrete representations such as automaton for describing the transitions between regions [27], Markov mixtures of experts to define the transitions [28], etc. Unlike the functional state approach, the Bayesian and fuzzy approaches enable soft transitions among the PWL models as the operating condition changes between various points. Moreover, the Bayesian approach uses the statistical method to infer the applicable and most appropriate operating regime at each time instant. Sensor fault severity identification is another important part of our proposed FDII framework which may either be utilized for reconstructing the correct sensor measurements to design an output feedback control strategy or to remove the faulty sensor from the measurement set. The reconstructed fault-free system outputs are essential for a normal closed-loop system operation with a faulty sensor in order to maintain the system stability and set-point tracking under faulty situations [29]. Towards this end, we have integrated the generalized likelihood ratio (GLR)based method [30]–[32] with our MM-based scheme to estimate the sensor fault severity under various single and concurrent fault scenarios. The MM-based scheme does provide us with the time and location of a sensor fault that subsequently simplifies the use of the GLR method without requiring to solve an optimization problem for determining the fault detection time as part of its fault estimation process. August 28, 2015 DRAFT 3 One of the major non-fault related factors leading to false alarms in a given FDI scheme arises due to the normal aging effects of the engine components such as compressor fouling, turbine erosion and wear or buckling of a component. The above phenomena are associated with gradual degradation of the health parameters from their healthy reference baselines, which is a type of modeling uncertainty. Different approaches, including the robust generation and evaluation methods, are introduced in [33] to improve the robustness of the on-line FDI algorithm with respect to modeling uncertainties. In [34], modeling uncertainty is assumed as the structured input with known distribution matrix and certain rank conditions in order to design a decoupling filter to achieve the robustness. However, in most applications including ours, usually it is challenging to model the uncertainty in a structured format. Therefore, robust residual evaluation methods in which the adaptive threshold is designed based on the upper bound of the unstructured modeling uncertainty that use the historical data have been introduced. Nevertheless, it is required to design an individual threshold for each fault type. In addition, in few works such as [4], a periodic updating mechanism is used for the on-board engine model in order to enhance the robustness and the fault sensitivity. In our paper, it is assumed that the reference baselines for the engine health parameters, namely the efficiencies and the mass flow rates of the turbine and the compressor, can be estimated after a certain number of flights by using an off-line health monitoring module [35] for determining the percentages of degradations. The applied method can be utilized off-line in a ground station given that the health parameters are degraded more slowly as compared to an abrupt fault. Consequently, in order to ensure the reliability of our proposed FDII scheme during the engine life cycle, the reference baselines are periodically updated for the OBEM health parameters. This procedure will be useful in preventing occurrence of false alarms due to the engine health parameters degradations. Despite this updating process, there is always a mismatch between the values of the real engine health parameters and the ones that are used in the OBEM due to the off-line estimation errors of the health monitoring method. Therefore, we will also investigate the robustness of our proposed FDII scheme with respect to various estimation errors through performing Monte Carlo simulations. To summarize the main contributions of this paper can be stated as follows: 1) The explicit derivations of the discrete-time HKF scheme is formally provided in Appendix A to complement the continuous-time HKF scheme derivations provided in [17]. 2) A modular and hierarchical non-interacting MM-based HKF structure is developed to detect and isolate single and concurrent sensor faults during the entire engine operating regime (flight profile) having lower fault detection time and better robustness towards the engine health parameters degradations as compared with the other linear and nonlinear filtering methods in the literature. Our method is capable of operating during the entire engine life cycle through periodically updating the reference baselines of the engine health parameters for the nonlinear OBEM. In addition, the computational time of our proposed method is lower than the investigated linear and nonlinear methods. 3) Through performing extensive simulation studies and measuring the mean of residual signals, it is shown that the HKF is capable of estimating the engine outputs more accurately with less number of operating points and false alarm rates as compared to multiple linear Kalman filters (MLKF) based FDI method. 4) Our proposed MM-based HKF structure is integrated with the GLR scheme to estimate the fault severity. This is accomplished by specifically eliminating the estimation of the fault detection time which is a necessary step in the standard GLR scheme. August 28, 2015 DRAFT 4 5) Our proposed multiple HKF-based FDI scheme is compared with the MM-based schemes that utilize various linear and nonlinear filtering approaches such as the linear Kalman filter (LKF), extended Kalman filter (EKF), unscented Kalman filter (UKF) and the cubature Kalman filter (CKF) in terms of the promptness of the fault detection, false alarm and incorrect fault detection rates, robustness with respect to the engine degradations and computational time. This paper is the extended version of [36] from both theoretical and case-based simulation scenarios perspectives. Theoretically, we formally show how the HKF is derived and how the previously proposed sensor FDI algorithm in [36] is integrated with the GLR method to investigate the sensor fault identification problem. The case study scenarios are also extended from the following perspectives, namely (a) different single and concurrent sensor faults are considered, (b) the reductions in the fault detection times, lower false alarms and incorrect fault detection rates under various parameter uncertainty levels are investigated, and (c) our proposed FDI scheme is compared with linear and nonlinear observer-based methods in the literature (LKF, EKF, UKF, and CKF) in terms of fault detection time, robustness towards the engine health degradations and the computational time. The remainder of the paper is organized as follows. Section II provides the design of the HKF which includes the OBEM and the PWL models. The interpolation of the PWL models is provided in Section III, and Section IV describes the overall hierarchical MM-based FDI scheme applicable to both single and concurrent sensor faults. The modified GLR-based approach is developed and described in Section V for estimating the severity of a sensor bias fault. A number of Monte Carlo simulation scenarios and cases associated with various faults under multiple operational conditions are presented. Finally, comparisons with various linear and nonlinear filtering methods (LKF, EKF, UKF and CKF) are included in Section VI, and the paper is concluded in Section VII. II. HYBRID KALMAN FILTER (HKF) DESIGN An actual aircraft gas turbine engine, used for deriving the on-board engine model (OBEM), and which is used for on-line diagnostic analysis can be described according to the following representation: Ẋ(t) = Fc (X(t), H(t), U (t), ζ(t)), Y (t) = Gc (X(t), H(t)) + v(t), (1) where X(t) ∈ Rn , H(t) ∈ Rr , Y (t) ∈ Rq , U (t) ∈ Rp , ζ(t) ∈ R2 and v(t) ∈ Rq denote the engine state variables, health parameters, sensor measurements, input signals, and Gaussian zero-mean process and measurement noise at time t, respectively. The engine dynamics is also an implicit function of the ambient condition parameters including the ambient temperature and pressure. The ambient parameters are defined in terms of the environmental parameters including the altitude and the Mach number. The engine health parameters in (1) will become degraded from their healthy reference baselines during the entire engine life cycle. Moreover, it is assumed that the inputs and outputs of an actual engine are discretized with sufficiently small sampling period for performing simulation and implementation of our proposed on-line fault detection, isolation and identification (FDII) scheme. The discrete-time representation of the variables in (1) are denoted by X(k), Y (k), H(k), U (k), ζ(k) and v(k) with the discrete dynamic functions F and G replacing Fc and Gc , respectively. August 28, 2015 DRAFT 5 The hybrid Kalman filter (HKF) consists of two main blocks that include a nonlinear on-board engine model (OBEM) and multiple piecewise linear (PWL) models derived at different operating points to cover the entire engine operating range. The continuous-time fault-free representation of the OBEM which can also be derived based on thermodynamics laws is now given as follows: ẊOBEM (t) = fc (XOBEM (t), HOBEM (t), U (t)), YOBEM (t) = gc (XOBEM (t), HOBEM (t)), (2) where XOBEM (t) ∈ Rn and YOBEM (t) ∈ Rq denote the OBEM state variables and outputs. Both the actual engine and the OBEM operate in parallel under the same flight conditions. Moreover, HOBEM (t) ∈ Rr denotes the OBEM health parameters that can be represented by HOBEM (t) = λT h(XOBEM (t)), in which λ defines the OBEM health parameters degradation factors (reference baselines). This parameter is an all-ones vector for the OBEM that represents a healthy or nondegraded engine. It is also assumed that the OBEM health parameters can be periodically updated and λ is considered as fixed in between the updating intervals. In addition, h(XOBEM (t)) denotes a state-dependent smooth function that corresponds to the compressor and the turbine performance maps and is modeled as a polynomial function for our developed gas turbine engine model. The updating process for the OBEM health parameters will be described below in detail. Moreover, for performing simulation and implementations, the continuous-time OBEM model is assumed to be discretized with sufficiently small sampling period. The discrete-time representation of the variables in (2) are denoted by XOBEM (k), YOBEM (k), HOBEM (k) and U (k) with the discrete dynamic functions f and g replacing fc and gc , respectively. The continuous-time OBEM model is linearized and discretized at multiple operating points (corresponding to engine steady-state values) that are denoted by (Xssi , Ussi , Yssi ) with sufficiently small sampling period. The constructed multiple linear discrete-time state-space models is now given by: ∆Xi (k + 1) = A|Xssi ∆Xi (k) + B|Ussi ∆Ui (k), ∆Yi (k) = C|Xssi ∆Xi (k), (3) where i ∈ 1, . . . , L (L is the number of the operating points), A|Xssi , B|Ussi and C|Xssi denote the state-space matrices associated with the ith operating point, and ∆Xi (k) = XOBEM (k) − Xssi , ∆Yi (k) = YOBEM (k) − Yssi and ∆Ui (k) = U (k) − Ussi . In the Appendix A, the linearization and discretization process of the continuous-time OBEM model is described in more detail. In this paper, it is assumed that the OBEM linearized models are obtained with the health parameters that are set to their healthy reference baselines. Also, the health parameter effects due to changes in the engine state variables have been implicitly incorporated into the matrices A and C, although the deviations from the healthy reference baselines are not incorporated in the linear models. For each linearized model, an off-line linear Kalman filter is designed to estimate both the actual engine states and sensor outputs as follows: ∆X̂i (k + 1) = A|Xssi ∆X̂i (k) + B|Ussi ∆Ui (k) + Kssi (Y (k) − Ŷi (k)), ∆Ŷi (k) = C|Xssi ∆X̂i (k), (4) where ∆X̂i (k) = X̂(k) − Xssi , ∆Ŷi (k) = Ŷ (k) − Yssi and Kssi denotes the steady-state Kalman filter gain matrix. For the purpose of constructing the multiple model HKFs, the steady-state Kalman gain matrices as well as the matrices A|Xssi and C|Xssi that are constructed associated August 28, 2015 DRAFT 6 with multiple operating points are stored in a look-up table. According to (4), the linear Kalman filter does not take into account the effects of the health parameter degradations from their healthy reference baselines since the state-space matrices have already been determined for an all-ones λ. Consequently, it does not have the required level of robustness for handling a vast number of health degradations that occur during the entire engine life cycle. Therefore, it is essential to update the health parameter reference baselines of the OBEM to maintain the reliability and accuracy of the state estimates and the performance of the FDII scheme through out the entire engine life cycle operation. For this purpose, the health parameter reference baselines can be estimated by an off-line health monitoring system and then periodically updated in the discretetime OBEM model. Therefore, the on-line FDII scheme is integrated with an off-line health monitoring system. The frequency of the health monitoring system updates is significantly lower than that of the on-line FDII algorithm, since the health degradation process is slow and gradual during one flight, although their accumulated effects after a number of flights may generate a large discrepancy between the OBEM and the actual engine. The off-line health monitoring module can either be a single augmented Kalman filter that estimates the health parameters based on the collected data during several flights or a nonlinear approximation method such as a neural network that receives the engine historical data. It must be noted that both the health monitoring and updating mechanism can be performed on-line having a sufficiently large sampling interval. However, the health parameter estimation process needs to be terminated whenever a fault occurs in the engine to avoid generating incorrect estimates of the health parameters. The off-line health monitoring module uses the collected input and the measured output data to estimate the health parameter reference baselines, that is λ̂. The estimated λ̂ is updated periodically in the OBEM model within a determined time interval T that is usually a given number of flights or days. The update process feeds λ̂ into the OBEM model so that the online FDII scheme can operate within the neighborhood of the degraded actual engine condition. Consequently, the OBEM model can now be re-written as follows: XOBEM (k + 1) = f (XOBEM (k), λ̂h(XOBEM (k)), U (k)), YOBEM (k) = g(XOBEM (k), λ̂h(XOBEM (k))). (5) It must be noted that the OBEM model that is provided in (2) is used only once for performing the linearization process with λ set to an all-ones vector, although the OBEM model in (5), with its reference baselines periodically updated, is the one that is utilized in our proposed HKF structure as well as in our on-line FDII scheme. For sake of notational simplicity, we use the same notations for the above two versions of the OBEM model. To construct the HKF representation we modify (4) where the steady-state variables are replaced by the OBEM states and outputs that are obtained from (5) and also by using the previously stored steady-state Kalman filter gain and state-space matrices as follows: X̂i (k + 1) − XOBEM (k + 1) = A|Xssi (X̂i (k) − XOBEM (k)) + Kssi (Y (k) − Ŷi (k)), Ŷi (k) = C|Xssi (X̂i (k) − XOBEM (k)) + YOBEM (k). (6) In the above model the effects of the input and the B matrix are eliminated from the HKF formulation given the fact that these have already been accounted for by the OBEM model. The procedure for derivation of the discrete-time HKF is formally shown in the Appendix A. August 28, 2015 DRAFT 7 Consequently, multiple HKFs are designed by using (6) for multiple operating points. After updating the OBEM health parameter reference baselines, there is no longer a need to recalculate the A|Xssi , C|Xssi and Kssi matrices for each operating point, since the effects of the health parameter degradations have been incorporated into the XOBEM and YOBEM as given by (5). One of the factors that can affect the efficiency of our proposed FDII algorithm is the estimation error of the off-line health monitoring module, that leads to mismatches between the actual engine and the OBEM outputs. Larger estimation errors may increase the fault detection time, and lead to occurrence of false alarms and incorrect fault detection rates. The acceptable ranges of the estimation errors that do not lead to false alarms and incorrect fault detection rates will be specified subsequently in Section VI for different health parameters under various healthy and faulty scenarios. Moreover, the reliability of our proposed on-line FDII strategy as a function of different mismatching factors between the actual operational engine and the OBEM (as represented by the reference baseline estimation errors (RBEE = |λ−λ λ̂| )) and the magnitude of the process and measurement noise signals will be investigated subsequently in Section VI by means of a confusion matrix analysis. In order to develop our proposed HKF-based scheme as an FDII strategy, multiple piecewise linear (PWL) models need to be generated for each fault hypothesis at various operating points. Moreover, the PWL models will be integrated and fused to cover the entire operational regime of an engine. The detail description of this process is provided below. III. P IECEWISE L INEAR M ODELS (PWL) I NTERPOLATION Any given linear model of a nonlinear system has a limited operating range in which it remains valid. Nevertheless, our ultimate goal is to obtain a globally valid model which is valid for the entire operating regime. Therefore, the full operating range is divided into several sub-regions where each is defined around an operating point for which a piecewise linear (PWL) model can be derived [37]. The PWL models can then be integrated in order to construct a parametervarying general model whose parameters are the PWL models weights that are obtained through an on-line Bayesian approach. This will provide one with a soft interpolation among the PWL models as opposed to a hard switching among them. In this paper, the engine inputs including the fuel flow rate and ambient variables are used to partition the engine operational regime into multiple operating points for which the PWL models are constructed. These operating points are associated with different flight conditions such as take-off, climbing, cruise and landing modes. The selected number of operating points depends on (a) the required HKF state estimation accuracy, (b) the FDII strategy reliability on correct decisions, and (c) false alarm rates within the range of the applied health parameter degradations. Hence, if there are no concerns on the memory utilization, the number of the operating points can be selected to be as high as possible to enhance the HKF estimation accuracy and the FDII scheme valid decision rates and also to decrease the false alarm rates. One of the important advantages of our proposed HKF scheme is in requiring a smaller number of operating points as compared to standard linear Kalman filters for covering an entire operational regime of the engine. This is facilitated and made possible due to substitutions of the steady-state variables in (6) by the OBEM state and output variables. The operating range of a PWL model in (4) is only limited to the neighborhood of a corresponding operating point, although this can be extended to a larger range in (6) given that XOBEM and YOBEM are changed according to the engine operating condition, which enable the PWL model to be valid in a wider range. August 28, 2015 DRAFT 8 Since, the sensor fault is injected into the actual gas turbine engine and not the OBEM, we have for the faulty engine X(k + 1) = F(X(k), H(k), U (k), ζ(k)), Y (k) = G(X(k), H(k)) + q X bs zs δ(k − kf s ) + v(k), (7) s=1 where F and G represent the discrete-time dynamic equations of the actual gas turbine engine, q is the number of sensors, bs represents the sth sensor bias fault magnitude and zs represents the fault location vector that has a unit value for the sth element while the other elements are set to zero, and δ(k − kf s ) denotes a unit step function that occurs at the sample kf s corresponding to the sth fault occurrence time. The bias is set to zero for the healthy sensor scenario. Therefore, there are a total of q + 1 sensor modes (corresponding to one healthy and q faulty sensor modes). The PWL models constructed for multiple operating points are now used to compute the corresponding Kssi for various sensor modes of the (7). The matrices A|Xssi , C|Xssi and Kssi are finally stored in a look-up table and are used to construct multiple HKFs (MHKFs) as given by (6) for all the sensor modes. Therefore, the HKF for the j th sensor mode at the ith operating point is designed as follows: X̂ (i,j) (k + 1) − XOBEM (k + 1) = Ai (X̂ (i,j) (k) − XOBEM (k)) + Kssi (Y (k) − Ŷ (i,j) (k)), Ŷ (i,j) (k) = C i (X̂ (i,j) (k) − XOBEM (k)) + YOBEM (k) + bdj aj δj (k), (8) where i = 1, . . . , L, j = 1, . . . , (q + 1), bdj denotes the pre-determined sensor bias fault that can be different from the actual sensor fault bs that is injected into (7), aj denotes the q-dimensional vector and is one of q + 1 modes of a which is the fault parameter vector. For the healthy mode or j = 1, the fault parameter vector, a, is set to a zero vector whereas for j = 2, . . . , q + 1, aj has a unit value for the (j − 1)th element and all the other elements are set to zero. Moreover, Ai = A|Xssi , C i = C|Xssi and Kssi are the previously stored state-space and Kalman gain matrices that depend on the ith operating point. Therefore, L × (q + 1) HKFs are constructed covering the entire engine operating range corresponding to different sensor modes. It must be noted that the state-space matrices depend only on the operating points but the Kalman gain matrices depend on both the operating points and the noise covariance matrices that are the same for all the sensor fault modes, given that the OBEM does not take into account the effects of sensor faults. Although the operating range of a PWL model in the HKF scheme has been increased as compared to that of the one that uses the standard linear Kalman filters by replacing the steadystate values with the OBEM variables, still none of the PWL models are solely valid over the entire operating range of an engine. Therefore, corresponding to each PWL model one can associate a validity function that is based on its normalized weight as obtained by means of the Bayes formula. For this purpose, the residual vectors γ (i,j) and the covariance matrices S (i,j) that are generated by the multiple HKFs are used to compute the likelihood function f (i,j) for the j th sensor mode at the ith operating region as follows: γ (i,j) (k) = Y (k) − Ŷ (i,j) (k), S (i,j) (k) = cov(γ (i,j) (k)), −1 1 p × exp[ (γ (i,j) (k))T (S (i,j) (k))(−1) (γ (i,j) (k))], f (i,j) (γ (i,j) (k)) = 2 (2π)q/2 |S (i,j) (k)| August 28, 2015 (9) DRAFT 9 where it is assumed that the innovation sequence generated by the hybrid Kalman filter, γ (i,j) (k), is a Gaussian white noise process with zero mean and covariance matrix S (i,j) (k) that is calculated numerically. The normalized weights for the j th sensor mode are updated recursively by using the Bayes formula as follows: f (i,j) (γ (i,j) (k))w(i,j) (k − 1) . w(i,j) (k) = PL (i,j) (γ (i,j) (k))w (i,j) (k − 1) i=1 f (10) The weights computed above should also remain outside a narrow bound to avoid becoming close to zero as: if w(i,j) (k) > ρ then w(i,j) (k) = w(i,j) (k), if w(i,j) (k) ≤ ρ then w(i,j) (k) = ρ, (11) where ρ is a design parameter that is determined by trial and error and it invokes the PWL models that have very small weights and it avoids them from being removed from the set of L models. It is also useful for numerical robustness of the recursive weight algorithm [38]. Following the computation of the normalized weights, multiple time-varying models are now constructed that cover the entire engine operating range subject to various sensor modes. For each sensor mode, the corresponding model state-space matrices as well as the weighted innovation vector and the covariance matrix are obtained by using the PWL model state-space matrices and their associated normalized weights as follows: Ajc (k) = L X w (i,j) i (k)A , Ccj (k) = i=1 γcj (k) = L X i=1 Ajc (k) L X w(i,j) (k)C i , i=1 w(i,j) (k)γ (i,j) (k), Scj (k) = L X (w(i,j) (k))2 S (i,j) (k), (12) i=1 Ccj (k) th denote the weighted state-space matrices of a linear time-varying model and where associated with the j sensor mode. Also, γcj (k) and Scj (k) denote the weighted innovation vector and the covariance matrix of the j th sensor mode, respectively. The above procedure is now designated as the PWL models interpolation. Consequently, (q + 1) weighted innovation vectors and covariance matrices that operate through out the entire engine operational regime are used in the next two sections to develop our proposed FDII scheme. IV. SENSOR FDI VIA MULTIPLE-MODEL-BASED SCHEME In this section, the overall structure of our proposed MM-based FDI scheme is presented. It is assumed that the fault parameter vector can take on only one of (q + 1) sensor modes as aj . Therefore, at each operating point there are (q + 1) PWL models; one for the healthy sensors scenario and q corresponding to various faulty sensor scenarios, that have been designed and integrated with only one OBEM for constructing the multiple HKF (MHKF)-based scheme as formulated in (8). The innovation vectors and the covariance matrices that are generated by the MHKFs are fused and weighted as given by (12). Finally, there are (q + 1) weighted innovation vectors and covariance matrices that are used in the MM-based FDI scheme, where they are operating under different healthy and faulty sensor scenarios during the entire engine operational regime. August 28, 2015 DRAFT 10 Y(k) U(k) OBEM 𝑿 ++ 𝒀𝑶𝑩𝑬𝑴 (𝒌) (𝒌 + 𝟏) (𝒊,𝒋) 𝑿 𝒁−𝟏 𝜸 𝟏,𝒋 (𝒌), 𝑺 𝟏,𝒋 (𝒌) (𝒌) +- 𝜸𝒄 𝟏 (𝒌), 𝑺𝒄 𝟏 (𝒌) 𝒘(𝟏,𝒋) 𝑳 ++ 𝑪𝒊 -+ 𝜸 𝟐,𝒋 (𝒌), 𝑺 𝟐,𝒋 (𝒌) 𝒘 𝒊,𝒋 𝒘(𝟐,𝒋) 𝒊=𝟏 + Ai 𝑲𝒔𝒔 𝒊 Offline PWL Kalman Filter 𝜸 𝒊,𝒋 (𝒌) 𝑺 𝒊,𝒋 PWL(i , j) Model from Look - up Table with dimension (L , q+1) 𝒊,𝒋 𝒊,𝒋 (𝒌) 𝜸 (𝒌), 𝑺 (𝒌) 𝒘(𝒊,𝒋) 𝜸 𝑳,𝒋 (𝒌), 𝑺 𝑳,𝒋 (𝒌) 𝒘(𝑳,𝒋) + ++ Combination of 𝒌 𝜸 𝒊,𝒋 (𝒌) L linear Models for jth Sensor Mode 𝒋 𝑳 (𝒘 𝒊,𝒋 (𝒌))𝟐 𝑺 𝒊,𝒋 (𝒌) 𝒊=𝟏 𝜸𝒄 𝟐 (𝒌), 𝑺𝒄 𝟐 (𝒌) 𝜸𝒄 𝒋 (𝒌), 𝑺𝒄 𝒋 (𝒌) 𝒋 𝜸𝒄 𝒌 , 𝑺𝒄 (𝒌) 𝑷𝟏 𝑷 𝟐 Conditional Hypothesis Probability 𝑷 𝒋 Calculator Equations (13) and (14) 𝑷𝒒+𝟏 MAX 𝝀 With Updating Interval T (𝒊,𝒋) Bayesian Weight Estimation 𝑿𝑶𝑩𝑬𝑴 (𝒌) Fault Detection & Isolation 𝜸𝒄 (𝒒+𝟏) (𝒌), 𝑺𝒄 (𝒒+𝟏) (𝒌) Fig. 1: The MM-based FDI scheme based on the HKF corresponding to multiple operating regime. A. Single Fault Detection and Isolation (FDI) Scheme In the MM-based approach [10]–[12], the hypothesis conditional probability Pj (k) is defined as the probability that the fault parameter a assumes the mode aj , j = 1, . . . , q+1, conditioned on the observed measurement history up to the k th sample, that is: Pj (k) = Pr[a = aj |Y(k) = Yk ], where Y(k) is the random vector measurement history with Y (1), Y (2), . . . , Y (k) partitions displaying the available measurements up to the k th sample time. Similarly, Yk is the measurement history vector realization that has the partitions of Y1 , Y2 , . . . , Yk . Therefore, the conditional probability can be computed recursively as follows: fY (k)|a,Y(k−1) (Yj |aj , Yk−1 )Pj (k − 1) , Pj (k) = Pq+1 ~=1 fY (k)|a,Y(k−1) (Yj |a~ , Yk−1 )P~ (k − 1) (13) where fY (k)|a,Y(k−1) (Yj |aj , Yk−1 ) denotes the Gaussian density function for the current measurement given by: fY (k)|a,Y(k−1) (Yj |aj , Yk−1 ) = (2π)q/2 1 q × exp[ Scj (k) −1 j (γ (k))T (Scj (k))(−1) (γcj (k))], 2 c (14) where γcj (k) and Scj (k) are given by (12). If the j th sensor mode occurs, the probability associated with the j th model will be larger than that of the others since its corresponding innovation vector and also the determinant of the covariance matrix will be much smaller than those that are predicted by the other filters and which are mismatched with the assumed fault scenario. Hence, the condition of the system and the location of a single faulty sensor can be detected and isolated based on evaluating Pj (k) and determining its maximum value. Consequently, our proposed MM-based approach is capable of detecting and isolating sensor faults. Fig. 1 shows the structure of the MM-based FDI scheme that employs the MHKFs for the entire engine operational regime. Our contribution here is the modification of our previously developed MM-based structure in [10] and [11] that utilizes only multiple standard linear Kalman filters and is designed for a single operating point into a general strategy that is applicable to the entire engine operational regime by means of the multiple HKF scheme and fusion and integration of the corresponding innovation vectors and covariance matrices. As we will describe in more detail in Section VI, in this paper five sensor faults are considered. Therefore, the total number of modes corresponding to each operating point of the jet engine is six, where mode #1 (P1 ) corresponds to the healthy engine sensors and modes #2 to #6 (P2 August 28, 2015 DRAFT 11 TABLE I: Operational modes corresponding to various possible two concurrent sensor faults. Level First #1 Healthy P2 P3 Second P4 P5 P6 Operational Modes #2 #3 #4 P2 P3 P4 P2 P2 P2 P2 P3 P4 P3 P3 P3 P2 P3 P4 P4 P4 P4 P2 P3 P4 P5 P5 P5 P2 P3 P4 P6 P6 P6 P2 P3 P4 #5 P5 P2 P5 P3 P5 P4 P5 P5 P5 P6 P5 #6 P6 P2 P6 P3 P6 P4 P6 P5 P6 P6 P6 to P6 ) correspond to a 3% sensor bias fault injected into sensors measuring the compressor exit temperature (P2 ) and pressure (P3 ), shaft rotational speed (P4 ), the turbine exit temperature (P5 ) and pressure (P6 ), respectively. B. Concurrent Fault Detection and Isolation (FDI) Scheme For detection and isolation of two concurrent faults in the gas turbine engine, a hierarchical MM approach is proposed in [9] and [11] as shown in TABLE I. In this scheme, it is assumed that the engine starts operating with healthy sensors when the first level of filters are active and the FDI scheme observes the sensors condition for occurrence of one of the five faulty modes. The active bank of filters operate based on the weighted innovation vectors and covariance matrices that are obtained in Section III. Once the first fault is detected and isolated according to the maximum probability criterion, the FDI scheme will activate the second level of the filters as shown in TABLE I for detection of the second concurrent faults. In our hierarchical MM scheme, it is assumed that the sensor faults do not occur simultaneously and there exists always a minimum time interval between the occurrence of two sensor faults that are called concurrent faults. TABLE I indicates all the possible configurations for the second bank of filters that are considered in the simulation results in Section VI. The first filter in the second level always corresponds to the detected faulty mode in the first level. For example, if the first filter detects a 3% bias in the compressor exit temperature sensor (P2 ), then the first and the second filters in the second level respectively correspond to P2 and the possibility of a larger bias fault within the compressor exit temperature sensor. Moreover, the third filter corresponds to the concurrent bias faults in the compressor exit temperature and pressure sensors (P2 and P3 ), the forth filter corresponds to P2 and P4 , etc. This structure can easily be extended to the third and higher levels that correspond to occurrence of multiple concurrent sensor faults. It must be noted that when the new bank of filters is activated in the second level, the first bank will be disabled in order to avoid adding any unnecessary computational burden. Therefore, at any given time only six filters are operating on-line. Remark 1. In this paper, the value of the pre-determined sensor bias fault severity, bdj as given by (8), is considered to be the same for all the filters and only one level of fault severity is considered for the hierarchical MM scheme, although various pre-determined sensor bias faults can easily be incorporated into our strategy by correspondingly increasing the number of filters that are used in this scheme. August 28, 2015 DRAFT 12 V. SENSOR FAULT IDENTIFICATION/ESTIMATION One of the important requirements of a general control system is the capability to integrate the FDI scheme with a fault identification or estimation module in order to estimate the severity of a fault that has occurred in different components of the system such as sensors and actuators. In this paper, a modified version of the generalized likelihood ratio (GLR) scheme is developed to estimate the severity of a sensor bias fault. The GLR was initially proposed by Willsky in [30] and was subsequently modified in [31], [32], [39] and [40]. This method is capable of estimating the time, location and severity of an occurred fault using a selected threshold. However, in this paper the occurrence time and location of a fault have already been determined by means of our proposed MHKF-based approach as presented in Section IV. Hence, the fault severity will be estimated through the development of a modified version of the GLR scheme. The GLR method is a detection-estimation scheme in which the time of a fault is an a priori information input to the estimation stage. In this paper, the GLR method is simplified by removing the detection process through integrating the GLR method with our proposed MM-based FDI scheme, and hence there is no longer a need to select a threshold for our FDII scheme. Let us assume that a bias fault has occurred in the sth sensor with the severity bs at the sample kf s and it is detected and isolated at the sample kds when the P1 (k) mode probability intersects with the P(s+1) (k) mode probability. Also, for k ≥ kds , P(s+1) (k) has the highest value among the other mode probabilities as shown mathematically by (s + 1) = argj max Pj (k). Therefore, the effects of the sth sensor fault still remain in the residual of the MHKF that is associated with the healthy mode. There are L PWL models corresponding to the healthy mode that will be used subsequently to estimate the fault severity as follows: i X̂ (i,1) (k + 1) − XOBEM (k + 1) = Ai (X̂ (i,1) (k) − XOBEM (k)) + Kss (Y (k) − Ŷ (i,1) (k)), Ŷ (i,1) (k) = C i (X̂ (i,1) (k) − XOBEM (k)) + YOBEM (k), (15) in which the j th index and bdj in (8) are equal to one and zero, respectively, that are designated to the healthy sensor mode. Therefore, the residual vector of the MHKF that is designed for the healthy sensor mode at any subsequent time can be expressed as follows: γ (i,1) (k) = bs Gis (k, kds )zs + v(k) for k ≥ kds , (16) where zs is defined in (7) and Gis (k, kds ) denotes the failure signature matrix that provides one with the information on the failure propagation through the filter, and which also depends on both kds and the sample time k at which the set of L innovation vectors are computed for the MHKFs associated with the healthy mode. The signature matrices for a sensor bias fault can be computed by using the recursive relations for the healthy mode MHKFs as follows [39]: Gis (k, kds ) = I − C i Ai Jsi (k − 1, kds ), i Jsi (k, kds ) = Ai Jsi (k − 1, kds ) + Kss Gis (k, kds ), (17) where Jsi (k, kds ) denotes the signature matrix for the state correction. The signature matrices Jsi (k, kds ) and Gis (k, kds ) are defined separately for the L operating points over a window of duration [kds , kds + N ], where N denotes the data samples window length. Also, it is assumed that Jsi (kds − 1, kds ) = 0. The weighted signature matrices for a detected fault that cover the entire operating range of the gas turbine engine can be computed as follows: August 28, 2015 DRAFT 13 Gs (k, kds ) = L X w(i,1) (k)Gis (k, kds ), i=1 Js (k, kds ) = L X w(i,1) (k)Jsi (k, kds ), (18) i=1 where w(i,1) (k) denotes the assigned weight to the ith PWL model that is designed for the healthy sensor mode. Therefore, the modified GLR test which consists of a maximum likelihood estimation (MLE) of bs when kds is known is used. For performing the maximization process, normally the log likelihood function is chosen as the GLR criterion as follows: J = kds +N X T γc1 (k)(Sc1 (k))(−1) γc1 (k) − kds +N X [γc1 (k) − bs Gs (k, kds )zs ]T (Sc1 (k))(−1) [γc1 (k) k=kds k=kds − bs Gs (k, kds )zs ], (19) where γc1 (k) and Sc1 (k) denote the weighted innovation vector and covariance matrix for the healthy sensor mode that are computed from (12). The maximization of the log likelihood function is associated with the minimization of the second summation in (19). It can easily be shown that the optimal solution to the MLE problem above is the estimated fault b̂s = dcss , that is the unbiased estimate of bs having the minimum variance as follows: ds = zsT kds +N X 1 (−1) 1 GT γc (k), s (k, kds )(Sc (k)) k=kds cs = zsT kds +N X 1 (−1) GT Gs (k, kds )zs . s (k, kds )(Sc (k)) (20) k=kds The above procedure can also be employed for estimating the severities of multiple concurrent faults that have already been detected and isolated by means of our proposed hierarchical MMbased FDI approach. Remark 2. In this paper, it is assumed that there is no feedback and information sent from the fault identification module to the FDI scheme; otherwise, the FDI scheme needs to have a variable structure for updating the pre-determined sensor bias faults based on the estimated faults severities. VI. SIMULATION RESULTS In this section, simulation results and performance evaluation of our proposed sensor FDII scheme as applied to several fault scenarios are presented for a nonlinear mathematical model of a commercial single spool jet engine previously developed in [12]. This model is generated based on the rotor, volume and heat transfer dynamic behavior and is also validated by the commercially available standard software GSP 10 [41]. The responses corresponding to our mathematical model and the GSP match each other within an acceptable error tolerance (below 5%). For this study, our model is extended to the entire flight profile and is simulated in the SIMULINK for use as both the actual engine and the OBEM model. The actual engine operates at a given health condition subject to the effects of process and measurement noise signals, whereas the OBEM health parameters reference baselines are periodically updated to their recently estimated values August 28, 2015 DRAFT 14 that are assumed to be generated by an off-line health monitoring module as described in Section II. Both the actual engine and the OBEM models operate in almost the same ambient conditions. The set of nonlinear state-space equations that are used for the engine model are given as follows: PCC [(cp TC λṁC ṁC + ηCC Hu ṁf − cp TCC λṁT ṁT ) − cv TCC (λṁC ṁC + ṁf TCC cv ṁCC γRTCC − λṁT ṁT )] + (λṁC ṁC + ṁf − λṁT ṁT ), VCC ηm λṁT ṁT cp (TCC − TT ) − λṁC ṁC cp (TC − Td ) , Ṅ = π 2 JN ( 30 ) 1 [(cp TC λṁC ṁC + ηCC Hu ṁf − cp TCC λṁT ṁT ) − cv TCC (λṁC ṁC + ṁf − λṁT ṁT )], ṪCC = cv mCC RTM β ṖT = (λṁT ṁT + λṁ ṁC − ṁn ), (21) VM β+1 C ṖCC = where X = [PCC , N, TCC , PT ]T denotes the state variable vector that includes the combustion chamber pressure PCC and temperature TCC , the rotational speed N and the turbine pressure PT . There is a single actuator that supplies the fuel flow well asi five h (u = ṁf ) asγ−1 PCC 1 T sensors measuring Y = [TC , PC , N, TT , PT ] , where TC = Td 1 + λη ηC [( Pd ) γ − 1] and C h i γ−1 T TT = TCC 1 − ληT ηT [1 − ( PPCC ) γ ] denote the compressor and the turbine temperatures, respectively. The variables PC and PT denote the pressures of the compressor and turbine, respectively. Moreover, H = [ηC , ηT , ṁC , ṁT ]T denotes the health parameter vector, where ηC and ηT denote the compressor and the turbine efficiencies, and ṁC and ṁT denote their mass flow rates, respectively. The health parameters are also multiplied by their corresponding health parameter degradation factors or the reference baselines λ = [ληC , ληT , λṁC , λṁT ]T . The sensors are affected by the Gaussian measurement noise with the standard deviations of SDv = [0.23, 0.164, 0.051, 0.097, 0.164]T corresponding to the percentages of output vector at the cruise condition as defined in [12]. More details on other variables and constants in (21) are provided in [12]. The flight condition is defined by two environmental variables, namely the altitude and the Mach number. The ambient temperature and pressure can be computed according to Tamb = Alt Ts − 6.5Alt and Pamb = Ps exp( −gM ), where Ts = 288 ◦ K and Ps = 1.01325 bar are set to the 1000 288R standard condition, R = 8.31447 is the gas constant, g is the gravitational acceleration, and M and Alt denote the Mach number and the altitude, respectively. Moreover, the ambient variables are affected by the Gaussian process noise with the standard deviations of SDζ = [0.01, 0.01]T corresponding to the percentages of standard conditions of ambient variables. The noise free values of the ambient parameters are applied to the OBEM model. Also, the same control input is applied to both the actual engine and the OBEM models. The system is simulated for 520 sec with the sampling rate of 0.01 sec. The profiles of the altitude, Mach number and the fuel flow rate are shown in Fig. 2. According to the overall structure of our proposed scheme, as shown in Fig. 1, six PWL models are constructed (q = 5) corresponding to each operating point for the five faulty sensor modes as well as the one healthy mode with the pre-determined sensor bias faults set to 3% of the engine steady-state outputs under the cruise condition. The states and sensor outputs August 28, 2015 DRAFT 15 2 0.3 0.25 0.2 0.15 x 10 4 1 1.8 0.9 1.6 0.8 1.4 0.7 Mach Number 0.35 Altitude (ft) Fuel Flow Rate (Kg/m2) 0.4 1.2 1 0.8 0.6 0.1 0.4 0.05 0 0 200 300 Time (Sec) (a) 400 500 600 0 0 0.5 0.4 0.3 0.2 0.2 100 0.6 0.1 100 200 300 Time (Sec) 400 500 600 0 0 100 200 300 400 500 600 Time (Sec) (c) (b) Fig. 2: Profiles of (a) the fuel flow rate, (b) altitude, and (c) the Mach number during a flight mission. TABLE II: The operating point specifications corresponding to the designed PWL models, where ṁf and Alt are measured in Kg/m2 and ft, respectively. Models Corresponding to Flight Conditions Operating Point 1 (Climbing) Operating Point 2 (Climbing) Operating Point 3 (Cruise) Operating Point 4 (Landing) Operating Point 5 (Landing) ṁf M Alt 0.38 0.38 0.25 0.3 0.3 0.2109 0.6585 0.85 0.5402 0.1203 4070.538 12708.33 16404.2 10424.87 2322.835 are estimated by means of our proposed MHKFs. Finally, six weighted matrices are calculated according to (12) and are applied in the MM-based scheme for detecting and isolating the sensor bias faults that occur at different points of the flight profile. For our simulations, the measurement and process noise covariance matrices are set to 0.01I and 0.1I, respectively, where I denotes an identity matrix. In this paper, the FDII scheme is implemented for the entire flight profile including the climbing, cruise and landing modes. Therefore, we assume and consider five operating points handling the entire flight profile (L = 5). This is the minimum number of the operating points that are obtained for each faulty mode that prevents the occurrence of a false alarm in the range of the applied health degradations. The number of the operating points depends on the dynamics of the engine as well as the range of the applied fuel flow rate and the environmental parameters. We simulated our proposed FDII scheme with different number of operating points and also derived a confusion matrix for each case in order to analyze the false alarm rates and to decide on the minimum required number of the operating points that does not lead to any false alarms for the injected health degradations. These details are not included here due to space limitations. TABLE II shows the corresponding fuel flow rates as well as the flight conditions corresponding to all the applied PWL models that are designed for each sensor mode. In order to efficiently track the variations of the system input during the climbing and landing conditions, two operating points are selected for each of these two modes; whereas only one operating point is selected for the cruise condition given the presence of a constant input. During the fault detection and isolation process, a mode probability Pj (k) is generated for each weighted model using (13) and by determining the maximum Pj (k), j = 1, . . . , q + 1, the sensor fault is detected and isolated. August 28, 2015 DRAFT 16 TABLE III: Fault detection time (FDT) corresponding to the maximum tolerable percentage of the RBEE (∆λ) at different stages of the flight profile. Faulty Scenario Fault on TC Fault on PC Fault on N Fault on TT Fault on PT Maximum Tolerable RBEE% Compressor Turbine Compressor Turbine Compressor Turbine Compressor Turbine Compressor Turbine ∆λṁC ∆λṁT ∆λṁC ∆λṁT ∆λṁC ∆λṁT ∆λṁC ∆λṁT ∆λṁC ∆λṁT = 2.52 = 2.52 = 1.01 = 1.01 = 1.21 = 1.01 = 0.2 = 0.1 = 0.3 = 0.3 ∆ληC ∆ληT ∆ληC ∆ληT ∆ληC ∆ληT ∆ληC ∆ληT ∆ληC ∆ληT = 2.52 = 1.51 = 1.01 = 0.30 = 2.02 = 0.81 = 0.2 = 0.1 = 0.3 = 0.1 kf = 50 3.7 3.5 7.8 3.4 6.5 6.5 7.8 6 7 8 Sensor FDT (sec) kf = 250 4.1 5.1 5.9 2.7 2.6 2.5 3 2.2 2.6 2.2 kf = 450 6.3 5.9 8 2.5 3.5 2.9 4.7 2.3 3.4 2.2 As described in Section I, the health parameter degradations due to the engine aging is one of the non-fault related factors that should be considered for a reliable and an accurate FDII strategy. Therefore, the performance of the FDII strategy is evaluated in presence of compressor or turbine health parameters degradations from their healthy reference baselines. Generally, there is a difference between the actual and the estimated health parameter reference baselines due to off-line health monitoring estimation errors and also due to effects of noise and disturbances. Therefore, the robustness of our proposed FDII scheme will also be evaluated subsequently in this section with respect to the percentage of the reference baselines estimation errors. A. Case 1: False Alarms Evaluation Many factors such as (i) the dynamic mismatch between the OBEM model and the actual engine model, (ii) the large estimation errors for an off-line health monitoring module, and (iii) the process and measurement noise, may lead to false alarm flags. In order to evaluate the reliability and the efficiency of our proposed FDII scheme in terms of avoiding false alarms, our proposed scheme is simulated over the entire flight profile as shown in Fig. 2. The estimated reference baselines (λ̂) may differ form the actual degraded engine (λ) and this can play a source of uncertainty in our FDII scheme in addition to the process and measurement noise. It should be noted that the dynamic mismatch between the actual engine and the OBEM models is also another source of uncertainty, but this is not investigated in this paper. Therefore, the robustness of the FDII scheme against the percentage of the reference baselines estimation error RBEE (RBEE% = 100 × ∆λ , where ∆λ = |λ − λ̂| and λ ∈ [0, 1]) is investigated in this section. λ Based on our simulation studies for the healthy sensors scenario, the FDII algorithm is robust to the maximum percentage of reference baselines estimation error of 3% for the compressor health parameters and a maximum of 2% for the turbine health parameters. Our proposed FDII algorithm has declared no false alarms in the range of the above RBEEs, however the possibility of false alarms will increase if the RBEEs are increased beyond these upper limits. In case that one is within these limits, the mode probability of the healthy sensors is near one whereas the other probabilities corresponding to the faulty sensor scenarios are all almost zero during the entire flight profile. The values for the probabilities depend on the design parameter ρ. In general the MM-based FDI is independent of ρ as long as it is selected as sufficiently small. August 28, 2015 DRAFT 17 P1 P2 P3 P4 P5 P6 1 Mode Probability Mode Probability 1 0.5 0 0 100 200 300 400 Time (Sec) (a) 500 600 P 1 P 2 P 3 P 4 P 5 1.2 P P 6 0.5 0 0 1 P 2 P P 3 4 P 5 P 6 1 Mode Probability 1.2 1.2 100 200 300 400 Time (Sec) (b) 500 600 0.5 0 0 100 200 300 400 Time (Sec) 500 600 (c) Fig. 3: Mode probabilities for 3% bias fault applied at (a) kf = 50 sec to the TC sensor, (b) kf = 250 sec to the PC sensor, and (c) kf = 450 sec to the N sensor in presence of the obtained maximum tolerable percentage of the estimation errors in TABLE III for the compressor health parameter reference baselines. B. Case 2: A 3% Sensor Bias Fault Detection and Isolation In this section, the performance of the sensor FDI scheme with respect to the fault detection time and the robustness of the algorithm with respect to the percentage of reference baselines estimation error (RBEE) are evaluated. This evaluation is performed during the entire flight profile which lasts for 520 sec, when a pre-determined bias fault with the severity of 3% of the engine steady-state output values under cruise condition occurs for a single sensor. TABLE III shows the fault detection times for each single sensor fault scenario at different stages of the flight profile including the climbing, cruise and landing modes. It also shows the maximum tolerable percentages of the RBEE of engine health parameters that is denoted by ∆λ. It is assumed that λ = 0.99. The limits are obtained through preserving two performance requirements for our proposed FDI scheme, namely: 1) the sensor fault detection time (FDT) should be less than 8 sec, and 2) no false alarms should be generated. This implies that our proposed FDI scheme can tolerate the reference baselines estimation error as long as the above performance requirements are fulfilled. In addition, Fig. 3 depicts the mode probabilities for three selected fault scenarios when the bias fault occurs at different instants of the flight profile. The value of the injected fault is set to 3% of the engine steady-state output values, while the percentage of the estimation errors for the compressor health parameters reference baselines (RBEE) are set at their maximum tolerable levels that are indicated in TABLE III. By comparing the results in TABLE III, it can be concluded that the sensor fault detection times during the cruise mode are much less than that of the other flight modes since there is less variation of thrust and ambient conditions. In spite of a large input and ambient condition variations during the climbing and the landing modes, it is still possible to detect a sensor fault by applying our proposed FDI scheme. In order to show this capability, the sensor faults occur at kf = 50 sec during the climbing mode, at kf = 250 sec during the cruise mode and at kf = 450 sec during the landing mode. The fault detection times are all indicated in TABLE III for various fault scenarios. To quantify the effectiveness and reliability of our proposed FDI scheme in presence of the mismatch between the OBEM model and the actual engine, confusion matrices are obtained for both the healthy and the faulty scenarios subject to different health parameter degradations and August 28, 2015 DRAFT 18 TABLE IV: The confusion matrix for 3% RBEE of the compressor health parameters. TC PC N TT PT No Fault TC 50 1 0 12 17 0 PC 0 49 0 0 0 0 N 0 0 50 0 0 0 TT 0 0 0 27 0 0 PT 0 0 0 10 29 0 No Fault 0 0 0 1 4 50 TABLE V: The confusion matrix for 3% RBEE of the turbine health parameters. TC PC N TT PT No Fault TC 50 0 1 2 0 0 PC 0 50 0 0 1 1 N 0 0 48 0 0 0 TT 0 0 0 41 0 0 PT 0 0 0 0 44 0 No Fault 0 0 1 7 5 49 measurement noise. The rows in the confusion matrix are the fault conditions and the columns are the actual isolated faults. The element in the ith row and j th column (CMij ) shows the rate that fault j is isolated when fault i occurs. Ideally, the confusion matrix should be a purely diagonal matrix. To obtain the confusion matrix for our sensor FDI scheme, 50 Monte Carlo simulations are performed in which the percentage of the RBEE exceeds the maximum tolerable limit that is reported in TABLE III. Tables IV and V show the confusion matrices for the healthy and 3% faulty scenarios as applied to the gas turbine engine sensors during the cruise mode subjected to 3% RBEE of both the compressor and the turbine health parameters, respectively. In addition to the percentage of the RBEE, the measurement noise is another factor that can affect the performance of our proposed FDI scheme. Consequently, TABLE VI depicts the confusion matrix that is obtained for investigating the effects of measurement noise signals, when their original standard deviations (SDv ) are multiplied by a factor of 20. According to our simulations, the initial impact of any increase in either the standard deviation of the noise measurements or the percentage of the RBEE is to delay the fault detection time. Moreover, the occurrence of false alarms and incorrect fault detections are the other consequences due to increases in the above uncertainty sources. Different performance indices can be defined to quantify the robustness of our proposed sensor FDI algorithm with respect to the levels of uncertainty sources [42], namely: P5 P5 P5 P6 j=1 i=1 CMij (i 6= j) j=1 CM6j i=1 CMii FPR = P6 , ACC = P6 P6 , IFDR = , (22) P6 P5 CM CM CM 6j ij ij j=1 j=1 i=1 j=1 i=1 where FPR, ACC and IFDR denote the false positive (false alarm) rate, accuracy and incorrect fault detection rate, respectively, that are calculated in TABLE VII to investigate the effects of various uncertainty sources. According to TABLE VII, increasing the levels of the uncertainty sources results in decrease of ACC, but increase in FPR and IFDR. Notwithstanding these observations, our proposed sensor FDI scheme still works sufficiently robust against a high level of measurement noise as well as discrepancies between the OBEM model and the actual engine health parameters reference August 28, 2015 DRAFT 19 TABLE VI: The confusion matrix for the measurement noise signals where the SDs are multiplied by a factor of 20. TC PC N TT PT No Fault TC 48 0 0 0 0 0 PC 0 46 0 0 0 0 N 0 0 49 0 0 0 TT 0 0 0 48 1 0 PT 0 0 0 0 47 1 No Fault 2 4 1 2 2 49 TABLE VII: Sensor FDI algorithm performance indices corresponding to different levels of uncertainties. Scenarios 3% Compressor RBEE 4% Compressor RBEE 3% Turbine RBEE 4% Turbine RBEE Noise SD×20 Noise SD×25 FPR 0 0.12 0.02 0.04 0.02 0.02 ACC 0.85 0.66 0.94 0.91 0.956 0.91 IFDR 0.16 0.376 0.016 0.076 0.0004 0.012 baselines. C. Case 3: Sensor Fault Detection and Isolation for Different Fault Severities In real applications, there is no guarantee that the sensor bias fault severity always matches the 3% pre-determined fault for which the MM structure is designed. Therefore, it is essential to investigate the performance of our proposed MM-based FDI scheme for an applied sensor bias fault having different severities starting from the minimum detectable bias. TABLE VIII shows the average detection times for all the faulty modes as a function of the fault severities, when the applied faults occur at different stages of the flight profile with also the maximum tolerable RBEE% for the compressor health parameters that are indicated in TABLE III. It can be observed from TABLE VIII that the higher the fault severity with respect to the pre-determined 3% fault, the later the detection time, given that the actual fault becomes further different from the pre-determined bias fault. Note that the minimum detectable sensor bias fault is 2% that requires larger time to be detected as compared to the higher fault severities, especially during the climbing and landing flight modes. It should be pointed out that our proposed MM-based structure is designed for a 3% sensor bias fault and is not capable of detecting and isolating sensor bias faults that have far greater TABLE VIII: The average sensor fault detection times for all fault modes as a function of the fault severity at different stages of the flight profile, under the maximum tolerable RBEE% for the compressor health parameters. Fault Time kf = 50 sec kf = 250 sec kf = 450 sec August 28, 2015 2% 14.18 8.34 17.66 3% 6.56 3.64 5.18 4% 6.74 3.98 5.32 5% 7.42 4.76 6.66 6% 8.6 5.7 7.52 DRAFT 20 TABLE IX: The average of the maximum detectable sensor bias fault (as percentage of the engine steady-state outputs) over the entire flight profile by using our FDI scheme when the corresponding maximum tolerable RBEE% reported in TABLE III are applied to the compressor and turbine health parameters. Fault Modes TC PC N TT PT Max. Tolerable Compressor RBEE% 25% 20% 12% 10% 70% Max. Tolerable Turbine RBEE% 70% 50% 100% 14% 75% severities. For this purpose, TABLE IX shows the maximum detectable sensor bias faults by using our proposed FDI scheme by also considering the maximum tolerable RBEE% for the compressor and the turbine health parameters. The reported detectable fault severities in TABLE IX correspond to the average fault severities for all the flight modes. However, if an applied sensor bias fault increases beyond the corresponding maximum detectable fault as indicated in TABLE IX, an incorrect fault may be detected. Therefore, it is recommended that one incorporates more models within the MM-based structure corresponding to higher pre-determined sensor faults to become capable of detecting and isolating faults with higher magnitudes in shorter durations of time. D. Case 4: Sensor Fault Severity Identification One of the advantages of our proposed MM-based FDI scheme is its capability in providing information on the occurred fault severity. However, this method is not precise for fault severity estimation, since it provides one with only information on the level of an occurred fault instead of the exact fault severity. Therefore, the modified GLR method introduced in Section V is integrated with our MM-based FDI scheme to estimate the sensor bias fault magnitude and severity. In order to investigate the performance of our proposed fault severity estimation method, the notion of the percentage of weighted mean square normalized residual errors (WMSNE) are obtained for various detected fault scenarios as follows: WMSNE% = PK (i,s+1) (i,s+1) L (k)( (Y (k)−YŶ (k) (k)) )2 1 X k=kds w Pκ × 100, (i,s+1) (k) L i=1 k=kds w Ŷ (i,s+1) (k) = C i (X̂ (i,s+1) (k) − XOBEM (k)) + YOBEM (k) + b̂s zs δ(k − kds ), s = 1, . . . , q (23) where K is the total simulation samples and Ŷ (i,s+1) (k) is the numerically constructed output associated with the (s + 1)th operational mode corresponding to the sth fault, in which the fault vector effect is generated based on the estimated fault magnitude b̂s and the fault occurrence detected time kds . It must be noted that there is no feedback and information sent from the fault estimation module to the filters for updating their pre-determined bias faults. TABLE X shows the average percentage of the WMSNE that is measured for different stages of the flight profile as a function of the bias fault severity as applied to various sensors. August 28, 2015 DRAFT 21 TABLE X: The average WMSNE% for all flight modes as a function of the bias fault severity applied to various sensors without considering any estimation error for the health parameter reference baselines. Fault TC PC N TT PT 2% 0.0085 0.1360 0.0111 0.0137 0.1313 3% 0.0067 0.1106 0.0109 0.0066 0.1269 4% 0.0073 0.1293 0.0107 0.0128 0.1359 5% 0.0124 0.1689 0.0105 0.0312 0.1503 6% 0.0195 0.2537 0.0104 0.0944 0.1615 According to TABLE X, the average percentage of WMSNE is less than 0.5% for various faults that are limited within the operational range of our FDI scheme as was defined in the preceding case. It can also be observed that the percentage of the WMSNE is lower for the cruise flight mode as compared to the climbing and landing modes due to the high variations of the engine thrust. E. Case 5: Concurrent Fault Detection, Isolation and Identification In previous simulations only a single sensor fault is applied to the gas turbine engine. In this case study, our proposed FDII scheme is used for concurrent fault scenarios that occur at different stages of the flight profile. For this purpose, the hierarchical scheme described in Section IV-B is used to diagnose the concurrent sensor faults. The fault detection times and the percentages of the WMSNE as given by (23) are obtained for two selected scenarios with concurrent sensor faults. The first scenario simulates the effects of a 6% bias fault applied to the TC sensor at kf = 50 sec during the climbing mode and the concurrent 5% bias fault applied to the N sensor at kf = 250 sec during the cruise mode. The estimated concurrent faults are depicted in Fig. 4. The concurrent faults for the first scenario are detected and isolated after 1.7 and 2.4 seconds, respectively from their occurrence instants, whereas the percentages of the WMSNEs are 0.0208% and 0.106%, respectively. The second scenario simulates the effects of a 4% bias fault that is applied to the TT sensor at kf = 250 sec during the cruise mode and the concurrent 6% bias fault that is applied to the PT sensor at kf = 450 sec during the landing mode. The concurrent faults for the second scenario are detected and isolated after 0.9 and 0.4 seconds, respectively from their occurrence instants, whereas the percentages of the WMSNEs are 0.0125% and 0.1702%, respectively. F. Case 6: Comparison In this section, the efficiency of our proposed MM-based sensor FDI scheme which utilizes the MHKF as a detection filter is compared with different filtering methods including the linear Kalman filter (LKF), extended Kalman filter (EKF), unscented Kalman filter (UKF), and the cubature Kalman filter (CKF) [43]. It must be noted that in the following conducted experiments, multiple combined residual vectors and covariance matrices associated with multiple operating points are computed for both the HKF and LKF filtering methods to construct the multiple HKF (MHKF) and multiple LKF (MLKF)-based FDI schemes, respectively. Moreover, our MMbased FDI scheme is compared with the interacting multiple model (IMM) approach [44], [45]. Different experiments are conducted in this section to compare the promptness of the fault August 28, 2015 DRAFT Sensor N Bias Fault Sensor TC Bias Fault 22 40 20 Estimated Fault Real Fault 0 -20 0 100 200 300 Time (sec) 400 500 600 (a) 600 400 Estimated Fault Real Fault 200 0 -200 0 100 200 300 Time (sec) 400 500 600 (b) Fig. 4: Estimated two concurrent sensor fault severities (a) a 6% bias fault that is applied to the TC sensor at kf = 50 sec, and (b) a 5% bias fault that is applied to the N sensor at kf = 250 sec without considering any health parameter degradations. detection and isolation scheme as well as the degree of robustness towards the health parameters degradations among the above filtering methods. In all the experiments, similar process and measurement noise signals are applied to the gas turbine engine and similar noise covariance matrices are used to construct the above filters. The sampling rates for simulating the actual engine and the nonlinear filtering approaches are 0.01 sec and 0.1 sec, respectively. Also, 2n + 1 sigma points, where n is the dimension of the state variable vector, are generated in the UKF method with the tuning parameters α = 10−3 , β = 2 and κ = 0. For the CKF method, 2n cubature points are √ generated through intersecting the unit sphere with the Cartesian axes and are then scaled by n. Due to space limitations, the details regarding the formulations of the above applied filtering methods are not included as they can be found in the literature. Experiment 1: The 3% single bias fault is applied to different sensors at kf = 250 sec during the cruise mode with no health parameter degradations. All the filters are capable of detecting and isolating the injected fault correctly with different fault detection times. The sensor FDTs are shown in TABLE XII for the detection filters that are utilized in the MM-based FDI scheme. It can be concluded from TABLE XII that our proposed approach is capable of detecting and isolating the sensor faults faster than other methods, particularly the MLKF method, given that the OBEM can capture the nonlinear behaviour of the engine more effectively than others. Although, August 28, 2015 DRAFT 23 1.2 1.2 P1 P2 P3 P4 P5 P P6 Mode Probability Mode Probability 0.5 0 0 100 200 300 400 Time (Sec) 500 P1 P2 P3 P4 P5 200 3 P 4 P 5 P 6 100 200 300 400 Time (Sec) (d) 500 300 400 Time (Sec) 500 600 (c) P 1 0.5 100 P 1.2 P6 Mode Probability Mode Probability 2 (b) 1 0 0 P 0.5 0 0 600 (a) 1.2 1 1 1 600 1 P 2 P 3 P 4 P 5 P 6 0.5 0 0 100 200 300 400 Time(Sec) 500 600 (e) Fig. 5: Mode probabilities for a 3% bias fault that is applied at kf = 250 sec to the TC sensor by applying multiple (a) HKF, (b) LKF, (c) EKF, (d) UKF and (e) CKF based FDI approaches with 2.5% degradations applied to the compressor health parameters of the actual engine. TABLE XI: Absolute mean of residual signals associated with various types of nonlinear filters corresponding to the healthy mode in the MM-based scheme for the healthy engine sensors without health degradation. Sensor TC PC N TT PT Absolute Mean of Residual Signal MHKF EKF UKF CKF 8.8329 × 10−4 0.00063 0.0058 0.0039 0.0044 0.0186 0.0127 0.0105 −4 4.0454 × 10 0.0032 0.0011 0.0009 8.1498 × 10−4 0.0081 0.0085 0.0069 0.0014 0.0028 0.0082 0.0074 the EKF, UKF, and CKF are well-known nonlinear filtering methods, however they detect and isolate the injected sensor faults with more delay than our proposed method. According to our observations that are included in TABLE XI, the HKF has smaller estimation error as compared to the EKF, UKF, and CKF, which leads to faster FDI performance. It is also expected that in case the OBEM is subjected to certain unmodeled dynamics with respect to a real engine, the FDTs that are obtained with multiple EKF, UKF, and CKF based FDI schemes are more comparable with our proposed MHKF-based FDI scheme. Experiment 2: The robustness of our developed MHKF-based FDI approach is compared with the other filtering methods here. The 3% bias fault is applied to the TC sensor at kf = 250 sec during the cruise mode with 2.5% degradations that are applied to the compressor health parameters. In this experiment, it is assumed that the OBEM health parameters are not updated August 28, 2015 DRAFT 24 and the 2.5% degradation is only applied to the compressor health parameters of the actual engine. Therefore, the reference baselines associated with the compressor health parameters are one for both the OBEM model and the nonlinear model that is used for deriving the other nonlinear filtering methods. The mode probabilities that are generated in this scenario are depicted in Fig. 5. It can be concluded that our method outperforms the other approaches in terms of robustness with respect to the health parameters degradations. It is also shown in Fig. 5 that the applied fault can be detected by using the EKF and MLKF methods in addition to our method, but false alarms are generated by these methods before the occurrence of the fault. Experiment 3: Our proposed MHKF method is similar to the EKF in the sense of the linearization process at certain operating points instead of the entire flight profile. Therefore, one may expect that the EKF method can yield similar results to that of the MHKF method in case the health parameters are also updated for the nonlinear engine model used for deriving the EKF. In this experiment, the same engine model where its health parameters are updated is used for the MM-based structures that utilize the MHKF and EKF schemes. The 3% bias fault is applied to the TC sensor at kf = 250 sec during the cruise mode with λ = 0.99 and λ̂ = 0.975. The estimated health parameters are updated similarly for both the EKF and MHKF schemes. Fig. 6 shows the mode probabilities that are generated in this scenario. According to Fig. 6, the EKF is also capable of correctly detecting and isolating the applied fault by using the health parameters updating mechanism. However, the fault detection time and the computational time of the EKF is far greater than that of the MHKF. The MM-based FDI method is capable of detecting and isolating the applied fault in 2.7 sec and 20.8 sec by using the MHKF and EKF methods, respectively. The same results are also obtained for the other fault scenarios, but are not included here due to the space limitations. Experiment 4: In this experiment, the performance of the FDI algorithm that utilizes our proposed MHKF as well as the other filtering methods are compared in the interacting multiple model (IMM) structure. For the IMM-based FDI structure, the sensor FDTs are computed for the 3% single bias fault that is applied to the sensors with no health parameter degradations as represented in the TABLE XIII. According to the simulation results, the fault is detected sooner by using the IMM structure that utilizes all the detection filters except the MHKF. It appears that the interactions among the multiple models do not improve the MHKF-based FDI scheme performance. For simulating the IMM scheme which utilizes our proposed MHKF, the off-diagonal elements of the transition probability matrix should be selected less than 0.001; otherwise, the probability of the healthy mode monotonically decreases to reach almost 0.8 before the occurrence of a sensor fault which can enhance the risk of a false alarm. Therefore, it is not recommended to use the IMM scheme for the MHKF method. Experiment 5: In this experiment, the computational time of all the above filtering methods are obtained and compared with our proposed MHKF approach in TABLE XIV. This comparison confirms the advantages of implementing the MHKF approach in real-time applications. The computational time is measured for only the filters corresponding to the healthy mode by the use of “tic-toc” command in Matlab. It must be noted that the computational time of the MHKF includes the time for not only simulating the healthy mode but also for running the OBEM model. Therefore, based on the information provided in TABLE XIV, the MHKF scheme is faster and more suitable than the other filtering methods to be utilized during the entire flight August 28, 2015 DRAFT 25 TABLE XII: Sensor fault detection times using multiple non-interacting HKF, LKF, EKF, UKF and CKF based FDI approaches without considering health parameter degradation. MM-Based FDI Approach HKF LKF EKF UKF CKF Detection Time (FDT) (sec) PC N TT PT 0.2 0.2 0.2 0.3 38.2 16.9 12.1 12.4 1 0.9 0.8 0.9 0.7 0.6 0.7 2.7 0.6 0.7 0.7 2.3 1.2 1.2 P 1 P 2 P 3 P P 4 5 P 6 1 Mode Probability Mode Probability Fault TC 0.2 8.3 1 0.6 0.6 0.5 0 0 100 200 300 400 Time (Sec) 500 600 (a) 1 P 1 P 2 P 3 P 4 P 5 P 6 0.5 0 0 100 200 300 400 Time (Sec) 500 600 (b) Fig. 6: Mode probabilities for a 3% bias fault applied at kf = 250 sec to the TC sensor using (a) the MHKF and (b) the EKF-based FDI methods, with λ = 0.99 and λ̂ = 0.975. profile. Computing the Jacobian functions in each time step for the EKF method and also the cubature and sigma points with their corresponding mean and covariance weight matrices for the CKF and UKF methods, respectively are time consuming operations that lead to the higher computational time compared to our proposed MHKF scheme. Moreover, the MLKF approach computes the Kalman gain matrices on-line, whereas the MHKF utilizes the previously stored gain matrices. However, if the same steady-state Kalman gain matrices are computed off-line TABLE XIII: Sensor fault detection times using multiple interacting HKF, LKF, EKF, UKF and CKF based FDI approaches without considering any health parameter degradation. MM-Based FDI Approach HKF LKF EKF UKF CKF August 28, 2015 Fault TC 0.3 6.3 0.9 0.5 0.5 Detection Time (FDT) (sec) PC N TT PT 0.4 0.3 0.3 0.5 35.8 15.7 11.6 11.8 0.9 0.7 0.8 0.8 0.5 0.5 0.6 2.3 0.5 0.5 0.5 1.9 DRAFT 26 TABLE XIV: Computational time as measured in seconds for different filtering methods. MHKF 131.21 MLKF 526.81 EKF 1184.2 UKF 2856.4 CKF 2673.44 and stored for use in the MLKF approach, the average computational time associated with the healthy mode filters in the MLKF scheme is about 80 seconds, which is less than that of the MHKF method. Under this situation, the extra computational time required by the MHKF is associated with the OBEM operations. Therefore, the only disadvantage of the MHKF method is the amount of memory that is needed for storing the look-up tables that include the matrices Ai , C i and Kssi at different operating points. Finally, in the following experiment results, it is shown that the number of required operating points, and therefore the amount of required memory for the MHKF, is less than that of the MLKF-based FDI method. Experiment 6: In this experiment, the number of required operating points is investigated by measuring the mean of the combined residual signals in presence of the health parameter degradations for the MLKF and MHKF methods. To cover the entire flight profile, five operating points are generated for the MHKF method as described in TABLE II. Note that the MLKF method still needs more operating points since it is not capable of tracking rapid variations of the thrust during the climbing and landing modes, and therefore it generates false alarms due to the higher estimation error as compared to the MHKF scheme. TABLE XV compares the mean of the MHKF and MLKF combined residual signals that are associated with the healthy mode as a function of the number of operating points. Fig. 7 displays the mode probabilities that are generated for the MHKF and MLKF methods for different number of operating points. In this experiment, the engine has no sensor fault, but a 3% degradation is applied to the actual engine compressor health parameters. As stated in Section VI-A, the MHKF is robust with respect to the applied health degradations even without updating the OBEM model health parameters, although the MHKF needs to be updated for larger degradation levels. Based on the results obtained, it can be concluded that the mean of the combined residual signal associated with the healthy mode can be reduced by increasing the number of the operating points. It is expected that the MLKF estimation error decreases further by increasing the number of the operating points. However, we are not capable of perfectly avoiding generation of a false alarm by using the MLKF method corresponding to our particular flight profile by increasing the number of the operating points, since the MLKF cannot track high variations of the thrust in our application. Therefore, it may be feasible to apply the MLKF with the combined PWL models if the engine thrust increases with the slower speed than ours since the PWL model weights calculation is a time-consuming process which may diminish the ability of the MLKF to track the rapid variations of the thrust. Therefore, it can be concluded that the MM-based FDI scheme which utilizes our proposed MHKF approach is capable of promptly detecting and isolating various sensor bias faults during the entire flight profile by updating the OBEM health parameters reference baselines and even without updating the OBEM model for certain levels of health parameter degradations. Our scheme also estimates the engine state and output variables with more accuracy and smaller number of operating points as compared to that by the MLKF-based scheme. August 28, 2015 DRAFT 27 1.2 P1 P2 P3 P4 P5 1.2 P6 P 1 2 P 3 P 4 P 5 P 1.2 100 200 300 400 Time (Sec) 500 600 1 P 2 P 3 P 4 P 5 P 6 1 0.5 0 0 P 6 Mode Probability 0.5 0 0 P 1 Mode Probability Mode Probability 1 100 200 (a) 300 400 Time (Sec) 500 0.5 0 0 600 100 200 300 400 Time (Sec) 500 600 500 600 (c) (b) 1.2 P 1 P 2 P 3 P 4 P 5 P 6 Mode Probability 1 0.5 0 0 (d) (e) 100 200 300 400 Time (Sec) (f) Fig. 7: Mode probabilities that are generated for the MM-based FDI method by utilizing (a-c) the MHKF and (d-f) the MLKF with one, three and five operating points. TABLE XV: Mean of the combined residual signals (γ 1c ) associated with the healthy mode for both the MHKF and MLKF methods in terms of the number of the operating points, whereas 3% degradation is applied to the compressor health parameters. Sensor TC PC N TT PT 1 operating point HKF LKF 0.109 0.2305 0.2286 0.943 0.0255 0.0123 0.0813 0.3339 0.0152 0.0477 3 operating points MHKF MLKF 0.077 0.1091 0.0771 0.1523 0.0167 0.0053 0.0745 0.2372 0.0116 0.036 5 operating points MHKF MLKF 0.0119 0.0857 0.0216 0.1315 0.0003 0.0014 0.0197 0.1008 0.0006 0.0049 VII. CONCLUSIONS In this paper, a novel approach for both single and concurrent sensor fault detection, isolation and identification/estimation (FDII) for gas turbine engines is proposed. Our methodology is based on the developed Hybrid Kalman Filter (HKF) as the detection filter of a hierarchical multiple-model based structure. Despite the use of linear Kalman filters, the HKF is capable of capturing the nonlinearities of the system by integrating a nonlinear on-board engine model (OBEM) with piecewise linear (PWL) models to cover the entire operating range of the engine. Compared to the multiple linear Kalman filter (MLKF), our proposed approach requires fewer number of operating points although each corresponds to a larger operating range. Another important contribution of this work is in the inclusion of the effects of health parameter degradations in our proposed sensor FDII scheme through updating the OBEM health parameters reference baselines that enables one to prevent false alarms and incorrect fault detections. August 28, 2015 DRAFT 28 Therefore, unlike most of the previous work in the literature that have not considered the influence of health parameters variations on the performance of the developed FDII approaches, our proposed sensor FDII scheme is sufficiently more effective for use in the entire flight profile. It is furthermore suitable during the engine life cycle by updating the OBEM health parameters reference baselines, and by replacing the steady-state values with the OBEM states and outputs and integration of the designed PWL models. Moreover, our proposed MM-based sensor FDI scheme is integrated with the modified GLR method to estimate a sensor fault severity. Finally, it is demonstrated through extensive simulation studies that the accuracy and robustness of our proposed MHKF-based FDI approach against the engine health parameter degradations are significantly superior to that of those generated by other investigated methods such as the MLKF, EKF, UKF, and CKF. A PPENDIX A In Section II, for sake of notational simplicity the same notations were used for both versions of the OBEM. However, here we use XNOBEM and YNOBEM to designate the nominal OBEM (λ = 1) that is equivalent to (2), and XOBEM and YOBEM to designate the OBEM with the updated health parameters (λ̂ 6= 1) that is equivalent to (5). Let the nominal continuous-time OBEM model (NOBEM) be represented by: ẊNOBEM (t) = fc (XNOBEM (t), HNOBEM (t), U (t)), YNOBEM (t) = gc (XNOBEM (t), HNOBEM (t)). To construct the HKF, the nominal continuous-time OBEM is initially linearized at a certain operating point (Xss , Uss , Yss ) without considering degradations as follows: ∂fc ∂fc |U (U (t) − Uss ) + ∆fc , |Xss (XNOBEM (t) − Xss ) + ∂XNOBEM ∂U ss ∂gc YNOBEM (t) = gc (Xss , Uss ) + |X (XNOBEM (t) − Xss ) + ∆gc , ∂XNOBEM ss ẊNOBEM (t) = fc (Xss , Uss ) + where fc (Xss , Uss ) ≡ 0 and gc (Xss , Uss ) ≡ Yss . The health parameters are the state-dependent functions whose effects are incorporated in the above partial derivatives. The linear continuoustime model is now discretized by using a sufficiently small sampling period to yield the corresponding discrete-time linear model: XNOBEM (k + 1) − Xss = A|Xss (XNOBEM (k) − Xss ) + B|Uss (U (k) − Uss ) + ∆F, YNOBEM (k) = Yss + C|Xss (XNOBEM (k) − Xss ) + ∆G, RT where A|Xss = exp(Ac |Xss Ts ), B|Uss = ( 0 s exp(Ac |Xss τ )dτ )Bc |Uss , and C|Xss = Cc |Xss are obtained in terms of the state-space matrices that are associated with the continuous-time linear ∂gc ∂fc c |Xss , Bc |Uss = ∂f | , and Cc |Xss = ∂XNOBEM |Xss , and the sampling model Ac |Xss = ∂XNOBEM ∂U Uss period is denoted by Ts . Also, ∆fc , ∆gc , ∆F and ∆G represent the higher order terms in the linearization process. To construct the HKF, it is necessary to update the OBEM health parameters. Therefore, the nominal model is only used once to derive the state-space matrices and the steady-state values. Assumption 1. The linearization of the nominal OBEM with λ = 1 and the updated OBEM with λ̂ 6= 1 generate approximately the same matrices and steady-state values. August 28, 2015 DRAFT 29 Therefore, given that Assumption 1 holds, the linearized version of the updated OBEM can be derived as follows: XOBEM (k + 1) − Xss ≈ A|Xss (XOBEM (k) − Xss ) + B|Uss (U (k) − Uss ) + ∆F, YOBEM (k) ≈ Yss + C|Xss (XOBEM (k) − Xss ) + ∆G. (24) Moreover, the relationship between the instantaneous values of XOBEM (k) and YOBEM (k) and the steady-state values associated with each linearized model can be given by: XOBEM (k) = Xss + Xl (k), YOBEM (k) = Yss + Yl (k), (25) where Xl (k) and Yl (k) represent the perturbations from the steady-state values as well as variations of the OBEM state variables and outputs due to updating the health parameters reference baselines. The linear Kalman filter can be designed as follows: X̂(k + 1) − Xss = A|Xss (X̂(k) − Xss ) + B|Uss (U (k) − Uss ) + Kss (Y (k) − Ŷ (k)), Ŷ (k) = Yss + C|Xss (X̂(k) − Xss ), which can be rewritten by using (25) as follows: X̂(k + 1) − XOBEM (k) + Xl (k) = A|Xss (X̂(k) − XOBEM (k)) + Kss (Y (k) − Ŷ (k)) + A|Xss Xl (k) + B|Uss (U (k) − Uss ), Ŷ (k) = YOBEM (k) + C|Xss (X̂(k) − XOBEM (k)) + C|Xss Xl (k) − Yl (k). (26) Using (24), the last two terms in the R.H.S of (26) can be rewritten as follows: A|Xss (XOBEM (k) − Xss ) + B|Uss (U (k) − Uss ) ≈ XOBEM (k + 1) − Xss − ∆F, C|Xss (XOBEM (k) − Xss ) − Yl (k) ≈ YOBEM (k) − Yss − Yl (k) − ∆G = −∆G. Therefore, the discrete-time form of the HKF can be obtained as follows: X̂(k + 1) − XOBEM (k + 1) ≈ A|Xss (X̂(k) − XOBEM (k)) + Kss (Y (k) − Ŷ (k)) − ∆F, Ŷ (k) ≈ YOBEM (k) + C|Xss (X̂(k) − XOBEM (k)) − ∆G, which will lead to (6) for the particular operating point if the higher order terms ∆F and ∆G as well as the approximation error due to Assumption 1 are neglected. R EFERENCES [1] R. Isermann and P. Balle, “Trends in the application of model-based fault detection and diagnosis of technical processes,” Control Engineering Practice, vol. 5, no. 5, pp. 709–719, 1997. [2] P. M. Frank, “Fault diagnosis in dynamic systems using analytical and knowledge-based redundancy: A survey and some new results,” Automatica, vol. 26, no. 3, pp. 459–474, 1990. [3] W.-M. Lin and T.-C. Ou, “Unbalanced distribution network fault analysis with hybrid compensation,” Generation, Transmission & Distribution, IET, vol. 5, no. 1, pp. 92–100, 2011. [4] X. Zhang, L. Tang, and J. Decastro, “Robust fault diagnosis of aircraft engines: a nonlinear adaptive estimation-based approach,” IEEE Trans. on Control Systems Technology, vol. 21, no. 3, pp. 861–868, 2013. [5] V. Venkatasubramanian, R. Rengaswamy, K. Yin, and S. N. Kavuri, “A review of process fault detection and diagnosis: Part I: Quantitative model-based methods,” Computers & Chemical Engineering, vol. 27, no. 3, pp. 293–311, 2003. August 28, 2015 DRAFT 30 [6] I. Hwang, S. Kim, Y. Kim, and C. E. Seah, “A survey of fault detection, isolation, and reconfiguration methods,” IEEE Trans. on Control Systems Technology, vol. 18, no. 3, pp. 636–653, 2010. [7] J. C. d. Silva, A. Saxena, E. Balaban, and K. Goebel, “A knowledge-based system approach for sensor fault modeling, detection and mitigation,” Expert Systems with Applications, vol. 39, no. 12, pp. 10977–10989, 2012. [8] T. E. Menke and P. S. Maybeck, “Sensor/actuator failure detection in the vista F-16 by multiple model adaptive estimation,” IEEE Trans. on Aerospace and Elec. Sys., vol. 31, no. 4, pp. 1218–1229, 1995. [9] P. S. Maybeck, “Multiple model adaptive algorithms for detecting and compensating sensor and actuator/surface failures in aircraft flight control systems,” Int. J. of Robust and Nonlinear Control, vol. 9, no. 14, pp. 1051–1070, 1999. [10] N. Meskin, E. Naderi, and K. Khorasani, “Fault diagnosis of jet engines by using a multiple model-based approach,” ASME Turbo Expo, no. GT2010-23442, pp. 319–329, 2010. [11] N. Meskin, E. Naderi, and K. Khorasani, “A multiple model-based approach for fault diagnosis of jet engines,” IEEE Trans. on Control Sys. Tech., pp. 254–262, 2013. [12] E. Naderi, N. Meskin, and K. Khorasani, “Nonlinear fault diagnosis of jet engines by using a multiple model-based approach,” J. of Eng. for Gas Turbines and Power, vol. 134, no. 1, p. 011602, 2012. [13] B. Pourbabaee, N. Meskin, and K. Khorasani, “Sensor fault detection and isolation using multiple robust filters for linear systems with time-varying parameter uncertainty and error variance constraints,” in IEEE Conf. on Control Applications (CCA), pp. 382–389, 2014. [14] A. J. Volponi, “Foundation of gas path analysis (part I and II),” Gas Turbine Condition Monitoring and Fault Diagnosis, vol. 1, 2003. [15] T. Kobayashi and D. L. Simon, “Evaluation of an enhanced bank of Kalman filters for in-flight aircraft engine sensor fault diagnostics,” J. of Eng. for Gas Turbines and Power, vol. 127, p. 497, 2005. [16] T. Kobayashi and D. L. Simon, “Application of a bank of Kalman filters for aircraft engine fault diagnostics,” in ASME Turbo Expo, collocated with the International Joint Power Generation Conference, pp. 461–470, 2003. [17] T. Kobayashi and D. L. Simon, “Hybrid Kalman filter approach for aircraft engine in-flight diagnosis: Sensor fault detection case,” J. of Eng. for Gas Turbines and Power, vol. 129, no. 3, pp. 746–754, 2007. [18] S. Simani, C. Fantuzzi, and S. Beghelli, “Diagnosis techniques for sensor faults of industrial processes,” IEEE Trans. on Control Systems Technology, vol. 8, no. 5, pp. 848–855, 2000. [19] A. J. Volponi, H. DePold, R. Ganguli, and C. Daguang, “The use of Kalman filter and neural network methodologies in gas turbine performance diagnostics: a comparative study,” J. of Eng. for Gas Turbines and Power, vol. 125, pp. 917–924, 2003. [20] R. Ganguli, “Application of fuzzy logic for fault isolation of jet engines,” J. of Eng. for Gas Turbines and Power, vol. 125, pp. 617–623, 2003. [21] S. Sampath and R. Singh, “An integrated fault diagnostics model using genetic algorithm and neural networks,” J. of Eng. for Gas Turbines and Power, vol. 128, pp. 49–56, 2006. [22] S. Rahme and N. Meskin, “Adaptive sliding mode observer for sensor fault diagnosis of an industrial gas turbine,” Control Engineering Practice, vol. 38, pp. 57–74, 2015. [23] E. Tsoutsanis, N. Meskin, M. Benammar, and K. Khorasani, “Transient gas turbine performance diagnostics through nonlinear adaptation of compressor and turbine maps,” J. of Engineering for Gas Turbines and Power, vol. 137, no. 9, p. 091201, 2015. [24] E. Tsoutsanis, N. Meskin, M. Benammar, and K. Khorasani, “A component map tuning method for performance prediction and diagnostics of gas turbine compressors,” Applied Energy, vol. 135, pp. 572–585, 2014. [25] L. Shang and G. Liu, “Sensor and actuator fault detection and isolation for a high performance aircraft engine bleed air temperature control system,” IEEE Trans. on Control Systems Technology, vol. 19, no. 5, pp. 1260–1268, 2011. [26] R. Babuska and H. B. Verbruggen, “Fuzzy set methods for local modeling and identification,” 1997. [27] X. C. Zhang, A. Visala, A. Halme, and P. Linko, “Functional state modelling approach for bioprocesses: local models for aerobic yeast growth processes,” J. of Process Control, vol. 4, no. 3, pp. 127–134, 1994. [28] M. Meila and M. I. Jordan, “Markov mixtures of experts,” Multiple Model Approaches to Modeling and Control, pp. 145– 166, 1997. [29] M. M. Seron, J. A. De Dona, and J. H. Richter, “Integrated sensor and actuator fault-tolerant control,” Int. J. of Control, vol. 86, no. 4, pp. 689–708, 2013. [30] A. S. Willsky and H. L. Jones, “A generalized likelihood ratio approach to the detection and estimation of jumps in linear systems,” IEEE Trans. on Automatic Control, vol. 21, no. 1, pp. 108–112, 1976. [31] J. Prakash, S. Narasimhan, and S. C. Patwardhan, “Integrating model based fault diagnosis with model predictive control,” Industrial & Engineering Chemistry Research, vol. 44, no. 12, pp. 4344–4360, 2005. [32] S. C. Patwardhan, S. Manuja, S. Narasimhan, and S. L. Shah, “From data to diagnosis and control using generalized orthonormal basis filters. part II: Model predictive and fault tolerant control,” J. of Process Control, vol. 16, no. 2, pp. 157–175, 2006. [33] P. M. Frank and X. Ding, “Survey of robust residual generation and evaluation methods in observer-based fault detection systems,” J. of process control, vol. 7, no. 6, pp. 403–424, 1997. August 28, 2015 DRAFT 31 [34] R. Seliger and P. M. Frank, “Fault-diagnosis by disturbance decoupled nonlinear observers,” in Proceedings of the 30th IEEE Conf. on Decision and Control, pp. 2248–2253, 1991. [35] D. Simon, “A comparison of filtering approaches for aircraft engine health estimation,” J. of Aerospace Science and Technology, vol. 12, no. 4, pp. 276–284, 2008. [36] B. Pourbabaee, N. Meskin, and K. Khorasani, “Multiple-model based sensor fault diagnosis using hybrid Kalman filter approach for nonlinear gas turbine engines,” in American Control Conference (ACC), pp. 4717–4723, 2013. [37] R. Murray-Smith and T. Johansen, Multiple Model Approaches to Nonlinear Modelling and Control. CRC press, 1997. [38] X. R. Li and Y. Zhang, “Numerically robust implementation of multiple-model algorithms,” IEEE Trans. on Aerospace and Electronic Systems, vol. 36, no. 1, pp. 266–278, 2000. [39] J. Prakash, S. C. Patwardhan, and S. Narasimhan, “A supervisory approach to fault-tolerant control of linear multivariable systems,” Industrial & Engineering Chemistry Research, vol. 41, no. 9, pp. 2270–2281, 2002. [40] A. P. Deshpande and S. C. Patwardhan, “Online fault diagnosis in nonlinear systems using the multiple operating approach,” Ind. Eng. Chem. Res., vol. 47, no. 17, pp. 6711–6726, 2008. [41] N. L. R. Group, “GSP software,” http://www.gspteam.com, 2011. [42] T. Fawcett, “An introduction to ROC analysis,” Pattern recognition letters, vol. 27, no. 8, pp. 861–874, 2006. [43] I. Arasaratnam and S. Haykin, “Cubature Kalman filters,” IEEE Trans. on Automatic Control, vol. 54, no. 6, pp. 1254–1269, 2009. [44] Y. Zhan and J. Jiang, “An interacting multiple-model based fault detection, diagnosis and fault-tolerant control approach,” in Proceedings of the 38th IEEE Conf. on Decision and Control, vol. 4, pp. 3593–3598, 1999. [45] J. Ru and X. R. Li, “Variable-structure multiple-model approach to fault detection, identification, and estimation,” IEEE Trans. on Control Systems Technology, vol. 16, no. 5, pp. 1029–1038, 2008. August 28, 2015 DRAFT
3cs.SY